:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #eef2f7;
  --ink: #131820;
  --muted: #687181;
  --line: #dfe4eb;
  --blue: #2878ff;
  --blue-soft: #e8f0ff;
  --lime: #c7ee55;
  --coral: #ff6545;
  --green: #169a65;
  --sidebar: 250px;
  --shadow: 0 8px 28px rgba(24, 38, 60, .07);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); }
button, input, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; stroke-width: 1.9; }
.skip-link { position: fixed; top: -60px; left: 12px; z-index: 100; background: #111; color: #fff; padding: 10px 16px; }
.skip-link:focus { top: 12px; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar); padding: 18px 14px 16px; border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 5px 14px; border-bottom: 1px solid var(--line); }
.brand img { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px; }
.brand div { min-width: 0; display: grid; gap: 2px; }
.brand strong { font-size: 15px; white-space: nowrap; }
.brand span { color: var(--muted); font-size: 12px; }
.status-panel { margin: 14px 4px 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); display: grid; gap: 8px; }
.status-panel div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.status-panel span { color: var(--muted); }
.status-panel strong { font-size: 12px; }
.success { color: var(--green) !important; }
nav > p { margin: 14px 9px 6px; color: #8b94a2; font-size: 11px; text-transform: uppercase; }
nav > a, .logout-form button { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: #364152; font-size: 14px; cursor: pointer; }
nav > a:hover, .logout-form button:hover { background: var(--surface-soft); color: var(--ink); }
nav > a.active { background: var(--blue-soft); color: #1556c2; font-weight: 700; }
.logout-form { margin: 0; }
.source-note { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 8px 1fr; gap: 4px 8px; align-items: center; color: var(--muted); }
.source-note .dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
.source-note strong { font-size: 11px; font-weight: 600; }
.source-note small { grid-column: 1 / -1; font-size: 10px; line-height: 1.5; }
.main-shell { margin-left: var(--sidebar); min-height: 100vh; padding: 24px 28px 50px; }
.mobile-menu, .sidebar-backdrop { display: none; }

.hero-band { min-height: 285px; position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(380px, .85fr); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.hero-band::before { content: ""; position: absolute; inset: auto 0 0; height: 8px; background: linear-gradient(90deg, var(--blue) 0 34%, var(--lime) 34% 55%, var(--coral) 55% 70%, #171d26 70%); }
.hero-copy { padding: 34px 32px 42px; align-self: center; position: relative; z-index: 2; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: 0; }
h1, h2, h3, p { margin-top: 0; }
.hero-copy h1 { margin-bottom: 12px; font-size: 34px; line-height: 1.18; letter-spacing: 0; }
.hero-copy > p:not(.eyebrow) { max-width: 660px; margin-bottom: 22px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; }
.button-row.end { justify-content: flex-end; }
.button { min-height: 38px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 8px 13px; border: 1px solid transparent; border-radius: 6px; font-weight: 700; font-size: 13px; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--blue); color: #fff; }
.button.primary:hover { background: #1764dd; }
.button.secondary { border-color: var(--line); background: #fff; color: #315075; }
.button.ghost { background: var(--blue-soft); color: #1d59ae; }
.button.dark { background: #171d26; color: #fff; }
.button.danger { border-color: #d84028; background: #fff; color: #c43822; }
.button.danger:hover { background: #fff2ef; }
.button.small { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.button.full { width: 100%; }
.hero-visual { position: relative; min-height: 285px; border-left: 1px solid var(--line); background: #edf5ff; overflow: hidden; }
.hero-visual::before { content: ""; position: absolute; inset: 0; opacity: .45; background-image: linear-gradient(#ccdcf1 1px, transparent 1px), linear-gradient(90deg, #ccdcf1 1px, transparent 1px); background-size: 34px 34px; }
.signal-card { position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 11px 14px; border: 1px solid #cbd9ed; border-radius: 7px; background: #fff; box-shadow: var(--shadow); font-size: 12px; font-weight: 700; }
.signal-main { left: 50%; top: 50%; transform: translate(-50%, -50%); min-width: 150px; justify-content: center; font-size: 15px; }
.signal-main img { width: 38px; height: 38px; }
.signal-user { left: 34px; top: 46px; color: #1a5ece; }
.signal-reward { right: 32px; bottom: 46px; color: #0c8052; }
.signal-line { position: absolute; z-index: 1; height: 3px; background: var(--blue); transform-origin: left center; }
.line-a { width: 170px; left: 100px; top: 90px; transform: rotate(25deg); }
.line-b { width: 170px; left: 55%; top: 57%; transform: rotate(24deg); background: var(--green); }

.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin: 12px 0; border: 1px solid var(--line); background: #fff; }
.metric-strip > div { min-height: 74px; padding: 13px 16px; display: grid; align-content: center; gap: 5px; border-right: 1px solid var(--line); }
.metric-strip > div:last-child { border-right: 0; }
.metric-strip span { color: var(--muted); font-size: 11px; }
.metric-strip strong { font-size: 16px; }
.metric-strip.admin strong { font-size: 22px; }
.metric-strip.short { grid-template-columns: repeat(3, 1fr); }
.accent { color: var(--blue) !important; }

.rules { border: 1px solid var(--line); background: #fff; }
.rules summary { padding: 11px 14px; font-weight: 800; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--line); }
.rule-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.rule-grid > div { min-height: 92px; padding: 14px; border-right: 1px solid var(--line); display: grid; grid-template-columns: 22px 1fr; align-content: center; gap: 5px 8px; }
.rule-grid > div:last-child { border-right: 0; }
.rule-grid svg { color: var(--blue); }
.rule-grid strong { font-size: 13px; }
.rule-grid span { grid-column: 1 / -1; color: var(--muted); font-size: 11px; line-height: 1.55; }

.section-heading { margin: 28px 0 12px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.section-heading.compact { margin-top: 34px; }
.section-heading h2 { margin-bottom: 5px; font-size: 23px; }
.section-heading p:not(.eyebrow) { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.chip { display: inline-flex; align-items: center; width: max-content; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #4b5666; font-size: 11px; font-weight: 700; white-space: nowrap; }
.success-chip { border-color: #bce2d0; color: var(--green); background: #effaf5; }
.poster-layout { display: grid; grid-template-columns: minmax(245px, .82fr) minmax(360px, 1.08fr) minmax(255px, .9fr); gap: 12px; align-items: start; }
.tool-panel, .template-panel, .poster-stage { border: 1px solid var(--line); background: #fff; }
.tool-panel, .template-panel { padding: 18px; }
.panel-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.panel-heading > svg { width: 20px; height: 20px; color: var(--blue); margin-top: 1px; }
.panel-heading h2, .panel-heading h3 { margin-bottom: 4px; font-size: 17px; }
.panel-heading p { margin-bottom: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
label { display: grid; gap: 7px; margin-bottom: 15px; font-size: 12px; font-weight: 700; }
input, textarea { width: 100%; border: 1px solid #cfd6df; border-radius: 6px; background: #fff; color: var(--ink); padding: 10px 11px; outline: none; transition: border .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(40, 120, 255, .12); }
label small { color: var(--muted); font-weight: 400; }
.button-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quiet-list { margin: 18px 0 0; padding: 14px 0 0 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.8; }
.poster-stage { padding: 12px; background: #e8edf4; }
.poster-stage canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; background: #fff; cursor: move; box-shadow: 0 12px 32px rgba(20, 32, 48, .14); touch-action: none; }
.template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.template-swatch { min-width: 0; min-height: 72px; display: grid; gap: 5px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-align: left; color: #495465; font-size: 10px; cursor: pointer; }
.template-swatch span { display: block; height: 42px; border-radius: 4px; background: var(--swatch); }
.template-swatch.selected { border: 2px solid var(--blue); padding: 5px; color: var(--blue); font-weight: 800; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-size: 12px; font-weight: 700; }
.mini-ranking { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.mini-ranking > div { display: grid; grid-template-columns: 42px 1fr 1fr auto; align-items: center; gap: 12px; min-height: 58px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mini-ranking > div:last-child { border-bottom: 0; }
.mini-ranking span:not(.rank) { color: var(--muted); }
.rank { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 11px; font-weight: 800; }
.rank.top { background: #171d26; border-color: #171d26; color: #fff; }

.page-header { min-height: 118px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 28px; border: 1px solid var(--line); background: #fff; }
.page-header h1 { margin-bottom: 7px; font-size: 27px; }
.page-header p:not(.eyebrow) { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; white-space: nowrap; }
.status-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.lookup-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 14px; margin-top: 14px; }
.form-panel, .steps-panel { border: 1px solid var(--line); background: #fff; padding: 24px; }
.lookup-form { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.input-action { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.empty-state { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 24px; color: var(--muted); text-align: center; }
.empty-state svg { width: 28px; height: 28px; color: #95a0ae; }
.empty-state strong { color: var(--ink); }
.empty-state p { max-width: 520px; margin-bottom: 0; font-size: 12px; line-height: 1.6; }
.empty-state.compact { min-height: 88px; font-size: 12px; }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 20px 0; }
.result-head > div { display: flex; align-items: center; gap: 10px; }
.result-head > div > div { display: grid; gap: 3px; }
.result-head small { color: var(--muted); }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; }
.result-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.result-metrics div { padding: 13px; display: grid; gap: 6px; border-right: 1px solid var(--line); }
.result-metrics div:last-child { border: 0; }
.result-metrics span { color: var(--muted); font-size: 10px; }
.result-metrics strong { font-size: 16px; }
.invite-link { margin-top: 18px; display: grid; gap: 7px; font-size: 11px; color: var(--muted); }
.invite-link > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid var(--line); background: var(--surface-soft); }
.invite-link code { overflow: hidden; color: #334155; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #3e4a5a; cursor: pointer; }
.steps-panel h2 { margin-bottom: 6px; font-size: 18px; }
.steps-panel > p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.steps-panel ol { margin: 20px 0; padding: 0; list-style: none; display: grid; gap: 13px; }
.steps-panel li { display: flex; gap: 10px; align-items: center; }
.steps-panel li > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-soft); color: var(--blue); font-size: 11px; font-weight: 800; }
.steps-panel li div { display: grid; gap: 2px; }
.steps-panel li strong { font-size: 12px; }
.steps-panel li small { color: var(--muted); font-size: 10px; }

.segment-control { width: max-content; display: flex; margin: 14px 0; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.segment-control a { min-width: 65px; padding: 7px 12px; border-radius: 5px; color: var(--muted); text-align: center; font-size: 12px; }
.segment-control a.active { background: #171d26; color: #fff; font-weight: 800; }
.table-section { border: 1px solid var(--line); background: #fff; }
.table-heading { min-height: 72px; padding: 15px 17px; display: flex; justify-content: space-between; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.table-heading h2 { margin-bottom: 4px; font-size: 16px; }
.table-heading p { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.table-heading-actions { display: flex; align-items: center; gap: 8px; }
.table-heading-actions form { margin: 0; }
.table-heading-actions .icon-button { width: 34px; height: 34px; }
.table-heading-actions .icon-button:disabled { cursor: wait; opacity: .65; }
.table-heading-actions .icon-button.is-loading svg { animation: ranking-refresh .7s linear infinite; }
@keyframes ranking-refresh { to { transform: rotate(360deg); } }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th { padding: 11px 14px; background: #f8fafc; color: #778191; font-size: 10px; font-weight: 700; text-align: left; }
td { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
tbody tr:hover { background: #fbfcfe; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.row-actions { display: flex; align-items: center; gap: 7px; white-space: nowrap; }

.login-wrap { min-height: calc(100vh - 74px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); border: 1px solid var(--line); background: #fff; }
.login-visual { min-height: 580px; padding: 60px; position: relative; overflow: hidden; background: #eaf3ff; }
.login-visual::after { content: ""; position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(#ceddf1 1px, transparent 1px), linear-gradient(90deg, #ceddf1 1px, transparent 1px); background-size: 42px 42px; }
.login-visual > * { position: relative; z-index: 2; }
.login-visual h1 { max-width: 560px; margin-top: 100px; font-size: 42px; line-height: 1.15; }
.login-visual > p:not(.eyebrow) { max-width: 520px; color: var(--muted); line-height: 1.7; }
.lock-graphic { width: 240px; min-height: 140px; margin-top: 55px; padding: 24px; display: grid; gap: 6px; align-content: center; border: 1px solid #bdcde2; background: rgba(255,255,255,.84); }
.lock-graphic svg { width: 34px; height: 34px; color: var(--blue); }
.lock-graphic small { color: var(--muted); }
.login-panel { align-self: center; margin: 35px; padding: 30px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.password-field { display: grid; grid-template-columns: 1fr auto; }
.password-field input { border-radius: 6px 0 0 6px; }
.password-field button { border-left: 0; border-radius: 0 6px 6px 0; }
.security-note { margin: 18px 0 0; display: flex; gap: 7px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.alert { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 10px 12px; border: 1px solid #f3b9ad; background: #fff2ef; color: #ad3c28; font-size: 12px; }
.success-alert { margin-top: 14px; border-color: #afe0c8; background: #effaf5; color: #13794f; }

.modal { width: min(480px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 24px 80px rgba(0, 0, 0, .24); }
.modal::backdrop { background: rgba(17, 24, 39, .48); }
.modal form { padding: 22px; }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 16px; }
.modal-head h2 { font-size: 19px; }
.conversion { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 16px; padding: 10px 12px; background: var(--blue-soft); color: #315075; font-size: 11px; }
.conversion strong { color: var(--blue); font-size: 16px; }
.danger-text { color: #c43822; }
.danger-notice { display: grid; grid-template-columns: 22px 1fr; gap: 10px; margin-bottom: 17px; padding: 12px; border: 1px solid #f3b9ad; background: #fff2ef; color: #92321f; }
.danger-notice svg { margin-top: 1px; }
.danger-notice strong { font-size: 13px; }
.danger-notice p { margin: 4px 0 0; color: #9a4b3b; font-size: 11px; line-height: 1.55; }

.settings-layout { margin-top: 14px; }
.settings-section { margin-bottom: 12px; padding: 20px; border: 1px solid var(--line); background: #fff; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.password-grid { align-items: start; }
.password-grid label { min-width: 0; margin-bottom: 0; }
.password-grid .password-field { height: 40px; }
.password-grid .password-field input,
.password-grid .password-field button { height: 40px; }
.password-grid .password-field button { width: 40px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; margin: 0; border-top: 1px solid var(--line); }
.toggle-row > span { display: grid; gap: 3px; }
.toggle-row small { color: var(--muted); font-weight: 400; }
.toggle-row input { appearance: none; width: 42px; height: 24px; padding: 0; border: 0; border-radius: 999px; background: #c7ced8; position: relative; cursor: pointer; }
.toggle-row input::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .18s; }
.toggle-row input:checked { background: var(--blue); }
.toggle-row input:checked::after { transform: translateX(18px); }
.form-actions { display: flex; justify-content: flex-end; }

.audit-list { margin-top: 14px; border: 1px solid var(--line); background: #fff; }
.audit-list article { min-height: 76px; display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.audit-list article:last-child { border-bottom: 0; }
.audit-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
.audit-list strong { font-size: 12px; }
.audit-list p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.audit-meta { display: grid; gap: 3px; text-align: right; font-size: 10px; color: var(--muted); }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 10px 15px; border-radius: 6px; background: #171d26; color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .poster-layout { grid-template-columns: minmax(260px, .7fr) minmax(390px, 1fr); }
  .template-panel { grid-column: 1 / -1; }
  .template-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-band { grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .main-shell { margin-left: 0; padding: 68px 18px 40px; }
  .mobile-menu { display: inline-grid; position: fixed; z-index: 40; top: 14px; left: 14px; box-shadow: var(--shadow); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; background: rgba(12, 18, 32, .38); }
  .menu-open .sidebar { transform: translateX(0); }
  .menu-open .sidebar-backdrop { display: block; }
  .hero-band { grid-template-columns: 1fr; }
  .hero-visual { min-height: 210px; border-left: 0; border-top: 1px solid var(--line); }
  .metric-strip, .rule-grid { grid-template-columns: 1fr 1fr; }
  .metric-strip > div:nth-child(2), .rule-grid > div:nth-child(2) { border-right: 0; }
  .metric-strip > div:nth-child(-n+2), .rule-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .poster-layout { grid-template-columns: minmax(260px, .75fr) minmax(360px, 1.25fr); }
  .template-grid { grid-template-columns: repeat(4, 1fr); }
  .lookup-layout, .login-wrap { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { width: min(520px, calc(100% - 30px)); margin: 40px auto; }
}

@media (max-width: 650px) {
  .main-shell { padding: 64px 10px 30px; }
  .hero-copy { padding: 28px 20px 34px; }
  .hero-copy h1 { font-size: 29px; }
  .hero-visual { min-height: 185px; }
  .signal-user { left: 18px; top: 28px; }
  .signal-reward { right: 16px; bottom: 28px; }
  .signal-line { width: 120px; }
  .metric-strip, .metric-strip.short, .rule-grid { grid-template-columns: 1fr; }
  .metric-strip > div, .rule-grid > div { min-height: 64px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-strip > div:last-child, .rule-grid > div:last-child { border-bottom: 0; }
  .section-heading, .page-header { align-items: flex-start; flex-direction: column; }
  .page-header { padding: 22px 18px; }
  .poster-layout { grid-template-columns: 1fr; }
  .template-panel { grid-column: auto; }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .poster-stage { order: -1; }
  .button-grid { grid-template-columns: 1fr; }
  .mini-ranking > div { grid-template-columns: 34px 1fr auto; }
  .mini-ranking span:not(.rank) { display: none; }
  .input-action { grid-template-columns: 1fr; }
  .result-metrics { grid-template-columns: 1fr 1fr; }
  .result-metrics div:nth-child(2) { border-right: 0; }
  .result-metrics div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .segment-control { width: 100%; }
  .segment-control a { min-width: 0; flex: 1; }
  .table-scroll td.empty-cell { position: sticky; left: 0; padding: 0; background: #fff; }
  .table-scroll td.empty-cell .empty-state { width: calc(100vw - 22px); }
  .form-panel, .steps-panel { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .audit-list article { grid-template-columns: 34px 1fr; }
  .audit-meta { grid-column: 2; text-align: left; }
}

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