@font-face { font-family: 'Kinetic'; src: url('/fonts/Kinetic-Light.otf') format('opentype'); font-weight: 300 500; font-display: swap; }
@font-face { font-family: 'Kinetic'; src: url('/fonts/Kinetic-Bold.otf') format('opentype'); font-weight: 600 800; font-display: swap; }

:root {
  --bg: #0a0a0b;
  --surface: #131315;
  --surface-2: #1a1a1d;
  --line: #26262b;
  --line-strong: #36363d;
  --text: #f4f4f5;
  --muted: #9a9aa3;
  --faint: #8b8b95;
  --accent: #ffffff;
  --accent-text: #0a0a0b;
  --danger: #ff5c5c;
  --ok: #3ddc84;
  --warn: #ffb547;
  --info: #5ca8ff;
  --violet: #b48cff;
  --radius: 12px;
  --brand: linear-gradient(90deg, #ff2d2d, #2dff6a 50%, #2d5bff);
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: 'Kinetic', var(--sans);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.brand-bar { height: 3px; background: var(--brand); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.display { font-family: var(--display); letter-spacing: .01em; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: .01em; }
h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.15; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
h3 { font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.lead { color: var(--muted); margin: 8px 0 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.site-head { padding: 28px 0 8px; }
.site-head img { height: 22px; display: block; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 12px; }
.section { margin-top: 28px; }
.section > h2 { margin-bottom: 12px; display: flex; gap: 10px; align-items: baseline; }
.section > h2 .num { color: var(--faint); }

.grid { display: grid; gap: 14px; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

.field label, .label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.field label .req { color: var(--danger); }
.hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.input, .select, .textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 11px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { resize: vertical; min-height: 84px; }
.input:focus, .select:focus, .textarea:focus { border-color: #8a8a94; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.input::placeholder, .textarea::placeholder { color: #73737d; }
.field.invalid .input, .field.invalid .textarea { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 12px; margin-top: 5px; display: none; }
.field.invalid .err { display: block; }
input[type=date].input { color-scheme: dark; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 9px;
  padding: 10px 14px; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { border-color: #4a4a52; background: #222226; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn-primary:hover { background: #e6e6e8; border-color: #e6e6e8; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-wa { background: #25d366; border-color: #25d366; color: #062b14; }
.btn-wa:hover { background: #1fbe5b; border-color: #1fbe5b; }
.btn-lg { padding: 14px 20px; font-size: 15px; width: 100%; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-dashed { width: 100%; border-style: dashed; background: transparent; color: var(--muted); }
.btn-dashed:hover { color: var(--text); }
.icon { width: 16px; height: 16px; flex: none; }

/* LED size row */
.led-row { display: grid; grid-template-columns: 1fr 84px 14px 84px auto; gap: 8px; align-items: center; }
.led-row .x { text-align: center; color: var(--faint); }
.led-row .px { grid-column: 1 / -1; font-size: 12px; color: var(--faint); margin-top: -2px; }
.led-row + .led-row { margin-top: 10px; }
.led-pair { display: grid; grid-template-columns: 84px 14px 84px auto; gap: 8px; align-items: center; }
.led-pair .x { text-align: center; color: var(--faint); }
@media (max-width: 480px) { .led-row { grid-template-columns: 1fr 64px 10px 64px auto; } }

/* Visual items */
.item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.item + .item { margin-top: 10px; }
.item.on { border-color: var(--line-strong); }
.item-head { display: flex; align-items: center; gap: 12px; padding: 15px 16px; cursor: pointer; user-select: none; }
.item-head .name { font-weight: 600; flex: 1; }
.item-head .desc { display: block; font-weight: 400; color: var(--faint); font-size: 13px; }
.item-head input[type=text] { flex: 1; }
.item-body { padding: 4px 16px 18px; display: none; border-top: 1px solid var(--line); padding-top: 16px; }
.item.on .item-body { display: block; }
.check { appearance: none; width: 20px; height: 20px; border: 1.5px solid var(--line-strong); border-radius: 6px; display: grid; place-items: center; flex: none; cursor: pointer; margin: 0; }
.check:checked { background: var(--accent); border-color: var(--accent); }
.check:checked::after { content: ''; width: 10px; height: 6px; border: 2px solid var(--accent-text); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }

.speaker { border: 1px solid var(--line); border-radius: 10px; padding: 14px; position: relative; background: var(--bg); }
.speaker + .speaker { margin-top: 10px; }
.speaker .tag { font-size: 12px; color: var(--faint); margin-bottom: 10px; font-weight: 600; }
.speaker .remove { position: absolute; top: 8px; right: 8px; }

.upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.upload input[type=file] { display: none; }
.upload .status { font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.upload .status.ok { color: var(--ok); }
.upload .status.bad { color: var(--danger); }
.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; width: 120px; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line-strong); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--warn); }
.switch:checked::after { transform: translateX(18px); }

.submit-bar { margin: 28px 0 60px; }
.form-error { background: rgba(255,92,92,.1); border: 1px solid rgba(255,92,92,.35); color: #ffb3b3; padding: 12px 14px; border-radius: 9px; font-size: 14px; margin-bottom: 12px; }

/* Status badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; line-height: 1.4; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-new { color: var(--info); }
.s-progress { color: var(--violet); }
.s-review { color: var(--warn); }
.s-revision { color: var(--danger); }
.s-done { color: var(--ok); }
.rush { color: var(--warn); border-color: rgba(255,181,71,.4); }
.rush::before { display: none; }

/* Timeline */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; }
.steps div { font-size: 12px; color: var(--faint); padding-top: 10px; border-top: 3px solid var(--line); }
.steps div.done { color: var(--text); border-top-color: var(--accent); }
.steps div.now { color: var(--text); font-weight: 700; border-top-color: var(--accent); }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 10px; } }

.link { color: var(--info); text-decoration: none; overflow-wrap: anywhere; }
.link:hover { text-decoration: underline; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 9px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; }
.toast.show { opacity: 1; transform: translateX(-50%); }

.center-screen { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 0; }
.success-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--ok); color: #062b14; display: grid; place-items: center; margin: 0 auto 18px; }

@media print {
  body { background: #fff; color: #000; }
  .no-print { display: none !important; }
  .card { border-color: #ccc; background: #fff; }
  .muted, .faint, .kv dt { color: #555; }
  .link { color: #0645ad; }
}
.btn input[type=radio] { accent-color: #fff; margin: 0; }

/* ---------- v2.1 form layout ---------- */
.hp { position: absolute; left: -9999px; }
.opt { font-weight: 400; text-transform: none; letter-spacing: 0; }
.layout { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 680px); gap: 56px; max-width: 1180px; margin: 0 auto; padding: 0 24px; justify-content: center; }
.side-in { position: sticky; top: 0; padding: 40px 0 40px; max-height: 100vh; overflow-y: auto; }
.side .logo { height: 22px; display: block; margin-bottom: 40px; }
.side h1 { font-size: 30px; }
.main { padding: 40px 0 140px; min-width: 0; }
.main > form > .section:first-of-type { margin-top: 0; }

.progress-nav { display: grid; gap: 2px; margin: 32px 0; border-left: 1px solid var(--line); }
.progress-nav a { display: flex; align-items: center; gap: 12px; padding: 8px 14px; text-decoration: none; color: var(--muted); font-size: 14px; margin-left: -1px; border-left: 2px solid transparent; }
.progress-nav a:hover { color: var(--text); }
.progress-nav a.current { color: var(--text); border-left-color: var(--text); }
.progress-nav .dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.progress-nav a.done .dot { background: var(--ok); border-color: var(--ok); color: #062b14; font-size: 0; }
.progress-nav a.done .dot::after { content: '✓'; font-size: 12px; }

.how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.how li { counter-increment: s; display: grid; grid-template-columns: 22px 1fr; column-gap: 12px; font-size: 14px; }
.how li::before { content: counter(s); grid-row: span 2; color: var(--faint); font-family: var(--display); font-weight: 700; }
.how li span { color: var(--faint); font-size: 13px; }
.help { display: inline-block; margin-top: 28px; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.help:hover { color: var(--text); }

.sec-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.sec-num { font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--faint); padding-top: 2px; }
.sec-head h2 { font-size: 18px; text-transform: none; letter-spacing: .01em; color: var(--text); }
.sec-head p { margin: 2px 0 0; color: var(--faint); font-size: 14px; }
.section { margin-top: 44px; scroll-margin-top: 24px; }

.rush-row { cursor: pointer; padding: 14px; margin: 2px -4px 0; border-radius: 10px; border: 1px solid var(--line); }
.rush-row .t { display: block; font-weight: 600; }
.rush-row:has(.switch:checked) { border-color: rgba(255,181,71,.45); background: rgba(255,181,71,.06); }
.note-warn { font-size: 13px; color: var(--warn); }

/* drop zone */
.drop { margin-top: 8px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 9px; color: var(--muted); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; min-width: 0; position: relative; }
.drop:hover, .drop.over { border-color: #6a6a73; background: var(--surface-2); color: var(--text); }
.drop input[type=file] { display: none; }
.drop .status { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.drop .status u { text-underline-offset: 2px; }
.drop.ok { border-style: solid; border-color: rgba(61,220,132,.4); color: var(--ok); }
.drop.bad { border-color: rgba(255,92,92,.5); color: var(--danger); }
.drop.busy { cursor: progress; }
.drop .bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--text); width: 0; transition: width .1s; border-radius: 2px; }
.drop .clear { margin-left: auto; color: var(--muted); padding: 2px; background: none; border: 0; cursor: pointer; display: flex; }
.drop .clear:hover { color: var(--text); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.chip { border: 1px solid var(--line-strong); background: transparent; border-radius: 99px; padding: 4px 10px; font-size: 13px; cursor: pointer; color: var(--muted); }
.chip:hover { color: var(--text); border-color: #55555d; }

/* items */
.item-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; flex: none; color: var(--muted); }
.item.on .item-icon { background: var(--text); color: var(--bg); border-color: var(--text); }
.item-head .check { order: 3; }
.item-head .chev { color: var(--faint); transition: transform .15s; order: 4; }
.item-body .field + .field { margin-top: 0; }

/* bottom dock */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(10,10,11,.88); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.dock-in { max-width: 1180px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.dock-sum { font-size: 14px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-sum strong { color: var(--text); }
.dock .btn { padding: 11px 22px; }
.draft-note { text-align: center; margin-top: 28px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,.65); }
.modal-panel { position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 22px; animation: pop .15s ease-out; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal-panel h3 { margin-bottom: 14px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.review-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: 14px; }
.review-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.review-list li span:last-child { color: var(--muted); text-align: right; }
.review-warn { margin-top: 12px; font-size: 13px; color: var(--warn); }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding: 0 16px; max-width: 720px; }
  .side-in { position: static; padding: 28px 0 0; max-height: none; }
  .side .logo { margin-bottom: 28px; }
  .side h1 { font-size: 26px; }
  .progress-nav, .how, .help { display: none; }
  .main { padding-top: 32px; }
  .dock-in { padding: 10px 16px; justify-content: space-between; }
}
.item-body.grid { gap: 18px; }

/* tracking */
.status-card { padding: 22px; border-radius: 16px; border: 1px solid rgba(255,255,255,.14); background: rgba(10,10,12,.55); backdrop-filter: blur(14px); margin-top: 28px; }
.status-card .next { font-size: 15px; margin-top: 10px; color: rgba(255,255,255,.8); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.timeline li::after { content: ''; position: absolute; left: 7px; top: 18px; bottom: 2px; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li:first-child::before { background: var(--text); }
.timeline .at { color: var(--faint); font-size: 12px; display: block; }
.done-tag { font-size: 12px; color: var(--ok); font-weight: 600; white-space: nowrap; }
.meter { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 10px; }
.meter span { display: block; height: 100%; background: var(--ok); }
.addition { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.addition:first-child { border-top: 0; padding-top: 0; }
