/* tranegames.com. One dark theme. States read by brightness (filled white or yellow against dark,
   outlines), never by hue alone: Daniel is colourblind. Text is 14 px or more, body text 16–18 px,
   and tap targets are 44 px or more. */
:root{
  --bg:#101216;--surface:#1b1e25;--line:#4a505c;--text:#f5f2ea;--muted:#bdb8ad;
  --accent:#ffd23f;--accent-ink:#14120a;--radius:14px;
  --font:"Trebuchet MS","Segoe UI",system-ui,-apple-system,Roboto,sans-serif;
}
/* The feedback overlay (/feedback/ in a frame over a game) must stay see-through: a frame whose
   colour scheme differs from the game page's gets an opaque background. */
:root:not(.see-through){color-scheme:dark}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font:400 17px/1.5 var(--font)}
a{color:inherit}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
button{font:inherit;color:inherit}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---- Header and footer ---- */
.top{padding:20px 16px 8px;max-width:1200px;margin:0 auto}
.wordmark{font-weight:900;font-size:30px;letter-spacing:.06em;text-decoration:none;line-height:1}
.wordmark span{color:var(--accent)}
.wordmark.small{font-size:20px}
.foot{max-width:1200px;margin:40px auto 0;padding:20px 16px 40px;color:var(--muted);font-size:14px}
.foot p{max-width:62ch;margin:0}

/* ---- Home: one grid of covers ---- */
.home main{max-width:1200px;margin:0 auto;padding:0 16px}
.lede{font-size:18px;color:var(--muted);max-width:40ch;margin:6px 0 22px}
.grid{list-style:none;margin:0;padding:0;display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
@media (min-width:700px){.grid{gap:20px;grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}}
.card{position:relative;display:block;border-radius:var(--radius);overflow:hidden;text-decoration:none;background:var(--surface);transition:transform .12s}
.card img{display:block;width:100%;height:auto;aspect-ratio:2/3;object-fit:cover}
.card .title{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.card:hover{transform:translateY(-3px);outline:3px solid #fff;outline-offset:0}
.badge{position:absolute;left:8px;bottom:8px;max-width:calc(100% - 16px);padding:5px 11px;border-radius:999px;font-weight:800;font-size:14px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.badge.here{background:var(--accent);color:var(--accent-ink);text-transform:uppercase;letter-spacing:.03em}
.badge.away{background:rgba(10,11,14,.85);color:#fff;border:2px solid rgba(255,255,255,.85)}

/* ---- A game's page ---- */
.game main{max-width:960px;margin:0 auto;padding:0 16px}
.hero{display:grid;gap:4px 16px;margin-top:12px;
  grid-template-columns:118px 1fr;
  grid-template-areas:"cover h1" "cover tagline" "play play" "controls controls" "actions actions"}
.hero-text{display:contents}
.hero .cover{grid-area:cover;width:100%;height:auto;aspect-ratio:2/3;object-fit:cover;border-radius:12px;align-self:start}
.hero h1{grid-area:h1;margin:0;font-size:24px;line-height:1.15;font-weight:900;align-self:end}
.tagline{grid-area:tagline;margin:4px 0 0;color:var(--muted);font-size:16px;align-self:start}
.play{grid-area:play;display:block;margin-top:16px;padding:14px 28px;min-height:58px;border-radius:var(--radius);
  background:var(--accent);color:var(--accent-ink);font-weight:900;font-size:24px;text-align:center;text-decoration:none}
.play:hover{background:#fff}
.controls{grid-area:controls;margin:8px 0 0;color:var(--muted);font-size:15px}
.actions{grid-area:actions;display:flex;gap:10px;margin-top:12px}
.like,.share,.ghost{min-height:44px;padding:0 18px;border-radius:999px;border:2px solid var(--line);background:transparent;font-weight:700;font-size:16px;cursor:pointer}
.like:hover,.share:hover,.ghost:hover{border-color:#fff}
.like[aria-pressed="true"]{background:#fff;border-color:#fff;color:var(--bg)}
.like .count:empty{display:none}
@media (min-width:760px){
  .hero{gap:0 32px;grid-template-columns:300px 1fr;
    grid-template-areas:"cover h1" "cover tagline" "cover play" "cover controls" "cover actions" "cover .";
    grid-template-rows:auto auto auto auto auto 1fr}
  .hero h1{font-size:40px;margin-top:8px}
  .tagline{font-size:19px}
  .play{justify-self:start;min-width:260px;margin-top:24px}
}
.build{margin-top:32px;max-width:62ch}
.build h2{font-size:20px;margin:0 0 6px}
.build h3{font-size:17px;margin:18px 0 4px}
.build .date{color:var(--muted);font-weight:400}
.build p{margin:0}
.build ul{margin:0;padding-left:22px}
.build .also{margin-top:16px;color:var(--muted);font-size:15px}
.game .feedback{margin-top:32px;max-width:620px}

/* ---- The feedback form (game page and overlay) ---- */
.fb{background:var(--surface);border-radius:16px;padding:20px}
.asked .fb{border:2px solid var(--accent)}
.fb h2{margin:0 0 14px;font-size:21px;line-height:1.25;padding-right:36px}
.rating{display:flex;gap:10px;margin-bottom:16px}
.rating button{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;min-height:76px;padding:8px 4px;
  border-radius:12px;border:2px solid var(--line);background:var(--bg);font-weight:700;font-size:15px;cursor:pointer}
.rating .face{font-size:30px;line-height:1.2}
.rating button:hover{border-color:#fff}
.rating button[aria-pressed="true"]{background:#fff;border-color:#fff;color:var(--bg)}
.field{display:block;margin-bottom:14px}
.field>span{display:block;font-weight:700;font-size:16px;margin-bottom:6px}
.field i{font-style:normal;font-weight:400;color:var(--muted)}
.fb textarea,.fb input{width:100%;padding:12px;border-radius:10px;border:2px solid var(--line);background:var(--bg);color:var(--text);font:400 17px/1.4 var(--font)}
.fb textarea{resize:vertical;min-height:110px}
.fb textarea:focus,.fb input:focus{outline:none;border-color:#fff}
.fb textarea::placeholder{color:#8f8a80}
.hp{position:absolute;left:-9999px}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.send{min-height:48px;padding:0 30px;border:0;border-radius:12px;background:var(--accent);color:var(--accent-ink);font-weight:900;font-size:18px;cursor:pointer}
.send:disabled{opacity:.4;cursor:default}
.status{margin:10px 0 0;color:var(--muted);font-size:15px;min-height:1.5em}
.thanks h2{margin:0 0 12px}

/* ---- The overlay page ---- */
body.overlay{background:rgba(5,6,8,.74);min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:16px}
body.overlay.alone{background:var(--bg)}
.sheet{position:relative;width:100%;max-width:520px;max-height:calc(100dvh - 32px);overflow:auto;border-radius:16px}
.sheet .x{position:absolute;top:8px;right:8px;width:44px;height:44px;border-radius:50%;border:0;background:transparent;font-size:30px;line-height:1;cursor:pointer;z-index:1}
.sheet .x:hover{background:rgba(255,255,255,.12)}

/* ---- 404 ---- */
.lost{max-width:600px;margin:60px auto;padding:0 16px}
.lost h1{font-size:32px;margin:0 0 8px}
