/* Vibe Games site layer. Every color, space, radius, and duration comes from house-theme.css tokens. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 var(--space-md); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--space-md); top: var(--space-md); background: var(--surface); padding: var(--space-xs) var(--space-sm); z-index: 10; }

.site-head { border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.head-row { display: flex; align-items: center; gap: var(--space-sm); min-height: 56px; max-width: 1080px; }
.brand { font-weight: 700; font-size: var(--text-headline); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: var(--radius-full); background: var(--accent); vertical-align: middle; }
.head-row > nav { flex: 1; min-width: 0; }
.nav { list-style: none; display: flex; gap: var(--space-2xs); margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: inline-flex; align-items: center; min-height: var(--hit-touch); padding: 0 var(--space-sm); color: var(--ink-muted); text-decoration: none; font-size: var(--text-subheadline); white-space: nowrap; border-radius: var(--radius-md); }
.nav a:hover { color: var(--ink); background: var(--bg); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
#theme-toggle-slot button { min-height: var(--hit-touch); min-width: var(--hit-touch); }

main { padding-top: var(--space-md); padding-bottom: var(--space-3xl); }
.crumbs { font-size: var(--text-footnote); color: var(--ink-muted); margin: 0 0 var(--space-xs); }
.crumbs a { color: var(--ink-muted); }
h1 { font-size: var(--text-large-title); line-height: var(--leading-tight); letter-spacing: -0.02em; margin: 0 0 var(--space-xs); font-weight: 700; }
h2 { font-size: var(--text-title2); line-height: var(--leading-tight); margin: var(--space-2xl) 0 var(--space-sm); font-weight: 700; scroll-margin-top: 72px; }
h3 { font-size: var(--text-title3); line-height: var(--leading-tight); margin: var(--space-xl) 0 var(--space-xs); font-weight: 600; scroll-margin-top: 72px; }
h4 { font-size: var(--text-headline); margin: var(--space-lg) 0 var(--space-2xs); }
.stamp { color: var(--ink-muted); font-size: var(--text-footnote); margin: 0 0 var(--space-lg); }
.stamp a { color: var(--ink-muted); }

.answer { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius-lg); padding: var(--space-md) var(--space-lg); margin: 0 0 var(--space-lg); box-shadow: var(--shadow); }
.answer p { margin: 0; font-size: var(--text-headline); }
.answer .answer-label { font-size: var(--text-caption1); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 700; margin-bottom: var(--space-2xs); }

.toc { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-sm) var(--space-lg); margin: 0 0 var(--space-lg); background: var(--surface); }
.toc-label { margin: 0 0 var(--space-2xs); font-size: var(--text-footnote); font-weight: 600; color: var(--ink-muted); }
.toc ol { margin: 0; padding-left: var(--space-lg); font-size: var(--text-callout); }

.prose p, .prose ul, .prose ol { margin: 0 0 var(--space-md); }
.prose li { margin-bottom: var(--space-2xs); }
.prose code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 var(--space-2xs); }
.callout { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-md) var(--space-lg); margin: 0 0 var(--space-md); }
.callout p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 var(--space-lg); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: var(--text-callout); }
th, td { text-align: left; padding: var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { font-size: var(--text-footnote); color: var(--ink-muted); font-weight: 600; background: var(--bg); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-sm); margin: 0 0 var(--space-lg); padding: 0; list-style: none; }
.cards a { display: block; height: 100%; padding: var(--space-md); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color var(--dur-fast) ease, transform var(--dur-fast) ease; }
.cards a:hover { border-color: var(--accent); transform: translateY(-1px); }
.cards strong { display: block; font-size: var(--text-headline); margin-bottom: var(--space-2xs); }
.cards span { color: var(--ink-muted); font-size: var(--text-subheadline); }

/* tools */
.tool { margin: 0 0 var(--space-lg); }
.clock { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-lg); box-shadow: var(--shadow); }
.clock-label { margin: 0; font-size: var(--text-footnote); color: var(--ink-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.clock-when { margin: var(--space-2xs) 0 var(--space-sm); font-size: var(--text-title2); font-weight: 700; line-height: var(--leading-tight); }
.clock-count { display: flex; gap: var(--space-sm); margin: 0 0 var(--space-sm); font-variant-numeric: tabular-nums; }
.clock-count div { flex: 1; text-align: center; background: var(--bg); border-radius: var(--radius-md); padding: var(--space-xs) 0; }
.clock-count b { display: block; font-size: var(--text-large-title); line-height: 1.1; color: var(--accent); }
.clock-count small { font-size: var(--text-caption1); color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.clock-live { font-size: var(--text-title3); font-weight: 700; color: var(--accent); margin: 0 0 var(--space-sm); }
.clock-note { margin: 0; font-size: var(--text-footnote); color: var(--ink-muted); }
.tool select { font: inherit; font-size: var(--text-callout); min-height: var(--hit-touch); padding: 0 var(--space-sm); border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); max-width: 100%; }
.check-list { list-style: none; padding: 0; margin: 0 0 var(--space-md); }
.check-list li { border-bottom: 1px solid var(--border); }
.check-list label { display: flex; gap: var(--space-sm); align-items: flex-start; min-height: var(--hit-touch); padding: var(--space-xs) 0; cursor: pointer; }
.check-list input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.check-progress { font-weight: 600; margin: 0 0 var(--space-xs); }

.site-foot { border-top: 1px solid var(--border); padding: var(--space-lg) 0 var(--space-2xl); color: var(--ink-muted); font-size: var(--text-footnote); }
.site-foot a { color: var(--ink-muted); }

@media (max-width: 560px) {
  h1 { font-size: var(--text-title1); }
  .clock-count b { font-size: var(--text-title1); }
  .answer { padding: var(--space-md); }
}
@media (prefers-reduced-motion: reduce) {
  .cards a { transition: none; }
  .cards a:hover { transform: none; }
}
