:root {
  color-scheme: light;
  --paper: #faf9f7;
  --surface: #fff;
  --ink: #21201e;
  --muted: #77746e;
  --border: #e8e6e2;
  --soft: #f3f1ed;
  --accent: #e85538;
  --accent-pale: #fff2ed;
  --chart-grid: #eae9e6;
  --max-width: 1180px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .5; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.shell-width { width: min(var(--max-width), calc(100% - 64px)); margin: 0 auto; }
.brand { font-size: 21px; font-weight: 850; letter-spacing: -.06em; white-space: nowrap; }
.brand > span:first-child { color: var(--accent); }
.brand-divider { color: #c0beb9; font-weight: 400; margin: 0 14px; letter-spacing: 0; }
.brand-section { color: #53514d; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.masthead { background: var(--surface); border-bottom: 1px solid var(--border); }
.masthead-inner { height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.data-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.online-dot { display: inline-block; height: 7px; width: 7px; border-radius: 50%; background: #67a987; }
.refresh-button { border: 1px solid var(--border); background: var(--surface); color: #514e4a; border-radius: 7px; padding: 7px 12px; font-weight: 550; font-size: 12px; }
.refresh-button:hover { border-color: #b6b1aa; background: #fcfbf9; }
.refresh-button span:first-child { font-size: 17px; line-height: 0; vertical-align: -1px; }
.tabs-shell { background: var(--surface); border-bottom: 1px solid var(--border); }
.tabs { display: flex; align-items: center; gap: 36px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; padding: 18px 0 16px; position: relative; border: 0; background: transparent; color: #74716e; font-size: 13px; font-weight: 590; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); font-weight: 720; }
.tab.is-active::after { content: ''; height: 2px; background: var(--accent); position: absolute; bottom: 0; left: 0; right: 0; }
.main-content { padding-top: 46px; padding-bottom: 42px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.heading-copy h1 { margin: 0; font-size: clamp(29px, 3.7vw, 39px); font-weight: 740; line-height: 1.16; letter-spacing: -.055em; }
.heading-copy p { color: var(--muted); font-size: 14px; margin: 9px 0 0; }
.period-picker { flex: 0 0 auto; display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.period-picker button { background: transparent; border: 0; color: #7d7974; padding: 8px 12px; border-radius: 6px; font-size: 12px; font-weight: 650; }
.period-picker button:hover { color: var(--ink); }
.period-picker button.is-current { background: var(--ink); color: var(--surface); }
.notice { margin-bottom: 22px; padding: 12px 16px; border: 1px solid #e9c6b8; color: #914836; border-radius: 8px; background: #fff5f0; }
h2 { font-size: 17px; line-height: 1.35; letter-spacing: -.028em; font-weight: 700; margin: 0; }
.section-top { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.section-top p { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.text-link { border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 650; padding: 4px; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.overview-tiles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; margin-bottom: 22px; }
.overview-tile { display: flex; flex-direction: column; text-align: left; border: 0; background: transparent; padding: 28px 32px 25px; min-width: 0; }
.overview-tile:not(:last-child) { border-right: 1px solid var(--border); }
.overview-tile:hover { background: #fdfbf9; }
.tile-label { color: #696660; font-size: 12px; font-weight: 630; }
.tile-value { font-size: clamp(32px,3.4vw,42px); font-weight: 740; letter-spacing: -.06em; line-height: 1.1; margin-top: 15px; font-variant-numeric: tabular-nums; }
.tile-foot { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; align-items: center; margin-top: 13px; }
.tile-foot span { font-size: 17px; color: #aba59f; }
.chart-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 27px 30px 20px; min-width: 0; }
.chart-heading { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.chart-heading h2 { font-size: 18px; }
.chart-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.chart-hint { font-size: 11px; color: var(--muted); text-align: right; }
.field-wrap select { min-height: 38px; min-width: 210px; border: 1px solid #dedbd5; border-radius: 7px; padding: 7px 35px 7px 12px; background: var(--surface); color: #46423d; max-width: 100%; }
.compact-select select { max-width: 290px; font-size: 12px; }
.line-chart { width: 100%; height: 295px; margin: 17px 0 4px; }
.line-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.line-chart .gridline { stroke: var(--chart-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.line-chart .axis-label { fill: #aaa6a0; font-size: 12px; }
.line-chart .chart-fill { fill: var(--accent); fill-opacity: .075; }
.line-chart .chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.line-chart .chart-point { fill: var(--surface); stroke: var(--accent); stroke-width: 1.7; vector-effect: non-scaling-stroke; }
.line-chart .point-hit { fill: transparent; }
.chart-caption { margin: 0; color: #94918c; font-size: 11px; }
.empty-chart { height: 100%; display: grid; place-items: center; color: var(--muted); }
.overview-bottom { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin-top: 22px; }
.summary-list { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px 26px 15px; }
.mini-list { margin-top: 14px; }
.mini-list-row { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border: 0; border-top: 1px solid var(--border); text-align: left; background: transparent; }
.mini-list-row:hover .mini-list-title { color: var(--accent); }
.mini-list-title { font-size: 13px; font-weight: 650; color: var(--ink); }
.mini-list-count { white-space: nowrap; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.small-label { color: var(--muted); display: block; font-size: 11px; margin-bottom: 8px; }
.play-topline { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.play-topline .field-wrap select { min-width: min(300px,75vw); }
.subtle-copy { font-size: 12px; color: var(--muted); padding-bottom: 10px; }
.metric-group { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 22px; }
.count-metrics, .rate-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.count-metrics { border-bottom: 1px solid var(--border); }
.rate-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); background: #fdfcfb; }
.metric { display: flex; min-width: 0; flex-direction: column; text-align: left; position: relative; padding: 19px 23px 17px; border: 0; background: transparent; color: var(--ink); }
.metric:not(:last-child) { border-right: 1px solid var(--border); }
.metric:hover { background: #fdf8f5; }
.metric.is-selected { background: var(--accent-pale); }
.metric.is-selected::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); }
.metric-name { font-size: 11px; color: var(--muted); font-weight: 600; }
.metric-number { font-size: clamp(22px,2.5vw,30px); line-height: 1.25; letter-spacing: -.055em; font-weight: 730; margin-top: 8px; font-variant-numeric: tabular-nums; }
.metric-note { color: #a19d97; font-size: 10px; margin-top: 6px; }
.play-chart-panel, .click-chart-panel { scroll-margin-top: 24px; }
.card-section-top { margin-top: 36px; margin-bottom: 16px; }
.search-wrap input { width: 230px; border: 1px solid #dedbd5; border-radius: 7px; background: var(--surface); color: var(--ink); height: 40px; padding: 0 13px; outline-offset: 2px; }
.search-wrap input::placeholder { color: #aaa7a2; }
.game-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.game-card { width: 100%; min-height: 110px; display: grid; grid-template-columns: 104px minmax(0,1fr); text-align: left; padding: 0; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); overflow: hidden; color: var(--ink); transition: border-color .15s, background .15s; }
.game-card:hover { border-color: #c4bdb5; }
.game-card.is-picked { border: 1.5px solid var(--accent); background: #fffdfb; }
.game-thumbnail { position: relative; width: 104px; height: 100%; min-height: 104px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: #eae8e2; color: #7b756e; overflow: hidden; }
.game-thumbnail img { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; }
.game-thumbnail.has-monogram { background: #edeae5; }
.tile-letter { font-size: 34px; font-weight: 760; color: #98928b; letter-spacing: -.05em; }
.game-card-content { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 13px 14px; gap: 8px; }
.game-card-title { font-size: 13px; font-weight: 720; line-height: 1.22; overflow-wrap: anywhere; }
.game-card-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; color: var(--muted); font-size: 11px; }
.game-card-stats strong { color: var(--ink); font-size: 12px; font-weight: 760; }
.game-card-minor { color: #99948e; font-size: 10px; }
.empty-copy { margin: 20px 0; color: var(--muted); font-size: 13px; grid-column: 1 / -1; }
.click-topline { display: flex; align-items: stretch; gap: 30px; margin-bottom: 22px; }
.click-primary, .click-secondary { display: flex; flex-direction: column; min-width: 130px; }
.click-primary strong, .click-secondary strong { line-height: 1; font-size: clamp(30px,4vw,42px); letter-spacing: -.055em; font-weight: 760; font-variant-numeric: tabular-nums; }
.click-secondary { border-left: 1px solid var(--border); padding-left: 28px; }
.filter-chips { display: flex; overflow-x: auto; gap: 8px; padding: 0 0 16px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface); color: #66625e; border-radius: 99px; padding: 8px 13px; font-size: 12px; font-weight: 550; }
.filter-chip:hover { border-color: #b9b4ad; }
.filter-chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.click-list-top { margin-top: 36px; margin-bottom: 15px; }
.click-leaderboard { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.leader-row { display: grid; width: 100%; grid-template-columns: 50px minmax(0,1fr) 110px 75px; align-items: center; gap: 16px; text-align: left; border: 0; border-bottom: 1px solid var(--border); color: var(--ink); background: transparent; padding: 14px 20px; }
.leader-row:last-child { border-bottom: 0; }
.leader-row:hover { background: #fbf9f6; }
.leader-row.is-picked { background: var(--accent-pale); }
.leader-rank { color: #b0aba5; font-size: 12px; }
.leader-info { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.leader-info strong { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.leader-info span { font-size: 11px; color: var(--muted); }
.leader-count { font-size: 13px; font-weight: 740; text-align: right; font-variant-numeric: tabular-nums; }
.leader-share { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 16px; }
.load-more { border: 1px solid var(--border); background: var(--surface); color: #5d5954; border-radius: 7px; padding: 10px 18px; font-size: 12px; }
.load-more:hover { border-color: #b9b4ad; }
.page-footer { border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-top: 18px; margin-top: 44px; color: #aaa59f; font-size: 11px; }
.masthead-brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.masthead-brand img { display: block; width: 168px; max-width: 100%; height: auto; }
.masthead-brand .brand-section { border-left: 1px solid var(--border); padding-left: 18px; font-size: 12px; }
.login-gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--paper); }
.login-card { text-align: center; width: min(100%,440px); padding: 20px; }
.login-logo { display: block; width: min(100%,240px); height: auto; margin: 0 auto 28px; }
.login-card .login-explainer { margin: 0 auto; color: var(--muted); line-height: 1.65; font-size: 14px; max-width: 315px; }
.google-login-button { display: flex; justify-content: center; align-items: center; margin: 24px auto 0; min-height: 44px; }
.login-status { font-size: 12px !important; color: #b44738; line-height: 1.5; margin: 18px auto 0 !important; max-width: 340px; }
.login-status:empty { display: none; }
@media(max-width: 1050px) {
  .game-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .overview-tile { padding: 24px 23px; }
}
@media(max-width: 730px) {
  .shell-width { width: calc(100% - 36px); }
  .masthead-inner { height: 62px; }
  .tabs { gap: 24px; }
  .tab { padding: 13px 0; font-size: 12px; }
  .main-content { padding-top: 30px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 19px; margin-bottom: 25px; }
  .heading-copy h1 { font-size: 33px; }
  .heading-copy p { font-size: 13px; }
  .overview-tiles { grid-template-columns: 1fr 1fr; }
  .overview-tile { padding: 20px; }
  .overview-tile:nth-child(2) { border-right: 0; }
  .overview-tile:last-child { border-top: 1px solid var(--border); grid-column: span 2; }
  .tile-value { font-size: 32px; }
  .overview-bottom { grid-template-columns: 1fr; gap: 16px; }
  .summary-list { padding: 21px 20px 12px; }
  .chart-panel { padding: 20px 17px 15px; }
  .line-chart { height: 240px; margin-top: 12px; }
  .chart-heading { align-items: flex-start; }
  .chart-heading h2 { font-size: 16px; }
  .chart-hint { display: none; }
  .play-topline { align-items: start; }
  .count-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .count-metrics .metric:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .count-metrics .metric:nth-child(2) { border-right: 0; }
  .metric { padding: 15px 17px 13px; }
  .metric-number { font-size: 26px; }
  .rate-metrics .metric { padding: 15px 11px 12px; }
  .rate-metrics .metric-number { font-size: 21px; }
  .metric-note { font-size: 9px; }
  .game-cards { grid-template-columns: 1fr; }
  .card-section-top, .click-list-top { flex-direction: column; align-items: stretch; }
  .search-wrap input { width: 100%; }
  .click-topline { gap: 24px; }
  .click-secondary { padding-left: 24px; }
}
@media(max-width: 430px) {
  .shell-width { width: calc(100% - 28px); }
  .brand { font-size: 19px; }
  .brand-divider { margin: 0 9px; }
  .brand-section { font-size: 12px; }
  .header-actions { gap: 7px; }
  .data-state { font-size: 10px; }
  .refresh-button { padding: 5px 8px; }
  .refresh-text { display: none; }
  .tabs { gap: 22px; }
  .overview-tile { padding: 17px 15px; }
  .tile-value { font-size: 29px; }
  .tile-foot { font-size: 10px; }
  .chart-heading { flex-direction: column; gap: 12px; }
  .compact-select, .compact-select select { width: 100%; max-width: none; }
  .line-chart { height: 205px; }
  .play-topline { flex-direction: column; gap: 8px; }
  .rate-metrics .metric { padding: 13px 8px; }
  .rate-metrics .metric-number { font-size: 20px; }
  .rate-metrics .metric-name { font-size: 10px; }
  .metric-note { min-height: 27px; line-height: 1.2; }
  .leader-row { grid-template-columns: 18px minmax(0,1fr) auto; gap: 10px; padding: 12px 13px; }
  .leader-share { display: none; }
  .leader-count { font-size: 12px; }
  .leader-info strong { font-size: 12px; }
  .login-card { padding: 15px 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
