/* ============================================================================
   סופר נהוראי · מצאת טלפון
   Palette is lifted verbatim from the game's src/config.js COLORS. Nothing here
   is invented: the cream, the gold, the terracotta and the one shocking pink are
   the actual colours the game paints with.
   ========================================================================== */

:root {
  --cream: #fdf6e3;
  --dim: #cdbf9a;
  --sand: #e2cf9a;
  --wall: #e9dcc3;
  --roof: #b9573e;
  --gold: #e8c84a;
  --gold-deep: #c9a24a;
  --gold-dark: #b3851e;
  --ink: #1d140a;
  --night: #0a0a12;
  --grass: #6aa84f;
  --road: #6b6f76;
  --cash: #5fcf6e;
  --heat: #e0593f;
  --koom: #46c6c0;
  --neon: #ff2bd6;
  --teal: #2f7f78;
  --panel: rgba(12, 12, 18, 0.92);
  --line: rgba(232, 200, 74, 0.18);
  --fs: clamp(14px, 3.6vw, 15px);
  font-family: Heebo, system-ui, sans-serif;
}

* {
  box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent;
  /* the page is an app, not a document: dragging should never paint a blue
     selection over half the phone (see js/guard.js for the rest) */
  -webkit-user-select: none; user-select: none;
  /* layer 1 of the iOS double-tap-zoom fix. See js/touchfix.js - the other two
     layers are there and all three are needed. */
  touch-action: manipulation;
}
/* the one place a person genuinely needs to type and select */
input, textarea { -webkit-user-select: text; user-select: text; }

html, body { height: 100%; }

body {
  background: #07070d;
  color: var(--cream);
  font-size: var(--fs);
  line-height: 1.5;
  overflow: hidden;
  overscroll-behavior: none;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

/* ============================ the street ================================= */
/* Only on desktop. On a phone the phone IS the page and a frame around it would
   be a lie: you are already holding one. */
#street { display: none; }

@media (min-width: 900px) {
  #street {
    display: block; position: fixed; inset: 0; overflow: hidden;
  }
  .st-sky {
    position: absolute; inset: 0 0 42% 0;
    background: linear-gradient(#080814 0%, #12102a 55%, #241a2e 100%);
  }
  .st-sky::after {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(1px 1px at 12% 18%, #f5e6b0, transparent),
      radial-gradient(1px 1px at 74% 12%, #f5e6b0, transparent),
      radial-gradient(1px 1px at 44% 30%, #cdbf9a, transparent),
      radial-gradient(1px 1px at 88% 34%, #f5e6b0, transparent),
      radial-gradient(1px 1px at 28% 8%, #f5e6b0, transparent);
    opacity: .8;
  }
  .st-blocks {
    position: absolute; left: 0; right: 0; bottom: 42%; height: 34vh;
    background: #080814;
    clip-path: polygon(0 46%, 9% 46%, 9% 20%, 22% 20%, 22% 52%, 34% 52%, 34% 8%,
      50% 8%, 50% 38%, 63% 38%, 63% 16%, 78% 16%, 78% 44%, 91% 44%, 91% 26%,
      100% 26%, 100% 100%, 0 100%);
  }
  /* windows: sparse and irregular, because a block of flats at 4am is mostly dark */
  .st-blocks::after {
    content: ''; position: absolute; inset: 0;
    background-image:
      radial-gradient(3px 4px at 4% 62%, rgba(232,200,74,.5), transparent),
      radial-gradient(3px 4px at 15% 40%, rgba(143,211,224,.3), transparent),
      radial-gradient(3px 4px at 26% 70%, rgba(232,200,74,.45), transparent),
      radial-gradient(3px 4px at 38% 30%, rgba(232,200,74,.5), transparent),
      radial-gradient(3px 4px at 45% 52%, rgba(232,200,74,.35), transparent),
      radial-gradient(3px 4px at 56% 60%, rgba(143,211,224,.28), transparent),
      radial-gradient(3px 4px at 68% 34%, rgba(232,200,74,.5), transparent),
      radial-gradient(3px 4px at 74% 66%, rgba(232,200,74,.4), transparent),
      radial-gradient(3px 4px at 85% 58%, rgba(232,200,74,.45), transparent),
      radial-gradient(3px 4px at 95% 44%, rgba(143,211,224,.25), transparent);
  }
  /* the road at 04:52 is nearly black. Anything lighter reads as daytime and
     the whole "found at night" premise falls apart. */
  .st-road {
    position: absolute; inset: 58% 0 0 0; background: #15161b;
  }
  .st-road::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 10px; background: #23252c;
    box-shadow: 0 -2px 0 #0c0d11;
  }
  .st-road::after {
    content: ''; position: absolute; left: 0; right: 0; top: 34%; height: 5px;
    background: repeating-linear-gradient(90deg, rgba(201,177,90,.5) 0 58px, transparent 58px 158px);
  }
  /* one lamp, one pool of light, and the phone lying inside it */
  .st-pool {
    position: absolute; left: 50%; top: 62%; width: 130vh; height: 90vh;
    transform: translate(-50%, -22%);
    background: radial-gradient(closest-side, rgba(232,200,74,.16), rgba(232,200,74,.05) 45%, transparent 72%);
    pointer-events: none;
  }
  .st-bench {
    position: absolute; left: 50%; top: 66%; width: min(760px, 62vw); height: 150px;
    transform: translateX(-50%);
  }
  .st-bench i { position: absolute; background: #4a3320; border-radius: 2px; }
  .st-bench i:nth-child(1) { left: 0; right: 0; top: 0; height: 15px; }
  .st-bench i:nth-child(2) { left: 0; right: 0; top: 23px; height: 15px; }
  .st-bench i:nth-child(3) { left: 0; right: 0; top: 46px; height: 15px; }
  .st-bench i:nth-child(4) { left: 44px; top: 58px; width: 14px; height: 84px; background: #2a2a30; }
  .st-bench i:nth-child(5) { right: 44px; top: 58px; width: 14px; height: 84px; background: #2a2a30; }
  .st-lamp {
    position: absolute; left: 7%; bottom: 0; width: 9px; height: 74vh;
    background: linear-gradient(#2a2c33, #16161c);
  }
  .st-lamp::after {
    content: ''; position: absolute; top: 0; left: 0; width: 130px; height: 9px;
    background: #2a2c33; border-radius: 0 0 30px 0;
  }
  .st-lamp::before {
    content: ''; position: absolute; top: 4px; left: 108px; width: 34px; height: 14px;
    background: #f5e6b0; border-radius: 3px;
    box-shadow: 0 0 40px 16px rgba(232,200,74,.4);
  }
  .st-litter { position: absolute; inset: auto 0 3% 0; height: 70px; }
  .st-litter i {
    position: absolute; width: 13px; height: 4px; background: #d8d2c0; border-radius: 2px;
    opacity: .55;
  }
  .st-litter i:nth-child(1) { left: 24%; bottom: 40px; transform: rotate(24deg); }
  .st-litter i:nth-child(2) { left: 33%; bottom: 8px; transform: rotate(-40deg); }
  .st-litter i:nth-child(3) { right: 27%; bottom: 34px; transform: rotate(70deg); }
  .st-litter i:nth-child(4) { right: 19%; bottom: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); opacity: .7; }
  .st-litter i:nth-child(5) { left: 15%; bottom: 20px; transform: rotate(-8deg); }
  .st-litter i:nth-child(6) { right: 38%; bottom: 52px; width: 7px; height: 7px; border-radius: 50%; background: #a8452a; }
}

/* ============================ the device ================================= */
#device {
  position: relative; z-index: 2;
  height: 100%; width: 100%;
  display: grid; place-items: center;
}

#bezel {
  position: relative;
  width: 100%; height: 100%;
  background: #0a0a0e;
  overflow: hidden;
}

@media (min-width: 900px) {
  #bezel {
    width: min(392px, 30vw); height: min(812px, 92vh);
    border-radius: 34px; padding: 12px 10px;
    background: linear-gradient(160deg, #2a2a30, #131318 40%, #1c1c22);
    box-shadow: 0 40px 90px rgba(0,0,0,.75), 0 0 0 2px #000,
      inset 0 0 0 1px rgba(255,255,255,.07), 0 0 60px 10px rgba(232,200,74,.06);
    transform: rotate(-1.4deg);
  }
  /* it is lying on something, so it casts on something */
  #bezel::after {
    content: ''; position: absolute; left: -6%; right: -6%; bottom: -34px; height: 40px;
    background: radial-gradient(closest-side, rgba(0,0,0,.65), transparent 72%);
    pointer-events: none;
  }
  .bz-sticker {
    position: absolute; top: 26px; left: -12px; z-index: 9;
    font-size: 26px; transform: rotate(-18deg);
    filter: saturate(.7) contrast(1.1); opacity: .9;
    text-shadow: 0 2px 4px rgba(0,0,0,.6);
  }
  .bz-cam {
    position: absolute; top: 5px; left: 50%; translate: -50% 0;
    width: 46px; height: 5px; border-radius: 4px; background: #000;
  }
}
.bz-sticker, .bz-cam { display: none; }
@media (min-width: 900px) { .bz-sticker, .bz-cam { display: block; } }

#screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  background: var(--night);
  border-radius: 0;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 900px) { #screen { border-radius: 24px; } }

#wallpaper { position: absolute; inset: 0; width: 100%; height: 100%; }

/* the phone has lived in a pocket */
#grime {
  position: absolute; inset: 0; pointer-events: none; z-index: 6; opacity: .5;
  background:
    radial-gradient(60px 40px at 22% 30%, rgba(255,255,255,.05), transparent 70%),
    radial-gradient(90px 60px at 78% 62%, rgba(255,255,255,.04), transparent 70%),
    radial-gradient(40px 30px at 55% 84%, rgba(255,255,255,.05), transparent 70%);
}
/* anchored to the corner at a fixed size, so it stays a crack and never
   stretches into a constellation on a wide screen.
   ⚠️ NEVER give this pointer-events. An <svg> root captures its whole bounding
   box, not just the painted strokes, and this box covers the right-hand half of
   the app grid. Use #crackHit for the easter egg instead. */
#crack {
  position: absolute; top: 0; right: 0;
  width: 170px; height: 380px; max-width: 58%;
  pointer-events: none; z-index: 7;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.55));
}
/* the poke target: parked over the clock in the status strip, which holds no
   other control, and stops well above the first row of icons (y >= 44) */
#crackHit {
  position: absolute; top: 0; right: 0; width: 54px; height: 40px;
  z-index: 9; background: none;
  padding-top: env(safe-area-inset-top);
}
#crack .ck-a { opacity: calc(.17 * var(--spread, 1)); transition: opacity .3s; }
#crack .ck-b { opacity: calc(.10 * var(--spread, 1)); transition: opacity .3s; }
#crack.spread { animation: crk .26s steps(2); }
@keyframes crk { 50% { transform: translate(1px, -1px); filter: drop-shadow(0 0 3px rgba(255,255,255,.4)); } }

/* ---------------------------- status bar -------------------------------- */
#statusbar {
  position: absolute; top: env(safe-area-inset-top); inset-inline: 0; z-index: 8;
  height: 30px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  color: var(--cream); text-shadow: 0 1px 2px rgba(0,0,0,.7);
}
.sb-c { opacity: .72; font-weight: 500; display: flex; align-items: center; gap: 5px; }
.bars { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 9px; }
.bars b { width: 3px; background: var(--cream); }
.bars b:nth-child(1) { height: 4px; }
.bars b:nth-child(2) { height: 7px; }
.bars b:nth-child(3) { height: 9px; }
.bars b.off { opacity: .3; }
.sb-r { display: flex; align-items: center; gap: 5px; }
.batt {
  width: 22px; height: 10px; border: 1.5px solid rgba(253,246,227,.7);
  border-radius: 2px; padding: 1.5px; position: relative;
}
.batt::after {
  content: ''; position: absolute; left: -3px; top: 3px; width: 2px; height: 4px;
  background: rgba(253,246,227,.7); border-radius: 0 1px 1px 0;
}
#battFill { display: block; height: 100%; background: var(--heat); border-radius: 1px; transition: width .4s; }
body.critical #statusBatt { color: var(--heat); animation: blip 1.4s steps(2) infinite; }
@keyframes blip { 50% { opacity: .35; } }

/* ---------------------------- lock screen ------------------------------- */
#lock {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(env(safe-area-inset-top) + 74px) 18px calc(env(safe-area-inset-bottom) + 26px);
  background: linear-gradient(rgba(6,6,14,.42) 0%, rgba(6,6,14,.12) 35%, rgba(6,6,14,.82) 100%);
  transition: opacity .45s, transform .45s cubic-bezier(.3,0,.2,1);
  cursor: pointer;
}
#lock.gone { opacity: 0; transform: translateY(-8%); pointer-events: none; }
.lk-time { font-size: 68px; font-weight: 200; line-height: 1; letter-spacing: -.02em; }
.lk-date { color: var(--dim); margin-top: 4px; font-size: 13px; }
#lockNotifs { width: 100%; margin-top: auto; display: grid; gap: 8px; }
.lk-n {
  background: rgba(16,16,24,.88);
  border: 1px solid rgba(253,246,227,.09); border-radius: 12px;
  padding: 9px 12px; display: grid; grid-template-columns: 1fr auto; gap: 1px 8px;
  animation: nSlide .42s ease-out backwards;
}
.lk-n:nth-child(2) { animation-delay: .08s; }
.lk-n:nth-child(3) { animation-delay: .16s; }
.lk-n:nth-child(4) { animation-delay: .24s; }
@keyframes nSlide { from { opacity: 0; transform: translateY(10px); } }
.lk-n b { font-size: 13px; }
.lk-n span { grid-column: 1; color: var(--dim); font-size: 12.5px; }
.lk-n i { grid-row: 1 / span 2; align-self: center; font-style: normal; font-size: 11px; color: var(--gold); font-weight: 700; }
.lk-n.mom { border-color: rgba(201,111,160,.5); box-shadow: 0 0 0 1px rgba(201,111,160,.14); }
.lk-n.mom i { color: #f0a0c8; }
.lk-n.dim { opacity: .55; }
.lk-hint { margin-top: 18px; text-align: center; }
.lk-hint span {
  display: block; font-weight: 900; font-size: 15px; color: var(--gold);
  animation: pulse 2.4s ease-in-out infinite;
}
.lk-hint i { font-style: normal; font-size: 11.5px; color: var(--dim); opacity: .75; }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------------------------- home screen ------------------------------- */
#home {
  position: absolute; inset: 30px 0 0 0; z-index: 3;
  padding: calc(env(safe-area-inset-top) + 14px) 16px calc(env(safe-area-inset-bottom) + 12px);
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity .35s .1s;
  pointer-events: none;
}
body.unlocked #home { opacity: 1; pointer-events: auto; }
body.in-app #home { opacity: .25; }

#appGrid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px;
  align-content: start; flex: 1;
}
#widget {
  margin: 16px 2px 0; padding: 11px 13px 12px;
  background: rgba(10,10,16,.82);
  border: 1.5px solid rgba(232,200,74,.28); border-radius: 16px;
  display: grid; gap: 5px;
  box-shadow: 2px 3px 0 rgba(0,0,0,.4);
}
.wg-row { display: flex; justify-content: space-between; align-items: baseline; }
.wg-k { font-size: 10.5px; color: var(--dim); letter-spacing: .05em; }
.wg-rank { font-size: 14px; font-weight: 900; color: var(--gold); }
.wg-bar {
  height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden;
  border: 1px solid rgba(0,0,0,.4);
}
.wg-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
}
.wg-row.small { font-size: 10.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.wg-q {
  margin-top: 4px; padding-top: 7px; border-top: 1px dashed rgba(253,246,227,.14);
  font-size: 12px; font-weight: 700; line-height: 1.45; color: var(--cream);
}

#dock {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  padding: 10px 22px; margin-top: 10px;
  background: rgba(10,10,17,.72);
  border: 1px solid rgba(253,246,227,.08); border-radius: 20px;
}

.app {
  display: grid; justify-items: center; gap: 6px;
  transform: rotate(var(--tilt, 0deg));
  transition: transform .1s cubic-bezier(.2,.8,.3,1);
}
.app:active { transform: rotate(var(--tilt, 0deg)) scale(.88); }
.app-ico {
  position: relative; width: 54px; height: 54px; display: grid; place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--tint) 26%, #12121a);
  border: 2px solid var(--ink);
  box-shadow: 2px 3px 0 rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.14);
}
.app-ico canvas { display: block; image-rendering: pixelated; }
.app-name {
  font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.8);
  text-align: center; line-height: 1.2;
}
.badge {
  position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 10px; background: var(--heat); color: #fff;
  font-size: 11px; font-weight: 900; display: grid; place-items: center;
  border: 2px solid #0c0c14;
}
.is-dock .app-name { font-size: 10.5px; }
.app.is-secret { animation: secretIn .42s cubic-bezier(.2,.8,.3,1); }
.app.is-secret .app-ico { border-color: #6a6252; }
@keyframes secretIn { from { opacity: 0; transform: rotate(-3deg) scale(.4); } }
.secret-note { background: #e7dcc4; }
.secret-note .note-body p:last-child {
  margin-top: 10px; font-weight: 900; font-size: 15px;
  border-top: 0; padding-top: 8px;
}

/* ---------------------------- app windows ------------------------------- */
#appView { position: absolute; inset: 0; z-index: 10; pointer-events: none; }

.app-view {
  position: absolute; inset: 0; pointer-events: auto;
  background: #0b0b12;
  display: flex; flex-direction: column;
  transform-origin: var(--ox, 50%) var(--oy, 50%);
  transform: scale(.92); opacity: 0;
  /* This used to zoom from scale(.12) in steps(5). It read as a frame drop, not
     as a sprite - and it genuinely was expensive: each step re-rasterised a
     full-screen subtree full of canvases. Short travel, no steps, GPU-only
     properties. */
  transition: transform .16s cubic-bezier(.2, .8, .3, 1), opacity .13s ease-out;
  will-change: transform, opacity;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.app-view.in { transform: scale(1); opacity: 1; }
.app-view.in { will-change: auto; }
/* the app body is its own paint island, so a scroll inside it never repaints
   the wallpaper canvas sitting behind it */
.app-view .app-body { contain: paint; }

.app-bar {
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  gap: 0 10px; padding: 10px 14px 9px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(color-mix(in srgb, var(--tint) 16%, #0b0b12), #0b0b12);
}
.app-back {
  grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 10px;
  font-size: 24px; line-height: 1; color: var(--tint);
  background: rgba(255,255,255,.05); display: grid; place-items: center;
  transform: scaleX(-1);
}
.app-back:active { background: rgba(255,255,255,.14); }
.app-title { font-weight: 900; font-size: 17px; }
.app-sub { font-size: 11.5px; color: var(--dim); }

.app-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px 40px;
}
.app-body::-webkit-scrollbar { width: 4px; }
.app-body::-webkit-scrollbar-thumb { background: rgba(232,200,74,.25); border-radius: 2px; }

.app-foot {
  margin-top: 20px; padding-top: 12px; border-top: 1px dashed rgba(253,246,227,.13);
  font-size: 12px; color: var(--dim); line-height: 1.65;
}
.app-foot.warm { color: var(--gold); }
.gal-note { font-size: 12.5px; color: var(--dim); margin-bottom: 12px; line-height: 1.6; }
.gal-note.warn { color: var(--heat); margin: 12px 0 8px; }
.ledger-head {
  font-weight: 900; font-size: 12px; letter-spacing: .04em; color: var(--dim);
  margin: 20px 0 8px; text-transform: none;
}
.ledger-head.red { color: var(--heat); }
.ledger-head.gold { color: var(--gold); }

/* ============================ messages =================================== */
.thread-list { display: grid; gap: 4px; }
.thread {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px;
  padding: 9px 6px; border-radius: 12px; text-align: start; width: 100%;
}
.thread:active { background: rgba(255,255,255,.06); }
.thread-av { display: grid; place-items: end center; height: 50px; }
.thread-av canvas { display: block; }
.thread-txt { display: grid; gap: 1px; min-width: 0; }
.thread-name { font-weight: 700; font-size: 14.5px; }
.thread-prev {
  font-size: 12.5px; color: var(--dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.thread-badge {
  background: var(--cash); color: #06210c; border-radius: 10px; padding: 1px 7px;
  font-size: 11px; font-weight: 900;
}
.thread.danger .thread-name { color: var(--heat); }
.thread.danger .thread-badge { background: var(--heat); color: #fff; }
.thread.blocked { opacity: .55; }
.thread.blocked .thread-badge { background: #444; color: #ccc; }

.chat-head {
  position: relative; display: grid; gap: 1px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line); margin-bottom: 10px;
}
.chat-head b { font-size: 16px; }
.chat-head span { font-size: 11.5px; color: var(--dim); }
.chat-back {
  position: absolute; inset-inline-end: 0; top: 0;
  font-size: 12px; color: var(--gold); font-weight: 700;
}
.chat-back.solo { position: static; display: block; margin-bottom: 12px; }
.chat-feed { display: grid; gap: 7px; }
.bub-row { display: flex; }
.bub-row.out { justify-content: flex-start; }
.bub-row.in { justify-content: flex-end; }
.bub {
  max-width: 78%; padding: 8px 11px; border-radius: 14px;
  background: #1b1b24; font-size: 14px; line-height: 1.45;
  animation: bub .18s cubic-bezier(.2,.8,.3,1) backwards;
}
@keyframes bub { from { opacity: 0; transform: translateY(6px) scale(.94); } }
.bub-row.out .bub { background: #1f4a2a; border-bottom-left-radius: 4px; }
.bub-row.in .bub { border-bottom-right-radius: 4px; }
.bub.soft { background: #2a1c25; }
.bub .who {
  display: block; font-size: 11px; color: var(--gold); font-weight: 700; margin-bottom: 1px;
}
.bub.typing { display: flex; gap: 4px; padding: 12px 13px; }
.bub.typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--dim);
  animation: dot 1.1s steps(3) infinite;
}
.bub.typing i:nth-child(2) { animation-delay: .15s; }
.bub.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.chat-foot { margin-top: 14px; display: grid; gap: 8px; }
.choice {
  border: 1.5px solid var(--gold); color: var(--gold); background: rgba(232,200,74,.08);
  border-radius: 12px; padding: 10px 12px; text-align: start; font-weight: 700; font-size: 13.5px;
}
.choice:active { background: rgba(232,200,74,.22); }
.chat-blocked { font-size: 12.5px; color: var(--dim); text-align: center; padding: 8px; }

/* ============================ contacts =================================== */
.contact-grid { display: grid; gap: 4px; }
.contact {
  display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 10px;
  padding: 7px 6px; border-radius: 12px; text-align: start; width: 100%;
}
.contact:active { background: rgba(255,255,255,.06); }
.contact-av { display: grid; place-items: end center; height: 70px; }
.contact-av canvas { display: block; }
.contact-meta { display: grid; gap: 1px; }
.contact-name { font-weight: 700; font-size: 14.5px; }
.contact-name em { font-style: normal; }
.contact-sub { font-size: 12px; color: var(--dim); }
.contact-sub.big { font-size: 13px; }
.contact.blocked { opacity: .55; }
.contact.blocked .contact-name { color: var(--heat); }

.contact-card { text-align: center; padding-top: 6px; }
.contact-big { display: grid; place-items: center; margin-bottom: 6px; }
.contact-card h2 { font-size: 24px; font-weight: 900; }
.contact-card h2 em { font-style: normal; }
.contact-bio {
  margin: 12px auto 18px; max-width: 30ch; font-size: 13.5px; color: var(--dim); line-height: 1.65;
}
.btn {
  display: inline-block; background: var(--gold); color: #241a08;
  font-weight: 900; padding: 11px 26px; border-radius: 12px;
  border: 2px solid var(--ink); box-shadow: 2px 3px 0 rgba(0,0,0,.5);
}
.btn:active { transform: translate(1px, 2px); box-shadow: 1px 1px 0 rgba(0,0,0,.5); }
.btn:disabled { opacity: .4; }
.btn.ghost { background: transparent; color: var(--dim); border-color: rgba(253,246,227,.2); box-shadow: none; }
.call-line { margin-top: 18px; display: grid; gap: 8px; justify-items: center; min-height: 40px; }
.call-status { color: var(--gold); font-weight: 700; }
.call-note { font-size: 12px; color: var(--dim); }
.call-say {
  background: #1b1b24; border-radius: 12px; padding: 8px 12px; font-size: 13.5px;
  max-width: 30ch; animation: bub .18s cubic-bezier(.2,.8,.3,1) backwards;
}
.wave { display: flex; gap: 2px; align-items: center; height: 22px; }
.wave i {
  width: 3px; background: var(--koom); border-radius: 2px; height: 40%;
  animation: wv .7s steps(4) infinite alternate;
}
.wave i:nth-child(3n) { animation-duration: .5s; }
.wave i:nth-child(4n) { animation-duration: .9s; }
@keyframes wv { to { height: 100%; } }

/* ============================ mom ======================================== */
.mom-head {
  display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: center;
  padding-bottom: 10px; border-bottom: 1px solid rgba(201,111,160,.3); margin-bottom: 10px;
}
.mom-av { height: 55px; display: grid; place-items: end center; }
.mom-av canvas { display: block; }
.mom-head b { display: block; font-size: 16px; }
.mom-head span { font-size: 11.5px; color: var(--dim); }
.mom-feed { display: grid; gap: 6px; }
.mom-day {
  text-align: center; font-size: 11px; color: var(--dim); opacity: .6; margin: 10px 0 2px;
}
.mom-feed .bub-row.last .bub {
  background: #3a2230; box-shadow: 0 0 0 1.5px rgba(240,160,200,.4);
  font-size: 15.5px; font-weight: 700;
}
.mom-none {
  margin: 18px 0 8px; text-align: center; font-size: 12.5px; color: var(--dim);
  padding-top: 14px; border-top: 1px dashed rgba(253,246,227,.14);
}
.mom-reply {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px;
}
.mom-reply input {
  background: #1b1b24; border: 1px solid rgba(253,246,227,.16); border-radius: 12px;
  padding: 11px 13px; font-size: 14px; min-width: 0;
}
.mom-reply input::placeholder { color: #6f6a5f; }
.mom-reply button {
  background: #c96fa0; color: #2a0f1e; font-weight: 900; padding: 0 18px; border-radius: 12px;
}

/* ============================ gallery ==================================== */
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.gal-grid.small { grid-template-columns: repeat(3, 1fr); opacity: .75; }
.gal-cell {
  position: relative; aspect-ratio: 1; overflow: hidden; background: #14141a;
  display: block; width: 100%;
}
.gal-cell canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.gal-cell:active { filter: brightness(1.25); }
.gal-cell.hot { box-shadow: inset 0 0 0 2px var(--heat); }
.gal-cell.del { filter: grayscale(.7) brightness(.7); }
.gal-fire { position: absolute; inset-inline-end: 4px; bottom: 3px; font-size: 13px; }
.gal-trash { margin-top: 22px; }
.gal-trash-btn {
  width: 100%; text-align: start; padding: 12px 14px; border-radius: 12px;
  border: 1px dashed rgba(253,246,227,.2); color: var(--dim); font-size: 13px; font-weight: 700;
}

.viewer {
  position: fixed; inset: 0; z-index: 40; background: rgba(4,4,8,.96);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 40px 12px; animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } }
.viewer-stage { width: 100%; max-width: 420px; aspect-ratio: 1; }
.viewer-stage canvas { width: 100%; height: 100%; display: block; }
.viewer-cap { margin-top: 14px; text-align: center; max-width: 34ch; }
.viewer-meta { font-size: 11px; color: var(--dim); letter-spacing: .03em; }
.viewer-text { font-size: 15px; margin-top: 5px; line-height: 1.5; }
.viewer-text.quiet { color: var(--dim); font-style: italic; }
.viewer-nav { position: absolute; inset-inline: 8px; top: 50%; display: flex; justify-content: space-between; }
.viewer-nav button {
  width: 46px; height: 46px; font-size: 32px; color: var(--gold);
  background: rgba(0,0,0,.45); border-radius: 50%;
}
.viewer-x { position: absolute; top: 14px; inset-inline-end: 16px; font-size: 22px; color: var(--dim); }

/* ============================ maps ======================================= */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button {
  flex: 1; padding: 8px 6px; border-radius: 10px; font-size: 12.5px; font-weight: 700;
  background: rgba(255,255,255,.05); color: var(--dim);
}
.tabs button.on { background: var(--grass); color: #0c1a08; }
.map-wrap { position: relative; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.map-wrap canvas { display: block; width: 100%; }
.pin {
  position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px;
  display: grid; place-items: center; font-size: 15px;
  background: rgba(12,12,18,.85); border: 2px solid var(--gold); border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.6);
  animation: pinIn .26s ease-out backwards;
}
@keyframes pinIn { from { opacity: 0; } }
.pin i { font-style: normal; }
.pin.on { background: var(--gold); transform: translate(-50%, -50%) scale(1.22); }
.map-card {
  margin-top: 10px; padding: 12px 14px; border-radius: 12px;
  background: rgba(232,200,74,.08); border: 1px solid var(--line);
  min-height: 62px; display: grid; gap: 3px; align-content: center;
  opacity: .5; font-size: 13px;
}
.map-card.on { opacity: 1; }
.map-card b { font-size: 15px; }
.map-card span { color: var(--dim); }
.map-card:not(.on)::before { content: 'תבחר נקודה במפה.'; color: var(--dim); }

.dest {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid rgba(253,246,227,.08);
}
.dest-flag { font-size: 30px; }
.dest-body b { display: block; font-size: 15.5px; }
.dest-body em { font-style: normal; font-size: 12.5px; color: var(--dim); }
.dest-price { color: var(--cash); font-weight: 900; }

.route { border-inline-start: 2px dashed rgba(232,200,74,.35); margin-inline-start: 10px; }
.route-row {
  position: relative; padding: 9px 20px; display: grid; grid-template-columns: 52px 1fr; gap: 8px;
}
.route-row::before {
  content: ''; position: absolute; inset-inline-start: -7px; top: 16px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--gold);
}
.route-row b { color: var(--dim); font-weight: 500; font-size: 12.5px; }
.route-row.home::before { background: var(--roof); }
.route-row.home span { color: var(--gold); font-weight: 700; }

/* ============================ bank ======================================= */
.bank-head { text-align: center; padding: 14px 0 18px; }
.bank-label { font-size: 12px; color: var(--dim); }
.bank-big {
  display: block; font-size: 58px; font-weight: 900; color: var(--cash); line-height: 1;
  text-shadow: 2px 3px 0 rgba(0,0,0,.5);
}
.bank-big em { font-style: normal; font-size: 26px; }
.bank-sub { display: block; margin-top: 8px; font-size: 12.5px; color: var(--dim); }
.loan {
  border: 2px solid var(--heat); border-radius: 12px; padding: 12px 14px;
  background: rgba(224,89,63,.08); text-align: center;
}
.loan-top { font-size: 12px; color: var(--heat); font-weight: 700; }
.loan-num {
  font-size: 34px; font-weight: 900; color: var(--heat); line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.loan-num.bump { animation: bump .12s steps(2); }
@keyframes bump { 50% { transform: scale(1.07); } }
.loan-note { font-size: 12px; color: var(--dim); }
.ledger { display: grid; }
.led-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid rgba(253,246,227,.07);
}
.led-t { font-size: 13.5px; display: grid; gap: 1px; }
.led-t em { font-style: normal; font-size: 11px; color: var(--dim); }
.led-a { font-weight: 900; font-variant-numeric: tabular-nums; font-size: 14px; }
.led-a.plus { color: var(--cash); }
.led-a.minus { color: var(--cream); }
.led-row.bad .led-a { color: var(--heat); }
.led-row.loan-row { background: rgba(224,89,63,.06); }

/* ============================ police ===================================== */
.file-stamp {
  display: inline-block; border: 2px solid var(--heat); color: var(--heat);
  font-weight: 900; font-size: 11px; padding: 3px 10px; border-radius: 3px;
  transform: rotate(-3deg); margin-bottom: 14px; letter-spacing: .06em;
}
.file-top { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.mugshot {
  border: 1px solid rgba(224,89,63,.4); border-radius: 6px; padding: 6px 4px 2px;
  background: repeating-linear-gradient(rgba(255,255,255,.05) 0 1px, transparent 1px 26px);
  display: grid; justify-items: center;
}
.mug-label { font-size: 9.5px; color: var(--dim); }
.file-id { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: baseline; }
.file-id .k { font-size: 11px; color: var(--dim); }
.file-id b { font-size: 17px; font-weight: 900; }
.file-id b.gold { color: var(--gold); font-size: 15px; }
.file-id b.red { color: var(--heat); font-size: 22px; font-variant-numeric: tabular-nums; }
.charges { display: grid; gap: 6px; }
.charge {
  padding: 9px 12px; background: rgba(224,89,63,.07);
  border-inline-start: 3px solid var(--heat); border-radius: 0 8px 8px 0;
  font-size: 13.5px; animation: chIn .3s backwards ease-out;
  animation-delay: calc(var(--i) * .07s);
}
@keyframes chIn { from { opacity: 0; transform: translateX(-10px); } }
.heat {
  position: relative; height: 26px; border-radius: 13px; overflow: hidden;
  background: rgba(255,255,255,.07); border: 1px solid rgba(224,89,63,.3);
  display: grid; place-items: center;
}
.heat span {
  position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, #8a3020, var(--heat)); transition: width .6s linear;
}
.heat b { position: relative; font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; }
.heat.hot { animation: hot .5s steps(2) infinite; }
@keyframes hot { 50% { box-shadow: 0 0 12px rgba(224,89,63,.7); } }
.heatnote { color: var(--heat); }
body.busted #screen::after {
  content: ''; position: absolute; inset: 0; z-index: 60; pointer-events: none;
  background: rgba(224,89,63,.4); animation: siren .45s ease-in-out infinite;
}
@keyframes siren { 50% { background: rgba(63,91,122,.45); } }

/* ============================ rank ======================================= */
.stages {
  display: grid; grid-auto-flow: column; grid-auto-columns: 118px; gap: 8px;
  overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory;
}
.stages::-webkit-scrollbar { height: 3px; }
.stages::-webkit-scrollbar-thumb { background: rgba(232,200,74,.3); }
.stage {
  scroll-snap-align: start; text-align: center; padding: 8px 6px 10px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(232,200,74,.05);
}
.stage-fig { height: 80px; display: grid; place-items: end center; }
.stage-fig canvas { display: block; }
.stage b { display: block; font-size: 13px; margin-top: 4px; }
.stage em { font-style: normal; font-size: 11px; color: var(--gold); }
.stage-gate { display: block; font-size: 10.5px; color: var(--dim); margin-top: 3px; }

.ladder { display: grid; gap: 3px; }
.rung {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 10px; background: rgba(255,255,255,.035);
}
.rung-tag { font-size: 18px; }
.rung-body b { display: block; font-size: 14px; }
.rung-body em { font-style: normal; font-size: 11.5px; color: var(--dim); }
.rung-num { font-size: 12px; color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.rung.above { opacity: .46; }
.rung.me {
  background: rgba(232,200,74,.14); box-shadow: inset 0 0 0 1.5px var(--gold);
  position: relative; opacity: 1;
}
.rung-you {
  position: absolute; inset-inline-end: 8px; top: -8px; background: var(--gold); color: #241a08;
  font-size: 10px; font-weight: 900; padding: 1px 7px; border-radius: 8px;
}
.rung.secret { opacity: .3; cursor: pointer; }
.rung.secret .rung-body b { letter-spacing: .3em; }
.rung.rattle { animation: rat .4s steps(2) 2; }
@keyframes rat { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ============================ store ====================================== */
.fit-stage {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center;
  border: 2px solid var(--ink); border-radius: 12px; overflow: hidden;
  background: #141018; margin-bottom: 14px;
}
.fit-stage canvas { display: block; width: 100%; }
.fit-read { padding: 10px 12px; display: grid; gap: 3px; }
.fit-read b { font-size: 17px; }
.fit-read span { font-size: 12px; color: var(--dim); line-height: 1.45; }
.fit-read em { font-style: normal; font-size: 11px; color: var(--neon); font-weight: 700; }
.shop { display: grid; gap: 5px; }
.item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  padding: 9px 10px; border-radius: 11px; background: rgba(255,255,255,.04);
  text-align: start; border: 1.5px solid transparent;
}
.item-ico { font-size: 21px; }
.item-body b { display: block; font-size: 13.5px; }
.item-body em { font-style: normal; font-size: 11.5px; color: var(--dim); }
.item-price { font-size: 12.5px; font-weight: 900; color: var(--cash); white-space: nowrap; }
.item.on { border-color: var(--neon); background: rgba(255,43,214,.1); }
.item.confirm { border-color: var(--gold); background: rgba(232,200,74,.13); }
.item.confirm .item-price { color: var(--gold); }
.item.earned .item-price { color: var(--dim); }
.tag-fake {
  font-style: normal; font-size: 9.5px; background: var(--heat); color: #fff;
  padding: 0 5px; border-radius: 4px; vertical-align: 2px;
}

/* ============================ notes / memos ============================== */
.quote {
  border: 2px solid var(--gold); border-radius: 12px; padding: 14px;
  background: rgba(232,200,74,.07); text-align: center; margin-bottom: 16px;
}
.quote-k { font-size: 10.5px; color: var(--gold); font-weight: 900; letter-spacing: .06em; }
.quote b { display: block; font-size: 17px; margin: 6px 0; line-height: 1.45; }
.quote em { font-style: normal; font-size: 11px; color: var(--dim); }
.note {
  background: var(--sand); color: #2b2213; border-radius: 4px; padding: 12px 14px;
  margin-bottom: 10px; transform: rotate(var(--r, -.4deg));
  box-shadow: 3px 4px 0 rgba(0,0,0,.4);
}
.note:nth-child(3n) { --r: .6deg; }
.note:nth-child(4n) { --r: -.9deg; }
.note h3 { font-size: 15px; font-weight: 900; }
.note-when { font-size: 10.5px; opacity: .55; }
.note-body { margin-top: 6px; font-size: 13.5px; line-height: 1.7; }
.note-body p + p { border-top: 1px dotted rgba(43,34,19,.25); padding-top: 3px; margin-top: 3px; }

.memo {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  width: 100%; text-align: start; padding: 11px 10px; border-radius: 11px;
  background: rgba(70,198,192,.06); margin-bottom: 6px; border: 1.5px solid transparent;
}
.memo.playing { border-color: var(--koom); background: rgba(70,198,192,.14); }
.memo-play {
  width: 32px; height: 32px; border-radius: 50%; background: var(--koom); color: #06201f;
  display: grid; place-items: center; font-size: 12px; font-weight: 900;
}
.memo-body b { display: block; font-size: 13.5px; }
.memo-body em { font-style: normal; font-size: 11.5px; color: var(--dim); }
.memo-len { font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.memo-wave { grid-column: 1 / -1; display: flex; gap: 2px; height: 16px; align-items: center; opacity: .25; }
.memo-wave i { flex: 1; background: var(--koom); border-radius: 1px; height: 30%; }
.memo.playing .memo-wave { opacity: 1; }
.memo.playing .memo-wave i { animation: wv .6s steps(4) infinite alternate; }
.memo.playing .memo-wave i:nth-child(3n) { animation-duration: .42s; }
.memo.playing .memo-wave i:nth-child(5n) { animation-duration: .8s; }

/* ============================ toast / whisper ============================ */
#toast {
  position: absolute; inset-inline: 12px; top: calc(env(safe-area-inset-top) + 38px);
  z-index: 50; display: grid; gap: 6px; pointer-events: none;
}
.toast-item {
  background: var(--panel); border: 1.5px solid var(--gold); border-radius: 10px;
  padding: 9px 12px; font-size: 13px; font-weight: 700;
  animation: tIn .18s cubic-bezier(.2,.8,.3,1); transition: opacity .4s, transform .4s;
}
.toast-item.bad { border-color: var(--heat); color: #ffd9d0; }
.toast-item.go { opacity: 0; transform: translateY(-10px); }
@keyframes tIn { from { opacity: 0; transform: translateY(-12px); } }

#whisper {
  position: absolute; inset-inline-start: 10px; top: 56%;
  z-index: 45; max-width: 62%;
  background: rgba(253,246,227,.93); color: #1d140a;
  border-radius: 14px 14px 14px 3px; padding: 8px 12px;
  font-size: 12.5px; font-weight: 700; line-height: 1.4;
  opacity: 0; transform: translateX(-16px); pointer-events: none;
  transition: opacity .35s, transform .35s;
}
#whisper.on { opacity: 1; transform: none; }
body.in-app #whisper { display: none; }

/* ============================ sheets ===================================== */
.sheet {
  position: absolute; inset: 0; z-index: 55; display: grid; place-items: center;
  background: rgba(4,4,10,.72); padding: 20px; animation: fade .2s;
}
.sheet-card {
  background: #14141c; border: 2px solid var(--gold); border-radius: 16px;
  padding: 20px 18px; text-align: center; display: grid; gap: 10px; max-width: 300px;
}
/* an empty battery, drawn rather than an emoji that would render green */
.sheet-batt {
  width: 54px; height: 26px; margin: 2px auto 4px; position: relative;
  border: 3px solid var(--heat); border-radius: 4px; padding: 3px;
}
.sheet-batt::after {
  content: ''; position: absolute; left: -7px; top: 7px; width: 5px; height: 9px;
  background: var(--heat); border-radius: 0 2px 2px 0;
}
.sheet-batt i {
  display: block; width: 12%; height: 100%; background: var(--heat); border-radius: 1px;
  animation: blip 1.2s steps(2) infinite;
}
.sheet-card h3 { font-size: 18px; font-weight: 900; }
.sheet-card p { font-size: 13px; color: var(--dim); line-height: 1.6; }

/* ============================ the ending ================================= */
body.dying #screen > *:not(#dying) { animation: shrink 1.4s forwards cubic-bezier(.7,0,.9,.2); }
@keyframes shrink { to { opacity: 0; transform: scale(.98); filter: brightness(0); } }
body.dead #screen { background: #000; }

#dying {
  position: absolute; inset: 0; z-index: 70; background: #000;
  display: grid; place-items: center; padding: 30px 22px;
  opacity: 0; transition: opacity 1.6s;
  overflow-y: auto;
  /* ⚠️ `display:grid` above beats the UA rule behind the `hidden` attribute, so
     without these two lines this layer stays in the hit-test over the whole
     screen and silently eats every tap, including "הקש כדי לפתוח". */
  pointer-events: none;
}
#dying[hidden] { display: none; }
#dying.on { opacity: 1; pointer-events: auto; }
/* the black screen you are looking into */
#dying::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 30%, rgba(255,255,255,.045), transparent 60%);
}
.dy-refl {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%);
  width: 86%; max-width: 330px; height: auto; fill: #fff; opacity: .03;
  pointer-events: none;
  animation: dyIn 3s 1.4s backwards;
}
.dy-in { text-align: center; display: grid; gap: 18px; max-width: 340px; position: relative; }
.dy-1 { font-size: 12px; color: #4a4a4a; letter-spacing: .3em; }
.dy-2 {
  font-size: clamp(22px, 6.5vw, 27px); font-weight: 900; line-height: 1.4;
  color: var(--cream); text-shadow: 2px 3px 0 rgba(0,0,0,.9);
  animation: dyIn 1.2s 1s backwards;
}
@keyframes dyIn { from { opacity: 0; transform: translateY(10px); } }
.dy-save {
  border: 1px dashed rgba(232,200,74,.4); border-radius: 10px; padding: 13px;
  display: grid; gap: 4px; animation: dyIn 1.2s 2s backwards; text-align: start;
}
.dy-k { font-size: 10px; color: #6a6a6a; letter-spacing: .08em; }
.dy-save b { font-size: 15px; color: var(--gold); }
.dy-q { font-size: 13px; color: var(--dim); }
.dy-q em { font-style: normal; color: var(--cream); }
.dy-x { font-size: 12px; color: var(--heat); font-weight: 700; }
.dy-cta {
  display: block; background: var(--gold); color: #241a08; text-decoration: none;
  font-weight: 900; font-size: 17px; padding: 14px; border-radius: 12px;
  border: 2px solid var(--ink); box-shadow: 3px 4px 0 rgba(232,200,74,.25);
  animation: dyIn 1.2s 2.8s backwards;
}
.dy-cta:active { transform: translate(1px, 2px); }
.dy-fine { font-size: 11px; color: #5a5a5a; animation: dyIn 1.2s 3.4s backwards; }
.dy-again {
  font-size: 12px; color: #6a6a6a; text-decoration: underline; text-underline-offset: 3px;
  animation: dyIn 1.2s 4.2s backwards; justify-self: center;
}
.dy-again:hover { color: var(--dim); }

/* ============================ להוריד ===================================== */
.door {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px;
  padding: 14px 15px; border-radius: 14px; margin-bottom: 10px;
  border: 2px solid var(--ink); text-decoration: none; color: inherit;
  background: rgba(255,255,255,.04);
}
.door-k { grid-column: 1; font-size: 10.5px; letter-spacing: .1em; color: var(--dim); }
.door b { grid-column: 1; font-size: 19px; font-weight: 900; }
.door em { grid-column: 1; font-style: normal; font-size: 12.5px; color: var(--dim); }
.door-go, .door-badge {
  grid-column: 2; grid-row: 1 / span 3; align-self: center;
  font-size: 13px; font-weight: 900; padding: 9px 15px; border-radius: 10px;
  white-space: nowrap;
}
.door.open {
  background: rgba(95,207,110,.1); border-color: var(--cash);
  box-shadow: 2px 3px 0 rgba(95,207,110,.22);
}
.door.open .door-go { background: var(--cash); color: #06210c; }
.door.open:active { transform: translate(1px, 2px); box-shadow: 1px 1px 0 rgba(95,207,110,.22); }
.door.soon { opacity: .72; border-style: dashed; border-color: rgba(232,200,74,.4); cursor: pointer; }
.door.soon .door-badge {
  background: rgba(232,200,74,.18); color: var(--gold);
  border: 1.5px solid var(--gold);
}

/* ============================ noscript =================================== */
.noscript {
  position: fixed; inset: 0; z-index: 999; background: var(--night);
  display: grid; align-content: center; gap: 14px; padding: 30px; text-align: center;
}
.noscript h2 { font-size: 30px; font-weight: 900; color: var(--gold); }
.noscript p { max-width: 40ch; margin: 0 auto; color: var(--dim); line-height: 1.7; }
.noscript a { color: var(--gold); font-weight: 900; }

/* ============================ reduced motion ============================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .app-view { transform: none; opacity: 1; }
}
