/* Hallmark · pre-emit critique: P5 H5 E4 S5 R5 V4
 * genre: playful calm operational desk · macrostructure: existing Workbench
 * design-system: DESIGN.md / Cotton Mint · designed-as-app
 * Additive presentation only. Base CSS, workflow, APIs, actors and clipboard remain intact.
 * states: default · hover · focus · active · disabled · loading · error · success
 */
:root {
  --color-paper: #F8F7F2;
  --color-surface: #FFFFFF;
  --color-primary-soft: #E7F4EE;
  --color-primary: #2E7562;
  --color-primary-hover: #245D4E;
  --color-on-primary: #FFFFFF;
  --color-ink: #263D37;
  --color-muted: #53665F;
  --color-soft: var(--color-muted);
  --color-border: #D9E4DD;
  --color-focus: #246957;
  --color-ok: #26754D;
  --color-ok-soft: #E7F4E9;
  --color-blue: #405A89;
  --color-blue-soft: #EBF0FA;
  --color-bad: #A63F3F;
  --color-bad-soft: #FBEDED;
  --color-warn: #D9B17D;
  --color-warn-ink: #75512E;
  --color-warn-soft: #F9EADD;
  --color-peach-soft: #F9EADD;
  --color-lavender-soft: #EEEAF7;
  --color-progress-track: #D9E4DD;
  --color-scrim: #263D3780;
  --color-sidebar-from: #EDF6F0;
  --color-sidebar-to: #EDF6F0;
  --color-sidebar-active: #D8ECE1;
  --color-sidebar-text: var(--color-ink);
  --color-sidebar-muted: var(--color-muted);
  --color-sidebar-card: var(--color-surface);
  --color-sidebar-input: var(--color-surface);
  --color-sidebar-input-border: var(--color-border);
  --color-sidebar-hover: var(--color-primary-soft);
  --color-sidebar-placeholder: var(--color-muted);
  --color-sidebar-shine: var(--color-surface);
  --color-sidebar-ok: var(--color-ok);
  --color-sidebar-warn: var(--color-warn-ink);
  --color-sidebar-bad: var(--color-bad);
  --color-sidebar-bar: var(--color-border);
  --cat-cn: var(--color-peach-soft);
  --cat-jp: var(--color-lavender-soft);
  --cat-kr: var(--color-primary-soft);
  --cat-th: var(--color-blue-soft);
  --cat-west: var(--color-peach-soft);
  --cat-other: var(--color-border);
  --text-report-xs: 14px;
  --text-report-sm: 14px;
  --text-report-md: 16px;
  --text-report-number: 20px;
  --text-report-total: 20px;
  --sidebar-w: 244px;
  --space-lg: 24px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --color-card-shadow: #263D3709;
  --color-hover-shadow: #263D3710;
  --shadow-card: 0 2px 6px var(--color-card-shadow);
  --shadow-hover: 0 4px 12px var(--color-hover-shadow);
}
html, body { font-size: 16px; line-height: 1.6; background: var(--color-paper); color: var(--color-ink); }
#desk { align-items: start; }
.app { width: 100%; max-width: 1400px; justify-self: start; padding: var(--space-xl); gap: var(--space-lg); }
.topbar { padding: var(--space-xs) 0 var(--space-sm); align-items: center; }
.topbar h1 { font-size: 28px; line-height: 1.4; }
.topbar p { max-width: 780px; font-size: 14px; line-height: 1.6; }
.top-meta { gap: var(--space-xs); }
.chip { min-height: 36px; padding: var(--space-2xs) var(--space-sm); font-size: 14px; border-radius: var(--radius-full); }
.chip:first-child { background: var(--color-primary-soft); border-color: var(--color-primary-soft); }
button { min-height: 44px; border-radius: var(--radius-md); font-size: 16px; font-weight: 500; padding-inline: var(--space-md); white-space: nowrap; }
input, select { min-height: 44px; font-size: 16px; padding: var(--space-xs) var(--space-sm); background: var(--color-surface); border-radius: var(--radius-md); }
label { font-size: 14px; line-height: 1.6; font-weight: 500; }
.status, .meta, .muted, .field-hint, .check-inline, .pass-bar-label { font-size: 14px; line-height: 1.6; }
button.primary { font-weight: 600; }
button.danger { background: var(--color-surface); }
button[data-state=loading] { cursor: progress; }
button[data-state=error] { border-color: var(--color-bad); color: var(--color-bad); }
button.primary[data-state=error] { background: var(--color-bad-soft); color: var(--color-bad); }
button[data-state=success] { border-color: var(--color-ok); }
button.primary[data-state=success] { background: var(--color-ok); color: var(--color-on-primary); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
button:disabled { opacity: .52; cursor: not-allowed; }
button:active { transform: translateY(1px); }
.sidebar { background: var(--color-sidebar-from); border-right: 1px solid var(--color-border); color: var(--color-ink); padding: var(--space-lg) var(--space-md); }
.brand { gap: var(--space-sm); margin: 0 var(--space-xs) var(--space-xl); }
.brand strong { font-size: 27px; }
.brand-sub { font-size: 14px; color: var(--color-muted); }
.brand-mark, .cotton-mark { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; color: var(--color-primary); background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--shadow-card); }
.brand-mark svg, .cotton-mark svg { width: 30px; height: 30px; }
.side-nav { gap: var(--space-2xs); }
.side-nav button { min-height: 44px; padding-inline: var(--space-md); font-size: 16px; font-weight: 500; border: 1px solid transparent; border-radius: var(--radius-md); }
.side-nav button.is-on { border-color: var(--color-border); color: var(--color-primary-hover); background: var(--color-sidebar-active); font-weight: 600; }
.rail-label.rail-in-nav { color: var(--color-muted); font-size: 14px; font-weight: 500; letter-spacing: 0; margin: var(--space-sm) var(--space-md) var(--space-2xs); }
.me-box { margin-top: var(--space-xl); padding: 0; gap: var(--space-sm); }
.me-box > button { font-size: 16px; color: var(--color-ink); background: var(--color-surface); }
.sys-status { gap: var(--space-xs); }
.nas-door, .nas-space { padding: var(--space-sm); border-radius: var(--radius-md); }
.nas-door { min-height: 80px; column-gap: var(--space-xs); }
.nas-door strong { font-size: 18px; letter-spacing: 0; }
.nas-kicker, .nas-hint, .nas-go, .nas-space em, .sys-jobs, .cat-label, .cat-row i { font-size: 14px; color: var(--color-muted); line-height: 1.5; }
.nas-go { padding: var(--space-2xs) var(--space-xs); background: var(--color-primary-soft); color: var(--color-primary); }
.nas-hint { color: var(--color-muted); }
.nas-door.sys-ok, .nas-door.sys-warn, .nas-door.sys-bad { background: var(--color-surface); border-color: var(--color-border); }
.nas-door.sys-off::before { background: var(--color-muted); }
.nas-space { grid-template-columns: minmax(0, 1fr); }
.nas-space em { grid-column: 1; }
.sys-line { gap: var(--space-2xs); }
.sys-line button { font-size: 16px; min-height: 36px; padding-inline: var(--space-xs); }
.sys-jobs { width: 100%; margin: 0; }
.sys-line.is-live .sys-jobs { animation: none; }
.cat-label { letter-spacing: 0; margin-top: var(--space-xs); }
.cat-row { min-height: 34px; font-size: 14px; padding: 0 var(--space-xs); gap: var(--space-xs); }
.cat-row.is-empty { color: var(--color-muted); }
.cat-row i { color: var(--color-warn-ink); }
.cat-row span::before { border: 1px solid var(--color-border); box-shadow: none; }
.hero, .room-tools, .pass-bar, .kpi, .page-inbox { box-shadow: var(--shadow-card); }
.hero { padding: var(--space-xl); }
.flow-steps { gap: var(--space-xs) var(--space-lg); margin-bottom: var(--space-md); }
.flow-steps li { font-size: 14px; line-height: 1.6; font-weight: 500; }
.flow-steps li::before { font-size: 14px; }
.hero .actions #extractBtn { flex: 0 0 auto; }
.actions { gap: var(--space-xs); }
.section-title { font-size: 20px; line-height: 1.5; }
.room-tools { padding: var(--space-lg); gap: var(--space-md); }
.room-tools .actions button, .card-actions button, .card-more-actions button { font-size: 16px; min-height: 40px; }
.cards, body.mode-library .cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-md); }
.card, .page-card { box-shadow: var(--shadow-card); border-radius: var(--radius-lg); }
.card { overflow: clip; }
.card-body { padding: var(--space-md); }
.card h3, .card-top h3 { font-size: 16px; line-height: 1.6; }
.card .meta, .clip-actors, .clip-actors p, .clip-actors span, .clip-actors strong { font-size: 14px; line-height: 1.6; }
.card .badge, .badge { font-size: 14px; min-height: 28px; padding: var(--space-2xs) var(--space-xs); }
.card-assign { gap: var(--space-xs); }
.card-assign label, .card-assign label span { font-size: 14px; }
.card-assign select { min-height: 42px; font-size: 16px; }
.card-more > summary, .card-more-actions, .pick-check { font-size: 14px; }
.pass-bar { padding: var(--space-lg); }
.pass-bar-head strong { font-size: 18px; }
.pass-bar-head p, .pass-bar-label, .preset-pick { font-size: 14px; }
.kpi small { font-size: 14px; }
.kpi b { font-size: 24px; }
.page-board { gap: var(--space-md); }
.page-card { padding: var(--space-lg); background: var(--color-surface); }
.page-card h3 { font-size: 18px; }
.page-card .page-path, .page-card .meta, .page-pill, .page-kind-bar button, .page-card.is-tg .page-mark, .page-card.is-tw .page-mark { font-size: 14px; }
.page-kind-bar button, button.preset-pick { font-size: 16px; }
.page-card .page-path { overflow-wrap: anywhere; line-height: 1.6; }
.page-mark { background: var(--color-primary-soft); color: var(--color-primary); border-radius: var(--radius-md); }
.page-card.is-blocked { border-color: var(--color-border); background: var(--color-surface); }
.page-card.is-tg, .page-card.is-tw { background: var(--color-surface); border-color: var(--color-border); }
.page-pill.is-wait { color: var(--color-bad); background: var(--color-bad-soft); }
.player, .done-dialog { border: 1px solid var(--color-border); box-shadow: var(--shadow-hover); border-radius: var(--radius-lg); }
#playerLabel { font-size: 18px; }
.player .player-status { margin: 0; padding: 12px 18px; overflow-wrap: anywhere; }
.player video[hidden], .player .player-status[hidden] { display: none !important; }
.player-mark-bar button, .player-mark-bar .preset-pick { font-size: 16px; }
.mark-pick-hint, #markLogoName { font-size: 14px; }
.gate, .signup-page .gate { padding: var(--space-xl); min-height: 100svh; }
.gate-card, .signup-page .gate-card { padding: var(--space-2xl); border: 1px solid var(--color-border); border-radius: 24px; box-shadow: var(--shadow-card); width: min(100%, 440px); background: var(--color-surface); }
.gate-mark { display: flex; align-items: center; gap: var(--space-sm); margin: 0 0 var(--space-xl); color: var(--color-ink); font-family: var(--font-outlier); font-size: 28px; font-style: normal; }
.gate-card h1 { font-size: 24px; }
.gate-copy, .gate-switch, .gate-card .status { font-size: 14px; line-height: 1.6; }
.gate-card form { gap: var(--space-md); }
.gate-card button.primary { min-height: 44px; }
.signup-page .field-hint { font-size: 14px; }
.report-panel { gap: var(--space-lg); }
.report-panel .report-heading h2 { font-size: 24px; }
.report-panel .report-heading-actions { align-items: center; gap: var(--space-xs); }
.report-panel .report-eyebrow, .report-panel .report-hint, .report-panel .report-ranking-explainer, .report-panel .report-count span, .report-panel .report-signup-link { font-size: 14px; line-height: 1.6; }
.report-panel .report-range button, .report-panel button { font-size: 16px; min-height: 40px; }
.report-panel .report-metric-band { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: var(--space-md); align-items: center; padding: var(--space-lg); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.report-panel .report-counts { grid-template-columns: 1.1fr repeat(5, minmax(0, 1fr)); }
.report-panel .report-count { padding-inline: var(--space-xs); }
.report-panel .report-count:first-child { padding-left: 0; }
.report-panel .report-count strong, .report-panel .report-count[data-metric=total] strong { font-size: 20px; line-height: 1.5; letter-spacing: 0; }
.report-panel .report-count span { white-space: normal; }
.report-panel .report-quick-copy { display: grid; min-width: 0; max-width: none; gap: var(--space-xs); }
.report-panel .report-quick-copy .report-hint { font-size: 14px; text-align: right; }
.report-panel .report-ranking-panel { padding: var(--space-md); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.report-panel .report-section-heading h3 { font-size: 18px; }
.report-panel .report-ranking-head, .report-panel .report-person:not(.is-inactive) { grid-template-columns: minmax(190px, 1.65fr) repeat(5, minmax(78px, 1fr)); column-gap: var(--space-sm); }
.report-panel .report-ranking-head { font-size: 14px; min-height: 48px; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.report-panel .report-ranking-head > span { white-space: normal; overflow-wrap: anywhere; }
.report-panel .report-person { min-height: 56px; padding: var(--space-xs) var(--space-sm); align-items: center; }
.report-panel .report-person:not(.is-inactive) > .report-person-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); align-items: center; }
.report-panel .report-person-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2xs) var(--space-xs); min-width: 0; }
.report-panel .report-person-identity > strong { font-size: 16px; line-height: 1.5; font-weight: 600; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-panel .report-person-username { font-size: 14px; line-height: 1.5; flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-panel .report-person > .report-person-count { font-size: 20px; font-weight: 500; }
.report-panel .report-total-bar { grid-column: 1; height: 8px; border-radius: var(--radius-full); max-width: 190px; background: var(--color-primary-soft); }
.report-panel .report-total-bar > span { border-radius: inherit; }
.report-panel .report-person.is-selected { border-color: var(--color-primary); background: var(--color-primary-soft); }
.report-panel .report-person.is-inactive { min-height: 40px; }
.report-panel .report-person.is-inactive .report-person-identity > strong, .report-panel .report-person.is-inactive > .report-person-count { font-size: 14px; }
.report-panel .report-legacy { padding: var(--space-sm); border-radius: var(--radius-md); }
.report-panel .report-legacy .report-person-head { justify-content: space-between; }
.report-panel .report-inactive-users { max-height: 180px; }
.report-panel .report-detail-heading h2 { font-size: 20px; }
.report-panel .report-filters { gap: var(--space-sm); }
.report-panel .report-filters label { font-size: 14px; }
.report-panel .report-filters input, .report-panel .report-filters select { min-height: 44px; font-size: 16px; }
.report-panel .report-filters button { min-height: 44px; }
.report-panel .report-table-head, .report-panel .report-row { grid-template-columns: 22px minmax(150px, 1fr) 98px 92px 108px 118px; gap: var(--space-sm); }
.report-panel .report-table-head { font-size: 14px; padding: var(--space-sm); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.report-panel .report-table-head > span:nth-child(1) { grid-column: 1; grid-row: 1; }
.report-panel .report-table-head > span:nth-child(2) { grid-column: 2; grid-row: 1; }
.report-panel .report-table-head > span:nth-child(3) { grid-column: 5; grid-row: 1; }
.report-panel .report-table-head > span:nth-child(4) { grid-column: 6; grid-row: 1; }
.report-panel .report-table-head > span:nth-child(5) { grid-column: 3; grid-row: 1; }
.report-panel .report-table-head > span:nth-child(6) { grid-column: 4; grid-row: 1; }
.report-panel .report-row { padding: var(--space-sm); align-items: start; }
.report-panel .report-select { grid-column: 1; grid-row: 1; }
.report-panel .report-row-main { grid-column: 2; grid-row: 1; }
.report-panel .report-row-status { grid-column: 3; grid-row: 1; font-size: 14px; white-space: normal; line-height: 1.6; align-self: start; }
.report-panel .report-row-actions { grid-column: 4; grid-row: 1; }
.report-panel .report-row-person { grid-column: 5; grid-row: 1; font-size: 14px; }
.report-panel .report-row-time { grid-column: 6; grid-row: 1; font-size: 14px; line-height: 1.6; }
.report-panel .report-row-person strong, .report-panel .report-row-person span { font-size: 14px; }
.report-panel .report-row-main h3 { font-size: 16px; line-height: 1.6; }
.report-panel .report-row-actions button { min-height: 40px; font-size: 16px; padding-inline: var(--space-xs); }
.report-panel .report-details { font-size: 14px; }
.report-panel .report-sources { min-width: 0; }
.report-panel .report-row-issue { font-size: 14px; white-space: pre-wrap; overflow: visible; overflow-wrap: anywhere; line-height: 1.6; }
.report-panel .report-error-preview { margin: var(--space-2xs) 0 0; color: var(--color-bad); font-size: 14px; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-panel .report-link-row { font-size: 14px; }
.report-panel .report-link-row a { overflow-wrap: anywhere; }
.report-panel .report-copy-tools { padding: var(--space-sm); gap: var(--space-xs); border-radius: var(--radius-lg); box-shadow: var(--shadow-hover); }
.report-panel .report-copy-tools .check-inline, .report-panel .report-copy-tools #reportSelectedCount { font-size: 14px; }
.report-panel .report-copy-tools button { font-size: 16px; min-height: 40px; }
.report-panel .report-pagination, .report-panel .report-pagination .report-hint { font-size: 14px; }
@media (hover:hover) {
  button:not(:disabled):not(.primary):not(.is-on):not([aria-pressed="true"]):not([data-state="error"]):not([data-state="success"]):hover,
  .side-nav button:not(.is-on):hover { background: var(--color-primary-soft); }
  button.primary:not(:disabled):not([data-state="error"]):not([data-state="success"]):hover { background: var(--color-primary-hover); }
  .preset-pick.is-on:not(:disabled):hover, .page-kind-bar button.is-on:not(:disabled):hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: var(--color-on-primary); }
  button.primary[data-state="error"]:not(:disabled):hover { background: var(--color-bad-soft); border-color: var(--color-bad); color: var(--color-bad); }
  button.primary[data-state="success"]:not(:disabled):hover { background: var(--color-ok); border-color: var(--color-ok); color: var(--color-on-primary); }
  input:hover, select:hover { background: var(--color-paper); }
  .card:hover, .page-card:hover { box-shadow: var(--shadow-hover); border-color: var(--color-border); }
}
@media (min-width: 769px) {
  .sidebar { padding: var(--space-lg) var(--space-md); }
}
@media (min-width: 1600px) {
  .app { padding-inline: var(--space-2xl); }
}
@media (max-width: 1199px) and (min-width: 769px) {
  .report-panel .report-metric-band { padding: var(--space-md); grid-template-columns: minmax(0, 1fr) 210px; }
  .report-panel .report-count { padding-inline: var(--space-2xs); }
  .report-panel .report-ranking-head, .report-panel .report-person:not(.is-inactive) { grid-template-columns: minmax(180px, 1.65fr) repeat(5, minmax(72px, 1fr)); column-gap: var(--space-xs); }
  .report-panel .report-table-head, .report-panel .report-row { grid-template-columns: 20px minmax(150px, 1fr) 92px 88px 98px 106px; gap: var(--space-xs); }
}
@media (max-width: 768px) {
  .app { padding: var(--space-md); }
  .report-panel .report-metric-band { grid-template-columns: minmax(0, 1fr); }
  .report-panel .report-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-panel .report-table-head { display: none; }
  .report-panel .report-row { grid-template-columns: 20px minmax(0, 1fr); }
  .report-panel .report-row-main, .report-panel .report-row-person, .report-panel .report-row-time, .report-panel .report-row-status, .report-panel .report-row-actions { grid-column: 2; grid-row: auto; }
  .report-panel .report-ranking { overflow-x: auto; }
}
/* Hallmark · component: review person buttons · genre: playful calm · theme: Cotton Mint
 * pre-emit critique: P5 H5 E4 S5 R5 V4
 * states: default · hover · focus · active · disabled · loading · error · success
 * Uses the existing desk tokens and the original uploader filter.
 */
#reviewFilterBar { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
.review-people { display: grid; gap: var(--space-xs); min-width: 0; }
.review-people > span { font-size: 14px; font-weight: 600; color: var(--color-muted); }
.review-person-buttons { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: start; min-width: 0; }
.review-person-button { display: inline-flex; align-items: center; gap: var(--space-xs); max-width: 100%; min-height: 42px; padding: var(--space-xs) var(--space-md); border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-xs); white-space: nowrap; }
.review-person-button > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.review-person-button > small { color: var(--color-muted); font-size: var(--text-xs); font-weight: 400; }
.review-person-button:hover, .review-person-button.is-hover { border-color: var(--color-primary); background: var(--color-primary-soft); }
.review-person-button:focus-visible, .review-person-button.is-focus { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.review-person-button:active, .review-person-button.is-active { transform: translateY(1px); }
.review-person-button:disabled { opacity: .65; cursor: default; }
.review-person-button[data-state="loading"] { border-color: var(--color-primary); cursor: progress; }
.review-person-button.is-selected, .review-person-button[data-state="success"] { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-on-primary); }
.review-person-button.is-selected > small { color: var(--color-on-primary); }
.review-person-button.is-selected:hover { background: var(--color-primary-hover); }
.review-person-button[data-state="error"] { border-color: var(--color-bad); background: var(--color-bad-soft); color: var(--color-bad); }
@media (max-width: 900px) { #reviewFilterBar { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); } }

/* Hallmark · component: nickname pastels · theme: Cotton Mint
 * pre-emit critique: P5 H5 E5 S5 R5 V4 · named colors are decorative; selected person stays clear.
 */
:root {
  --color-person-mint: var(--color-primary-soft);
  --color-person-peach: var(--color-peach-soft);
  --color-person-lilac: var(--color-lavender-soft);
  --color-person-sky: var(--color-blue-soft);
  --color-person-rose: #FCE8EF;
  --color-person-butter: #FFF3D5;
}
.review-person-button[data-tone="mint"] { --person-paper: var(--color-person-mint); }
.review-person-button[data-tone="peach"] { --person-paper: var(--color-person-peach); }
.review-person-button[data-tone="lilac"] { --person-paper: var(--color-person-lilac); }
.review-person-button[data-tone="sky"] { --person-paper: var(--color-person-sky); }
.review-person-button[data-tone="rose"] { --person-paper: var(--color-person-rose); }
.review-person-button[data-tone="butter"] { --person-paper: var(--color-person-butter); }
.review-person-button[data-tone]:not(.is-selected):not([data-state="error"]) { background: var(--person-paper, var(--color-surface)); }

/* Hallmark · component: clearer person colors · theme: Cotton Mint
 * pre-emit critique: P5 H5 E5 S5 R5 V4 · stronger edges and readable ink on a white tray.
 */
:root {
  --color-person-mint: #C5EAD8;
  --color-person-peach: #F8D8BF;
  --color-person-lilac: #DED3F3;
  --color-person-sky: #CCDFFD;
  --color-person-rose: #F9D2E2;
  --color-person-butter: #F9E3A3;
  --color-person-mint-edge: #578B70;
  --color-person-peach-edge: #AC7148;
  --color-person-lilac-edge: #9A7CC2;
  --color-person-sky-edge: #668ABD;
  --color-person-rose-edge: #BB5C85;
  --color-person-butter-edge: #9D812F;
  --color-person-mint-ink: #24523C;
  --color-person-peach-ink: #663F25;
  --color-person-lilac-ink: #4D3570;
  --color-person-sky-ink: #203F70;
  --color-person-rose-ink: #6C2547;
  --color-person-butter-ink: #5D4B18;
}
.review-person-buttons { padding: var(--space-sm); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.review-person-button[data-tone="mint"] { --person-edge: var(--color-person-mint-edge); --person-ink: var(--color-person-mint-ink); }
.review-person-button[data-tone="peach"] { --person-edge: var(--color-person-peach-edge); --person-ink: var(--color-person-peach-ink); }
.review-person-button[data-tone="lilac"] { --person-edge: var(--color-person-lilac-edge); --person-ink: var(--color-person-lilac-ink); }
.review-person-button[data-tone="sky"] { --person-edge: var(--color-person-sky-edge); --person-ink: var(--color-person-sky-ink); }
.review-person-button[data-tone="rose"] { --person-edge: var(--color-person-rose-edge); --person-ink: var(--color-person-rose-ink); }
.review-person-button[data-tone="butter"] { --person-edge: var(--color-person-butter-edge); --person-ink: var(--color-person-butter-ink); }
.review-person-button[data-tone]:not(.is-selected):not([data-state="error"]) { border-color: var(--person-edge, var(--color-border)); color: var(--person-ink, var(--color-ink)); }
.review-person-button.is-selected { box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 3px var(--color-primary); }

/* Hallmark · component: library workbench · theme: Cotton Mint
 * pre-emit critique: P5 H5 E5 S5 R5 V4
 * Search and date first, readable nickname/category choices, exact ready-link Copy.
 * states: default · hover · focus · active · disabled · loading · error · success
 */
#libraryFacetPanel[hidden], #libraryCopyBtn[hidden], #librarySummary[hidden] { display: none !important; }
body.mode-library .app { row-gap: var(--space-md); }
body.mode-library #roomTools { grid-template-columns: minmax(0, 1fr) 220px; column-gap: var(--space-lg); row-gap: var(--space-md); }
body.mode-library #clipSearchWrap { grid-column: 1; grid-row: 1; }
body.mode-library #facetBar { grid-column: 2; grid-row: 1; grid-template-columns: minmax(0, 1fr); }
body.mode-library #facetCategoryWrap, body.mode-library #facetReviewerWrap { display: none; }
body.mode-library #libraryFacetPanel, body.mode-library #roomActions, body.mode-library #roomStatus { grid-column: 1 / -1; }
.library-facets { display: grid; gap: var(--space-md); padding-block: var(--space-xs); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.library-filter-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: start; gap: var(--space-sm); }
.library-filter-row > span { padding-top: var(--space-xs); color: var(--color-muted); font-size: 14px; font-weight: 600; }
.library-filter-buttons { display: flex; flex-wrap: wrap; gap: var(--space-xs); min-width: 0; padding: var(--space-2xs); }
.library-filter-button { min-height: 38px; padding-block: var(--space-2xs); }
.library-filter-button[data-tone]:not(.is-selected):not([data-state="error"]):hover { box-shadow: inset 0 0 0 1px var(--person-edge, var(--color-primary)); }
body.mode-library #roomActions { align-items: center; }
body.mode-library #libraryCopyBtn { min-height: 44px; }
.library-summary { flex: 1 1 180px; color: var(--color-muted); font-size: 14px; line-height: 1.6; font-variant-numeric: tabular-nums; }
body.mode-library #copyListBtn { order: 2; }
body.mode-library #refreshBtn { order: 3; }
body.mode-library #clearPageBtn { order: 4; }
body.mode-library #hideDupesWrap { order: 5; }
@media (max-width: 900px) {
  body.mode-library #roomTools { grid-template-columns: minmax(0, 1fr) 180px; column-gap: var(--space-md); }
  .library-filter-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
}

/* Hallmark · component: library calendar · Cotton Mint
 * pre-emit critique: P5 H5 E5 S5 R5 V4
 * Native popover, Thai BE labels, exact existing date values and ready-link workflow.
 * states: default · hover · focus · active · disabled · loading · error · success
 */
#libraryDateField[hidden], #calendarLegacy[hidden] { display: none !important; }
body.mode-library #facetDateNativeLabel { display: none; }
.library-date-field { display: grid; gap: var(--space-xs); min-width: 0; }
.library-date-field > span { font-size: 14px; font-weight: 500; line-height: 1.6; color: var(--color-muted); }
.library-date-button { width: 100%; display: flex; align-items: center; gap: var(--space-xs); padding-inline: var(--space-sm); text-align: left; }
.calendar-mark { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: var(--radius-sm); background: var(--color-primary-soft); color: var(--color-primary); }
.calendar-mark svg { width: 20px; height: 20px; }
#libraryDateText { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.calendar-chevron { width: 14px; height: 14px; flex-shrink: 0; color: var(--color-muted); }
.library-date-button[aria-expanded="true"] { border-color: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary-soft); }
.library-date-button[data-state="loading"] { cursor: progress; }
.library-date-button[data-state="error"] { background: var(--color-bad-soft); border-color: var(--color-bad); color: var(--color-bad); }
.library-date-button[data-state="success"] { border-color: var(--color-primary); }
.library-calendar { position: fixed; inset: auto; margin: 0; width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; padding: var(--space-md); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-hover); font-family: var(--font-body); }
.library-calendar:not(:popover-open) { display: none; }
.calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); margin-bottom: var(--space-xs); }
.calendar-heading strong { font-size: 16px; font-style: normal; }
#calendarClose { min-height: 32px; width: 32px; padding: 0; border: 0; font-size: 24px; line-height: 1; background: var(--color-paper); color: var(--color-muted); }
.calendar-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); padding: var(--space-2xs); border-radius: var(--radius-md); background: var(--color-paper); }
.calendar-shortcuts button { min-height: 36px; font-size: 14px; padding-inline: var(--space-xs); border-color: var(--color-border); }
.calendar-shortcuts .is-selected { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-on-primary); }
.calendar-month-nav { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: var(--space-xs); margin-block: var(--space-sm); }
.calendar-month-nav button { min-height: 36px; padding: 0; border: 0; font-size: 24px; background: var(--color-primary-soft); color: var(--color-primary); }
.calendar-month-nav strong { text-align: center; font-size: 16px; font-style: normal; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-2xs); }
.calendar-weekdays { padding-bottom: var(--space-xs); text-align: center; color: var(--color-muted); font-size: 12px; font-weight: 500; }
.calendar-day { position: relative; min-width: 0; min-height: 36px; padding: 0; font-size: 14px; border: 1px solid transparent; background: var(--color-surface); color: var(--color-ink); border-radius: var(--radius-sm); }
.calendar-day:disabled { opacity: 1; color: var(--color-soft); background: var(--color-paper); cursor: default; }
.calendar-day.has-clips { border-color: var(--color-border); background: var(--color-primary-soft); color: var(--color-primary); font-weight: 600; }
.calendar-day.has-clips::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: var(--radius-full); background: var(--color-primary); left: calc(50% - 2px); bottom: 3px; }
.calendar-day.is-selected { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-on-primary); }
.calendar-day.is-selected::after { background: var(--color-on-primary); }
.calendar-day:not(:disabled):hover { border-color: var(--color-primary); }
.calendar-note { display: flex; align-items: start; gap: var(--space-xs); margin: var(--space-sm) 0 0; font-size: 12px; line-height: 1.6; color: var(--color-muted); }
.calendar-note::before { content: ""; flex-shrink: 0; margin-top: 7px; width: 5px; height: 5px; border-radius: var(--radius-full); background: var(--color-primary); }
.calendar-legacy { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-xs); }
.calendar-legacy > span { width: 100%; font-size: 12px; color: var(--color-muted); }
.calendar-legacy button { min-height: 36px; font-size: 14px; }

/* Separate Telegram service link; Clip view buttons keep their existing handlers. */
.side-nav .side-service-link { display: flex; align-items: center; min-height: 44px; padding: var(--space-sm) var(--space-md); border: 1px solid transparent; border-radius: var(--radius-md); color: var(--color-ink); background: transparent; font-size: 16px; font-weight: 500; line-height: 1.5; text-decoration: none; }
.side-nav .side-service-link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
@media (hover: hover) { .side-nav .side-service-link:hover { background: var(--color-primary-soft); } }

/* Hallmark · component: service-entry banner · genre: playful · theme: existing Cotton
 * states: default · hover · focus · active · disabled · loading · error · success
 * pre-emit critique: P5 H4 E4 S5 R5 V4 · component-scope, no page restyle */
.telegram-entry-banner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); width: 100%; min-width: 0; padding: var(--space-lg); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-blue-soft); color: var(--color-ink); }
.telegram-entry-main { display: flex; align-items: center; gap: var(--space-md); min-width: 0; }
.telegram-entry-icon { display: grid; place-items: center; flex: 0 0 64px; width: 64px; height: 64px; border-radius: var(--radius-lg); background: var(--color-surface); color: var(--color-blue); box-shadow: var(--shadow-card); }
.telegram-entry-icon svg { width: 36px; height: 36px; }
.telegram-entry-copy { min-width: 0; }
.telegram-entry-copy .telegram-entry-kicker { margin: 0 0 var(--space-2xs); color: var(--color-blue); font-size: 13px; font-weight: 600; }
.telegram-entry-copy h2 { margin: 0; font-size: 25px; line-height: 1.4; }
.telegram-entry-copy p { margin: var(--space-2xs) 0 0; color: var(--color-muted); font-size: 14px; line-height: 1.6; }
.telegram-entry-cta { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm); flex-shrink: 0; min-height: 48px; padding: var(--space-xs) var(--space-lg); border: 1px solid transparent; border-radius: var(--radius-md); background: var(--color-blue); color: var(--color-surface); text-decoration: none; white-space: nowrap; font-size: 16px; font-weight: 600; }
.telegram-entry-cta span { font-size: 20px; line-height: 1; }

.telegram-entry-cta:active, .telegram-entry-cta.is-active { background: var(--color-ink); transform: translateY(1px); }
.telegram-entry-cta[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.telegram-entry-cta[data-state="loading"] { cursor: progress; background: var(--color-primary); }
.telegram-entry-cta[data-state="error"] { border-color: var(--color-bad); color: var(--color-bad); background: var(--color-bad-soft); }
.telegram-entry-cta[data-state="success"] { border-color: var(--color-ok); color: var(--color-ok); background: var(--color-ok-soft); }
@media (hover: hover) { .telegram-entry-cta:hover, .telegram-entry-cta.is-hover { background: var(--color-primary-hover); } }
.telegram-entry-cta:focus-visible, .telegram-entry-cta.is-focus { outline: 3px solid var(--color-focus); outline-offset: 3px; box-shadow: 0 0 0 3px var(--color-surface); }
@media (max-width: 768px) { .telegram-entry-banner { align-items: stretch; flex-direction: column; gap: var(--space-md); padding: var(--space-md); } .telegram-entry-icon { flex-basis: 52px; width: 52px; height: 52px; } .telegram-entry-icon svg { width: 30px; height: 30px; } .telegram-entry-copy h2 { font-size: 22px; } .telegram-entry-cta { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .telegram-entry-cta { transition: none; } .telegram-entry-cta:active, .telegram-entry-cta.is-active { transform: none; } }
