/* =============================================================
   style.css : LONELY LIFE

   THREE PASSES GOT US HERE, AND BOTH DEAD ENDS ARE WORTH KEEPING
   IN WRITING SO NOBODY WALKS INTO THEM AGAIN.

   Pass one was lamplight amber. It failed because a saturated hue
   spread thin over twenty elements stops being a highlight and
   becomes the mood of the page.

   Pass two removed colour entirely and made contrast do the work.
   That was correct while the location art was grey British
   terraces, and it stopped being correct the moment the art became
   what it should always have been: bright American suburb, blue
   pool, hard sun. Ink and paper next to those photographs reads
   like the interface belongs to a different, sadder game.

   Pass three, this one:

     1. Screen black. Neutral and cold, so the warm photographs are
        the warmest thing on the page by a wide margin.
     2. ONE loud accent, #ff3d5a, and it is used in BLOCKS — a
        filled button, a solid bar, a whole live row — never
        sprinkled over small text in twenty places. That is the
        amber lesson kept while the no-colour rule is dropped.
     3. Pool cyan for money and anything going right. It is the
        colour of the water in half the photographs.
     4. Chrome is heavy uppercase sans. PROSE STAYS SERIF, because
        it is still a reading game and Georgia is still on every
        machine, offline, for free.

   No webfonts, no build, no framework. It has to open off a
   double-clicked index.html with the wifi off.
   ============================================================= */

:root {
  /* screen black. neutral, faintly cool, so the art is the warmth */
  --bg:      #0a0a0c;
  --bg-2:    #101015;
  --panel:   #16161c;
  --panel-2: #1e1e26;
  --raise:   #292933;

  --line:    #25252e;
  --line-2:  #3a3a47;

  --ink:     #d8d4d9;
  --ink-dim: #8b8593;
  --ink-off: #5a5663;

  /* The accent, taken well down. It was #ff3d5a and filled into
     buttons, the toast and the tab strip, and at that saturation a
     block of it is a floodlight rather than a highlight. Deeper,
     and it is now a colour rather than a light source. */
  --hot:     #a8394b;
  --hot-d:   #5e2029;
  --hot-g:   rgba(168, 57, 75, .12);

  --cyan:    #4f9e9d;
  --warn:    #a35a63;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans:  "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;

  --r: 2px;
  --rail: 264px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; cursor: pointer; }
/* Touch keeps :hover applied to the last thing tapped, so a phone
   ends up with one permanently lit button. */
@media (hover: none) {
  .act:hover, .go-btn:hover, .choice:hover, .cell:hover, .mini:hover {
    background: inherit; border-color: var(--line);
  }
}
button:disabled { cursor: default; }
h1, h2, h3 { margin: 0; font-weight: 600; }

/* the hard little uppercase labels that hold the chrome together */
.blk > h2, .sec, .art-zone, .said-who, .task-at, .sched-k, .ver {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--ink-off);
}

/* ============ 18+ gate ============ */

#agegate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(255,61,90,.10), transparent 70%),
    #060608;
  padding: 24px;
}
.ag-box {
  max-width: 440px; text-align: center;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-top: 3px solid var(--hot);
  border-radius: var(--r);
  padding: 36px 30px;
}
.ag-mark {
  display: inline-block;
  font: 900 26px/1 var(--sans); letter-spacing: 1px;
  color: var(--hot);
  margin-bottom: 14px;
}
.ag-box h2 {
  font: 800 15px/1 var(--sans);
  text-transform: uppercase; letter-spacing: 2.4px;
  margin-bottom: 16px;
}
.ag-box p  { font-family: var(--serif); color: var(--ink-dim); font-size: 15px; margin: 10px 0; }
.ag-q { color: var(--ink) !important; margin-top: 20px !important; }
.ag-btns { display: grid; gap: 8px; margin: 22px 0 14px; }
.ag-yes, .ag-no {
  border: 1px solid var(--line-2); background: var(--panel-2);
  border-radius: var(--r); padding: 13px 14px;
  font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.6px;
}
.ag-yes { border-color: var(--hot); color: var(--ink); background: var(--hot-g); }
.ag-yes:hover { background: rgba(168, 57, 75, .22); }
.ag-no { color: var(--ink-dim); }
.ag-no:hover { border-color: var(--ink-off); }
.ag-fine { font-size: 12px !important; color: var(--ink-off) !important; }
.bye {
  display: grid; place-items: center; height: 100vh;
  color: var(--ink-dim); font-family: var(--serif);
}

/* ============ the opening ============

   Full screen, once, before the game exists. Picture over text,
   nothing printed on the picture, one column, centred, and a Skip
   on every single card. */

.pro {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(80% 55% at 50% 0%, rgba(255,61,90,.07), transparent 72%),
    #060608;
  padding: 28px 24px;
  overflow-y: auto;
  cursor: pointer;
}
.pro-inner { width: 100%; max-width: 720px; margin: auto; }

.pro-art {
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--hot);
  background: var(--panel);
}
.pro-art.noart {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(110% 90% at 78% 6%, rgba(255,61,90,.11), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.012) 0 2px, transparent 2px 7px),
    linear-gradient(168deg, #22202a, #0a0a0c 76%);
}
.pro-img { display: block; width: 100%; height: auto; }

.pro-text {
  font-family: var(--serif);
  font-size: 19px; line-height: 1.7;
  margin: 26px 4px 0;
  min-height: 4.2em;
}

.pro-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid var(--line);
}
.pro-dots { display: flex; gap: 5px; flex: 1; flex-wrap: wrap; }
.pro-dot {
  width: 16px; height: 2px; background: var(--line-2);
  transition: background .2s ease;
}
.pro-dot.on { background: var(--hot); }

.pro-count {
  font-size: 11px; font-weight: 700;
  color: var(--ink-off);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pro-skip, .pro-next, .pro-back {
  border-radius: var(--r); min-height: 44px;
  font-size: 11.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.4px;
  padding: 12px 18px;
}
.pro-skip, .pro-back {
  background: none; border: 1px solid var(--line);
  color: var(--ink-off);
}
.pro-skip:hover:not(:disabled),
.pro-back:hover:not(:disabled) { color: var(--ink-dim); border-color: var(--line-2); }
.pro-back { padding: 10px 13px; letter-spacing: 0; font-size: 13px; }
.pro-back:disabled { opacity: .25; }
.pro-next {
  background: var(--hot-g); border: 1px solid var(--hot); color: var(--ink);
}
.pro-next:hover { background: rgba(168, 57, 75, .22); }

@media (max-width: 700px) {
  .pro { padding: 18px 16px; }
  .pro-text { font-size: 17px; margin-top: 20px; }
  .pro-dot { width: 10px; }
}

/* ============ layout ============ */

#app {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  height: 100%;
}
#app.locked-out { visibility: hidden; }

#rail {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 0 18px 40px;
}

#stage {
  position: relative;
  overflow-y: auto;
  padding: 0 0 90px;
  background-color: var(--bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
#stage-body { max-width: 720px; margin: 0 auto; padding: 34px 34px 0; }

/* Beklemek. Ray'in kendi dugmeleriyle ayni dilde ama tam
   genislikte: yapilacak tek sey o oldugunda aranan sey o. */
.wait {
  display: block; width: 100%;
  margin-top: 12px; padding: 9px 10px;
  background: none; border: 1px solid var(--line-2);
  color: var(--ink-dim);
  font: 700 10px/1 var(--sans);
  letter-spacing: 1.6px; text-transform: uppercase;
  cursor: pointer;
}
.wait:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-off); }
.wait:disabled { opacity: .35; cursor: default; }
.wait-why {
  display: block; margin-top: 6px;
  font: 400 11px/1.35 var(--sans);
  color: var(--warn);
}
.wait-why:empty { display: none; }

/* Debug. index.html#debug olmadan hic cizilmiyor, ve gorunuse de
   yatirim yapilmiyor: burasi bir arac, bir ekran degil. */
.dbg .row { flex-wrap: wrap; gap: 3px; align-items: center; }
.dbg .mini { padding: 4px 6px; font-size: 9px; letter-spacing: .6px; }
.dbg .mini.on { color: var(--bg); background: var(--ink-off); border-color: var(--ink-off); }
.dbg-k {
  width: 100%; margin-top: 6px;
  font: 800 9px/1 var(--sans);
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-off);
}

/* ============ the rail ============ */

/* The one place the accent gets to be a solid block in the chrome. */
.rail-head {
  padding: 20px 0 16px;
  border-bottom: 3px solid var(--hot);
}
.rail-head h1 {
  font: 900 20px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: -.3px;
}
.ver { display: block; margin-top: 5px; color: var(--hot); }
.clock {
  font: 200 44px/1 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
  margin: 12px 0 4px;
}
.when { display: flex; justify-content: space-between; align-items: baseline; }
.when #sb-day { font-size: 13px; color: var(--ink-dim); }
.part {
  font-size: 10px; font-weight: 800;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--hot);
}

.blk { margin-top: 24px; }
.blk > h2 { margin-bottom: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 5px; }
.hint { color: var(--ink-off); font-size: 12px; margin: 9px 0 0; line-height: 1.45; }

/* stats */
.stat { margin-bottom: 12px; }
.stat-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.stat-name { color: var(--ink-dim); }
.stat-val  { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.fill { height: 100%; transition: width .28s ease; }

/* The live "where is everybody" readout used to be here and it is
   gone, along with the "Day free / Evening free" pair. Between them
   they gave away for free the one thing in this game worth working
   out. The timetable is in the People tab now and it fills a cell
   at a time; the slots announce themselves at the point of use,
   which is where the player is looking anyway. */

/* Filled. It is the button that ends the day and it should look
   like a decision. */
.mini {
  flex: 1; min-width: 72px; min-height: 42px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 10px 9px;
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.mini:hover:not(:disabled) { border-color: var(--line-2); }
.mini.on { border-color: var(--hot); color: var(--ink); background: var(--hot-g); }
.mini.danger { color: var(--warn); }
.mini.step { flex: 1; font-size: 14px; letter-spacing: 0; }
.mini:disabled { opacity: .28; }

.links { display: flex; gap: 5px; padding-top: 18px; border-top: 1px solid var(--line); }
.link {
  flex: 1; text-align: center; text-decoration: none;
  color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 9px 6px; font-size: 10px; font-weight: 800;
  letter-spacing: 1.4px; text-transform: uppercase;
}
.link:hover { color: var(--hot); border-color: var(--hot-d); }
.link.dim { opacity: .28; pointer-events: none; }

/* ============ the picture band ============

   NOTHING OVER THE PHOTOGRAPH. No crop, no scrim, no filter. An
   earlier version laid the location name over a gradient and lost
   twice: the crop threw away a third of a picture that cost a
   prompt and a generation to get right, and the darkening needed to
   keep white text readable left the whole thing flat.

   Full bleed, natural aspect ratio, shown exactly as generated. */
/* The location photograph is the stage background now, painted
   in UI.paint(). What is left here is the label standing on it. */

.art-cap { padding: 0; }
.art-cap h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: 38px; letter-spacing: .2px; line-height: 1.1;
  margin-top: 6px;
  text-shadow: 0 2px 20px rgba(0,0,0,.7);
}
.art-zone { color: var(--ink-dim); text-shadow: 0 1px 10px rgba(0,0,0,.7); }

/* ============ stage prose ============ */

.prose {
  font-family: var(--serif);
  font-size: 17.5px; line-height: 1.72;
  margin: 0 0 8px;
}
.prose.refuse {
  color: var(--ink-dim); font-style: italic;
  margin: 22px 0 0; padding: 14px 18px;
  background: rgba(20, 20, 26, .94);
  border-left: 3px solid var(--line-2);
}

/* The noise from the next room. Deliberately plain: it is a thing
   you have not looked at yet, so it gets no picture and no frame,
   only the accent rule that says something is live. */
/* Through the floor. It is her, and it has to be obviously her,
   so it is drawn as the same speech bubble everybody else gets
   with her name on it. */
.hook {
  margin: 22px 0 0; padding: 16px 20px;
  background: rgba(20, 20, 26, .94);
  border-left: 3px solid var(--hot);
}
.hook p {
  margin: 0; font-family: var(--serif);
  font-size: 17px; line-height: 1.6; font-style: italic;
}
.hook-who {
  display: block; margin-bottom: 6px;
  font: 700 10px/1 var(--sans);
  text-transform: uppercase; letter-spacing: 1.8px;
}
.hook-from { font-size: 12px; color: var(--ink-off); margin: 8px 0 0; }

/* Something you walked past. Sits between the room and its own
   description, framed just enough to read as an interruption and
   not enough to read as a scene. */
.sight {
  margin: 22px 0 0;
  border-left: 3px solid var(--hot);
  background: rgba(20, 20, 26, .94);
  padding: 14px 16px;
}
.sight .clip { margin: 0 0 10px; }
.sight-line {
  font-family: var(--serif);
  font-size: 16px; line-height: 1.6;
  margin: 0; color: var(--ink-dim);
}

h3.sec {
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  text-shadow: 0 1px 10px rgba(0,0,0,.7);
}

/* ============ actions ============ */

/* EVERYTHING TAPPABLE IS AT LEAST 52 PIXELS TALL.

   The whole game is buttons — doors, actions, choices — and they
   were sized for a mouse. A 40 pixel row with 12 pixel labels is
   fine to click and miserable to thumb, and a good share of this
   audience is on a phone in the dark. */
.acts { display: grid; gap: 7px; }
.act {
  display: grid; gap: 3px; align-content: center;
  text-align: left; min-height: 66px;
  background: rgba(20, 20, 26, .94);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
  border-radius: var(--r);
  padding: 17px 22px;
}
.act:hover:not(:disabled) { background: rgba(32, 32, 40, .96); border-color: var(--line-2); }
.act-name { font-size: 17px; }
.act-note { font-size: 13px; color: var(--ink-off); line-height: 1.4; }

/* The live one. A whole tinted row rather than a coloured word:
   the accent works in blocks and dies in sprinkles. */
.act.hot {
  border-left-color: var(--hot);
  border-color: var(--hot-d);
  background: var(--hot-g);
}
.act.hot .act-name { color: #ffe8ec; font-weight: 700; }
.act.do  { border-left-color: var(--cyan); }
.act.off { opacity: .42; }
.act.off .act-note { color: var(--warn); }

/* ============ going somewhere ============
   Every door is a card carrying a picture of what is behind it.
   This is where the photographs earn their place: knowing where you
   are is one glance at the band, knowing what is behind each of
   five doors is the decision actually being made.

   Label under the thumbnail, never over it. The labels run long,
   they carry a second line of meta, and text on a photo is the
   first thing to become unreadable when a bright one turns up. */

.go {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.go-btn {
  display: grid; grid-template-rows: auto 1fr;
  text-align: left; padding: 0; overflow: hidden;
  background: rgba(20, 20, 26, .94);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color .15s ease;
}
.go-btn:hover:not(:disabled) {
  background: rgba(32, 32, 40, .96);
  border-color: var(--hot);
}

/* Untreated. These are 96 pixels tall with the label underneath, so
   there is nothing to make readable and no reason to dim them. */
.go-art {
  position: relative; height: 172px; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.go-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}

.go-art.noart {
  background:
    radial-gradient(120% 100% at 78% 4%, rgba(255,61,90,.10), transparent 62%),
    linear-gradient(165deg, #22202a, #121218 78%);
}
.go-art.noart.art-street {
  background:
    radial-gradient(100% 90% at 16% 2%, rgba(53,208,207,.09), transparent 64%),
    linear-gradient(165deg, #171c22, #0f1114 78%);
}
.go-art.noart.art-dark { filter: brightness(.72); }

.go-body { display: grid; gap: 5px; align-content: start; padding: 17px 20px 19px; }
.go-name { font-size: 18px; line-height: 1.3; }
.go-meta { font-size: 12.5px; color: var(--ink-off); font-variant-numeric: tabular-nums; }
.go-why  { font-size: 12.5px; color: var(--warn); }
.go-btn.off { opacity: .4; }
.go-btn.dot { border-color: var(--hot); }
.go-btn.dot .go-name { color: var(--hot); font-weight: 700; }

/* ============ a scene ============ */

.scene { padding-top: 34px; }
.scene-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px; border-bottom: 2px solid var(--hot);
  margin-bottom: 26px;
}
.scene-title {
  font: 800 10px/1 var(--sans);
  text-transform: uppercase; letter-spacing: 1.8px;
  color: var(--hot);
}
.bail {
  background: none; border: 0; padding: 0;
  color: var(--ink-off); font-size: 12px;
  border-bottom: 1px solid var(--line-2);
}
.bail:hover { color: var(--warn); border-color: var(--warn); }

.prose.narr { margin-bottom: 10px; }

/* PANEL BASLIGI VE CARPI.

   Sekmeler artik bosluga tiklayinca kapanmiyor, o yuzden kapatma
   yolu gorunur olmak zorunda. Baslik satirinin sagina yaslaniyor,
   ve dokunma hedefi 44px: parmakla kapatilamayan bir carpi, hic
   olmayan bir carpidan kotudur. */
.panel-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.panel-head h2 { margin: 0; flex: 1; }
.panel-sub { font-size: 13px; opacity: .6; }
.panel-x {
  flex: none;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink); opacity: .65;
  cursor: pointer;
}
.panel-x:hover { opacity: 1; border-color: var(--ink); }

/* VARDIYA.

   Ekranin tamami tek bir isi yapiyor: ne istendigini soylemek ve
   ne kadar zaman kaldigini gostermek. Baska hicbir sey yok.

   Tuslar 72px ve iki sutun. Telefonda tek elle basiliyor, ve bu
   ekranda oyuncu hizli davraniyor: kucuk bir hedef, refleksle
   ilgisi olmayan bir sebeple hata yaptirir ve oyunu haksiz
   hissettirir. */
.shift-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.shift-head h2 { margin: 0; flex: 1; }
.shift-count { font-size: 13px; opacity: .55; font-variant-numeric: tabular-nums; }

.shift-score {
  display: flex; gap: 16px; margin-bottom: 18px;
  font-family: var(--sans); font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase;
}
.shift-right { color: var(--cyan); }
.shift-wrong { color: var(--warn); }

/* ISTENEN SEY. Sayfadaki en buyuk yazi, ve olmasi gereken de bu:
   goz oraya dusecek, sonra tusa gidecek. */
.order {
  display: flex; align-items: center; justify-content: center;
  min-height: 108px; margin-bottom: 10px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--line-2);
}
.order-i { font-family: var(--serif); font-size: 40px; line-height: 1; }
.order.was-hit  { border-left-color: var(--cyan); }
.order.was-miss,
.order.was-late { border-left-color: var(--hot); }

/* Kalan zaman. Renk degil, GENISLIK anlatiyor — sonuna dogru
   kirmiziya donen bir cubuk, zaten gec olan bir seye bir de
   panik ekliyor ve okunmasi gereken sey siparisin adi. */
.track { height: 6px; background: var(--line); margin-bottom: 18px; }
.track-fill { height: 100%; background: var(--ink-dim); width: 100%; }

.pad { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.padkey {
  min-height: 72px; padding: 10px;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line-2);
  font-family: var(--sans); font-size: 16px;
  cursor: pointer;
  touch-action: manipulation;   /* mobilde cift dokunus yakinlastirmasin */
  user-select: none;
}
.padkey:active { background: var(--raise); border-color: var(--ink); }
@media (hover: hover) { .padkey:hover { border-color: var(--ink); } }

@media (max-width: 560px) {
  .order { min-height: 88px; }
  .order-i { font-size: 32px; }
  .padkey { min-height: 64px; font-size: 15px; }
}

/* GALERI HUCRESININ KAPAGI.

   16:9 kutu, ustte. Yuklenene kadar zemin duruyor ve `has` ancak
   gercekten yuklenince geliyor: yavas bir dosyada once bos beyaz
   sonra resim patlamasi olmasin diye. */
.cell-art {
  position: relative;
  width: 100%; aspect-ratio: 16 / 9;
  margin-bottom: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.cell-art img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .18s;
}
.cell-art.has img { opacity: 1; }

/* BIR KISI, BIR BLOK.

   Tasks ve Gallery ayni basligi kullaniyor: iki sekmede ayni kisiyi
   iki farkli sekilde aramak olmamali. Yuz, ad, ve kisinin kendi
   rengi — panelde renk sadece burada ve para/maliyette var. */
.who-head {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 10px;
}
.who-head:first-of-type { margin-top: 4px; }
.who-ttl { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who-name {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
}
.who-tier { font-size: 13px; opacity: .55; }
.who-blk { margin-bottom: 6px; }
.who-done { font-size: 12px; opacity: .4; padding: 4px 0 0 2px; }

/* GORULMESI GEREKEN SEY, YAPILMASI GEREKEN SEYDEN FARKLI GORUNUYOR.

   Bir sahne bir kapinin ardinda bekliyor ve gidince orada. Bir
   caught kaydi beklemiyor: dogru yerde durup birkac kere gidip
   gelmeyi istiyor. Ayni kutuda ayni sekilde cizilirlerse oyuncu
   birincisini bulamayinca ikincisinin bozuk oldugunu saniyor. */
.task.watch { border-left-color: var(--cyan); }
.task-h {
  margin-top: 6px;
  font-size: 13px; line-height: 1.55; opacity: .55;
  font-family: var(--serif); font-style: italic;
}

.said {
  display: flex; gap: 14px; align-items: flex-start;
  margin: 0 0 8px; padding: 14px 18px;
  background: var(--panel);
  border-left: 3px solid var(--line-2);
}
.said.mine { background: transparent; border-left-color: var(--hot-d); }
.said-body { flex: 1; min-width: 0; }
.said-who { display: block; margin-bottom: 6px; }

/* WHO IS TALKING.

   Square, not a circle. Everything in this game has 2px corners and
   a round portrait would be the only soft edge on the page.

   The plate underneath is not a placeholder, it is the fallback:
   the initial in the speaker's own colour, which is the same thing
   the location band does when it has no photograph. Nothing may
   look unfinished on the day it is written. The image sits on top
   and `.has` hides the plate only once it has actually loaded, so a
   missing file costs nothing and a slow one does not flash. */
/* Bas harf, ve artik yedek degil asil hali — bkz. ui.js face().
   Opaklik .55'ten kalkti: solgun olmasinin sebebi "gercegi gelene
   kadar" idi, gelmiyor. Kendi renginde, tam gucunde. */
.face {
  position: relative; flex: none;
  width: 52px; height: 52px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}
.face-plate {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 26px; line-height: 1;
}

/* Duyulan sey de bir yuz tasiyor: kapinin ardindaki ses ancak
   sahibi belliyse bir sey anlatiyor. */
.hook.hook-face { display: flex; gap: 14px; align-items: flex-start; }

@media (max-width: 560px) {
  .face { width: 42px; height: 42px; }
  .face-plate { font-size: 20px; }
  .said { gap: 10px; padding: 12px 14px; }
}
.said p {
  margin: 0; font-family: var(--serif);
  font-size: 17px; line-height: 1.65;
}

/* MIXED ASPECT RATIOS ARE THE NORMAL CASE, not the exception.

   This was `width: 100%`, which is correct for a 16:9 clip and
   catastrophic for a vertical one: a 1080x1342 file rendered nine
   hundred pixels tall and pushed everything else off the screen.
   Half of what gets sourced is vertical.

   So the height is capped and the width follows. A wide clip fills
   the column, a tall one sits centred inside it, and neither of
   them needs anybody to have converted anything. */
.clip {
  display: block;
  max-width: 100%;
  max-height: 66vh;
  width: auto;
  margin: 6px auto 12px;
  background: #000;
  border: 1px solid var(--line-2);
}

/* Kaldirma. Cubuk dikey, cunku DOLAN bir sey — refleks oyununun
   yatay cubugu azalan bir sey ve ikisi ayni sekilde gorunmemeli. */
.lift {
  position: relative;
  height: 260px; width: 88px;
  margin: 18px auto 10px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  overflow: hidden;
}
.lift-fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--hot);
}
.push { margin-top: 12px; }

/* Ilk seferki ders. */
.teach { margin: 0 0 22px; padding: 16px 18px; border-left: 3px solid var(--line-2); background: var(--panel); }
.teach h3 {
  margin: 0 0 10px;
  font: 800 10px/1 var(--sans);
  letter-spacing: 1.8px; text-transform: uppercase; color: var(--ink-off);
}
.teach .prose { margin: 0 0 8px; }
.teach .prose:last-child { margin-bottom: 0; }

.tapnote {
  margin-top: 26px; font-size: 10px; font-weight: 800;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--ink-off);
}

.choices { display: grid; gap: 6px; margin-top: 26px; }
.choice {
  display: grid; gap: 3px; align-content: center;
  text-align: left; min-height: 56px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 15px 18px;
}
.choice:hover:not(:disabled):not(.leave) {
  border-color: var(--hot); background: var(--hot-g);
}
.choice-cost { font-size: 12px; color: var(--cyan); font-weight: 600; }
.choice-why  { font-size: 12px; color: var(--warn); }
.choice.off  { opacity: .42; }
.choice.leave {
  background: none; border-color: var(--line);
  color: var(--ink-off); font-size: 13px;
}

/* ============ cards and tabs ============ */

.card {
  margin-top: 46px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-top: 3px solid var(--hot);
  border-radius: var(--r);
  padding: 28px;
}
.card h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: 26px; margin-bottom: 16px;
}

.panel { padding-top: 34px; }
.panel h2 {
  font: 900 22px/1 var(--sans);
  text-transform: uppercase; letter-spacing: -.2px;
  margin-bottom: 8px;
}

/* ---- every stat, with its two sentences ---- */

.statrow {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.statrow-top {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.statrow-name { font-size: 16px; font-weight: 700; flex: 1; }
.statrow-q {
  width: 20px; height: 20px; flex: none;
  background: none; border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--ink-off);
  font-size: 11px; font-weight: 800; line-height: 1;
  padding: 0;
}
.statrow-q:hover { color: var(--ink); border-color: var(--ink-off); }
.statrow-q.on { border-color: var(--hot); color: var(--ink); background: var(--hot-g); }

.statrow-note {
  margin-top: 12px; padding: 12px 14px;
  background: var(--panel);
  border-left: 3px solid var(--hot);
}
.note-what {
  font-family: var(--serif); font-size: 15px; line-height: 1.6;
  margin: 0;
}
.note-how {
  font-size: 13px; color: var(--ink-dim);
  margin: 8px 0 0;
}
.note-k {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--ink-off);
  margin-right: 6px;
}

/* ---- the timetable, filled in a cell at a time ----

   Two columns and not seven. Behind this there are only two
   patterns, and seven columns would send the player off to check
   Tuesday after they had already learned Monday.

   The empty cells are drawn rather than hidden, so what you do not
   know has a shape. That is the whole difference between a mystery
   and a confusion. */

.sched {
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.sched-head {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 12px;
}
.sched-head .who-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sched-name { font-size: 16px; font-weight: 700; }
.who-tier { font-size: 11px; color: var(--ink-dim); }
.sched-count {
  margin-left: auto;
  font-size: 11px; font-weight: 700;
  color: var(--ink-off); font-variant-numeric: tabular-nums;
}

/* Postu olanin izgarasi yok, tek satiri var. Izgara hucreleriyle
   ayni agirlikta duruyor ki iki tur karakter ayni sayfada yan yana
   dursun ve biri eksik gorunmesin. */
.sched-post {
  margin: 0; padding: 10px 12px;
  font: 400 13px/1.4 var(--sans);
  color: var(--ink-dim);
  background: var(--panel);
  border-left: 3px solid var(--line-2);
}

.sched-grid {
  display: grid;
  grid-template-columns: 92px 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.sched-k, .sched-v {
  background: var(--panel);
  padding: 9px 11px;
}
.sched-k { color: var(--ink-off); }
.sched-v { font-size: 13px; }
.sched-v.unknown { color: var(--line-2); }
.sched-v.now {
  background: var(--hot-g);
  box-shadow: inset 2px 0 0 var(--hot);
}

.task { padding: 12px 0; border-bottom: 1px solid var(--line); }
.task-t { font-size: 15px; }
.task-d { font-family: var(--serif); font-size: 14px; color: var(--ink-dim); margin-top: 3px; }
.task-at { margin-top: 6px; }
.task.open .task-t { color: var(--hot); font-weight: 700; }
.task.locked { opacity: .4; }
.task.done { opacity: .28; font-size: 13px; padding: 5px 0; border: 0; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.cell {
  display: grid; gap: 3px; align-content: center;
  text-align: left; min-height: 56px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 16px;
}
.cell:hover { border-color: var(--hot); }
.cell-t { font-size: 14px; }
.cell-d { font-size: 11px; color: var(--ink-off); }

.logrow {
  display: flex; gap: 14px; padding: 7px 0;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.log-day {
  color: var(--ink-off); white-space: nowrap;
  font-variant-numeric: tabular-nums; font-size: 12px;
}
.log-t { color: var(--ink-dim); }

/* ============ toast ============ */

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--raise); border: 1px solid var(--hot-d);
  border-radius: var(--r); padding: 11px 22px;
  color: var(--ink);
  font-size: 11px; font-weight: 700;
  letter-spacing: .6px;
  z-index: 40;
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
}
#toast.hidden { display: none; }

/* ============ narrow screens ============ */

#nav-toggle, #nav-backdrop { display: none; }

@media (max-width: 860px) {
  #app { grid-template-columns: 1fr; }

  #rail {
    position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 30;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  #app.nav-open #rail { transform: none; }

  #nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 25;
    background: rgba(0,0,0,.66); opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  #app.nav-open #nav-backdrop { opacity: 1; pointer-events: auto; }

  #nav-toggle {
    display: grid; gap: 4px; position: fixed; top: 14px; left: 14px; z-index: 35;
    background: rgba(10,10,12,.92); border: 1px solid var(--hot-d);
    border-radius: var(--r); padding: 10px 9px;
  }
  #nav-toggle span { display: block; width: 15px; height: 2px; background: var(--hot); }

  #stage-body { padding: 22px 16px 0; }
  .art-cap h2 { font-size: 30px; }

  /* ONE CARD ACROSS. It was two, on the argument that the
     thumbnails are what you are choosing between — which is right,
     and is exactly why they cannot be a hundred pixels wide with
     the label wrapping to three lines under them. One column, and
     the picture gets to be a picture. */
  .go { grid-template-columns: 1fr; gap: 12px; }
  .go-art { height: 190px; }
  .go-body { padding: 17px 20px 19px; }

  .grid { grid-template-columns: 1fr; }
  .prose { font-size: 17px; }

  .act { min-height: 68px; padding: 18px 20px; }
  .act-name { font-size: 18px; }
  .choice { min-height: 60px; padding: 16px 18px; }
  .mini { min-height: 48px; font-size: 12px; }

  #nav-toggle { padding: 13px 12px; }
  #nav-toggle span { width: 18px; }
}

/* Very narrow. The rail drawer should not eat the whole screen. */
@media (max-width: 420px) {
  #rail { width: 86vw; }
  .art-cap h2 { font-size: 24px; }
  .go-art { height: 160px; }
  .pro-text { font-size: 16px; }
}
