/* 书城沿用主页的纸面、描边和主题色。 */
.st-page { max-width: 1000px; margin: auto; padding: 32px 24px 64px; }
.st-page h1 { font-size: 26px; font-weight: 500; margin: 0 0 12px; }
.st-page h2 { font-size: 19px; font-weight: 500; margin: 0 0 8px; }
.st-page p { margin: 8px 0; }
.st-sub, .st-meta { color: var(--ink-3); font-size: 13px; }
.st-message { color: var(--ink-2); min-height: 24px; }
.st-message.error { color: var(--danger, #bc4141); }
.st-toolbar, .st-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0 24px; }
.st-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.st-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.st-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.st-card:hover { border-color: var(--line-strong); }
.st-book-main { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; min-height: 44px; color: var(--ink); text-decoration: none; }
.st-book-main h2 { margin: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.st-book-main:hover h2 { color: var(--accent); }
.st-book-main:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r-sm); }
.st-book-main .st-meta { margin: 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.st-book-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.st-card .st-price { margin: 0; font-size: 14px; line-height: 1.5; white-space: nowrap; }
.st-card .st-actions { flex-wrap: nowrap; gap: 6px; margin: 0; }
.st-card .st-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 10px; font-size: 12px; white-space: nowrap; }
.st-card .st-actions:empty { display: none; }
.st-price { color: var(--ink); font-size: 18px; }
.st-button { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.st-button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.st-card .st-button.primary { color: var(--bg); }
.st-button:hover:not(:disabled) { border-color: var(--accent); }
.st-button:focus-visible, .st-field:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.st-button:disabled { cursor: default; opacity: .65; }
.st-field { box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; min-width: 0; }
.st-toolbar input { flex: 1; min-width: 180px; }
.st-form { display: grid; gap: 16px; }
.st-form[hidden], .st-book-editor[hidden] { display: none; }
.st-form label { display: grid; gap: 6px; }
.st-form .st-check { display: flex; align-items: baseline; gap: 8px; }
.st-form textarea { min-height: 100px; resize: vertical; }
.st-trials { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; }
.st-trials legend { font-size: 14px; }
.st-contents { list-style: none; padding: 0; margin: 0; }
.st-contents > li { border-top: 1px solid var(--line); padding: 16px 0; }
.st-contents ul { list-style: none; padding-left: 16px; }
.st-contents a { color: var(--accent); }
.st-locked { color: var(--ink-3); }
.st-panel + .st-panel { margin-top: 24px; }
.st-order { border-top: 1px solid var(--line); padding: 16px 0; overflow-wrap: anywhere; }
.st-table-wrap { overflow: auto; }
.st-book-filters { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; margin: 16px 0; overflow-x: auto; padding: 4px; }
.st-book-filters > .st-field { width: auto; }
.st-book-filters input { flex: 1 1 280px; min-width: 180px; max-width: 360px; }
.st-book-filters select { flex: 0 0 130px; }
.st-book-filters .st-button { flex-shrink: 0; white-space: nowrap; }
.st-book-filters .st-sub { flex-shrink: 0; margin: 0; white-space: nowrap; }
.st-books-table tr[hidden] { display: none; }
.st-book-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.st-book-pagination select.st-field { width: auto; }
.st-book-pagination input.st-field { width: 76px; }
.st-book-pagination .st-sub { margin: 0; }
.st-book-pagination button { white-space: nowrap; }
.st-table { width: 100%; text-align: left; font-size: 13px; border-collapse: collapse; }
.st-table th, .st-table td { padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.st-books-table .st-book-title { min-width: 220px; max-width: 360px; white-space: normal; font-weight: 400; }
.st-books-table .st-book-title a { color: inherit; font-weight: inherit; text-decoration: none; text-underline-offset: 3px; }
.st-books-table .st-book-title a:hover { text-decoration: underline; }
.st-books-table .st-book-title a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.st-books-table td:nth-child(2) { max-width: 200px; white-space: normal; }
.st-books-table .st-actions { margin: 0; gap: 6px; flex-wrap: nowrap; }
.st-books-table .st-button { min-height: 36px; padding: 6px 10px; }
.st-books-table .is-editing { background: var(--accent-soft); }
.st-books-table .st-delete { color: var(--danger); }
.st-book-tip { position: fixed; inset: auto; margin: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 18px; overflow: auto; background: var(--ea-card, var(--surface)); color: var(--ea-text, var(--ink)); border: 1px solid var(--ea-line, var(--line)); border-radius: 8px; box-shadow: 0 8px 32px #0002; font: inherit; }
.st-book-tip::backdrop { background: transparent; }
.st-tip-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.st-tip-header h3 { margin: 0; font-size: 17px; font-weight: 500; }
.st-tip-header .st-button { padding: 0; width: 32px; height: 32px; font-size: 22px; border-color: transparent; background: transparent; }
.st-book-tip .st-tip-book { margin: 2px 0 16px; color: var(--ea-text-sub, var(--ink-3)); font-size: 13px; overflow-wrap: anywhere; }
.st-tip-body { max-height: calc(100dvh - 190px); overflow: auto; padding: 3px; }
.st-book-tip .st-form { margin-top: 12px; }
.st-book-tip .st-field { width: 100%; }
.st-book-tip .st-actions { justify-content: flex-end; margin: 16px 0 0; }
.st-book-tip .st-sub { color: var(--ea-text-sub, var(--ink-3)); line-height: 1.7; }
.st-book-tip .st-message { min-height: 0; margin: 12px 0 0; }
.st-book-tip .st-message:empty { display: none; }
.st-book-tip .st-tip-preview { white-space: pre-line; padding: 12px; background: var(--ea-head, var(--sunken)); border-radius: 4px; font-size: 13px; line-height: 1.7; }
.st-book-tip .st-tip-preview[hidden] { display: none; }
.st-book-tip .st-delete { color: var(--ea-danger, var(--danger)); }
.st-book-tip .st-trials { max-height: 200px; }
@media (max-width: 720px) {
  .st-books-table .st-button { min-height: 44px; }
  .st-book-pagination button, .st-book-pagination .st-field { min-height: 44px; }
}
.st-description { white-space: pre-wrap; }
body[data-store-page="store"] .st-message:empty { display: none; }
@media (min-width: 768px) {
  .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .st-book-filters .st-field { min-height: 44px; font-size: 16px; }
  .st-page { padding: 24px 16px 48px; }
  body[data-store-page="store"] .st-page { padding-top: 20px; }
  .st-page h1 { font-size: 23px; }
  .st-toolbar { flex-wrap: nowrap; gap: 8px; margin: 12px 0 16px; }
  .st-toolbar input { min-width: 0; }
  .st-toolbar select { max-width: 45%; }
  .st-toolbar .st-field { min-height: 44px; font-size: 16px; }
  .st-panel { padding: 18px; }
  .st-card { gap: 10px; padding: 12px; }
  .st-book-main h2 { font-size: 15px; }
}
