/* ============================================================
   Formaður Húsfélagsins — stairwell noir / retro-DOS chrome
   ============================================================ */
:root{
  --ink:#0b0c0e;
  --panel:#191b20;
  --panel-2:#23262d;
  --line:#3a3f49;
  --gold:#d8a842;
  --gold-hi:#f6e2a0;
  --gold-lo:#8a6412;
  --txt:#e8e6df;
  --dim:#8f9099;
  --red:#c0392b;
  --grn:#5a8f3d;
  --blu:#3a6ea5;
  --pur:#7a5aa8;
  --shadow:0 10px 30px rgba(0,0,0,.6);
  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --hand:'Caveat','Bradley Hand',cursive;
  --pixel:'Pixelify Sans','Courier New',monospace;
  /* The board grows with the screen and stops when it stops helping.
     Everything keys off the shorter dimension, so a wide-but-short
     window never overflows the way a tall one would allow. */
  --card:clamp(360px, min(54vh, 36vw), 580px);
  --col: clamp(520px, min(72vh, 48vw), 880px);
  --icon:clamp(34px, 4.2vh, 46px);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;background:var(--ink);color:var(--txt);
  font-family:var(--mono);font-size:15px;line-height:1.45;
  overflow:hidden;-webkit-font-smoothing:antialiased;
  overscroll-behavior:none;touch-action:manipulation;
}
#app{position:relative;height:100dvh;width:100%;overflow:hidden}

/* small text now sits over a painting, so it gets an edge */
.tagline,.best,#ver-title,.aftermath,.hud,.mName,.tb-row,.swipe-tip{
  text-shadow:0 1px 3px rgba(0,0,0,.85);
}

/* ---------------- BACKDROP ----------------
   The street at sunset, painted, behind everything. Two crops: the wide
   one on a desktop, the tall one on a phone, so neither is cropped to
   nonsense. The scrim over it is what keeps the cards readable — heavier
   during play, lighter on the title where the picture is the point. */
.backdrop{
  position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden;
  background:#0b0c0e url(../desktop.jpg) center 58% / cover no-repeat;
  filter:saturate(1.16) contrast(1.14) brightness(1.06);
}
@media (orientation:portrait), (max-width:820px){
  .backdrop{ background-image:url(../mobile.jpg); background-position:center bottom; }
}
.backdrop::after{
  content:"";position:absolute;inset:0;
  background:
    linear-gradient(180deg,rgba(8,7,10,.34) 0%,rgba(8,7,10,.02) 24%,
                            rgba(8,7,10,.06) 56%,rgba(8,7,10,.54) 83%,
                            rgba(8,7,10,.92) 100%),
    radial-gradient(ellipse 78% 64% at 50% 56%,rgba(0,0,0,.10),transparent 80%);
}
/* the street is lit the same on every screen: starting the game must not
   turn the lights down. The card and the paper are opaque anyway. */

.screen{
  position:absolute;inset:0;display:none;flex-direction:column;
  align-items:center;justify-content:center;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.screen.active{display:flex}
.btn{
  font-family:var(--mono);font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  cursor:pointer;border:0;color:var(--ink);
  background:linear-gradient(180deg,var(--gold-hi),var(--gold) 45%,var(--gold-lo));
  padding:15px 36px;border-radius:3px;font-size:16px;
  box-shadow:0 3px 0 #4c3708,0 8px 18px rgba(0,0,0,.55);
  transition:transform .08s,box-shadow .08s;
}
.btn:active{transform:translateY(3px);box-shadow:0 0 0 #4c3708,0 4px 10px rgba(0,0,0,.5)}
.btn-big{font-size:19px;padding:18px 48px}
.btn-ghost{
  background:rgba(11,12,14,.62);color:#d6d1c4;box-shadow:0 3px 12px rgba(0,0,0,.45);
  border:1px solid rgba(216,168,66,.32);
  font-weight:700;padding:11px 24px;font-size:14px;
}
.btn-ghost:active{transform:none;color:var(--txt)}

/* ---------------- TITLE ---------------- */
.alley{
  position:relative;height:100%;width:100%;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:6px;padding:18px;text-align:center;
  background:radial-gradient(ellipse 60% 40% at 50% 8%, rgba(255,216,150,.10), transparent 70%);
}
.alley::before{ /* brick / concrete texture */
  content:"";position:absolute;inset:0;pointer-events:none;opacity:.07;
  background-image:
    repeating-linear-gradient(0deg,rgba(255,255,255,.045) 0 1px,transparent 1px 26px),
    repeating-linear-gradient(90deg,rgba(255,255,255,.03) 0 1px,transparent 1px 52px);
  mask-image:radial-gradient(ellipse at 50% 40%,#000 20%,transparent 85%);
}
.alley::after{ /* vignette */
  content:"";position:absolute;inset:0;pointer-events:none;
  background:
    radial-gradient(ellipse 50% 40% at 50% 38%,rgba(0,0,0,.32) 0%,rgba(0,0,0,.14) 55%,transparent 80%),
    radial-gradient(ellipse 88% 78% at 50% 45%,transparent 54%,rgba(0,0,0,.62) 100%);
}
.lamp{
  position:absolute;top:-6%;left:50%;transform:translateX(-50%);
  width:60vw;max-width:520px;height:44vh;pointer-events:none;
  background:conic-gradient(from 180deg at 50% 0%,transparent 42%,rgba(255,220,160,.13) 50%,transparent 58%);
  filter:blur(6px);
}
.logo{
  position:relative;z-index:2;margin:0;font-family:var(--pixel);font-weight:700;
  line-height:1.02;text-transform:uppercase;
}
/* the wordmark: a light beige face falling to tan, cut out of a hard
   black outline. The outline is a ring of shadows in em, so it scales
   with the type instead of thinning out on a phone. */
.logo-1,.logo-2{
  display:block;
  background:linear-gradient(180deg,#f4ecd8 0%,#e0d2ae 38%,#b9a377 70%,#8d7a52 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  /* drop-shadow composites behind the clipped gradient; text-shadow would
     paint over it and the letters would come out solid black */
  filter:
    drop-shadow( .052em 0 0 #0a0906) drop-shadow(-.052em 0 0 #0a0906)
    drop-shadow(0  .052em 0 #0a0906) drop-shadow(0 -.052em 0 #0a0906)
    drop-shadow(0 .09em .14em rgba(0,0,0,.8));
}
.logo-1{font-size:clamp(34px,9vw,84px);letter-spacing:.015em}
.logo-2{font-size:clamp(17px,4.6vw,42px);letter-spacing:.13em;margin-top:.30em}
/* "of the Association" is half again as long as "húsfélagsins" */
.logo.en .logo-1{font-size:clamp(34px,9vw,84px)}
.logo.en .logo-2{font-size:clamp(12px,3.1vw,29px);letter-spacing:.15em}
.tagline{
  position:relative;z-index:2;margin:10px 0 4px;color:#e4dfd2;font-size:clamp(10px,2.6vw,13px);
  font-weight:700;letter-spacing:.2em;text-transform:uppercase;max-width:32ch;
}
.chain-fig svg{width:180px;height:195px}
.chain-fig{position:relative;z-index:2;margin:2px 0 10px;filter:drop-shadow(0 8px 20px rgba(0,0,0,.7))}
.best{position:relative;z-index:2;color:var(--dim);font-size:13px;margin:14px 0 0;min-height:19px}
.lang-switch{position:absolute;top:calc(14px + env(safe-area-inset-top));right:14px;z-index:3;display:flex;gap:4px}
.lang-btn{
  font-family:var(--mono);font-size:12px;letter-spacing:.1em;padding:7px 11px;cursor:pointer;
  background:#1b1d22;color:var(--dim);border:1px solid var(--line);border-radius:2px;
}
.lang-btn.on{background:var(--gold);color:var(--ink);border-color:var(--gold);font-weight:700}
#btn-start{margin-top:6px;position:relative;z-index:2}
#btn-how{margin-top:10px;position:relative;z-index:2}

/* ---------------- GAME ---------------- */
#game-screen{justify-content:space-between;padding-top:calc(8px + env(safe-area-inset-top))}
#game-screen > *{flex:0 0 auto}
.stage{flex:1 1 auto;min-height:0}
.meters{
  display:flex;gap:8px;justify-content:center;align-items:flex-end;
  width:min(94%,var(--card));margin:0 auto;padding:8px 10px 7px;
  border:1px solid var(--line);border-radius:4px;
  background:linear-gradient(180deg,var(--panel-2),var(--panel));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 3px 10px rgba(0,0,0,.45);
}
.meter{flex:1;max-width:125px;text-align:center;position:relative}
.mIcon{
  font-size:clamp(17px,2vh,22px);line-height:var(--icon);height:var(--icon);width:var(--icon);margin:0 auto 5px;
  border:1px solid var(--line);border-radius:3px;color:var(--gold);
  background:linear-gradient(180deg,var(--panel-2),var(--panel));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 2px 6px rgba(0,0,0,.5);
  transition:transform .25s,color .25s,border-color .25s;
}
.meter.bump .mIcon{transform:translateY(-4px) scale(1.18)}
.meter.up .mIcon{color:#9fd47a;border-color:#4e7a35}
.meter.down .mIcon{color:#e07a6a;border-color:#7a3a30}
.meter.danger .mIcon{animation:pulse 1s infinite}
@keyframes pulse{50%{border-color:var(--red);color:#ff9c8c}}
.mBar{height:6px;background:#0a0b0d;border:1px solid var(--line);border-radius:2px;overflow:hidden}
.mBar i{
  display:block;height:100%;width:50%;
  background:linear-gradient(90deg,var(--gold-lo),var(--gold));
  transition:width .45s cubic-bezier(.2,.8,.3,1);
}
.mName{font-size:clamp(8.5px,1vh,10.5px);letter-spacing:.06em;color:var(--dim);margin-top:5px;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---------------- THE AÐALFUNDUR ----------------
   For four cards a year the game changes clothes: the agenda goes up,
   the cards come out on ruled paper, and the music turns into a waltz
   played slightly too slowly. */
.agenda{width:min(94%,var(--card));margin:8px auto 0}
.agenda ol{
  list-style:none;display:flex;flex-wrap:wrap;gap:4px 8px;margin:0;padding:0;
  font-size:clamp(9.5px,1.15vh,11px);letter-spacing:.1em;text-transform:uppercase;
}
.agenda li{
  flex:1 1 auto;padding:6px 9px;border:1px solid var(--line);border-radius:3px;
  color:var(--dim);background:linear-gradient(180deg,var(--panel-2),var(--panel));
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.agenda li b{color:#6b6f78;font-weight:400;margin-right:4px}
.agenda li.done{opacity:.5}
.agenda li.done b::after{content:" ✓";color:#7fb350}
.agenda li.now{
  color:var(--gold-hi);border-color:var(--gold);
  background:linear-gradient(180deg,#2b2519,#191510);
  box-shadow:0 0 0 1px rgba(216,168,66,.25);
}
.agenda li.now b{color:var(--gold)}
.agenda li.never{opacity:.34;text-decoration:line-through}
.agenda li.never i{font-style:normal;text-decoration:none;opacity:.8}

/* the cards, for four cards only, are pieces of paper */
#game-screen.meeting .card{
  background:#cfc7ae;border-color:#8d7c56;
  box-shadow:0 -1px 0 rgba(255,255,255,.25),0 16px 40px rgba(0,0,0,.8);
}
#game-screen.meeting .card-frame{
  border-color:#b6a884;color:#1b2b6b;
  background:
    repeating-linear-gradient(180deg,transparent 0 27px,rgba(90,110,160,.22) 27px 28px),
    linear-gradient(90deg,transparent 0 26px,rgba(200,80,80,.3) 26px 27px,transparent 27px),
    linear-gradient(180deg,#f6f3e7,#efe9d8);
}
#game-screen.meeting .quote{
  font-family:var(--hand);color:#1b2b6b;
  font-size:clamp(19px,min(4.6vw,2.3vh),26px);line-height:1.35;
}
#game-screen.meeting .memory{color:#5a6a8f}
#game-screen.meeting .nameplate{
  color:#2b3a6b;background:linear-gradient(180deg,#e6dfc8,#d6ceb4);border-color:#8d7c56;
}
#game-screen.meeting .portrait svg{filter:drop-shadow(0 4px 10px rgba(60,50,30,.45))}
#game-screen.meeting .choice{
  color:#241f16;border-color:#8d7c56;
  background:linear-gradient(180deg,#efe7d2,#e2d9c0);
}
#game-screen.meeting .choice:hover{border-color:#5a4a20;color:#0f0d09}
#game-screen.meeting .ch-key{color:#6b5518;border-color:rgba(107,85,24,.45)}
#game-screen.meeting .choice.armed{
  color:#1b1408;border-color:#8a6412;background:linear-gradient(180deg,#f3e3b4,#e6d199);
}
#game-screen.meeting .choice.armed .ch-key{background:#5a4a20;color:#f6e2a0;border-color:#5a4a20}

/* called to order */
.curtain{
  position:absolute;inset:0;z-index:6;display:flex;align-items:center;justify-content:center;
  padding:20px;background:rgba(6,7,9,.9);
}
.curtain[hidden]{display:none}
.curtain-sheet{
  width:min(94%,var(--card));max-height:100%;overflow:auto;text-align:center;
  background:
    repeating-linear-gradient(180deg,transparent 0 27px,rgba(90,110,160,.2) 27px 28px),
    linear-gradient(180deg,#f6f3e7,#ece5d2);
  color:#1b2b6b;border:1px solid #8d7c56;border-radius:3px;
  padding:26px 22px 24px;box-shadow:0 20px 60px rgba(0,0,0,.8);
  animation:gavel .34s cubic-bezier(.2,.9,.3,1);
}
@keyframes gavel{from{transform:translateY(-14px) rotate(-.6deg);opacity:0}}
.c-kicker{
  margin:0 0 6px;font-family:var(--mono);font-size:9.5px;letter-spacing:.18em;
  text-transform:uppercase;color:#6b5f45;
}
.c-title{
  margin:0 0 4px;font-family:var(--hand);font-weight:700;font-size:clamp(38px,7.6vw,58px);
  line-height:1;color:#1b2b6b;
}
.c-att{margin:6px 0 12px;font-family:var(--hand);font-size:22px;color:#2b3a6b}
.c-faces{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin:0 0 12px}
.c-face{
  width:34px;height:37px;line-height:0;border:1px solid rgba(90,74,32,.4);border-radius:2px;
  overflow:hidden;background:#e6dfc8;
}
.c-face svg{width:100%;height:100%;image-rendering:pixelated}
.c-face.warm{border-color:#6f9e4a;box-shadow:0 0 0 1px rgba(111,158,74,.35)}
.c-face.cold{border-color:#c0392b;box-shadow:0 0 0 1px rgba(192,57,43,.3)}
.c-more{
  min-width:34px;height:37px;display:flex;align-items:center;justify-content:center;
  border:1px dashed rgba(90,74,32,.5);border-radius:2px;
  font-family:var(--mono);font-size:12px;color:#6b5f45;padding:0 6px;
}
.c-quorum{
  margin:0 0 16px;font-family:var(--hand);font-size:20px;line-height:1.25;color:#4a4030;
}
.curtain .btn{margin:0 auto}

/* ---------------- STATUS ROW ----------------
   Four meters and the countdown share one line. The bars carry the
   warning: green while a meter sits in the middle of its range, gold as
   it drifts, red near either edge — because both ends of every meter
   kill you. The countdown colours the same way as the term runs out. */
.meter.term{--tb:#7fb350}
.meter.term.warn{--tb:var(--gold)}
.meter.term.soon{--tb:#e08a33}
.meter.term.now{--tb:#e0432c}
.meter.term .mIcon{
  color:var(--tb);border-color:color-mix(in srgb, var(--tb) 55%, var(--line));
  font-family:var(--mono);font-weight:700;font-size:clamp(15px,1.9vh,19px);
}
.meter.term .mBar i{background:var(--tb);width:0}
.meter.term.now .mIcon{animation:pulse 1s infinite}

/* the four meters, coloured by how near an edge they are */
.meter .mBar i{background:linear-gradient(90deg,#4d7a33,#7fb350)}
.meter.s-warn .mBar i{background:linear-gradient(90deg,var(--gold-lo),var(--gold))}
.meter.s-bad  .mBar i{background:linear-gradient(90deg,#8f2a20,#e0432c)}
.meter.s-warn .mIcon{color:var(--gold);border-color:rgba(216,168,66,.5)}
.meter.s-bad  .mIcon{color:#e08a78;border-color:rgba(224,67,44,.55)}

/* a phone has to fit the card, the answers and the hud all at once */
@media (max-height:760px){
  .meters{padding:6px 10px 5px}
  .mName{margin-top:3px}
  .aftermath{min-height:2.2em}
  .hud{padding:6px 14px calc(8px + env(safe-area-inset-bottom))}
}
@media (max-height:640px){
  .meters{padding:5px 9px 4px;gap:7px}
  .aftermath{min-height:1.9em}
}

.stage{
  position:relative;flex:1;width:100%;max-width:var(--col);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:6px 14px;
}
.card{
  position:relative;width:min(94%,var(--card));
  background:linear-gradient(180deg,#23262d,#15171b);
  border:1px solid var(--line);border-radius:6px;box-shadow:var(--shadow);
  padding:5px;cursor:grab;user-select:none;touch-action:none;
  will-change:transform;
}
.card:active{cursor:grabbing}
.card.enter{animation:cardIn .32s cubic-bezier(.2,.9,.3,1)}
@keyframes cardIn{from{transform:translateY(26px) scale(.94);opacity:0}}
.card-frame{
  border:1px solid #4a4030;border-radius:4px;padding:19px 19px 21px;
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%,rgba(216,168,66,.09),transparent 70%),
    linear-gradient(180deg,#1c1f25,#101216);
  text-align:center;
}
.portrait{display:flex;justify-content:center}
.portrait svg{width:clamp(120px,min(19vh,24vw),200px);height:auto;image-rendering:pixelated;filter:drop-shadow(0 6px 12px rgba(0,0,0,.55))}
.nameplate{
  text-align:center;margin:10px auto 14px;font-size:clamp(13px,1.55vh,15px);letter-spacing:.16em;text-transform:uppercase;
  color:var(--gold-hi);background:linear-gradient(180deg,#2b2519,#191510);
  border:1px solid #5a4c2c;border-radius:2px;padding:6px 12px;display:inline-block;
  min-width:60%;
}
.nameplate-wrap{text-align:center}
.quote{
  font-size:clamp(14px,min(3.9vw,1.85vh),21px);line-height:1.55;text-align:center;color:#ded9cc;
  min-height:7.2em;display:flex;align-items:center;justify-content:center;
  white-space:pre-wrap;
}
/* standing, shown where you cannot miss it */
.pips{margin-left:7px;letter-spacing:0;font-size:.82em;opacity:.9}
.pips:empty{display:none}
.pips.warm{color:#a8d47a}
.pips.cold{color:#e08a78}
.relline{
  display:block;margin-top:6px;font-size:.86em;letter-spacing:.06em;
}
.relline b{font-weight:400}
.relline b.up{color:#a8d47a}
.relline b.down{color:#e08a78}
.relline .dot{opacity:.45;margin:0 7px}

/* what a neighbour's face says before they speak */
.memory{
  font-size:clamp(11px,1.35vh,13px);line-height:1.45;margin:0 0 8px;
  color:#9aa08f;font-style:italic;letter-spacing:.01em;
}
.memory:empty{display:none}
.memory.warm{color:#a8b98a}
.memory.cold{color:#a88f86}

/* ---------------- NEWS FLASH ----------------
   A bulletin cuts in: a red strap over the card, a deadline stamp
   under it, and one pulse of red across the screen. Nothing loops. */
.newsflash{
  display:flex;align-items:center;gap:9px;width:min(94%,var(--card));
  margin:0 0 10px;padding:7px 11px;border-radius:3px;
  font-size:clamp(11.5px,1.3vh,13px);letter-spacing:.18em;text-transform:uppercase;
  color:#ffd8cb;background:linear-gradient(180deg,#8e2b20,#5e1c14);
  border:1px solid #b8523f;box-shadow:0 6px 18px rgba(120,20,10,.35);
  opacity:0;transform:translateY(6px);pointer-events:none;
  transition:opacity .18s,transform .18s;
}
.newsflash.on{opacity:1;transform:none}
.nf-dot{
  width:8px;height:8px;border-radius:50%;background:#ffd0c4;flex:none;
  box-shadow:0 0 0 0 rgba(255,180,160,.7);animation:nfdot 1.4s infinite;
}
@keyframes nfdot{
  0%{box-shadow:0 0 0 0 rgba(255,180,160,.6)}
  70%{box-shadow:0 0 0 7px rgba(255,180,160,0)}
  100%{box-shadow:0 0 0 0 rgba(255,180,160,0)}
}
.nf-tag{font-weight:700}
.nf-time{margin-left:auto;opacity:.85;letter-spacing:.12em}
.card.flash{border-color:#7d3226;box-shadow:0 -1px 0 rgba(232,110,80,.3),0 16px 40px rgba(0,0,0,.8)}
.card.flash .card-frame{
  border-color:#7a3527;
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%,rgba(200,70,45,.16),transparent 70%),
    linear-gradient(180deg,#241a18,#141011);
}
.card.flash .nameplate{color:#ffdccd;background:linear-gradient(180deg,#3a1b14,#1f100c);border-color:#8f4231}
.deadline{
  display:none;margin-top:12px;padding-top:10px;border-top:1px dashed #6a3528;
  font-size:clamp(12px,1.35vh,13.5px);letter-spacing:.1em;text-transform:uppercase;color:#e8917a;text-align:center;
}
.card.flash .deadline{display:block}
.card.flash .deadline::before{content:"⏱ "}
/* one pulse of red over the play screen, then nothing */
.alarm{position:absolute;inset:0;z-index:3;pointer-events:none;opacity:0}
.alarm.on{animation:alarmPulse .75s ease-out}
@keyframes alarmPulse{
  0%{opacity:0;box-shadow:inset 0 0 0 rgba(200,60,40,0)}
  18%{opacity:1;box-shadow:inset 0 0 120px rgba(200,60,40,.55)}
  100%{opacity:0;box-shadow:inset 0 0 160px rgba(200,60,40,0)}
}

/* ---------------- THE TWO ANSWERS ----------------
   Both stand under the card, readable before you touch anything.
   Dragging lights the one you are heading for and dims the other. */
.choices{
  display:grid;grid-template-columns:1fr 1fr;gap:10px;
  width:min(94%,var(--card));margin-top:14px;
}
.choice{
  display:flex;align-items:center;gap:9px;min-height:clamp(55px,6.6vh,70px);padding:10px 12px;
  font-family:var(--mono);font-size:clamp(13px,1.45vh,15px);line-height:1.35;text-align:left;
  color:#c8c2b1;cursor:pointer;
  background:linear-gradient(180deg,#23262d,#15171b);
  border:1px solid var(--line);border-radius:4px;
  transition:color .12s,border-color .12s,background .12s,opacity .12s,transform .12s;
}
.choice.right{justify-content:flex-end;text-align:right}
.ch-key{
  flex:none;font-size:clamp(14px,1.6vh,16px);line-height:1.5;padding:1px 6px;border-radius:2px;
  color:var(--gold);border:1px solid rgba(216,168,66,.32);
  transition:background .12s,color .12s,border-color .12s;
}
.choice:hover{border-color:var(--gold-lo);color:var(--txt)}
.choice.armed{
  color:#fff1d0;border-color:rgba(216,168,66,.75);
  background:linear-gradient(180deg,#382d16,#1c170c);
}
.choice.armed .ch-key{background:var(--gold);color:var(--ink);border-color:var(--gold)}
.choice.ready{
  border-color:var(--gold);transform:translateY(-2px);
  box-shadow:0 0 0 1px rgba(216,168,66,.35),0 8px 20px rgba(0,0,0,.55);
}
.choice.faded{opacity:.32}
.aftermath{
  min-height:2.8em;max-width:var(--col);width:100%;padding:0 20px;text-align:center;
  font-size:clamp(14px,1.55vh,16px);color:#b4afa3;line-height:1.5;
}
.aftermath b{color:var(--gold);font-weight:400}
.hud{
  width:100%;max-width:var(--col);display:flex;align-items:center;justify-content:space-between;
  padding:10px 16px calc(12px + env(safe-area-inset-bottom));
  font-size:clamp(11px,1.3vh,13px);color:var(--dim);letter-spacing:.08em;text-transform:uppercase;
  gap:8px;white-space:nowrap;
}
.hud-mid{color:var(--txt)}
.hud-right{display:flex;gap:5px}
.icon-btn{
  font-family:var(--mono);font-size:12px;background:#1b1d22;color:var(--dim);
  border:1px solid var(--line);border-radius:2px;padding:6px 10px;cursor:pointer;min-width:34px;
}
.icon-btn.off{opacity:.4}
/* the build, small and out of the way, on the title screen and in the hud */
.ver{
  font-size:10px;letter-spacing:.1em;color:var(--dim);opacity:.55;
  text-transform:none;align-self:center;margin:0;
}
#ver-title{position:relative;z-index:2;margin-top:8px}
#ver-hud{margin-right:4px}

/* swipe instruction on first card */
.swipe-tip{
  display:block;font-size:12px;color:#a8a397;letter-spacing:.14em;
  animation:fade 2.4s infinite;padding-top:6px;
}
@keyframes fade{50%{opacity:.35}}

/* ---------------- GAME OVER / FUNDARGERÐ ---------------- */
#over-screen{justify-content:flex-start;overflow-y:auto;padding:0}
.paper{
  width:100%;max-width:660px;margin:0 auto;padding:18px 14px 0;
}
.paper-inner{
  background:#f4f1e4;color:#1b2b6b;padding:26px 22px 30px;border-radius:2px;
  box-shadow:0 14px 40px rgba(0,0,0,.7);
  background-image:
    repeating-linear-gradient(180deg,transparent 0 27px,rgba(90,110,160,.28) 27px 28px),
    linear-gradient(90deg,transparent 0 34px,rgba(200,80,80,.35) 34px 35px,transparent 35px);
  font-family:var(--hand);font-size:25px;line-height:34px;
}
.minutes-title{font-size:34px;margin:0 0 2px;font-weight:700;text-decoration:underline}
.minutes-date{margin:0 0 16px;font-size:22px;opacity:.75}
.minutes-body{margin:0 0 16px;white-space:pre-wrap}
.rule{border:0;border-top:1px solid rgba(27,43,107,.3);margin:14px 0}
.minutes-h{margin:12px 0 4px;font-weight:700;text-decoration:underline}
.minutes-list{margin:0 0 8px;padding-left:22px}
.minutes-list li{margin-bottom:4px}
.tenure{margin:0 0 14px;white-space:pre-wrap}
.signatures{display:flex;flex-wrap:wrap;gap:5px 26px;padding:7px 0 0;font-size:27px}
.sig{transform:rotate(-3deg);opacity:.85;white-space:nowrap}
.sig:nth-child(2n){transform:rotate(2deg)}
.sig:nth-child(3n){transform:rotate(-1deg) translateY(4px)}
/* the minutes are long; the actions come with you */
.over-actions{
  position:sticky;bottom:0;z-index:3;
  display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px 14px;
  padding:14px 16px calc(16px + env(safe-area-inset-bottom));
  background:var(--ink);border-top:1px solid rgba(216,168,66,.16);isolation:isolate;
}
.over-actions::before{        /* a short fade so the paper does not end in a hard line */
  content:"";position:absolute;left:0;right:0;top:-30px;height:30px;pointer-events:none;
  background:linear-gradient(180deg,rgba(11,12,14,0),rgba(11,12,14,.92));
}
.over-actions .score{flex-basis:100%;margin:0 0 2px}
.over-actions .btn-big{font-size:16px;padding:13px 30px}
.over-actions .btn-ghost{font-size:12px;padding:10px 16px}
.paper{padding-bottom:10px}
.score{font-size:13px;color:var(--dim);letter-spacing:.12em;text-transform:uppercase;text-align:center}
.score b{color:var(--gold);font-size:18px}

/* ---------------- MANUAL ---------------- */
#how-screen{overflow-y:auto;justify-content:flex-start;padding:20px 14px calc(30px + env(safe-area-inset-bottom))}
.manual{
  max-width:620px;width:100%;margin:auto;background:#efe7d2;color:#241f16;
  border:1px solid #8d7c56;border-radius:3px;padding:22px 24px 28px;
  box-shadow:0 14px 40px rgba(0,0,0,.7);font-size:15px;line-height:1.6;
}
.manual h2{font-family:var(--mono);font-size:19px;letter-spacing:.08em;text-transform:uppercase;margin:14px 0 10px;border-bottom:2px solid #241f16;padding-bottom:6px}
.manual-head{display:flex;justify-content:space-between;font-size:12px;letter-spacing:.14em;color:#6b5f45;border-bottom:1px solid #b6a884;padding-bottom:6px}
.manual h3{font-size:14px;letter-spacing:.08em;text-transform:uppercase;margin:16px 0 4px;color:#5a4a20}
.manual p{margin:0 0 10px}
.manual ul{margin:0 0 10px;padding-left:18px}
.manual li{margin-bottom:5px}
.manual .btn{display:block;margin:18px auto 0}
.manual .keyline{font-size:13px;color:#6b5f45;border:1px dashed #a8996f;padding:8px 10px;border-radius:2px}

/* a real phone: the column is already full width, so pull the
   furniture back in rather than let the card run past the fold */
@media (max-width:430px){
  /* the season is flavour; the week and the term are the ones you read */
  .hud-left{display:none}
  .hud{font-size:10.5px;letter-spacing:.06em;padding:6px 12px calc(8px + env(safe-area-inset-bottom))}
  .icon-btn{padding:5px 8px;min-width:30px;font-size:11px}
  .card-frame{padding:16px 15px 17px}
  .portrait svg{width:112px}
  .nameplate{font-size:12px;margin:8px auto 11px}
  .quote{font-size:15px}
  .choice{min-height:50px;font-size:12.5px;padding:8px 10px}
  .newsflash{font-size:11px}
  .aftermath{font-size:13px}
}

@media (max-height:640px){
  .portrait svg{width:80px;height:87px}
  .card-frame{padding:12px 13px 13px}
  .nameplate{margin:6px auto 8px}
  .quote{min-height:5em;font-size:12.5px;line-height:1.45}
  .newsflash{margin-bottom:6px;padding:4px 8px}
  .deadline{margin-top:7px;padding-top:6px}
  .choices{margin-top:6px}
  .choice{min-height:38px;padding:5px 8px;font-size:10.5px}
  .aftermath{min-height:2.6em;font-size:11px}
  .mIcon{height:28px;width:28px;line-height:28px;font-size:14px}
}
/* the pulse and the blinking dot are decoration — drop them on request */
@media (prefers-reduced-motion: reduce){
  .alarm.on{animation:none}
  .nf-dot{animation:none}
  .card.enter{animation:none}
  .meter.danger .mIcon{animation:none}
}
.meter.preview .mIcon{border-color:var(--gold);box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 0 10px rgba(216,168,66,.35)}
.icon-btn.arm{background:var(--red);color:#fff;border-color:var(--red)}

