/* Pastel — refined colour blocking. Pink means time, blue means collection, lilac means merit. */
@font-face { font-family: "Instrument Serif"; src: url("./fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("./fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("./fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --ivory: #fbf8f4;
  --paper: #ffffff;
  --ink: #1d2140;
  --ink-2: #4d5373;
  --muted: #7d829c;
  --line: rgba(29, 33, 64, .12);
  --line-strong: rgba(29, 33, 64, .24);
  --pink: #f6d4dd;
  --pink-soft: #fbe9ee;
  --pink-deep: #c46684;
  --pink-ink: #8b3654;
  --blue: #d2e3f4;
  --blue-soft: #eaf2fa;
  --blue-deep: #6f97c8;
  --blue-ink: #2d5687;
  --lilac: #e1daf4;
  --lilac-soft: #f1edfa;
  --lilac-deep: #8f7fcc;
  --lilac-ink: #4c3d8c;
  --radius: 6px;
  --serif: "Instrument Serif", "Iowan Old Style", "Songti SC", "STSong", Georgia, serif;
  --sans: "Manrope", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Yu Gothic", system-ui, sans-serif;
  --gutter: clamp(18px, 4vw, 56px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 15px/1.55 var(--sans); font-feature-settings: "tnum" 1; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 400; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 30; padding: 10px 14px; background: var(--ink); color: #fff; text-decoration: none; }
.skip-link:focus { top: 12px; }

.label { display: block; font: 700 11px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.tone-time { background: var(--pink); }
.tone-time-soft { background: var(--pink-soft); }
.tone-collection { background: var(--blue); }
.tone-collection-soft { background: var(--blue-soft); }
.tone-merit { background: var(--lilac); }
.tone-merit-soft { background: var(--lilac-soft); }
.block { position: relative; min-width: 0; padding: clamp(18px, 2.2vw, 30px); border-radius: var(--radius); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1320px; margin: 0 auto; padding: 22px var(--gutter); }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font: 800 13px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; }
.mark { display: grid; grid-template-columns: 10px 10px; grid-template-rows: 10px 10px; gap: 2px; }
.mark i { display: block; border-radius: 1px; background: var(--pink-deep); }
.mark i:nth-child(1) { grid-row: span 2; background: var(--pink); box-shadow: inset 0 0 0 1px var(--pink-deep); }
.mark i:nth-child(2) { background: var(--blue-deep); }
.mark i:nth-child(3) { background: var(--lilac-deep); }
.topbar nav { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; }
.topbar nav > a { padding: 8px 12px; text-decoration: none; border-radius: var(--radius); white-space: nowrap; }
.topbar nav > a:hover { background: var(--paper); }
.topbar nav > .back { box-shadow: inset 0 0 0 1px var(--line-strong); }
.topbar .theme-picker {
  --tp-font: var(--sans);
  --tp-fg: var(--ink);
  --tp-muted: var(--muted);
  --tp-bg: var(--paper);
  --tp-line: var(--line);
  --tp-hover: var(--blue-soft);
  --tp-accent: var(--ink);
  --tp-radius: var(--radius);
  --tp-menu-radius: 10px;
  --tp-toggle-line: var(--line-strong);
  --tp-toggle-ring: var(--ivory);
  --tp-shadow: 0 24px 48px -24px rgba(29, 33, 64, .38);
  margin: 0 4px 0 8px;
}
.topbar .theme-toggle { min-height: 37px; padding: 0 12px 0 10px; font-weight: 700; font-size: 14px; }
.topbar .theme-toggle:hover { background: var(--paper); }
.topbar .theme-swatches i { border-radius: 2px; }
.topbar .theme-option-text b { font-family: var(--serif); font-weight: 400; font-size: 20px; letter-spacing: -.005em; }

main { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter) 80px; }

/* ---------- hero composition ---------- */
.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: minmax(260px, auto) minmax(190px, auto); gap: 10px; margin-top: 8px; }
.hero-title { grid-column: 1 / 7; grid-row: 1 / 3; display: flex; flex-direction: column; overflow: hidden; padding: clamp(24px, 3.4vw, 48px); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.hero-title::before, .hero-title::after { content: ""; position: absolute; pointer-events: none; }
.hero-title::before { right: -70px; bottom: -70px; width: 240px; height: 240px; border-radius: 50%; background: var(--lilac); }
.hero-title::after { right: 110px; bottom: -30px; width: 120px; height: 120px; background: var(--blue); border-radius: 0 0 0 120px; mix-blend-mode: multiply; }
.kicker { margin: 0 0 auto; font: 700 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
h1 { position: relative; z-index: 1; margin-top: 48px; font: 400 clamp(64px, 8.6vw, 132px)/.88 var(--serif); letter-spacing: -.02em; }
h1 em { color: var(--pink-ink); }
.lede { position: relative; z-index: 1; max-width: 30ch; margin: 22px 0 0; font-size: 18px; color: var(--ink-2); }
.key { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 28px 0 0; padding: 0; list-style: none; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.key li { display: inline-flex; align-items: center; gap: 8px; }
.key li::before { content: ""; width: 14px; height: 14px; border-radius: 2px; }
.k-time::before { background: var(--pink); box-shadow: inset 0 0 0 1px var(--pink-deep); }
.k-collection::before { background: var(--blue); box-shadow: inset 0 0 0 1px var(--blue-deep); }
.k-merit::before { background: var(--lilac); box-shadow: inset 0 0 0 1px var(--lilac-deep); }
.sync { position: relative; z-index: 1; margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.text-link { margin-left: 6px; color: var(--ink); font-weight: 700; text-underline-offset: 3px; }

.figure { display: block; margin-top: 8px; font: 400 clamp(56px, 6.4vw, 104px)/.9 var(--serif); letter-spacing: -.02em; }
.foot { display: block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hero-hours { grid-column: 7 / 13; grid-row: 1; display: flex; flex-direction: column; }
.hero-hours .figure { font-size: clamp(80px, 9vw, 150px); color: var(--pink-ink); }
.split { display: flex; gap: 3px; height: 14px; margin-top: auto; padding-top: 0; }
.seg { display: block; min-width: 3px; border-radius: 2px; }
.seg-0 { background: var(--pink-ink); }
.seg-1 { background: var(--pink-deep); }
.seg-2 { background: #e9a3b8; }
.seg-3 { background: var(--paper); }
.split-legend { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; }
.split-legend li { display: inline-flex; align-items: baseline; gap: 6px; }
.split-legend li::before { content: ""; align-self: center; width: 9px; height: 9px; border-radius: 2px; background: var(--c); }
.split-legend li.seg-0 { --c: var(--pink-ink); background: none; }
.split-legend li.seg-1 { --c: var(--pink-deep); background: none; }
.split-legend li.seg-2 { --c: #e9a3b8; background: none; }
.split-legend li.seg-3 { --c: var(--paper); background: none; }
.split-legend span { font-weight: 700; }
.split-legend small { color: var(--ink-2); }
.hero-games { grid-column: 7 / 9; grid-row: 2; }
.hero-achievements { grid-column: 9 / 11; grid-row: 2; }
.hero-score { grid-column: 11 / 13; grid-row: 2; }
.hero-games .figure { color: var(--blue-ink); }
.hero-achievements .figure, .hero-score .figure { color: var(--lilac-ink); }

/* ---------- highlights ---------- */
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.panel header { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.panel h2 { font: 400 34px/1 var(--serif); }
.rank { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.rank li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 11px 0; border-top: 1px solid rgba(29, 33, 64, .1); counter-increment: rank; }
.rank li::before { content: counter(rank, decimal-leading-zero); font: italic 400 20px/1 var(--serif); color: var(--ink-2); }
.rank-text { display: grid; min-width: 0; }
.rank-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; text-decoration: none; }
a.rank-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.rank-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-2); }
.rank-value { font: 400 22px/1 var(--serif); white-space: nowrap; }
.rank-bar { grid-column: 2 / 4; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .7); overflow: hidden; }
.rank-bar::before { content: ""; display: block; width: var(--value); height: 100%; background: var(--pink-deep); }
.rank .rank-empty { display: block; color: var(--ink-2); }
.rank .rank-empty::before { content: none; }

/* ---------- section bands ---------- */
section.library, section.calendar-section { margin-top: 72px; scroll-margin-top: 16px; }
.section-band { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; padding: clamp(20px, 2.6vw, 34px); border-radius: var(--radius); }
.section-band h2 { margin-top: 8px; font: 400 clamp(44px, 5.6vw, 76px)/.9 var(--serif); letter-spacing: -.01em; }
.result-count { margin: 0; font-weight: 700; color: var(--ink-2); }

/* ---------- library controls ---------- */
.controls { display: grid; gap: 14px; margin: 18px 0 22px; }
.search input { width: 100%; padding: 12px 2px 12px 34px; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%231d2140' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6.5'/%3E%3Cpath d='m14 14 4 4'/%3E%3C/svg%3E") no-repeat 0 50%; font: 400 clamp(24px, 2.6vw, 32px)/1.2 var(--serif); }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-bottom-color: var(--blue-deep); box-shadow: 0 1.5px 0 var(--blue-deep); }
.control-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-right: auto; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); font-weight: 700; font-size: 13px; cursor: pointer; }
.chip small { color: var(--muted); font-weight: 700; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--blue-deep); background: var(--blue); }
.chip[aria-pressed="true"] small { color: var(--blue-ink); }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: calc(var(--radius) + 2px); background: var(--paper); }
.segmented button { min-height: 32px; padding: 0 12px; border: 0; border-radius: var(--radius); background: none; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- covers ---------- */
.cover { position: relative; display: block; overflow: hidden; background: var(--blue-soft); isolation: isolate; }
.cover img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.cover[data-shape="square"] img { object-fit: contain; }
.cover[data-shape="square"] { background: linear-gradient(90deg, var(--blue-soft) 0 33.3%, var(--pink-soft) 33.3% 66.6%, var(--lilac-soft) 66.6%); }
.cover-fallback { position: absolute; inset: 0; display: grid; place-items: center; font: italic 400 40px/1 var(--serif); color: var(--blue-ink); }
a.cover:hover img { transform: scale(1.035); }

/* ---------- grid view ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s ease, transform .2s ease; }
.tile:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-strong), 0 18px 30px -24px rgba(29, 33, 64, .45); }
.tile > .cover { aspect-ratio: 460 / 215; }
.tile-body { display: flex; flex: 1; flex-direction: column; padding: 14px 16px 12px; }
.tile-platform { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-ink); }
.tile-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 6px; font: 700 16.5px/1.3 var(--sans); overflow-wrap: anywhere; }
.tile-last { margin: auto 0 0; padding-top: 8px; font-size: 12.5px; color: var(--muted); }
.tile-facts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; margin: 0; padding: 0 2px 2px; }
.tile-facts > div { position: relative; overflow: hidden; padding: 9px 12px 10px; border-radius: 3px; }
.tile-facts dt { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.tile-facts dd { margin: 0; font: 400 21px/1.1 var(--serif); white-space: nowrap; }
.f-time { background: var(--pink-soft); }
.f-time dd { color: var(--pink-ink); }
.f-merit { background: var(--lilac-soft); }
.f-merit::after { content: ""; position: absolute; left: 0; bottom: 0; width: var(--value); height: 3px; background: var(--lilac-deep); }
.f-score { background: var(--lilac); }
.score { font: inherit; color: var(--lilac-ink); text-decoration: none; }
.score::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; vertical-align: .25em; border-radius: 50%; background: var(--tier); }
a.score:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.s-high { --tier: #4fa27a; }
.s-mid { --tier: #d6a03a; }
.s-low { --tier: #cf5f68; }

/* ---------- list view ---------- */
.game-list { overflow-x: auto; border-radius: var(--radius); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.game-table { width: 100%; border-collapse: collapse; }
.game-table thead th { position: sticky; top: 0; padding: 12px 14px; background: var(--blue-soft); text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.game-table td, .game-table tbody th { padding: 10px 14px; border-top: 1px solid var(--line); text-align: left; font-weight: 600; vertical-align: middle; white-space: nowrap; }
.game-table tbody tr:hover { background: var(--ivory); }
.cell-game { display: flex; align-items: center; gap: 12px; min-width: 260px; white-space: normal !important; }
.thumb { flex: none; width: 74px; height: 35px; border-radius: 3px; }
.thumb .cover-fallback { font-size: 18px; }
.row-title { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
a.row-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.cell-time { color: var(--pink-ink); }
.cell-merit { color: var(--lilac-ink); }
.mini-bar { display: block; width: 90px; height: 3px; margin-top: 4px; border-radius: 2px; background: var(--lilac-soft); overflow: hidden; }
.mini-bar::before { content: ""; display: block; width: var(--value); height: 100%; background: var(--lilac-deep); }
.cell-score .score { font: 400 22px/1 var(--serif); }
.muted { color: var(--muted); }

.state { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; padding: 48px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--ink-2); font-weight: 700; text-align: center; }
.state.small { padding: 10px 0; border: 0; justify-content: flex-start; font-size: 13px; }
.state.small:empty { display: none; }
.more-row { display: flex; justify-content: center; margin-top: 26px; }
.button { min-height: 44px; padding: 0 22px; border: 1px solid var(--ink); border-radius: var(--radius); background: transparent; font-weight: 700; cursor: pointer; }
.button:hover { background: var(--ink); color: #fff; }

/* ---------- calendar ---------- */
.month-nav { display: flex; align-items: center; gap: 4px; }
.month-nav span { min-width: 170px; text-align: center; font: 400 28px/1 var(--serif); }
.month-nav button { width: 42px; height: 42px; border: 1px solid rgba(29, 33, 64, .3); border-radius: var(--radius); background: rgba(255, 255, 255, .55); font-size: 17px; cursor: pointer; }
.month-nav button:hover:not(:disabled) { background: var(--paper); border-color: var(--ink); }
.month-nav button:disabled { opacity: .35; cursor: not-allowed; }
.month-blocks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 10px 0 0; }
.month-blocks .block { padding: 16px 18px; }
.month-blocks dd { margin: 6px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 30px/1.05 var(--serif); }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 10px; margin-top: 10px; align-items: start; }
.calendar-wrap, .day-panel { padding: clamp(16px, 2.2vw, 28px); border-radius: var(--radius); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.weekdays, .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.weekdays { margin-bottom: 8px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.weekdays span { padding-left: 8px; }
.day { position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; aspect-ratio: 1.25; min-width: 0; padding: 8px; border: 0; border-radius: 3px; background: var(--ivory); text-align: left; cursor: pointer; }
.day:disabled { cursor: default; color: #a6aabd; }
.day-number { font: 400 22px/1 var(--serif); }
.day small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; }
.day[data-heat="1"], .legend i[data-heat="1"] { background: #fbe7ed; }
.day[data-heat="2"], .legend i[data-heat="2"] { background: #f5c7d4; }
.day[data-heat="3"], .legend i[data-heat="3"] { background: #e89bb2; }
.day[data-heat="4"], .legend i[data-heat="4"] { background: var(--pink-deep); color: #fff; }
.day.historical { outline: 2px dotted var(--blue-deep); outline-offset: -5px; }
.day.historical[data-heat="0"] { background: var(--blue-soft); color: var(--blue-ink); }
.day.today .day-number { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.day.today::after { content: "Today"; position: absolute; top: 9px; right: 8px; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.day[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.day:not(:disabled):hover { box-shadow: inset 0 0 0 1px var(--ink); }
.day[aria-pressed="true"]:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.day.loading { animation: pulse 1.1s ease-in-out infinite alternate; }
@keyframes pulse { to { background: var(--pink-soft); } }
.blank { aspect-ratio: 1.25; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.legend i { width: 18px; height: 14px; border-radius: 2px; }
.legend .legend-historical { margin-left: 14px; background: var(--blue-soft); outline: 2px dotted var(--blue-deep); outline-offset: -3px; }
.day-panel { position: sticky; top: 16px; }
.day-panel h3 { margin-top: 8px; font: 400 32px/1.05 var(--serif); }
.day-summary { margin: 8px 0 16px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.day-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.day-game { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 8px; border-radius: 4px; background: var(--pink-soft); }
.day-game.unknown { background: var(--blue-soft); }
.day-cover { grid-row: span 2; width: 56px; height: 56px; border-radius: 3px; }
.day-cover[data-shape="wide"] img { object-position: 30% 50%; }
.day-game-text { display: grid; min-width: 0; }
.day-game-title { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; line-height: 1.3; }
a.day-game-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.day-game-text span { font-size: 12px; color: var(--ink-2); }
.day-game-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 12px; color: var(--ink-2); }
.day-game-value b { font: 400 20px/1.1 var(--serif); color: var(--pink-ink); }
.day-game.unknown .day-game-value b { color: var(--blue-ink); }
.note { color: var(--ink-2); font-size: 13px; }
.source-note { margin-top: 48px; max-width: 70ch; }

/* ---------- footer ---------- */
.footer-stripe { display: grid; grid-template-columns: 5fr 3fr 2fr; height: 12px; }
.footer-stripe i:nth-child(1) { background: var(--pink); }
.footer-stripe i:nth-child(2) { background: var(--blue); }
.footer-stripe i:nth-child(3) { background: var(--lilac); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 10px 28px; max-width: 1320px; margin: 0 auto; padding: 28px var(--gutter) 90px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--ink); text-decoration: underline; }
.owner-link { margin-left: auto; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero { grid-template-rows: auto; }
  .hero-title { grid-column: 1 / 13; grid-row: auto; min-height: 380px; }
  .hero-hours { grid-column: 1 / 13; grid-row: auto; min-height: 260px; }
  .hero-games { grid-column: 1 / 5; grid-row: auto; }
  .hero-achievements { grid-column: 5 / 9; grid-row: auto; }
  .hero-score { grid-column: 9 / 13; grid-row: auto; }
  .highlights { grid-template-columns: 1fr 1fr; }
  .highlights .panel:last-child { grid-column: 1 / -1; }
  .month-blocks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .month-blocks .block:last-child { grid-column: span 2; }
  .calendar-layout { grid-template-columns: 1fr; }
  .day-panel { position: static; }
}
@media (max-width: 720px) {
  .topbar nav > a:not(.back) { display: none; }
  .topbar { gap: 10px; }
  .wordmark { gap: 10px; font-size: 12px; letter-spacing: .16em; }
  .topbar .theme-picker { margin: 0 2px 0 0; }
  .hero { gap: 8px; }
  .hero-title { min-height: 0; }
  h1 { margin-top: 36px; }
  .hero-title::before { width: 150px; height: 150px; right: -50px; bottom: -50px; }
  .hero-title::after { width: 80px; height: 80px; right: 70px; bottom: -20px; border-radius: 0 0 0 80px; }
  .hero-hours { min-height: 0; }
  .hero-hours .split { margin-top: 18px; }
  .hero-games { grid-column: 1 / 7; }
  .hero-achievements { grid-column: 7 / 13; }
  .hero-score { grid-column: 1 / 13; }
  .figure { font-size: 60px; }
  .highlights { grid-template-columns: 1fr; gap: 8px; }
  .control-row { align-items: stretch; }
  .chips { width: 100%; }
  .segmented { overflow-x: auto; max-width: 100%; }
  .game-grid { grid-template-columns: 1fr; }
  .tile { display: grid; grid-template-columns: 104px minmax(0, 1fr); }
  .tile > .cover { grid-row: span 2; aspect-ratio: auto; height: 100%; min-height: 120px; }
  .tile > .cover[data-shape="wide"] img { object-position: 30% 50%; }
  .tile-body { padding: 12px 12px 6px; }
  .tile-facts { padding: 0 2px 2px 0; }
  .tile-facts > div { padding: 7px 7px 8px; }
  .tile-facts dt { font-size: 8.5px; letter-spacing: .05em; }
  .tile-facts dd { font-size: 17px; }
  .game-list { overflow: visible; background: none; box-shadow: none; }
  .game-table thead { display: none; }
  .game-table, .game-table tbody { display: block; }
  .game-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin-bottom: 8px; padding: 12px; border-radius: var(--radius); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
  .game-table td, .game-table tbody th { padding: 0; border: 0; white-space: normal; }
  .game-table td::before { content: attr(data-label); display: block; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .cell-game { grid-column: 1 / -1; min-width: 0; }
  .month-blocks { grid-template-columns: 1fr 1fr; gap: 8px; }
  .month-blocks .block:last-child { grid-column: 1 / -1; }
  .month-blocks dd { font-size: 24px; }
  .month-nav span { min-width: 120px; font-size: 22px; }
  .weekdays, .days { gap: 3px; }
  .weekdays span { padding-left: 0; text-align: center; }
  .day { aspect-ratio: 1; align-items: center; justify-content: center; padding: 2px; }
  .blank { aspect-ratio: 1; }
  .day small, .day.today::after { display: none; }
  .day-number { font-size: 18px; }
  .owner-link { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
