/* 克希證客戶入口：顏色與版面照 docs/設計稿/Main.dc.html、Admin.dc.html。
   對比由 test/auth/ui.test.js 從這個檔的色碼計算（文字 ≥4.5:1、非文字 ≥3:1）。
   字型由本站提供（/fonts/noto-sans-tc/，套件 @fontsource-variable/noto-sans-tc），不連外部字型服務。
   動畫只有一種：檢查結果頁進頁時依序揭示判定（@keyframes rv-in，只播一次、播完就停，閒置 0 動畫）；
   沒有轉場；最下面的「減少動畫」保險會讓它直接顯示最終狀態（卡 APP-RESULT）。 */
:root {
  --ink: #221915;          /* 主文字、深色側欄底 */
  --paper: #FBF8F4;        /* 客戶頁底色 */
  --paper-admin: #F4F1EC;  /* 後台底色 */
  --card: #FFFFFF;
  --muted: #6B5F57;        /* 次要文字 */
  --cell: #4A403A;         /* 表格內文 */
  --line: #D8CFC6;         /* 分隔線（裝飾用，不承載資訊） */
  --line-soft: #EFEAE4;
  --field: #8C8178;        /* 輸入框邊框 */
  --brand: #0F6E6A;        /* 主按鈕、連結、焦點框 */
  --brand-dark: #0A4F4C;
  --on-brand: #FFFFFF;
  --ok: #256A29;
  --bad: #B3261E;
  --bad-bg: #FBEAE8;
  --ok-bg: #E8F3E8;
  --warn: #8A5A00;
  --wait: #5F5F5F;
  --side-text: #FBF8F4;
  --side-muted: #CFC6BD;
  --side-list: #E8E1DA;
  --side-accent: #7FC8C2;
  --side-active: #3A2E28;
  --info: #1F5FA8;         /* 已報價待確認 */
  --info-bg: #EAF0F8;
  --brand-bg: #E3F0EE;     /* 必交標籤、製作中 */
  --paper-dim: #F6F2ED;    /* 月曆裡不屬於這個月的日子 */
  --purple: #6A3FA0;       /* 檢查結果：條件成立 */
  --purple-bg: #F0EAF7;
  --gray-bg: #EFEFEF;      /* 檢查結果：無法判定 */
  --font: 'Noto Sans TC Variable', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.5; }
body.admin { background: var(--paper-admin); }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
input:focus-visible, button:focus-visible, a:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
/* 可展開區的標題（申請頁個資告知、報價頁「想談價格或範圍」）：看得出能按；焦點框跟連結、按鈕同一個（卡 FIX-TOSUI） */
summary { cursor: pointer; }
/* 深色區塊（頁首、側欄）上 --brand 對 --ink 只有 2.8:1，改用淺青色焦點框 */
.topbar :focus-visible, .topnav :focus-visible, .admin-nav :focus-visible, .auth-intro :focus-visible { outline-color: var(--side-accent); }
.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; }

/* ---- 登入／申請（Main.dc.html） ---- */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-intro { flex: 1 1 420px; background: var(--ink); color: var(--side-text); padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: 0.04em; }
.brand-sub { font-size: 13px; color: var(--side-muted); }
.auth-intro h1 { margin: 0; font-size: 34px; line-height: 1.35; font-weight: 700; }
.auth-pitch { display: flex; flex-direction: column; gap: 20px; max-width: 440px; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; font-size: 15px; color: var(--side-list); }
.steps li { display: flex; gap: 12px; align-items: baseline; }
.steps .n { font-weight: 700; color: var(--side-accent); min-width: 22px; }
.auth-foot { margin: 0; font-size: 13px; color: var(--side-muted); }
.auth-main { flex: 999 1 520px; min-width: 0; padding: 56px 40px; display: flex; justify-content: center; align-items: flex-start; }
.auth-box { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 24px; }

.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { flex: 1; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 16px; text-decoration: none; margin-bottom: -1px; font-weight: 500; color: var(--muted); border-bottom: 3px solid transparent; }
.tab[aria-current="page"] { font-weight: 700; color: var(--brand); border-bottom-color: var(--brand); }

.form { display: flex; flex-direction: column; gap: 16px; }
.form h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field textarea { height: 46px; padding: 0 14px; font-size: 16px; border: 1.5px solid var(--field); border-radius: 8px; background: var(--card); color: var(--ink); font-family: inherit; }
.field textarea { height: auto; min-height: 72px; padding: 10px 14px; resize: vertical; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--bad); border-width: 2px; }
.hint { font-size: 13px; color: var(--muted); }
.err { font-size: 13px; font-weight: 700; color: var(--bad); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.6; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); }
.row-between { display: flex; justify-content: space-between; align-items: center; font-size: 14px; gap: 12px; flex-wrap: wrap; }
.btn { height: 48px; border: 0; border-radius: 8px; background: var(--brand); color: var(--on-brand); font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer; padding: 0 18px; }
.btn:hover { background: var(--brand-dark); }
.btn-outline { height: 44px; border: 1.5px solid var(--brand); border-radius: 8px; background: var(--card); color: var(--brand); font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; padding: 0 16px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.note { margin: 0; font-size: 14px; color: var(--muted); }

.notice { padding: 14px 16px; border-radius: 8px; font-size: 15px; border: 1.5px solid; }
.notice-error { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.notice-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.notice b { display: block; margin-bottom: 4px; }

.status-card { display: flex; flex-direction: column; gap: 18px; padding: 28px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
.status-head { display: flex; gap: 12px; align-items: center; }
.status-title { font-size: 20px; font-weight: 700; }
.status-sub { font-size: 14px; color: var(--muted); }
.status-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.status-steps li { display: flex; gap: 10px; }
.st-done { font-weight: 700; color: var(--ok); }
.st-now { font-weight: 700; color: var(--wait); }
.st-todo { font-weight: 700; color: var(--muted); }

/* ---- 客戶專區頁首 ---- */
.topbar { background: var(--ink); color: var(--side-text); padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar form { margin: 0; }
.btn-on-dark { height: 40px; border: 1.5px solid var(--side-accent); border-radius: 8px; background: transparent; color: var(--side-text); font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; padding: 0 14px; }
.page { max-width: 880px; margin: 0 auto; padding: 32px 24px; display: flex; flex-direction: column; gap: 16px; }
.page h1 { margin: 0; font-size: 26px; }
/* 共用頁尾（src/views/layout.js 的 FOOTER，每一頁最下面；卡 FIX-TOSUI）：跟內容用一條細線分開、字小一號、置中；
   不另上底色（客戶頁、後台各用自己的底色），字色 --muted、連結 --brand，對比由 test/auth/ui.test.js 算 */
footer.page { max-width: none; margin: 0; padding: 20px 24px 28px; gap: 4px; border-top: 1px solid var(--line); text-align: center; }
footer.page .note { font-size: 13px; line-height: 1.9; color: var(--muted); }
footer.page a { color: var(--brand); white-space: nowrap; }

/* ---- 我的案件、上傳（Upload.dc.html） ---- */
.topnav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.topnav a { color: var(--side-list); text-decoration: none; padding: 10px 14px; }
.topnav a[aria-current="page"] { color: var(--on-brand); border-bottom: 3px solid var(--side-accent); }
.case-wrap { max-width: 1120px; margin: 0 auto; padding: 36px 24px 56px; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.case-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.case-main h1 { margin: 0 0 6px; font-size: 28px; }
.case-main .lead { margin: 0; font-size: 15px; color: var(--muted); }
.case-aside { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.case-aside h2 { margin: 0; font-size: 18px; }
.case-aside .sub { margin: 0; }
.case-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
.case-card[aria-current="page"] { border-color: var(--brand); }
.case-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.case-name { font-size: 16px; font-weight: 700; }
.case-pill { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.st-draft { background: var(--line-soft); color: var(--muted); }
.st-awaiting_quote { background: var(--line-soft); color: var(--wait); }
.st-quoted { background: var(--info-bg); color: var(--info); }
.st-accepted { background: var(--brand-bg); color: var(--brand); }
.st-declined { background: var(--bad-bg); color: var(--bad); }
.st-completed { background: var(--ok-bg); color: var(--ok); }
.slots { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.slot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 16px 18px; background: var(--card); border-radius: 10px; border: 1.5px dashed var(--field); }
.slot-clean { border-style: solid; border-color: var(--ok); }
.slot-infected { border-style: solid; border-color: var(--bad); }
.slot-info { min-width: 0; flex: 1 1 300px; display: flex; flex-direction: column; gap: 2px; }
.slot-title { font-size: 16px; font-weight: 700; }
.tag-req { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; margin-left: 6px; background: var(--brand-bg); color: var(--brand); }
.tag-opt { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; margin-left: 6px; background: var(--line-soft); color: var(--muted); }
.file-ok { font-size: 14px; font-weight: 500; color: var(--ok); margin-top: 4px; }
.file-wait { font-size: 14px; font-weight: 500; color: var(--wait); margin-top: 4px; }
.file-bad { font-size: 14px; font-weight: 700; color: var(--bad); margin-top: 4px; }
.slot-form { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.slot-form input[type="file"] { font-size: 14px; font-family: inherit; color: var(--ink); max-width: 100%; }
/* 分段上傳的進度（public/js/upload.js）：文字「上傳中 N%」＋進度條，失敗前面加 ✕；不播動畫 */
.up-status { flex: 1 1 100%; margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
.up-status progress { width: 220px; max-width: 100%; height: 12px; vertical-align: middle; accent-color: var(--brand); }
.up-status-bad { font-weight: 700; color: var(--bad); }
.send-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn:disabled { background: var(--line); color: var(--cell); cursor: not-allowed; }
.hint-missing { font-size: 14px; font-weight: 700; color: var(--bad); }
.hint-ready { font-size: 14px; font-weight: 500; color: var(--ok); }
.quote-box { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; }
.quote-box p { margin: 0; }
.quote-amount { font-size: 24px; font-weight: 700; }
.decide { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.decide form { margin: 0; }
.btn-outline-danger { height: 44px; border: 1.5px solid var(--bad); border-radius: 8px; background: var(--card); color: var(--bad); font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; padding: 0 16px; }
.scan-wait { font-size: 14px; font-weight: 700; color: var(--wait); }
.quote-form { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
.admin-main h2 { margin: 8px 0 0; font-size: 18px; }

/* ---- 製作進度（Progress.dc.html）：圓環＋數字、預估完成日、已經做了哪些事；不播動畫 ---- */
.progress-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.progress-card { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.progress-ring { flex: 1 1 260px; align-items: center; }
.progress-ring .ring { max-width: 100%; height: auto; }
.progress-log { flex: 999 1 360px; min-width: 0; }
.progress-log h2 { margin: 0; font-size: 20px; }
.progress-dates { margin: 0; font-size: 15px; text-align: center; color: var(--ink); }
.done-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.done-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.done-list .at { color: var(--muted); font-variant-numeric: tabular-nums; }
.item-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.item-row { padding: 14px 16px; background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; display: flex; gap: 14px; flex-wrap: wrap; }
.item-row .at { color: var(--muted); font-variant-numeric: tabular-nums; }
.item-form { display: flex; flex-direction: column; gap: 10px; max-width: 560px; flex: 1 1 300px; }
.item-form h3 { margin: 0; font-size: 16px; }

/* ---- 後台（Admin.dc.html） ---- */
.admin-wrap { min-height: 100vh; display: flex; flex-wrap: wrap; }
.admin-nav { flex: 1 1 220px; max-width: 100%; background: var(--ink); color: var(--side-text); padding: 24px 16px; display: flex; flex-direction: column; gap: 6px; }
.admin-nav .title { font-weight: 700; font-size: 17px; padding: 0 10px 18px; }
.admin-nav a { display: flex; justify-content: space-between; padding: 12px 10px; border-radius: 8px; color: var(--side-list); text-decoration: none; font-weight: 500; }
.admin-nav a[aria-current="page"] { background: var(--side-active); color: var(--on-brand); font-weight: 700; }
.badge { background: var(--side-accent); color: var(--ink); border-radius: 99px; padding: 0 9px; font-size: 13px; }
.admin-nav .spacer { flex: 1; }
.admin-nav .who { padding: 0 10px; font-size: 12px; color: var(--side-muted); line-height: 1.6; word-break: break-all; }
.admin-main { flex: 999 1 640px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.admin-main h1 { margin: 0; font-size: 26px; }
.admin-main .lead { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { height: 40px; padding: 0 16px; border-radius: 8px; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; background: var(--card); color: var(--ink); border: 1.5px solid var(--field); }
.pill[aria-current="page"] { background: var(--ink); color: var(--on-brand); border-color: var(--ink); font-weight: 700; }
.table-box { overflow-x: auto; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; }
table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 13px; color: var(--muted); padding: 12px 16px; font-weight: 500; border-bottom: 1px solid var(--line); }
td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
td.at { color: var(--cell); white-space: nowrap; font-variant-numeric: tabular-nums; }
td.what { color: var(--cell); }
.sub { font-size: 13px; color: var(--muted); }
.dom-free { font-size: 13px; font-weight: 500; color: var(--warn); }
.dom-ok { font-size: 13px; font-weight: 500; color: var(--ok); }
.actions { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.actions form { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.btn-sm { height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--brand); color: var(--on-brand); font-weight: 700; font-family: inherit; font-size: 14px; cursor: pointer; }
.btn-sm-danger { height: 40px; padding: 0 14px; border: 1.5px solid var(--bad); border-radius: 8px; background: var(--card); color: var(--bad); font-weight: 700; font-family: inherit; font-size: 14px; cursor: pointer; }
.actions textarea { min-height: 60px; padding: 8px 10px; font-size: 14px; border: 1.5px solid var(--field); border-radius: 8px; font-family: inherit; color: var(--ink); background: var(--card); resize: vertical; }
.actions label { font-size: 13px; color: var(--muted); }
.done-ok { font-size: 14px; font-weight: 700; color: var(--ok); }
.done-bad { font-size: 14px; font-weight: 700; color: var(--bad); }
.empty { margin: 0; padding: 24px 16px; font-size: 15px; color: var(--muted); }

/* ---- 製作月曆（Calendar.dc.html）：月格子；已完成＝實心＋「✓」、預估＝「預估」＋虛線框、今天＝實心圓＋「今天」 ---- */
.cal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cal-head h1 { margin: 0; font-size: 26px; }
.cal-navs { display: inline-flex; gap: 6px; }
.cal-nav { width: 40px; height: 40px; border-radius: 99px; border: 1.5px solid var(--field); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; text-decoration: none; }
.cal-nav-off { color: var(--muted); border-color: var(--line); }
.cal-legend { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--muted); }
.cal-legend li { display: flex; gap: 8px; align-items: center; }
.cal-box { overflow-x: auto; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; }
.cal { min-width: 640px; table-layout: fixed; }
.cal th { text-align: center; padding: 10px 4px; }
.cal td.cal-day { padding: 0; height: 112px; vertical-align: top; border: 1px solid var(--line-soft); background: var(--card); color: var(--ink); }
.cal td.cal-out { background: var(--paper-dim); color: var(--muted); }
.cal td.cal-sel { background: var(--brand-bg); color: var(--ink); outline: 2px solid var(--brand); outline-offset: -2px; }
.cal-link { display: flex; flex-direction: column; gap: 4px; min-height: 112px; padding: 6px; color: inherit; text-decoration: none; }
.cal-link:focus-visible { outline-offset: -3px; }
.cal-num { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cal-today { background: var(--brand); color: var(--on-brand); border-radius: 99px; font-weight: 700; }
.cal-today-label { font-size: 12px; font-weight: 700; color: var(--brand); }
.chip { display: block; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-done { background: var(--brand); color: var(--on-brand); }
/* 你的動作：照 Calendar.dc.html 實心藍底（#1F5FA8＝--info）白字；不用 .lv-blue（那是結果頁藍級徽章，淺藍底） */
.chip-you { background: var(--info); color: var(--on-brand); }
.chip-plan { background: var(--card); color: var(--cell); border: 1.5px dashed var(--muted); }
.chip-more { font-size: 12px; color: var(--muted); }
.cal-legend .chip { display: inline-block; }
.cal-ev-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cal-ev { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--card); border: 1.5px solid var(--brand); border-radius: 10px; }
.cal-ev-plan { border: 1.5px dashed var(--muted); }
.cal-ev-kind { font-size: 13px; font-weight: 700; color: var(--brand); }
.cal-ev-plan .cal-ev-kind { color: var(--muted); }
.cal-ev-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.cal-list { display: none; margin: 0; padding: 0; list-style: none; flex-direction: column; gap: 8px; }
.cal-list li { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; }
.cal-list li.cal-sel { background: var(--brand-bg); color: var(--ink); border-color: var(--brand); }
.cal-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; color: inherit; text-decoration: none; }
.cal-row-day { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.cal-row-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-row-chips .chip { display: inline-block; max-width: 100%; }

/* ---- 檢查結果頁（卡 APP-RESULT；設計稿 docs/設計稿/Result.dc.html） ---- */
.lv { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; border: 1.5px solid; }
.lv-red { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.lv-gray { background: var(--gray-bg); color: var(--wait); border-color: var(--wait); }
.lv-purple { background: var(--purple-bg); color: var(--purple); border-color: var(--purple); }
.lv-blue { background: var(--info-bg); color: var(--info); border-color: var(--info); }
.lv-green { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.res-stale { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
/* 結果範圍說明（卡 DEMO-SEED）：藍字淺藍底＋「◆ 範圍」字，不只靠顏色；對比由 test/demo/demo-scope.test.js 算 */
.res-scope { margin: 0; padding: 10px 14px; border-radius: 8px; border: 1.5px solid var(--info); font-size: 15px; color: var(--info); background: var(--info-bg); }
.res-scope b { margin-right: 6px; }
.res-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.res-run { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.res-run h2, .res-sec h2 { margin: 0; font-size: 18px; }
.res-verdict { font-size: 16px; font-weight: 700; color: var(--ink); }
.res-sec { display: flex; flex-direction: column; gap: 10px; }
.schem-box { overflow: auto; max-height: 75vh; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 8px; }
.schem-svg { display: block; width: 100%; height: auto; min-width: 640px; }
.svg-ref { cursor: pointer; }
.svg-ref:target text, .svg-ref:focus text, .svg-ref:hover text { fill: var(--brand); font-weight: 700; text-decoration: underline; }
.parts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.part { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.part:target { border-color: var(--brand); outline: 3px solid var(--brand); outline-offset: 2px; }
.part-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.part-ref { font-size: 18px; font-weight: 700; color: var(--ink); }
.part-loc { font-size: 14px; color: var(--brand); font-weight: 700; }
.finds { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.find { border-top: 1px solid var(--line-soft); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.find:first-child { border-top: 0; padding-top: 0; }
.find-what { font-size: 15px; color: var(--ink); }
.find-num { font-size: 14px; color: var(--cell); font-variant-numeric: tabular-nums; }
.find-src { font-size: 13px; color: var(--muted); }
.wave-wait { font-size: 14px; color: var(--muted); border: 1.5px dashed var(--field); border-radius: 8px; padding: 10px 12px; }
@keyframes rv-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rv { animation: rv-in 0.4s ease-out 1 backwards; }
.rv-d1 { animation-delay: 0.12s; }
.rv-d2 { animation-delay: 0.24s; }
.rv-d3 { animation-delay: 0.36s; }
.rv-d4 { animation-delay: 0.48s; }
.rv-d5 { animation-delay: 0.60s; }
.rv-d6 { animation-delay: 0.72s; }
.rv-d7 { animation-delay: 0.84s; }
.rv-d8 { animation-delay: 0.96s; }
.rv-d9 { animation-delay: 1.08s; }
.rv-d10 { animation-delay: 1.20s; }
.rv-d11 { animation-delay: 1.32s; }
.rv-d12 { animation-delay: 1.44s; }

@media (max-width: 640px) {
  .cal-box { display: none; }
  .cal-list { display: flex; }
}

@media (max-width: 560px) {
  .auth-intro, .auth-main { padding: 32px 20px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .admin-main { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
