/* Sakura — a pale pink, anime-inspired play diary. */
@font-face { font-family: "Fredoka"; src: url("./fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("./fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --bg: #fff7f9;
  --paper: #ffffff;
  --blush: #ffeef3;
  --petal: #ffd6e2;
  --rose: #f29ab6;
  --rose-deep: #c4446f;
  --ink: #4a3540;
  --ink-soft: #7b6470;
  --line: #f5d8e1;
  --sky: #dcefff;
  --lilac: #eee6ff;
  --mint: #dcf5ea;
  --steam: #5b8fd1;
  --nintendo: #e0506f;
  --playstation: #7a6ad1;
  --xbox: #3e9f68;
  --radius: 22px;
  --shadow: 0 14px 34px -18px rgba(196, 68, 111, .38);
  --display: "Fredoka", "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --body: "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Yu Gothic", sans-serif;
  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; min-height: 100vh; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--rose-deep); outline-offset: 3px; border-radius: 10px; }
.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 16px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- masthead ---------- */
.masthead {
  position: relative; overflow: hidden; padding: 0 clamp(18px, 4vw, 56px) 76px;
  background:
    radial-gradient(circle at 82% 30%, rgba(255, 255, 255, .95) 0 110px, transparent 111px),
    radial-gradient(circle at 18% -10%, #ffe1ea 0, transparent 55%),
    radial-gradient(circle at 100% 100%, var(--lilac) 0, transparent 45%),
    linear-gradient(180deg, #ffe7ee 0%, var(--bg) 100%);
}
/* Screentone dots, faded at the edges like a manga panel. */
.masthead::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(196, 68, 111, .16) 1.2px, transparent 1.6px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(ellipse at 88% 40%, #000 0, transparent 46%);
  mask-image: radial-gradient(ellipse at 88% 40%, #000 0, transparent 46%);
}
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 46px; pointer-events: none;
  background: var(--bg);
  -webkit-mask: radial-gradient(28px 22px at 28px 0, transparent 98%, #000) 0 0 / 56px 46px repeat-x;
  mask: radial-gradient(28px 22px at 28px 0, transparent 98%, #000) 0 0 / 56px 46px repeat-x;
}

.topbar { position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1200px; margin: 0 auto; padding: 22px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 20px/1 var(--display); text-decoration: none; letter-spacing: .01em; }
.brand-mark { position: relative; width: 30px; height: 30px; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; inset: 0; border-radius: 50% 50% 50% 0; background: var(--rose); transform: rotate(-45deg) scale(.72); }
.brand-mark::after { background: var(--petal); transform: rotate(45deg) scale(.72); mix-blend-mode: multiply; }
.topbar-links { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; }
.topbar-links > a { padding: 8px 12px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.topbar-links > a:hover { background: rgba(255, 255, 255, .7); }
.topbar-links .pill-link { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.topbar .theme-picker {
  --tp-font: var(--body);
  --tp-fg: var(--ink);
  --tp-muted: var(--ink-soft);
  --tp-bg: var(--paper);
  --tp-line: var(--line);
  --tp-hover: var(--blush);
  --tp-accent: var(--rose-deep);
  --tp-menu-radius: 20px;
  --tp-toggle-bg: var(--paper);
  --tp-shadow: 0 22px 44px -20px rgba(196, 68, 111, .45);
  margin: 0 2px 0 4px;
}
.topbar .theme-toggle { min-height: 40px; padding: 0 14px 0 11px; border-width: 1.5px; font-weight: 700; font-size: 15px; }
.topbar .theme-toggle:hover, .topbar .is-open > .theme-toggle { border-color: var(--rose); }
.topbar .theme-menu-title { color: var(--rose-deep); font-family: var(--display); font-weight: 600; }
.topbar .theme-option-text b { font-family: var(--display); font-weight: 600; font-size: 16px; }
.topbar .theme-option:hover, .topbar .theme-option:focus-visible { background: var(--blush); }

.hero { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 400px); align-items: center; gap: clamp(28px, 6vw, 80px); max-width: 1200px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) 0 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--rose-deep); font: 600 14px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 12px; height: 12px; border-radius: 50% 0 50% 0; background: var(--rose); transform: rotate(-15deg); }
h1 { margin: 0; font: 600 clamp(48px, 8.4vw, 104px)/.98 var(--display); letter-spacing: -.02em; }
.marker { position: relative; display: inline-block; color: var(--rose-deep); }
.marker::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; z-index: -1; height: .3em; border-radius: 999px; background: var(--petal); transform: rotate(-1.5deg); }
.lede { max-width: 32ch; margin: 22px 0 0; color: var(--ink-soft); font-size: clamp(18px, 2vw, 21px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px; font: 600 16px/1 var(--display); text-decoration: none; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button.primary { background: var(--rose-deep); color: #fff; box-shadow: 0 10px 22px -10px rgba(196, 68, 111, .8); }
.button.soft { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.button.small { min-height: 36px; padding: 0 16px; font-size: 14px; }
.button:hover { transform: translateY(-2px); }
.button.soft:hover { background: var(--blush); }
.sync-bubble { position: relative; display: inline-block; margin: 30px 0 0; padding: 10px 16px; border-radius: 18px; background: var(--paper); box-shadow: 0 0 0 1.5px var(--line); color: var(--ink-soft); font-size: 14px; font-weight: 700; }
.sync-bubble::before { content: ""; position: absolute; left: 22px; top: -8px; width: 14px; height: 14px; background: var(--paper); border-left: 1.5px solid var(--line); border-top: 1.5px solid var(--line); transform: rotate(45deg); }

/* Gacha-style player card */
.player-card { position: relative; padding: 18px 18px 20px; border-radius: 28px; background: linear-gradient(160deg, #fff 0%, #fff6f9 60%, #f6efff 100%); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--petal), 0 30px 60px -30px rgba(196, 68, 111, .55); transform: rotate(1.6deg); }
.tape { position: absolute; top: -14px; left: 50%; width: 110px; height: 28px; margin-left: -55px; border-radius: 3px; background: repeating-linear-gradient(-45deg, rgba(242, 154, 182, .55) 0 8px, rgba(255, 214, 226, .55) 8px 16px); transform: rotate(-4deg); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font: 600 13px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--rose-deep); }
.sparkles { color: var(--rose); letter-spacing: .3em; }
.player-card .card-art { aspect-ratio: 460 / 215; border-radius: 18px; }
.card-caption { display: grid; gap: 2px; margin: 12px 4px 14px; font-size: 14px; color: var(--ink-soft); }
.card-caption strong { color: var(--ink); font: 600 19px/1.25 var(--display); overflow-wrap: anywhere; }
.card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.card-stats div { padding: 10px 12px; border-radius: 16px; background: var(--blush); }
.card-stats div:nth-child(2) { background: var(--sky); }
.card-stats div:nth-child(3) { background: var(--lilac); }
.card-stats div:nth-child(4) { background: var(--mint); }
.card-stats dt { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.card-stats dd { margin: 0; font: 600 26px/1.15 var(--display); }

/* Falling petals, kept to the masthead */
.petals { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.petals i { position: absolute; top: -24px; width: 13px; height: 10px; border-radius: 100% 0 100% 0; background: linear-gradient(135deg, #ffe0ea, #f4a3bd); opacity: .8; animation: petal-fall 16s linear infinite; }
.petals i:nth-child(1) { left: 6%; animation-delay: -2s; animation-duration: 17s; }
.petals i:nth-child(2) { left: 16%; animation-delay: -9s; width: 10px; height: 8px; }
.petals i:nth-child(3) { left: 29%; animation-delay: -5s; animation-duration: 19s; }
.petals i:nth-child(4) { left: 41%; animation-delay: -12s; width: 9px; height: 7px; }
.petals i:nth-child(5) { left: 53%; animation-delay: -1s; animation-duration: 21s; }
.petals i:nth-child(6) { left: 62%; animation-delay: -14s; }
.petals i:nth-child(7) { left: 71%; animation-delay: -7s; width: 11px; height: 8px; animation-duration: 18s; }
.petals i:nth-child(8) { left: 80%; animation-delay: -3s; }
.petals i:nth-child(9) { left: 89%; animation-delay: -10s; animation-duration: 20s; width: 9px; height: 7px; }
.petals i:nth-child(10) { left: 96%; animation-delay: -6s; }
@keyframes petal-fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: .85; }
  50% { transform: translate3d(-40px, 340px, 0) rotate(220deg); }
  100% { transform: translate3d(30px, 760px, 0) rotate(480deg); opacity: 0; }
}

/* ---------- shared section pieces ---------- */
main { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 56px) 96px; }
section { margin-top: 64px; scroll-margin-top: 20px; }
.lately { margin-top: 18px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
h2 { margin: 0; font: 600 clamp(30px, 3.6vw, 40px)/1.1 var(--display); letter-spacing: -.01em; }
h3 { margin: 0; }
.state { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; padding: 40px 20px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--paper); text-align: center; color: var(--ink-soft); font-weight: 700; }
.state.small { padding: 10px; border: 0; background: none; font-size: 14px; }
.state.small:empty { display: none; }
.note { color: var(--ink-soft); font-size: 14px; }
.source-note { margin-top: 48px; text-align: center; }

/* ---------- covers ---------- */
.cover { position: relative; display: block; overflow: hidden; border-radius: 16px; background: linear-gradient(135deg, var(--blush), var(--lilac)); isolation: isolate; }
.cover img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cover[data-shape="square"] img { object-fit: contain; }
.cover[data-shape="square"]::before { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(196, 68, 111, .14) 1.1px, transparent 1.5px) 0 0 / 10px 10px; }
.cover-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--rose); font: 600 34px/1 var(--display); }
a.cover:hover img { transform: scale(1.04); }

/* ---------- recently played ---------- */
.lately-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; margin: 0; padding: 4px 4px 14px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--petal) transparent; }
.lately-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px; border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); scroll-snap-align: start; }
.lately-cover { width: 76px; height: 76px; border-radius: 14px; }
.lately-cover[data-shape="wide"] img { object-position: 30% 50%; }
.lately-text { display: grid; min-width: 0; gap: 2px; }
.lately-text strong { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font: 600 15px/1.3 var(--display); }
.lately-text span { color: var(--ink-soft); font-size: 13px; font-weight: 700; }

/* ---------- library ---------- */
.result-count { margin: 0; color: var(--ink-soft); font-weight: 700; font-size: 14px; }
.toolbar { position: sticky; top: 10px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; padding: 10px; border-radius: 26px; background: rgba(255, 255, 255, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 0 0 1.5px var(--line), 0 14px 30px -24px rgba(196, 68, 111, .6); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font-weight: 800; font-size: 15px; cursor: pointer; }
.filter small { min-width: 26px; padding: 2px 7px; border-radius: 999px; background: var(--blush); color: var(--ink-soft); font-size: 12px; text-align: center; }
.filter:hover { background: var(--blush); }
.filter[aria-pressed="true"] { background: var(--ink); color: #fff; }
.filter[aria-pressed="true"] small { background: rgba(255, 255, 255, .2); color: #fff; }
.filter.p-steam::before, .filter.p-nintendo::before, .filter.p-playstation::before, .filter.p-xbox::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--rose)); }
.p-steam { --dot: var(--steam); }
.p-nintendo { --dot: var(--nintendo); }
.p-playstation { --dot: var(--playstation); }
.p-xbox { --dot: var(--xbox); }
.search-sort { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 360px; justify-content: flex-end; }
.search { flex: 1 1 220px; max-width: 340px; }
.search input, .sort select { width: 100%; min-height: 42px; border: 0; border-radius: 999px; background: var(--blush); font-weight: 700; }
.search input { padding: 0 18px 0 42px; background: var(--blush) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23c4446f' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 3.5 3.5'/%3E%3C/svg%3E") no-repeat 16px 50%; }
.search input::placeholder { color: #a88b98; }
.sort { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 14px; font-weight: 800; }
.sort select { width: auto; padding: 0 38px 0 16px; appearance: none; background: var(--blush) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23c4446f' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 15px center; color: var(--ink); cursor: pointer; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 22px; }
.game-card { position: relative; display: flex; flex-direction: column; padding: 10px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.game-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -22px rgba(196, 68, 111, .55); }
.game-card > .cover { aspect-ratio: 460 / 215; }
.score { position: absolute; top: 18px; right: 18px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: rgba(255, 255, 255, .94); box-shadow: 0 6px 16px -8px rgba(74, 53, 64, .7); text-decoration: none; line-height: 1; transition: transform .15s ease; }
.score b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--score); color: #fff; font: 600 15px/1 var(--display); }
.score small { font-size: 11px; font-weight: 900; color: var(--ink); }
.s-high { --score: #3fa877; }
.s-mid { --score: #d99a1e; }
.s-low { --score: #d2525a; }
a.score:hover { transform: scale(1.06); }
.game-body { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 12px 6px 4px; }
.platform-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--blush); color: var(--ink-soft); font-size: 12px; font-weight: 900; letter-spacing: .02em; }
.platform-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--rose)); }
.game-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 4px; font: 600 18px/1.25 var(--display); overflow-wrap: anywhere; }
.game-time { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); }
.game-time strong { color: var(--rose-deep); font: 600 17px/1 var(--display); }
.game-note { margin: 0; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.achievements { display: grid; gap: 5px; margin-top: auto; padding-top: 10px; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.achievements .bar { height: 8px; border-radius: 999px; background: var(--blush); overflow: hidden; }
.achievements .bar::before { content: ""; display: block; width: var(--value); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rose), var(--rose-deep)); }
.more-row { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- play diary ---------- */
.month-nav { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.month-nav span { min-width: 140px; text-align: center; font: 600 17px/1 var(--display); }
.month-nav button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--blush); font: 600 22px/1 var(--display); cursor: pointer; }
.month-nav button:hover:not(:disabled) { background: var(--petal); }
.month-nav button:disabled { opacity: .35; cursor: not-allowed; }
.diary-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
.calendar-card, .day-panel { padding: clamp(14px, 2.4vw, 24px); border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); }
.month-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
.month-summary div { min-width: 0; padding: 10px 12px; border-radius: 16px; background: var(--blush); }
.month-summary dt { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.month-summary dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 17px/1.3 var(--display); }
.weekdays, .calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekdays { margin-bottom: 6px; text-align: center; color: var(--ink-soft); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; aspect-ratio: 5 / 4; min-width: 0; padding: 2px; border: 0; border-radius: 14px; background: #fff9fb; box-shadow: inset 0 0 0 1px #f8e6ec; cursor: pointer; transition: transform .15s ease; }
.day:disabled { cursor: default; color: #c5b2bb; }
.day:not(:disabled):hover { transform: translateY(-2px); }
.day-number { font: 600 16px/1 var(--display); }
.day small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 800; opacity: .9; }
.day[data-heat="1"], .legend i[data-heat="1"] { background: #ffe6ee; }
.day[data-heat="2"], .legend i[data-heat="2"] { background: #ffc9d9; }
.day[data-heat="3"], .legend i[data-heat="3"] { background: #f590b0; color: #fff; }
.day[data-heat="4"], .legend i[data-heat="4"] { background: #d75582; color: #fff; }
.day.historical { box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3.5px var(--rose-deep); background-image: radial-gradient(rgba(196, 68, 111, .2) 1px, transparent 1.4px); background-size: 7px 7px; }
.day.historical[data-heat="0"] { color: var(--rose-deep); }
.day.today .day-number { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sky); color: var(--ink); }
.day[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; z-index: 1; }
.day.loading { animation: shimmer 1.2s ease-in-out infinite alternate; }
.blank { aspect-ratio: 5 / 4; }
@media (max-width: 640px) { .day, .blank { aspect-ratio: 1; } }
@keyframes shimmer { to { background: var(--blush); } }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.legend i { width: 16px; height: 16px; border-radius: 5px; }
.legend .legend-historical { margin-left: 12px; box-shadow: inset 0 0 0 2px var(--rose-deep); background: #fff; }
.day-panel { position: sticky; top: 90px; }
.day-panel h3 { font: 600 22px/1.25 var(--display); }
.day-summary { margin: 6px 0 14px; color: var(--ink-soft); font-weight: 700; font-size: 14px; }
.day-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.day-game { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 8px; border-radius: 18px; background: var(--bg); }
.day-cover { grid-row: span 2; width: 64px; height: 64px; border-radius: 12px; }
.day-cover[data-shape="wide"] img { object-position: 30% 50%; }
.day-game-text { display: grid; min-width: 0; }
.day-game-title { overflow-wrap: anywhere; font: 600 15px/1.3 var(--display); text-decoration: none; }
a.day-game-title:hover { color: var(--rose-deep); text-decoration: underline; }
.day-game-text span { color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.day-game-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.day-game-value strong { font: 600 15px/1.2 var(--display); color: var(--rose-deep); }
.day-game-value.unknown strong { color: var(--ink-soft); }

/* ---------- footer ---------- */
.footer { padding: 36px clamp(18px, 4vw, 56px) 88px; background: linear-gradient(180deg, var(--bg), #ffe9f0); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; max-width: 1200px; margin: 0 auto; font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--rose-deep); text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .player-card { max-width: 440px; transform: rotate(1deg); }
  .diary-layout { grid-template-columns: 1fr; }
  .day-panel { position: static; }
}
@media (max-width: 640px) {
  .masthead { padding-bottom: 64px; }
  .topbar-links > a:not(.pill-link) { display: none; }
  .topbar { gap: 10px; }
  .brand { font-size: 18px; }
  .topbar .theme-picker { margin: 0; }
  .topbar .theme-toggle { min-height: 38px; padding: 0 12px 0 10px; font-size: 14px; }
  .topbar-links .pill-link { padding: 9px 12px; font-size: 14px; }
  .hero { padding-top: 12px; }
  .player-card { margin: 8px 4px 0; }
  .toolbar { position: static; border-radius: 22px; }
  .search-sort { flex-basis: 100%; }
  .search { max-width: none; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .game-card { padding: 7px; border-radius: 18px; }
  .game-card > .cover { border-radius: 12px; }
  .game-title { font-size: 15.5px; }
  .game-time strong { font-size: 15px; }
  .score { top: 12px; right: 12px; padding-right: 3px; }
  .score b { width: 28px; height: 28px; font-size: 14px; }
  .score small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .month-summary { grid-template-columns: 1fr 1fr; }
  .weekdays, .calendar { gap: 4px; }
  .day { border-radius: 10px; }
  .day small { display: none; }
  .day-number { font-size: 14px; }
  .month-nav span { min-width: 112px; font-size: 15px; }
}
@media (max-width: 380px) {
  .game-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .petals { display: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
