/* Idle Golems hub: the shelf page for every idle game. Same look as the games' idle.css (dark warm basalt,
   Lilita One + Figtree, orange accent), but a page that scrolls. Each card sets --c (its game's accent). */
:root{
  color-scheme:dark;
  --bg:#15110e; --panel:#1f1a16; --panel2:#29221c; --line:#3b322a;
  --text:#f4ece3; --muted:#a8998a; --dim:#6f6257;
  --acc:#ff8a3d; --on-acc:#1b120b; --good:#7fe08a; --bad:#ff6b5e;
  --display:"Lilita One","Arial Rounded MT Bold","Trebuchet MS",system-ui,sans-serif;
  --body:"Figtree",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --gut:max(16px,env(safe-area-inset-left,0px));
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{background:var(--bg)}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--body);font-weight:500;line-height:1.4;
  -webkit-tap-highlight-color:transparent;overflow-x:hidden;min-height:100vh;
  background-image:radial-gradient(120% 60% at 50% -10%,#ff8a3d1f,transparent 60%)}
a{color:inherit}
a:focus-visible,button:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
.wrap{max-width:1180px;margin:0 auto;padding:0 var(--gut) calc(40px + env(safe-area-inset-bottom,0px));
  padding-right:max(16px,env(safe-area-inset-right,0px))}

/* header */
.top{display:flex;align-items:center;gap:14px;padding:calc(18px + env(safe-area-inset-top,0px)) 0 8px}
.top img{width:56px;height:56px;border-radius:16px;flex:0 0 56px;box-shadow:0 6px 20px #0007}
.top h1{margin:0;font-family:var(--display);font-weight:400;font-size:34px;line-height:1;letter-spacing:.01em}
.top h1 b{color:var(--acc);font-weight:400}
.top p{margin:4px 0 0;color:var(--muted);font-size:14px;font-weight:600}
.back{margin-left:auto;align-self:flex-start;font-size:13px;font-weight:800;color:var(--muted);text-decoration:none;
  border:1px solid var(--line);border-radius:10px;padding:8px 12px;white-space:nowrap}
.back:hover{color:var(--text)}
.lede{color:var(--muted);font-size:14px;margin:6px 0 18px;max-width:62ch}

/* summary strip */
.sum{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:22px}
.sum div{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:10px 12px;min-width:0}
.sum small{display:block;font-size:11px;color:var(--muted);font-weight:800;letter-spacing:.05em;text-transform:uppercase;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sum b{display:block;font-family:var(--display);font-weight:400;font-size:26px;line-height:1.1;margin-top:2px;
  font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sum b i{font-style:normal;color:var(--dim);font-size:16px}
@media (max-width:520px){.sum{grid-template-columns:repeat(2,minmax(0,1fr))}.sum b{font-size:24px}}

/* section headings */
h2{font-family:var(--display);font-weight:400;font-size:24px;margin:26px 0 4px;display:flex;align-items:baseline;gap:10px}
h2 span{font-family:var(--body);font-size:13px;font-weight:700;color:var(--dim)}
.gsub{margin:0 0 12px;color:var(--muted);font-size:13px}

/* continue row */
.cont{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.ctile{display:flex;flex-direction:column;text-decoration:none;background:var(--panel);border:1px solid var(--line);border-radius:16px;
  overflow:hidden;min-width:0;transition:transform .15s,border-color .15s}
.ctile:hover{border-color:var(--c);transform:translateY(-2px)}
.ctile canvas{display:block;width:100%;aspect-ratio:4/3;background:var(--tb)}
.ctile div{padding:8px 10px 10px;min-width:0}
.ctile b{display:block;font-family:var(--display);font-weight:400;font-size:17px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ctile small{display:block;font-size:12px;color:var(--muted);font-weight:700;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ctile .go{display:inline-block;margin-top:6px;color:var(--c);font-weight:800;font-size:13px}
.info .prog{margin-bottom:2px}
@media (min-width:700px){
  .ctile{flex-direction:row;align-items:stretch}
  .ctile canvas{width:132px;flex:0 0 132px;aspect-ratio:auto;height:auto;min-height:104px}
  .ctile div{display:flex;flex-direction:column;justify-content:center;padding:12px 14px}
  .ctile b{font-size:20px}
}
.empty{background:var(--panel);border:1px dashed var(--line);border-radius:16px;padding:16px;color:var(--muted);font-size:14px;margin:0}

/* game cards */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:10px}
@media (max-width:420px){.grid{grid-template-columns:minmax(0,1fr)}}
.card{position:relative;display:grid;grid-template-columns:96px minmax(0,1fr);gap:12px;background:var(--panel);
  border:1px solid var(--line);border-radius:16px;padding:10px;min-width:0}
.card.on{border-color:color-mix(in srgb,var(--c) 45%,var(--line))}
.thumb{display:block;width:96px;height:96px;border-radius:12px;overflow:hidden;background:var(--tb);align-self:start}
.thumb canvas{display:block;width:100%;height:100%}
.info{min-width:0;display:flex;flex-direction:column;gap:3px}
.nm{display:flex;align-items:center;gap:8px;min-width:0}
.nm h3{margin:0;font-family:var(--display);font-weight:400;font-size:20px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.tag{flex:0 0 auto;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--c);
  border:1px solid color-mix(in srgb,var(--c) 40%,transparent);border-radius:999px;padding:2px 7px;white-space:nowrap}
.pitch{margin:0;color:var(--muted);font-size:13px;line-height:1.35}
.prog{margin-top:6px;display:flex;flex-direction:column;gap:5px}
.chips{display:flex;flex-wrap:wrap;gap:5px}
.chips span{background:var(--bg);border-radius:8px;padding:3px 8px;font-size:12px;font-weight:700;color:var(--muted);white-space:nowrap;
  font-variant-numeric:tabular-nums;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.chips span b{color:var(--text);font-weight:800}
.line{font-size:12px;font-weight:700;color:var(--muted);display:flex;align-items:center;gap:6px;min-width:0}
.line::before{content:"";flex:0 0 7px;height:7px;border-radius:50%;background:var(--dim)}
.line.work::before{background:var(--c);box-shadow:0 0 6px var(--c);animation:pulse 2s ease-in-out infinite}
.line.build::before{border-radius:2px;background:var(--c)}
.line.ready{color:var(--good)}
.line.ready::before{background:var(--good);box-shadow:0 0 6px var(--good)}
.line.none::before{background:none;border:1px solid var(--dim)}
.meter{flex:1;height:5px;border-radius:3px;background:#ffffff14;overflow:hidden;min-width:40px;max-width:90px}
.meter i{display:block;height:100%;background:var(--c);border-radius:3px}
.foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:8px}
.pres{font-size:12px;color:var(--dim);font-weight:700;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.play{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-height:40px;min-width:84px;padding:0 16px;border-radius:11px;
  background:var(--c);color:#14100c;font-family:var(--display);font-size:17px;text-decoration:none;box-shadow:inset 0 -3px 0 #0003}
.play:hover{filter:brightness(1.08)}
.play:active{transform:scale(.97)}

footer{margin-top:34px;color:var(--dim);font-size:12px;text-align:center}
@keyframes pulse{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){
  .line.work::before{animation:none}
  .ctile,.ctile:hover{transition:none;transform:none}
  .play:active{transform:none}
}
