@font-face { font-family: 'Alexandria'; src: url('../assets/fonts/Alexandria-Variable.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  --green: #11EA91; --green-600: #2FCA91; --green-700: #2AB381; --mint: #DBFBEE; --mint-ink: #10451D;
  --purple: #6C2D90; --ink: #101010; --slate: #4A4863; --gray: #F8F8F8; --g200: #D2D1D3; --g300: #BCBBBE; --red: #EB4335;
  --shadow: 0 10px 30px rgba(16, 16, 16, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Alexandria', system-ui, sans-serif; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; line-height: 1.5; }
body[data-view="map"], body[data-view="all"] { background: var(--ink); overflow: hidden; }
body[data-view="kiosk"], body[data-view="dashboard"] { overflow: hidden; }
button { font: inherit; cursor: pointer; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; color: var(--purple); }
.wordmark { height: 1em; width: auto; display: inline-block; vertical-align: -0.1em; }
.card { background: var(--gray); border-radius: 20px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--mint); color: var(--mint-ink); padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; }

/* Buttons */
.btn { height: 48px; padding: 0 22px; border-radius: 12px; border: 2px solid transparent; background: var(--green); color: var(--ink); font-weight: 500;
  letter-spacing: .25px; text-transform: uppercase; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; transition: background .15s, transform .1s, border-color .15s; white-space: nowrap; }
.btn:hover { background: var(--green-600); }
.btn:active { background: var(--green-700); transform: translateY(1px); }
.btn.lg { height: 60px; font-size: 16px; padding: 0 30px; }
.btn.sm { height: 36px; font-size: 12px; padding: 0 14px; }
.btn.outline { background: transparent; border-color: var(--green); }
.btn.outline:hover { background: var(--mint); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--gray); }
.btn.outline-light { background: transparent; border-color: var(--green); color: #fff; }
.btn.outline-light:hover, .btn.outline-light.on { background: var(--green); color: var(--ink); }
.btn:disabled { background: var(--g200); color: var(--slate); border-color: transparent; cursor: not-allowed; }
.danger-text { color: var(--red); }

.input { height: 56px; width: 100%; border-radius: 8px; border: 2px solid transparent; background: var(--gray); padding: 0 16px; font: inherit; font-size: 18px; color: var(--ink); margin-top: 6px; }
.input:focus { outline: none; border-color: var(--purple); background: #fff; }

.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: rgba(16,16,16,.06); }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--g300); }
.status-pill[data-state="live"] i { background: var(--green); box-shadow: 0 0 0 4px rgba(17,234,145,.25); animation: pulse 2s infinite; }
.status-pill[data-state="reconnecting"] i { background: var(--red); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(17,234,145,0); } }

/* ============ KIOSK ============ */
.kiosk { display: grid; grid-template-columns: minmax(300px, 34%) 1fr; height: 100vh; }
.k-side { background: var(--purple); color: #fff; padding: 48px 40px; display: flex; flex-direction: column; gap: 18px; }
.k-logo { width: 150px; }
.k-side h2 { font-size: 30px; font-weight: 700; margin-top: 18px; }
.k-side p { margin: 0; opacity: .85; font-size: 17px; }
.k-steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.k-steps li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; opacity: .6; transition: .3s; font-weight: 500; }
.k-steps li b { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); display: grid; place-items: center; font-size: 15px; flex: none; }
.k-steps li.on { opacity: 1; background: rgba(255,255,255,.12); }
.k-steps li.on b { background: var(--green); border-color: var(--green); color: var(--ink); }
.k-steps li.done { opacity: .9; }
.k-steps li.done b { background: rgba(17,234,145,.2); border-color: var(--green); color: var(--green); }
.k-side-foot { margin-top: auto; }
.k-side .status-pill { background: rgba(255,255,255,.12); color: #fff; }

.k-main { overflow: auto; padding: 48px 56px; display: flex; }
.k-enter > * { animation: rise .45s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.k-center { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 640px; }
.k-center h1 { font-size: 44px; font-weight: 700; }
.k-lead { font-size: 19px; color: var(--slate); margin: 0; }
.k-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }

.k-tap { position: relative; width: 240px; height: 240px; display: grid; place-items: center; margin-bottom: 16px; }
.k-tap .ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--green); opacity: 0; animation: ripple 2.4s infinite; }
.k-tap .r2 { animation-delay: .8s; } .k-tap .r3 { animation-delay: 1.6s; }
@keyframes ripple { 0% { transform: scale(.45); opacity: .9; } 100% { transform: scale(1.1); opacity: 0; } }
.k-band { width: 120px; height: 120px; border-radius: 34px; background: var(--ink); color: var(--green); display: grid; place-items: center; box-shadow: var(--shadow); animation: float 3s ease-in-out infinite; font-size: 48px; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-3deg); } }
.k-tap.small { width: 170px; height: 170px; }
.k-tap.small .k-band { width: 90px; height: 90px; border-radius: 26px; font-size: 36px; }

.k-form { margin: auto; width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 18px; }
.k-form.wide { max-width: 760px; }
.k-form h1 { font-size: 38px; font-weight: 700; }
.k-form label { font-weight: 500; font-size: 15px; color: var(--slate); }
.k-form label em { font-style: normal; color: var(--g300); }
.k-form .chip { align-self: flex-start; }
.k-check { display: flex !important; gap: 12px; align-items: flex-start; cursor: pointer; }
.k-check input { width: 24px; height: 24px; accent-color: var(--purple); margin: 0; flex: none; }
.k-check span { color: var(--ink); font-weight: 400; }
.k-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.k-nav .btn:last-child { min-width: 200px; }

.k-avatars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.k-av { border: 3px solid transparent; background: var(--gray); border-radius: 20px; padding: 14px 10px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 500; transition: .2s; position: relative; }
.k-av .av-svg { width: 100%; max-width: 120px; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.k-av:hover .av-svg { transform: scale(1.06) rotate(-3deg); }
.k-av.sel { border-color: var(--green); background: var(--mint); }
.k-av.sel::after { content: '✓'; position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--green); display: grid; place-items: center; font-weight: 700; }

.k-toggle { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--gray); border-radius: 20px; border: 3px solid transparent; text-align: left; transition: .2s; }
.k-toggle.on { border-color: var(--green); background: var(--mint); }
.k-toggle-icon { font-size: 34px; width: 60px; height: 60px; display: grid; place-items: center; background: #fff; border-radius: 16px; flex: none; }
.k-toggle-text { flex: 1; display: flex; flex-direction: column; }
.k-toggle-text b { font-size: 19px; font-weight: 600; }
.k-toggle-text span { color: var(--slate); font-size: 15px; }
.switch { width: 60px; height: 34px; border-radius: 999px; background: var(--g300); position: relative; transition: .2s; flex: none; }
.switch i { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: .25s cubic-bezier(.3,1.4,.5,1); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.k-toggle.on .switch { background: var(--purple); }
.k-toggle.on .switch i { left: 30px; }
.k-preview { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 20px; border: 2px dashed var(--g200); }
.k-preview-av { width: 64px; height: 64px; }
.k-preview b { display: block; font-size: 18px; }
.k-preview span { color: var(--slate); }

.k-done-av { width: 210px; height: 210px; position: relative; animation: pop .7s cubic-bezier(.3,1.6,.5,1); }
.k-done-av .av-svg { border-radius: 50%; box-shadow: 0 0 0 10px var(--mint), var(--shadow); animation: float 3s ease-in-out infinite .7s; }
.k-done-badge { position: absolute; right: 6px; bottom: 10px; width: 56px; height: 56px; border-radius: 50%; background: var(--green); display: grid; place-items: center; font-size: 28px; font-weight: 700; border: 5px solid #fff; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.k-next-stations { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; margin: 8px 0 14px; }
.k-next-stations span { color: var(--slate); }
.k-next-stations b { background: var(--gray); padding: 8px 14px; border-radius: 12px; font-weight: 500; }

/* ============ MAP ============ */
.map-view { height: 100vh; display: flex; flex-direction: column; color: #fff; position: relative; }
.m-hud { display: flex; align-items: center; gap: 20px; padding: 14px 24px; }
.m-brand { display: flex; align-items: center; gap: 14px; font-size: 26px; }
.m-title { font-size: 20px; font-weight: 600; padding-left: 14px; border-left: 2px solid rgba(255,255,255,.2); }
.m-stats { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.m-stat { background: rgba(255,255,255,.08); padding: 8px 14px; border-radius: 12px; font-size: 15px; }
.m-stat b { color: var(--green); font-weight: 700; }
.m-stat.big { background: var(--green); color: var(--ink); }
.m-stat.big b { color: var(--ink); }
.m-right { display: flex; align-items: center; gap: 12px; }
.m-right .status-pill { background: rgba(255,255,255,.08); }
.m-clock { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.m-wrap { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 24px 24px; }
.m-stage { position: relative; aspect-ratio: 1200 / 750; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); transition: box-shadow .4s; }
.m-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.m-labels, .m-hot, .m-fx, .m-sprites { position: absolute; inset: 0; }
.m-labels { pointer-events: none; }
.m-label { position: absolute; transform: translate(-50%, -50%); background: var(--ink); color: #fff; font-weight: 600; font-size: calc(17 * var(--u)); padding: calc(6 * var(--u)) calc(16 * var(--u)); border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.m-hotspot { position: absolute; background: transparent; border: 0; border-radius: 20px; pointer-events: none; }
.m-stage.picking .m-hotspot { pointer-events: auto; background: rgba(17,234,145,.15); outline: 3px dashed var(--green); outline-offset: -3px; animation: blink 1.2s infinite; }
@keyframes blink { 50% { background: rgba(17,234,145,.3); } }

.sprite { position: absolute; left: 0; top: 0; width: calc(76 * var(--u)); margin-left: calc(-38 * var(--u)); margin-top: calc(-46 * var(--u)); background: none; border: 0; padding: 0;
  display: flex; flex-direction: column; align-items: center; animation: fadein .3s; will-change: transform; }
@keyframes fadein { from { opacity: 0; } }
.sp-av { animation: spawn .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes spawn { from { scale: .2; } }
.sp-av { width: calc(66 * var(--u)); height: calc(66 * var(--u)); border-radius: 50%; display: block; box-shadow: 0 0 0 calc(3 * var(--u)) #fff, 0 calc(6 * var(--u)) calc(12 * var(--u)) rgba(16,16,16,.25); transition: box-shadow .2s; }
.sp-av .av-svg { display: block; width: 100%; height: 100%; }
.sprite.walking .sp-av { animation: bob .32s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(calc(-6 * var(--u))) rotate(4deg); } }
.sp-name { margin-top: calc(5 * var(--u)); background: var(--ink); color: #fff; font-size: calc(13 * var(--u)); font-weight: 600; padding: calc(2 * var(--u)) calc(9 * var(--u)); border-radius: 999px; white-space: nowrap; }
.sprite.sel .sp-av { box-shadow: 0 0 0 calc(4 * var(--u)) var(--green), 0 0 0 calc(10 * var(--u)) rgba(17,234,145,.35); }
.sprite.risk .sp-av { animation: risk 1s infinite; }
@keyframes risk { 50% { box-shadow: 0 0 0 calc(4 * var(--u)) var(--red), 0 0 0 calc(12 * var(--u)) rgba(235,67,53,.3); } }
.sprite.safe .sp-av { box-shadow: 0 0 0 calc(4 * var(--u)) var(--green); }
.sp-bubble { position: absolute; bottom: 100%; margin-bottom: calc(4 * var(--u)); background: #fff; color: var(--ink); font-size: calc(14 * var(--u)); font-weight: 600; white-space: nowrap;
  padding: calc(5 * var(--u)) calc(11 * var(--u)); border-radius: calc(12 * var(--u)); box-shadow: 0 6px 16px rgba(0,0,0,.2); opacity: 0; transform: translateY(6px) scale(.8); transition: .25s cubic-bezier(.3,1.6,.5,1); pointer-events: none; }
.sp-bubble::after { content: ''; position: absolute; left: 50%; top: 100%; border: calc(6 * var(--u)) solid transparent; border-top-color: inherit; margin-left: calc(-6 * var(--u)); border-top-color: #fff; }
.sp-bubble.show { opacity: 1; transform: none; }
.sp-bubble.bad { background: var(--red); color: #fff; } .sp-bubble.bad::after { border-top-color: var(--red); }
.sp-bubble.warn { background: var(--purple); color: #fff; } .sp-bubble.warn::after { border-top-color: var(--purple); }
.sp-bubble.ok { background: var(--green); } .sp-bubble.ok::after { border-top-color: var(--green); }
.m-ping { position: absolute; width: calc(160 * var(--u)); height: calc(160 * var(--u)); margin: calc(-80 * var(--u)) 0 0 calc(-80 * var(--u)); border-radius: 50%; border: calc(5 * var(--u)) solid var(--green); animation: mping 1.3s ease-out forwards; pointer-events: none; }
@keyframes mping { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

.m-empty { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.m-empty[hidden] { display: none; }
.m-empty-card { background: rgba(16,16,16,.82); color: #fff; padding: calc(28 * var(--u)) calc(40 * var(--u)); border-radius: calc(24 * var(--u)); text-align: center; max-width: 60%; }
.m-empty-card h2 { font-size: calc(30 * var(--u)); }
.m-empty-card p { font-size: calc(18 * var(--u)); opacity: .8; margin: calc(8 * var(--u)) 0 0; }

.m-stage.drill { box-shadow: 0 0 0 6px var(--red), 0 30px 80px rgba(0,0,0,.5); }
.m-stage.drill::after { content: ''; position: absolute; inset: 0; background: rgba(235,67,53,.12); pointer-events: none; animation: alarm 1.4s infinite; }
@keyframes alarm { 50% { background: rgba(235,67,53,.02); } }
.m-drill { position: absolute; top: calc(18 * var(--u)); left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; padding: calc(10 * var(--u)) calc(26 * var(--u)); border-radius: 999px; display: flex; gap: calc(16 * var(--u)); font-size: calc(20 * var(--u)); z-index: 2000; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.m-drill[hidden] { display: none; }
.m-drill b { letter-spacing: 2px; }

.m-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.m-wrap { min-width: 0; }
.m-side { display: flex; flex-direction: column; gap: 12px; padding: 0 24px 24px 0; min-height: 0; }
.m-side .eyebrow { color: var(--green); }
.m-ticker { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 8px; }
.m-tick-empty { margin: 0; font-size: 14px; opacity: .6; }
.m-tick { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.07); padding: 8px 12px 8px 8px; border-radius: 14px; font-size: 14px; line-height: 1.35; animation: tickin .45s cubic-bezier(.2,.8,.2,1); border-left: 4px solid var(--green); flex: none; }
.m-tick:nth-child(n+5) { opacity: .55; }
.m-tick.bad { border-left-color: var(--red); } .m-tick.warn { border-left-color: var(--purple); }
.m-tick-av { width: 30px; height: 30px; flex: none; } .m-tick-av svg { display: block; }
.m-tick time { opacity: .55; font-size: 12px; margin-left: auto; padding-left: 8px; }
.m-tick b { color: var(--green); font-weight: 600; }
@keyframes tickin { from { opacity: 0; transform: translateX(-30px); } }
.m-tools { display: flex; flex-direction: column; gap: 10px; }
.m-hint { font-size: 13px; opacity: .7; }
.m-tools .btn.on { background: var(--green); }

/* ============ DASHBOARD ============ */
.dash { height: 100vh; display: flex; flex-direction: column; background: var(--gray); }
.d-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--g200); }
.d-brand { display: flex; align-items: center; gap: 14px; font-size: 24px; }
.d-brand span { font-size: 18px; font-weight: 600; padding-left: 14px; border-left: 2px solid var(--g200); }
.d-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(380px, 40%) 1fr; }
.d-parent { background: var(--purple); color: #fff; padding: 24px 32px; display: flex; flex-direction: column; min-height: 0; }
.d-parent .eyebrow { color: var(--green); }
.d-col-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.d-col-head h2 { font-size: 24px; font-weight: 600; }
.d-follow { display: flex; flex-direction: column; font-size: 12px; gap: 4px; opacity: .9; }
.d-follow select { font: inherit; font-size: 14px; border-radius: 8px; border: 0; padding: 8px 10px; background: rgba(255,255,255,.14); color: #fff; max-width: 220px; }
.d-follow option { color: var(--ink); }
.phone-wrap { flex: 1; min-height: 0; display: grid; place-items: center; }
.phone { position: relative; height: 100%; max-height: 760px; aspect-ratio: 9 / 18.5; background: linear-gradient(160deg, #3a1850 0%, var(--ink) 75%); border-radius: 48px;
  border: 12px solid var(--ink); box-shadow: 0 0 0 2px rgba(255,255,255,.15), 0 30px 60px rgba(0,0,0,.4); overflow: hidden; display: flex; flex-direction: column; }
.phone.buzz { animation: buzz .45s; }
@keyframes buzz { 20%, 60% { transform: translateX(-4px) rotate(-.6deg); } 40%, 80% { transform: translateX(4px) rotate(.6deg); } }
.phone-notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 34%; height: 26px; background: var(--ink); border-radius: 20px; z-index: 3; }
.phone-status { display: flex; justify-content: space-between; padding: 12px 24px 0; font-size: 13px; font-weight: 600; }
.ph-icons { font-size: 10px; letter-spacing: 1px; }
.phone-lock { text-align: center; padding: 18px 0 12px; }
.phone { container-type: inline-size; }
.ph-big-time { font-size: min(64px, 18cqw); font-weight: 600; line-height: 1; }
.ph-date { font-size: 14px; opacity: .8; margin-top: 6px; }
.phone-list { flex: 1; overflow-y: auto; padding: 4px 10px 30px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: none; }
.phone-empty { position: absolute; inset: 45% 20px auto; text-align: center; font-size: 14px; opacity: .6; }
.phone-empty[hidden] { display: none; }
.phone-bar { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 36%; height: 5px; border-radius: 4px; background: rgba(255,255,255,.7); }
.notif { background: rgba(255,255,255,.14); backdrop-filter: blur(16px); border-radius: 20px; padding: 10px 12px 12px; border-left: 4px solid transparent; flex: none; }
.notif.new { animation: notif .55s cubic-bezier(.2,1.2,.4,1); }
@keyframes notif { from { opacity: 0; transform: translateY(-30px) scale(.94); } }
.notif header { display: flex; align-items: center; gap: 8px; font-size: 12px; opacity: .85; }
.n-app { width: 20px; height: 20px; border-radius: 6px; background: var(--ink); display: grid; place-items: center; }
.n-icon { width: 15px; }
.n-wm { font-size: 12px; }
.notif time { margin-left: auto; }
.n-body { display: flex; gap: 10px; margin-top: 8px; align-items: flex-start; }
.n-av { width: 36px; height: 36px; flex: none; }
.n-av svg { display: block; }
.n-emoji { display: grid; place-items: center; font-size: 22px; background: rgba(255,255,255,.12); border-radius: 50%; }
.n-body b { font-size: 14px; font-weight: 600; display: block; }
.n-body p { margin: 2px 0 0; font-size: 13px; opacity: .85; line-height: 1.4; }
.notif.k-blocked { border-left-color: var(--red); background: rgba(235,67,53,.28); }
.notif.k-declined { border-left-color: #fff; }
.notif.k-safe, .notif.k-purchase { border-left-color: var(--green); }
.notif.k-drill { border-left-color: var(--red); background: rgba(235,67,53,.4); }

.d-principal { position: relative; padding: 24px 32px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.d-principal .d-col-head { margin-bottom: 0; }
.d-cards { display: grid; gap: 16px; }
.d-attend { display: flex; align-items: center; gap: 28px; padding: 24px 28px; background: #fff; box-shadow: var(--shadow); }
.d-ring { width: 140px; height: 140px; position: relative; flex: none; }
.d-ring svg { width: 100%; height: 100%; }
.d-ring span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 26px; font-weight: 700; line-height: 1.1; }
.d-ring small { font-size: 12px; font-weight: 500; color: var(--slate); }
.d-count { display: flex; align-items: baseline; gap: 12px; }
.d-count b { font-size: 84px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.d-count span { font-size: 18px; color: var(--slate); }
.d-count.bump b { animation: bump .5s; }
@keyframes bump { 40% { transform: scale(1.12); color: var(--purple); } }
.d-sub { color: var(--slate); margin-top: 6px; }
.d-sub b { color: var(--ink); }
.d-locs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.d-loc { background: #fff; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.d-loc-top { font-size: 14px; color: var(--slate); font-weight: 500; }
.d-loc b { font-size: 34px; font-weight: 700; line-height: 1.1; }
.d-loc-avs { display: flex; min-height: 26px; align-items: center; }
.d-loc-avs i { width: 26px; height: 26px; margin-right: -8px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.d-loc-avs i svg { display: block; }
.d-loc-avs em { font-style: normal; font-size: 12px; margin-left: 14px; color: var(--slate); }
.d-alerts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.d-alert { background: #fff; padding: 14px 16px; border-top: 4px solid var(--green); }
.d-alert.bad { border-top-color: var(--red); } .d-alert.warn { border-top-color: var(--purple); }
.d-alert b { font-size: 28px; font-weight: 700; display: block; }
.d-alert span { font-size: 13px; color: var(--slate); }
.d-drill-btn { display: flex; align-items: center; gap: 18px; text-align: left; background: var(--red); color: #fff; border: 0; border-radius: 20px; padding: 18px 24px; box-shadow: 0 10px 24px rgba(235,67,53,.35); transition: transform .15s, box-shadow .15s; }
.d-drill-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(235,67,53,.45); }
.d-drill-btn:disabled { background: var(--g200); color: var(--slate); box-shadow: none; transform: none; cursor: not-allowed; }
.d-siren { font-size: 34px; width: 60px; height: 60px; border-radius: 16px; background: rgba(255,255,255,.2); display: grid; place-items: center; flex: none; }
.d-drill-btn b { font-size: 22px; font-weight: 700; display: block; letter-spacing: .5px; text-transform: uppercase; }
.d-drill-btn small { font-size: 14px; opacity: .9; }
.d-feed { background: #fff; padding: 16px 20px; }
.d-feed ul { list-style: none; margin: 8px 0 0; padding: 0; }
.d-feed li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--gray); }
.d-feed li:last-child { border-bottom: 0; }
.f-av { width: 34px; height: 34px; flex: none; } .f-av svg { display: block; }
.f-text { flex: 1; display: flex; flex-direction: column; font-size: 14px; min-width: 0; }
.f-text b { font-weight: 600; } .f-text span { color: var(--slate); font-size: 13px; }
.d-feed time { font-size: 12px; color: var(--slate); }
.d-feed li.k-blocked b { color: var(--red); }
.f-empty { color: var(--slate); font-size: 14px; }

.d-rollcall { position: absolute; inset: 0; background: var(--ink); color: #fff; padding: 28px 32px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; animation: rise .35s; z-index: 5; }
.d-rollcall[hidden] { display: none; }
.rc-top { display: flex; justify-content: space-between; align-items: center; }
.rc-live { background: var(--red); padding: 6px 14px; border-radius: 999px; font-weight: 600; letter-spacing: 1.5px; font-size: 14px; animation: blinkr 1.2s infinite; }
.d-rollcall.complete .rc-live { background: var(--green); color: var(--ink); animation: none; }
@keyframes blinkr { 50% { opacity: .55; } }
.rc-timer { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-count { display: flex; align-items: baseline; gap: 10px; }
.rc-count b { font-size: 96px; font-weight: 700; line-height: 1; color: var(--green); }
.rc-count span { font-size: 40px; font-weight: 600; opacity: .7; }
.rc-count em { font-style: normal; font-size: 18px; opacity: .8; margin-left: 8px; }
.rc-bar { height: 14px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.rc-bar i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.rc-hint { margin: 0; opacity: .7; font-size: 14px; }
.rc-done { background: rgba(17,234,145,.15); border: 1px solid var(--green); padding: 12px 16px; border-radius: 14px; font-weight: 500; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.rc-kid { background: rgba(255,255,255,.06); border: 2px solid transparent; border-radius: 16px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; }
.rc-kid.wait { border-color: rgba(235,67,53,.6); animation: waitp 1.2s infinite; }
@keyframes waitp { 50% { border-color: rgba(235,67,53,.15); } }
.rc-kid.ok { border-color: var(--green); background: rgba(17,234,145,.1); animation: none; cursor: default; }
.rc-kid.ok.just { animation: rcpop .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes rcpop { from { scale: .6; } }
.rc-av { width: 56px; height: 56px; position: relative; }
.rc-av svg { display: block; }
.rc-kid.wait .rc-av { filter: grayscale(.8); opacity: .7; }
.rc-av i { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: var(--ink); font-style: normal; font-weight: 700; display: grid; place-items: center; font-size: 13px; }
.rc-kid b { font-size: 14px; font-weight: 600; }
.rc-kid small { font-size: 12px; opacity: .7; }
.rc-kid.wait small { color: #ff9b92; opacity: 1; }
.rc-end { align-self: flex-start; margin-top: 6px; }

/* ============ STATION ============ */
.station { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.st-head { display: flex; align-items: center; gap: 16px; padding: 20px 24px; background: var(--purple); color: #fff; }
.st-head .eyebrow { color: var(--green); }
.st-head h1 { font-size: 30px; font-weight: 700; }
.st-emoji { font-size: 40px; width: 68px; height: 68px; background: rgba(255,255,255,.14); border-radius: 18px; display: grid; place-items: center; }
.st-head-right { margin-left: auto; }
.st-head .status-pill { background: rgba(255,255,255,.14); }
.st-menu { padding: 20px 24px 0; }
.st-menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.st-item { background: var(--gray); border: 3px solid transparent; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.st-item span { font-size: 28px; } .st-item b { font-weight: 600; font-size: 15px; } .st-item small { color: var(--slate); }
.st-item.sel { border-color: var(--green); background: var(--mint); }
.st-tap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; }
.st-tap h2 { font-size: 28px; font-weight: 700; }
.st-demo { margin: 0 24px 24px; background: var(--gray); border-radius: 16px; padding: 14px 18px; }
.st-demo summary { cursor: pointer; font-weight: 500; color: var(--slate); }
.st-demo-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.st-demo-kid { background: #fff; border: 0; border-radius: 14px; padding: 8px 12px 8px 8px; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.st-demo-kid svg { width: 36px; height: 36px; }
.st-demo-kid:hover { background: var(--mint); }
.st-none { margin: 0; color: var(--slate); }
.st-result { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 30px; background: var(--green); color: var(--ink); animation: rise .3s; z-index: 10; }
.st-result[hidden] { display: none; }
.st-result.bad { background: var(--red); color: #fff; }
.st-result.warn { background: var(--purple); color: #fff; }
.st-result h2 { font-size: 40px; font-weight: 700; }
.st-result p { font-size: 20px; margin: 0; max-width: 520px; }
.st-res-av { width: 160px; height: 160px; animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
.st-res-av svg { border-radius: 50%; box-shadow: 0 0 0 8px rgba(255,255,255,.4); }
.st-pick { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 24px; text-align: center; }
.st-wm { font-size: 36px; }
.st-pick-grid { display: grid; grid-template-columns: repeat(2, minmax(160px, 240px)); gap: 14px; }
.st-pick-btn { background: var(--gray); border-radius: 20px; padding: 24px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 3px solid transparent; }
.st-pick-btn:hover { border-color: var(--green); }
.st-pick-btn span { font-size: 40px; }

/* ============ HOME + ALL ============ */
.home { max-width: 1040px; margin: 0 auto; padding: 48px 24px; }
.home header { display: flex; align-items: center; gap: 28px; margin-bottom: 32px; }
.home-logo { width: 120px; }
.home h1 { font-size: 36px; font-weight: 700; }
.home header p { margin: 6px 0 0; color: var(--slate); font-size: 18px; }
.home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.home-card { background: var(--gray); border-radius: 20px; padding: 24px; text-decoration: none; color: var(--ink); border: 3px solid transparent; transition: .2s; }
.home-card:hover { border-color: var(--green); transform: translateY(-3px); }
.home-card > b { width: 40px; height: 40px; border-radius: 12px; background: var(--purple); color: #fff; display: grid; place-items: center; margin-bottom: 14px; }
.home-card h2 { font-size: 20px; font-weight: 600; }
.home-card p { color: var(--slate); margin: 8px 0 0; font-size: 15px; }
.home h3 { margin: 32px 0 12px; font-size: 18px; font-weight: 600; }
.home-stations, .home-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.home-status { margin-left: auto; }
.home-lan { margin-top: 28px; color: var(--slate); }
.home-lan code { background: var(--mint); color: var(--mint-ink); padding: 3px 8px; border-radius: 6px; font-size: 15px; }
.all { display: grid; grid-template-columns: 28% 72%; grid-template-rows: 50% 50%; height: 100vh; gap: 4px; background: var(--ink); }
.all iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.all iframe:nth-child(1) { grid-row: 1 / 3; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  body[data-view="map"] { overflow: auto; }
  .map-view { height: auto; min-height: 100vh; }
  .m-body { grid-template-columns: 1fr; }
  .m-wrap { height: 62vh; }
  .m-side { padding: 0 16px 16px; }
  .m-ticker { max-height: 260px; }
}
@media (max-width: 900px) {
  body[data-view="kiosk"], body[data-view="dashboard"] { overflow: auto; }
  .kiosk { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .k-side { padding: 20px 16px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .k-side h2, .k-side p, .k-steps, .k-side-foot { display: none; }
  .k-logo { width: 90px; }
  .k-main { padding: 24px 16px; }
  .k-center h1, .k-form h1 { font-size: 30px; }
  .k-avatars { grid-template-columns: repeat(2, 1fr); }
  .dash { height: auto; min-height: 100vh; }
  .d-grid { grid-template-columns: 1fr; }
  .d-parent, .d-principal { padding: 20px 16px; }
  .phone { height: 620px; }
  .d-locs { grid-template-columns: repeat(2, 1fr); }
  .d-alerts { grid-template-columns: 1fr; }
  .d-attend { flex-direction: column; text-align: center; }
  .d-rollcall { position: fixed; }
  .home-grid { grid-template-columns: 1fr; }
  .m-hud { flex-wrap: wrap; padding: 10px 16px; }
  .m-wrap { padding: 0 16px 16px; }
  .m-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
