/* HONOR local prototype — styles follow the HONOR Brand Book v2 */
:root {
  color-scheme: dark;
  --ink-0: #08090a;
  --ink-1: #0d0f11;
  --card: #16181c;
  --card-2: #1f2227;
  --stroke: #2a2d33;
  --text: #f2f3ee;
  --muted: #9a9da3;
  --volt: #d4ff3a;
  --volt-press: #bfe82c;
  --volt-glow: rgba(212, 255, 58, 0.28);
  --gold: #e9b949;
  --gold-glow: rgba(233, 185, 73, 0.3);
  --flare: #ff6a3d;
  --flag: #ff6b6b;
  --on-volt: #0b0c0d;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 26px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--ink-0); color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--volt); outline-offset: 2px; border-radius: 8px; }

/* shell */
.shell { max-width: 460px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--ink-1); position: relative; }
@media (min-width: 620px) {
  body { background: radial-gradient(60% 60% at 50% 0%, rgba(212,255,58,.08), transparent 70%), var(--ink-0); }
  .shell { border-left: 1px solid var(--stroke); border-right: 1px solid var(--stroke); }
}
.appbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: rgba(13,15,17,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--stroke); }
.view { flex: 1; padding: 18px 18px 120px; display: flex; flex-direction: column; gap: 14px; }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 460px; z-index: 20; padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, rgba(8,9,10,.95) 30%); }
.tabbar nav { display: flex; justify-content: space-around; align-items: center; background: var(--card); border: 1px solid var(--stroke); border-radius: 28px; padding: 8px; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 8px; }
.tabbar a.on { color: var(--volt); }
.tabbar svg { width: 20px; height: 20px; }
.tabbar .fab { width: 50px; height: 50px; border-radius: 50%; background: var(--volt); color: var(--on-volt); display: grid; place-items: center; box-shadow: 0 0 26px var(--volt-glow); padding: 0; }
.tabbar .fab svg { width: 24px; height: 24px; }

/* wordmark */
.wordmark { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.02em; line-height: .82; display: inline-flex; align-items: baseline; font-size: 28px; }
.wordmark .o { display: inline-block; width: .6em; height: .74em; margin: 0 .02em; color: var(--volt); transform: skewX(-10deg) translateY(.02em); }
.who { display: flex; align-items: center; gap: 8px; }
.who select { background: var(--card); border: 1px solid var(--stroke); border-radius: 999px; padding: 6px 30px 6px 12px; font-size: 13px; font-weight: 600; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; max-width: 170px; }
.who .lbl { font-family: var(--display); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; color: var(--muted); }

/* type */
.eyebrow { font-family: var(--display); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: 13px; color: var(--volt); }
.title { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 40px; line-height: .9; letter-spacing: -.01em; }
.title em { color: var(--volt); font-style: italic; }
.h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 24px; line-height: 1; letter-spacing: .01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.row-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.row-head a { font-size: 13px; font-weight: 600; color: var(--volt); }

/* cards */
.card { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.link { transition: border-color .15s, transform .15s; }
.card.link:hover { border-color: #3b3f46; }
.card.link:active { transform: scale(.99); }
.card.volt { background: var(--volt); color: var(--on-volt); border-color: var(--volt); }
.card.volt .muted { color: #3a4214; }
.card.gold { border-color: rgba(233,185,73,.55); box-shadow: 0 0 30px rgba(233,185,73,.12); }
.card.flare { border-color: rgba(255,106,61,.6); }
.split { display: flex; align-items: center; gap: 14px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.big { font-size: 30px; line-height: 1; }
.huge { font-size: 64px; line-height: .9; color: var(--volt); text-shadow: 0 0 36px var(--volt-glow); }
.stat-lbl { font-size: 11px; font-weight: 600; color: var(--muted); }

/* tags & pills */
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-family: var(--display); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--card-2); color: var(--text); white-space: nowrap; }
.tag.v { background: var(--volt); color: var(--on-volt); }
.tag.f { background: var(--flare); color: #1d0b04; }
.tag.g { background: var(--gold); color: #1d1503; }
.tag.ok { color: var(--volt); }
.tag.flag { background: transparent; color: var(--flag); box-shadow: inset 0 0 0 1.5px var(--flag); }
.seg { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--stroke); border-radius: 999px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.seg a { flex: 1; text-align: center; font-family: var(--display); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; padding: 8px 12px; border-radius: 999px; color: var(--muted); white-space: nowrap; }
.seg a.on { background: var(--volt); color: var(--on-volt); }

/* buttons */
.btn { display: flex; justify-content: center; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 15px 20px; font-family: var(--display); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 17px; background: var(--volt); color: var(--on-volt); width: 100%; }
.btn:hover { background: var(--volt-press); }
.btn.ghost { background: var(--card-2); color: var(--text); }
.btn.ghost:hover { background: #2a2e34; }
.btn.line { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--stroke); }
.btn.sm { padding: 10px 14px; font-size: 14px; width: auto; }
.btn.danger { background: transparent; color: var(--flag); box-shadow: inset 0 0 0 1.5px var(--flag); }
.btn-row { display: flex; gap: 8px; }
.btn-row > * { flex: 1; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { color: var(--flag); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lbl { font-family: var(--display); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input { background: var(--card-2); border: 1px solid var(--stroke); border-radius: var(--r-sm); padding: 13px 14px; width: 100%; font-size: 16px; }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--volt); outline: none; }
.input.bigtime { font-family: var(--display); font-weight: 800; font-size: 44px; text-align: center; letter-spacing: .02em; padding: 10px; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 12px; align-items: flex-start; background: var(--card-2); border: 1px solid var(--stroke); border-radius: var(--r-sm); padding: 13px 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--volt); margin: 2px 0 0; flex: none; }
.check b { display: block; font-size: 14px; }
.check span { font-size: 13px; color: var(--muted); }
.radio-row { display: flex; gap: 6px; }
.radio-row label { flex: 1; }
.radio-row input { position: absolute; opacity: 0; pointer-events: none; }
.radio-row span { display: block; text-align: center; padding: 11px 8px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--stroke); font-family: var(--display); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; cursor: pointer; }
.radio-row input:checked + span { background: var(--volt); color: var(--on-volt); border-color: var(--volt); }
.radio-row input:focus-visible + span { outline: 3px solid var(--volt); outline-offset: 2px; }
.err { color: var(--flag); font-size: 13px; font-weight: 600; min-height: 1em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* hero panel */
.hero { border-radius: var(--r-lg); min-height: 210px; position: relative; overflow: hidden; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; background: radial-gradient(80% 90% at 90% 0%, rgba(212,255,58,.22), transparent 55%), radial-gradient(70% 80% at 0% 100%, #24272d, #0b0c0d 70%); border: 1px solid var(--stroke); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22; mix-blend-mode: overlay; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.hero > * { position: relative; z-index: 1; }
.hero .back { position: absolute; top: 14px; left: 14px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; }
.hero .t { font-family: var(--display); font-weight: 900; font-size: 88px; line-height: .8; color: var(--volt); text-shadow: 0 0 36px var(--volt-glow); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero .l { font-family: var(--display); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }

.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.stat3 > div + div { border-left: 1px solid var(--stroke); }
.stat3 b { display: block; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat3 span { font-size: 11px; color: var(--muted); font-weight: 600; }

/* leaderboard */
.lb { display: flex; flex-direction: column; gap: 8px; }
.lbr { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--stroke); border-radius: 18px; padding: 10px 12px; }
.lbr .rk { font-family: var(--display); font-weight: 900; font-size: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.lbr .nm { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.lbr .nm b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbr .nm small { font-size: 11px; color: var(--muted); font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lbr .bar { height: 6px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.lbr .bar i { display: block; height: 100%; border-radius: 999px; background: var(--volt); }
.lbr .tm { font-family: var(--display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; text-align: right; }
.lbr.gold { border-color: rgba(233,185,73,.55); box-shadow: 0 0 22px rgba(233,185,73,.12); }
.lbr.gold .rk { color: var(--gold); }
.lbr.gold .bar i { background: var(--gold); }
.lbr.me { background: var(--volt); color: var(--on-volt); border-color: var(--volt); }
.lbr.me .bar { background: rgba(0,0,0,.18); }
.lbr.me .bar i { background: var(--on-volt); }
.lbr.me .nm small { color: #3a4214; }
.lbr.me .linkbtn { color: #3a4214; }

/* challenge list */
.ch { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: end; }
.ch .nm { font-size: 17px; font-weight: 700; }
.ch .val { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; color: var(--volt); text-align: right; font-variant-numeric: tabular-nums; }
.ch .val small { display: block; font-family: var(--body); font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: 0; text-align: right; margin-top: 4px; }

/* champion */
.champ { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 4px; text-align: center; }
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--volt); flex: none; }
.av.xl { width: 92px; height: 92px; font-size: 34px; }
.av.gold { color: var(--gold); box-shadow: 0 0 0 3px var(--gold), 0 0 40px var(--gold-glow); background: radial-gradient(circle at 40% 35%, #3a3d44, #121417); }
.av.me { background: var(--volt); color: var(--on-volt); }
.champ b { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 26px; line-height: 1; }
.champ small { font-size: 11px; color: var(--gold); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* ring */
.ring { flex: none; }

/* points breakdown */
.pts { display: flex; flex-direction: column; }
.pts > div { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--stroke); font-size: 14px; }
.pts > div:first-child { border-top: 0; }
.pts b { font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--volt); }
.pts .total b { font-size: 26px; }
.card.volt .pts b { color: var(--on-volt); }
.card.volt .pts > div { border-color: rgba(0,0,0,.15); }

/* full screens */
.full { min-height: 100vh; display: flex; flex-direction: column; max-width: 460px; margin: 0 auto; padding: 22px 22px calc(28px + env(safe-area-inset-bottom, 0px)); }
.full.voltbg { background: var(--volt); color: var(--on-volt); }
.full .go { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 8px; }
.count { font-family: var(--display); font-weight: 900; font-size: 280px; line-height: .78; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.clock { font-family: var(--display); font-weight: 900; font-size: 104px; line-height: .85; color: var(--volt); text-shadow: 0 0 50px var(--volt-glow); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.full .gl { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 40px; line-height: .9; }
.target-line { font-family: var(--display); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 15px; color: var(--muted); }
.prog { height: 8px; border-radius: 999px; background: var(--card-2); overflow: hidden; width: 100%; margin-top: 16px; }
.prog i { display: block; height: 100%; background: var(--volt); border-radius: 999px; width: 0; }

/* onboarding */
.onb { min-height: 100vh; max-width: 460px; margin: 0 auto; padding: 40px 22px 40px; display: flex; flex-direction: column; gap: 22px; background: radial-gradient(70% 45% at 85% 5%, rgba(212,255,58,.16), transparent 70%), var(--ink-1); }
.onb .wordmark { font-size: 96px; }
.onb .slogan { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 40px; line-height: .92; }
.onb .slogan span { display: block; }
.onb .slogan .v { color: var(--volt); text-shadow: 0 0 30px var(--volt-glow); }
.setup { gap: 20px; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opts.many { display: grid; grid-template-columns: 1fr 1fr; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: flex; flex-direction: column; gap: 2px; padding: 15px 16px; border-radius: var(--r-md); background: var(--card); border: 1.5px solid var(--stroke); transition: border-color .15s, background .15s; height: 100%; }
.opt b { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 22px; line-height: 1.05; letter-spacing: .01em; }
.opt small { font-size: 13px; color: var(--muted); }
.opt input:checked + span { border-color: var(--volt); background: rgba(212,255,58,.08); box-shadow: 0 0 0 1px var(--volt) inset; }
.opt input:checked + span b { color: var(--volt); }
.opt input:focus-visible + span { outline: 3px solid var(--volt); outline-offset: 2px; }
.focus { border-color: rgba(212,255,58,.45); background: radial-gradient(80% 100% at 100% 0%, rgba(212,255,58,.12), transparent 60%), var(--card); }
.intro { min-height: 100vh; }
.intro-art { flex: 1; min-height: 280px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; text-align: center; }
.dots { display: flex; gap: 8px; justify-content: center; }
.dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--stroke); transition: width .2s, background .2s; }
.dots i.on { width: 28px; background: var(--volt); }
.code { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 22px; line-height: 1; }

/* misc */
.empty { text-align: center; padding: 26px 16px; color: var(--muted); border: 1.5px dashed var(--stroke); border-radius: var(--r-lg); font-size: 14px; }
.divider { height: 1px; background: var(--stroke); margin: 6px 0; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 14px; }
.kv b { font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--volt); text-align: right; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search .input { padding-left: 42px; }
#toast { position: fixed; left: 50%; bottom: 104px; transform: translate(-50%, 20px); background: var(--text); color: var(--ink-0); padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; gap: 8px; }
.vs-mid { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 22px; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); }
.respect { border: 0; background: var(--card-2); color: var(--text); border-radius: 999px; padding: 3px 10px; font-family: var(--display); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; line-height: 1.4; }
.respect:hover { background: #2a2e34; }
.respect.on { background: var(--volt); color: var(--on-volt); }
.lbr.me .respect-count { color: #3a4214; }
.respect-count { font-weight: 700; }
.btn.xl { padding: 24px 20px; font-size: 26px; }
.share-img { width: 100%; max-width: 340px; aspect-ratio: 9 / 16; border-radius: var(--r-lg); border: 1px solid var(--stroke); align-self: center; background: var(--card); object-fit: cover; }
.timer-sound { text-decoration: none; font-family: var(--display); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 12px; color: #333a12; }
.devnote { font-size: 12px; color: var(--muted); border-left: 3px solid var(--volt); padding-left: 10px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
