/* aped.city — early access. Chunky, clean game UI over a live low-poly jungle. */
:root {
  --ink: #3b1f0e;
  --ink2: #7a4d2b;
  --cream: #fff7e2;
  --paper: #fffdf7;
  --sand: #f4e9cf;
  --banana: #ffd21e;
  --banana2: #ffe36e;
  --leaf: #2f9e44;
  --leaf2: #e3f8e6;
  --sky: #3fd2c3;
  --red: #e03131;
  --display: 'Lilita One', 'Arial Black', system-ui, sans-serif;
  --ui: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 18px;
  --out: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 5px 0 var(--ink);
  --panel-w: 410px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { height: 100%; overscroll-behavior: none; }
body {
  margin: 0; overflow: hidden; color: var(--ink); font: 700 15px/1.45 var(--ui);
  background: #3fd2c3 radial-gradient(120% 80% at 40% 20%, #9ff3dd 0%, #3fd2c3 45%, #1d9a6c 100%);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
.no3d body, body.no3d { background: #2d8f4e url(/og.jpg) center / cover no-repeat; }
button, input { font: inherit; color: inherit; }
a, button, input, label { touch-action: manipulation; }
a { color: inherit; }
[hidden] { display: none !important; }
.resume #intro { display: none; }

#world { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: block; outline: none; opacity: 0; transition: opacity .45s ease; }
#world.on { opacity: 1; }

/* ---------- compat bands ---------- */
.compat { display: none; position: fixed; z-index: 90; top: 0; left: 0; right: 0; padding: 10px 16px; background: var(--ink); color: var(--cream); font: 800 13px/1.4 var(--ui); text-align: center; }
.compat b { color: var(--banana); margin-right: 6px; }
.compat .c-om, .compat .c-st { display: none; }
.omini .compat, .stuck .compat { display: block; }
.omini .compat .c-om { display: inline; }
.stuck:not(.omini) .compat .c-st { display: inline; }

/* ---------- top HUD ---------- */
.top { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; padding-top: max(16px, env(safe-area-inset-top)); pointer-events: none; }
.top > * { pointer-events: auto; }
.logo { font: 34px/1 var(--display); letter-spacing: .01em; color: var(--banana); text-decoration: none; text-shadow: var(--out); white-space: nowrap; }
.logo span { color: var(--cream); }
.top-r { display: flex; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 999px; background: var(--cream); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font: 800 13px/1 var(--ui); white-space: nowrap; text-decoration: none; }
.chip b { font: 17px/1 var(--display); letter-spacing: .02em; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: #37d25a; box-shadow: 0 0 0 2px var(--ink); animation: pulse 1.6s ease-in-out infinite; }
.xlink:hover { background: #fff; }
/* countdown chip — dark scoreboard, fixed-width digits so it never jitters */
.timer { background: var(--ink); color: var(--banana); gap: 7px; padding: 0 12px 0 10px; }
.timer svg { width: 15px; height: 15px; flex: none; }
.timer b { display: inline-flex; font: 18px/1 var(--display); letter-spacing: 0; }
.timer b i { font-style: normal; display: inline-block; width: .6em; text-align: center; }
.timer b i.c { width: .3em; }
.timer .tl { color: var(--cream); font: 800 12px/1 var(--ui); }
.timer.urgent b { color: #ff9f43; }
.xi { width: 15px; height: 15px; fill: currentColor; flex: none; }
.s-show { display: none; }
@keyframes pulse { 50% { transform: scale(.7); opacity: .6; } }

/* ---------- banana counter ---------- */
.bananas { position: fixed; z-index: 15; left: 22px; bottom: 20px; display: flex; align-items: center; gap: 6px; pointer-events: none; }
.bn-ic { width: 58px; height: 58px; filter: drop-shadow(0 4px 0 rgba(59,31,14,.35)); }
.bn-ic.sm { width: 26px; height: 26px; filter: none; }
.bananas b { font: 48px/1 var(--display); color: var(--banana); text-shadow: var(--out); letter-spacing: .02em; min-width: 1ch; }
.bananas.bump b { animation: bump .35s ease; }
.bananas.bump .bn-ic { animation: wob .35s ease; }
@keyframes bump { 40% { transform: scale(1.28) rotate(-4deg); } }
@keyframes wob { 40% { transform: rotate(-16deg) scale(1.1); } }

/* ---------- nameplates ---------- */
.tag, .ct { position: fixed; z-index: 12; left: 0; top: 0; transform: translate(-50%, -100%); pointer-events: none; background: var(--cream); border: 2.5px solid var(--ink); border-radius: 12px; padding: 4px 11px 5px; text-align: center; box-shadow: 0 3px 0 var(--ink); white-space: nowrap; will-change: transform; transition: opacity .25s; }
.tag::after, .ct::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 12px; height: 12px; margin-left: -6px; background: var(--cream); border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg); }
.tag b { display: block; font: 17px/1.1 var(--display); letter-spacing: .01em; }
.tag span { display: block; font: 900 10.5px/1.2 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); }
.tag.pop { animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
.ct { padding: 2px 8px 3px; font: 800 11px/1.2 var(--ui); border-width: 2px; box-shadow: 0 2px 0 var(--ink); opacity: .92; }
.ct::after { width: 8px; height: 8px; margin-left: -4px; bottom: -6px; border-width: 2px; }
@keyframes pop { 0% { transform: translate(-50%, -100%) scale(.2); } }

/* ---------- panel ---------- */
.panel {
  position: fixed; z-index: 30; right: 24px; top: 50%; transform: translateY(-50%); width: var(--panel-w); max-height: calc(100% - 120px); margin-top: 20px;
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
  background: var(--cream); border: 3px solid var(--ink); border-radius: 26px; padding: 24px 22px 22px;
  box-shadow: 0 8px 0 var(--ink), 0 26px 60px rgba(8, 60, 44, .3);
}
.kicker { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 999px; background: var(--leaf); color: #fff; font: 900 11.5px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; border: 2px solid var(--ink); }
.kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--banana); animation: pulse 1.4s infinite; }
.intro h1 { font: 44px/.98 var(--display); letter-spacing: .005em; margin: 14px 0 10px; color: var(--ink); }
.lead { margin: 0 0 18px; color: var(--ink2); font-weight: 700; font-size: 16px; }
.connect { display: grid; gap: 12px; }
.field { display: flex; align-items: center; height: 60px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; padding: 0 14px; box-shadow: inset 0 3px 0 rgba(59,31,14,.08); transition: box-shadow .15s; }
.field:focus-within { box-shadow: 0 0 0 4px rgba(255, 210, 30, .7); }
.field .at { font: 26px/1 var(--display); color: var(--ink2); margin-right: 4px; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 800 19px/1 var(--ui); color: var(--ink); padding: 0; }
.field input::placeholder { color: #b89c80; font-weight: 700; }
.connect.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.msg { min-height: 20px; margin: 10px 2px 0; font: 800 13.5px/1.35 var(--ui); color: var(--ink2); }
.msg.err { color: var(--red); }
.msg.ok { color: var(--leaf); }
.fine { margin: 2px 2px 0; font: 700 12px/1.4 var(--ui); color: #a08466; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 18px; border: 3px solid var(--ink); border-radius: 15px; background: var(--banana); color: var(--ink); font: 19px/1 var(--display); letter-spacing: .02em; text-decoration: none; cursor: pointer; box-shadow: 0 5px 0 var(--ink); transition: transform .08s, box-shadow .08s, background .15s; -webkit-user-select: none; user-select: none; white-space: nowrap; }
.btn:hover { background: var(--banana2); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn.big { height: 62px; font-size: 25px; width: 100%; }
.btn.ghost { background: #fff; }
.btn.ghost:hover { background: var(--sand); }
.btn.dark { background: var(--ink); color: var(--cream); }
.btn.dark:hover { background: #55311a; }
.btn.sm { height: 42px; padding: 0 14px; font-size: 16px; border-radius: 13px; box-shadow: 0 4px 0 var(--ink); }
.btn.off, .btn:disabled { opacity: .45; pointer-events: none; box-shadow: 0 2px 0 var(--ink); transform: translateY(3px); }
.link { display: inline-flex; align-items: center; min-height: 38px; background: none; border: 0; padding: 0 8px; margin: -6px -6px; cursor: pointer; font: 800 12.5px/1 var(--ui); color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; }

/* recent ticker */
.recent { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 2px dashed rgba(59,31,14,.2); overflow: hidden; }
.rl { flex: none; font: 900 10.5px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--leaf); }
.rtrack { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.rrun { display: inline-flex; gap: 16px; white-space: nowrap; animation: run 40s linear infinite; font: 800 13px/1 var(--ui); }
.rrun span b { color: var(--ink2); font-weight: 900; margin-left: 3px; }
@keyframes run { to { transform: translateX(-50%); } }

/* ---------- quest ---------- */
.me { display: flex; align-items: center; gap: 12px; }
.av { width: 54px; height: 54px; flex: none; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, #fff0a0, #f2b632 55%, #b8801c); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.av img { width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: cover; background: #e8a91a; }
.me-t { flex: 1; min-width: 0; }
.me-t b { display: block; font: 23px/1.05 var(--display); letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-t > span { font: 800 13px/1.4 var(--ui); color: var(--ink2); }
.tier { display: inline-block; padding: 1px 8px 2px; border-radius: 999px; color: #fff; font: 900 11px/1.5 var(--ui); letter-spacing: .08em; background: #8a6a4a; border: 2px solid var(--ink); vertical-align: 1px; }
.traits { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; }
.traits span { padding: 4px 10px; border-radius: 999px; background: var(--sand); font: 800 12px/1.2 var(--ui); color: var(--ink2); }
.climb { margin-bottom: 14px; }
.climb-t { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.climb-t b { font: 17px/1 var(--display); letter-spacing: .02em; }
.climb-t span { font: 900 12.5px/1 var(--ui); color: var(--ink2); }
.bar { height: 16px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--sand); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(-45deg, #51cf66 0 10px, #40c057 10px 20px); background-size: 28px 28px; border-right: 2.5px solid var(--ink); transition: width .8s cubic-bezier(.3,1.3,.5,1); animation: candy 1s linear infinite; }
.bar i[style*="width: 0"] { border-right: 0; }
@keyframes candy { to { background-position: 28px 0; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.st { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; padding: 10px 11px 10px 10px; border: 2.5px solid var(--ink); border-radius: 17px; background: #fff; transition: background .2s, opacity .2s, transform .2s; }
.st .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--sand); border: 2.5px solid var(--ink); }
.st .ic svg { width: 28px; height: 28px; }
.st .tt { min-width: 0; }
.st .tt b { display: block; font: 18px/1.1 var(--display); letter-spacing: .01em; }
.st .tt span { display: block; font: 800 12.5px/1.3 var(--ui); color: var(--ink2); margin-top: 2px; }
.st .act { display: flex; align-items: center; gap: 6px; }
.st .rw { font: 900 12px/1 var(--ui); color: var(--ink2); display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.st .rw svg { width: 16px; height: 16px; }
.st .state { font: 900 12.5px/1 var(--ui); white-space: nowrap; }
.st.locked { background: #faf3e2; opacity: .6; }
.st.locked .ic { background: #efe4c8; }
.st.ready { background: #fff3bf; box-shadow: 0 4px 0 var(--ink); transform: translateY(-2px); }
.st.ready .ic { background: var(--banana); animation: nudge 2.4s ease-in-out infinite; }
.st.busy { background: #fff3bf; }
.st.busy .state { color: var(--ink2); }
.st.done { background: var(--leaf2); }
.st.done .ic { background: #51cf66; }
.st.done .state { color: var(--leaf); }
@keyframes nudge { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-10deg); } 86% { transform: rotate(8deg); } 94% { transform: rotate(-4deg); } }
.st .more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font: 800 12px/1.3 var(--ui); color: var(--ink2); padding-top: 2px; }
.st .more .btn { height: 38px; font-size: 14px; padding: 0 11px; border-radius: 11px; box-shadow: 0 3px 0 var(--ink); border-width: 2.5px; }
.wform { grid-column: 1 / -1; display: flex; gap: 8px; }
.wform input { flex: 1; min-width: 0; height: 48px; border: 2.5px solid var(--ink); border-radius: 13px; padding: 0 12px; background: #fff; font: 800 14px/1 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; outline: none; }
.wform input:focus { box-shadow: 0 0 0 4px rgba(255, 210, 30, .7); }
.wform .btn { height: 48px; }
.wmsg { grid-column: 1 / -1; font: 800 12px/1.3 var(--ui); color: var(--ink2); margin-top: -2px; }
.wmsg.err { color: var(--red); }
.st.claim .btn { width: 100%; }
.st .cbtn { grid-column: 1 / -1; }

/* ---------- done ---------- */
.win { position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(12, 58, 42, .55); animation: fade .3s ease; overflow: auto; }
.done-in { width: min(700px, 100%); background: var(--cream); border: 3px solid var(--ink); border-radius: 28px; padding: 26px; text-align: center; box-shadow: 0 10px 0 var(--ink), 0 30px 80px rgba(0,0,0,.35); animation: rise .5s cubic-bezier(.3,1.4,.5,1); max-height: 100%; overflow: auto; }
.win h2 { font: clamp(28px, 5vw, 44px)/1 var(--display); margin: 14px 0 6px; letter-spacing: .01em; }
.ds { margin: 0 0 16px; font: 800 14px/1.4 var(--ui); color: var(--ink2); }
.ds b { color: var(--ink); }
.dimg { border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 0 5px 0 var(--ink); background: #2d8f4e; aspect-ratio: 1200 / 630; }
.dimg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dacts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 20px 0 12px; }
.dref { margin: 0; font: 800 12.5px/1.4 var(--ui); color: var(--ink2); word-break: break-all; }
.dref code { font: 800 12.5px/1.4 ui-monospace, Menlo, Consolas, monospace; color: var(--ink); background: var(--sand); padding: 2px 6px; border-radius: 6px; }
.dclose { margin-top: 12px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px) scale(.94); opacity: 0; } }

/* ---------- toast, flash, flyers ---------- */
.toast { position: fixed; z-index: 80; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--cream); padding: 12px 18px; border-radius: 14px; font: 800 14px/1.3 var(--ui); transition: .25s; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.flash { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; left: 0; background: #fffbe6; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
.flyer { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 40; pointer-events: none; }
.flyer svg { position: absolute; left: 0; top: 0; width: 34px; height: 34px; will-change: transform; }

/* ================= responsive =================
   side panel  : desktop, tablet landscape
   bottom sheet: phones in portrait (≤760) + tablets in portrait (centred)
   compact side: phones in landscape (short screens)
   app.js mirrors these queries in isSheet() to keep the 3D focus clear of the panel. */
@media (pointer: coarse) {
  .wform input { font-size: 16px; } /* iOS zooms into inputs under 16px */
  .btn:hover { background: var(--banana); }
  .btn.ghost:hover { background: #fff; }
  .btn.dark:hover { background: var(--ink); }
}

/* ---------- bottom sheet ---------- */
@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) {
  .top { padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .logo { font-size: 27px; }
  .chip { height: 32px; padding: 0 10px; font-size: 12px; }
  .chip b { font-size: 15px; }
  .s-hide { display: none; }
  .s-show { display: inline; }
  .timer { position: absolute; right: max(14px, env(safe-area-inset-right)); top: calc(max(12px, env(safe-area-inset-top)) + 42px); height: 34px; }
  .timer b { font-size: 19px; }
  .bananas { left: max(14px, env(safe-area-inset-left)); top: calc(max(12px, env(safe-area-inset-top)) + 44px); bottom: auto; gap: 4px; }
  .bn-ic { width: 36px; height: 36px; }
  .bananas b { font-size: 30px; }
  .panel {
    left: 0; right: 0; bottom: 0; top: auto; transform: none; width: auto; margin: 0; max-height: 55%;
    border-radius: 24px 24px 0 0; border-bottom: 0;
    padding: 18px max(14px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    box-shadow: 0 -6px 0 rgba(59,31,14,.18), 0 -18px 40px rgba(8,60,44,.22);
  }
  .panel::before { content: ''; display: block; width: 42px; height: 5px; border-radius: 9px; background: rgba(59,31,14,.2); margin: -8px auto 12px; }
  .intro h1 { font-size: 31px; margin: 10px 0 6px; }
  .lead { font-size: 14.5px; margin-bottom: 14px; }
  .field { height: 56px; }
  .field input { font-size: 17px; }
  .btn.big { height: 56px; font-size: 22px; }
  .recent { margin-top: 12px; padding-top: 10px; }
  .me { gap: 10px; }
  .av { width: 46px; height: 46px; }
  .me-t b { font-size: 20px; }
  .traits { margin: 9px 0 10px; }
  .traits span { font-size: 11px; padding: 3px 8px; }
  .climb { margin-bottom: 10px; }
  .st { grid-template-columns: 40px 1fr auto; gap: 10px; padding: 8px 9px 8px 8px; border-radius: 15px; }
  .st .ic { width: 40px; height: 40px; border-radius: 12px; }
  .st .ic svg { width: 24px; height: 24px; }
  .st .tt b { font-size: 16.5px; }
  .st .tt span { font-size: 12px; }
  .st .rw { display: none; }
  .st.done .rw { display: inline-flex; }
  .btn.sm { height: 40px; font-size: 15px; padding: 0 12px; }
  .win { padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); align-items: flex-end; }
  .done-in { padding: 18px 14px; border-radius: 24px; }
  .win h2 { font-size: 27px; }
  .dacts { margin: 16px 0 10px; }
  .dacts .btn { flex: 1 1 40%; height: 48px; font-size: 17px; }
  .toast { bottom: calc(var(--sheet, 0px) + 12px); top: auto; font-size: 13px; padding: 10px 14px; }
}
/* tablets in portrait: a centred, roomier sheet */
@media (min-width: 761px) and (max-width: 1024px) and (orientation: portrait) {
  .panel { left: 50%; right: auto; width: min(620px, calc(100% - 40px)); transform: translateX(-50%); max-height: 50%; border: 3px solid var(--ink); border-bottom: 0; padding: 22px 22px calc(18px + env(safe-area-inset-bottom)); }
  .intro h1 { font-size: 38px; }
  .logo { font-size: 32px; }
  .bananas b { font-size: 38px; }
  .bn-ic { width: 46px; height: 46px; }
  .win { align-items: center; }
}
/* short phones in portrait */
@media (max-width: 760px) and (max-height: 640px) and (orientation: portrait) {
  .intro h1 { font-size: 26px; }
  .lead { display: none; }
  .traits { display: none; }
  .panel { max-height: 58%; }
}
/* narrow phones (SE 1st gen, small Androids) */
@media (max-width: 360px) {
  .logo { font-size: 23px; }
  .chip { padding: 0 8px; }
  .chip b { font-size: 14px; }
  .intro h1 { font-size: 26px; }
  .field .at { font-size: 22px; }
  .st { grid-template-columns: 34px 1fr auto; gap: 8px; padding: 7px 7px 7px 6px; }
  .st .ic { width: 34px; height: 34px; border-radius: 10px; }
  .st .ic svg { width: 20px; height: 20px; }
  .st .tt b { font-size: 15px; }
  .st .tt span { font-size: 11.5px; }
  .st .act .btn .xi { display: none; }
  .btn.sm { padding: 0 10px; font-size: 14px; }
  .wform .btn { padding: 0 10px; }
  .dacts .btn { flex: 1 1 100%; }
}

/* ---------- phones in landscape: compact side panel ---------- */
@media (max-height: 500px) and (min-width: 561px) and (orientation: landscape) {
  .top { padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); padding-left: max(12px, env(safe-area-inset-left)); padding-right: calc(min(330px, 46vw) + 22px + env(safe-area-inset-right)); }
  .logo { font-size: 24px; }
  .chip { height: 30px; padding: 0 9px; font-size: 11.5px; box-shadow: 0 2px 0 var(--ink); }
  .chip b { font-size: 14px; }
  .s-hide { display: none; }
  .s-show { display: inline; }
  .bananas { top: auto; bottom: max(10px, env(safe-area-inset-bottom)); left: max(12px, env(safe-area-inset-left)); gap: 4px; }
  .timer { position: absolute; left: max(12px, env(safe-area-inset-left)); right: auto; top: calc(max(8px, env(safe-area-inset-top)) + 36px); height: 30px; }
  .timer b { font-size: 16px; }
  .bn-ic { width: 34px; height: 34px; }
  .bananas b { font-size: 28px; }
  .panel {
    left: auto; right: max(10px, env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top)); bottom: max(10px, env(safe-area-inset-bottom));
    transform: none; margin: 0; width: min(330px, 46vw); max-height: none;
    border: 3px solid var(--ink); border-radius: 20px; padding: 14px 12px;
    box-shadow: 0 5px 0 var(--ink), 0 16px 36px rgba(8,60,44,.25);
  }
  .panel::before { display: none; }
  .kicker { font-size: 10px; padding: 4px 9px 4px 7px; }
  .intro h1 { font-size: 23px; margin: 8px 0; }
  .lead, .fine, .traits { display: none; }
  .connect { gap: 9px; }
  .field { height: 46px; border-width: 2.5px; }
  .field .at { font-size: 20px; }
  .field input { font-size: 16px; }
  .btn.big { height: 48px; font-size: 19px; box-shadow: 0 4px 0 var(--ink); }
  .msg { margin-top: 6px; font-size: 12px; min-height: 0; }
  .recent { margin-top: 8px; padding-top: 8px; }
  .me { gap: 9px; }
  .av { width: 40px; height: 40px; }
  .me-t b { font-size: 18px; }
  .me-t > span { font-size: 12px; }
  .climb { margin: 8px 0; }
  .climb-t b { font-size: 15px; }
  .bar { height: 13px; }
  .steps { gap: 7px; }
  .st { grid-template-columns: 34px 1fr auto; gap: 8px; padding: 6px 8px 6px 6px; border-radius: 13px; }
  .st .ic { width: 34px; height: 34px; border-radius: 10px; }
  .st .ic svg { width: 20px; height: 20px; }
  .st .tt b { font-size: 15px; }
  .st .tt span { font-size: 11px; }
  .st .rw { display: none; }
  .st.done .rw { display: inline-flex; }
  .btn.sm { height: 36px; font-size: 14px; padding: 0 10px; box-shadow: 0 3px 0 var(--ink); }
  .wform input, .wform .btn { height: 42px; }
  .win { padding: 10px; align-items: center; }
  .done-in { padding: 12px 14px; border-radius: 20px; width: min(640px, 100%); }
  .win .kicker { display: none; }
  .win h2 { font-size: 22px; margin: 2px 0 4px; }
  .ds { margin-bottom: 8px; font-size: 12.5px; }
  .dimg { width: min(100%, calc((100vh - 200px) * 1.905)); margin: 0 auto; }
  .dref { display: none; }
  .dclose { margin-top: 2px; }
  .dacts { margin: 10px 0 6px; gap: 8px; }
  .dacts .btn { height: 40px; font-size: 15px; padding: 0 12px; }
  .toast { top: auto; bottom: 12px; left: calc((100% - min(330px, 46vw)) / 2); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
