:root {
  color-scheme: light;
  --bg: #f6f3ee;
  --panel: #ffffff;
  --ink: #1d2528;
  --muted: #667174;
  --line: #d9dedb;
  --accent: #2f6f73;
  --accent-strong: #174d55;
  --hot: #b84c35;
  --gold: #b38224;
  --green: #277552;
  --shadow: 0 16px 40px rgba(35, 44, 46, 0.10);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, "Noto Sans TC", "Noto Sans JP", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.48;
}
a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.app-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 28px clamp(18px, 4vw, 56px) 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-header h1 { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2.6rem); letter-spacing: 0; }
.brand-block { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(16, 58, 65, 0.28);
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
@media (max-width: 720px) { .brand-mark { width: 38px; height: 38px; } }
.header-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
nav, .language-switch { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
nav a, .language-switch a, .feedback-bar button, .text-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 11px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
}
.language-switch a { padding: 5px 9px; font-size: 0.78rem; color: var(--muted); }
nav a.active, .language-switch a.active, .feedback-bar button.active {
  border-color: var(--accent);
  background: #e0efec;
  color: var(--accent-strong);
}
main { padding: 28px clamp(18px, 4vw, 56px) 46px; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-weight: 750;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  padding: clamp(24px, 4vw, 44px);
  background:
    linear-gradient(120deg, rgba(47, 111, 115, 0.94), rgba(35, 56, 61, 0.92)),
    url("https://cdn.akamai.steamstatic.com/steam/apps/1903340/header.jpg") center/cover;
  color: #fff;
  min-height: 340px;
}
.adult-hero {
  background:
    radial-gradient(120% 140% at 85% 15%, rgba(150, 70, 92, 0.55), transparent 60%),
    linear-gradient(120deg, rgba(30, 40, 44, 0.97), rgba(74, 44, 53, 0.95));
}
.sale-hero {
  min-height: 260px;
  background:
    linear-gradient(120deg, rgba(32, 79, 62, 0.94), rgba(132, 87, 31, 0.88)),
    url("https://cdn.akamai.steamstatic.com/steam/apps/632470/header.jpg") center/cover;
}
.hero-copy { max-width: 800px; align-self: end; }
.hero-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: 0;
}
.hero-copy p { max-width: 720px; font-size: 1.02rem; }
.hero-panel, .source-box, .stat-card {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  padding: 18px;
  align-self: end;
}
.hero-panel span, .stat-card span { color: var(--muted); font-size: 0.82rem; }
.hero-panel strong, .stat-card strong { display: block; font-size: 1.35rem; margin-top: 4px; }
.stats-grid, .source-grid, .taste-layout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 34px;
}
.stat-card { background: var(--panel); box-shadow: none; border-color: var(--line); }
.stat-card p { margin-bottom: 0; color: var(--muted); font-size: 0.9rem; }
.section-head, .two-column {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  margin: 34px 0 16px;
}
.section-head h2, .two-column h2, .taste-layout h2, .reference-list h2, .calendar-layout h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2.2rem);
  letter-spacing: 0;
}
.wide-copy { max-width: 780px; color: var(--muted); }
.section-note { margin: 6px 0 0; max-width: 640px; color: var(--muted); font-size: 0.92rem; }
.verified-low {
  padding-left: 16px;
  border-left: 4px solid var(--gold);
  border-radius: 2px;
}
.verified-low .eyebrow { color: var(--gold); }
.verified-low .eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #ffd27a;
  box-shadow: 0 0 0 3px rgba(255, 210, 122, 0.32);
  vertical-align: middle;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.top-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.game-card {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 280px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(35, 44, 46, 0.16);
  border-color: #c2cfca;
}
.game-card.compact {
  grid-template-columns: 1fr;
  min-height: 0;
  border-radius: 12px;
  box-shadow: none;
}
.game-card.compact:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, #284f55, #b38224);
  overflow: hidden;
}
.cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* The title is only painted over the fallback (no-image) cover, so artwork never sits under text. */
.cover-fallback::after {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.45));
  pointer-events: none;
}
.cover span {
  position: absolute;
  z-index: 1;
  left: 14px;
  right: 14px;
  bottom: 12px;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.cover:not(.cover-fallback) span { display: none; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card-topline { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 0.86rem; }
.score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(140deg, #2f6f73, #103a41);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 4px 12px rgba(16, 58, 65, 0.22);
}
.game-card h3 { margin: 0; font-size: 1.35rem; letter-spacing: 0; }
.dek, .meta { margin: 0; color: var(--muted); }
.studio { margin: -2px 0 0; color: var(--accent-strong); font-size: 0.82rem; font-weight: 600; }
.badges, .tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf1ef;
  border: 1px solid var(--line);
  color: #374244;
  font-size: 0.76rem;
}
.badge.deal { background: #fff4d7; border-color: #ebd49a; }
.badge.maturity { background: #f8e7e0; border-color: #e3b6aa; }
.badge.store { background: #e4f0f2; border-color: #bdd5d9; }
.badge.source { background: #f0f0f0; color: var(--muted); }
.signal-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sig {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 6px;
  background: #eef3f1; border: 1px solid var(--line);
  color: #36444a; font-size: 0.78rem; font-variant-numeric: tabular-nums;
}
.sig strong { color: var(--accent-strong); font-weight: 800; }
.sig-soft { background: #f4eee2; border-color: #e6d8b8; }
.sig-soft strong { color: var(--gold); }
.sig.itad { background: #e7f2ec; border-color: #b8d8c8; }
.sig.itad strong { color: var(--green); }
a.sig.itad { text-decoration: none; }
.itad-hot { background: #fde7df; border-color: #e9b29c; color: var(--hot); font-weight: 800; }
.lang-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.76rem; }
.lang-label { color: var(--muted); margin-right: 2px; }
.lang {
  padding: 2px 7px; border-radius: 999px;
  background: #f0f0f0; border: 1px solid var(--line); color: var(--muted);
}
.lang.pref { background: #e0efec; border-color: var(--accent); color: var(--accent-strong); font-weight: 700; }
.reasons { margin: 0; padding-left: 18px; color: #3c4749; }
.reasons li { margin: 3px 0; }
.meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.meter-label { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted); }
.meter-track { height: 6px; background: #e6e8e5; border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.store-links { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.86rem; }
.feedback-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.feedback-bar button { cursor: pointer; }
.taste-layout { grid-template-columns: 1fr 1fr; align-items: start; }
.taste-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.taste-chip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
}
.taste-chip.muted { color: var(--muted); background: #fafafa; }
.source-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-color: var(--line);
  box-shadow: none;
}
.source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reference-list {
  margin: 26px 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.reference-list ul { margin-bottom: 0; }
.reference-list li { margin: 8px 0; }
.reference-list li span { display: block; color: var(--muted); }
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 22px;
}
.calendar-list {
  display: grid;
  gap: 12px;
  margin: 10px 0 24px;
}
.calendar-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  align-items: start;
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.calendar-card .cover {
  aspect-ratio: 16 / 9;
  min-height: 0;
}
.calendar-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
}
.calendar-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}
.calendar-topline time { color: var(--accent-strong); font-weight: 800; }
.calendar-topline strong { color: var(--ink); }
.calendar-card h3, .calendar-card p { margin: 0; }
.calendar-card h3 { font-size: 0.96rem; line-height: 1.25; }
.calendar-card p { display: none; }
.calendar-card .tag-row { gap: 4px; }
.calendar-card .badge { font-size: 0.68rem; min-height: 20px; padding: 1px 6px; }
.research-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.research-table th, .research-table td {
  text-align: left;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.research-table th { width: 260px; color: var(--accent-strong); }
.empty {
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
}
.fav-hero { min-height: 200px; }
.fav-list { display: grid; gap: 18px; }
.fav-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.fav-score {
  position: absolute; top: 14px; right: 14px;
  display: flex; flex-direction: column; align-items: center;
  background: var(--accent-strong); color: #fff;
  border-radius: 10px; padding: 6px 12px; line-height: 1.05;
}
.fav-score span { font-size: 0.58rem; opacity: 0.82; text-transform: uppercase; letter-spacing: 0.05em; }
.fav-score strong { font-size: 1.5rem; }
.fav-score.est { background: #5c6a6d; cursor: help; }
.fav-media { display: flex; flex-direction: column; gap: 8px; }
.fav-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; }
.fav-shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fav-shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; }
.fav-noimg {
  aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; background: linear-gradient(140deg, #284f55, #b38224); color: #fff; border-radius: 8px; text-align: center; padding: 12px;
}
.fav-noimg span { font-weight: 800; }
.fav-noimg small { opacity: 0.85; }
.fav-info { display: flex; flex-direction: column; gap: 8px; padding-right: 70px; }
.fav-info h3 { margin: 0; font-size: 1.3rem; }
.fav-about { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.fav-shots { grid-template-columns: repeat(2, 1fr); }
.fav-note { margin: 0; color: var(--accent-strong); font-size: 0.9rem; font-style: italic; }
.mw-hero { min-height: 190px; }
.mw-list { display: grid; gap: 12px; }
.mw-row {
  display: grid;
  grid-template-columns: 54px minmax(160px, 0.34fr) minmax(0, 1fr);
  gap: 16px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px;
}
.mw-rank { font-size: 1.5rem; font-weight: 850; color: var(--accent-strong); text-align: center; }
.mw-cover { aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: linear-gradient(140deg, #284f55, #b38224); }
.mw-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mw-cover span { display: flex; height: 100%; align-items: center; justify-content: center; color: #fff; padding: 8px; font-weight: 700; text-align: center; }
.mw-info { display: flex; flex-direction: column; gap: 6px; }
.mw-info h3 { margin: 0; font-size: 1.1rem; }
.mw-info .dek { font-size: 0.9rem; }
@media (max-width: 900px) {
  .fav-card { grid-template-columns: 1fr; }
  .fav-info { padding-right: 0; }
  .mw-row { grid-template-columns: 40px 1fr; }
  .mw-row .mw-cover { display: none; }
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px clamp(18px, 4vw, 56px) 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}
.quiet-portal {
  margin-left: auto;
  flex: 0 0 auto;
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1;
  opacity: 0.18;
  filter: grayscale(0.6);
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.quiet-portal:hover, .quiet-portal:focus-visible, .quiet-portal.active { opacity: 0.85; filter: none; }
@media (max-width: 1100px) {
  .app-header, .dashboard-hero, .calendar-layout { grid-template-columns: 1fr; }
  .header-actions, nav, .language-switch { align-items: flex-start; justify-content: flex-start; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-grid, .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  main { padding-inline: 14px; }
  .app-header { padding-inline: 14px; position: static; }
  .dashboard-hero { padding: 20px; min-height: 420px; }
  .game-card { grid-template-columns: 1fr; }
  .stats-grid, .source-grid, .taste-layout, .taste-grid, .meters { grid-template-columns: 1fr; }
  .section-head, .two-column { align-items: flex-start; flex-direction: column; }
  .calendar-card { grid-template-columns: 92px 1fr; }
  .calendar-card .cover { min-height: 0; }
  footer { flex-direction: column; padding-inline: 14px; }
}