/* VOLTÁZS member app mock — tokens mirror awg_design_base/base_design.dart */
@font-face { font-family: "Archivo"; src: url("fonts/Archivo-400.ttf"); font-weight: 400; }
@font-face { font-family: "Archivo"; src: url("fonts/Archivo-500.ttf"); font-weight: 500; }
@font-face { font-family: "Archivo"; src: url("fonts/Archivo-600.ttf"); font-weight: 600; }
@font-face { font-family: "Archivo"; src: url("fonts/Archivo-700.ttf"); font-weight: 700; }
@font-face { font-family: "BSD"; src: url("fonts/BigShouldersDisplay-700.ttf"); font-weight: 700; }
@font-face { font-family: "BSD"; src: url("fonts/BigShouldersDisplay-800.ttf"); font-weight: 800; }
@font-face { font-family: "BSD"; src: url("fonts/BigShouldersDisplay-900.ttf"); font-weight: 900; }

:root {
  --bg: #07080A; --surface: #14171B; --surface-alt: #1B1F24; --overlay: #0F1114;
  --fg: #F3EEE8; --fg2: #C9C4BE; --mute: #8A8E95;
  --line: rgba(255,255,255,.08); --line-strong: rgba(255,255,255,.14);
  --accent: #FF5B14; --accent-ink: #FF8A4C; --accent-soft: rgba(255,91,20,.16); --on-accent: #160700;
  --good: #5FD47A; --good-soft: rgba(95,212,122,.14); --warn: #FFC23D; --warn-soft: rgba(255,194,61,.14);
  --bad: #FF4D5E; --bad-soft: rgba(255,77,94,.15); --haze: #2EC4C4; --violet: #B08CFF;
  --glass: rgba(18,20,24,.55);
  --r-s: 12px; --r-m: 16px; --r-l: 20px; --r-xl: 24px;
  --enter: cubic-bezier(.16,1,.3,1); --spring: cubic-bezier(.34,1.56,.64,1);
  --display: "BSD", "Arial Narrow", sans-serif; --body: "Archivo", system-ui, sans-serif;
  --top: 44px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; background: var(--bg); }
body { color: var(--fg); font: 400 15px/1.45 var(--body); -webkit-font-smoothing: antialiased; user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
svg { display: block; }
.ico { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------- app shell */
#app { position: fixed; inset: 0; overflow: hidden; overflow: clip; background: var(--bg); }
#stage { overflow: clip; }
#app::after { /* film grain, design grain .07 */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 60;
  background: url("img/grain.png"); opacity: .07; mix-blend-mode: overlay;
}
.statusbar { position: absolute; top: 0; left: 0; right: 0; height: var(--top); z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 6px 28px 0 34px; font: 600 15px var(--body); pointer-events: none; background: linear-gradient(rgba(7,8,10,.85) 55%, rgba(7,8,10,0)); }
.statusbar .sb-r { display: flex; gap: 6px; align-items: center; }
body.nostatus { --top: 0px; } body.nostatus .statusbar { display: none; }

#stage { position: absolute; inset: 0; }
.page { position: absolute; inset: 0; overflow: hidden; background: var(--bg); will-change: transform, opacity; }
.page > .scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; overscroll-behavior: contain; }
.page > .scroll::-webkit-scrollbar { display: none; }
.page .pad-bottom { height: 120px; }

/* transitions */
.page.tab-in { animation: tabIn 380ms var(--enter) both; }
.page.push-in { animation: pushIn 460ms var(--enter) both; z-index: 2; box-shadow: -30px 0 60px rgba(0,0,0,.6); }
.page.push-under { animation: pushUnder 460ms var(--enter) both; }
.page.pop-out { animation: popOut 380ms var(--enter) both; z-index: 2; }
.page.pop-under { animation: popUnder 380ms var(--enter) both; }
@keyframes tabIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes pushIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes pushUnder { to { transform: translateX(-28%); opacity: .4; } }
@keyframes popOut { to { transform: translateX(100%); } }
@keyframes popUnder { from { transform: translateX(-28%); opacity: .4; } to { transform: none; opacity: 1; } }

/* entrance stagger */
.en { animation: en 460ms var(--enter) both; animation-delay: calc(80ms + var(--i, 0) * 55ms); }
@keyframes en { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------- tab bar */
.tabbar { position: absolute; left: 10px; right: 10px; bottom: 18px; height: 66px; z-index: 40; border-radius: var(--r-xl); display: flex; transition: transform 460ms var(--enter), opacity 300ms; }
.tabbar::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--glass); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border: 1px solid var(--line-strong); box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.tabbar.hidden { transform: translateY(130%); opacity: 0; pointer-events: none; }
.tab { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--mute); font: 600 10.5px var(--body); letter-spacing: .02em; }
.tab .ico { transition: transform 350ms var(--spring), color .2s; }
.tab.on { color: var(--fg); }
.tab.on .ico { color: var(--accent); transform: translateY(-2px) scale(1.08); }
.tab.on::after { content: ""; position: absolute; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.tab-qr { position: relative; flex: 1; display: flex; justify-content: center; }
.tab-qr .qbtn { position: absolute; top: -30px; width: 64px; height: 64px; border-radius: 22px; background: linear-gradient(160deg, #FF7A3D, var(--accent) 55%, #E04500); color: var(--on-accent); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(255,91,20,.45), inset 0 1px 0 rgba(255,255,255,.35); }
.tab-qr .qbtn .ico { width: 28px; height: 28px; stroke-width: 2.2; }
.tab-qr .qbtn::before { content: ""; position: absolute; inset: -6px; border-radius: 28px; border: 2px solid var(--accent); opacity: 0; animation: halo 2.6s ease-out infinite; }
@keyframes halo { 0% { transform: scale(.9); opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }
.tab-qr .lbl { position: absolute; bottom: 9px; font: 600 10.5px var(--body); color: var(--mute); }
.tab-qr.on .lbl { color: var(--fg); }

/* ------------------------------------------------------------- type */
.eyebrow { font: 700 11px var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.eyebrow.acc { color: var(--accent); }
.display { font-family: var(--display); font-weight: 800; text-transform: uppercase; line-height: .9; letter-spacing: .005em; }
.d-xl { font-size: 68px; } .d-l { font-size: 54px; } .d-m { font-size: 34px; } .d-s { font-size: 24px; }
.em { color: var(--accent); }
.num { font-family: var(--display); font-weight: 900; }
.muted { color: var(--mute); } .fg2 { color: var(--fg2); }
.small { font-size: 12.5px; }

/* ------------------------------------------------------------- headers */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: calc(var(--top) + 6px) 16px 10px; background: linear-gradient(var(--bg) 70%, rgba(7,8,10,0)); }
.topbar.over { position: absolute; left: 0; right: 0; background: none; }
.topbar .title { flex: 1; font: 800 22px var(--display); text-transform: uppercase; letter-spacing: .01em; }
.iconbtn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(243,238,232,.06); border: 1px solid var(--line-strong); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); position: relative; }
.iconbtn .dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.lockup { display: flex; align-items: center; gap: 6px; flex: 1; }
.lockup svg { width: 14px; height: 24px; }
.lockup b { font: 900 26px var(--display); letter-spacing: .02em; }

/* ------------------------------------------------------------- hero */
.hero { position: relative; height: 520px; overflow: hidden; }
.hero .img { position: absolute; inset: 0; background-size: cover; background-position: center 30%; animation: ken 24s ease-in-out infinite alternate; }
@keyframes ken { from { transform: scale(1.02); } to { transform: scale(1.14) translate(-2%, -1%); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,8,10,.55) 0%, rgba(7,8,10,0) 26%, rgba(7,8,10,.25) 55%, var(--bg) 100%); }
.hero .glow { position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255,91,20,.28), transparent 65%); left: -90px; bottom: 40px; z-index: 1; animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(60px, -40px); } }
.hero .content { position: absolute; left: 16px; right: 16px; bottom: 22px; z-index: 2; }
.hero .content p { color: var(--fg2); margin-top: 10px; }

/* ------------------------------------------------------------- cards */
.sec { padding: 0 16px; margin-bottom: 14px; }
.card { position: relative; border-radius: var(--r-l); border: 1px solid var(--line); background: linear-gradient(rgba(243,238,232,.045), rgba(243,238,232,.02)); overflow: hidden; }
.card.pad { padding: 16px; }
.pressable { transition: transform 160ms ease; cursor: pointer; }
.pressable:active { transform: scale(.97); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 16px 10px; }
.sec-h h3 { font: 800 24px var(--display); text-transform: uppercase; }
.sec-h a { font: 600 12.5px var(--body); color: var(--accent-ink); cursor: pointer; }

.passcard { display: flex; align-items: center; gap: 16px; padding: 16px; }
.passcard::before { content: ""; position: absolute; top: -60px; right: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(255,91,20,.22), transparent 65%); }
.passcard .sheen { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.07) 50%, transparent 60%); background-size: 250% 100%; animation: sheen 5s 1.2s ease-in-out infinite; }
@keyframes sheen { 0% { background-position: 130% 0; } 40%, 100% { background-position: -30% 0; } }
.ring { position: relative; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; font: 900 21px var(--display); }
.ring circle.prog { animation: ring 1.6s var(--enter) both; }
@keyframes ring { from { stroke-dashoffset: var(--full); } }
.chev { color: var(--mute); margin-left: auto; }
.chev .ico { width: 18px; height: 18px; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font: 700 11px var(--body); letter-spacing: .04em; text-transform: uppercase; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.acc { background: var(--accent-soft); color: var(--accent-ink); }
.badge .pdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.occ-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-left: auto; flex: none; }
.mini-bars i { width: 5px; border-radius: 2px; background: var(--line-strong); }
.mini-bars i.now { background: var(--good); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 8px 16px 18px; }
.tile { position: relative; min-height: 86px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; overflow: hidden; font: 600 11.5px var(--body); }
.tile::before { content: ""; position: absolute; top: -40px; right: -30px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, rgba(255,91,20,.16), transparent 70%); }
.tile .ico { width: 26px; height: 26px; color: var(--accent); }

.classcard { display: flex; gap: 14px; padding: 12px; align-items: center; }
.classcard .thumb { width: 76px; height: 76px; border-radius: 14px; background-size: cover; background-position: center; flex: none; position: relative; }
.classcard .time { font: 900 28px var(--display); line-height: 1; }
.classcard .name { font: 700 15px var(--body); margin-top: 2px; }
.classcard .meta { font-size: 12.5px; color: var(--mute); margin-top: 3px; }
.room-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

.hscroll { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 6px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.hscroll::-webkit-scrollbar { display: none; }
.news { flex: none; width: 250px; scroll-snap-align: start; }
.news .ph { height: 140px; background-size: cover; background-position: center; position: relative; }
.news .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(7,8,10,.8)); }
.news .b { padding: 12px 14px 14px; }
.news .t { font: 700 15px/1.25 var(--body); margin-top: 4px; }

/* ------------------------------------------------------------- buttons */
.btn { height: 54px; border-radius: var(--r-m); padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 800 18px var(--display); text-transform: uppercase; letter-spacing: .03em; width: 100%; transition: transform .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.secondary { background: rgba(243,238,232,.08); border: 1px solid var(--line-strong); }
.btn .ico { width: 20px; height: 20px; }
.chip { height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-strong); background: rgba(243,238,232,.05); font: 600 13px var(--body); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }

/* ------------------------------------------------------------- QR */
.qr-wrap { position: relative; margin: 8px auto 0; width: 268px; height: 268px; padding: 18px; border-radius: 26px; background: #F3EEE8; box-shadow: 0 0 0 1px var(--line-strong), 0 30px 80px rgba(255,91,20,.18); }
.qr-wrap canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; transition: opacity .25s; }
.qr-corner { position: absolute; width: 34px; height: 34px; border: 3px solid var(--accent); }
.qr-corner.tl { top: -12px; left: -12px; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.qr-corner.tr { top: -12px; right: -12px; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.qr-corner.bl { bottom: -12px; left: -12px; border-right: 0; border-top: 0; border-radius: 0 0 0 12px; }
.qr-corner.br { bottom: -12px; right: -12px; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.scanline { position: absolute; left: 10px; right: 10px; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 14px var(--accent); animation: scan 2.4s ease-in-out infinite alternate; top: 14px; }
@keyframes scan { to { top: calc(100% - 16px); } }

/* ------------------------------------------------------------- schedule */
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 4px 16px 14px; }
.day { height: 62px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--line); background: var(--surface); }
.day small { font: 600 11px var(--body); color: var(--mute); }
.day b { font: 900 22px var(--display); }
.day.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.day.on small { color: rgba(22,7,0,.7); }
.day.today:not(.on) { border-color: rgba(255,91,20,.5); }
.slot { display: grid; grid-template-columns: 58px 1fr; gap: 12px; padding: 0 16px; margin-bottom: 10px; }
.slot .t { text-align: right; padding-top: 14px; }
.slot .t b { font: 900 22px var(--display); display: block; line-height: 1; }
.slot .t small { color: var(--mute); font-size: 11.5px; }
.slot .card { padding: 14px 14px 14px 18px; }
.slot .card::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c, var(--accent)); }
.cap { height: 4px; border-radius: 4px; background: var(--line-strong); margin-top: 10px; overflow: hidden; }
.cap i { display: block; height: 100%; background: var(--c, var(--accent)); border-radius: inherit; }

/* ------------------------------------------------------------- occupancy */
.gauge { position: relative; width: 260px; height: 150px; margin: 6px auto 0; }
.gauge .val { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }
.gauge .val b { font: 900 64px/1 var(--display); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding: 0 2px; }
.bars .b { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--surface-alt); position: relative; animation: grow 900ms var(--enter) both; transform-origin: bottom; }
.bars .b.lvl1 { background: rgba(95,212,122,.5); } .bars .b.lvl2 { background: rgba(255,194,61,.55); } .bars .b.lvl3 { background: rgba(255,77,94,.6); }
.bars .b.now { background: var(--accent); box-shadow: 0 0 18px rgba(255,91,20,.5); }
.bars .b.now::after { content: "MOST"; position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font: 700 9px var(--body); letter-spacing: .1em; color: var(--accent-ink); }
@keyframes grow { from { transform: scaleY(0); } }
.hours { display: flex; justify-content: space-between; padding: 6px 2px 0; font-size: 11px; color: var(--mute); }

/* ------------------------------------------------------------- lists / rows */
.row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.row .ic .ico { width: 20px; height: 20px; }
.row .tt { font: 600 15px var(--body); }
.row .st { font-size: 12.5px; color: var(--mute); }
.switch { margin-left: auto; width: 46px; height: 28px; border-radius: 99px; background: var(--surface-alt); border: 1px solid var(--line-strong); position: relative; flex: none; transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--fg2); transition: transform .3s var(--spring), background .25s; }
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on::after { transform: translateX(18px); background: var(--on-accent); }
.avatar { width: 64px; height: 64px; border-radius: 22px; background: linear-gradient(150deg, #FF7A3D, #B83800); display: grid; place-items: center; font: 900 26px var(--display); color: var(--on-accent); }

/* ------------------------------------------------------------- machines */
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.mcard .ph { height: 128px; background-size: cover; background-position: center; position: relative; }
.mcard .ph .b3d { position: absolute; top: 8px; right: 8px; }
.mcard .b { padding: 10px 12px 12px; }
.mcard .n { font: 700 14px/1.25 var(--body); }
.tabs { display: flex; gap: 22px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.tabs button { padding: 12px 0; font: 600 14px var(--body); color: var(--mute); position: relative; }
.tabs button.on { color: var(--fg); }
.tabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.steps { list-style: none; counter-reset: s; padding: 14px 16px 0; }
.steps li { counter-increment: s; display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--fg2); animation: en 400ms var(--enter) both; }
.steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); font: 900 16px/26px var(--display); text-align: center; }
.steps.bad li::before { content: "!"; background: var(--bad-soft); color: var(--bad); }
.player { position: relative; height: 300px; overflow: hidden; background: radial-gradient(ellipse at 50% 70%, rgba(255,91,20,.35), transparent 60%), #0A0B0D; display: grid; place-items: center; }
.player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--enter); }
.player .orbit { position: absolute; width: 260px; height: 80px; border: 2px solid rgba(255,91,20,.6); border-radius: 50%; bottom: 40px; }
.player .ctrl { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line-strong); backdrop-filter: blur(10px); }
.player .ctrl button { height: 34px; min-width: 40px; padding: 0 10px; border-radius: 99px; font: 700 12px var(--body); display: grid; place-items: center; }
.player .ctrl .ico { width: 16px; height: 16px; }
.player.playing img { animation: press 2.4s ease-in-out infinite; }
@keyframes press { 50% { transform: translate(-10px, 8px) rotate(-2deg); } }

/* ------------------------------------------------------------- chat */
.chat { display: flex; flex-direction: column; gap: 10px; padding: 6px 16px 16px; }
.msg { max-width: 84%; padding: 12px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; animation: en 360ms var(--enter) both; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; font-weight: 500; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; color: var(--fg2); }
.msg .lnk { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); font-weight: 600; border-bottom: 1px dashed rgba(255,138,76,.5); cursor: pointer; }
.msg-sep { align-self: center; font: 700 10.5px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); padding: 6px 0; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); animation: typ 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typ { 50% { transform: translateY(-4px); opacity: .4; } }
.composer { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 0 26px; background: linear-gradient(rgba(7,8,10,0), var(--bg) 26%); }
.composer .in { display: flex; gap: 8px; padding: 10px 16px 0; }
.composer input { flex: 1; height: 50px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 16px; outline: none; }
.composer input:focus { border-color: var(--accent); }
.composer .send { width: 50px; height: 50px; border-radius: 16px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }

/* ------------------------------------------------------------- plan / log */
.weekstrip { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; padding: 0 16px 14px; }
.wd { height: 54px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; font: 600 11px var(--body); color: var(--mute); gap: 3px; }
.wd i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.wd.train i { background: var(--accent); }
.wd.on { border-color: var(--accent); color: var(--fg); background: var(--accent-soft); }
.ex { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ex:last-child { border-bottom: 0; }
.ex .ph { width: 52px; height: 52px; border-radius: 12px; background-size: cover; background-position: center; flex: none; }
.ex .n { font: 600 14.5px var(--body); }
.ex .d { font-size: 12.5px; color: var(--mute); }
.ex .kg { margin-left: auto; text-align: right; font: 900 22px var(--display); }
.ex .kg small { display: block; font: 500 11px var(--body); color: var(--mute); }
.opt { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 10px; }
.opt .rad { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); margin-left: auto; flex: none; transition: .2s; }
.opt.on { border-color: var(--accent); background: linear-gradient(rgba(255,91,20,.12), rgba(255,91,20,.04)); }
.opt.on .rad { border-color: var(--accent); box-shadow: inset 0 0 0 5px var(--accent); }
.progress { display: flex; gap: 6px; padding: 0 16px 18px; }
.progress i { flex: 1; height: 4px; border-radius: 4px; background: var(--line-strong); }
.progress i.on { background: var(--accent); }
.spinner { width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--line-strong); border-top-color: var(--accent); animation: spin 0.9s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.chart { padding: 10px 6px 4px; }
.chart path.line { stroke-dasharray: 900; animation: draw 1.8s var(--enter) both; }
@keyframes draw { from { stroke-dashoffset: 900; } to { stroke-dashoffset: 0; } }
.stat3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding: 0 16px 14px; }
.stat3 .card { padding: 12px; }
.stat3 b { font: 900 28px/1 var(--display); display: block; margin-top: 6px; }
.fab { position: absolute; right: 18px; bottom: 100px; z-index: 35; height: 54px; padding: 0 20px 0 16px; border-radius: 18px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; gap: 8px; font: 800 17px var(--display); text-transform: uppercase; box-shadow: 0 14px 34px rgba(255,91,20,.4); animation: en 460ms 300ms var(--enter) both; }

/* ------------------------------------------------------------- sheet / toast */
.scrim { position: absolute; inset: 0; z-index: 70; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .3s; }
.scrim.on { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 71; background: var(--overlay); border-top: 1px solid var(--line-strong); border-radius: 26px 26px 0 0; padding: 10px 16px 30px; transform: translateY(100%); visibility: hidden; transition: transform 460ms var(--enter), visibility 0s 460ms; max-height: 86%; overflow-y: auto; }
.sheet.on { transform: none; visibility: visible; transition: transform 460ms var(--enter), visibility 0s; }
.sheet .grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line-strong); margin: 0 auto 14px; }
.stepper { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stepper .ctl { display: flex; align-items: center; gap: 14px; }
.stepper .ctl button { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-alt); border: 1px solid var(--line-strong); font: 700 20px var(--body); }
.stepper .ctl b { font: 900 28px var(--display); min-width: 64px; text-align: center; }
.toast { position: absolute; left: 50%; top: calc(var(--top) + 10px); z-index: 80; transform: translate(-50%, -140%); background: var(--surface-alt); border: 1px solid var(--line-strong); border-radius: 16px; padding: 12px 16px; display: flex; gap: 10px; align-items: center; font: 600 13.5px var(--body); box-shadow: 0 20px 50px rgba(0,0,0,.6); transition: transform 460ms var(--spring), opacity .3s, visibility .5s; white-space: nowrap; opacity: 0; visibility: hidden; }
.toast.on { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast .ico { color: var(--good); width: 20px; height: 20px; }
.success { text-align: center; padding: 20px 0 6px; }
.success .ok { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 16px; background: var(--good-soft); color: var(--good); display: grid; place-items: center; animation: pop .6s var(--spring) both; }
.success .ok .ico { width: 40px; height: 40px; stroke-width: 2.6; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }

/* ------------------------------------------------------------- splash */
#splash { position: absolute; inset: 0; z-index: 90; background: var(--bg); display: grid; place-items: center; transition: opacity .5s .1s, visibility .6s; }
#splash.off { opacity: 0; visibility: hidden; }
#splash .in { text-align: center; }
#splash svg { width: 40px; height: 70px; margin: 0 auto 12px; filter: drop-shadow(0 0 24px rgba(255,91,20,.7)); animation: pop .7s var(--spring) both; }
#splash b { font: 900 44px var(--display); letter-spacing: .04em; display: block; animation: en .6s .2s var(--enter) both; }
#splash small { color: var(--mute); animation: en .6s .35s var(--enter) both; display: block; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; } }

/* standalone preview on a wide screen: center a phone-sized canvas (hosts embed at 390x844) */
@media (min-width: 560px) {
  html, body { background: radial-gradient(ellipse at 50% 30%, #1a1210, #050506 70%); }
  #app { left: 50%; top: 50%; right: auto; bottom: auto; width: 390px; height: min(844px, 100vh); transform: translate(-50%, -50%); border-radius: 44px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 40px 120px rgba(0,0,0,.8); }
}
