:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --surface-3: #f1efea;
  --ink: #1d2124;
  --ink-2: #4f565d;
  --ink-3: #868c93;
  --line: #e4e1da;
  --line-2: #d6d2c9;
  --brand: #2c5a4c;
  --brand-ink: #ffffff;
  --brand-soft: #e6efeb;
  --brand-hover: #234a3e;
  --accent: #a96e36;
  --accent-soft: #f6ebdf;
  --sidebar: #1c2622;
  --sidebar-ink: #c9d3cf;
  --sidebar-active: #2f4a41;
  --amber: #a46708; --amber-bg: #fdf2dc;
  --blue: #2457c5; --blue-bg: #e8effc;
  --violet: #6342b6; --violet-bg: #efeafb;
  --green: #23784e; --green-bg: #e4f3ea;
  --red: #c2352f; --red-bg: #fcebea;
  --gray: #5f656c; --gray-bg: #eeeeec;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(20, 24, 22, .06), 0 2px 8px rgba(20, 24, 22, .04);
  --shadow-lg: 0 10px 30px rgba(20, 24, 22, .16);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; font-weight: 700; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; } h4 { font-size: 14px; }
p { margin: 0 0 .75em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-ink); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #3d7a66, #a96e36); display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #fff; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: .5px; }
.brand-sub { font-size: 11px; color: #8fa39b; }
.nav { padding: 6px 10px 20px; flex: 1; }
.nav-group { font-size: 11px; color: #7f948c; letter-spacing: 1px; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--sidebar-ink); font-size: 14px; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.nav a .count { margin-left: auto; background: rgba(255,255,255,.12); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 8px; }
.nav a .count.hot { background: var(--accent); }
.nav svg { width: 17px; height: 17px; flex: none; opacity: .9; }
.sidebar-foot { padding: 12px 18px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.sidebar-foot .budget-bar { height: 5px; background: rgba(255,255,255,.12); border-radius: 9px; margin: 6px 0 4px; overflow: hidden; }
.sidebar-foot .budget-bar span { display: block; height: 100%; background: #6fb596; }
.sidebar-foot .budget-bar span.warn { background: #e0a14a; }
.sidebar-foot .budget-bar span.over { background: #e0645c; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(245,244,240,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 10px 24px; }
.topbar .search { flex: 1; max-width: 560px; position: relative; }
.topbar .search input { width: 100%; padding-left: 34px; background: var(--surface); }
.topbar .search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.nav-toggle { flex: none; padding: 7px 9px; }
.nav-toggle svg { width: 19px; height: 19px; }
.user-menu { margin-left: auto; position: relative; flex: none; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 1px solid transparent; border-radius: 99px; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; max-width: 220px; }
.user-btn:hover, .user-btn[aria-expanded="true"] { background: var(--surface-3); }
.user-btn .user-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn svg { width: 15px; height: 15px; flex: none; color: var(--ink-3); }
.user-btn .avatar { flex: none; }
.user-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
.user-pop[hidden] { display: none; }
.user-pop-head { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow-wrap: anywhere; }
.user-pop form { margin: 0; }
.user-pop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; text-decoration: none !important; }
.user-pop-item:hover { background: var(--surface-3); color: var(--ink); }
.user-pop-item svg { width: 17px; height: 17px; flex: none; color: var(--ink-3); }
.user-pop-item span:not(.guide-switch) { flex: 1; }
.user-pop-item.logout { color: var(--red); }
.user-pop-item.logout svg { color: var(--red); }
.sidebar-close { display: none; margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; place-items: center; cursor: pointer; flex: none; }
.sidebar-close svg { width: 18px; height: 18px; }
.nav-backdrop { display: none; }
@media (min-width: 901px) {
  .app { transition: grid-template-columns .18s; }
  html.nav-mini .app { grid-template-columns: 64px minmax(0, 1fr); }
  html.nav-mini .brand { justify-content: center; padding: 18px 0 14px; }
  html.nav-mini .brand-text { display: none; }
  html.nav-mini .nav { padding: 6px 8px 20px; }
  html.nav-mini .nav-group { font-size: 0; padding: 0; margin: 10px 6px; height: 1px; background: rgba(255,255,255,.1); }
  html.nav-mini .nav a { justify-content: center; gap: 0; padding: 10px 0; font-size: 0; position: relative; }
  html.nav-mini .nav a .count { position: absolute; top: 6px; right: 12px; margin: 0; padding: 0; width: 8px; height: 8px; font-size: 0; background: var(--accent); }
  html.nav-mini .nav svg { width: 19px; height: 19px; }
  html.nav-mini .sidebar-foot { display: none; }
}
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; }
.content { padding: 22px 24px 60px; }
.content.full { padding: 0; }
.content.full > .alert { margin: 10px 16px; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.breadcrumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.breadcrumb a { color: var(--ink-3); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.card-body { padding: 16px 18px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .stack > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid > *, .split > *, .two-col > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }

.stat { padding: 16px 18px; }
.stat .label { font-size: 12.5px; color: var(--ink-3); }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -.5px; margin-top: 2px; }
.stat .hint { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.stat a.value { color: var(--ink); display: block; }

.btn { --b: var(--line-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--b); background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; line-height: 1.35; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; text-decoration: none !important; }
.btn:hover { background: var(--surface-3); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn:disabled, .btn.is-busy, .btn-disabled { opacity: .6; cursor: not-allowed; }
.btn-disabled { pointer-events: none; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: #93602e; }
.btn-danger { color: var(--red); border-color: #efc7c4; }
.btn-danger:hover { background: var(--red-bg); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn-xs { padding: 2px 8px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 10px 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn.is-busy::after { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-group .btn.active { background: var(--brand-soft); color: var(--brand); border-color: #b9d1c7; z-index: 1; }

input[type=text], input[type=search], input[type=password], input[type=number], input[type=email], input[type=color], select, textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 10px; width: 100%; transition: border-color .12s, box-shadow .12s; }
input[type=color] { padding: 2px; height: 36px; }
textarea { min-height: 80px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(44, 90, 76, .15); }
input.is-uncertain, textarea.is-uncertain, select.is-uncertain { border-color: #e2b25b; background: #fffbf2; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.field .help { font-size: 12px; color: var(--ink-3); }
.field .error, .form-error { font-size: 12.5px; color: var(--red); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13.5px; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.inline-form { display: inline; }
.input-group { display: flex; }
.input-group input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-left: -1px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input { width: auto; min-width: 130px; }
.filters input[type=checkbox], .filters input[type=radio] { min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; cursor: pointer; user-select: none; }
.chip input { display: none; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.chip:hover { border-color: var(--ink-3); }
.chip.on, .chip:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--gray-bg); color: var(--gray); white-space: nowrap; }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-violet { background: var(--violet-bg); color: var(--violet); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-gray { background: var(--gray-bg); color: var(--gray); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-outline { background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--ink-3); padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fbfaf8; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table.compact td, .table.compact th { padding: 6px 10px; }
.table input, .table select { padding: 4px 7px; font-size: 13px; }

.pagination { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.pagination a, .pagination span { padding: 5px 11px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink-2); }
.pagination .active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .disabled { color: var(--ink-3); opacity: .6; }

.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; border: 1px solid transparent; }
.alert-ok { background: var(--green-bg); color: #1d5e3e; border-color: #c6e5d3; }
.alert-error { background: var(--red-bg); color: #8c2622; border-color: #f2cdca; }
.alert-info { background: var(--blue-bg); color: #1f458f; border-color: #cddcf7; }
.alert-warn { background: var(--amber-bg); color: #7a4d07; border-color: #f2dcae; }
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.toast { background: #1f2724; color: #fff; padding: 11px 16px; border-radius: 9px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: toastIn .2s ease-out; display: flex; gap: 10px; align-items: flex-start; }
.toast.error { background: #8f2621; }
.toast.ok { background: #1f5c43; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

.modal { position: fixed; inset: 0; z-index: 150; background: rgba(20, 24, 22, .45); display: none; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal.open { display: flex; }
.modal-box { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; animation: toastIn .18s ease-out; }
.modal-box.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 16px 18px; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .3s; }
.progress.accent > span { background: var(--accent); }
.meter-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); margin-bottom: 5px; }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.empty svg { width: 42px; height: 42px; margin: 0 auto 10px; color: var(--line-2); }
.empty h3 { color: var(--ink-2); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs button { padding: 9px 14px; font-size: 13.5px; color: var(--ink-2); border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; font: inherit; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs .active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tabs .badge { margin-left: 4px; }
.steps { display: flex; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.steps a { flex: 1; display: flex; align-items: center; gap: 9px; padding: 10px 14px; color: var(--ink-2); border-right: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.steps a:last-child { border-right: 0; }
.steps a:hover { background: var(--surface-2); text-decoration: none; }
.steps .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--ink-3); flex: none; }
.steps .done .n { background: var(--green-bg); color: var(--green); }
.steps .current { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.steps .current .n { background: var(--brand); color: #fff; }
.steps .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps .issue .n { background: var(--red-bg); color: var(--red); }
.steps .badge { flex: none; margin-left: auto; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; position: relative; transition: box-shadow .15s, transform .15s; }
.pcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.pcard .thumb { aspect-ratio: 1; background: #eef1f4; display: grid; place-items: center; overflow: hidden; }
.pcard .thumb img { width: 100%; height: 100%; object-fit: contain; }
.pcard .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pcard .name { font-weight: 600; font-size: 13.5px; color: var(--ink); line-height: 1.35; }
.pcard .meta { font-size: 12px; color: var(--ink-3); }
.pcard .price { font-weight: 700; font-size: 13.5px; color: var(--accent); }
.pcard .sel { position: absolute; top: 8px; left: 8px; z-index: 2; }
.pcard .sel input { width: 18px; height: 18px; accent-color: var(--brand); }
.pcard .st { position: absolute; top: 8px; right: 8px; }
.pcard .reason { font-size: 12px; color: var(--brand); background: var(--brand-soft); padding: 4px 8px; border-radius: 6px; margin-top: 4px; }
.pcard.selected { outline: 2px solid var(--brand); }
.bulkbar { position: sticky; bottom: 14px; z-index: 20; margin-top: 16px; background: #1f2724; color: #fff; border-radius: 12px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.bulkbar select { width: auto; background: #2d3833; color: #fff; border-color: #3e4b45; }
.bulkbar .btn { background: #2d3833; color: #fff; border-color: #3e4b45; }
.bulkbar .btn-primary { background: var(--accent); border-color: var(--accent); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.gimg { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.gimg .ph { aspect-ratio: 1; background: repeating-conic-gradient(#f1f1f1 0 25%, #fff 0 50%) 0 0 / 16px 16px; display: grid; place-items: center; cursor: zoom-in; }
.gimg .ph img { width: 100%; height: 100%; object-fit: contain; }
.gimg .bar { display: flex; gap: 2px; padding: 5px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.gimg .bar .btn { padding: 3px 7px; font-size: 12px; }
.gimg .tags { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; flex-wrap: wrap; right: 6px; }
.gimg.is-selected { outline: 3px solid var(--brand); outline-offset: -1px; }
.gimg.is-cover { outline: 3px solid var(--accent); outline-offset: -1px; }
.gimg.is-disliked .ph { opacity: .45; }
.gimg .meta { padding: 4px 8px 6px; font-size: 11.5px; color: var(--ink-3); }
.gimg.pending .ph { background: var(--surface-3); color: var(--ink-3); font-size: 12.5px; text-align: center; padding: 10px; cursor: default; }
.slotbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.slot { aspect-ratio: 1; border: 2px dashed var(--line-2); border-radius: 10px; display: grid; place-items: center; color: var(--ink-3); font-size: 12.5px; overflow: hidden; position: relative; background: var(--surface-2); }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot .slot-label { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(20,24,22,.62); color: #fff; font-size: 11.5px; padding: 3px 6px; }
.slot.filled { border-style: solid; border-color: var(--brand); }
.slot.cover.filled { border-color: var(--accent); }

.viewer { background: #3a403d; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-height: 420px; }
.viewer-bar { display: flex; gap: 6px; align-items: center; padding: 7px 10px; background: #2c312f; color: #dfe5e2; font-size: 12.5px; flex-wrap: wrap; }
.viewer-bar .btn { background: #3c4340; color: #eef2f0; border-color: #4b5350; padding: 3px 9px; font-size: 12.5px; }
.viewer-bar .btn:hover { background: #4b5350; }
.viewer-bar .btn.active { background: var(--accent); border-color: var(--accent); }
.viewer-bar select { width: auto; padding: 3px 7px; font-size: 12.5px; background: #3c4340; color: #eef2f0; border-color: #4b5350; }
.viewer-stage { position: relative; overflow: auto; flex: 1; padding: 14px; }
.viewer-canvas { position: relative; margin: 0 auto; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.35); transform-origin: top left; }
.viewer-canvas canvas, .viewer-canvas > img { display: block; width: 100%; height: 100%; }
.viewer-canvas .overlay { position: absolute; inset: 0; }
.box { position: absolute; border: 2px solid var(--c, #2c5a4c); background: color-mix(in srgb, var(--c, #2c5a4c) 10%, transparent); border-radius: 3px; cursor: pointer; }
.box .lbl { position: absolute; left: -2px; top: -22px; background: var(--c, #2c5a4c); color: #fff; font-size: 11.5px; padding: 1px 6px; border-radius: 4px 4px 4px 0; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.box.hl { border-width: 3px; box-shadow: 0 0 0 9999px rgba(15,18,17,.35); z-index: 3; }
.box.dim { opacity: .35; }
.box.draft { --c: #a96e36; border-style: dashed; cursor: move; }
.box.hint { --c: #6342b6; border-style: dotted; }
.box .h { position: absolute; width: 11px; height: 11px; background: #fff; border: 2px solid var(--c); border-radius: 2px; }
.box .h.nw { left: -6px; top: -6px; cursor: nwse-resize; } .box .h.ne { right: -6px; top: -6px; cursor: nesw-resize; }
.box .h.sw { left: -6px; bottom: -6px; cursor: nesw-resize; } .box .h.se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.viewer.drawing .viewer-canvas { cursor: crosshair; }
.region-pop { position: absolute; z-index: 10; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 10px; width: 300px; font-size: 13px; }
.region-pop .row { gap: 6px; }

.split { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(400px, .88fr); gap: 16px; align-items: start; }
.split .left { position: sticky; top: 64px; height: calc(100vh - 84px); display: flex; flex-direction: column; gap: 10px; }
.split .left .viewer { flex: 1; min-height: 0; }
.src-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.src-strip .s { flex: none; width: 74px; height: 74px; border-radius: 8px; border: 2px solid var(--line); overflow: hidden; background: #fff; cursor: pointer; position: relative; }
.src-strip .s img { width: 100%; height: 100%; object-fit: contain; }
.src-strip .s.active { border-color: var(--accent); }
.src-strip .s .pn { position: absolute; bottom: 0; right: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; padding: 0 4px; border-radius: 4px 0 0 0; }
.src-strip .s .star { position: absolute; top: 1px; left: 3px; color: var(--accent); font-size: 13px; }
.conf { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.conf .bar { width: 70px; height: 6px; background: var(--surface-3); border-radius: 9px; overflow: hidden; }
.conf .bar span { display: block; height: 100%; }

.pages-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.pg { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); position: relative; display: block; color: var(--ink); }
.pg:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.pg .im { aspect-ratio: 3 / 4; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; }
.pg .im img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pg .ft { display: flex; align-items: center; justify-content: space-between; padding: 4px 7px; font-size: 11.5px; gap: 4px; }
.pg .st { position: absolute; top: 5px; right: 5px; }
.pg.st-processing { outline: 2px solid var(--accent); }
.pg.st-failed { outline: 2px solid var(--red); }

.copy-field textarea { min-height: 64px; }
.copy-field.long textarea { min-height: 220px; }
.issue { border-left: 3px solid var(--amber); background: var(--amber-bg); padding: 8px 12px; border-radius: 0 7px 7px 0; font-size: 13px; }
.issue.high { border-color: var(--red); background: var(--red-bg); }
.issue.low { border-color: var(--blue); background: var(--blue-bg); }
.diff-del { background: #fbe1df; text-decoration: line-through; }
.diff-add { background: #d9f0e2; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.reject::before { background: var(--red); }
.timeline li.approve::before { background: var(--green); }
.timeline .when { color: var(--ink-3); font-size: 12px; }

.editor { display: grid; grid-template-columns: 260px minmax(0, 1fr) 270px; gap: 0; height: calc(100vh - 56px); background: var(--surface); border-top: 1px solid var(--line); }
.editor .panel { overflow-y: auto; padding: 14px; border-right: 1px solid var(--line); background: var(--surface-2); }
.editor .panel.right { border-right: 0; border-left: 1px solid var(--line); }
.editor .stage { display: flex; flex-direction: column; min-width: 0; background: #e7e5df; }
.editor .toolbar { display: flex; gap: 6px; align-items: center; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.editor .canvas-wrap { flex: 1; overflow: auto; display: grid; place-items: center; padding: 20px; }
.editor .canvas-wrap .canvas-container { box-shadow: 0 6px 24px rgba(0,0,0,.18); background: #fff; }
.editor .panel-toggle-btn { display: none; }
.asset { display: grid; grid-template-columns: 54px 1fr; gap: 8px; padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-bottom: 8px; cursor: grab; align-items: center; }
.asset img { width: 54px; height: 54px; object-fit: contain; background: repeating-conic-gradient(#f1f1f1 0 25%, #fff 0 50%) 0 0 / 10px 10px; border-radius: 5px; }
.asset .nm { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.layer { display: flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 6px; font-size: 12.5px; cursor: pointer; }
.layer:hover { background: var(--surface-3); }
.layer.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.prop-row { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 12.5px; }

.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.login-art { background: linear-gradient(160deg, #1f3a32 0%, #2c5a4c 55%, #a96e36 140%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h1 { font-size: 34px; letter-spacing: 1px; }
.login-art ul { padding-left: 18px; line-height: 2; color: #dbe7e2; }
.login-form { display: grid; place-items: center; padding: 40px; }
.login-form .card { width: 100%; max-width: 380px; }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; word-break: break-word; }
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(10,12,11,.88); display: none; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.help-tip { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-3); color: var(--ink-3); font-size: 11px; cursor: help; }
.pre { white-space: pre-wrap; word-break: break-word; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; max-height: 360px; overflow: auto; }
.sortable-ghost { opacity: .4; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 150px 1fr 90px; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 7px; }
.hbar .track { height: 10px; background: var(--surface-3); border-radius: 9px; overflow: hidden; }
.hbar .track span { display: block; height: 100%; background: var(--brand); border-radius: 9px; }
.kpi-good { color: var(--green); } .kpi-warn { color: var(--amber); } .kpi-bad { color: var(--red); }

.two-col { grid-template-columns: var(--cols); align-items: start; }

@media (max-width: 1100px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1200px) {
  .steps a { flex-direction: column; justify-content: center; gap: 4px; padding: 8px 4px; text-align: center; font-size: 12.5px; }
  .steps .t { white-space: normal; overflow: visible; line-height: 1.3; }
  .steps .badge { margin-left: 0; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .grid.grid-4, .grid.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split .left { position: static; height: 70vh; }
  .editor { grid-template-columns: 220px minmax(0, 1fr); }
  .editor .panel-toggle-btn { display: inline-flex; }
  .editor .panel.right { position: fixed; top: 56px; right: 0; bottom: 0; width: 300px; max-width: 90vw; z-index: 90; box-shadow: var(--shadow-lg); transform: translateX(105%); transition: transform .2s; }
  .editor .panel-toggle:checked ~ .panel.right { transform: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 100; left: 0; top: 0; width: 272px; max-width: 86vw; height: 100vh; height: 100dvh; transform: translateX(-105%); transition: transform .2s; }
  html.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  html.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 99; background: rgba(15,18,17,.45); }
  html.nav-open, html.nav-open body { overflow: hidden; }
  .sidebar-close { display: inline-grid; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .slotbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .editor { grid-template-columns: 1fr; height: auto; }
  .editor .stage { order: -1; }
  .editor .canvas-wrap { flex: none; height: 62vh; min-height: 320px; padding: 12px; }
  .editor .panel { max-height: 260px; }
  .editor .panel.right { max-height: none; }
}

@media (max-width: 640px) {
  .content { padding: 14px 12px 64px; }
  .steps a { font-size: 12px; padding: 8px 2px; gap: 3px; }
  .steps .n { width: 20px; height: 20px; font-size: 11px; }
  .steps .badge { font-size: 10px; padding: 1px 5px; }
  .grid { gap: 12px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 12px 14px; }
  .stat .value { font-size: 20px; overflow-wrap: anywhere; }
  .split .left { height: 58vh; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pages-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .pcard .body { padding: 8px 10px 10px; }
  .pcard .name { font-size: 13px; overflow-wrap: anywhere; }
  .pcard .meta { overflow-wrap: anywhere; }
  .topbar { gap: 8px; padding: 8px 10px; }
  .user-btn { max-width: 150px; padding-right: 6px; }
  .user-btn > svg { display: none; }
  .page-head { gap: 10px; margin-bottom: 14px; }
  .page-head h1 { font-size: 19px; overflow-wrap: anywhere; }
  .page-head .sub { overflow-wrap: anywhere; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .card-head { flex-wrap: wrap; padding: 12px 14px; }
  .card-head .actions { flex-wrap: wrap; margin-left: 0; }
  .card-head h3 { overflow-wrap: anywhere; }
  .check { align-items: flex-start; }
  .check input { margin-top: 2px; flex: none; }
  .kv { grid-template-columns: 76px minmax(0, 1fr); }
  .hbar { grid-template-columns: 88px minmax(0, 1fr) 64px; gap: 8px; }
  .filters select, .filters input:not([type=checkbox]):not([type=radio]) { min-width: 0; flex: 1 1 140px; }
  .mono { overflow-wrap: anywhere; }
  .btn { max-width: 100%; }
  .chips .btn { white-space: normal; text-align: left; overflow-wrap: anywhere; }
  .table-wrap:has(> .table.stacked) { overflow-x: visible; }
  .table.stacked { min-width: 0 !important; width: 100%; }
  .table.stacked thead { display: none; }
  .table.stacked tbody, .table.stacked tr { display: block; width: 100%; }
  .table.stacked tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table.stacked tbody tr:last-child { border-bottom: 0; }
  .table.stacked td { display: block; position: relative; width: auto !important; min-width: 0 !important; max-width: none !important; padding: 3px 0 3px 6.2em; border: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .table.stacked td::before { content: attr(data-label); position: absolute; left: 0; top: 4px; width: 5.6em; color: var(--ink-3); font-size: 12px; line-height: 1.5; font-weight: 500; }
  .table.stacked td[data-label=""], .table.stacked td.td-title { padding-left: 0; }
  .table.stacked td[data-label=""]::before, .table.stacked td.td-title::before { display: none; }
  .table.stacked td.td-title { font-size: 14.5px; padding-bottom: 6px; }
  .table.stacked td:empty { display: none; }
  .table.stacked td.num { text-align: left; }
  .table.stacked td .nowrap, .table.stacked td.nowrap { white-space: normal; }
  .table.stacked tr:hover td { background: transparent; }
  .table.stacked input:not([type=checkbox]):not([type=radio]), .table.stacked select, .table.stacked textarea { width: 100% !important; max-width: 100%; }
}

.table-wrap:has(> .table.stack-fit) { overflow-x: visible; }
.table.stack-fit { min-width: 0 !important; width: 100%; }
.table.stack-fit thead { display: none; }
.table.stack-fit tbody, .table.stack-fit tr { display: block; width: 100%; }
.table.stack-fit tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table.stack-fit tbody tr:last-child { border-bottom: 0; }
.table.stack-fit td { display: block; position: relative; width: auto !important; min-width: 0 !important; max-width: none !important; padding: 3px 0 3px 6.2em; border: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.table.stack-fit td::before { content: attr(data-label); position: absolute; left: 0; top: 4px; width: 5.6em; color: var(--ink-3); font-size: 12px; line-height: 1.5; font-weight: 500; }
.table.stack-fit td[data-label=""], .table.stack-fit td.td-title { padding-left: 0; }
.table.stack-fit td[data-label=""]::before, .table.stack-fit td.td-title::before { display: none; }
.table.stack-fit td.td-title { font-size: 14.5px; padding-bottom: 6px; }
.table.stack-fit td:empty { display: none; }
.table.stack-fit td.num { text-align: left; }
.table.stack-fit td .nowrap, .table.stack-fit td.nowrap { white-space: normal; }
.table.stack-fit tr:hover td { background: transparent; }
.table.stack-fit input:not([type=checkbox]):not([type=radio]), .table.stack-fit select, .table.stack-fit textarea { width: 100% !important; max-width: 100%; }
.air-datepicker { --adp-accent-color: var(--brand); --adp-cell-background-color-selected: var(--brand); --adp-cell-background-color-selected-hover: var(--brand-hover); --adp-background-color-in-range: var(--brand-soft); --adp-font-family: var(--font); }

#runActions [hidden] { display: none; }
.pipe-table td:first-child, .pipe-runs td:first-child { min-width: 180px; }
.pipe-table td:last-child:empty { padding: 0; }
.pipe-steps { display: flex; gap: 3px; margin-bottom: 3px; }
.pipe-steps span { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); min-width: 10px; }
.pipe-steps span.ok { background: var(--green); }
.pipe-steps span.cur { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.pipe-steps span.bad { background: var(--red); }
.pipe-steps span.off { background: var(--line-2); }
.pipe-thumb { width: 44px; height: 44px; border-radius: 6px; background: #eef1f4; overflow: hidden; flex: none; display: block; }
.pipe-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pipe-table details summary { cursor: pointer; }
.pipe-est { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.pipe-est .total { font-size: 20px; font-weight: 700; }

.guide-toggle { gap: 6px; }
.user-pop-item.guide-toggle { gap: 10px; }
.guide-toggle .guide-switch { position: relative; width: 28px; height: 16px; border-radius: 99px; background: var(--line-2); transition: background .15s; flex: none; }
.guide-toggle .guide-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.guide-toggle[aria-pressed="true"] { color: var(--brand); }
.guide-toggle[aria-pressed="true"] .guide-switch { background: var(--brand); }
.guide-toggle[aria-pressed="true"] .guide-switch::after { transform: translateX(12px); }
.guide-shade { position: fixed; inset: 0; z-index: 400; background: transparent; }
.guide-spot { position: fixed; z-index: 401; border-radius: 10px; box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px rgba(15,18,17,.55); pointer-events: none; transition: all .2s ease; }
.guide-spot.center { box-shadow: 0 0 0 9999px rgba(15,18,17,.55); width: 0 !important; height: 0 !important; }
.guide-pop { position: fixed; z-index: 402; width: 340px; max-width: calc(100vw - 24px); background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 14px 16px 12px; font-size: 13.5px; line-height: 1.65; }
.guide-pop .gp-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.guide-pop .gp-head strong { font-size: 15px; color: var(--ink); }
.guide-pop .gp-count { margin-left: auto; color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.guide-pop .gp-page { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 2px; }
.guide-pop .gp-foot { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
.guide-pop .gp-foot .spacer { flex: 1; }
.guide-pop .gp-dots { display: flex; gap: 4px; }
.guide-pop .gp-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.guide-pop .gp-dots i.on { background: var(--accent); }
.guide-replay { position: fixed; right: 20px; bottom: 20px; z-index: 120; box-shadow: var(--shadow-lg); }
.guide-replay.lifted { bottom: 84px; }
.manual-toc { position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; display: block; }
.manual-toc .toc-box > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; margin-bottom: 6px; }
.manual-toc .toc-box > summary::-webkit-details-marker { display: none; }
.manual-toc .toc-box > summary .label { margin: 0; }
.manual-toc .toc-box > summary .toc-count { color: var(--ink-3); font-size: 12px; }
.manual-toc .toc-box > summary svg { width: 16px; height: 16px; margin-left: auto; color: var(--ink-3); transition: transform .15s; }
.manual-toc .toc-box:not([open]) > summary { margin-bottom: 0; }
.manual-toc .toc-box[open] > summary svg { transform: rotate(180deg); }
.manual-toc a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--ink-2); font-size: 13.5px; }
.manual-toc a:hover { background: var(--surface-3); text-decoration: none; color: var(--ink); }
.manual-toc a.toc-ch { font-weight: 600; color: var(--ink); margin-top: 4px; }
.manual-toc a.toc-page { padding-left: 22px; font-size: 12.5px; color: var(--ink-3); }
.manual-ch, .manual-page { scroll-margin-top: 80px; }
.manual-ch-head { border-bottom: 3px solid var(--brand); padding-bottom: 8px; margin-bottom: 12px; }
.manual-ch-no { color: var(--accent); font-weight: 700; font-size: 13px; }
.manual-ch-head h2 { font-size: 22px; color: var(--brand); margin: 2px 0 0; }
.manual-intro { color: var(--ink-2); margin: 0 0 12px; }
.manual-h { font-size: 15px; margin: 18px 0 6px; }
.manual-steps { margin: 0; padding-left: 22px; line-height: 1.8; }
.manual-steps li { margin: 2px 0; }
.manual-roles { margin: 4px 0 12px; }
details.manual-flow { margin: 10px 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--surface-2); }
details.manual-flow summary { cursor: pointer; font-weight: 600; color: var(--brand); }
details.manual-flow img { display: block; max-width: min(100%, 640px); margin: 10px auto 0; cursor: zoom-in; }
details.manual-flow img.manual-legend { max-width: min(100%, 560px); cursor: default; }
.manual-fig, .manual-shot { margin: 14px 0; text-align: center; }
.manual-fig img, .manual-shot img { max-width: 100%; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 10px rgba(20,30,25,.08); cursor: zoom-in; }
.manual-fig.narrow img { max-width: min(100%, 560px); }
.manual-fig figcaption, .manual-shot figcaption { color: var(--ink-3); font-size: 12.5px; margin-top: 6px; }
.manual-page { margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--line-2); }
.manual-page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-left: 4px solid var(--accent); padding-left: 10px; }
.manual-page-head h3 { font-size: 17px; margin: 0; flex: 1; }
.manual-page .manual-intro { margin: 8px 0 0; }
.manual-blocks { list-style: none; margin: 6px 0 0; padding: 0; }
.manual-blocks li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); line-height: 1.7; }
.manual-blocks li:last-child { border-bottom: 0; }
.mnum { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; margin-top: 2px; }
.manual-tips { margin-top: 18px; background: var(--accent-soft, #fdf0e1); border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 14px; }
.manual-tips ul { margin: 4px 0 0; padding-left: 20px; }
.manual-qa { margin: 0; }
.manual-qa dt { font-weight: 700; color: var(--brand); margin-top: 14px; }
.manual-qa dt::before { content: "Q　"; color: var(--accent); }
.manual-qa dd { margin: 4px 0 0; padding-left: 26px; color: var(--ink-2); }
@media (min-width: 1101px) { .manual-toc .toc-box > summary { pointer-events: none; } .manual-toc .toc-box > summary svg { display: none; } }
@media (max-width: 1100px) {
  .manual-toc { position: static; top: auto; max-height: none; overflow: visible; padding: 12px 16px; }
  .manual-toc .toc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 12px; padding-top: 6px; }
  .manual-toc a.toc-page { display: none; }
  .manual-toc a.toc-ch { margin-top: 0; padding: 7px 8px; }
}
@media (max-width: 900px) { .manual-page-head h3 { flex-basis: 100%; } }
