/* 全域保險：任何 class 只要設了 display（含 @media 內與 inline style），
   就會蓋掉瀏覽器預設的 [hidden] 而讓「隱藏」失效。這個坑在本專案重複發生過
   十次（權限選單、範本搜尋、審核工作區選單…），因此在這裡一次關閉整類問題。
   新增元件不需要再補 .xxx[hidden] 規則。 */
[hidden] { display: none !important; }

:root {
  --ink: #15332d;
  --ink-2: #21483f;
  --canvas: #eeeae0;
  --paper: #fffdf7;
  --paper-deep: #f7f2e8;
  --line: #d8d1c4;
  --line-dark: rgba(21, 51, 45, .18);
  --muted: #5c635d; /* 由 #6e756f 加深：12–13px 小字在米白底達 WCAG AA */
  --coral: #df5b3f;
  --coral-dark: #ae3d28;
  --acid: #d7e46e;
  --blue: #397a91;
  --ochre: #c58c38;
  --green: #3f7d68;
  --shadow: 0 24px 70px rgba(31, 47, 42, .10);
  --shadow-soft: 0 10px 28px rgba(31, 47, 42, .08);
  --radius: 22px;
  --sans: "Microsoft JhengHei", "Microsoft JhengHei UI", sans-serif;
  --serif: "Microsoft JhengHei", "Microsoft JhengHei UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  background:
    linear-gradient(rgba(21, 51, 45, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 51, 45, .025) 1px, transparent 1px),
    var(--canvas);
  background-size: 24px 24px;
}
button, input, select, textarea { font: inherit; line-height: 1.35; }
button { color: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, [contenteditable]:focus-visible {
  outline: 3px solid rgba(223, 91, 63, .3);
  outline-offset: 2px;
}

.prototype-ribbon {
  position: fixed;
  z-index: 100;
  top: 17px;
  right: -55px;
  width: 220px;
  padding: 7px 0;
  color: var(--ink);
  background: var(--acid);
  box-shadow: 0 2px 16px rgba(0,0,0,.12);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  transform: rotate(38deg);
}

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: 248px;
  padding: 28px 22px 20px;
  color: #f6f1e7;
  background:
    radial-gradient(circle at 28% 12%, rgba(215, 228, 110, .12), transparent 25%),
    linear-gradient(145deg, #173d35, #102d28 65%, #0e2824);
  overflow: hidden;
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
}
.sidebar > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 5px 42px; }
.brand strong { display: block; font-family: var(--sans); font-size: 18px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.brand small { display: block; margin-top: 2px; color: rgba(255,255,255,.52); font-size: 12px; letter-spacing: .26em; }
.brand-mark { position: relative; display: flex; align-items: end; gap: 3px; width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--coral); }
.brand-mark span { width: 4px; border-radius: 4px; background: white; }
.brand-mark span:nth-child(1) { height: 8px; }
.brand-mark span:nth-child(2) { height: 18px; }
.brand-mark span:nth-child(3) { height: 12px; }
.main-nav { display: grid; gap: 5px; }
.nav-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  width: 100%;
  padding: 13px 12px;
  border: 0;
  border-radius: 12px;
  color: rgba(255,255,255,.62);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: .2s ease;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.06); transform: translateX(2px); }
.nav-item.active { color: var(--ink); background: var(--acid); font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.nav-index { font-family: ui-monospace, monospace; font-size: 13px; opacity: .6; }
.nav-item b { min-width: 24px; padding: 2px 6px; border-radius: 99px; color: white; background: rgba(255,255,255,.12); font-size: 13px; text-align: center; }
.nav-item.active b { color: white; background: var(--ink); }
.sidebar-spacer { flex: 1; }
.engine-card { margin-top: 24px; padding: 15px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(255,255,255,.045); }
.engine-title { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14px; font-weight: 700; }
.status-pulse { width: 7px; height: 7px; border-radius: 50%; background: #f4bd58; box-shadow: 0 0 0 5px rgba(244,189,88,.1); }
.engine-row { display: flex; justify-content: space-between; margin: 7px 0; color: rgba(255,255,255,.48); font-size: 13px; }
.engine-row strong { color: rgba(255,255,255,.82); }
.profile-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; margin-top: 14px; padding: 14px 5px 0; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--ink); background: #e9dfcb; font-family: var(--serif); font-weight: 900; }
.profile-row strong, .profile-row small { display: block; }
.profile-row strong { font-size: 14px; }
.profile-row small { margin-top: 2px; color: rgba(255,255,255,.42); font-size: 13px; }
.more-button { border: 0; color: rgba(255,255,255,.55); background: transparent; cursor: pointer; }
.mobile-bar { display: none; }

.workspace { min-height: 100vh; margin-left: 248px; padding: 34px clamp(24px, 4vw, 64px) 80px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; max-width: 1540px; margin: 0 auto 30px; }
.breadcrumb { margin-bottom: 10px; color: var(--coral-dark); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.topbar h1 { max-width: 820px; margin: 0; font-family: var(--serif); font-size: clamp(28px, 3.5vw, 48px); line-height: 1.2; letter-spacing: -.04em; }
.topbar p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.button, .icon-button {
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}
.button { padding: 11px 16px; }
.button:hover, .icon-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.button.primary { color: white; background: var(--ink); }
.button.primary:hover { background: var(--ink-2); }
.button.secondary { border-color: var(--line-dark); background: rgba(255,253,247,.68); }
.button.light { color: var(--ink); background: var(--acid); }
.button.full { width: 100%; }
.icon-button { position: relative; width: 42px; height: 42px; border-color: var(--line-dark); background: rgba(255,253,247,.68); font-size: 0; }
.icon-button::after { content: ""; position: absolute; left: 15px; top: 11px; width: 10px; height: 12px; border: 1.5px solid var(--ink); border-radius: 8px 8px 4px 4px; }
.icon-button::before { content: ""; position: absolute; left: 19px; top: 26px; width: 3px; height: 3px; border-radius: 50%; background: var(--ink); }
.notification-dot { position: absolute; z-index: 2; right: 10px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.view { display: none; max-width: 1540px; margin: 0 auto; }
.view.active { display: block; }
.surface { border: 1px solid rgba(21,51,45,.1); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.eyebrow, .kicker { color: var(--coral-dark); font-size: 13px; font-weight: 800; letter-spacing: .18em; }
.eyebrow.light { color: var(--acid); }

.reveal { animation: rise .6s cubic-bezier(.2,.75,.25,1) both; }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Overview */
.overview-hero { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 310px; padding: 45px 54px; border-radius: 28px; color: white; background: var(--ink); overflow: hidden; }
.overview-hero::before { content: ""; position: absolute; inset: -70% 34% -110% -20%; border: 1px solid rgba(215,228,110,.18); border-radius: 50%; transform: rotate(-20deg); }
.overview-hero h2 { position: relative; margin: 18px 0; font-family: var(--serif); font-size: clamp(38px, 5vw, 70px); line-height: 1.1; letter-spacing: -.06em; }
.overview-hero h2 em { color: var(--acid); font-style: normal; }
.overview-hero p { max-width: 540px; margin: 0; color: rgba(255,255,255,.58); line-height: 1.7; }
.hero-orbit { position: relative; display: grid; place-items: center; width: 210px; height: 210px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; }
.hero-orbit::before, .hero-orbit::after { content: ""; position: absolute; border-radius: 50%; }
.hero-orbit::before { inset: 18px; border: 1px dashed rgba(215,228,110,.28); animation: spin 16s linear infinite; }
.hero-orbit::after { top: 4px; left: 96px; width: 16px; height: 16px; background: var(--coral); box-shadow: 0 0 0 8px rgba(223,91,63,.12); }
.hero-orbit span { font-family: var(--serif); font-size: 76px; }
.hero-orbit small { position: absolute; bottom: 50px; color: var(--acid); font-size: 12px; letter-spacing: .2em; text-align: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.metric-card { position: relative; min-height: 155px; padding: 22px; border: 1px solid rgba(21,51,45,.1); border-radius: 18px; background: var(--paper); overflow: hidden; }
.metric-card::after { content: ""; position: absolute; right: -25px; bottom: -25px; width: 80px; height: 80px; border: 1px solid var(--line); border-radius: 50%; }
.metric-card > span, .metric-card > small { display: block; color: var(--muted); }
.metric-card > span { font-size: 14px; font-weight: 700; }
.metric-card strong { display: block; margin: 13px 0 8px; font-family: var(--serif); font-size: 42px; line-height: 1; }
.metric-card sup { color: var(--coral); font-family: var(--sans); font-size: 14px; }
.metric-card small { font-size: 13px; }
.metric-card.accent { color: white; background: var(--coral); }
.metric-card.accent > span, .metric-card.accent > small { color: rgba(255,255,255,.7); }
.dashboard-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 18px; }
.recent-panel, .activity-panel { padding: 25px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-head h2, .section-head h3 { margin: 5px 0 0; font-family: var(--serif); }
.section-head h3 { font-size: 20px; }
.section-head p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.text-button { padding: 4px; border: 0; color: var(--ink); background: transparent; font-size: 14px; font-weight: 700; cursor: pointer; }
.text-button:hover { color: var(--coral-dark); }
.text-button.danger { color: var(--coral-dark); }
.recent-list { margin-top: 18px; }
.recent-item { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 13px 4px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.recent-item:hover { transform: translateX(3px); }
.meeting-code { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: white; background: var(--green); font-size: 13px; font-style: normal; font-weight: 800; }
.meeting-code.blue { background: var(--blue); }
.meeting-code.ochre { background: var(--ochre); }
.meeting-code.coral { background: var(--coral); }
.recent-item strong, .recent-item small { display: block; }
.recent-item strong { font-size: 14px; }
.recent-item small { margin-top: 4px; color: var(--muted); font-size: 13px; }
.status-tag { display: inline-block; padding: 5px 8px; border-radius: 20px; font-size: 13px; font-style: normal; font-weight: 700; white-space: nowrap; }
.status-tag.review { color: #83442e; background: #f7d8c8; }
.status-tag.done { color: #256050; background: #dcece5; }
.live-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.live-label i { width: 7px; height: 7px; border-radius: 50%; background: #66ad85; box-shadow: 0 0 0 4px rgba(102,173,133,.14); }
.activity-chart { display: flex; align-items: flex-end; gap: 10px; height: 175px; margin-top: 25px; padding-top: 20px; border-bottom: 1px solid var(--line); }
.activity-chart div { position: relative; flex: 1; height: var(--h); min-height: 10px; border-radius: 5px 5px 0 0; background: #dfe1d5; transition: .3s; }
.activity-chart div:hover { background: var(--green); }
.activity-chart div.today { background: var(--coral); }
.activity-chart span { position: absolute; left: 50%; bottom: -24px; color: var(--muted); font-size: 13px; transform: translateX(-50%); }

/* Meeting composer */
.step-rail { display: flex; align-items: center; margin-bottom: 18px; padding: 14px 18px; border: 1px solid rgba(21,51,45,.08); border-radius: 16px; background: rgba(255,253,247,.56); }
.step { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.step b { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid var(--line-dark); border-radius: 50%; font-size: 13px; }
.step > span { font-size: 13px; font-weight: 700; white-space: nowrap; }
.step small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.step.active b { color: white; border-color: var(--coral); background: var(--coral); }
.step-line { flex: 1; height: 1px; margin: 0 15px; background: var(--line); }
.composer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 18px; }
.composer-main { display: grid; gap: 18px; min-width: 0; }
.form-section { padding: 28px; }
.section-head.numbered { justify-content: flex-start; }
.section-head.numbered > .text-button, .section-head.numbered > .ai-chip { margin-left: auto; }
.section-number { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: white; background: var(--ink); font-family: ui-monospace, monospace; font-size: 13px; }
.form-section .section-head h2 { font-size: 21px; }
.dropzone { position: relative; display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 18px; min-height: 130px; margin-top: 24px; padding: 20px 24px; border: 1.5px dashed #9cac9d; border-radius: 17px; background: linear-gradient(135deg, rgba(215,228,110,.09), rgba(63,125,104,.05)); cursor: pointer; transition: .2s; }
.dropzone:hover, .dropzone.dragover { border-color: var(--coral); background: rgba(223,91,63,.055); transform: translateY(-2px); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone strong, .dropzone small { display: block; }
.dropzone strong { font-family: var(--serif); font-size: 15px; }
.dropzone small { margin-top: 6px; color: var(--muted); font-size: 13px; }
.drop-action { padding: 9px 13px; border: 1px solid var(--line-dark); border-radius: 9px; background: white; font-size: 13px; font-weight: 700; }
.drop-illustration { position: relative; display: flex; justify-content: center; align-items: center; gap: 3px; height: 72px; border-radius: 14px; color: white; background: var(--ink); overflow: hidden; }
.drop-illustration i { width: 4px; border-radius: 4px; background: var(--acid); }
.drop-illustration i:nth-child(1) { height: 16px; }
.drop-illustration i:nth-child(2) { height: 36px; }
.drop-illustration i:nth-child(3) { height: 24px; }
.drop-illustration span { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--ink); background: white; font-size: 14px; }
.sequence-head { display: flex; align-items: center; justify-content: space-between; margin: 23px 0 10px; }
.sequence-head strong { font-size: 14px; }
.sequence-head span { margin-left: 8px; padding: 3px 7px; border-radius: 20px; color: var(--green); background: #e1eee7; font-size: 12px; }
.sequence-head small { color: var(--muted); font-size: 12px; }
.drag-key { font-size: 14px; }
.file-list { display: grid; gap: 8px; }
.file-card { display: grid; grid-template-columns: 22px 34px 1fr auto auto; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: white; transition: .18s ease; }
.file-card:hover { border-color: #a7b7ad; box-shadow: 0 6px 18px rgba(21,51,45,.06); }
.file-card.dragging { opacity: .4; transform: scale(.98); }
.drag-handle { color: #a1a69e; font-size: 13px; cursor: grab; letter-spacing: -2px; }
.drag-handle:active { cursor: grabbing; }
.file-order { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: white; background: var(--green); font-family: ui-monospace, monospace; font-size: 13px; }
.file-card:nth-child(2) .file-order { background: var(--blue); }
.file-card:nth-child(3) .file-order { background: var(--ochre); }
.file-card:nth-child(n+4) .file-order { background: var(--coral); }
.file-info { min-width: 0; }
.file-info strong, .file-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info strong { font-size: 13px; }
.file-info small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.file-time { text-align: right; }
.file-time strong, .file-time small { display: block; }
.file-time strong { font-family: ui-monospace, monospace; font-size: 13px; }
.file-time small { margin-top: 2px; color: #4a876f; font-size: 12px; }
.file-actions { display: flex; gap: 2px; }
.file-actions button { display: grid; place-items: center; width: 25px; height: 25px; border: 0; border-radius: 7px; color: var(--muted); background: var(--paper-deep); font-size: 13px; cursor: pointer; }
.file-actions button:hover { color: white; background: var(--coral); }
.empty-files { padding: 22px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.attachment-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--line); }
.attachment-heading > div { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.attachment-heading strong { font-size: 14px; }
.attachment-heading span { padding: 3px 7px; border-radius: 20px; color: var(--blue); background: #e2ebf4; font-size: 12px; font-weight: 700; }
.attachment-heading small { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.attachment-dropzone { min-height: 96px; margin-top: 12px; border-color: #9eb1c3; background: linear-gradient(135deg, rgba(31,91,163,.06), rgba(245,164,35,.045)); }
.attachment-illustration { position: relative; height: 58px; border-radius: 13px; background: #e5ecf4; }
.attachment-illustration i { position: absolute; width: 25px; height: 30px; border: 2px solid var(--blue); border-radius: 4px; background: white; }
.attachment-illustration i:first-of-type { top: 11px; left: 19px; transform: rotate(-8deg); }
.attachment-illustration i:last-of-type { top: 15px; left: 31px; transform: rotate(7deg); }
.attachment-illustration span { position: absolute; z-index: 2; right: 8px; bottom: 7px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: white; background: var(--coral); }
.attachment-list { display: grid; gap: 7px; margin-top: 10px; }
.attachment-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto 28px; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; }
.attachment-card > span:nth-child(2) { min-width: 0; }
.attachment-card strong, .attachment-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-card strong { font-size: 13px; }
.attachment-card small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.attachment-icon { display: grid; place-items: center; height: 34px; border-radius: 8px; color: white; background: var(--blue); font: 700 12px ui-monospace, monospace; letter-spacing: .04em; }
.attachment-order { color: var(--muted); font-size: 12px; }
.attachment-card button { width: 26px; height: 26px; border: 0; border-radius: 7px; color: var(--muted); background: var(--paper-deep); cursor: pointer; }
.attachment-card button:hover { color: white; background: var(--coral); }
.segment-options { margin-top: 15px; border-top: 1px solid var(--line); }
.segment-options summary { padding: 15px 2px 0; font-size: 13px; font-weight: 700; cursor: pointer; }
.segment-options summary span { margin-left: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.inline-fields { display: grid; grid-template-columns: .7fr 1fr 1.4fr; gap: 10px; margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--paper-deep); }
.inline-fields label > span, .field > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; outline: 0; }
.inline-fields input, .inline-fields select { padding: 8px 10px; font-size: 13px; }
.field-grid { display: grid; gap: 12px; margin-top: 24px; }
.field-grid.three { grid-template-columns: 1.5fr .75fr .75fr; }
.field-grid.two { grid-template-columns: 1fr 1fr; }
.field input, .field select { height: 42px; padding: 0 12px; font-size: 13px; }
.ai-chip, .policy-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 20px; color: #4e6311; background: #eef4c7; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ai-chip i { width: 6px; height: 6px; border-radius: 50%; background: #91a51f; }
.type-label, .output-heading { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 10px; }
.type-label strong, .output-heading strong { font-size: 13px; }
.type-label span, .output-heading span { color: var(--muted); font-size: 12px; }
.meeting-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.meeting-types button { min-width: 0; padding: 12px 7px; border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; transition: .18s; }
.meeting-types button:hover { border-color: var(--green); transform: translateY(-2px); }
.project-mode-panel { display: grid; grid-template-columns: 1fr 220px; align-items: center; gap: 20px; margin-top: 12px; padding: 15px 17px; border: 1px solid #b9c9d8; border-radius: 13px; background: linear-gradient(135deg, rgba(31,91,163,.07), rgba(255,255,255,.7)); }
.project-mode-panel[hidden] { display: none; }
.project-mode-panel > div { display: flex; align-items: center; gap: 11px; }
.project-mode-panel strong, .project-mode-panel small { display: block; }
.project-mode-panel strong { font-size: 13px; }
.project-mode-panel small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.project-mode-mark { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: white; background: var(--blue); font-family: var(--serif); font-size: 13px; }
.project-mode-panel label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.project-mode-panel select { height: 37px; padding: 0 10px; font-size: 13px; }
.custom-template-picker { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(190px, .65fr) auto; align-items: center; gap: 12px; margin-top: 11px; padding: 14px; border: 1px solid rgba(46,111,97,.18); border-radius: 14px; background: #edf4f0; }
.custom-template-picker[hidden] { display: none; }
.custom-template-picker > div { display: flex; align-items: center; gap: 10px; }
.custom-template-picker > div strong, .custom-template-picker > div small { display: block; }
.custom-template-picker > div strong { font-family: var(--serif); font-size: 13px; }
.custom-template-picker > div small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.custom-template-picker label { display: grid; gap: 5px; }
.custom-template-picker label span { color: var(--muted); font-size: 12px; font-weight: 700; }
.custom-template-picker select { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; font-size: 13px; }
.button.compact { min-height: 42px; padding: 9px 13px; white-space: nowrap; }
.meeting-types button.selected { border-color: var(--ink); background: var(--ink); color: white; box-shadow: var(--shadow-soft); }
.meeting-types button > span { display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 8px; border-radius: 50%; color: var(--coral-dark); background: #f7ded5; font-family: var(--serif); font-size: 14px; font-weight: 900; }
.meeting-types button.selected > span { color: var(--ink); background: var(--acid); }
.meeting-types strong, .meeting-types small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meeting-types strong { font-size: 13px; }
.meeting-types small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.meeting-types .selected small { color: rgba(255,255,255,.5); }
.module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 24px; }
.module-card { position: relative; min-height: 106px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: white; cursor: pointer; transition: .18s; }
.module-card:has(input:checked) { border-color: var(--green); background: #f1f7f2; box-shadow: inset 0 0 0 1px var(--green); }
.module-card input, .format-card input { position: absolute; opacity: 0; pointer-events: none; }
.module-card b { display: block; margin-bottom: 13px; color: #a1a79f; font-family: ui-monospace, monospace; font-size: 12px; }
.module-card strong, .module-card small { display: block; }
.module-card strong { font-size: 13px; }
.module-card small { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.module-card .check { position: absolute; right: 11px; top: 11px; width: 16px; height: 16px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.module-card input:checked + .check { border-color: var(--green); background: var(--green); }
.module-card input:checked + .check::after { content: "✓"; position: absolute; left: 3px; top: -1px; color: white; font-size: 13px; }
.output-heading { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.output-heading > div span { display: block; margin-top: 3px; }
.output-heading > span { padding: 5px 8px; border-radius: 20px; color: var(--green); background: #e1eee7; }
.format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.format-card { position: relative; display: grid; grid-template-columns: 34px 1fr 12px; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; }
.format-card.selected { border-color: var(--green); background: #f5f9f6; }
.format-card.unavailable { cursor: not-allowed; opacity: .48; filter: grayscale(.25); }
.format-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: white; background: var(--ink); font-size: 13px; font-weight: 800; }
.format-icon.pdf { background: var(--coral); }
.format-icon.doc { background: var(--blue); }
.format-icon.gdoc { background: #487ac7; }
.format-icon.sheet { background: #3b8a5f; }
.format-icon.json { color: var(--ink); background: var(--acid); font-family: ui-monospace, monospace; }
.format-card strong, .format-card small { display: block; }
.format-card strong { font-size: 13px; }
.format-card small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.format-card > i { width: 11px; height: 11px; border: 1px solid var(--line); border-radius: 50%; }
.format-card.selected > i { border: 3px solid white; background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.launch-panel { position: sticky; top: 20px; padding: 22px; }
.launch-panel h2 { margin: 5px 0 17px; font-family: var(--serif); font-size: 22px; }
.package-cover { position: relative; min-height: 255px; padding: 18px; border-radius: 16px; color: white; background: var(--ink); overflow: hidden; }
.package-cover::before { content: ""; position: absolute; top: -70px; right: -70px; width: 170px; height: 170px; border: 1px solid rgba(215,228,110,.3); border-radius: 50%; box-shadow: 0 0 0 25px rgba(215,228,110,.03), 0 0 0 50px rgba(215,228,110,.025); }
.cover-top { position: relative; z-index: 1; display: flex; justify-content: space-between; color: rgba(255,255,255,.58); font-size: 12px; letter-spacing: .1em; }
.cover-top span { color: var(--acid); }
.package-cover > strong { position: relative; z-index: 1; display: block; margin-top: 48px; font-family: var(--serif); font-size: 23px; line-height: 1.45; }
.package-cover > small { position: absolute; bottom: 14px; left: 18px; color: rgba(255,255,255,.35); font-size: 12px; letter-spacing: .16em; }
.waveform { position: absolute; right: 17px; bottom: 40px; display: flex; align-items: center; gap: 3px; height: 34px; }
.waveform i { width: 2px; height: calc(5px + var(--wave, 10px)); background: var(--coral); }
.waveform i:nth-child(2n) { --wave: 18px; }
.waveform i:nth-child(3n) { --wave: 26px; }
.waveform i:nth-child(5n) { --wave: 8px; }
.package-stats { margin: 16px 0; }
.package-stats div { display: flex; justify-content: space-between; padding: 9px 1px; border-bottom: 1px solid var(--line); font-size: 13px; }
.package-stats dt { color: var(--muted); }
.package-stats dd { margin: 0; font-weight: 700; }
.privacy-note { display: flex; gap: 9px; padding: 11px; border-radius: 10px; background: var(--paper-deep); }
.privacy-note > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: white; background: var(--green); font-size: 12px; }
.privacy-note p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.privacy-note strong { color: var(--ink); }
.button.launch { display: block; width: 100%; margin-top: 14px; padding: 14px; border: 0; color: white; background: var(--coral); text-align: left; box-shadow: 0 12px 26px rgba(223,91,63,.22); }
.button.launch:hover { background: var(--coral-dark); }
.button.launch span, .button.launch small { display: block; }
.button.launch span { font-family: var(--serif); font-size: 13px; }
.button.launch small { margin-top: 3px; color: rgba(255,255,255,.65); font-size: 12px; }
.launch-footnote { margin: 10px 8px 0; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: center; }

/* Library */
.library-toolbar { display: grid; grid-template-columns: minmax(280px, 1fr) 180px 150px 140px; gap: 9px; margin-bottom: 9px; }
.search-box { position: relative; }
.search-box span, .transcript-search span { position: absolute; left: 13px; top: 50%; color: var(--muted); transform: translateY(-50%); }
.search-box input { height: 44px; padding: 0 14px 0 36px; }
.library-toolbar select { height: 44px; padding: 0 12px; }
.library-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,253,247,.72); }
.library-filterbar > div { display: flex; align-items: center; gap: 7px; }
.library-filterbar > div > span { color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.library-filterbar select { height: 40px; padding: 0 32px 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; font-size: 12px; }
.library-filterbar p { flex: 1 1 320px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.library-filterbar > button { border: 0; color: var(--coral-dark); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.library-summary { display: flex; align-items: center; gap: 28px; margin-bottom: 13px; color: var(--muted); font-size: 13px; }
.library-summary b { color: var(--ink); font-family: var(--serif); font-size: 16px; }
.view-toggle { display: flex; margin-left: auto; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.view-toggle button { width: 28px; height: 24px; border: 0; border-radius: 5px; background: transparent; font-size: 12px; cursor: pointer; }
.view-toggle button.active { color: white; background: var(--ink); }
.meeting-table { overflow: hidden; }
.table-row { display: grid; grid-template-columns: minmax(280px, 1.6fr) .7fr .65fr .65fr .55fr 104px; align-items: center; gap: 14px; width: 100%; padding: 18px 20px; border: 0; border-top: 1px solid var(--line); background: transparent; font-size: 13px; line-height: 1.55; text-align: left; }
.meeting-record { transition: background .18s; }
.meeting-record:hover { background: #f7f8f2; }
.meeting-record.has-search-matches { padding-bottom: 12px; background: linear-gradient(90deg, rgba(215,228,110,.09), transparent 45%); }
.table-head { border-top: 0; color: var(--muted); background: var(--paper-deep); font-size: 12px; font-weight: 700; }
.meeting-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.meeting-cell > span { min-width: 0; }
.meeting-cell strong, .meeting-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meeting-cell strong { font-size: 14px; }
.meeting-cell mark, .search-match-list mark { padding: 0 2px; color: var(--ink); background: var(--acid); }
.meeting-cell small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.row-actions button { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 12px; font-weight: 800; cursor: pointer; transition: .18s; }
.row-actions .row-open:hover { color: white; border-color: var(--ink); background: var(--ink); }
.row-actions .row-delete { color: var(--coral-dark); border-color: #efc9bd; background: #fff8f5; }
.row-actions .row-delete:hover { color: white; border-color: var(--coral-dark); background: var(--coral-dark); }
.row-actions .row-delete:disabled { color: #aaa69d; border-color: var(--line); background: var(--paper-deep); cursor: not-allowed; }
.search-match-list { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 3px 0 0 60px; }
.search-match-list > div { display: grid; grid-template-columns: 78px 1fr; align-items: start; gap: 8px; padding: 9px 11px; border-left: 2px solid var(--green); border-radius: 0 8px 8px 0; background: rgba(255,255,255,.72); }
.search-match-list b { color: var(--green); font-size: 12px; }
.search-match-list p { margin: 0; color: #4d5c57; font-size: 12px; line-height: 1.65; }
.table-empty { display: none; padding: 50px; color: var(--muted); text-align: center; }
.library-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 54px; color: var(--muted); font-size: 12px; }
.library-pagination button { min-width: 90px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--paper); font-size: 12px; font-weight: 800; cursor: pointer; }
.library-pagination button:disabled { opacity: .4; cursor: not-allowed; }
.library-pagination b { color: var(--ink); }

/* Review */
.review-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.review-toolbar > div:last-child { display: flex; gap: 8px; }
.review-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.review-status i { width: 7px; height: 7px; border-radius: 50%; background: #72a889; }
.review-status b { padding: 4px 7px; border-radius: 10px; background: var(--paper); }
.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 18px; }
.document-canvas { --doc-accent: var(--coral); --doc-dark: #173b5d; --doc-wash: #fae3d7; min-height: 1100px; padding: clamp(30px, 5vw, 70px); background: #fffefb; box-shadow: 0 20px 70px rgba(31,47,42,.14); }
.document-canvas[data-layout="project"], .document-canvas[data-layout="training"] { --doc-accent: #1f5ba3; --doc-wash: #e6edf5; }
.document-canvas[data-layout="customer"] { --doc-accent: #f5a423; --doc-wash: #f8ead0; }
.document-canvas[data-layout="custom"] { --doc-accent: #173b5d; --doc-wash: #e3eaf1; }
.document-masthead { display: flex; justify-content: space-between; padding-bottom: 20px; border-bottom: 3px solid var(--ink); }
.document-masthead > div:last-child { text-align: right; }
.document-masthead span, .document-masthead strong, .document-masthead b { display: block; }
.document-masthead span { color: var(--muted); font-size: 13px; letter-spacing: .13em; }
.document-masthead strong { margin-top: 3px; font-family: var(--serif); font-size: 16px; }
.document-masthead b { margin-top: 3px; font-size: 14px; }
.document-title { margin-top: 24px; padding: 34px; border-left: 7px solid var(--doc-accent); background: linear-gradient(120deg, var(--doc-wash), #fffefb 70%); }
.document-title h2 { max-width: 700px; margin: 10px 0 18px; font-family: var(--serif); font-size: clamp(30px, 4.5vw, 54px); line-height: 1.2; letter-spacing: -.05em; }
[contenteditable="true"] { border-radius: 3px; }
[contenteditable="true"]:hover { background: #fff4c9; box-shadow: 0 0 0 4px #fff4c9; }
.document-title > div { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: 14px; }
.document-profile { display: grid; grid-template-columns: 150px 1fr; gap: 8px 24px; margin-top: 16px; padding: 18px 22px; color: white; background: var(--doc-dark); }
.document-profile span { grid-row: 1 / 3; color: rgba(255,255,255,.58); font-size: 13px; letter-spacing: .14em; }
.document-profile strong { font-family: var(--serif); font-size: 18px; }
.document-profile small { color: rgba(255,255,255,.7); font-size: 14px; }
.document-section { display: grid; grid-template-columns: 40px 1fr; gap: 22px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.doc-section-no { color: var(--doc-accent); font-family: ui-monospace, monospace; font-size: 14px; }
.document-section h3 { margin: 0 0 14px; font-family: var(--serif); font-size: 21px; }
.document-section p { margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.85; }
.evidence-link { margin-top: 13px; padding: 7px 10px; border: 0; border-radius: 6px; color: #2c6854; background: #e6f0ea; font-size: 13px; font-weight: 700; cursor: pointer; }
.decision-list { margin: 0; padding: 0; list-style: none; }
.decision-list li { display: grid; grid-template-columns: 24px 1fr auto; align-items: start; gap: 9px; padding: 12px 0; border-top: 1px solid var(--line); }
.decision-list li.classification-focus { animation: classification-focus 1.8s ease-out; background: color-mix(in srgb, var(--lime) 22%, transparent); border-radius: 10px; }
@keyframes classification-focus { 0%, 40% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--lime) 44%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.document-empty-decision { margin: 12px 0 0; padding: 14px 16px; border: 1px dashed #c9c1b4; border-radius: 10px; color: var(--muted); background: rgba(246,241,231,.58); font-size: 13px; line-height: 1.7; }
.decision-list li > span { color: var(--doc-accent); font-family: ui-monospace, monospace; font-size: 14px; }
.decision-list .evidence-link { margin-top: 0; }
.decision-list li > small { grid-column: 2 / -1; color: var(--muted); font-size: 14px; }
.action-table { border: 1px solid var(--line); }
.action-row { display: grid; grid-template-columns: 1.5fr .55fr .45fr .5fr; gap: 12px; padding: 12px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.55; }
.action-row:first-child { border-top: 0; }
.action-row.head { color: var(--muted); background: var(--paper-deep); font-weight: 700; }
.action-row b { color: var(--green); }
.action-row.warning b { color: var(--coral-dark); }
.action-copy { display: flex; align-items: flex-start; gap: 7px; }
.action-copy b { flex: 0 0 auto; padding: 3px 6px; border-radius: 4px; background: var(--doc-wash); font-size: 13px; }
.action-copy p { font-family: inherit; font-size: 14px; line-height: 1.55; }
.document-footer { display: flex; justify-content: space-between; padding-top: 22px; color: var(--muted); font-size: 13px; }
.evidence-panel { position: sticky; top: 20px; padding: 17px; }
.tab-row { display: grid; grid-template-columns: repeat(4, 1fr); padding: 3px; border-radius: 9px; background: var(--paper-deep); }
.tab-row button { padding: 8px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 13px; cursor: pointer; }
.tab-row button.active { color: var(--ink); background: white; box-shadow: 0 3px 8px rgba(21,51,45,.07); font-weight: 700; }
.review-tab { display: none; }
.review-tab.active { display: block; }
.evidence-score { display: flex; align-items: center; justify-content: space-between; margin: 14px 0; padding: 13px; border-radius: 11px; color: white; background: var(--ink); }
.evidence-score > div { display: flex; align-items: baseline; gap: 5px; }
.evidence-score span { font-family: var(--serif); font-size: 28px; }
.evidence-score small, .evidence-score p { color: rgba(255,255,255,.55); font-size: 12px; }
.evidence-score p { margin: 0; text-align: right; line-height: 1.6; }
.evidence-score p b { color: #ffd29d; }
.audio-mini { display: grid; grid-template-columns: 32px 1fr 74px; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.audio-mini > button { width: 30px; height: 30px; border: 0; border-radius: 50%; color: white; background: var(--coral); cursor: pointer; }
.audio-mini > div > span { display: block; margin-top: 2px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 12px; }
.mini-wave { display: flex; align-items: center; gap: 2px; height: 13px; }
.mini-wave i { flex: 1; height: 4px; border-radius: 2px; background: #9faf9f; }
.mini-wave i:nth-child(2n) { height: 10px; }
.mini-wave i:nth-child(3n) { height: 7px; }
.audio-mini select { padding: 5px; font-size: 12px; }
.quote-card { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; }
.quote-card.active { border-left: 3px solid var(--green); }
.quote-card.warning { border-left: 3px solid var(--ochre); background: #fffbef; }
.quote-card > div { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.quote-card > div b { color: var(--green); }
.quote-card.warning > div b { color: var(--ochre); }
.quote-card blockquote { margin: 9px 0; font-family: var(--serif); font-size: 13px; line-height: 1.75; }
.quote-card > small { color: var(--muted); font-size: 12px; }
.quote-actions { display: grid; grid-template-columns: 1.45fr 1fr .7fr; gap: 7px; margin-top: 11px; }
.quote-actions button { min-height: 38px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; font: 700 12px/1.35 var(--sans); cursor: pointer; }
.quote-actions button:first-child { border-color: var(--ink); color: white; background: var(--ink); }
.quote-actions button:last-child { color: var(--muted); }
.quote-actions button:disabled { cursor: wait; opacity: .65; }
.evidence-edit-form { display: grid; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.evidence-edit-form label { display: grid; gap: 5px; color: var(--ink); font-size: 12px; font-weight: 800; }
.evidence-edit-form textarea { min-height: 90px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fffefb; font: 14px/1.6 var(--sans); resize: vertical; }
.evidence-edit-form small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.evidence-edit-form > div { display: flex; gap: 7px; }
.evidence-edit-form .button { min-height: 38px; font-size: 12px; }
.transcript-search { position: relative; display: block; margin-top: 14px; }
.transcript-search input { padding: 9px 10px 9px 31px; font-size: 13px; }
.speaker-filter { display: flex; gap: 5px; margin: 10px 0; }
.speaker-filter button { padding: 5px 7px; border: 1px solid var(--line); border-radius: 20px; background: white; font-size: 12px; cursor: pointer; }
.speaker-filter button.active { color: white; background: var(--ink); }
.transcript-lines p { display: grid; grid-template-columns: 34px 1fr; gap: 8px; margin: 0; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.7; }
.transcript-lines time { color: var(--coral); font-family: ui-monospace, monospace; font-size: 12px; }
.transcript-lines b { display: block; font-size: 12px; }
.transcript-full { max-height: 620px; margin: 12px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; font-family: var(--sans); font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow: auto; }
.info-list { margin: 15px 0; }
.info-list div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 700; }
.transcript-note { display: grid; gap: 3px; margin-top: 14px; padding: 11px 12px; border-left: 3px solid var(--blue); border-radius: 0 9px 9px 0; background: #edf4f5; }
.transcript-note b { font-size: 13px; }
.transcript-note span { color: var(--muted); font-size: 12px; line-height: 1.6; }

/* AI guided review */
.assistant-loading, .assistant-empty { display: grid; place-items: center; min-height: 120px; padding: 24px; color: var(--muted); text-align: center; }
.assistant-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 14px 0 10px; padding: 20px; border-radius: 15px; color: white; background: linear-gradient(145deg, #15332d, #21483f); overflow: hidden; }
.assistant-hero span { color: var(--acid); font-size: 12px; font-weight: 900; letter-spacing: .14em; }
.assistant-hero h3 { margin: 7px 0 4px; font-family: var(--serif); font-size: 22px; }
.assistant-hero p { margin: 0; color: rgba(255,255,255,.66); font-size: 13px; line-height: 1.65; }
.assistant-hero > b { color: var(--acid); font-family: var(--serif); font-size: 31px; }
.assistant-block { margin-top: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.assistant-heading { display: flex; align-items: flex-start; gap: 10px; }
.assistant-heading > span { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; color: white; background: var(--coral); font-family: ui-monospace, monospace; font-size: 12px; }
.assistant-heading h4 { margin: 0; font-family: var(--serif); font-size: 17px; }
.assistant-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.classification-reasons { margin: 12px 0; padding: 10px 10px 10px 27px; border-radius: 9px; color: #52615c; background: var(--paper-deep); font-size: 12px; line-height: 1.65; }
.assistant-field { display: grid; gap: 6px; margin-top: 12px; }
/* 作者樣式的 display 會蓋掉瀏覽器預設的 [hidden]；不補這行，
   專案整理模式／教育訓練模式／自訂範本三個選單會在所有範本下都出現。 */
.assistant-field[hidden] { display: none; }
.assistant-field > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.assistant-field input, .assistant-field select, .assistant-field textarea, .assistant-form-row select { width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fffefb; font: 14px/1.5 var(--sans); }
.assistant-field textarea { min-height: 90px; resize: vertical; }
.assistant-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 7px; margin-top: 10px; }
.assistant-actions.single { grid-template-columns: 1fr; }
.assistant-actions .button { min-height: 43px; padding-inline: 8px; font-size: 12px; }
.assistant-hint { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.smart-question-list { display: grid; gap: 8px; margin-top: 13px; }
.smart-question { padding: 13px; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 10px; background: #fffefb; }
.smart-question.important { border-left-color: var(--coral); background: #fff8f4; }
.smart-question header { display: grid; grid-template-columns: 24px 1fr; gap: 8px; }
.smart-question header > span { color: var(--coral); font-family: ui-monospace, monospace; font-size: 12px; }
.smart-question h5 { margin: 0; font-size: 14px; }
.smart-question p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.smart-question > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.smart-question button, .quick-prompt-grid button, .suggested-actions button { min-height: 38px; padding: 7px 10px; border: 1px solid rgba(21,51,45,.17); border-radius: 9px; color: var(--ink); background: white; font-size: 12px; font-weight: 800; cursor: pointer; }
.smart-question button:first-child { border-color: var(--ink); color: white; background: var(--ink); }
.issue-ai-result:empty { display: none; }
.issue-ai-result .ai-progress, .issue-ai-result .ai-result { margin: 12px 0 0; }
.issue-ai-result .ai-result > span { letter-spacing: .04em; }
.assistant-empty { min-height: 78px; grid-auto-flow: column; gap: 8px; border: 1px dashed var(--line); border-radius: 10px; }
.assistant-empty b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: white; background: var(--green); }
.quick-prompt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 13px; }
.quick-prompt-grid button { min-height: 54px; text-align: left; line-height: 1.45; }
.quick-prompt-grid button:hover { border-color: var(--coral); color: var(--coral-dark); background: #fff8f4; }
.assistant-form-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 8px; }
.assistant-form-row .button { min-height: 43px; }
.ai-progress { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 13px; border-radius: 10px; color: white; background: var(--ink); }
.ai-progress i { flex: 0 0 auto; width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.25); border-top-color: var(--acid); border-radius: 50%; animation: spin .8s linear infinite; }
.ai-progress b, .ai-progress span { display: block; }
.ai-progress b { font-size: 13px; }
.ai-progress span { margin-top: 3px; color: rgba(255,255,255,.64); font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-result { margin-top: 12px; padding: 15px; border-radius: 11px; background: #edf4ef; }
.ai-result > span { color: var(--green); font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.ai-result h5 { margin: 6px 0; font-size: 16px; }
.ai-result p { margin: 7px 0; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.ai-result blockquote { margin: 8px 0 0; padding: 10px; border-left: 3px solid var(--green); background: white; font-family: var(--serif); font-size: 13px; line-height: 1.7; }
.ai-result blockquote small { display: block; margin-top: 5px; color: var(--muted); font-family: var(--sans); }
.ai-result.error { color: #7a2d24; background: #fff0eb; }
.ai-result.proposal > div, .suggested-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.ai-history { margin-top: 12px; border-top: 1px solid var(--line); }
.ai-history summary { padding: 12px 0 4px; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.ai-history > button { display: grid; width: 100%; margin-top: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.ai-history > button span { color: var(--coral-dark); font-size: 12px; font-weight: 900; }
.ai-history > button b { margin-top: 3px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-history > button small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.correction-pair { display: grid; grid-template-columns: 1fr 22px 1fr; align-items: end; gap: 7px; }
.correction-pair > span { padding-bottom: 12px; color: var(--coral); text-align: center; font-weight: 900; }
.term-library { margin-top: 12px; border-top: 1px solid var(--line); }
.term-library summary { padding: 12px 0 4px; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.term-library article { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.term-library b, .term-library span, .term-library small { display: block; }
.term-library b { font-size: 13px; }
.term-library span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.term-library small { margin-top: 2px; color: var(--green); font-size: 12px; }
.term-library button { padding: 5px 7px; border: 0; color: var(--coral-dark); background: transparent; font-size: 12px; cursor: pointer; }
.version-header { display: flex; align-items: center; gap: 10px; margin: 15px 0; }
.version-header button { padding: 6px 8px; border: 0; color: var(--coral-dark); background: transparent; cursor: pointer; }
.version-header b, .version-header span { display: block; }
.version-header span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.version-list { display: grid; gap: 8px; }
.version-list article { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.version-list b, .version-list span, .version-list small { display: block; }
.version-list span { margin-top: 2px; font-size: 12px; }
.version-list small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.version-list button { min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); cursor: pointer; }

/* Templates */
.template-intro { display: grid; grid-template-columns: 1.2fr 1fr auto; align-items: end; gap: 35px; padding: 40px 45px; border-radius: 24px; color: white; background: var(--ink); }
/* keep-all 讓中文詞不會被拆行（「會議」「一樣」曾被斷成兩行，句號還被擠到行首）；
   欄位窄時改用較小的字級而不是拆字。 */
.template-intro h2 { margin: 12px 0 0; font-family: var(--serif); font-size: clamp(30px, 3.4vw, 56px); line-height: 1.15; letter-spacing: -.05em; word-break: keep-all; text-wrap: balance; }
.template-intro p { margin: 0; color: rgba(255,255,255,.58); font-size: 14px; line-height: 1.8; }
.template-filter { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; }
.template-filter strong { font-family: var(--serif); font-size: 13px; }
.template-filter button { padding: 7px 11px; border: 1px solid var(--line-dark); border-radius: 20px; background: transparent; font-size: 12px; cursor: pointer; }
.template-filter button.active { color: white; background: var(--ink); }
.template-filter span { flex: 1; }
.template-filter input { width: min(240px, 42vw); min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; font-size: 13px; }
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.template-card { display: flex; flex-direction: column; min-height: 330px; padding: 23px; border: 1px solid rgba(21,51,45,.1); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow-soft); }
.template-card[data-template] { cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.template-card[data-template]:hover { transform: translateY(-3px); border-color: rgba(46,111,97,.34); box-shadow: 0 18px 36px rgba(21,51,45,.12); }
.template-card[data-template]:focus-visible { outline: 3px solid rgba(215,228,110,.9); outline-offset: 3px; }
.template-card.featured { color: white; background: var(--coral); }
.template-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; letter-spacing: .12em; }
.featured .template-top { color: rgba(255,255,255,.58); }
.template-top b { padding: 4px 7px; border-radius: 10px; color: var(--ink); background: var(--acid); letter-spacing: 0; }
.template-symbol { display: grid; place-items: center; width: 48px; height: 48px; margin-top: 32px; border-radius: 50%; color: white; background: var(--green); font-family: var(--serif); font-size: 17px; font-weight: 900; }
.featured .template-symbol { color: var(--coral); background: white; }
.template-symbol.blue { background: var(--blue); }
.template-symbol.ochre { background: var(--ochre); }
.template-symbol.green { background: var(--green); }
.template-symbol.coral { background: var(--coral); }
.template-card h3 { margin: 15px 0 7px; font-family: var(--serif); font-size: 20px; }
.template-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.featured p { color: rgba(255,255,255,.7); }
.template-sections { display: flex; flex-wrap: wrap; gap: 5px; margin: 14px 0; }
.template-sections span { padding: 5px 7px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 12px; }
.featured .template-sections span { color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.3); }
.template-card footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.featured footer { border-color: rgba(255,255,255,.24); }
.template-card footer small { color: var(--muted); font-size: 12px; }
.featured footer small { color: rgba(255,255,255,.62); }
.template-card footer button { border: 0; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.template-card.custom-template-card { position: relative; background: linear-gradient(145deg, var(--paper) 0 72%, #e8f0ec 100%); }
.template-card.custom-template-card .template-symbol { background: var(--ink); }
.template-card.custom-template-card footer { gap: 8px; }
.template-card.custom-template-card footer > div { display: flex; align-items: center; gap: 5px; }
.template-card.custom-template-card footer button { min-height: 36px; padding: 6px 8px; border-radius: 8px; }
.template-card.custom-template-card footer button:hover { background: rgba(21,51,45,.08); }
.template-card.custom-template-card[hidden] { display: none; }
.add-template { align-items: center; justify-content: center; min-height: 330px; border-style: dashed; color: var(--muted); background: rgba(255,253,247,.42); cursor: pointer; }
.add-template > span { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px; border: 1px solid var(--line-dark); border-radius: 50%; font-size: 22px; }
.add-template strong { color: var(--ink); }
.add-template small { margin-top: 6px; }

/* Admin */
.admin-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: start; gap: 16px; }
#view-admin [hidden] { display: none !important; }
#view-admin.department-manager .admin-layout { grid-template-columns: 1fr; }
#view-admin.department-manager .access-admin-grid { grid-template-columns: 1fr; }
.settings-nav { position: sticky; top: 20px; display: grid; padding: 15px; }
.settings-nav strong { padding: 8px 10px 14px; font-family: var(--serif); font-size: 13px; }
.settings-nav button { padding: 10px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 13px; text-align: left; cursor: pointer; }
.settings-nav button.active { color: white; background: var(--ink); font-weight: 700; }
.settings-content { display: grid; gap: 13px; }
.settings-card { padding: 25px; }
.save-state { color: var(--green); font-size: 12px; }
.retention-grid { display: grid; gap: 8px; margin-top: 18px; }
.retention-grid > label { display: grid; grid-template-columns: 38px 1fr 170px; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; }
.retention-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; color: white; background: var(--coral); font-family: var(--serif); font-size: 14px; }
.retention-icon.transcript { background: var(--blue); }
.retention-icon.notebook { background: var(--ink-2); }
.retention-icon.record { background: var(--green); }
.retention-grid strong, .retention-grid small { display: block; }
.retention-grid strong { font-size: 13px; }
.retention-grid small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.retention-grid select { padding: 8px; font-size: 12px; }
.stepper { display: grid; grid-template-columns: 28px 45px 28px 1fr; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper button { height: 30px; border: 0; background: var(--paper-deep); cursor: pointer; }
.stepper input { height: 30px; border: 0; border-radius: 0; text-align: center; }
.stepper b { color: var(--muted); font-size: 12px; text-align: center; }
.integration-list { margin-top: 18px; }
.integration-list > div { display: grid; grid-template-columns: 38px 1fr auto 48px; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.integration-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: white; background: var(--ink); font-weight: 800; }
.integration-logo.google { background: var(--blue); }
.integration-logo.mail { background: var(--coral); }
.integration-list strong, .integration-list small { display: block; }
.integration-list strong { font-size: 13px; }
.integration-list small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.integration-list > div > button { border: 0; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.connection-state { padding: 5px 7px; border-radius: 10px; color: var(--green); background: #e4f0e9; font-size: 12px; font-style: normal; }
.connection-state.waiting { color: #9b6a1f; background: #f6ead4; }
.security-card, .security-card > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.security-mark { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #805b18; background: #f4dfaf; font-weight: 900; }
.security-card strong, .security-card small { display: block; }
.security-card strong { font-size: 13px; }
.security-card small { max-width: 650px; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.settings-actions { display: flex; justify-content: space-between; align-items: center; padding: 5px; }
.settings-actions span { color: var(--muted); font-size: 12px; }
.department-switcher { display: grid; gap: 6px; margin: 18px 0 4px; padding: 13px; border: 1px solid rgba(255,255,255,.13); border-radius: 13px; background: rgba(255,255,255,.045); }
.department-switcher[hidden] { display: none; }
.department-switcher span { color: rgba(255,255,255,.48); font-size: 12px; letter-spacing: .12em; }
.department-switcher select { width: 100%; padding: 8px 28px 8px 9px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: white; background: #153c34; font-size: 13px; }
.profile-row > div:nth-child(2) { min-width: 0; }
.profile-row strong, .profile-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-management .section-head { align-items: flex-start; }
.access-admin-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 12px; margin-top: 20px; }
.access-admin-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-deep); }
.access-admin-form > strong { grid-column: 1 / -1; font-size: 13px; }
.access-admin-form label:not(.admin-check) { display: grid; gap: 5px; }
.access-admin-form label > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.access-admin-form input, .access-admin-form select { min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; font-size: 13px; }
.access-admin-form .button { justify-self: start; }
#department-form .button { grid-column: 1 / -1; white-space: nowrap; }
.admin-check { display: flex; grid-column: 1 / -1; align-items: center; gap: 8px; }
.admin-check input { width: 15px; height: 15px; }
.access-user-list { display: grid; gap: 7px; margin-top: 14px; }
.access-user-list > p { color: var(--muted); font-size: 13px; }
.access-user-row { display: grid; grid-template-columns: 1.2fr 1fr auto auto; align-items: center; gap: 12px; padding: 11px 12px; border-top: 1px solid var(--line); }
.access-user-row strong, .access-user-row small { display: block; }
.access-user-row strong { font-size: 13px; }
.access-user-row small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.access-user-row > span { color: var(--muted); font-size: 12px; }
.role-chip { padding: 5px 7px; border-radius: 12px; color: var(--green); background: #e3efe9; font-size: 12px; font-style: normal; }
.access-user-row button { border: 0; color: var(--coral-dark); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.log-live-state { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 12px; font-weight: 700; }
.log-live-state i { width: 7px; height: 7px; border-radius: 50%; background: #67c996; box-shadow: 0 0 0 5px rgba(103,201,150,.14); }
.log-toolbar { display: grid; grid-template-columns: 150px minmax(220px, 1fr) auto; align-items: end; gap: 10px; margin: 18px 0 10px; }
.log-toolbar label { display: grid; gap: 5px; }
.log-toolbar label > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.log-toolbar input, .log-toolbar select { min-width: 0; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; font-size: 13px; }
.system-log-output { min-height: 300px; max-height: 480px; margin: 0; padding: 18px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; color: #dcebe4; background: #102c27; overflow: auto; white-space: pre-wrap; word-break: break-word; font: 12px/1.75 Consolas, "Microsoft JhengHei", monospace; tab-size: 2; }
.system-log-output:focus { outline: 2px solid var(--acid); outline-offset: 2px; }
.log-meta { margin-top: 9px; color: var(--muted); font-size: 12px; text-align: right; }
.backup-overview { display: grid; grid-template-columns: minmax(220px, 1fr) 220px auto; align-items: end; gap: 12px; margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-deep); }
.backup-overview > div small, .backup-overview > div strong, .backup-overview > div span { display: block; }
.backup-overview > div small, .backup-overview label > span { margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.backup-overview > div strong { font-family: var(--serif); font-size: 14px; }
.backup-overview > div span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.backup-overview label { display: grid; }
.backup-note { display: flex; gap: 10px; margin: 11px 0; padding: 10px 12px; border-left: 3px solid var(--blue); color: var(--muted); background: #edf3f7; font-size: 12px; line-height: 1.5; }
.backup-note strong { color: var(--ink); white-space: nowrap; }
.backup-list { display: grid; }
.backup-list > p { padding: 16px 0; color: var(--muted); font-size: 13px; }
.backup-row { display: grid; grid-template-columns: minmax(210px, 1fr) 100px 90px auto; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); }
.backup-row > span strong, .backup-row > span small { display: block; }
.backup-row > span strong { font-size: 13px; }
.backup-row > span small, .backup-row > i { margin-top: 3px; color: var(--muted); font-size: 12px; font-style: normal; }
.backup-kind { justify-self: start; padding: 5px 7px; border-radius: 12px; color: var(--green); background: #e3efe9; font-size: 12px; font-style: normal; }
.backup-kind.manual { color: #1f5ba3; background: #e5eef8; }
.backup-kind.pre_restore { color: #9b6a1f; background: #f6ead4; }
.backup-actions { display: flex; justify-content: flex-end; gap: 6px; }
.backup-actions button { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; font-size: 12px; font-weight: 700; cursor: pointer; }
.backup-actions button[data-restore-backup] { color: var(--coral-dark); }

/* Modals and toast */
.access-gate { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 25% 15%, rgba(215,228,110,.14), transparent 25%), linear-gradient(145deg, #173d35, #0c2521); visibility: hidden; opacity: 0; pointer-events: none; transition: .25s; }
.access-gate.open { visibility: visible; opacity: 1; pointer-events: auto; }
.access-card { width: min(520px, 100%); padding: clamp(30px, 6vw, 54px); border-radius: 26px; background: var(--paper); box-shadow: 0 40px 100px rgba(0,0,0,.34); }
.access-mark { width: 48px; height: 48px; margin-bottom: 24px; padding: 11px; }
.access-card h1 { margin: 8px 0 12px; font-size: clamp(27px, 5vw, 39px); letter-spacing: -.04em; }
.access-card > p { margin: 0 0 28px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.access-card form > label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.access-input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.access-input-row input { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: white; }
.access-card > small { display: block; min-height: 18px; margin-top: 10px; color: var(--coral-dark); font-size: 13px; }
.google-login-panel { display: grid; justify-items: center; gap: 12px; min-height: 74px; }
.google-login-panel[hidden] { display: none; }
.google-login-panel small { color: var(--muted); font-size: 12px; }
.access-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; color: var(--muted); font-size: 12px; }
.access-divider[hidden] { display: none; }
.access-divider::before, .access-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.processing-modal, .pdf-modal, .retry-modal, .delete-modal, .restore-modal, .custom-template-modal, .template-preview-modal { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(10,31,27,.72); backdrop-filter: blur(12px); visibility: hidden; opacity: 0; pointer-events: none; transition: .25s; }
.processing-modal.open, .pdf-modal.open, .retry-modal.open, .delete-modal.open, .restore-modal.open, .custom-template-modal.open, .template-preview-modal.open { visibility: visible; opacity: 1; pointer-events: auto; }
.template-preview-dialog { position: relative; display: grid; grid-template-columns: minmax(270px,.72fr) minmax(420px,1.28fr); gap: 28px; width: min(1040px,100%); max-height: 92vh; padding: 30px; border-radius: 24px; background: var(--paper); box-shadow: 0 40px 100px rgba(0,0,0,.32); overflow-y: auto; transform: translateY(12px) scale(.98); transition: .25s; }
.template-preview-modal.open .template-preview-dialog { transform: none; }
.template-preview-copy { display: flex; flex-direction: column; min-width: 0; padding: 12px 4px; }
.template-preview-copy h2 { margin: 10px 0 14px; font-family: var(--serif); font-size: clamp(27px,4vw,40px); line-height: 1.18; }
.template-preview-copy > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.template-preview-modes { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.template-preview-modes button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); background: white; font-size: 12px; cursor: pointer; }
.template-preview-modes button.active { color: white; border-color: var(--green); background: var(--green); }
.template-preview-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 30px; }
.template-paper { min-height: 570px; padding: clamp(24px,4vw,48px); border: 1px solid #ded7ca; border-radius: 4px; background: #fffdf8; box-shadow: 0 18px 45px rgba(38,48,43,.14); }
.template-paper header { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 2px solid var(--green); color: var(--muted); font-size: 11px; letter-spacing: .14em; }
.template-paper h3 { margin: 30px 0 7px; font-family: var(--serif); font-size: clamp(26px,4vw,43px); color: var(--ink); }
.template-paper > p { margin: 0 0 32px; color: var(--muted); font-size: 12px; }
.template-preview-section { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.template-preview-section > span { color: var(--coral-dark); font-family: var(--serif); font-size: 13px; }
.template-preview-section h4 { margin: 0 0 7px; color: var(--ink); font-family: var(--serif); font-size: 16px; }
.template-preview-section p { margin: 0; color: #52635d; font-size: 13px; line-height: 1.65; }
.custom-template-dialog { position: relative; width: min(740px, 100%); max-height: min(90vh, 860px); padding: 34px; border-radius: 24px; background: var(--paper); box-shadow: 0 40px 100px rgba(0,0,0,.32); overflow-y: auto; transform: translateY(12px) scale(.98); transition: .25s; }
.custom-template-modal.open .custom-template-dialog { transform: none; }
.custom-template-dialog h2 { margin: 8px 0 9px; font-family: var(--serif); font-size: clamp(26px, 4vw, 34px); }
.custom-template-dialog > p { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.custom-template-fields { display: grid; grid-template-columns: 1fr 1.25fr; gap: 12px; }
.custom-template-dialog .field { display: grid; gap: 6px; }
.custom-template-dialog .field > span, .custom-template-modules legend { color: var(--ink); font-size: 13px; font-weight: 800; }
.custom-template-dialog input, .custom-template-dialog textarea { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; font: 13px/1.6 var(--sans); resize: vertical; }
.custom-template-dialog input:focus, .custom-template-dialog textarea:focus { outline: 2px solid rgba(46,111,97,.24); border-color: var(--green); }
.custom-template-modules { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 13px; }
.custom-template-modules legend { padding: 0 6px; }
.custom-template-modules > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.custom-template-module { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: white; font-size: 12px; cursor: pointer; }
.custom-template-module:has(input:checked) { color: var(--ink); border-color: rgba(46,111,97,.4); background: #edf4f0; font-weight: 700; }
.custom-template-module input { width: 16px; height: 16px; padding: 0; accent-color: var(--green); }
.custom-template-actions { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; margin-top: 22px; }
.text-button.danger { color: var(--coral-dark); }
.processing-card { position: relative; width: min(520px, 100%); padding: 38px; border-radius: 24px; background: var(--paper); box-shadow: 0 40px 100px rgba(0,0,0,.3); text-align: center; transform: translateY(12px) scale(.98); transition: .25s; }
.processing-modal.open .processing-card { transform: none; }
.retry-card { position: relative; width: min(560px, 100%); padding: 40px; border-radius: 24px; background: var(--paper); box-shadow: 0 40px 100px rgba(0,0,0,.3); transform: translateY(12px) scale(.98); transition: .25s; }
.retry-modal.open .retry-card { transform: none; }
.delete-card { position: relative; width: min(500px, 100%); padding: 40px; border-radius: 24px; background: var(--paper); box-shadow: 0 40px 100px rgba(0,0,0,.3); transform: translateY(12px) scale(.98); transition: .25s; }
.delete-modal.open .delete-card { transform: none; }
.restore-card { position: relative; width: min(520px, 100%); padding: 40px; border-radius: 24px; background: var(--paper); box-shadow: 0 40px 100px rgba(0,0,0,.3); transform: translateY(12px) scale(.98); transition: .25s; }
.restore-modal.open .restore-card { transform: none; }
.restore-card h2 { margin: 9px 0 14px; font-family: var(--serif); font-size: 28px; }
.restore-card > strong { display: block; padding: 12px 14px; border-left: 3px solid var(--coral); color: var(--ink); background: #f6f1e7; font-size: 13px; overflow-wrap: anywhere; }
.restore-card > p { margin: 16px 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.restore-mark { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 16px; border-radius: 50%; color: white; background: var(--coral-dark); font-family: var(--serif); font-size: 15px; }
.restore-confirm { display: grid; gap: 6px; }
.restore-confirm span { color: var(--muted); font-size: 12px; }
.restore-confirm input { padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; font-size: 13px; letter-spacing: .08em; }
.restore-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.delete-mark { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 22px; border-radius: 50%; color: white; background: var(--coral-dark); font-size: 14px; font-weight: 900; }
.delete-card h2 { margin: 9px 0 14px; font-family: var(--serif); font-size: 28px; }
.delete-card > strong { display: block; padding: 12px 14px; border-left: 3px solid var(--coral); color: var(--ink); background: #f6f1e7; font-family: var(--serif); font-size: 13px; }
.delete-card > p { margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.delete-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.button.danger-solid { color: white; border-color: var(--coral-dark); background: var(--coral-dark); }
.button.danger-solid:hover { background: #8d3225; }
.retry-mark { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 22px; border-radius: 50%; color: var(--coral-dark); background: #f9ddd2; font-size: 24px; font-weight: 900; }
.retry-card h2 { margin: 9px 0; font-family: var(--serif); font-size: 28px; }
.retry-card > p { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.retry-card pre { max-height: 150px; margin: 0; padding: 14px; border: 1px solid #ead3ca; border-radius: 12px; color: #8b3f30; background: #fff8f5; white-space: pre-wrap; overflow: auto; font: 13px/1.6 var(--sans); }
.retry-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.modal-close { position: absolute; right: 16px; top: 14px; border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.processing-visual { position: relative; width: 160px; height: 160px; margin: 0 auto 22px; }
.record-disc { position: absolute; inset: 10px; border-radius: 50%; background: repeating-radial-gradient(circle, #142f2a 0 4px, #264a42 5px 8px); box-shadow: 0 0 0 10px #e9dfce, 0 0 0 11px #cbbda8; animation: spin 3s linear infinite; }
.record-disc span { position: absolute; inset: 54px; border: 9px solid var(--coral); border-radius: 50%; background: var(--paper); }
.scan-line { position: absolute; z-index: 2; top: 22px; right: 6px; width: 78px; height: 4px; border-radius: 5px; background: var(--acid); box-shadow: 0 0 15px var(--acid); transform: rotate(25deg); transform-origin: right; animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { to { transform: rotate(42deg); } }
.processing-card h2 { margin: 8px 0; font-family: var(--serif); font-size: 26px; }
.processing-card > p { color: var(--muted); font-size: 13px; }
.progress-track { height: 6px; margin: 24px 0 18px; border-radius: 9px; background: #e4ded2; overflow: hidden; }
.progress-track span { display: block; width: 10%; height: 100%; border-radius: inherit; background: var(--coral); transition: width .7s ease; }
.processing-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.processing-steps div { color: #aaa89f; font-size: 12px; }
.processing-steps i { display: grid; place-items: center; width: 22px; height: 22px; margin: 0 auto 6px; border: 1px solid #c9c4b9; border-radius: 50%; font-style: normal; }
.processing-steps .active { color: var(--ink); font-weight: 700; }
.processing-steps .active i { color: white; border-color: var(--coral); background: var(--coral); }
.processing-card > small { display: block; margin-top: 22px; color: var(--muted); font-size: 12px; }
.pdf-preview { width: min(820px, 100%); height: min(92vh, 900px); border-radius: 18px; background: #c9c7c1; overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,.3); }
.pdf-preview > header { display: flex; justify-content: space-between; align-items: center; height: 54px; padding: 0 18px; color: white; background: var(--ink); font-size: 13px; font-weight: 700; }
.pdf-preview > header button { padding: 7px 10px; border: 0; border-radius: 7px; background: var(--acid); font-size: 12px; font-weight: 700; cursor: pointer; }
.pdf-preview > header button:last-child { margin-left: 7px; color: white; background: transparent; font-size: 18px; }
.pdf-sheet { position: relative; width: min(600px, calc(100% - 30px)); min-height: 760px; margin: 20px auto; padding: 60px; background: white; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.pdf-brand { font-family: var(--serif); font-size: 16px; font-weight: 900; }
.pdf-brand small { margin-left: 6px; font-family: var(--sans); font-size: 12px; letter-spacing: .18em; }
.pdf-confidential { position: absolute; right: 60px; top: 60px; color: var(--coral); font-size: 12px; letter-spacing: .1em; }
.pdf-sheet h2 { margin: 80px 0 14px; font-family: var(--serif); font-size: 35px; line-height: 1.3; }
.pdf-meta { color: var(--muted); font-size: 12px; }
.pdf-sheet hr { margin: 35px 0; border: 0; border-top: 3px solid var(--ink); }
.pdf-sheet h3 { margin-top: 26px; font-family: var(--serif); font-size: 14px; }
.pdf-sheet p, .pdf-sheet li { font-family: var(--serif); font-size: 13px; line-height: 2; }
.pdf-sheet footer { position: absolute; right: 60px; bottom: 40px; left: 60px; display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.toast { position: fixed; z-index: 120; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 10px; max-width: 360px; padding: 13px 16px; border-radius: 12px; color: white; background: var(--ink); box-shadow: 0 14px 35px rgba(0,0,0,.22); opacity: 0; pointer-events: none; transform: translateY(15px); transition: .25s; }
.toast.show { opacity: 1; transform: none; }
.toast span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--ink); background: var(--acid); font-size: 13px; }
.toast p { margin: 0; font-size: 13px; }
.button:disabled { opacity: .55; cursor: wait; transform: none; }

@media (max-width: 1180px) {
  .sidebar { width: 214px; padding-inline: 16px; }
  .workspace { margin-left: 214px; padding-inline: 24px; }
  .composer-layout { grid-template-columns: 1fr; }
  .launch-panel { position: static; }
  .launch-sticky { display: grid; grid-template-columns: 230px 1fr; gap: 0 22px; }
  .launch-sticky > .kicker, .launch-sticky > h2 { grid-column: 1 / -1; }
  .package-cover { grid-row: 3 / span 5; }
  .meeting-types { grid-template-columns: repeat(4, 1fr); }
  .review-layout { grid-template-columns: 1fr; }
  .evidence-panel { position: static; }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .access-input-row { grid-template-columns: 1fr; }
  .access-input-row .button { min-height: 44px; }
}

@media (max-width: 860px) {
  .prototype-ribbon { display: none; }
  .sidebar { transform: translateX(-100%); width: min(280px, 84vw); transition: .25s; }
  .sidebar.open { transform: none; box-shadow: 30px 0 60px rgba(0,0,0,.25); }
  .mobile-bar { position: sticky; z-index: 15; top: 0; display: flex; align-items: center; justify-content: space-between; height: 58px; padding: 0 15px; color: white; background: var(--ink); }
  .mobile-bar > button { width: 34px; height: 34px; border: 0; color: white; background: transparent; font-size: 17px; }
  .brand.compact { margin: 0; }
  .brand.compact .brand-mark { width: 26px; height: 26px; padding: 6px; }
  .brand.compact strong { font-size: 14px; }
  .prototype-chip { padding: 4px 6px; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; color: var(--acid); font-size: 12px; }
  .workspace { margin-left: 0; padding: 22px 14px 60px; }
  .topbar { align-items: flex-start; }
  .top-actions .icon-button, .top-actions .secondary { display: none; }
  .topbar h1 { font-size: 28px; }
  .topbar p { line-height: 1.6; }
  .overview-hero { min-height: auto; padding: 35px 28px; }
  .hero-orbit { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .step > span { display: none; }
  .step-line { margin-inline: 8px; }
  .field-grid.three { grid-template-columns: 1fr 1fr; }
  .field-grid.three .wide { grid-column: 1 / -1; }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .format-grid { grid-template-columns: repeat(2, 1fr); }
  .library-toolbar { grid-template-columns: 1fr 1fr; }
  .search-box { grid-column: 1 / -1; }
  .table-head { display: none; }
  .table-row { grid-template-columns: 1fr auto auto; gap: 8px; }
  .table-row > span:nth-child(2), .table-row > span:nth-child(3), .table-row > span:nth-child(4) { display: none; }
  .review-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .review-status { order: 3; width: 100%; }
  .review-layout .evidence-panel { order: -1; }
  .evidence-panel { padding: 13px; border-radius: 16px; }
  .tab-row { position: sticky; z-index: 8; top: 66px; box-shadow: 0 7px 18px rgba(21,51,45,.08); }
  .tab-row button { min-height: 42px; }
  .template-intro { grid-template-columns: 1fr; align-items: start; padding: 30px; }
  .template-intro .button { justify-self: start; }
  .admin-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; }
  .settings-nav strong { display: none; }
  .settings-nav button { flex: 0 0 auto; }
  .access-admin-grid { grid-template-columns: 1fr; }
  .log-toolbar { grid-template-columns: 1fr; }
  .library-toolbar { grid-template-columns: 1fr 1fr; }
  .search-box { grid-column: 1 / -1; }
  .library-filterbar { align-items: stretch; flex-direction: column; }
  .library-filterbar > div { display: grid; grid-template-columns: 1fr 1fr; }
  .library-filterbar > div > span { grid-column: 1 / -1; }
  .template-preview-dialog { grid-template-columns: 1fr; }
  .template-preview-copy { min-height: 250px; }
  .search-match-list { grid-template-columns: 1fr; margin-left: 0; }
}

@media (max-width: 580px) {
  .topbar { margin-bottom: 20px; }
  .top-actions .primary { padding: 9px 11px; font-size: 13px; }
  .overview-hero h2 { font-size: 38px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 125px; }
  .form-section { padding: 19px; border-radius: 16px; }
  .section-head.numbered { flex-wrap: wrap; }
  .section-head.numbered > .text-button, .section-head.numbered > .ai-chip { margin-left: 48px; }
  .dropzone { grid-template-columns: 58px 1fr; padding: 15px; }
  .drop-illustration { height: 58px; }
  .drop-action { display: none; }
  .sequence-head small { display: none; }
  .file-card { grid-template-columns: 18px 30px 1fr auto; }
  .file-time { display: none; }
  .file-actions button { width: 23px; }
  .attachment-card { grid-template-columns: 38px minmax(0,1fr) 26px; }
  .attachment-order { display: none; }
  .inline-fields { grid-template-columns: 1fr; }
  .field-grid.three, .field-grid.two { grid-template-columns: 1fr; }
  .field-grid.three .wide { grid-column: auto; }
  .meeting-types { grid-template-columns: repeat(2, 1fr); }
  .project-mode-panel, .custom-template-picker { grid-template-columns: 1fr; }
  .access-admin-form { grid-template-columns: 1fr; }
  .access-admin-form > strong, .admin-check { grid-column: auto; }
  .access-user-row { grid-template-columns: 1fr auto; }
  .access-user-row > span { grid-column: 1 / -1; }
  .module-grid, .format-grid { grid-template-columns: 1fr; }
  .launch-sticky { display: block; }
  .package-cover { min-height: 230px; }
  .library-toolbar { grid-template-columns: 1fr; }
  .search-box { grid-column: auto; }
  .library-summary { flex-wrap: wrap; gap: 10px 18px; }
  .review-toolbar > div:last-child { width: 100%; }
  .review-toolbar > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
  .review-toolbar .button { min-height: 44px; padding-inline: 8px; font-size: 13px; }
  .review-toolbar .smart-review-button, .review-toolbar .primary { grid-column: 1 / -1; }
  .document-canvas { min-height: 0; padding: 28px 18px; }
  .document-title { padding: 24px 18px; }
  .document-title h2 { font-size: 31px; }
  .document-section { grid-template-columns: 26px 1fr; gap: 8px; }
  .decision-list li { grid-template-columns: 20px 1fr; }
  .decision-list .evidence-link { grid-column: 2; justify-self: start; }
  .action-row { grid-template-columns: 1fr .6fr; }
  .action-row > span:nth-child(3), .action-row > b { display: none; }
  .assistant-hero { align-items: flex-start; padding: 17px; }
  .assistant-hero > b { font-size: 25px; }
  .assistant-block { padding: 14px; }
  .assistant-actions, .quick-prompt-grid { grid-template-columns: 1fr; }
  .assistant-actions .button, .quick-prompt-grid button { min-height: 48px; }
  .smart-question button { flex: 1 1 120px; min-height: 44px; }
  .quote-actions { grid-template-columns: 1fr; }
  .quote-actions button { min-height: 44px; }
  .assistant-form-row { grid-template-columns: 1fr; }
  .assistant-form-row .button { min-height: 48px; }
  .correction-pair { grid-template-columns: 1fr; }
  .correction-pair > span { padding: 0; transform: rotate(90deg); }
  .template-grid { grid-template-columns: 1fr; }
  .template-filter { align-items: stretch; flex-wrap: wrap; }
  .template-filter span { display: none; }
  .template-filter label { width: 100%; }
  .template-filter input { width: 100%; }
  .template-filter button { flex: 0 0 auto; }
  .custom-template-dialog { max-height: 94vh; padding: 26px 18px 18px; border-radius: 18px; }
  .custom-template-fields { grid-template-columns: 1fr; }
  .custom-template-modules { padding: 12px; }
  .custom-template-modules > div { grid-template-columns: 1fr 1fr; }
  .custom-template-actions { grid-template-columns: 1fr 1fr; }
  .custom-template-actions > span { display: none; }
  .custom-template-actions .danger { grid-column: 1 / -1; justify-self: start; min-height: 40px; }
  .custom-template-actions .button { min-height: 46px; }
  .template-preview-modal { align-items: end; padding: 0; }
  .template-preview-dialog { width: 100%; max-height: 96vh; gap: 18px; padding: 26px 18px 18px; border-radius: 22px 22px 0 0; }
  .template-preview-copy { min-height: 0; }
  .template-preview-actions { position: sticky; z-index: 2; bottom: 0; margin-top: 18px; padding: 12px 0 0; background: linear-gradient(transparent, var(--paper) 20%); }
  .template-preview-actions .button { min-height: 46px; padding-inline: 8px; }
  .template-paper { min-height: 0; padding: 25px 18px; }
  .retention-grid > label { grid-template-columns: 36px 1fr; }
  .retention-grid .stepper, .retention-grid select { grid-column: 1 / -1; }
  .backup-overview { grid-template-columns: 1fr; align-items: stretch; }
  .backup-row { grid-template-columns: 1fr auto; }
  .backup-row > i { grid-column: 1; }
  .backup-actions { grid-column: 1 / -1; justify-content: stretch; }
  .backup-actions button { flex: 1; }
  .integration-list > div { grid-template-columns: 35px 1fr auto; }
  .integration-list > div > button { display: none; }
  .security-card { align-items: flex-start; flex-direction: column; }
  .settings-actions { align-items: stretch; flex-direction: column; gap: 10px; }
  .processing-card { padding: 30px 18px; }
  .processing-visual { width: 120px; height: 120px; }
  .record-disc span { inset: 40px; }
  .pdf-sheet { min-height: 680px; padding: 40px 28px; }
  .pdf-confidential { right: 28px; top: 42px; }
  .pdf-sheet footer { right: 28px; bottom: 30px; left: 28px; }
}

/* 列印：印出畫面上真正的會議紀錄，不是介面。
   （原本這裡指向一個原型時期的假 PDF 視窗，該視窗已無任何開啟入口，
   且 visibility 未被覆蓋，導致按 Ctrl+P 只會印出白紙。） */
@media print {
  .sidebar, .mobile-bar, .topbar, .step-rail, .review-toolbar, .review-side,
  .toast-stack, .access-gate, .processing-modal, .retry-modal, .delete-modal,
  .restore-modal, .custom-template-modal, .template-preview-modal,
  .document-canvas .doc-edit-hint { display: none !important; }
  body { background: white; }
  .app-shell { display: block; }
  .workspace { padding: 0; }
  .view:not(.active) { display: none !important; }
  .review-layout { display: block; }
  .document-canvas { box-shadow: none; border: 0; margin: 0; padding: 0; border-radius: 0; }
  .document-section { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 審核文件章節導覽（批次 8） */
.document-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; padding: 12px 14px; border: 1px solid var(--line, #ded8cc); border-radius: 14px; background: rgba(23, 60, 53, .04); }
.document-toc button { border: 0; background: transparent; padding: 6px 10px; border-radius: 999px; font-size: 12.5px; color: var(--ink, #173c35); cursor: pointer; transition: background .15s ease; }
.document-toc button:hover, .document-toc button:focus-visible { background: rgba(23, 60, 53, .12); outline: none; }

/* Toast 佇列疊層與可關閉錯誤（批次 9） */
.toast-stack { position: fixed; z-index: 120; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast-stack .toast { position: static; opacity: 0; transform: translateY(15px); pointer-events: auto; }
.toast-stack .toast.show { opacity: 1; transform: none; }
.toast.error span { background: #f2b8ab; }
.toast-close { border: 0; margin-left: 4px; padding: 0 2px; border-radius: 6px; color: rgba(255,255,255,.75); background: transparent; font-size: 15px; line-height: 1; cursor: pointer; }
.toast-close:hover, .toast-close:focus-visible { color: white; outline: none; }
.table-sort { display: inline-flex; align-items: center; gap: 4px; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.table-sort:hover, .table-sort:focus-visible { color: var(--ink); outline: none; }

/* 版本差異檢視（批次 8 遞延項） */
.version-actions { display: flex; gap: 6px; align-items: center; }
.version-diff { flex-basis: 100%; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line, #ded8cc); border-radius: 10px; background: rgba(23,60,53,.03); font-size: 12.5px; }
.version-diff section { margin-bottom: 8px; }
.version-diff section:last-child { margin-bottom: 0; }
.version-diff b { display: block; margin-bottom: 4px; }
.version-diff p { margin: 3px 0; padding: 5px 8px; border-radius: 7px; line-height: 1.5; }
.diff-removed { background: rgba(178, 58, 43, .1); color: #7c2d21; }
.diff-added { background: rgba(52, 120, 74, .12); color: #1f5c38; }
.diff-none { color: var(--muted); }

/* 證據三段式與最接近原文對照（審核流程強化） */
.quote-card.borderline { border-color: #d9a441; }
.quote-card.borderline > div b { color: #8a6114; }
.closest-span { margin: 8px 0 2px; padding: 8px 10px; border-left: 3px solid var(--line, #ded8cc); border-radius: 0 8px 8px 0; background: rgba(23,60,53,.04); }
.closest-span span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.closest-span p { margin: 0; font-size: 12.5px; line-height: 1.6; }
#confirm-dialog-message { white-space: pre-line; text-align: left; }
.assistant-hero.all-clear b { background: rgba(52, 120, 74, .16); color: #1f5c38; }

/* 證據頁便利性：過濾器、鍵盤導覽、滑動手勢、雙向跳轉 */
.evidence-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 10px; }
.evidence-filter { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line, #ded8cc); border-radius: 999px; background: var(--paper-deep, #f4efe4); }
.evidence-filter button { border: 0; padding: 5px 12px; border-radius: 999px; background: transparent; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.evidence-filter button.active { background: var(--ink, #173c35); color: white; }
.evidence-filter button:disabled { opacity: .45; cursor: default; }
.evidence-hotkeys { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
@media (max-width: 860px) { .evidence-hotkeys { display: none; } }
.quote-card { touch-action: pan-y; transition: transform .15s ease, box-shadow .15s ease; }
.quote-card.keyboard-active { outline: 2px solid var(--acid, #d7e46e); outline-offset: 2px; }
.quote-card.swiping-confirm { box-shadow: inset 5px 0 0 #34784a; }
.quote-card.swiping-ignore { box-shadow: inset -5px 0 0 #b23a2b; }
.quote-jump { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; text-decoration: underline dotted; }
.quote-jump:hover, .quote-jump:focus-visible { color: var(--ink, #173c35); outline: none; }
.evidence-all-clear { padding: 22px; border: 1px solid rgba(52,120,74,.3); border-radius: 12px; text-align: center; color: #1f5c38; background: rgba(52,120,74,.08); font-size: 13px; }

/* 視覺回饋動效（收合、圓環、核准、count-up、骨架） */
.quote-card.resolving-confirm::after, .quote-card.resolving-ignore::after { content: "✓"; position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; border-radius: inherit; font-size: 34px; font-weight: 700; color: #1f5c38; background: rgba(236, 244, 238, .88); animation: resolve-pop .18s ease; }
.quote-card.resolving-ignore::after { content: "—"; color: #8a6114; background: rgba(244, 240, 228, .88); }
.quote-card { position: relative; }
.quote-card.collapsing { opacity: 0; margin: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; max-height: 0 !important; border-width: 0 !important; overflow: hidden; transition: all .3s ease; }
@keyframes resolve-pop { from { transform: scale(.6); opacity: 0; } }

.evidence-ring { position: relative; width: 76px; height: 76px; flex: 0 0 auto; }
.evidence-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.evidence-ring circle { fill: none; stroke-width: 6; }
.evidence-ring .ring-track { stroke: var(--line, #ded8cc); }
.evidence-ring .ring-value { stroke: var(--ink, #173c35); stroke-linecap: round; transition: stroke-dashoffset .6s ease, stroke .3s ease; }
.evidence-ring.complete .ring-value { stroke: #34784a; }
.evidence-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.evidence-ring > div span { font-size: 15px; font-weight: 700; line-height: 1.1; }
.evidence-ring > div small { color: var(--muted); font-size: 10px; }

.approve-celebration { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; background: rgba(23, 60, 53, .18); pointer-events: none; animation: celebration-in .2s ease; }
.approve-celebration.leaving { opacity: 0; transition: opacity .35s ease; }
.celebration-card { display: grid; justify-items: center; gap: 8px; padding: 30px 42px; border-radius: 20px; background: #fffdf7; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.celebration-check { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: white; background: #34784a; font-size: 30px; font-weight: 700; animation: check-bloom .45s cubic-bezier(.34, 1.56, .64, 1); }
.celebration-card b { font-size: 17px; color: var(--ink, #173c35); }
.celebration-card small { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.celebration-card small i { padding: 4px 10px; border-radius: 999px; background: rgba(52, 120, 74, .12); color: #1f5c38; font-style: normal; font-size: 12px; opacity: 0; animation: chip-in .3s ease forwards; animation-delay: var(--d, 0ms); }
@keyframes celebration-in { from { opacity: 0; } }
@keyframes check-bloom { from { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.12); } to { transform: scale(1); opacity: 1; } }
@keyframes chip-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.skeleton { display: inline-block; border-radius: 8px; color: transparent !important; background: linear-gradient(90deg, rgba(23,60,53,.07) 25%, rgba(23,60,53,.14) 37%, rgba(23,60,53,.07) 63%); background-size: 400% 100%; animation: skeleton-shimmer 1.2s ease infinite; }
.skeleton-line { display: block; width: 82%; height: 13px; margin: 5px 0; }
.skeleton-line.short { width: 46%; }
.skeleton-chip { width: 54px; height: 20px; border-radius: 999px; }
.skeleton-circle { width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto; }
.skeleton-item { pointer-events: none; }
.skeleton-stack { display: grid; gap: 4px; padding: 12px 4px; }
.meeting-skeleton { pointer-events: none; }
@keyframes skeleton-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* Logo 可點擊回工作總覽 */
.brand[data-view-target] { cursor: pointer; border-radius: 12px; transition: opacity .15s ease; }
.brand[data-view-target]:hover { opacity: .82; }
.brand[data-view-target]:focus-visible { outline: 2px solid var(--acid, #d7e46e); outline-offset: 3px; }

/* 總覽統計卡可點擊 */
.metric-card[data-metric] { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.metric-card[data-metric]:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(23,60,53,.12); }
.metric-card[data-metric]:focus-visible { outline: 2px solid var(--acid, #d7e46e); outline-offset: 3px; }
