/* Admin console: the same ink and paper, quieter and denser, like an editorial back office. */
.admin-view { max-width: 1240px; padding: 24px 0 96px; }

.admin-view :focus-visible, .adm-dialog :focus-visible, .adm-drawer :focus-visible, .adm-toasts :focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.adm-panel:focus { outline: none; }
.adm-panel:focus-visible { outline: 2px solid var(--red); outline-offset: 6px; }

/* Header */
.adm-head { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding-bottom: 18px; }
.adm-mark { display: grid; place-items: center; width: 52px; height: 52px; color: var(--paper); background: var(--red); font: 400 28px/1 "Yu Mincho", "MS Mincho", serif; }
.adm-head h1 { margin-top: 6px; color: var(--paper); font: italic 400 clamp(26px, 3.2vw, 36px)/1.05 Georgia, serif; letter-spacing: -.03em; }
.adm-head-meta { display: flex; align-items: center; gap: 14px; }
.adm-updated { color: #a3a097; font: italic 13px/1.4 Georgia, serif; }

/* Sticky section tabs */
/* app.css styles every nav (flex row, centred on phones); here the strip itself must scroll, not widen the page. */
.adm-tabs { position: sticky; top: 0; z-index: 12; display: block; justify-self: stretch; min-width: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--night); }
.adm-tablist { position: relative; display: flex; min-width: 0; gap: 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.adm-tablist::-webkit-scrollbar { display: none; }
.adm-tablist [role="tab"] { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px; border: 0; color: #a3a097; background: none; font: 700 12px/1 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.adm-tablist [role="tab"]:hover { color: var(--paper); }
.adm-tablist [role="tab"]:focus-visible { outline-offset: -4px; }
.adm-tablist [role="tab"][aria-selected="true"] { color: var(--paper); }
.adm-tablist [role="tab"][aria-selected="true"]::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--red); }
.adm-tablist [role="tab"].is-missing { color: #77746d; }
.adm-tab-kanji { color: #77746d; font: 400 16px/1 "Yu Mincho", "MS Mincho", serif; letter-spacing: 0; }
[aria-selected="true"] > .adm-tab-kanji { color: var(--red); }
.adm-count { min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 6px; border-radius: 11px; color: #fff; background: #c8352b; font: 700 11px/1 Arial, sans-serif; letter-spacing: 0; }
.adm-count:empty { display: none; }
.adm-count.is-quiet { color: var(--paper); background: #3a3936; }
.adm-panels { padding-top: 22px; }

/* Buttons and small parts */
.adm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid currentColor; color: inherit; background: transparent; font: 700 12px/1.2 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.adm-btn:hover:not(:disabled) { color: var(--red); }
.adm-btn:disabled { opacity: .45; cursor: not-allowed; }
.adm-btn[aria-busy] { cursor: progress; }
.adm-btn-primary { border-color: var(--ink); color: var(--paper); background: var(--ink); }
.adm-btn-primary:hover:not(:disabled) { border-color: var(--red); color: #fff; background: var(--red); }
.adm-btn-danger { border-color: #a5281f; color: #a5281f; }
.adm-btn-danger:hover:not(:disabled) { color: #fff; background: #a5281f; }
.adm-btn-quiet { border-color: transparent; color: #57534b; }
.adm-btn-small { padding: 0 12px; }
.adm-head .adm-btn { color: var(--paper); }
.adm-head .adm-btn:hover:not(:disabled) { color: var(--red); }
.admin-view kbd, .adm-dialog kbd, .adm-toast kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid currentColor; border-radius: 3px; font: 700 11px/1 ui-monospace, Consolas, monospace; letter-spacing: 0; text-transform: uppercase; opacity: .75; }
.adm-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border: 1px solid currentColor; color: #57534b; font: 700 11px/1.2 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.adm-tag.is-red { color: #a5281f; }
.adm-chip { display: inline-flex; align-items: center; min-height: 22px; padding: 1px 7px; border: 1px solid currentColor; font: 700 11px/1.2 Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; vertical-align: middle; }
.adm-chip.is-ink { border-color: var(--ink); color: var(--paper); background: var(--ink); }
.adm-chip.is-red { border-color: #a5281f; color: #fff; background: #a5281f; }
.adm-chip.is-amber { color: #7a4b00; }
.adm-chip.is-outline { color: #a5281f; }
.adm-chip.is-muted { color: #6b675e; }
.adm-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.adm-muted { color: #6f6a60; }
.adm-pre { margin: 6px 0 0; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
.adm-small { margin: 12px 0 0; color: #6b675e; font: 13px/1.5 Georgia, serif; }
.adm-center { text-align: center; }
.admin-view code { font: 13px/1.4 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }

/* Paper sheets */
.adm-sheet { padding: 22px; color: var(--ink); background: var(--paper); box-shadow: 6px 6px 0 #080808; }
.adm-sheet h2 { margin-top: 10px; font: italic 400 24px/1.15 Georgia, serif; letter-spacing: -.02em; }
.adm-sheet > p { margin: 10px 0 0; color: #57534b; font: 14px/1.55 Georgia, serif; }
.adm-sheet .section-label b.is-red { color: #a5281f; }
.adm-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin: 14px 0 0; border-top: 1px solid #d3ccb8; }
.adm-facts > div { min-width: 0; padding: 10px 0; border-bottom: 1px solid #d3ccb8; }
.adm-facts dt { color: #6b675e; font: 700 11px/1.3 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.adm-facts dd { margin: 3px 0 0; font: 15px/1.4 Arial, sans-serif; overflow-wrap: anywhere; }
.adm-facts dd small { display: block; color: #6b675e; font: italic 12px/1.4 Georgia, serif; }

/* Empty, error and loading states */
.adm-empty { display: grid; justify-items: center; gap: 6px; padding: 32px 16px; text-align: center; }
.adm-empty > span { color: rgba(239, 75, 63, .6); font: 400 56px/1 "Yu Mincho", "MS Mincho", serif; }
.adm-empty b { font: italic 400 22px/1.25 Georgia, serif; }
.adm-empty p { max-width: 400px; margin: 0; color: #6b675e; font: 14px/1.5 Georgia, serif; }
.adm-error { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 20px; border: 1px dashed rgba(239, 75, 63, .75); color: var(--paper); }
.adm-error-mark { color: var(--red); font: 400 32px/1 "Yu Mincho", "MS Mincho", serif; }
.adm-error b { display: block; font: italic 400 18px/1.3 Georgia, serif; }
.adm-error p { margin: 4px 0 0; color: #bab7ae; font: 14px/1.5 Arial, sans-serif; }
.adm-skel { position: relative; display: block; overflow: hidden; background: rgba(242, 238, 223, .07); }
.adm-skel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(242, 238, 223, .09), transparent); transform: translateX(-100%); animation: adm-shimmer 1.3s ease-in-out infinite; }
@keyframes adm-shimmer { to { transform: translateX(100%); } }
.adm-skel.is-tile { height: 136px; }
.adm-skel.is-row { height: 56px; margin-bottom: 8px; }
.adm-skel.is-line { height: 22px; margin-bottom: 10px; }
.adm-skel.is-short { width: 40%; }
.adm-skel.is-card { height: 190px; margin-bottom: 16px; }
.adm-skel.is-photo { height: 440px; }
.adm-skel-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
.adm-skel-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; margin-top: 22px; }
.adm-skel-queue { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; }

/* Today */
.adm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; color: var(--ink); background: var(--paper); box-shadow: 6px 6px 0 #080808; }
.adm-kpis > li { display: flex; min-width: 0; border-right: 1px solid #d3ccb8; border-bottom: 1px solid #d3ccb8; }
.adm-kpis > li:nth-child(4n) { border-right: 0; }
.adm-kpis > li:nth-last-child(-n + 4) { border-bottom: 0; }
.adm-kpi { flex: 1; min-width: 0; display: grid; grid-template-rows: auto auto auto 1fr; gap: 2px; padding: 16px 18px 14px; border: 0; color: inherit; background: none; text-align: left; font: inherit; }
button.adm-kpi { cursor: pointer; }
button.adm-kpi:hover { background: #e9e4d3; }
button.adm-kpi:focus-visible { outline-offset: -4px; }
.adm-kpi-label { color: #6b675e; font: 700 11px/1.3 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.adm-kpi-value { margin-top: 4px; font: 400 34px/1 Georgia, serif; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.adm-kpi.is-alert .adm-kpi-value { color: #a5281f; }
.adm-kpi-note { color: #6b675e; font: italic 12px/1.4 Georgia, serif; }
.adm-kpi-spark { display: block; align-self: end; height: 30px; margin-top: 10px; }
.adm-spark { display: block; width: 100%; height: 30px; overflow: visible; }
.adm-spark-area { fill: rgba(18, 18, 18, .07); stroke: none; }
.adm-spark-line { fill: none; stroke: #3b3934; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.adm-spark-dot { fill: none; stroke: var(--red); stroke-width: 6; stroke-linecap: round; }
.adm-kpi.is-alert .adm-spark-line { stroke: #a5281f; }
.adm-today-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: start; margin-top: 22px; }
.adm-attention-list { margin: 14px 0 0; padding: 0; list-style: none; border-top: 1px solid #d3ccb8; }
.adm-attn { width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 62px; padding: 10px 6px; border: 0; border-bottom: 1px solid #d3ccb8; color: inherit; background: none; text-align: left; font: inherit; cursor: pointer; }
.adm-attn:hover { background: #e9e4d3; }
.adm-attn:focus-visible { outline-offset: -2px; }
.adm-attn-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #b9b19c; color: #57534b; font: 400 18px/1 "Yu Mincho", "MS Mincho", serif; }
.adm-attn.is-late .adm-attn-mark { border-color: #a5281f; color: #fff; background: #a5281f; }
.adm-attn-copy b { display: block; font: 700 15px/1.3 Arial, sans-serif; }
.adm-attn-copy small { display: block; margin-top: 2px; color: #6b675e; font: italic 13px/1.4 Georgia, serif; }
.adm-attn-go { color: var(--red); font-size: 18px; }
.adm-ledger-wrap { margin-top: 14px; overflow-x: auto; }
.adm-ledger { width: 100%; border-collapse: collapse; font: 13px/1.3 Arial, sans-serif; font-variant-numeric: tabular-nums; }
.adm-ledger th, .adm-ledger td { padding: 8px; border-bottom: 1px solid #ddd6c3; text-align: right; white-space: nowrap; }
.adm-ledger thead th { color: #6b675e; font: 700 11px/1.2 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.adm-ledger th:first-child { padding-left: 0; text-align: left; }
.adm-ledger tbody th { font-weight: 400; }
.adm-ledger tr.is-today { font-weight: 700; }
.adm-ledger tr.is-today th { color: #a5281f; font-weight: 700; }

/* Moderation */
.adm-mod-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.adm-lede { margin: 0; color: #c9c6bd; font: italic 16px/1.4 Georgia, serif; }
.adm-lede b { color: var(--paper); font: normal 400 26px/1 Georgia, serif; }
.adm-keys { margin: 0; color: #a3a097; font: 12px/2 Arial, sans-serif; }
.adm-queue { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 22px; align-items: start; }
.adm-queue-list { position: sticky; top: 68px; max-height: calc(100vh - 96px); margin: 0; padding: 0; overflow-y: auto; list-style: none; border-top: 1px solid var(--line); }
.adm-queue-item { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 56px; padding: 8px 10px 8px 12px; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; color: #c9c6bd; background: none; text-align: left; font: inherit; cursor: pointer; }
.adm-queue-item:hover { color: var(--paper); background: rgba(242, 238, 223, .05); }
.adm-queue-item:focus-visible { outline-offset: -2px; }
.adm-queue-item[aria-current="true"] { border-left-color: var(--red); color: var(--paper); background: rgba(242, 238, 223, .1); }
.adm-queue-mark { color: #8f8c83; font: 400 18px/1 "Yu Mincho", "MS Mincho", serif; }
[aria-current="true"] > .adm-queue-mark { color: var(--red); }
.adm-queue-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 14px/1.3 Arial, sans-serif; }
.adm-queue-item small { display: block; color: #a3a097; font: 12px/1.4 Arial, sans-serif; }
.adm-focus { min-width: 0; padding: 22px 24px 18px; color: var(--ink); background: var(--paper); box-shadow: 6px 6px 0 #080808; }
.adm-focus-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.adm-focus-pos { color: #6b675e; font: italic 13px/1.4 Georgia, serif; }
.adm-focus h2 { margin-top: 12px; font: italic 400 clamp(22px, 2.6vw, 30px)/1.15 Georgia, serif; letter-spacing: -.02em; overflow-wrap: anywhere; }
.adm-arrow { margin: 0 4px; color: var(--red); font-style: normal; }
.adm-focus-meta { margin: 6px 0 0; color: #6b675e; font: 13px/1.5 Arial, sans-serif; }
.adm-photo { display: grid; place-items: center; min-height: 260px; margin: 16px 0 0; background: #1e1e1e; }
.adm-photo img { display: block; max-width: 100%; max-height: min(62vh, 620px); object-fit: contain; }
.adm-report-body { margin-top: 18px; }
.adm-report-body h3 { color: #6b675e; font: 700 11px/1.3 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.adm-evidence { margin: 16px 0 0; padding: 12px 14px; border-left: 3px solid var(--red); background: rgba(18, 18, 18, .05); }
.adm-evidence b { color: #a5281f; font: 700 11px/1.3 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.adm-focus-note { margin: 12px 0 0; color: #57534b; font: italic 13px/1.5 Georgia, serif; }
.adm-focus-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #d3ccb8; }
.adm-focus-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
.adm-queue-empty { padding: 10px; }
.adm-fold { margin-top: 22px; border-top: 1px solid var(--line); color: var(--paper); }
.adm-fold > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; color: #c9c6bd; font: 700 12px/1 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; list-style: none; cursor: pointer; }
.adm-fold > summary::-webkit-details-marker { display: none; }
.adm-fold > summary::before { content: '+'; width: 16px; color: var(--red); font: 400 20px/1 Georgia, serif; }
.adm-fold[open] > summary::before { content: '–'; }
.adm-fold > summary b { color: #8f8c83; }
.adm-fold-empty { margin: 0 0 12px; color: #a3a097; font: italic 14px Georgia, serif; }
.adm-fold-list { margin: 0 0 8px; padding: 0; list-style: none; }
.adm-fold-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(242, 238, 223, .1); color: #c9c6bd; font: 13px/1.45 Arial, sans-serif; }
.adm-fold-list b { color: var(--paper); }
.adm-audit { max-height: 440px; margin: 0 0 8px; padding: 0; overflow-y: auto; list-style: none; }
.adm-audit li { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(242, 238, 223, .1); color: #c9c6bd; font: 13px/1.45 Arial, sans-serif; }
.adm-audit time { color: #a3a097; }
.adm-audit b { color: var(--paper); }
.adm-audit em { color: #a3a097; font: italic 13px Georgia, serif; }

/* People */
.adm-people-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.adm-search { position: relative; flex: 1 1 260px; max-width: 380px; }
.adm-search input { width: 100%; min-height: 44px; padding: 0 40px 0 14px; border: 1px solid #55524c; color: var(--paper); background: rgba(242, 238, 223, .05); font: 15px/1.2 Arial, sans-serif; }
.adm-search input::placeholder { color: #8f8c83; }
.adm-search kbd { position: absolute; top: 50%; right: 10px; color: #a3a097; transform: translateY(-50%); }
.adm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid #55524c; color: #c9c6bd; background: none; font: 700 12px/1 Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.adm-chip-btn:hover { color: var(--paper); border-color: #8f8c83; }
.adm-chip-btn b { color: #a3a097; }
.adm-chip-btn[aria-pressed="true"] { border-color: var(--paper); color: var(--ink); background: var(--paper); }
.adm-chip-btn[aria-pressed="true"] b { color: #57534b; }
.adm-select { display: inline-flex; align-items: center; gap: 8px; color: #a3a097; font: 700 11px/1 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.adm-select select { min-height: 44px; padding: 0 10px; border: 1px solid #55524c; color: var(--paper); background: #1f1f21; font: 14px Arial, sans-serif; letter-spacing: 0; text-transform: none; }
.adm-results { margin: 14px 0 10px; color: #a3a097; font: italic 13px/1.4 Georgia, serif; }
.adm-table-wrap { overflow-x: auto; color: var(--ink); background: var(--paper); box-shadow: 6px 6px 0 #080808; }
.adm-table { width: 100%; border-collapse: collapse; font: 14px/1.35 Arial, sans-serif; }
.adm-table th { height: 44px; padding: 0 12px; border-bottom: 1px solid #b9b19c; color: #6b675e; font: 700 11px/1.2 Arial, sans-serif; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.adm-th-sort { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; color: inherit; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.adm-th-sort::after { content: '↕'; opacity: .4; }
th[aria-sort="ascending"] > .adm-th-sort { color: var(--ink); }
th[aria-sort="ascending"] > .adm-th-sort::after { content: '↑'; color: var(--red); opacity: 1; }
th[aria-sort="descending"] > .adm-th-sort { color: var(--ink); }
th[aria-sort="descending"] > .adm-th-sort::after { content: '↓'; color: var(--red); opacity: 1; }
.adm-table td { padding: 4px 12px; border-bottom: 1px solid #ddd6c3; white-space: nowrap; }
.adm-table tbody tr[data-person-row] { cursor: pointer; }
.adm-table tbody tr[data-person-row]:hover { background: #ebe6d4; }
.adm-table-empty td { padding: 0; white-space: normal; }
.adm-person { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; color: inherit; background: none; text-align: left; font: 400 16px/1.2 Georgia, serif; cursor: pointer; }
.adm-person b { font-weight: 400; }
.adm-person:hover b { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.adm-num { text-align: right; font-variant-numeric: tabular-nums; }

/* Person drawer */
.adm-drawer { position: fixed; inset: 0 0 0 auto; width: min(460px, 100vw); max-width: 100vw; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; border-left: 1px solid #99917e; color: var(--ink); background: var(--paper); box-shadow: -12px 0 40px rgba(0, 0, 0, .45); overflow-y: auto; overscroll-behavior: contain; }
.adm-drawer::backdrop { background: rgba(8, 8, 8, .62); }
/* Filling the dialog means only a backdrop click reaches the dialog element itself and closes it. */
.adm-drawer-inner { display: grid; align-content: start; gap: 18px; min-height: 100%; padding: 18px 24px calc(32px + env(safe-area-inset-bottom)); }
.adm-drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.adm-icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #b9b19c; color: var(--ink); background: none; font: 400 24px/1 Georgia, serif; cursor: pointer; }
.adm-icon-btn:hover { border-color: var(--red); color: var(--red); }
.adm-drawer h2 { font: italic 400 30px/1.1 Georgia, serif; letter-spacing: -.02em; overflow-wrap: anywhere; }
.adm-drawer h2:focus { outline: none; }
.adm-drawer .adm-facts { margin-top: 0; }
.adm-drawer-actions { display: grid; gap: 14px; }
.adm-field { display: grid; gap: 6px; color: #57534b; font: 700 11px/1.3 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.adm-field select { min-height: 44px; padding: 0 10px; border: 1px solid #8d8879; color: var(--ink); background: #fffdf5; font: 15px Arial, sans-serif; letter-spacing: 0; text-transform: none; }
.adm-guard { margin: 0; padding: 10px 12px; border-left: 3px solid var(--ink); background: rgba(18, 18, 18, .06); font: 14px/1.5 Georgia, serif; }
.adm-action-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.adm-action-list li { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 4px 14px; align-items: center; }
.adm-action-list small { color: #57534b; font: 13px/1.45 Georgia, serif; }

/* Confirmation dialog */
.adm-dialog { box-sizing: border-box; width: min(480px, calc(100% - 24px)); padding: 0; border: 1px solid #99917e; color: var(--ink); background: var(--paper); box-shadow: 10px 10px 0 #080808; }
.adm-dialog::backdrop { background: rgba(8, 8, 8, .74); }
.adm-dialog-form { display: grid; gap: 14px; padding: 24px; }
.adm-dialog h2 { font: italic 400 26px/1.15 Georgia, serif; overflow-wrap: anywhere; }
.adm-dialog p { margin: 0; color: #46433c; font: 15px/1.55 Georgia, serif; }
.adm-dialog .adm-dialog-error { min-height: 1.2em; color: #a5281f; font: 13px/1.4 Arial, sans-serif; }
.adm-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.adm-dialog .adm-btn-danger { color: #fff; background: #a5281f; }
.adm-dialog .adm-btn-danger:hover { border-color: var(--ink); background: var(--ink); }

/* Toasts */
.adm-toasts { position: fixed; z-index: 60; left: 50%; bottom: 24px; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); transform: translateX(-50%); pointer-events: none; }
.adm-toast { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 6px 8px 6px 16px; border-left: 3px solid var(--red); color: var(--paper); background: #0d0d0e; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); font: 14px/1.4 Arial, sans-serif; opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; pointer-events: auto; }
.adm-toast.is-in { opacity: 1; transform: none; }
.adm-toast-undo { display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 0; color: var(--red); background: none; font: 700 12px/1 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }

/* Inbox */
.adm-inbox-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.adm-inbox-legal { max-width: 560px; margin: 0; color: #a3a097; font: 13px/1.5 Georgia, serif; }
.adm-inbox-legal b { margin-right: 6px; color: var(--red); font: 700 11px Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.adm-messages { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.adm-message { padding: 18px 22px; border-left: 4px solid transparent; color: var(--ink); background: var(--paper); box-shadow: 6px 6px 0 #080808; }
.adm-message.is-urgent { border-left-color: var(--red); }
.adm-message.is-resolved { background: #e3ddcb; }
.adm-message-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.adm-message-head time { color: #6b675e; font: italic 13px Georgia, serif; }
.adm-ticket { color: #46433c; font: 700 12px ui-monospace, Consolas, monospace; }
.adm-due { color: #46433c; font: 700 12px/1.3 Arial, sans-serif; }
.adm-due.is-late { color: #a5281f; }
.adm-message-meta { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 12px 0 0; }
.adm-message-meta div { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.adm-message-meta dt { color: #6b675e; font: 700 11px Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.adm-message-meta dd { margin: 0; font: 14px/1.4 Arial, sans-serif; overflow-wrap: anywhere; }
.adm-message-text { margin-top: 12px; padding-top: 12px; border-top: 1px solid #d3ccb8; }
.adm-message-hint { margin: 10px 0 0; color: #a5281f; font: italic 13px/1.5 Georgia, serif; }
.adm-message-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.adm-unavailable { padding-bottom: 26px; }

/* System */
.adm-system { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.adm-sync, .adm-counters { grid-column: 1 / -1; }
.adm-progress { height: 8px; margin: 18px 0 8px; overflow: hidden; background: #d9d2bf; }
.adm-progress i { display: block; height: 100%; background: var(--red); transform: scaleX(0); transform-origin: left center; transition: transform .45s ease-out; }
.adm-sync .adm-sync-status { min-height: 1.5em; margin: 0; color: #46433c; font: italic 14px/1.5 Georgia, serif; }
.adm-sync-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.adm-sync .adm-budget { margin: 10px 0 0; color: #6b675e; font: 13px/1.4 Arial, sans-serif; }
.adm-sync-log { max-height: 220px; margin: 12px 0 0; padding: 0; overflow-y: auto; list-style: none; border-top: 1px solid #d3ccb8; }
.adm-sync-log:empty { display: none; }
.adm-sync-log li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid #e0d9c6; font: 13px/1.4 Arial, sans-serif; overflow-wrap: anywhere; }
.adm-sync-log time { color: #6b675e; }
.adm-sync-log em { color: #a5281f; }
.adm-cleanup .adm-btn { margin-top: 14px; }
.adm-cleanup .adm-cleanup-status { min-height: 1.2em; margin: 10px 0 0; color: #46433c; font: italic 13px/1.5 Georgia, serif; }

/* Announcements: compose on the left, the bell as it will look on the right, sent cards below */
.adm-ann-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.adm-ann-compose { display: grid; gap: 16px; }
.adm-ann-compose > h2, .adm-ann-compose > p { margin: 0; }
.adm-ann-preview { position: sticky; top: 68px; }
.adm-ann .adm-chip-btn { border-color: #b9b19c; color: #57534b; }
.adm-ann .adm-chip-btn:hover { border-color: var(--ink); color: var(--ink); }
.adm-ann .adm-chip-btn[aria-pressed="true"] { border-color: var(--ink); color: var(--paper); background: var(--ink); }
.adm-ann-part { display: grid; gap: 14px; }
.adm-field input, .adm-field textarea { box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #8d8879; border-radius: 0; color: var(--ink); background: #fffdf5; font: 15px/1.45 Arial, sans-serif; letter-spacing: 0; text-transform: none; }
.adm-field textarea { min-height: 104px; resize: vertical; }
.adm-field small { color: #857f73; font: italic 12px Georgia, serif; letter-spacing: 0; text-transform: none; }
.adm-ann-part > .adm-small { margin: 0; }
.adm-ann-langs { border-top: 1px solid #d3ccb8; }
.adm-ann-langs-head { margin: 0; padding: 12px 0 4px; color: #57534b; font: 700 11px/1.3 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.adm-ann-langs-head small { color: #857f73; font: italic 12px Georgia, serif; letter-spacing: 0; text-transform: none; }
.adm-ann-lang { border-bottom: 1px solid #d3ccb8; }
.adm-ann-lang > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; font: 15px/1.3 Georgia, serif; list-style: none; cursor: pointer; }
.adm-ann-lang > summary::-webkit-details-marker { display: none; }
.adm-ann-lang > summary::before { content: '+'; width: 14px; color: var(--red); font: 400 20px/1 Georgia, serif; }
.adm-ann-lang[open] > summary::before { content: '–'; }
.adm-ann-lang-state { margin-left: auto; color: #857f73; font: italic 13px Georgia, serif; }
.adm-ann-lang-state.is-own { color: var(--ink); font: 700 11px/1.3 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.adm-ann-lang-fields { display: grid; gap: 12px; padding: 2px 0 16px; }
.adm-ann-problems { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.adm-ann-problems:empty { display: none; }
.adm-ann-problems li { position: relative; padding-left: 16px; color: #a5281f; font: 13px/1.45 Arial, sans-serif; }
.adm-ann-problems li::before { content: '–'; position: absolute; left: 0; }
.adm-ann-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-top: 16px; border-top: 1px solid #d3ccb8; }
.adm-ann-hint { margin: 0; color: #6b675e; font: italic 13px/1.4 Georgia, serif; }
.adm-ann-locales { margin-top: 14px; gap: 4px; }
.adm-ann-locales .adm-chip-btn { min-width: 44px; justify-content: center; padding: 0 8px; }
/* The bell sheet in miniature: the same nt-* parts as notices.css draws, links shown but not followed. */
.adm-ann-bell { margin-top: 16px; padding: 0 20px 4px; border: 1px solid var(--ink); border-top: 3px solid var(--red); color: var(--ink); background-color: var(--paper); background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(18, 18, 18, .05) 28px); box-shadow: 6px 6px 0 #080808; }
.adm-ann-bell-head { display: flex; align-items: center; gap: 12px; margin: 0 -20px; padding: 14px 20px 12px; border-bottom: 1px solid #c9c4b4; }
.adm-ann-bell-head small { display: block; color: #77736a; font: 800 10px/1.2 Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.adm-ann-bell-head b { display: block; margin-top: 3px; font: italic 400 22px/1.05 Georgia, serif; letter-spacing: -.02em; }
.adm-ann-bell .nt-item { border-bottom: 0; }
.adm-ann-bell .nt-action { cursor: default; }
.adm-ann-bell .nt-action:hover { color: var(--ink); }
.adm-ann-bell .nt-action.is-primary:hover { border-color: var(--ink); color: var(--paper); background: var(--ink); }
.adm-ann-bell-empty { margin: 0; padding: 30px 0; color: #6b675e; font: italic 14px/1.5 Georgia, serif; text-align: center; }
.adm-ann-placeholder { color: #9a958a; font-style: italic; }
.adm-ann-preview > .adm-small { margin-top: 14px; }
.adm-ann-sent-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin: 32px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.adm-ann-sent-head h2 { color: var(--paper); font: italic 400 26px/1.1 Georgia, serif; letter-spacing: -.02em; }
.adm-ann-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.adm-ann-card { box-sizing: border-box; height: 100%; padding: 18px 22px; color: var(--ink); background: var(--paper); box-shadow: 6px 6px 0 #080808; }
.adm-ann-card .adm-message-head time { color: #6b675e; font: italic 13px Georgia, serif; }
.adm-ann-card h3 { margin: 10px 0 0; font: italic 400 21px/1.25 Georgia, serif; letter-spacing: -.01em; overflow-wrap: anywhere; }
.adm-ann-card-body { margin: 6px 0 0; color: #46433c; font: 14px/1.55 Georgia, serif; overflow-wrap: anywhere; }
.adm-ann-card.is-retracted { background: #e3ddcb; }
.adm-ann-card.is-retracted h3 { color: #57534b; text-decoration: line-through; text-decoration-color: rgba(165, 40, 31, .65); }

@media (max-width: 980px) {
    .adm-today-grid, .adm-skel-split { grid-template-columns: minmax(0, 1fr); }
    .adm-queue, .adm-skel-queue { grid-template-columns: minmax(0, 1fr); }
    /* On narrow screens the item comes first and the queue follows it. */
    .adm-focus { order: -1; }
    .adm-queue-list { position: static; max-height: 300px; }
    .adm-ann-top { grid-template-columns: minmax(0, 1fr); }
    .adm-ann-preview { position: static; }
}

@media (max-width: 760px) {
    .admin-view { padding: 12px 0 64px; }
    .adm-head { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
    .adm-mark { width: 44px; height: 44px; font-size: 24px; }
    .adm-head-meta { grid-column: 1 / -1; justify-content: space-between; }
    .adm-tab-kanji { display: none; }
    .adm-tablist [role="tab"] { padding: 0 12px; }
    .adm-panels { padding-top: 16px; }
    .adm-kpis, .adm-skel-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .adm-kpis > li:nth-child(4n) { border-right: 1px solid #d3ccb8; }
    .adm-kpis > li:nth-child(2n) { border-right: 0; }
    .adm-kpis > li:nth-last-child(-n + 4) { border-bottom: 1px solid #d3ccb8; }
    .adm-kpis > li:nth-last-child(-n + 2) { border-bottom: 0; }
    .adm-kpi { padding: 14px 14px 12px; }
    .adm-kpi-value { font-size: 28px; }
    .adm-sheet, .adm-focus, .adm-message { padding: 18px 16px; box-shadow: 4px 4px 0 #080808; }
    .adm-kpis, .adm-table-wrap { box-shadow: 4px 4px 0 #080808; }
    .adm-system { grid-template-columns: minmax(0, 1fr); }
    .adm-ann-card { padding: 18px 16px; box-shadow: 4px 4px 0 #080808; }
    .adm-ann-bell { padding: 0 16px 2px; box-shadow: 4px 4px 0 #080808; }
    .adm-ann-bell-head { margin: 0 -16px; padding: 12px 16px 10px; }
    .adm-ann-bell .nt-item::before { left: -16px; }
    .adm-ledger th, .adm-ledger td { padding: 7px 6px; }
    .adm-audit li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .adm-fold-list li { flex-wrap: wrap; }
    .adm-photo { min-height: 200px; }
    .adm-photo img { max-height: 52vh; }
    .adm-error { grid-template-columns: auto minmax(0, 1fr); }
    .adm-error .adm-btn { grid-column: 1 / -1; }
    .adm-action-list li { grid-template-columns: minmax(0, 1fr); }
    .adm-drawer { width: 100vw; border-left: 0; }
    .adm-drawer-inner { padding: 14px 16px calc(28px + env(safe-area-inset-bottom)); }
    .adm-toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
    .adm-search { max-width: none; }
}

@media (max-width: 360px) {
    .adm-facts { grid-template-columns: minmax(0, 1fr); }
}

/* Phones: the people table becomes a stack of cards. */
@media (max-width: 700px) {
    .adm-table-wrap { overflow: visible; color: inherit; background: none; box-shadow: none; }
    .adm-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .adm-table, .adm-table tbody { display: block; }
    .adm-table tbody tr[data-person-row] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-bottom: 12px; padding: 4px 14px 14px; color: var(--ink); background: var(--paper); box-shadow: 4px 4px 0 #080808; }
    .adm-table tbody tr[data-person-row]:hover { background: var(--paper); }
    .adm-table td { display: block; min-width: 0; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
    .adm-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: #6b675e; font: 700 11px/1.4 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
    .adm-table td.adm-cell-person { grid-column: 1 / -1; margin-bottom: 2px; border-bottom: 1px solid #d3ccb8; }
    .adm-table td.adm-cell-person::before { display: none; }
    .adm-table .adm-num { text-align: left; }
    .adm-table-empty, .adm-table-empty td { display: block; color: var(--ink); background: var(--paper); }
}

/* Touch screens have no keyboard shortcuts to show. */
@media (hover: none) and (pointer: coarse) {
    .adm-keys, .adm-btn kbd, .adm-toast-undo kbd, .adm-search kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .adm-skel::after { animation: none; }
    .adm-toast { transform: none; transition: opacity .15s; }
    .adm-progress i { transition: none; }
}
