:root{
  --sky-top:#3a9ed6;
  --sky-mid:#9ad6ee;
  --sky-low:#cfe8f1;
  --grass-1:#5e9d4a;
  --grass-2:#2f6b28;
  --grass-3:#143d11;
  --aqua:#00c8ff;
  --aqua-deep:#0078a8;
  --lime:#bff45c;
  --ink:#04304a;
  --glass: rgba(255,255,255,.34);
  --glass-edge: rgba(255,255,255,.85);
}

*{box-sizing:border-box}
html,body{height:100%;margin:0;overflow:hidden}
body{
  font-family:"Segoe UI", "Segoe UI Variable", "Noto Sans", -apple-system, "Helvetica Neue", sans-serif;
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
  user-select:none;
  background:
    linear-gradient(180deg, rgba(58,158,214,.15), rgba(20,61,17,.15)),
    url("/background.jpg")
    center/cover no-repeat fixed,
    var(--sky-top);
}
#stage{ position:relative; width:100vw; height:100vh; display:flex; align-items:center; justify-content:center; z-index:1 }
.slide{
  position:absolute; inset:0;
  display:none;
  padding:6vh 6vw 14vh;
  align-items:center; justify-content:center;
  flex-direction:column;
  text-align:center;
}
.slide.active{display:flex; animation:slideIn .32s ease}
@keyframes slideIn{ from{opacity:0; transform:scale(.995)} to{opacity:1; transform:scale(1)} }
[data-anim]{ opacity:0; will-change:transform,opacity }
.slide.active [data-anim]{ animation: rise .44s cubic-bezier(.2,.7,.2,1) both }
.slide.active [data-anim="pop"]{ animation-name: pop }
.slide.active [data-anim="left"]{ animation-name: slideRight }
.slide.active [data-anim="right"]{ animation-name: slideLeft }
.slide.active [data-anim="drop"]{ animation-name: drop }
.slide.active [data-anim="spin"]{ animation-name: spinIn }
.slide.active [data-anim="grow"]{ animation-name: grow; transform-origin:bottom center }
@keyframes rise { from{opacity:0; transform:translateY(12px) scale(.992)} to{opacity:1; transform:none} }
@keyframes pop  { 0%{opacity:0; transform:scale(.82)} 60%{opacity:1; transform:scale(1.025)} 100%{opacity:1; transform:scale(1)} }
@keyframes slideRight { from{opacity:0; transform:translateX(-24px)} to{opacity:1; transform:none} }
@keyframes slideLeft  { from{opacity:0; transform:translateX(24px)}  to{opacity:1; transform:none} }
@keyframes drop { from{opacity:0; transform:translateY(-16px) rotate(-1deg)} to{opacity:1; transform:none} }
@keyframes spinIn { from{opacity:0; transform:rotate(-10deg) scale(.86)} to{opacity:1; transform:none} }
@keyframes grow { from{opacity:0; transform:scaleY(.72)} to{opacity:1; transform:scaleY(1)} }

.bobble{ animation: bobble 4s ease-in-out infinite }
@keyframes bobble{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
.glass{
  position:relative;
  background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.32) 100%);
  border:1px solid rgba(255,255,255,.85);
  border-radius:22px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -20px 50px rgba(255,255,255,.25),
    0 18px 50px rgba(0,80,120,.35),
    0 2px 0 rgba(255,255,255,.6);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  overflow:hidden;
}
.glass::before{
  content:""; position:absolute; left:6px; right:6px; top:6px; height:40%;
  border-radius:18px 18px 60% 60% / 18px 18px 100% 100%;
  background: linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,.05) 100%);
  pointer-events:none;
}
.gel{
  display:inline-flex; align-items:center; gap:8px;
  padding:.7em 1.4em;
  border-radius:999px;
  color:#013049; font-weight:700; letter-spacing:.02em;
  text-shadow:0 1px 0 rgba(255,255,255,.9);
  background:
    linear-gradient(180deg, #ffffff 0%, #d6f5ff 48%, #66c8f0 52%, #1ea0d6 100%);
  border:1px solid #0a6e9e;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -10px 16px rgba(0,80,120,.25),
    0 2px 0 #044a73,
    0 8px 18px rgba(0,80,120,.45);
  position:relative;
}
.gel::after{
  content:""; position:absolute; left:6px; right:6px; top:3px; height:42%;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,0));
  pointer-events:none;
}
h1.shiny{
  font-family:"Segoe UI", "Noto Sans", sans-serif;
  font-size: clamp(48px, 8vw, 112px);
  margin:0; line-height:.95; letter-spacing:-.02em;
  background: linear-gradient(180deg, #ffffff 0%, #c7f3ff 35%, #38bbe8 55%, #006a99 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:
    drop-shadow(0 1px 0 rgba(255,255,255,.9))
    drop-shadow(0 4px 0 rgba(0,80,120,.25))
    drop-shadow(0 18px 28px rgba(0,80,120,.45));
  font-weight:700;
}
.reflection{
  margin-top:-.1em; transform:scaleY(-1);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.4), transparent 55%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,.4), transparent 55%);
  opacity:.45;
}

h2{
  font-family:"Segoe UI", "Noto Sans", sans-serif;
  font-size: clamp(32px, 4.6vw, 60px);
  margin: 0 0 .35em;
  color:#fff;
  text-shadow:
    0 1px 0 rgba(255,255,255,.6),
    0 2px 0 #0a6e9e,
    0 4px 0 rgba(0,80,120,.4),
    0 14px 24px rgba(0,80,120,.55);
  font-weight:700; letter-spacing:-.005em;
}

.panel{ padding: clamp(20px, 3vw, 40px) clamp(24px, 4vw, 56px); max-width:1100px }

.kicker{
  display:inline-flex; align-items:center; gap:8px;
  padding:.32em 1em;
  border-radius:999px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  font-size:13px; color:#013049;
  background:linear-gradient(180deg,#fff 0%,#d6f5ff 48%,#7fdaf2 52%,#1ea0d6 100%);
  border:1px solid #0a6e9e;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #044a73, 0 8px 18px rgba(0,80,120,.35);
  text-shadow:0 1px 0 rgba(255,255,255,.9);
  margin-bottom:14px;
}
.kicker.green{ background:linear-gradient(180deg,#fff 0%,#e8ffc4 48%,#a8e060 52%,#4d9a1c 100%); border-color:#2d6010; color:#102b00 }
.kicker.red  { background:linear-gradient(180deg,#fff 0%,#ffd9d3 48%,#ff8a7a 52%,#c1281a 100%); border-color:#7a0e07; color:#fff; text-shadow:0 1px 0 rgba(0,0,0,.25) }

.quote{
  font-family: "Iowan Old Style", Georgia, serif; font-style: italic;
  font-size: clamp(26px, 3.4vw, 44px); line-height:1.15;
  color:#013049; max-width: 18ch;
}
.quote::before{ content:"\201C"; color:#1ea0d6; margin-right:.05em }
.quote::after { content:"\201D"; color:#1ea0d6; margin-left:.05em }
.cite{ margin-top:14px; font-size:14px; color:#04567a; font-weight:700; letter-spacing:.08em; text-transform:uppercase }

.stat{
  font-size: clamp(80px, 14vw, 200px);
  font-weight:700; line-height:.9;
  background: linear-gradient(180deg, #fff 0%, #d4ff96 50%, #4d9a1c 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:
    drop-shadow(0 2px 0 rgba(255,255,255,.7))
    drop-shadow(0 6px 0 rgba(40,90,10,.25))
    drop-shadow(0 18px 22px rgba(0,0,0,.3));
}
.pyramid{ display:flex; flex-direction:column; align-items:center; gap:8px; margin-top:6px }
.pyramid .row{
  color:#fff; font-weight:700; padding:14px 24px;
  border-radius:14px;
  text-shadow: 0 1px 0 rgba(0,0,0,.3); letter-spacing:.04em; text-transform:uppercase;
  position:relative; border:1px solid rgba(255,255,255,.6);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -14px 26px rgba(0,0,0,.18),
    0 6px 0 rgba(0,0,0,.18),
    0 14px 26px rgba(0,80,120,.35);
}
.pyramid .row::before{
  content:""; position:absolute; left:6px; right:6px; top:3px; height:46%;
  border-radius:10px; background:linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,0));
  pointer-events:none;
}
.pyramid .r1{ width:680px; background:linear-gradient(180deg,#7fd1ff 0%,#1ea0d6 50%,#0a6e9e 100%) }
.pyramid .r2{ width:540px; background:linear-gradient(180deg,#ffe07a 0%,#e89c20 50%,#9a5e00 100%) }
.pyramid .r3{ width:400px; background:linear-gradient(180deg,#ffb3a8 0%,#e74a37 50%,#a3170a 100%); position:relative }
.pyramid .r4{ width:260px; background:linear-gradient(180deg,#d4b3ff 0%,#7a4ad6 50%,#3e1d8a 100%) }
.pyramid .r3::after{
  content:"< Friedman stops here";
  position:absolute; left:calc(100% + 14px); top:50%; transform:translateY(-50%);
  background:rgba(255,255,255,.85); color:#013049; padding:8px 14px; border-radius:10px;
  border:1px solid rgba(255,255,255,.9); font-size:14px; white-space:nowrap; font-weight:700;
  backdrop-filter:blur(10px);
  box-shadow:inset 0 1px 0 #fff, 0 6px 14px rgba(0,80,120,.35);
  text-shadow:0 1px 0 rgba(255,255,255,.8);
}

i[data-lucide]{ display:inline-block; vertical-align:middle }
.ico{ width:28px; height:28px }
.ico-lg{ width:48px; height:48px }
.ico-xl{ width:90px; height:90px }

.ledger{ display:grid; grid-template-columns:1fr auto 1fr; gap:8px 28px; align-items:center; max-width:1100px; width:100%; margin-top:6px }
.col-head{
  color:#fff; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  text-shadow:0 1px 0 rgba(0,0,0,.3), 0 4px 12px rgba(0,80,120,.5);
  padding:10px 18px; border-radius:14px; font-size:18px;
  position:relative; border:1px solid rgba(255,255,255,.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -14px 26px rgba(0,0,0,.18),
              0 6px 0 rgba(0,0,0,.2), 0 12px 22px rgba(0,80,120,.35);
}
.col-head::before{
  content:""; position:absolute; left:6px; right:6px; top:3px; height:46%;
  border-radius:10px; background:linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,0));
  pointer-events:none;
}
.col-head.bad{ background:linear-gradient(180deg,#ffb3a8 0%,#e74a37 50%,#a3170a 100%) }
.col-head.ok { background:linear-gradient(180deg,#d8ff9c 0%,#7ec53a 50%,#3a6e10 100%) }

.row-item{
  display:flex; align-items:center; gap:12px;
  padding:12px 16px; font-weight:700; font-size:20px; color:#013049;
  background: linear-gradient(180deg, rgba(255,255,255,.6) 0%, rgba(255,255,255,.2) 100%);
  border-radius:14px; border:1px solid rgba(255,255,255,.85);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 #fff, 0 6px 14px rgba(0,80,120,.3);
  text-shadow:0 1px 0 rgba(255,255,255,.6);
}
.row-item.left{ justify-content:flex-end; text-align:right }
.row-item.bad i[data-lucide]{ color:#a3170a }
.row-item.ok  i[data-lucide]{ color:#3a6e10 }
.gutter{
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-weight:700; font-size:32px;
  text-shadow: 0 2px 0 #0a6e9e, 0 4px 14px rgba(0,80,120,.5);
}

.power{ display:grid; grid-template-columns:1fr auto 1fr; gap:32px; align-items:center; max-width:1100px; width:100% }
.figure{ display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px }
.medallion{
  width:170px; height:170px; border-radius:50%; position:relative;
  display:flex; align-items:center; justify-content:center;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.95) 0%, rgba(255,255,255,.2) 22%, rgba(255,255,255,0) 38%),
    radial-gradient(circle at 50% 60%, rgba(0,200,255,.5), rgba(0,200,255,0) 70%),
    linear-gradient(180deg, #d6f5ff 0%, #66c8f0 55%, #1ea0d6 100%);
  border:1px solid rgba(255,255,255,.85);
  color:#013049;
  box-shadow:
    inset 0 2px 0 #fff,
    inset 0 -22px 36px rgba(0,80,120,.35),
    0 12px 0 #0a6e9e,
    0 22px 36px rgba(0,80,120,.45);
}
.medallion::after{
  content:""; position:absolute; left:18%; top:12%; width:38%; height:24%;
  border-radius:50%; background:radial-gradient(ellipse, #fff, rgba(255,255,255,0) 70%);
  filter: blur(1px);
}
.medallion.warn{
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.95) 0%, rgba(255,255,255,.2) 22%, rgba(255,255,255,0) 38%),
    radial-gradient(circle at 50% 60%, rgba(255,140,90,.6), rgba(255,140,90,0) 70%),
    linear-gradient(180deg, #ffd6c2 0%, #ff8a5a 55%, #c14112 100%);
  color:#7a1d00; box-shadow: inset 0 2px 0 #fff, inset 0 -22px 36px rgba(120,40,0,.35), 0 12px 0 #8a2a08, 0 22px 36px rgba(0,0,0,.35);
}
.medallion.ok{
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.95) 0%, rgba(255,255,255,.2) 22%, rgba(255,255,255,0) 38%),
    radial-gradient(circle at 50% 60%, rgba(120,220,80,.55), rgba(120,220,80,0) 70%),
    linear-gradient(180deg, #e6ffc4 0%, #9ed85a 55%, #3a8a14 100%);
  color:#102b00; box-shadow: inset 0 2px 0 #fff, inset 0 -22px 36px rgba(20,80,0,.35), 0 12px 0 #2d6010, 0 22px 36px rgba(0,0,0,.35);
}
.figure h3{ margin:.2em 0 0; color:#fff; font-size:26px; font-weight:700; text-shadow:0 2px 0 #0a6e9e, 0 4px 14px rgba(0,80,120,.5) }
.figure .stats{
  display:flex; flex-direction:column; gap:4px; margin-top:6px;
  background:rgba(255,255,255,.55); border:1px solid rgba(255,255,255,.85); border-radius:12px;
  padding:10px 14px; backdrop-filter:blur(14px);
  box-shadow: inset 0 1px 0 #fff, 0 6px 14px rgba(0,80,120,.3);
  font-size:15px; line-height:1.3; color:#013049;
}
.figure .stats b{ color:#0a6e9e }
.gauge{
  margin-top:6px; width:170px; height:12px; border-radius:999px;
  background:linear-gradient(180deg,#dfe9ec,#bcc8cc); border:1px solid rgba(255,255,255,.7);
  box-shadow:inset 0 2px 4px rgba(0,0,0,.25), 0 1px 0 rgba(255,255,255,.6); position:relative; overflow:hidden;
}
.gauge i{
  display:block; height:100%; border-radius:999px;
  background: linear-gradient(180deg, #fff 0%, #aef064 40%, #4d9a1c 100%);
  box-shadow: inset 0 1px 0 #fff;
}
.gauge.warn i{ background: linear-gradient(180deg, #fff 0%, #ff9b6c 40%, #c1281a 100%) }

.foundation{ position:relative; max-width:1100px; width:100%; margin-top:18px; display:flex; flex-direction:column; align-items:center }
.profit-arrow{
  color:#fff; font-weight:700; font-size:18px; letter-spacing:.18em;
  text-shadow:0 2px 0 #0a6e9e, 0 4px 14px rgba(0,80,120,.5);
  display:flex; flex-direction:column; align-items:center; gap:2px; margin-bottom:8px;
}
.profit-arrow .arrow{
  width:0; height:0; border-left:14px solid transparent; border-right:14px solid transparent;
  border-bottom:18px solid #ffe27a; filter: drop-shadow(0 2px 0 #b35900);
}
.pillars{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; width:100% }
.pillar{
  position:relative;
  background: linear-gradient(180deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,.25) 50%, rgba(255,255,255,.4) 100%);
  border:1px solid rgba(255,255,255,.85);
  border-radius:16px 16px 0 0;
  padding:20px 12px 24px; text-align:center;
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -30px 40px rgba(0,140,200,.18),
    0 6px 0 #0a6e9e,
    0 14px 26px rgba(0,80,120,.4);
  color:#013049;
}
.pillar::before{
  content:""; position:absolute; left:6px; right:6px; top:4px; height:42%;
  border-radius:12px 12px 60% 60%/12px 12px 100% 100%;
  background:linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,0));
  pointer-events:none;
}
.pillar i[data-lucide]{ color:#0a6e9e; position:relative; z-index:1 }
.pillar h4{ margin:8px 0 4px; font-size:18px; letter-spacing:.06em; text-transform:uppercase; font-weight:700; position:relative; z-index:1 }
.pillar p{ margin:0; font-size:13px; color:#04567a; position:relative; z-index:1 }
.floor{
  width:100%; padding:14px 18px; position:relative;
  background: linear-gradient(180deg, #c4f084 0%, #6fbf3a 50%, #2d6010 100%);
  color:#fff; font-weight:700; letter-spacing:.18em; text-transform:uppercase;
  text-shadow:0 1px 0 rgba(0,0,0,.4);
  border:1px solid rgba(255,255,255,.5);
  border-radius:0 0 16px 16px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    inset 0 -10px 0 rgba(0,0,0,.18),
    0 14px 26px rgba(0,60,0,.35);
  display:flex; align-items:center; justify-content:center; gap:10px;
}
.floor::before{
  content:""; position:absolute; left:6px; right:6px; top:3px; height:42%;
  border-radius:12px; background:linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0));
  pointer-events:none;
}
.floor i[data-lucide]{ color:#fff; position:relative }

.starburst{
  position:absolute; right:5vw; top:6vh;
  width:130px; height:130px; border-radius:50%;
  background:
  conic-gradient(#ffd34e 0 12deg, #fff 12deg 24deg, #ffd34e 24deg 36deg, #fff 36deg 48deg,
                 #ffd34e 48deg 60deg, #fff 60deg 72deg, #ffd34e 72deg 84deg, #fff 84deg 96deg,
                 #ffd34e 96deg 108deg, #fff 108deg 120deg, #ffd34e 120deg 132deg, #fff 132deg 144deg,
                 #ffd34e 144deg 156deg, #fff 156deg 168deg, #ffd34e 168deg 180deg, #fff 180deg 192deg,
                 #ffd34e 192deg 204deg, #fff 204deg 216deg, #ffd34e 216deg 228deg, #fff 228deg 240deg,
                 #ffd34e 240deg 252deg, #fff 252deg 264deg, #ffd34e 264deg 276deg, #fff 276deg 288deg,
                 #ffd34e 288deg 300deg, #fff 300deg 312deg, #ffd34e 312deg 324deg, #fff 324deg 336deg,
                 #ffd34e 336deg 348deg, #fff 348deg 360deg);
  transform:rotate(-12deg);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 14px 30px rgba(0,80,120,.45), inset 0 0 0 6px #fff;
  color:#013049; font-weight:700; text-align:center; font-size:18px; line-height:1;
  text-shadow:0 1px 0 #fff; letter-spacing:.06em;
}
.starburst small{display:block; font-size:11px; letter-spacing:.18em; margin-top:4px}

#hud{
  position:fixed; left:14px; right:14px; bottom:14px;
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 16px; font-size:12px; color:#013049; font-weight:600;
  background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.32) 100%);
  border:1px solid rgba(255,255,255,.85);
  border-radius:14px;
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 #fff, 0 12px 30px rgba(0,80,120,.35);
  z-index:10;
}
#hud .left{display:flex; gap:10px; align-items:center}
#hud .key{
  display:inline-flex; min-width:28px; padding:2px 8px; justify-content:center;
  border-radius:8px; font-size:11px; font-weight:700;
  background:linear-gradient(180deg,#fff,#d6f5ff 48%,#7fdaf2 52%,#1ea0d6);
  border:1px solid #0a6e9e; color:#013049;
  box-shadow:inset 0 1px 0 #fff, 0 1px 0 #044a73;
  text-shadow:0 1px 0 rgba(255,255,255,.9);
}
#dots{display:flex; gap:8px}
#dots b{
  width:12px; height:12px; border-radius:50%;
  background: radial-gradient(circle at 30% 25%, #fff, rgba(255,255,255,.4) 35%, #0a6e9e 95%);
  border:1px solid rgba(255,255,255,.7); cursor:pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 4px rgba(0,80,120,.4);
  opacity:.55; transition:opacity .2s, transform .2s;
}
#dots b:hover{ transform:scale(1.15) }
#dots b.on{ opacity:1; background: radial-gradient(circle at 30% 25%, #fff, rgba(255,255,255,.5) 35%, #4d9a1c 95%); box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 14px rgba(180,255,90,.7) }

#notes{
  position:fixed; right:18px; bottom:64px;
  width: min(440px, 80vw);
  background: linear-gradient(180deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,.35) 100%);
  border:1px solid rgba(255,255,255,.9);
  border-radius:14px;
  padding:14px 16px; font-size:14px; line-height:1.4;
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 #fff, 0 18px 40px rgba(0,80,120,.45);
  display:none; z-index:11; color:#013049;
}
#notes.show{display:block; animation:rise .35s ease both}
#notes h4{ margin:0 0 6px; font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:#0a6e9e }

.footnote{ font-size:13px; color:#013049; margin-top:14px; font-weight:600; text-shadow:0 1px 0 rgba(255,255,255,.6) }
.center-stack{ display:flex; flex-direction:column; align-items:center; gap:10px }

.pair-badge{
  display:flex; align-items:center; gap:10px;
  padding:8px 12px; border-radius:12px;
  background:rgba(255,255,255,.45);
  border:1px solid rgba(255,255,255,.82);
  box-shadow:inset 0 1px 0 #fff, 0 6px 14px rgba(0,80,120,.18);
  max-width:min(40vw, 380px);
}
.pair-badge strong{
  display:block; font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:#0a6e9e;
}
.pair-badge code{
  font:700 18px/1 "SF Mono", "Menlo", monospace;
  color:#013049; background:rgba(255,255,255,.65);
  padding:4px 8px; border-radius:8px; border:1px solid rgba(255,255,255,.9);
}
.pair-badge span{
  min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

body.remote-mode{
  overflow:auto;
  background:
    linear-gradient(180deg, rgba(58,158,214,.2), rgba(20,61,17,.25)),
    radial-gradient(circle at top, rgba(255,255,255,.32), transparent 45%),
    var(--sky-top);
}
body.remote-mode #stage,
body.remote-mode #hud,
body.remote-mode #notes{ display:none !important }
#remoteApp{
  min-height:100vh;
  display:none;
  padding:20px 16px 28px;
}
body.remote-mode #remoteApp{
  display:flex;
  align-items:center;
  justify-content:center;
}
.remote-shell{
  width:min(100%, 460px);
  display:flex; flex-direction:column; gap:16px;
}
.remote-card{
  padding:20px 18px;
  border-radius:24px;
  background: linear-gradient(180deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,.28) 100%);
  border:1px solid rgba(255,255,255,.9);
  box-shadow: inset 0 1px 0 #fff, 0 18px 40px rgba(0,80,120,.35);
  backdrop-filter: blur(18px) saturate(180%);
  color:#013049;
}
.remote-kicker{
  display:inline-block;
  font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
  color:#0a6e9e; margin-bottom:10px;
}
.remote-title{
  margin:0; font-size:34px; line-height:.95; color:#fff;
  text-shadow:0 2px 0 #0a6e9e, 0 8px 22px rgba(0,80,120,.5);
}
.remote-subtitle{
  margin:8px 0 0; color:#e9fbff; font-weight:700;
  text-shadow:0 1px 0 #0a6e9e;
}
.remote-display{
  display:grid; grid-template-columns:1fr auto; gap:12px; align-items:end;
}
.remote-counter{
  font-size:54px; font-weight:700; line-height:.9;
  background: linear-gradient(180deg, #fff 0%, #c7f3ff 35%, #38bbe8 55%, #006a99 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  filter: drop-shadow(0 2px 0 rgba(255,255,255,.7)) drop-shadow(0 10px 20px rgba(0,80,120,.35));
}
.remote-status{
  justify-self:end;
  padding:8px 10px; border-radius:999px;
  font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  background:rgba(255,255,255,.7); border:1px solid rgba(255,255,255,.92);
}
.remote-status.offline{ color:#a3170a }
.remote-status.online{ color:#2d6010 }
.remote-notes{
  margin-top:14px; padding:14px;
  border-radius:16px;
  background:rgba(255,255,255,.52);
  border:1px solid rgba(255,255,255,.85);
  box-shadow:inset 0 1px 0 #fff;
  font-size:15px; line-height:1.45;
  max-height:28vh; overflow:auto;
}
.remote-grid{
  display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px;
}
.remote-btn{
  appearance:none; border:1px solid #0a6e9e; cursor:pointer;
  padding:16px 14px; border-radius:18px;
  color:#013049; font:700 17px/1 "Segoe UI", "Quicksand", sans-serif;
  background:linear-gradient(180deg, #ffffff 0%, #d6f5ff 48%, #66c8f0 52%, #1ea0d6 100%);
  box-shadow:inset 0 1px 0 #fff, inset 0 -10px 16px rgba(0,80,120,.2), 0 4px 0 #044a73, 0 10px 18px rgba(0,80,120,.35);
}
.remote-btn:active{ transform:translateY(2px); box-shadow:inset 0 1px 0 #fff, inset 0 -8px 12px rgba(0,80,120,.18), 0 2px 0 #044a73, 0 5px 10px rgba(0,80,120,.28) }
.remote-btn.secondary{
  background:linear-gradient(180deg,#fff 0%,#e8ffc4 48%,#a8e060 52%,#4d9a1c 100%);
  border-color:#2d6010; color:#102b00; box-shadow:inset 0 1px 0 #fff, inset 0 -10px 16px rgba(20,80,0,.18), 0 4px 0 #2d6010, 0 10px 18px rgba(20,80,0,.25);
}
.remote-form{
  display:flex; flex-direction:column; gap:12px;
}
.remote-input{
  width:100%; border:1px solid rgba(255,255,255,.9); border-radius:16px;
  padding:16px 14px; text-transform:uppercase; letter-spacing:.2em;
  font:700 24px/1 "SF Mono", "Menlo", monospace; color:#013049;
  background:rgba(255,255,255,.82);
  box-shadow:inset 0 1px 0 #fff, 0 8px 18px rgba(0,80,120,.15);
}
.remote-help{
  margin:0; font-size:14px; line-height:1.45; color:#04567a;
}
.remote-alert{
  margin:12px 0 0;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.55);
  border:1px solid rgba(255,255,255,.88);
  color:#7a1d00;
  font-size:14px;
  line-height:1.4;
}

@media (max-width: 900px){
  #hud{ gap:10px; padding:10px 12px }
  .pair-badge{ display:none }
}
