:root {
  --bg: #15131a;
  --card: #201d27;
  --text: #ece9f1;
  --muted: #a49fae;
  --accent: #ff7a59;
  --accent-text: #1a1210;
  --line: #34303d;
  --error: #ff8a8a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", "Leelawadee UI", sans-serif;
}
a { color: var(--accent); }
.top, .foot, main { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.top { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.lang { color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .9rem; }
.hero h1 { font-size: clamp(1.5rem, 5vw, 2.2rem); margin: 24px 0 16px; line-height: 1.3; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin: 16px 0; }
.age { max-width: 520px; margin: 48px auto; text-align: center; }
.age h1 { font-size: clamp(1.3rem, 5.5vw, 1.8rem); line-height: 1.35; }
.age form { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.btn {
  display: inline-block; border: 1px solid var(--line); background: transparent; color: var(--text);
  border-radius: 10px; padding: 10px 18px; font: inherit; cursor: pointer; text-decoration: none;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.account form { margin-top: 12px; }
.badge { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; }
.badge.tier { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.muted { color: var(--muted); }
.error { color: var(--error); }
.prose h2 { font-size: 1.1rem; margin-top: 20px; }
.foot { padding-top: 24px; padding-bottom: 32px; color: var(--muted); font-size: .9rem; }
.foot a { color: var(--muted); }
.small { font-size: .85rem; }
.game {
  display: grid; grid-template-columns: 96px 1fr; grid-template-rows: auto auto;
  column-gap: 16px; row-gap: 10px; align-items: center; padding: 14px; position: relative;
}
.game .thumb { grid-row: 1 / span 2; }
.thumb { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: var(--line); }
.info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; color: var(--muted); font-size: .92rem; min-width: 0; }
.info .title { color: var(--text); font-size: 1.08rem; overflow-wrap: anywhere; }
.info .sep { color: var(--line); }
.info .pair { color: var(--text); font-weight: 600; white-space: nowrap; }
.act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.act .btn { padding: 8px 16px; }
.wait time { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cant { color: var(--muted); text-decoration: underline dotted; cursor: help; outline: none; }
.cant .tip {
  display: none; position: absolute; z-index: 5; left: 128px; top: calc(100% - 6px); width: 300px; max-width: calc(100% - 24px);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  color: var(--text); font-size: .9rem; cursor: default; box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.cant:hover .tip, .cant:focus .tip, .cant:focus-within .tip { display: block; }
.tip ul { list-style: none; padding: 0; margin: 8px 0; }
.tip li { display: flex; justify-content: space-between; gap: 12px; padding: 1px 0; }
.tip li.mine { color: var(--accent); font-weight: 600; }
.tip a { display: block; margin-top: 8px; }
@media (max-width: 420px) {
  .game { grid-template-columns: 72px 1fr; column-gap: 12px; }
  .thumb { width: 72px; height: 72px; }
  .cant .tip { left: 12px; right: 12px; width: auto; }
}
.info a.title { color: var(--text); font-size: 1.08rem; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.info a.title:hover { text-decoration: underline; }
.discuss { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.discuss a { display: inline-flex; line-height: 0; }
.search { display: flex; gap: 8px; margin: 8px 0 12px; }
.search input {
  flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.back { margin: 16px 0 0; }
.back a { color: var(--muted); text-decoration: none; }
