:root {
  --bg: #0E1012; --bg2: #13161A; --panel: #181B20; --panel2: #1F2329; --panel3: #262B32;
  --line: #2B3038; --line2: #363C45; --text: #ECE9E2; --muted: #9AA0A8; --faint: #6A7078;
  --accent: #FF7A1A; --accent2: #FFB347; --accent-ink: #1A0F05; --accent-soft: rgba(255,122,26,.14);
  --good: #3FBF6E; --warn: #F2B33D; --bad: #EF5A45; --focus: rgba(255,122,26,.5);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Bahnschrift", "DIN Alternate", "Barlow Semi Condensed", system-ui, sans-serif; font-weight: 600; margin: 0 0 6px; letter-spacing: .2px; }
h1 { font-size: 28px; } h2 { font-size: 21px; } h3 { font-size: 17px; }
a { color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: 14px; } .tiny { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.kicker { font-size: 12px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: var(--bg2); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 18px; }
.brand b { font-family: "Bahnschrift", "DIN Alternate", system-ui, sans-serif; font-weight: 600; }
.mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.grow { flex: 1; }
.who { color: var(--muted); font-size: 14px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.view { max-width: 980px; margin: 0 auto; padding: 22px 16px 60px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 16px; }
.card.narrow { max-width: 440px; margin: 8vh auto 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.stack > * + * { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } h1 { font-size: 24px; } }

label.field { display: block; }
label.field span { display: block; font-size: 14px; color: var(--muted); margin: 0 0 5px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], select {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; }
input:focus, select:focus, button:focus-visible, .btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px;
  border-radius: 11px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; touch-action: manipulation; user-select: none; }
.btn:hover { background: var(--panel3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent2); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn input[type=file] { display: none; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list a { display: flex; gap: 12px; align-items: center; padding: 14px 4px; color: var(--text); text-decoration: none; min-height: 56px; }
.list a:hover { background: var(--panel2); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; background: var(--panel3); color: var(--muted); white-space: nowrap; }
.pill.good { background: rgba(63,191,110,.15); color: var(--good); }
.pill.warn { background: rgba(242,179,61,.15); color: var(--warn); }

.drop { border: 2px dashed var(--line2); border-radius: var(--radius); padding: 22px 16px; text-align: center; background: var(--bg2); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

.switch { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; }
.switch input { width: 24px; height: 24px; accent-color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 26px; font-family: "Bahnschrift", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13.5px; color: var(--muted); }

.progress { height: 10px; border-radius: 99px; background: var(--panel3); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; }
.steps .dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); margin-top: 1px; display: grid; place-items: center; font-size: 13px; }
.steps li.on .dot { border-color: var(--accent); border-top-color: transparent; animation: spin .9s linear infinite; }
.steps li.done .dot { background: var(--good); border-color: var(--good); color: #08140C; }
.steps li.done .dot::after { content: "✓"; font-weight: 800; }
.steps li.bad .dot { background: var(--bad); border-color: var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .steps li.on .dot { animation: none; border-top-color: var(--accent); } }

.note { border-left: 4px solid var(--warn); background: rgba(242,179,61,.08); padding: 10px 14px; border-radius: 8px; }
.note.bad { border-color: var(--bad); background: rgba(239,90,69,.08); }
.note.good { border-color: var(--good); background: rgba(63,191,110,.08); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.thumbs figure { margin: 0; background: var(--bg2); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.thumbs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--panel3); }
.thumbs figcaption { font-size: 12px; color: var(--muted); padding: 4px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--panel3); color: var(--text);
  border: 1px solid var(--line2); border-radius: 12px; padding: 12px 16px; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.45); z-index: 20; }
.err { color: var(--bad); min-height: 1.5em; }
.hide { display: none !important; }
