:root {
  --bg: #f6f3ec;
  --panel: #ffffff;
  --ink: #1d2320;
  --muted: #5d6661;
  --line: #e2ddd2;
  --accent: #2f7d3b;
  --badge-bg: #111;
  --badge-ink: #fff;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 8px 24px rgb(0 0 0 / 8%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141816;
    --panel: #1d2320;
    --ink: #eef1ee;
    --muted: #a3aca6;
    --line: #2d3530;
    --badge-bg: #000;
    --badge-ink: #fff;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; margin-bottom: 14px; }

main, .top, .foot { max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: #1d2320; color: #f6f3ec; font-size: 0.8rem; letter-spacing: 0.02em;
}
@media (prefers-color-scheme: dark) { .mark { background: #eef1ee; color: #141816; } }
.top nav { display: flex; gap: 18px; }
.top nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.top nav a:hover { color: var(--ink); }

/* Home */
.hero { padding: 28px 0 32px; max-width: 760px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 850; }
.hero p { color: var(--muted); font-size: 1.1rem; margin: 14px 0 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; padding-bottom: 40px; }
.card {
  display: flex; flex-direction: column; background: var(--panel); border-radius: 16px; overflow: hidden;
  text-decoration: none; box-shadow: var(--shadow); border-top: 4px solid var(--accent);
  transition: transform 0.15s ease;
}
.card:hover { transform: translateY(-3px); }
.card .cover { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; background: var(--line); }
.card-body { display: flex; gap: 14px; padding: 16px; }
.card .icon { width: 64px; height: 64px; border-radius: 15px; flex: none; margin-top: -40px; border: 3px solid var(--panel); background: var(--panel); object-fit: cover; }
.card h3 { font-size: 1.15rem; }
.card p { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px !important; }
.tags span { font-size: 0.75rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.tags .pill { background: var(--accent); color: #fff; }

.section-title { font-size: 1.4rem; margin: 6px 0 16px; }

/* Daily puzzles (IT Games): its own band below the tycoon games, linking out */
.puzzles { padding: 4px 0 44px; }
.banner {
  display: flex; align-items: center; gap: 20px; padding: 22px 24px; background: var(--panel);
  border-radius: 16px; box-shadow: var(--shadow); border-left: 5px solid var(--accent);
}
.banner .icon { width: 72px; height: 72px; border-radius: 17px; flex: none; object-fit: cover; }
.banner-text { flex: 1; }
.banner-text h3 { font-size: 1.2rem; }
.banner-text p { margin: 4px 0 0; color: var(--muted); }
.btn {
  flex: none; padding: 12px 20px; border-radius: 99px; background: var(--accent); color: #fff;
  font-weight: 800; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.1); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; }
.chips a {
  display: block; padding: 6px 14px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line);
  text-decoration: none; font-weight: 700; font-size: 0.92rem;
}
.chips a:hover { border-color: var(--accent); color: var(--accent); }

/* Game page */
.game-hero { display: flex; gap: 24px; align-items: center; padding: 18px 0 26px; }
.game-hero .icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: var(--shadow); flex: none; object-fit: cover; }
.game-hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 850; }
.game-hero .tagline { color: var(--muted); font-size: 1.15rem; margin: 6px 0 14px; }
.status { display: inline-block; margin: 0 0 8px; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }

.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; min-width: 170px; padding: 8px 16px 8px 12px;
  border-radius: 11px; background: var(--badge-bg); color: var(--badge-ink); text-decoration: none;
  border: 1px solid #3a3a3a; font-weight: 700; font-size: 1.15rem; line-height: 1.1;
}
.badge svg { width: 24px; height: 24px; flex: none; }
.badge small { display: block; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.02em; opacity: 0.85; }
.badge:hover { filter: brightness(1.25); }
.badge.off { background: transparent; color: var(--muted); border: 1px dashed var(--line); cursor: default; }
.badge.off:hover { filter: none; }

.play { margin-bottom: 30px; }
.frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 80vh; border-radius: 16px; overflow: hidden;
  background: #0d0f0e; box-shadow: var(--shadow);
}
.frame .poster { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.7); }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border: 0; border-radius: 99px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 800; font-size: 1.1rem; cursor: pointer;
  box-shadow: 0 6px 20px rgb(0 0 0 / 35%); white-space: nowrap;
}
.play-btn svg { width: 20px; height: 20px; }
.play-btn:hover { filter: brightness(1.1); }
.note { color: var(--muted); font-size: 0.9rem; margin: 10px 2px 0; }

.about { max-width: 760px; margin-bottom: 30px; font-size: 1.08rem; }
.about p { margin: 0 0 12px; }
.about ul { margin: 0; padding-left: 1.2em; }
.about li { margin: 4px 0; }
.about li::marker { color: var(--accent); }

.list ul { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.list a { display: block; padding: 14px 16px; background: var(--panel); border-radius: 12px; text-decoration: none; box-shadow: var(--shadow); border-left: 4px solid var(--accent); }
.list strong { display: block; font-size: 1.05rem; }
.list span { color: var(--muted); font-size: 0.92rem; }

.shots { margin-bottom: 30px; }
.strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
.strip img { flex: none; height: 440px; width: auto; border-radius: 14px; scroll-snap-align: start; box-shadow: var(--shadow); background: var(--line); }
.strip img.wide { height: 300px; }

.again { background: var(--panel); border-radius: 16px; padding: 24px; margin-bottom: 30px; box-shadow: var(--shadow); }
.again h2 { margin-bottom: 6px; }
.again p { color: var(--muted); margin: 0 0 14px; }

.more { margin-bottom: 40px; }
.mini { display: flex; flex-wrap: wrap; gap: 12px; }
.mini a { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; background: var(--panel); border-radius: 14px; text-decoration: none; font-weight: 700; box-shadow: var(--shadow); }
.mini img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }

.ad { margin: 0 0 30px; min-height: 100px; }

.prose { max-width: 720px; padding-top: 10px; padding-bottom: 50px; }
.prose h1 { font-size: 2rem; margin-bottom: 16px; }

.foot { border-top: 1px solid var(--line); padding-top: 20px; padding-bottom: 40px; color: var(--muted); font-size: 0.85rem; }
.foot p { margin: 4px 0; }

/* Phones */
@media (max-width: 640px) {
  main, .top, .foot { padding-left: 16px; padding-right: 16px; }
  .top nav { gap: 14px; }
  .grid { grid-template-columns: 1fr; gap: 18px; }
  .banner { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
  .btn { align-self: stretch; text-align: center; }
  .game-hero { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 6px; }
  .game-hero .icon { width: 88px; height: 88px; border-radius: 20px; }
  .badges { flex-direction: column; align-items: stretch; }
  .badge { width: 100%; justify-content: center; }
  /* On phones the button opens the game full screen (site.js), so the frame is just a poster. */
  .strip img { height: 360px; }
  .strip img.wide { height: 200px; }
}
