:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --paper: #fffefa;
  --ink: #21312b;
  --muted: #6c756f;
  --green: #174a40;
  --green-deep: #113b33;
  --green-soft: #e7eee8;
  --line: #dfe2da;
  --warm: #eeebe3;
  --danger: #963f36;
  --danger-soft: #f8ece8;
  --pending: #8a6728;
  --pending-soft: #f4eedf;
  --focus: #9a792f;
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a, button, input, select, textarea, summary { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: wait; opacity: .55; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 2rem; line-height: 1.3; font-weight: 760; letter-spacing: -.035em; }
h2 { font-size: 1.12rem; line-height: 1.5; font-weight: 710; }
h3 { font-size: 1rem; line-height: 1.5; }
small, .small { font-size: .87rem; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.page-shell { width: min(100% - 64px, 1120px); margin: 0 auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 42px 0 26px; }
.site-heading { min-width: 0; }
.site-intro { margin-top: 7px; color: var(--muted); font-size: .93rem; }
.header-actions { display: flex; align-items: center; gap: 5px; flex: none; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 254, 250, .66); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); font-weight: 630; line-height: 1.5; text-decoration: none; white-space: nowrap; }
.button:hover { background: var(--warm); text-decoration: none; }
.button-primary { background: var(--green); color: #fff; border-color: var(--green); }
.button-primary:hover { background: var(--green-deep); }
.button-quiet { background: transparent; border-color: transparent; color: var(--green); }
.button-quiet:hover { background: var(--green-soft); }
.header-actions .button { min-height: 38px; padding: 6px 13px; font-size: .9rem; border-radius: 8px; }
.button[aria-pressed="true"], .button.active { border-color: #a9c0b2; color: var(--green); background: var(--green-soft); }
.button-primary.danger, .button-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.button-primary.button-danger:hover { background: #763129; border-color: #763129; }
#sync-state[data-state="error"], #sync-state[data-state="offline"] { color: var(--danger); }
.danger { color: var(--danger); }
.search-section { margin-bottom: 26px; }
.search-box { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; padding: 1px 18px; min-height: 58px; box-shadow: 0 2px 6px rgba(35, 47, 39, .025); }
.search-box:focus-within { border-color: #8da99a; box-shadow: 0 0 0 3px rgba(23, 74, 64, .08); }
.search-mark { width: 17px; height: 17px; flex: none; border: 1.7px solid var(--muted); border-radius: 50%; position: relative; margin: 0 3px 3px 0; }
.search-mark::after { content: ""; position: absolute; width: 7px; height: 1.7px; background: var(--muted); right: -5px; bottom: -3px; transform: rotate(45deg); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: none !important; box-shadow: none; background: transparent; color: var(--ink); padding: 14px 0; font-size: 1rem; }
.search-box input::placeholder { color: #828981; }
.search-box input::-webkit-search-cancel-button { display: none; }
.clear-search { border: 0; background: transparent; min-height: 44px; color: var(--green); padding: 7px 0 7px 8px; flex: none; font-size: .88rem; }
.pinned-section { margin-bottom: 30px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.section-heading h2 { font-size: .95rem; color: var(--muted); font-weight: 650; }
.pinned-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.pinned-link { position: relative; background: var(--green-soft); border: 1px solid transparent; border-radius: 11px; padding: 15px 17px; display: flex; flex-direction: column; justify-content: center; gap: 3px; min-height: 86px; transition: background .15s, border-color .15s; color: var(--green); min-width: 0; }
.pinned-link:hover { background: #dee9e0; border-color: #c8d8cc; text-decoration: none; }
.pinned-title { font-weight: 700; line-height: 1.45; padding-right: 15px; overflow-wrap: anywhere; }
.pinned-category { font-size: .8rem; color: #5e7569; }
.pinned-arrow { position: absolute; right: 13px; top: 13px; font-size: .95rem; color: #658272; }
.manager-banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; margin-bottom: 18px; background: var(--green-soft); border: 1px solid #cddbd0; border-radius: 11px; color: var(--green); }
.manager-banner strong { font-size: .94rem; margin-right: 10px; }
.manager-banner span { font-size: .86rem; color: #587064; }
.manager-banner .button { font-size: .86rem; padding-inline: 10px; }
.manager-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 0 16px; }
.manager-tools .button { font-size: .88rem; }
.manager-tools #export-data { margin-left: auto; }
.notice { position: fixed; left: 50%; bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px)); transform: translateX(-50%); z-index: 60; width: min(680px, calc(100% - 32px)); max-height: min(260px, 35dvh); overflow-y: auto; display: flex; align-items: center; gap: 12px; padding: 12px 13px 12px 16px; border: 1px solid #c9d9cc; border-radius: 12px; background: var(--green-soft); color: var(--green); margin: 0; overflow-wrap: anywhere; font-size: .9rem; box-shadow: 0 10px 40px rgba(23, 48, 32, .18); }
#notice-message { flex: 1; min-width: 0; }
.notice.error { background: var(--danger-soft); color: var(--danger); border-color: #e6cbc4; }
.notice-action { border: 0; border-bottom: 1px solid currentColor; padding: 5px 1px; color: inherit; background: transparent; font-weight: 700; flex: none; }
.notice-dismiss { color: inherit; background: transparent; border: 0; border-radius: 7px; min-width: 40px; min-height: 40px; font-size: 1.35rem; line-height: 1; flex: none; }
.notice-dismiss:hover { background: rgba(0, 0, 0, .04); }
.browse-controls { position: sticky; top: 0; z-index: 12; background: var(--bg); padding-top: 4px; padding-bottom: 12px; margin-bottom: 17px; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs { display: flex; align-items: stretch; gap: 24px; }
.tab { display: flex; align-items: center; gap: 7px; border: 0; border-bottom: 3px solid transparent; background: transparent; min-height: 54px; padding: 7px 1px 12px; font-weight: 700; color: var(--muted); white-space: nowrap; font-size: 1rem; }
.tab.active, .tab[aria-selected="true"] { color: var(--green); border-bottom-color: var(--green); }
.tab-count { font-size: .78rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.list-tools { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex: none; }
.sort-field { display: inline-flex; align-items: center; }
.sort-field select { min-height: 44px; max-width: 130px; border: 0; background: transparent; color: var(--muted); padding: 6px 22px 6px 8px; font-size: .83rem; cursor: pointer; }
.tool-button { min-height: 44px; padding: 6px 10px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--muted); font-size: .83rem; white-space: nowrap; }
.tool-button:hover { color: var(--green); background: var(--green-soft); }
.tool-button[aria-pressed="true"] { color: var(--green); border-color: #c7d7cb; background: var(--green-soft); }
.category-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.filter-button { flex: none; min-height: 40px; border: 1px solid transparent; border-radius: 22px; padding: 5px 13px; background: transparent; color: var(--muted); font-size: .88rem; white-space: nowrap; }
.filter-button:hover { background: var(--warm); color: var(--ink); }
.filter-button.active, .filter-button[aria-pressed="true"] { background: var(--paper); border-color: #c8d3ca; color: var(--green); font-weight: 700; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; min-height: 44px; margin: -3px 0 13px; }
.results-toolbar .list-tools { margin-left: auto; }
.results-description { min-width: 0; margin: 0; }
.results-description:empty { display: none; }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; outline: none; }
.work-card { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; padding: 21px 23px 16px; display: flex; flex-direction: column; min-width: 0; box-shadow: 0 2px 6px rgba(33, 49, 43, .02); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; min-height: 23px; }
.category-label { color: #557264; font-weight: 630; font-size: .79rem; margin-right: 3px; }
.status-badge { display: inline-flex; align-items: center; border-radius: 5px; padding: 2px 7px; font-size: .75rem; line-height: 1.45; font-weight: 550; white-space: nowrap; }
.status-open { color: #456d57; background: #edf3ec; }
.status-closed { color: #737b74; background: #f0f1ec; }
.status-pending { color: var(--pending); background: var(--pending-soft); }
.status-note { color: var(--muted); font-size: .78rem; }
.status-note::before { content: "·"; margin-right: 6px; color: #adb1a9; }
.work-title { font-size: 1.17rem; line-height: 1.55; font-weight: 710; letter-spacing: -.015em; overflow-wrap: anywhere; }
.card-main-link { display: inline; color: var(--ink); text-decoration: none; }
.card-main-link:hover { color: var(--green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.work-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-clamp: 2; color: var(--muted); margin-top: 7px; line-height: 1.65; font-size: .92rem; overflow-wrap: anywhere; }
.work-description:empty { display: none; }
.card-bottom { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 13px; }
.open-link { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; margin-right: auto; font-size: .89rem; font-weight: 700; }
.open-arrow { font-size: 1rem; }
.copy-link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; min-width: 44px; padding: 6px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: .82rem; }
.copy-link:hover { background: var(--warm); color: var(--green); }
.pending-link { color: var(--muted); font-size: .84rem; min-height: 42px; display: flex; align-items: center; margin-right: auto; }
.children { margin-top: 13px; border-top: 1px solid var(--line); padding-top: 7px; }
.children summary { color: var(--muted); cursor: pointer; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; font-size: .86rem; }
.children summary::-webkit-details-marker { display: none; }
.children summary::after { content: "＋"; color: var(--green); font-size: 1rem; }
.children[open] summary::after { content: "−"; }
.child-links { display: grid; gap: 4px; padding: 3px 0; }
.child-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; line-height: 1.55; font-size: .9rem; overflow-wrap: anywhere; }
.card-management { position: relative; }
.card-management summary { color: var(--muted); cursor: pointer; min-height: 42px; display: flex; align-items: center; list-style: none; padding: 6px 9px; border-radius: 7px; font-size: .82rem; }
.card-management summary:hover, .card-management[open] summary { background: var(--warm); color: var(--green); }
.card-management summary::-webkit-details-marker { display: none; }
.management-actions { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 25; min-width: 200px; max-width: min(280px, calc(100vw - 58px)); background: var(--paper); border: 1px solid #d2d9cf; border-radius: 11px; padding: 6px; box-shadow: 0 9px 30px rgba(32, 45, 41, .15); display: grid; gap: 2px; }
.management-actions button { display: block; width: 100%; text-align: left; border: 0; border-radius: 6px; background: transparent; min-height: 44px; padding: 8px 10px; color: var(--ink); white-space: normal; font-size: .87rem; }
.management-actions button:hover { background: var(--warm); }
.management-actions .danger { color: var(--danger); }
.empty-state { padding: 36px 20px; text-align: center; background: rgba(255, 254, 250, .55); border: 1px dashed var(--line); border-radius: 12px; }
.empty-mark { width: 30px; height: 24px; border: 1.5px solid #bcc7bb; border-radius: 5px; margin: 0 auto 15px; position: relative; }
.empty-mark::before { content: ""; position: absolute; height: 1.5px; width: 13px; left: 7px; top: 10px; background: #bcc7bb; }
.empty-state h2 { font-size: 1.02rem; }
.empty-state p { color: var(--muted); font-size: .9rem; max-width: 36em; margin: 8px auto 17px; }
.empty-state .button { font-size: .88rem; }
.show-more-wrap { text-align: center; margin: 22px 0 5px; }
.show-more-wrap:has(> button[hidden]) { display: none; }
.show-more-wrap .button { min-width: 160px; background: transparent; font-size: .9rem; }
.stored-section { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; }
.stored-section > summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; font-weight: 650; }
.stored-section > summary::-webkit-details-marker { display: none; }
.stored-section > summary::after { content: "＋"; font-size: 1rem; margin-left: auto; color: var(--green); }
.stored-section[open] > summary::after { content: "−"; }
.stored-count { font-size: .78rem; font-weight: 500; color: #879085; }
.stored-intro { margin: 5px 0 15px; }
.stored-grid .work-card { background: rgba(255, 254, 250, .35); box-shadow: none; }
.site-footer { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 32px 0 26px; padding-top: 17px; border-top: 1px solid var(--line); font-size: .78rem; color: #7a8378; }
.footer-summary, .footer-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-status { justify-content: flex-end; }
#total-count:empty, #sync-state:empty { display: none; }
#sync-state { color: #64806c; }
#sync-state.error, #sync-state.sync-error { color: var(--danger); }
.skip-link { position: absolute; left: 16px; top: 8px; background: var(--green); color: #fff; padding: 8px 14px; border-radius: 8px; transform: translateY(-150%); z-index: 60; }
.skip-link:focus { transform: none; }
.noscript { margin: 24px; font-size: 1rem; }

/* 管理視窗：內容可捲動，標題與儲存列始終留在視窗內。 */
dialog { width: min(700px, calc(100% - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; overflow: hidden; border: 1px solid #d2d9cf; border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 90px rgba(20, 35, 28, .26); }
dialog::backdrop { background: rgba(15, 30, 23, .4); backdrop-filter: blur(3px); }
.small-dialog { width: min(440px, calc(100% - 32px)); }
.dialog-form { display: flex; flex-direction: column; max-height: calc(100dvh - 40px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex: none; padding: 17px 23px; border-bottom: 1px solid var(--line); background: var(--paper); }
.dialog-header h2 { font-size: 1.18rem; line-height: 1.5; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; font-size: 1.55rem; border: 0; border-radius: 8px; background: transparent; color: var(--muted); min-width: 40px; min-height: 40px; padding: 2px 8px; line-height: 1; }
.icon-button:hover { background: var(--warm); color: var(--ink); }
.dialog-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 22px 23px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > span:first-child { font-weight: 650; font-size: .9rem; }
.field input, .field textarea, .field select { width: 100%; min-width: 0; min-height: 46px; padding: 9px 11px; border: 1px solid #d6dbd1; border-radius: 8px; color: var(--ink); background: #fff; font-size: 1rem; }
.field input::placeholder, .field textarea::placeholder { color: #93998f; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #89a28d; }
.field textarea { resize: vertical; min-height: 82px; }
.field small { color: var(--muted); font-size: .78rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.check-field { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 10px; cursor: pointer; font-size: .87rem; }
.check-field input { width: 19px; height: 19px; accent-color: var(--green); flex: none; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 70px; }
.password-toggle { position: absolute; top: 3px; right: 4px; min-height: 40px; min-width: 56px; border: 0; border-radius: 5px; background: transparent; color: var(--green); padding: 6px 10px; font-size: .83rem; }
.password-toggle:hover { background: var(--green-soft); }
.advanced-settings { margin-top: 3px; border: 1px solid var(--line); border-radius: 10px; }
.advanced-settings > summary { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 11px 14px; list-style: none; cursor: pointer; font-size: .9rem; color: var(--green); font-weight: 650; }
.advanced-settings > summary::-webkit-details-marker { display: none; }
.advanced-settings > summary::after { content: "＋"; margin-left: auto; font-weight: 400; }
.advanced-settings[open] > summary::after { content: "−"; }
.advanced-hint { color: var(--muted); font-size: .77rem; font-weight: 400; }
.advanced-body { padding: 17px 14px 6px; border-top: 1px solid var(--line); }
.children-editor { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 12px; }
.children-editor .section-heading { margin-bottom: 12px; }
.children-editor .section-heading .button { min-height: 40px; font-size: .82rem; padding-inline: 9px; }
.child-editor-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 40px; gap: 9px; align-items: start; }
.child-editor-row input { min-height: 44px; width: 100%; min-width: 0; font-size: .94rem; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.child-editor-row .field > span { font-size: .8rem; font-weight: 500; color: var(--muted); }
.remove-child { margin-top: 29px; }
.dialog-footer { display: flex; align-items: center; justify-content: space-between; flex: none; gap: 12px; padding: 15px 23px 18px; border-top: 1px solid var(--line); background: var(--paper); box-shadow: 0 -3px 12px rgba(33, 49, 43, .025); }
.dialog-footer .button { font-size: .9rem; }
.dialog-actions { display: flex; gap: 9px; margin-left: auto; }
.form-error { padding: 11px 13px; background: var(--danger-soft); color: var(--danger); border-radius: 8px; margin-bottom: 17px; overflow-wrap: anywhere; font-size: .88rem; }
.confirm-dialog .dialog-body { padding-block: 24px; }
#confirm-message { line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }

/* 精簡檢視保留名稱、用途及操作，減少垂直空白。 */
.compact-view .work-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.compact-view .work-card { padding: 13px 18px 10px; }
.compact-view .card-meta { margin-bottom: 2px; }
.compact-view .work-title { font-size: 1.02rem; }
.compact-view .work-description { margin-top: 3px; -webkit-line-clamp: 1; line-clamp: 1; font-size: .86rem; }
.compact-view .card-bottom { padding-top: 5px; }
.compact-view .children { margin-top: 8px; }
@media (min-width: 761px) {
  .compact-view .work-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 22px; }
  .compact-view .card-meta, .compact-view .work-title, .compact-view .work-description { grid-column: 1; }
  .compact-view .card-bottom { grid-column: 2; grid-row: 1 / span 3; margin: 0; padding: 0; align-self: center; }
  .compact-view .children { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
  .list-heading { align-items: flex-start; gap: 8px; }
  .tabs { gap: 18px; }
  .list-tools { gap: 1px; }
  .tool-button { padding-inline: 7px; }
  .sort-field select { max-width: 110px; }
}
@media (max-width: 760px) {
  .page-shell { width: calc(100% - 32px); }
  .site-header { padding: 17px 0 16px; align-items: center; gap: 13px; }
  h1 { font-size: 1.65rem; letter-spacing: -.04em; }
  .site-intro { display: none; }
  .header-actions { gap: 0; padding: 2px; border-radius: 10px; }
  .header-actions .button { min-height: 36px; padding: 5px 10px; font-size: .8rem; border-radius: 7px; }
  .search-section { margin-bottom: 18px; }
  .search-box { min-height: 52px; padding-inline: 14px; gap: 12px; border-radius: 11px; }
  .search-box input { padding-block: 12px; font-size: 1rem; }
  .pinned-section { margin-bottom: 20px; }
  .section-heading { margin-bottom: 10px; }
  .section-heading h2 { font-size: .85rem; }
  .pinned-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pinned-link { height: 68px; min-height: 68px; max-height: 68px; padding: 10px 12px; border-radius: 10px; gap: 0; }
  .pinned-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; max-height: 2.8em; line-height: 1.4; font-size: .9rem; }
  .pinned-category { display: none; }
  .pinned-arrow { right: 10px; top: 11px; font-size: .85rem; }
  .manager-banner { padding: 10px 12px; gap: 8px; margin-bottom: 15px; }
  .manager-banner strong { display: block; font-size: .86rem; }
  .manager-banner span { font-size: .76rem; }
  .manager-banner .button { padding: 6px 7px; font-size: .8rem; }
  .manager-tools { gap: 5px; padding-top: 2px; }
  .manager-tools .button { font-size: .8rem; padding-inline: 11px; }
  .manager-tools #export-data { margin-left: 0; }
  .notice { left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 12px); transform: none; width: auto; font-size: .82rem; padding: 10px 8px 10px 12px; gap: 9px; }
  .notice-dismiss { min-width: 36px; min-height: 36px; }
  .browse-controls { padding-top: 2px; padding-bottom: 7px; margin-bottom: 6px; }
  .list-heading { flex-wrap: wrap; align-items: center; margin-bottom: 6px; gap: 0; }
  .tabs { flex: 1; gap: 18px; }
  .tab { min-height: 49px; font-size: .94rem; gap: 6px; padding-bottom: 10px; }
  .tab-count { font-size: .71rem; }
  .results-toolbar { min-height: 40px; margin: 0 0 9px; gap: 0 5px; }
  .results-toolbar .list-tools { width: auto; min-width: 0; justify-content: flex-end; margin: 0 0 0 auto; gap: 0; }
  .sort-field { margin-right: 0; }
  .sort-field select { min-height: 40px; padding-left: 4px; padding-right: 17px; max-width: 105px; font-size: .78rem; }
  .tool-button { min-height: 40px; padding-inline: 8px; font-size: .78rem; }
  .category-filters { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; gap: 5px; padding: 0 1px 3px; scrollbar-width: none; }
  .category-filters::-webkit-scrollbar { display: none; }
  .filter-button { min-height: 38px; padding: 5px 12px; font-size: .8rem; }
  .results-description { flex: 1 1 auto; font-size: .76rem; line-height: 1.5; margin: 0; }
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .work-card { padding: 17px 18px 12px; border-radius: 11px; }
  .card-meta { gap: 5px; margin-bottom: 7px; }
  .category-label { font-size: .8rem; }
  .status-badge { font-size: .75rem; padding: 2px 6px; }
  .work-title { font-size: 1.1rem; line-height: 1.55; }
  .work-description { font-size: .9rem; margin-top: 5px; }
  .card-bottom { padding-top: 9px; gap: 5px; }
  .open-link { font-size: .85rem; }
  .copy-link, .card-management summary { font-size: .78rem; }
  .management-actions { min-width: 190px; max-width: calc(100vw - 58px); }
  .children { margin-top: 10px; }
  .children summary { font-size: .8rem; }
  .child-links a { font-size: .84rem; }
  .empty-state { padding: 30px 15px; }
  .empty-state h2 { font-size: .95rem; }
  .empty-state p { font-size: .83rem; }
  .stored-section { margin-top: 25px; }
  .stored-section > summary { font-size: .84rem; }
  .site-footer { flex-direction: column; gap: 6px; margin-top: 25px; font-size: .7rem; }
  .footer-summary, .footer-status { gap: 10px; }
  .footer-status { justify-content: flex-start; }
  dialog, .small-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 13px; }
  .small-dialog { max-width: 440px; }
  .dialog-form { max-height: calc(100dvh - 24px); }
  .dialog-header { padding: 13px 17px; gap: 12px; }
  .dialog-header h2 { font-size: 1.06rem; }
  .dialog-body { padding: 18px 17px; }
  .dialog-footer { padding: 12px 17px 15px; gap: 8px; flex-wrap: wrap; }
  .dialog-footer .button { font-size: .85rem; padding-inline: 13px; }
  .dialog-actions { gap: 8px; }
  .dialog-footer > .danger { padding-left: 0; }
  .field { margin-bottom: 16px; }
  .field > span:first-child { font-size: .84rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .check-field { font-size: .82rem; }
  .advanced-settings > summary { gap: 8px; padding-inline: 12px; font-size: .85rem; }
  .advanced-hint { font-size: .7rem; }
  .advanced-body { padding-inline: 12px; }
  .child-editor-row { grid-template-columns: minmax(0, 1fr) 40px; gap: 5px 8px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 13px; }
  .child-editor-row .field { margin-bottom: 7px; }
  .child-editor-row .field:first-child { grid-column: 1; grid-row: 1; }
  .child-editor-row .field:nth-child(2) { grid-column: 1; grid-row: 2; }
  .child-editor-row .remove-child { grid-column: 2; grid-row: 1; margin-top: 28px; }
  .compact-view .work-card { padding: 12px 15px 8px; }
  .compact-view .work-title { font-size: .98rem; }
}
@media (max-width: 359px) {
  .page-shell { width: calc(100% - 24px); }
  .site-header { gap: 8px; }
  h1 { font-size: 1.46rem; }
  .site-intro { font-size: .74rem; }
  .header-actions .button { padding-inline: 7px; }
  .tabs { gap: 14px; }
  .advanced-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
