:root {
  --album-paper: #faf7f0;
  --album-ink: #293c34;
  --album-muted: #646b5f;
  --album-green: #244e43;
  --album-rose: #c58686;
  --album-line: #dedfd2;
  --album-shadow: 0 18px 60px #3d4a3020;
  --album-serif: Georgia, 'Noto Serif SC', 'Songti SC', SimSun, serif;
  --album-sans: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --serif: var(--album-serif);
  --sans: var(--album-sans);
}

body, body[data-view] {
  color: var(--album-ink);
  background: var(--album-paper);
  font: 14px/1.7 var(--album-sans);
  container-type: normal;
}
body::before, body[data-view]::before {
  background: radial-gradient(ellipse at 88% 0, #e9cbb12e, transparent 42%), radial-gradient(ellipse at 0 58%, #c7d3b924, transparent 46%);
  filter: none;
  transform: none;
}
body::after, body[data-view]::after { display: none; }
button { transition: background .2s, color .2s, box-shadow .2s, transform .2s; }
button:disabled { opacity: .48; }
button:focus-visible, input:focus-visible, .picture-svg:focus-visible { outline: 3px solid var(--album-rose); outline-offset: 4px; }
.eyebrow { color: var(--album-muted); font: 10px/1.6 var(--album-sans); letter-spacing: .19em; }
.subtle-text { color: var(--album-muted); font-size: 12px; }

body[data-view] .site-header {
  position: relative;
  inset: auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 24px;
  width: min(1240px, 100%);
  height: auto;
  min-height: 88px;
  margin: auto;
  padding: 18px 40px;
  border: 0;
  border-bottom: 1px solid var(--album-line);
  background: none;
  box-shadow: none;
  transform: none;
  pointer-events: auto;
  container-type: normal;
}
body[data-view] .site-header .brand { position: relative; inset: auto; display: flex; align-items: center; gap: 12px; width: auto; height: auto; min-height: 44px; padding: 0; color: var(--album-ink); border: 0; border-radius: 0; background: none; filter: none; box-shadow: none; text-shadow: none; }
body[data-view] .brand > .brand-mark { display: block; flex: none; width: 32px; height: 28px; border: 1.5px solid var(--album-green); border-radius: 7px; background: transparent; box-shadow: none; }
.brand-mark::before { content: ''; position: absolute; inset: 6px 9px; border: 1.5px solid var(--album-green); border-radius: 50%; }
.brand-mark::after { content: ''; position: absolute; width: 9px; height: 3px; left: 5px; bottom: auto; top: -5px; border-radius: 3px 3px 0 0; background: var(--album-green); transform: none; }
body[data-view] .brand > .brand-name { position: static; display: block; clip: auto; clip-path: none; width: auto; height: auto; color: var(--album-ink); font: 23px/1.15 var(--album-serif); letter-spacing: -.035em; text-align: left; }
body[data-view] .brand-name > span { display: block; color: var(--album-muted); font: 8px/1.3 var(--album-sans); letter-spacing: .15em; margin-top: 5px; }
body[data-view] .site-header .theme-switcher { position: static; display: flex; align-items: center; gap: 2px; width: auto; height: auto; margin: 0 0 0 auto; padding: 3px; border: 1px solid var(--album-line); border-radius: 24px; background: #ffffff60; box-shadow: none; backdrop-filter: blur(12px); }
body[data-view] .theme-switcher::before { display: none; }
body[data-view] .site-header .theme-option { position: static; display: flex; justify-content: center; align-items: center; gap: 6px; width: auto; height: 40px; min-width: 40px; min-height: 40px; padding: 6px 12px; border: 0; border-radius: 20px; color: var(--album-muted); font: 11px/1.3 var(--album-sans); background: none; outline: none; filter: none; box-shadow: none; }
body[data-view] .theme-option > * { position: static; clip: auto; width: auto; height: auto; overflow: visible; }
body[data-view] .theme-option > .icon { position: static; display: block; width: 15px; height: 15px; color: inherit; stroke-width: 1.5; transform: none; }
body[data-view] .site-header .theme-option[aria-pressed="true"] { color: var(--album-green); background: #fffdf7; box-shadow: 0 2px 8px #344c3410; outline: none; }
body[data-view] .site-header .theme-option:focus-visible { outline: 2px solid var(--album-green); outline-offset: 3px; }
body[data-view] .site-header .header-actions { display: flex; gap: 6px; }
body[data-view] .site-header .header-actions .text-button { position: static; display: grid; place-items: center; width: 40px; height: 44px; min-width: 40px; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; color: var(--album-muted); background: none; box-shadow: none; }
body[data-view] .header-actions .text-button > .icon { position: static; display: block; width: 20px; height: 20px; color: inherit; transform: none; }
body[data-view] .header-actions .text-button:hover { color: var(--album-green); background: #dce4d45c; }
body[data-view] .wallet-entry { position: static; inset: auto; width: auto; margin: 0; }
body[data-view] .wallet-chip { display: flex; align-items: center; gap: 7px; min-height: 40px; width: auto; padding: 6px 12px; color: var(--album-ink); border: 1px solid var(--album-line); border-radius: 22px; background: #fffdf7b3; box-shadow: none; font-size: 11px; }
body[data-view] .wallet-chip .coin-mark { width: 21px; height: 21px; border: 1px solid #c3aa71; background: #f1e6c5; color: #786636; box-shadow: none; font: 12px/19px var(--album-serif); }
body[data-view="game"] .wallet-entry { display: none; }
.text-button { color: var(--album-muted); font-size: 13px; }
.text-button:hover { color: var(--album-green); }
.primary-button, .secondary-button { min-height: 50px; padding: 12px 24px; border: 1px solid var(--album-line); border-radius: 12px; font: 500 15px/1.5 var(--album-sans); letter-spacing: .02em; text-shadow: none; }
.primary-button { color: #fffdf4; background: var(--album-green); border-color: var(--album-green); box-shadow: 0 5px 15px #244e4314; }
.primary-button::before, .primary-button::after { display: none; }
.secondary-button { color: var(--album-green); background: #fffdf7; box-shadow: none; }
.primary-button:hover:not(:disabled) { background: color-mix(in srgb, var(--album-green), #142b23 15%); box-shadow: 0 8px 20px #244e4324; transform: translateY(-2px); }
.secondary-button:hover:not(:disabled) { background: color-mix(in srgb, var(--album-paper), var(--album-rose) 9%); border-color: var(--album-rose); transform: translateY(-2px); }
.site-footer { max-width: 1160px; padding: 20px 32px; color: var(--album-muted); font-size: 10px; letter-spacing: .08em; }

body .modal, body .zoom-modal { color: var(--album-ink); border: 1px solid var(--album-line); border-radius: 24px; background: var(--album-paper); box-shadow: 0 30px 100px #243a322b; }
body .modal { padding: 34px 30px 28px; }
body .modal h2 { color: var(--album-ink); font-family: var(--album-serif); }
body .modal p:not(.eyebrow, .star-rating) { color: var(--album-muted); font-size: 13px; line-height: 1.8; }
.modal::backdrop, .zoom-modal::backdrop, .pause-modal::backdrop { background: #24362f5c; backdrop-filter: blur(12px); }
.modal-close { color: var(--album-green); border-color: var(--album-line); background: #fffdf8; box-shadow: none; }
.modal-close:hover { background: #e6ecdf; }
body[data-view] #pause-dialog .site-header { justify-content: center; flex-wrap: wrap; gap: 8px; min-height: 0; padding: 16px 0 0; margin: 16px 0 0; border-bottom: 0; border-top: 1px solid var(--album-line); }
body[data-view] #pause-dialog .brand { display: none; }
body[data-view] #pause-dialog .theme-switcher { margin: 0; }
.sound-control { border-color: var(--album-line); }
.sound-toggle small { font-size: 12px; }
.sound-toggle input { border-color: var(--album-line); background: #e4e5d9; }
.sound-toggle input:checked { background: var(--album-green); }
.sound-toggle input:checked::after { background: #fffdf7; }
.sound-control input[type="range"] { accent-color: var(--album-green); }
.toast { color: var(--album-ink); border-color: var(--album-line); background: #fffdf8; box-shadow: var(--album-shadow); font-size: 13px; }

body[data-view="game"] .game-view {
  --game-height: calc(100svh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: stretch; gap: 0; width: min(1180px, 100%); min-height: var(--game-height); max-width: none; margin: auto; padding: 22px 32px 24px; grid-template: none;
}
body[data-view="game"] .game-view > * { grid-area: auto; }
body[data-view="game"] .game-heading { width: 100%; max-width: 1080px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 16px; margin: 0 auto 16px; }
body[data-view="game"] .game-heading > .text-button { width: 44px; height: 44px; border: 1px solid var(--album-line); border-radius: 50%; color: var(--album-green); background: #ffffff70; box-shadow: none; }
body[data-view="game"] .level-banner { padding: 0; }
body[data-view="game"] .level-banner .eyebrow { color: var(--album-muted); font-size: 10px; letter-spacing: .13em; }
body[data-view="game"] .game-heading h1 { color: var(--album-ink); font: 31px/1.4 var(--album-serif); letter-spacing: .03em; text-shadow: none; }
body[data-view="game"] .level-description { display: none; }
body[data-view="game"] .game-hud { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; align-items: center; width: min(900px, 100%); max-width: none; margin: 0 auto 18px; padding: 13px 20px; border: 1px solid var(--album-line); border-radius: 16px; background: #fffdf899; box-shadow: none; backdrop-filter: blur(10px); }
.hud-stats { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
body[data-view="game"] .hud-mistakes { color: var(--album-muted); font-size: 12px; }
.hud-miss-icon { color: var(--album-rose); font-size: 24px; }
#chances-count { color: var(--album-ink); font-size: 15px; }
body[data-view="game"] .hud-level { display: none; }
body[data-view="game"] #challenge-pause { gap: 7px; min-width: 95px; min-height: 36px; padding: 4px 9px; color: var(--album-green); background: #e5ece27a; border: 0; border-radius: 20px; box-shadow: none; }
body[data-view="game"] #challenge-time { font: 18px/1.5 var(--album-serif); }
#challenge-pause .icon { width: 17px; height: 17px; }
body[data-view="game"] #challenge-pause[data-urgent="true"] { color: #985c4e; background: #efd9cc75; animation: none; }
.hud-discoveries { display: flex; justify-content: flex-end; gap: 14px; margin: 0; }
body[data-view="game"] .progress-block > p { color: var(--album-green); font-size: 21px; }
body[data-view="game"] .progress-label { color: var(--album-muted); font-size: 11px; }
.progress-emblem { color: #af9363; }
.progress-dots { gap: 5px; }
body[data-view="game"] .progress-dot { width: 21px; height: 21px; border: 1px solid var(--album-line); color: var(--album-muted); background: #fffdf7; font-size: 11px; box-shadow: none; }
body[data-view="game"] .progress-dot.found { color: #fffdf7; border-color: var(--album-green); background: var(--album-green); }
body[data-view="game"] .progress-dot.revealed { color: #fffdf7; border-color: #ae7c68; background: #ae7c68; }
body[data-view="game"] .hud-clock-note { grid-column: 1; color: var(--album-muted); font-size: 10px; text-align: left; }
.album-secret { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin: 0; color: #91674f; font-size: 11px; }
.album-secret .icon { width: 15px; height: 15px; }
.album-secret[data-state="earned"] { color: var(--album-green); }
.album-secret[data-state="missed"] { color: var(--album-muted); }
body[data-view="game"] .image-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: min(100%, calc(max(200px, 100svh - 390px) * var(--picture-double-ratio, 1.6) + 48px)); gap: 22px; align-self: center; margin: 0 auto; padding: 0; border: 0; background: none; box-shadow: none; }
body[data-view="game"] .game-view[data-layout="stack"] .image-board { grid-template-columns: minmax(0, 1fr); max-width: 620px; gap: 20px; }
body[data-view="game"] .image-card { padding: 0 7px 7px; border: 1px solid #dedfd5; border-radius: 13px; background: #fffdf9; box-shadow: 0 10px 24px #38453412; }
body[data-view="game"] .image-card figcaption { min-height: 38px; color: var(--album-muted); font-size: 11px; white-space: normal; }
body[data-view="game"] .image-card figcaption b { width: 22px; height: 22px; color: var(--album-green); border: 0; border-radius: 5px; background: #e6ece2; font: 13px/1 var(--album-serif); }
body[data-view="game"] .image-board .picture-frame { width: 100%; height: auto; aspect-ratio: var(--picture-ratio, .8); border-radius: 7px; background: #e5e8dd; }
body[data-view="game"] .image-board .picture-svg { width: 100%; height: 100%; }
body[data-view="game"] .zoom-button { min-width: 44px; min-height: 36px; color: var(--album-green); font-size: 11px; }
.board-divider { display: none; }
body[data-view="game"] .board-instruction { margin: 10px 0; color: var(--album-muted); font-size: 11px; }
body[data-view="game"] .instruction-dot { width: 5px; height: 5px; background: var(--album-rose); box-shadow: none; }
body[data-view="game"] .tool-dock { position: relative; inset: auto; display: flex; flex-direction: row; gap: 10px; width: min(460px, 100%); max-width: none; margin: 0 auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; }
body[data-view="game"] .tool-button { position: relative; display: grid; grid-template-columns: 24px auto; grid-template-rows: auto auto; justify-content: center; align-content: center; align-items: center; gap: 0 8px; flex: 1; min-width: 0; min-height: 55px; padding: 8px 13px; color: var(--album-green); border: 1px solid var(--album-line); border-radius: 13px; background: #fffdf7; box-shadow: 0 3px 9px #354a3010; text-shadow: none; }
body[data-view="game"] #hint-button { color: var(--album-green); background: #e6ece2; border-color: #cfdac8; }
body[data-view="game"] .tool-icon { grid-row: 1 / 3; color: inherit; }
body[data-view="game"] .tool-icon .icon, body[data-view="game"] .tool-icon .game-item { width: 23px; height: 23px; color: currentColor; filter: none; }
.game-item .item-face { fill: none; }
.game-item .item-shine { display: none; }
body[data-view="game"] .tool-copy b { font: 500 14px/1.6 var(--album-sans); }
body[data-view="game"] .tool-count { top: -7px; right: 8px; min-width: 19px; height: 19px; padding: 0 4px; color: var(--album-green); border: 1px solid var(--album-line); background: #f8f2e5; font: 600 11px/1 var(--album-sans); box-shadow: none; }
body[data-view="game"] .tool-rule { position: static; grid-column: 2; width: auto; padding: 0; color: var(--album-muted); background: none; border: 0; font-size: 9px; text-align: left; }
body[data-view="game"] .tool-note { position: static; width: auto; height: auto; clip: auto; clip-path: none; margin: 9px auto 0; color: var(--album-muted); font-size: 10px; }
body[data-mode="replay"] #skip-button, body[data-mode="challenge"] #skip-button { display: none; }
body[data-view="game"] .continue-wrap .primary-button { margin: 4px 0 14px; min-height: 44px; font-size: 14px; }
.tutorial-coach, body[data-view="game"] .tutorial-coach { position: relative; inset: auto; width: min(560px, 100%); margin: 8px auto 15px; padding: 12px 14px; color: var(--album-ink); background: #f0eddd; border: 1px solid var(--album-line); border-radius: 12px; box-shadow: none; }
#tutorial-step { color: var(--album-green); background: #fffdf7; border-color: var(--album-line); }
#tutorial-dismiss { color: var(--album-muted); }
.zoom-header { color: var(--album-ink); border-color: var(--album-line); }
.zoom-header h2 { font-family: var(--album-serif); }
.zoom-header p, .zoom-footer { color: var(--album-muted); font-size: 12px; }
.zoom-controls button, .zoom-controls output { color: var(--album-green); border-color: var(--album-line); background: #fffdf7; }
.zoom-status { display: flex; align-items: center; justify-content: center; gap: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zoom-panel { background: #e5e8dd; border-color: var(--album-line); }
.zoom-panel figcaption { height: 32px; color: var(--album-green); background: var(--album-paper); }
.zoom-panel figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 480px) and (orientation: portrait) {
  .zoom-header { min-height: 0; padding: 8px 58px 8px 12px; }
  .zoom-header h2 { font-size: 19px; }
  .zoom-header p { font-size: 11px; line-height: 1.4; }
  .zoom-controls { gap: 4px 6px; padding: 5px 8px; }
  .zoom-controls button { padding-inline: 8px; }
  .zoom-status { flex-basis: 100%; }
  .zoom-pair { gap: 6px; padding: 6px; }
}

@media (orientation: landscape) and (max-height: 480px) {
  .zoom-header p, .zoom-footer { font-size: 10px; }
}

@media (max-width: 900px) {
  body[data-view] .site-header { gap: 14px; padding-inline: 24px; }
  body[data-view] .brand > .brand-name { font-size: 19px; }
  body[data-view] .site-header .theme-option > span { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  body[data-view] .site-header .theme-option { width: 36px; min-width: 36px; padding: 7px; }
}
@media (max-width: 600px) {
  body[data-view] .site-header { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 5px 10px; min-height: 0; padding: 16px 20px 10px; }
  body[data-view] .brand { gap: 8px; }
  body[data-view] .brand > .brand-mark { display: none; }
  body[data-view] .brand > .brand-name { font-size: 19px; letter-spacing: -.04em; }
  body[data-view] .brand-name > span { font-size: 7px; letter-spacing: .1em; }
  body[data-view] .site-header .theme-switcher { grid-column: 1 / -1; grid-row: 2; justify-self: center; margin: 4px 0 0; padding: 2px; }
  body[data-view] .site-header .theme-option { width: auto; min-width: 44px; min-height: 44px; height: 44px; padding: 5px 11px; }
  body[data-view] .site-header .theme-option > span { position: static; clip-path: none; width: auto; height: auto; overflow: visible; font-size: 10px; }
  body[data-view] .site-header .header-actions { gap: 0; }
  body[data-view] .site-header .header-actions .text-button { width: 44px; min-width: 44px; height: 44px; }
  body[data-view] .wallet-chip { gap: 5px; min-height: 36px; padding: 4px 8px; font-size: 11px; }
  body[data-view] .wallet-chip > span:last-child { display: none; }
  body[data-view="game"] .game-view { padding: 14px 14px 22px; }
  body[data-view="game"] .game-heading { grid-template-columns: 44px minmax(0,1fr) 44px; gap: 8px; margin-bottom: 12px; }
  body[data-view="game"] .game-heading h1 { font-size: 24px; }
  body[data-view="game"] .level-banner .eyebrow { font-size: 9px; letter-spacing: .05em; }
  body[data-view="game"] .game-hud { gap: 6px 12px; padding: 10px 12px; margin-bottom: 14px; }
  .hud-stats { gap: 10px; }
  body[data-view="game"] .hud-mistakes { font-size: 10px; gap: 3px; }
  body[data-view="game"] #challenge-pause { min-width: 66px; min-height: 34px; gap: 4px; padding: 4px 6px; }
  body[data-view="game"] #challenge-time { font-size: 16px; }
  #challenge-pause > span { display: none; }
  .hud-discoveries { gap: 6px; }
  .progress-emblem, .progress-label { display: none; }
  body[data-view="game"] .progress-block > p { font-size: 19px; }
  .progress-total { font-size: 13px; }
  .progress-dots { gap: 3px; }
  body[data-view="game"] .progress-dot { width: 15px; height: 15px; font-size: 9px; }
  body[data-view="game"] .hud-clock-note { grid-column: 1 / -1; text-align: center; font-size: 9px; }
  .album-secret { grid-column: 1 / -1; justify-content: center; font-size: 10px; }
  body[data-view="game"] .image-board { gap: 9px; max-width: 100%; }
  body[data-view="game"] .game-view[data-layout="compare"] .image-board { flex: 1; align-items: center; }
  body[data-view="game"] .image-card { padding: 0 4px 4px; border-radius: 10px; }
  body[data-view="game"] .image-card figcaption { min-height: 34px; gap: 2px; font-size: 9px; }
  .image-card figcaption > span { gap: 4px; }
  body[data-view="game"] .image-card figcaption b { width: 16px; height: 18px; font-size: 10px; }
  body[data-view="game"] .zoom-button { gap: 3px; min-height: 44px; padding: 3px; font-size: 9px; }
  .zoom-button .icon { width: 14px; height: 14px; }
  body[data-view="game"] .board-instruction { margin: 12px 0; font-size: 10px; }
  body[data-view="game"] .tool-dock { gap: 9px; }
  body[data-view="game"] .tool-button { min-height: 55px; padding: 7px; gap: 0 5px; }
  body[data-view="game"] .tool-copy b { font-size: 13px; }
  body[data-view="game"] .tool-note { font-size: 9px; }
  body .modal { padding: 28px 22px 24px; }
  body[data-view] #pause-dialog .site-header { display: flex; }
  body[data-view] #pause-dialog .theme-switcher { flex: none; }
  .site-footer { padding: 20px; font-size: 9px; }
}
@media (max-width: 360px) {
  body[data-view] .site-header { gap: 4px; padding-inline: 15px; }
  body[data-view] .brand > .brand-name { font-size: 17px; }
  .hud-stats { gap: 6px; }
  body[data-view="game"] .game-hud { gap: 5px 8px; padding-inline: 8px; }
  .progress-dots { gap: 2px; }
  body[data-view="game"] .progress-dot { width: 13px; height: 13px; }
  body[data-view="game"] .image-card figcaption > span > span { max-width: 55px; overflow-wrap: anywhere; }
}
@media (max-width: 600px) and (orientation: portrait) {
  body[data-view="game"] .game-view[data-layout="compare"] .image-board {
    max-width: min(100%, calc(max(100px, var(--game-height) - 335px) * var(--picture-double-ratio, 1.6) + 29px));
  }
}
@media (min-width: 480px) and (orientation: landscape) and (max-height: 600px) {
  body[data-view="game"] .game-view[data-layout="compare"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(172px, 27vw, 250px);
    grid-template-rows: auto auto auto 1fr auto;
    grid-template-areas: "board heading" "board hud" "board tools" "board note" "instruction continue";
    gap: 8px 14px;
    padding: 10px 14px;
    align-items: start;
  }
  body[data-view="game"] .game-view[data-layout="compare"] > .game-heading {
    grid-area: heading; grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 4px; margin: 0;
  }
  body[data-view="game"] .game-view[data-layout="compare"] .game-heading h1 { font-size: 18px; line-height: 1.2; }
  body[data-view="game"] .game-view[data-layout="compare"] .level-banner .eyebrow { font-size: 8px; letter-spacing: 0; }
  body[data-view="game"] .game-view[data-layout="compare"] > .game-hud {
    grid-area: hud; grid-template-columns: minmax(0, 1fr);
    gap: 4px; margin: 0; padding: 5px 6px;
  }
  body[data-view="game"] .game-view[data-layout="compare"] .hud-stats { gap: 4px; }
  body[data-view="game"] .game-view[data-layout="compare"] .hud-discoveries { justify-content: center; }
  body[data-view="game"] .game-view[data-layout="compare"] #challenge-pause { min-width: 54px; padding-inline: 4px; }
  body[data-view="game"] .game-view[data-layout="compare"] :is(#challenge-pause > span, .progress-emblem, .progress-label, .hud-clock-note) { display: none; }
  body[data-view="game"] .game-view[data-layout="compare"] .album-secret { grid-column: 1 / -1; justify-content: center; font-size: 9px; }
  body[data-view="game"] .game-view[data-layout="compare"] > .loading-panel { grid-area: board; align-self: center; }
  body[data-view="game"] .game-view[data-layout="compare"] > .image-board {
    grid-area: board; gap: 9px;
    max-width: min(100%, calc(max(112px, var(--game-height) - 108px) * var(--picture-double-ratio, 1.6) + 29px));
  }
  body[data-view="game"] .game-view[data-layout="compare"] .image-card { padding: 0 4px 4px; }
  body[data-view="game"] .game-view[data-layout="compare"] .image-card figcaption { gap: 2px; font-size: 10px; }
  body[data-view="game"] .game-view[data-layout="compare"] .zoom-button { min-height: 44px; }
  body[data-view="game"] .game-view[data-layout="compare"] .zoom-button > span { display: none; }
  body[data-view="game"] .game-view[data-layout="compare"] > .tool-dock { grid-area: tools; flex-direction: column; gap: 7px; }
  body[data-view="game"] .game-view[data-layout="compare"] .tool-button { min-height: 48px; padding: 4px; }
  body[data-view="game"] .game-view[data-layout="compare"] > .tool-note { grid-area: note; margin: 0; font-size: 9px; }
  body[data-view="game"] .game-view[data-layout="compare"] > .continue-wrap { grid-area: continue; }
  body[data-view="game"] .game-view[data-layout="compare"] > :is(.board-instruction, .tutorial-coach) { grid-area: instruction; margin: 0 auto; }
}
@media (min-width: 480px) and (orientation: landscape) and (max-height: 380px) {
  body[data-view="game"] .game-view[data-layout="compare"] > .tool-dock { flex-direction: row; gap: 4px; }
  body[data-view="game"] .game-view[data-layout="compare"] .tool-button { grid-template-columns: minmax(0, 1fr); gap: 1px; }
  body[data-view="game"] .game-view[data-layout="compare"] :is(.tool-icon, .tool-rule) { grid-column: 1; grid-row: auto; }
  body[data-view="game"] .game-view[data-layout="compare"] .tool-rule { text-align: center; }
  body[data-view="game"] .game-view[data-layout="compare"] .tool-copy b { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  button, .modal[open] { transition: none; animation: none; }
}


body[data-view="home"] {
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  background: var(--album-paper);
  container-type: normal;
}

body[data-view="home"]::before {
  background: radial-gradient(ellipse at 85% 15%, #f0ddbb69, transparent 48%), radial-gradient(ellipse at 4% 65%, #efd9d13d, transparent 38%);
  filter: none;
  transform: none;
}

body[data-view="home"] main {
  display: block;
  min-height: 0;
  padding: 0;
}

#home-view {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr auto auto;
  align-items: center;
  gap: 16px 64px;
  width: min(1160px, calc(100% - 80px));
  height: auto;
  min-height: min(720px, calc(100svh - 100px));
  margin: 0 auto;
  padding: 50px 0 24px;
  color: var(--album-ink);
  background: none;
  box-shadow: none;
  overflow: visible;
  container-type: normal;
}

#home-view::before, #home-view::after, #home-view .home-scene, #home-view .home-atmosphere { display: none; }

#home-view :where(.hero-copy, .start-actions, .collection-entry, .hero-art, .hero-copy h1, .hero-description, .hero-ribbon, .hero-facts, #save-caption, #collection-caption) {
  position: relative;
  inset: auto;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  border: 0;
}

#home-view .home-chapter-title {
  position: relative;
  inset: auto;
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--album-green);
  background: none;
  box-shadow: none;
  text-shadow: none;
  text-align: left;
  font: 500 14px/1.6 var(--album-sans);
  letter-spacing: .08em;
}

#home-view .home-chapter-title::before {
  content: '';
  display: block;
  flex: none;
  width: 28px;
  height: 1px;
  margin: 0;
  background: var(--album-rose);
}

#home-view .hero-copy { grid-column: 1; grid-row: 2; display: block; padding: 14px 0; }
#home-view .hero-ribbon { display: block; margin-bottom: 14px; color: var(--album-muted); font: 500 10px/1.6 var(--album-sans); letter-spacing: .23em; }
#home-view .hero-copy h1 { color: var(--album-ink); font: 500 clamp(38px, 4.6vw, 64px)/1.17 var(--album-serif); letter-spacing: -.035em; }
#home-view .hero-copy h1 > span { display: inline-block; color: var(--album-green); font-size: .47em; letter-spacing: -.02em; }
#home-view .hero-copy h1 > em { display: inline-block; margin-top: 7px; color: var(--album-ink); font-style: normal; }
#home-view .hero-description { display: block; margin-top: 23px; color: var(--album-muted); font: 14px/1.9 var(--album-sans); }
#home-view .start-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px 14px; max-width: 380px; margin-top: 28px; }

body[data-view="home"] #home-view #start-button,
body[data-view="home"] #home-view #collection-button {
  position: relative;
  inset: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: auto;
  min-height: 56px;
  margin: 0;
  padding: 15px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #fffdf8;
  background: var(--album-green);
  box-shadow: 0 7px 20px #244e4318;
  filter: none;
  text-shadow: none;
  font: 500 17px/1.45 var(--album-sans);
  letter-spacing: .03em;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

body[data-view="home"] #home-view #start-button { grid-column: 1 / -1; }
body[data-view="home"] #home-view #collection-button { min-height: 48px; border-color: var(--album-line); color: var(--album-green); background: #fffefa80; box-shadow: none; font-size: 14px; }
body[data-view="home"] #home-view :is(#start-button, #collection-button)::before,
body[data-view="home"] #home-view :is(#start-button, #collection-button)::after { display: none; }
body[data-view="home"] #home-view :is(#start-button, #collection-button) > .icon { position: static; display: block; flex: none; width: 20px; height: 20px; transform: none; }
body[data-view="home"] #home-view #start-button:hover:not(:disabled) { background: #315f50; transform: translateY(-2px); box-shadow: 0 10px 23px #244e4328; filter: none; }
body[data-view="home"] #home-view #collection-button:hover:not(:disabled) { background: #fffefa; transform: translateY(-2px); box-shadow: 0 6px 16px #5247380d; filter: none; }
body[data-view="home"] #home-view button:active:not(:disabled) { transform: translateY(1px); filter: none; }

#home-view #save-caption, #home-view:has(#start-button:disabled) #save-caption {
  position: relative;
  inset: auto;
  grid-column: 1 / -1;
  width: auto;
  height: auto;
  padding: 0 2px;
  margin: 0 0 7px;
  clip: auto;
  white-space: normal;
  color: var(--album-muted);
  background: none;
  border-radius: 0;
  font: 11px/1.8 var(--album-sans);
  text-align: left;
}

#home-view .collection-entry { grid-column: 1 / -1; display: grid; gap: 9px; }
#home-view #collection-caption { color: var(--album-muted); font: 10px/1.7 var(--album-sans); text-align: left; padding-left: 2px; }
body[data-view="home"] #home-view :is(#home-restart, #retry-catalog, #story-journal) { position: relative; inset: auto; width: auto; height: auto; min-height: 40px; padding: 5px 0; color: var(--album-muted); background: none; border: 0; border-radius: 0; font: 12px/1.5 var(--album-sans); text-align: left; justify-content: flex-start; }
body[data-view="home"] #home-view #home-restart { grid-column: 2; justify-self: end; }
body[data-view="home"] #home-view #story-journal { grid-column: 1; grid-row: 5; }
body[data-view="home"] #home-view #retry-catalog { grid-column: 1 / -1; color: var(--album-rose); }
#home-view .hero-facts { display: flex; align-items: center; flex-wrap: wrap; gap: 17px; padding-top: 19px; margin-top: 18px; border-top: 1px solid var(--album-line); color: var(--album-muted); font: 10px/1.5 var(--album-sans); }
#home-view .hero-facts > span { display: flex; align-items: center; gap: 6px; }
#home-view .hero-facts b { color: var(--album-green); font-size: 15px; font-weight: 500; }
#home-view .hero-facts .icon { width: 15px; height: 15px; color: var(--album-green); }

#home-view .hero-art {
  grid-column: 2;
  grid-row: 1 / 4;
  width: 100%;
  height: 570px;
  min-width: 0;
  display: block;
  pointer-events: none;
}

#home-view .hero-art::before { content: ''; position: absolute; inset: 7% -5% 6%; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse at 60% 40%, #ead8b45c, #edd7ce30 50%, transparent 72%); }
#home-view .portrait-card { position: absolute; display: block; width: 67%; margin: 0; padding: 11px 11px 17px; border: 1px solid #e9e2d6; border-radius: 3px; background: #fffefa; box-shadow: 0 22px 48px #5844301c, 0 4px 12px #5844300a; }
#home-view .portrait-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 1px; }
#home-view .portrait-card figcaption { display: block; margin-top: 13px; color: var(--album-muted); font: 11px/1.5 var(--album-sans); text-align: center; letter-spacing: .04em; }
#home-view .portrait-back { z-index: 1; left: 27%; top: 8%; transform: rotate(11deg); opacity: .85; }
#home-view .portrait-middle { z-index: 2; left: 0; top: 10%; transform: rotate(-10deg); opacity: .92; }
#home-view .portrait-front { z-index: 3; left: 15%; top: 0; transform: rotate(3deg); }
#home-view .portrait-front::before { content: ''; position: absolute; z-index: 1; top: -11px; left: calc(50% - 34px); width: 68px; height: 22px; border: 1px solid #d6cbb34d; background: #e8dcc1b8; transform: rotate(-6deg); box-shadow: 0 1px 3px #5144320a; }
#home-view .art-note { position: absolute; right: -2%; bottom: 5%; z-index: 4; display: flex; align-items: center; gap: 10px; max-width: 210px; padding: 15px 18px; color: var(--album-green); background: #fffdf5ed; border: 1px solid var(--album-line); box-shadow: 0 10px 24px #5247380b; transform: rotate(-4deg); font: 13px/1.6 var(--album-serif); }
#home-view .note-star { color: var(--album-rose); font-size: 30px; }
#home-view .edition-stamp { position: absolute; bottom: 0; left: 6%; color: var(--album-muted); font: 8px/1.8 var(--album-sans); letter-spacing: .16em; }
#home-view .edition-stamp b { font-weight: 500; }

#home-view .home-chapters { position: relative; inset: auto; grid-column: 1; grid-row: 3; display: flex; align-items: center; gap: 9px; width: auto; height: auto; margin: 0; padding: 0; list-style: none; pointer-events: none; }
#home-view .home-chapters li { position: relative; inset: auto; display: grid; place-items: center; width: 32px; height: 32px; min-width: 32px; padding: 0; border: 1px solid var(--album-line); border-radius: 50%; color: var(--album-muted); background: none; box-shadow: none; outline: none; filter: none; transform: none; font: 11px/1 var(--album-sans); }
#home-view .home-chapters li[data-current="true"] { border-color: var(--album-green); outline: none; color: #fffdf8; background: var(--album-green); box-shadow: 0 3px 9px #244e4314; }
#home-view .home-chapters li[data-collected="true"]:not([data-current="true"]) { border-color: var(--album-rose); color: var(--album-rose); }
#home-view .home-bottom { position: relative; inset: auto; grid-column: 2; grid-row: 4; display: block; width: auto; height: auto; margin: 0; padding: 0; color: var(--album-muted); background: none; text-align: right; font: 11px/1.8 var(--album-serif); letter-spacing: .04em; }

#home-view .home-nav { position: relative; inset: auto; grid-column: 1; grid-row: 4; display: flex; align-items: center; gap: 4px; width: max-content; max-width: 100%; min-height: 52px; padding: 4px; border: 1px solid var(--album-line); border-radius: 999px; background: #fffefa96; pointer-events: auto; }
#home-view .home-nav button { position: relative; inset: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; height: auto; min-width: 100px; min-height: 42px; padding: 9px 18px; border: 0; border-radius: 999px; color: var(--album-muted); background: none; box-shadow: none; text-shadow: none; filter: none; transform: none; font: 12px/1.5 var(--album-sans); transition: background .2s ease, color .2s ease; }
#home-view .home-nav button[aria-current="page"] { color: var(--album-green); background: #e6ece4; text-shadow: none; }
#home-view .home-nav button:hover:not(:disabled) { color: var(--album-green); background: #e6ece482; filter: none; }
#home-view .home-nav button > [data-i18n] { position: static; inset: auto; }
#home-view .home-nav .home-nav-icon { position: static; inset: auto; display: block; width: 18px; height: 18px; transform: none; }

@media (min-width: 900px) and (min-height: 850px) {
  #home-view { padding-top: 70px; gap: 24px 84px; }
  #home-view .hero-art { height: 640px; }
}

@media (max-width: 899px) {
  #home-view { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto auto; align-items: center; gap: 16px 12px; width: min(570px, calc(100% - 40px)); min-height: 0; padding: 24px 0 20px; }
  #home-view .hero-art { grid-column: 1 / -1; grid-row: 1; justify-self: center; width: min(100%, 390px); height: 385px; }
  #home-view .portrait-card { width: 64%; padding: 8px 8px 12px; }
  #home-view .portrait-card figcaption { margin-top: 9px; font-size: 10px; }
  #home-view .portrait-front { left: 17%; top: 0; }
  #home-view .portrait-middle { left: 3%; top: 8%; }
  #home-view .portrait-back { left: 31%; top: 7%; }
  #home-view .art-note { right: 0; bottom: 8%; padding: 10px 12px; font-size: 11px; }
  #home-view .note-star { font-size: 23px; }
  #home-view .edition-stamp { bottom: 1%; left: 3%; font-size: 7px; }
  #home-view .hero-copy { grid-column: 1 / -1; grid-row: 2; padding: 0; text-align: center; }
  #home-view .hero-ribbon { margin-bottom: 6px; font-size: 9px; }
  #home-view .hero-copy h1 { font-size: clamp(30px, 7vw, 43px); line-height: 1.15; }
  #home-view .hero-copy h1 > span { font-size: .48em; }
  #home-view .hero-copy h1 > em { margin-top: 5px; }
  #home-view .hero-description { margin-top: 12px; font-size: 12px; line-height: 1.8; }
  #home-view .start-actions { max-width: 390px; margin: 18px auto 0; gap: 6px 10px; text-align: left; }
  #home-view .hero-facts { display: none; }
  #home-view .home-chapter-title { grid-column: 1; grid-row: 3; font-size: 12px; letter-spacing: .02em; }
  #home-view .home-chapter-title::before { width: 18px; }
  #home-view .home-chapters { grid-column: 2; grid-row: 3; gap: 6px; }
  #home-view .home-chapters li { width: 28px; height: 28px; min-width: 28px; font-size: 10px; }
  #home-view .home-bottom { display: none; }
  #home-view .home-nav { grid-column: 1 / -1; grid-row: 4; justify-self: center; margin-top: 5px; }
  #home-view .home-nav button { min-width: 118px; }
}

@media (max-width: 480px) {
  #home-view { width: calc(100% - 36px); padding-top: 16px; gap: 14px 10px; }
  #home-view .hero-art { width: min(100%, 330px); height: 325px; }
  #home-view .art-note { bottom: 4%; max-width: 165px; }
  #home-view .hero-description > br { display: none; }
  #home-view .hero-description span + span::before { content: ' '; }
  body[data-view="home"] #home-view #start-button { min-height: 52px; padding: 13px 18px; font-size: 16px; }
  body[data-view="home"] #home-view #collection-button { min-height: 46px; padding: 12px 18px; font-size: 13px; }
  #home-view #save-caption, #home-view:has(#start-button:disabled) #save-caption { margin-bottom: 4px; font-size: 10px; }
  #home-view #collection-caption { font-size: 9px; }
  body[data-view="home"] #home-view :is(#home-restart, #story-journal) { min-height: 36px; font-size: 11px; }
}

@media (max-width: 360px) {
  #home-view { width: calc(100% - 28px); padding-top: 12px; }
  #home-view .hero-art { height: 285px; }
  #home-view .portrait-card { width: 64%; padding: 7px 7px 10px; }
  #home-view .art-note { padding: 8px 10px; max-width: 150px; font-size: 10px; }
  #home-view .edition-stamp { display: none; }
  #home-view .hero-copy h1 { font-size: 29px; }
  #home-view .hero-description { font-size: 11px; }
  #home-view .home-chapter-title { font-size: 11px; }
  #home-view .home-nav button { min-width: 104px; }
}

@media (max-width: 600px) and (orientation: portrait) and (max-height: 740px) {
  #home-view .hero-art { width: min(100%, clamp(112px, calc(100svh - 392px), 330px)); height: auto; aspect-ratio: 1; }
  #home-view .hero-description { margin-top: 8px; }
  #home-view .start-actions { margin-top: 12px; }
}

@media (max-width: 600px) and (orientation: portrait) and (max-height: 620px) {
  #home-view { gap: 10px; }
  #home-view .start-actions { margin-top: 8px; }
  #home-view .art-note, #home-view .edition-stamp { display: none; }
  #home-view .portrait-card figcaption { margin-top: 5px; font-size: 8px; }
}

@media (min-width: 480px) and (max-width: 899px) and (orientation: landscape) and (max-height: 520px) {
  body[data-view="home"] .site-header { display: flex; gap: 8px; min-height: 0; padding: 6px 16px; }
  body[data-view="home"] .site-header .theme-switcher { margin: 0 0 0 auto; }
  body[data-view="home"] .site-header .theme-option { width: 44px; min-height: 44px; padding: 4px; }
  body[data-view="home"] .site-header .theme-option > span { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  #home-view {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    width: calc(100% - 40px); padding-block: 12px;
  }
  #home-view .hero-art { grid-column: 2; grid-row: 1; width: min(100%, 62svh); height: auto; aspect-ratio: 1; }
  #home-view .hero-copy { grid-column: 1; grid-row: 1; text-align: left; }
  #home-view .hero-copy h1 { font-size: clamp(25px, 4.4vw, 38px); }
  #home-view .hero-description { margin-top: 6px; font-size: 11px; line-height: 1.55; }
  #home-view .hero-description > br { display: none; }
  #home-view .hero-description span + span::before { content: ' '; }
  #home-view .start-actions { margin: 8px 0 0; }
  #home-view .home-chapter-title, #home-view .home-chapters { grid-row: 2; }
  #home-view .home-chapters { justify-self: center; }
  #home-view .home-nav { grid-row: 3; }
  #home-view .edition-stamp, #home-view .art-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #home-view *, #home-view *::before, #home-view *::after { animation: none; transition: none; }
}


body[data-view="collection"] .collection-view { width: min(1180px, 100%); margin: 0 auto; padding: 34px 40px 64px; color: var(--album-ink); background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.collection-topline { gap: 16px; }
.collection-topline .eyebrow { color: var(--album-muted); font-size: 10px; letter-spacing: .18em; }
.collection-heading { align-items: center; margin: 26px 0 22px; gap: 32px; }
body[data-view="collection"] .collection-heading h1 { color: var(--album-ink); font: 400 clamp(32px, 4.3vw, 52px)/1.2 var(--album-serif); letter-spacing: -.035em; }
.collection-heading h1 em { display: block; color: var(--album-rose); }
body[data-view="collection"] .collection-heading p { max-width: 520px; margin-top: 15px; color: var(--album-muted); font-size: 14px; line-height: 1.7; }
.collection-heading strong { max-width: 300px; padding: 16px 20px; color: var(--album-green); background: #e9eee7; border: 0; border-radius: 16px; font-size: 13px; font-weight: 500; line-height: 1.8; }
.collection-view > [data-open-wallet] { margin-bottom: 20px; padding-inline: 0; color: var(--album-green); font-size: 13px; text-decoration: underline; text-underline-offset: 5px; }
.chapter-journey { margin: 0 0 32px; padding-block: 24px; border-block: 1px solid var(--album-line); }
.chapter-trail-heading { align-items: center; margin-bottom: 17px; gap: 10px; }
.chapter-trail-heading h2 { color: var(--album-ink); font: 400 22px/1.4 var(--album-serif); }
#chapter-progress { color: var(--album-muted); font-size: 12px; }
.chapter-trail { display: flex; gap: 10px; padding: 2px 2px 12px; margin: 0 -2px -12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #c4cbbf transparent; }
.chapter-trail > li { flex: 0 0 150px; scroll-snap-align: start; }
body[data-view="collection"] .chapter-stop { align-items: flex-start; min-height: 100px; gap: 7px; padding: 16px; border: 1px solid var(--album-line); border-radius: 13px; color: var(--album-ink); background: #fffdf8; box-shadow: none; text-align: left; }
.chapter-stop .chapter-stop-number { display: inline; width: auto; height: auto; border: 0; color: var(--album-rose); font: 12px/1 var(--album-sans); letter-spacing: .13em; }
.chapter-stop .chapter-stop-title { font: 400 16px/1.4 var(--album-serif); }
.chapter-stop .chapter-stop-status { color: var(--album-muted); font-size: 10px; line-height: 1.4; }
body[data-view="collection"] .chapter-stop[data-current="true"] { border: 1px solid var(--album-green); background: #eaf0e8; box-shadow: inset 0 0 0 2px #fffdf86e; }
body[data-view="collection"] .chapter-stop[data-completed="true"] { border-color: #acb9a7; }
body[data-view="collection"] .chapter-stop[data-locked="true"] { opacity: .55; }
body[data-view="collection"] .chapter-stop:hover:not(:disabled) { background: #eef1e9; border-color: var(--album-green); transform: translateY(-2px); }
.collection-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 26px; }
body[data-view="collection"] .collection-card { min-width: 0; padding: 11px 11px 0; border: 1px solid #e7e0d4; border-radius: 8px; background: #fffefa; box-shadow: 0 12px 32px #4c49300d; }
body[data-view="collection"] .collection-card[data-collected="true"] { border-color: #cbd4c4; box-shadow: 0 12px 32px #4c49300d; }
.collection-card > img { width: 100%; height: auto; max-height: 420px; aspect-ratio: 4/5; object-fit: contain; border-radius: 3px; background: #f0ece2; }
.collection-card[data-locked="true"] > img { opacity: .65; filter: saturate(.7); }
.collection-card-body { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px 9px 22px; gap: 11px; }
.collection-card h2 { color: var(--album-ink); font: 400 24px/1.35 var(--album-serif); text-align: left; letter-spacing: -.02em; }
.collection-card .star-rating { margin: 0; font-size: 19px; line-height: 1.2; letter-spacing: 3px; text-align: left; color: #ae874f; }
body[data-view="collection"] .collection-detail { color: var(--album-muted); font-size: 12px; line-height: 1.6; text-align: left; }
.collection-card .collection-letter { margin: 3px 0 6px; padding: 14px 0; border: 0; border-block: 1px solid var(--album-line); border-radius: 0; background: transparent; color: var(--album-muted); box-shadow: none; font: 13px/1.8 var(--album-sans); }
.collection-letter > .keepsake-stamp { min-width: 0; min-height: 0; margin: 2px 0 5px 8px; padding: 3px 6px; border: 1px solid #d8c5b4; border-radius: 3px; background: transparent; color: #94745b; box-shadow: none; font: 9px/1.4 var(--album-sans); transform: rotate(-4deg); }
.collection-card .challenge-best { grid-column: 1 / -1; margin: 0 0 3px; color: var(--album-green); font-size: 12px; }
.collection-card button { min-height: 46px; padding: 11px 10px; font: 500 13px/1.5 var(--album-sans); border-radius: 11px; }
.collection-card .collection-play { min-height: 49px; font: 500 15px/1.4 var(--album-sans); }
.collection-hidden-reward { position: relative; gap: 7px; margin-top: 8px; padding: 15px; border: 1px dashed #c7cabb; border-radius: 12px; background: #f4f3ec; color: var(--album-ink); }
.collection-hidden-reward > strong { color: var(--album-green); font: 400 18px/1.4 var(--album-serif); }
.collection-hidden-reward .hidden-photo-hint { color: var(--album-muted); font-size: 12px; line-height: 1.7; }
.collection-hidden-reward[data-unlocked="true"] { border: 1px solid #bfceba; background: #edf2e9; box-shadow: none; }
.collection-hidden-reward .collection-hidden-art { margin-top: 4px; border-color: #c1cbb9; color: var(--album-green); background: #fffdf8; }
.collection-hidden-art:hover:not(:disabled) { box-shadow: 0 5px 14px #244e4312; }
body[data-view="collection"] .collection-rules { margin-top: 30px; padding: 25px 28px; color: var(--album-muted); border: 1px solid var(--album-line); border-radius: 16px; background: #f1f0e8; font-size: 13px; line-height: 1.8; }
.collection-rules h2 { margin-bottom: 12px; color: var(--album-ink); font: 400 24px/1.4 var(--album-serif); }
.hidden-photo-rule { color: var(--album-green); font-weight: 500; }
body .result-modal { width: min(650px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 30px; border: 1px solid #ddd5c6; border-radius: 22px; background: var(--album-paper); color: var(--album-ink); box-shadow: 0 24px 100px #31423729; }
.result-modal .coin-reward { margin: 0 0 17px; padding: 0 0 13px; color: var(--album-muted); border: 0; border-bottom: 1px solid var(--album-line); border-radius: 0; background: transparent; font-size: 12px; }
.result-modal .hidden-photo-unlocked { margin-bottom: 22px; padding: 13px 15px; color: var(--album-green); border: 1px solid #cbd6c3; border-radius: 12px; background: #eaf0e5; font-size: 13px; }
.result-book { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 28px; }
.result-artwork { padding: 10px 0 14px; }
.result-photo-mat { padding: 9px 9px 23px; border: 1px solid #ded6c7; border-radius: 3px; background: #fffefb; transform: rotate(-3deg); box-shadow: 0 10px 22px #403d2721; }
.result-photo-mat::before { inset: 6px -6px -5px 5px; border-color: #e6dccf; background: #fbf4e8; transform: rotate(5deg); }
#result-art { max-height: 300px; border-radius: 2px; background: #eee7da; }
.result-artwork > .keepsake-stamp { right: -7px; bottom: 3px; width: 34px; height: 34px; border: 1px solid #9aaf98; color: var(--album-green); background: #e5ecd9; box-shadow: none; }
.result-artwork > .keepsake-stamp .icon { width: 19px; height: 19px; }
.result-story .eyebrow { font-size: 9px; line-height: 1.6; letter-spacing: .14em; color: var(--album-muted); }
body .result-story #result-title { margin: 10px 0; font: 400 clamp(26px, 3vw, 34px)/1.2 var(--album-serif); color: var(--album-ink); letter-spacing: -.03em; }
.result-story #result-chapter { color: var(--album-muted); font: 14px/1.6 var(--album-sans); }
.result-story #result-stars { margin: 13px 0; color: #ae874f; font-size: 25px; line-height: 1.2; letter-spacing: 4px; }
body .result-story #result-description { color: var(--album-muted); font-size: 13px; line-height: 1.8; }
body .result-story #result-reward { color: var(--album-green); font-size: 12px; line-height: 1.8; }
.result-modal .result-letter { margin-top: 23px; padding: 19px 21px; border: 0; border-radius: 12px; background: #f0ebdf; color: var(--album-ink); box-shadow: none; }
.result-letter .letter-caption { color: #8d7961; font-size: 10px; letter-spacing: .12em; }
body .result-letter #result-keepsake { color: var(--album-ink); font: 15px/1.8 var(--album-serif); }
.result-summary { margin: 20px 0 0; padding: 17px 0; border-color: var(--album-line); }
.result-summary > div + div { border-color: var(--album-line); }
.result-summary dt { color: var(--album-muted); font-size: 11px; line-height: 1.6; }
.result-summary dd { margin-top: 7px; color: var(--album-green); font: 24px/1.2 var(--album-serif); }
.result-modal .result-dots { margin: 16px 0; }
.result-modal .result-dots span { background: #9aad92; }
.result-modal .result-dots span.revealed { background: #c4a67a; }
.result-next-chapter { gap: 13px; margin-bottom: 20px; padding: 12px 15px; border-color: var(--album-line); border-radius: 12px; background: #f1f0e9; }
#result-next-preview { border: 0; border-radius: 4px; }
.result-next-chapter span { font-size: 10px; color: var(--album-muted); }
#result-next-title { font: 400 18px/1.4 var(--album-serif); color: var(--album-ink); }
.result-next-chapter > .icon { color: var(--album-green); }
.result-modal #next-button { min-height: 51px; border-radius: 12px; font: 500 15px/1.4 var(--album-sans); }
.result-modal #inspect-button { margin-top: 7px; font-size: 12px; color: var(--album-muted); }
.result-modal[open] .result-photo-mat { animation: sunlit-photo-reveal .5s cubic-bezier(.2,.7,.2,1) both; }
.result-modal[open] .result-letter { animation: sunlit-letter-reveal .4s .12s ease-out both; }
body #art-dialog { width: min(660px, calc(100vw - 32px)); padding: 26px; border: 1px solid #ddd5c6; border-radius: 20px; background: var(--album-paper); color: var(--album-ink); box-shadow: 0 24px 100px #31423729; }
#art-dialog header { margin-bottom: 22px; padding-right: 50px; }
#art-dialog #art-eyebrow { color: var(--album-muted); font-size: 10px; letter-spacing: .16em; }
body #art-dialog #art-title { margin-top: 8px; color: var(--album-ink); font: 400 clamp(24px, 4vw, 32px)/1.3 var(--album-serif); }
#art-dialog > #art-image { width: auto; max-width: 100%; max-height: 64svh; margin: 0 auto; border: 1px solid #e5ddce; border-radius: 3px; object-fit: contain; box-shadow: 0 8px 22px #403d2710; }
body #art-dialog #art-placeholder { margin: 20px 0 0; padding: 15px 17px; border: 1px solid #d5d9cb; border-radius: 12px; background: #eef0e7; color: var(--album-green); font-size: 13px; line-height: 1.8; }
body #art-dialog #art-letter { margin: 20px auto 0; padding: 20px; border: 0; border-radius: 12px; background: #f0ebdf; box-shadow: none; color: var(--album-ink); font: 15px/1.9 var(--album-serif); }
body #art-dialog #art-caption { margin-top: 18px; color: var(--album-muted); font-size: 12px; line-height: 1.8; }
.wallet-frame { border-color: var(--album-line); border-radius: 14px; padding: 14px; background: #fffdf8; }
.wallet-frame h3 { color: var(--album-ink); font: 400 18px/1.5 var(--album-serif); }
.wallet-frame button { font-size: 13px; border-radius: 10px; }
body[data-view="finish"] .finish-view { color: var(--album-ink); }
body[data-view="finish"] .finish-view h1 { color: var(--album-ink); font: 400 clamp(32px, 5vw, 48px)/1.2 var(--album-serif); }
body[data-view="finish"] .finish-chapter { border-color: var(--album-line); border-radius: 7px; background: #fffdfa; box-shadow: 0 8px 20px #4c49300d; }
.finish-view .finish-emblem { border: 1px solid #cbd6c3; background: #eaf0e5; color: var(--album-green); box-shadow: none; }
.finish-stats strong { color: var(--album-green); }
@keyframes sunlit-photo-reveal { from { opacity: 0; transform: rotate(-5deg) translateY(10px); } to { opacity: 1; transform: rotate(-3deg) translateY(0); } }
@keyframes sunlit-letter-reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1000px) and (min-width: 761px) {
  body[data-view="collection"] .collection-view { padding-inline: 28px; }
  .collection-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}
@media (max-width: 760px) {
  body[data-view="collection"] .collection-view { width: 100%; margin: 0; padding: 22px 20px 38px; overflow: hidden; }
  body[data-view="collection"] .site-header .theme-switcher { display: none; }
  .collection-topline .eyebrow { font-size: 8px; letter-spacing: .12em; }
  .collection-heading { display: block; margin: 16px 0 12px; text-align: left; }
  body[data-view="collection"] .collection-heading h1 { font-size: 30px; line-height: 1.2; }
  .collection-heading h1 em { display: block; }
  body[data-view="collection"] .collection-heading p { margin-top: 8px; font-size: 13px; }
  .collection-heading strong { display: inline-block; margin-top: 10px; max-width: 100%; padding: 10px 14px; font-size: 11px; }
  .collection-view > [data-open-wallet] { margin-bottom: 0; }
  .chapter-journey { margin-bottom: 18px; padding-block: 14px; }
  .chapter-trail-heading h2 { font-size: 21px; }
  #chapter-progress { font-size: 11px; }
  .chapter-trail > li { flex-basis: 138px; }
  body[data-view="collection"] .chapter-stop { min-height: 94px; padding: 14px; }
  .chapter-stop .chapter-stop-title { font-size: 15px; }
  .collection-cards { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 3px 22px; margin-inline: -3px; scrollbar-width: thin; scrollbar-color: #c4cbbf transparent; }
  body[data-view="collection"] .collection-card { flex: 0 0 91%; scroll-snap-align: center; border-radius: 7px; padding: 10px 10px 0; }
  .collection-card > img { height: auto; max-height: 370px; aspect-ratio: 4/5; border-radius: 2px; }
  .collection-card-body { padding: 19px 7px 20px; gap: 11px; }
  .collection-card h2 { font-size: 23px; }
  .collection-card button { font-size: 12px; }
  .collection-card .collection-play { font-size: 15px; }
  body[data-view="collection"] .collection-rules { margin-top: 24px; padding: 22px; font-size: 12px; }
  .collection-rules h2 { font-size: 23px; }
  body .result-modal { width: calc(100vw - 24px); max-width: calc(100vw - 24px); max-height: calc(100svh - 24px); padding: 22px 20px; border-radius: 19px; }
  .result-book { grid-template-columns: minmax(0, .78fr) minmax(0, 1fr); gap: 22px; }
  .result-photo-mat { padding: 6px 6px 18px; }
  .result-story .eyebrow { font-size: 8px; letter-spacing: .1em; }
  body .result-story #result-title { font-size: 26px; margin-top: 8px; }
  .result-story #result-chapter { font-size: 12px; }
  .result-story #result-stars { font-size: 22px; letter-spacing: 2px; }
  body .result-story #result-description, body .result-story #result-reward { font-size: 11px; line-height: 1.8; }
  .result-modal .result-letter { padding: 17px; margin-top: 19px; }
  body .result-letter #result-keepsake { font-size: 14px; }
  .result-summary dt { font-size: 10px; }
  .result-summary dd { font-size: 22px; }
  body #art-dialog { width: calc(100vw - 24px); max-width: calc(100vw - 24px); padding: 22px; border-radius: 18px; }
  #art-dialog > #art-image { max-height: 60svh; }
  body #art-dialog #art-title { font-size: 26px; }
  body #art-dialog #art-placeholder { padding: 14px; font-size: 12px; }
  .wallet-frames { gap: 12px; }
  .wallet-frame { padding: 11px; }
}
@media (max-width: 350px) {
  body[data-view="collection"] .collection-view { padding-inline: 16px; }
  .collection-topline .eyebrow { max-width: 140px; text-align: right; }
  body[data-view="collection"] .collection-heading h1 { font-size: 30px; }
  body[data-view="collection"] .collection-card { flex-basis: 95%; }
  body .result-modal { padding: 20px 17px; }
  .result-book { gap: 17px; }
  body .result-story #result-title { font-size: 23px; }
  body #art-dialog { padding: 20px 17px; }
  body #art-dialog #art-title { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .result-modal[open] .result-photo-mat, .result-modal[open] .result-letter { animation: none; }
  .chapter-stop { transition: none; }
}


body[data-frame="rose"] :is(#art-dialog > #art-image, .result-photo-mat, .collection-card > img) { border: 8px double var(--frame-rose); border-radius: 18px 4px; }
body[data-frame="moon"] :is(#art-dialog > #art-image, .result-photo-mat, .collection-card > img) { border: 8px ridge var(--frame-moon); border-radius: 18px; }
body[data-frame="gilded"] :is(#art-dialog > #art-image, .result-photo-mat, .collection-card > img) { border: 10px double var(--frame-gilded); box-shadow: 0 0 0 2px var(--coin-dark), 0 6px 14px #0003; }
