:root {
  --paper: #fff9f0; --surface: #fff; --ink: #302443; --muted: #6b6078;
  --accent: #6941c6; --accent-hover: #5430a6; --lilac: #eee5ff; --peach: #ffe1ce;
  --border: #ded5e9; --strong-border: #8d7c9e;
  --hit: #d9f0ea; --hit-text: #07594c; --near: #f8e9b9; --near-text: #6f4900;
  --miss: #edf0f3; --miss-text: #46515e; --risk: #8b1a12;
}
.chip-unknown { background: #f6f2fa; color: #6b6078; border: 1px dashed #b9adc8; }
.deduction-note { margin: .8rem 0 0; padding: .65rem .85rem; background: #f6f2ff; border-radius: .7rem; color: #5430a6; font-size: .85rem; }
.history-toggle { display: none; }
.option-copy { min-width: 0; }
.option-copy small { display: block; color: var(--muted); font-size: .72rem; margin-top: .15rem; }
.answer-intro { max-width: 42rem; line-height: 1.65; }
.reveal h2 a { color: inherit; text-decoration-color: #c9b7e9; }
.clue-key a { margin-left: auto; font-size: .72rem; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); line-height: 1.55; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button, .button { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.15; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.site-header { max-width: 68rem; margin: auto; min-height: 6rem; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; flex-shrink: 0; min-height: 44px; }
.brand img { width: 174px; height: auto; }
.brand-cake { font-size: 1.9rem; line-height: 1; }
.site-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; }
.site-header nav a { display: inline-flex; align-items: center; justify-content: center; padding: .55rem 1rem; min-height: 44px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .875rem; font-weight: 650; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--accent); background: var(--lilac); }
main { max-width: 68rem; margin: auto; padding: 0 1.5rem 3.5rem; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 2rem; align-items: center; padding: 2.75rem 1rem 2.75rem 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .11em; font-size: .67rem; font-weight: 750; color: var(--muted); margin-bottom: 1rem; }
.little-star { color: var(--accent); font-size: 1rem; margin-right: .3rem; }
.intro h1 { font-size: clamp(2.5rem, 5vw, 4.25rem); font-weight: 850; letter-spacing: -.06em; line-height: 1.06; margin: 0 0 1.2rem; }
.intro h1 > span { color: var(--accent); }
.intro-description { font-size: 1.03rem; color: var(--muted); margin-bottom: 1.15rem; line-height: 1.65; }
.date-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; font-size: .75rem; color: var(--muted); }
.date-pill { background: var(--peach); color: #743e25; border: 1px solid #f0c9b1; border-radius: 999px; padding: .3rem .75rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.birthday-card { position: relative; text-align: center; background: var(--lilac); border: 1.5px solid #c9b7e9; border-radius: 1.75rem; padding: 1.3rem .8rem 1.8rem; transform: rotate(5deg); box-shadow: 6px 7px 0 #e7dcc7; }
.birthday-card::before, .birthday-card::after { content: ''; position: absolute; background: #dc7855; width: .4rem; height: 1rem; border-radius: 3px; transform: rotate(-26deg); }
.birthday-card::before { left: 2rem; top: 5rem; }
.birthday-card::after { right: 2.5rem; bottom: 4rem; transform: rotate(35deg); background: #6941c6; }
.card-caption { font-size: .62rem; letter-spacing: .19em; font-weight: 800; color: #634b83; margin: .25rem 0 .3rem; }
.hero-cake { display: block; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 5.8rem; line-height: 1.55; transform: rotate(-5deg); }
.card-date { font-size: 1.55rem; font-weight: 800; letter-spacing: -.04em; margin: .2rem 0 0; }
.card-sticker { position: absolute; bottom: -.8rem; left: 50%; transform: translateX(-50%) rotate(-7deg); background: #fff3b8; border: 1px solid #d9be57; color: #69511d; border-radius: .45rem; padding: .4rem .65rem; font-size: .67rem; font-weight: 750; white-space: nowrap; }
.card-spark { position: absolute; color: var(--accent); font-size: 2.2rem; }
.spark-one { right: 1.4rem; top: 2.6rem; }
.spark-two { left: 1.3rem; bottom: 3.8rem; font-size: 1.25rem; color: #99542c; }
.game-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 1.5rem; padding: 1.75rem; box-shadow: 0 5px 0 #eee5da; }
.play-topline { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.play-invitation { color: var(--accent); font-weight: 700; font-size: .875rem; margin: 0; }
.play-invitation > span[aria-hidden] { font-size: 1.5rem; vertical-align: middle; margin-right: .4rem; }
.chances { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; min-width: 0; max-width: 100%; }
#remaining { margin: 0; color: var(--muted); font-size: .75rem; font-weight: 600; }
.candles { display: flex; gap: .32rem; align-items: end; padding-top: .4rem; }
.candle { display: block; position: relative; width: .35rem; height: .85rem; background: var(--accent); border-radius: 2px; }
.candle::before { content: ''; position: absolute; height: .32rem; width: .22rem; border-radius: 70% 20% 70% 30%; background: #c57527; left: .065rem; top: -.43rem; }
.candle.spent { background: #d5cddd; }
.candle.spent::before { opacity: 0; }
.guess-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .65rem .75rem; align-items: end; }
.guess-form label { grid-column: 1/-1; font-weight: 750; font-size: .875rem; }
.combobox-wrap { position: relative; min-width: 0; }
.guess-form input[type=search] { min-width: 0; width: 100%; min-height: 3.5rem; background: #fcfaff; border: 1.5px solid var(--strong-border); border-radius: .875rem; color: var(--ink); padding: .75rem 1rem .75rem 2.8rem; }
.guess-form input::placeholder { color: var(--muted); opacity: 1; }
.search-icon { position: absolute; left: 1.05rem; top: 1.13rem; width: .85rem; height: .85rem; border: 2px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search-icon::after { content: ''; position: absolute; width: .4rem; height: 2px; background: var(--muted); top: .6rem; left: .55rem; transform: rotate(45deg); }
.guess-form button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 1.15rem; min-height: 3.5rem; max-width: 100%; background: var(--accent); color: white; border: 1px solid var(--accent); border-radius: .875rem; padding: .75rem 1.4rem; font-weight: 700; text-decoration: none; box-shadow: 0 3px 0 #442188; transition: background .15s, transform .15s; }
.guess-form button:hover, .button:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.guess-form button:active, .button:active { transform: translateY(1px); box-shadow: 0 1px 0 #442188; }
.search-hint { grid-column: 1/-1; color: var(--muted); font-size: .75rem; margin: .05rem 0 0; }
button:disabled { opacity: .65; cursor: wait; transform: none; }
#suggestions { position: absolute; z-index: 5; top: calc(100% + .35rem); left: 0; right: 0; margin: 0; padding: .35rem; background: #fff; border: 1px solid var(--strong-border); border-radius: .875rem; list-style: none; max-height: 17rem; overflow: auto; box-shadow: 0 12px 30px #30244324; }
#suggestions li { padding: .7rem .8rem; min-height: 44px; border-radius: .5rem; cursor: pointer; }
#suggestions li[aria-selected=true], #suggestions li:hover { background: var(--lilac); color: var(--accent-hover); outline: 2px solid var(--accent); outline-offset: -2px; }
#game-status { font-size: .8rem; color: var(--accent); }
#game-status:not(:empty) { margin-top: .65rem; }
.board-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.5rem 0 1rem; padding-top: 1.25rem; border-top: 1px solid #ede7f2; }
.board-heading h2 { font-size: 1rem; margin: 0; letter-spacing: -.025em; }
.board-heading > span { color: var(--muted); font-size: .7rem; }
.empty-clues { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: .5rem; }
.empty-clues > div { min-width: 0; padding: .65rem .2rem; text-align: center; border: 1px dashed #c6b9d7; border-radius: .75rem; background: #faf7ff; }
.empty-clues > div:nth-child(3n+2) { background: #fff8ed; border-color: #dfc6a4; }
.empty-clues > div:nth-child(3n) { background: #f2faf5; border-color: #b0cdbb; }
.empty-clues span { display: block; color: var(--muted); font-size: .65rem; font-weight: 650; }
.empty-clues strong { display: block; color: #827292; font-size: 1.75rem; font-weight: 600; line-height: 1.5; }
.empty-state > p { text-align: center; font-weight: 650; font-size: .85rem; margin: 1.15rem 0 .75rem; }
.empty-state > p > span { display: block; color: var(--muted); font-weight: 400; font-size: .75rem; margin-top: .2rem; }
.clue-key { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; margin-top: 1rem; font-size: .68rem; font-weight: 650; }
.clue-key > span { border-radius: 999px; padding: .22rem .65rem; }
.key-hit, .chip-hit { background: var(--hit); color: var(--hit-text); }
.key-near, .chip-near { background: var(--near); color: var(--near-text); }
.key-miss, .chip-miss { background: var(--miss); color: var(--miss-text); }
.table-wrap { width: 100%; }
.guess-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: .35rem; font-variant-numeric: tabular-nums; }
.guess-table thead th { padding: 0 .3rem .25rem; font-size: .65rem; color: var(--muted); text-align: center; font-weight: 650; }
.guess-table th:first-child { width: 20%; text-align: left; }
.guess-table tbody th { padding: .6rem .3rem .6rem 0; font-size: .8rem; overflow-wrap: anywhere; }
.guess-number { display: inline-flex; align-items: center; justify-content: center; background: var(--lilac); color: var(--accent); width: 1.4rem; height: 1.4rem; margin-right: .4rem; border-radius: 50%; font-size: .65rem; vertical-align: middle; }
.guess-table td { border-radius: .65rem; text-align: center; vertical-align: top; padding: .65rem .25rem; min-width: 0; overflow-wrap: anywhere; }
.chip-value { display: block; font-size: .875rem; font-weight: 750; }
.chip-state { display: block; font-size: .6rem; margin-top: .3rem; font-weight: 500; }
.chip-direction { display: block; font-size: .65rem; font-weight: 750; margin-top: .25rem; }
.mobile-axis { display: none; }
.guess-row.is-new .chip { animation: clue-arrive .3s ease-out both; }
.guess-row.is-new .chip:nth-child(3) { animation-delay: 45ms; }
.guess-row.is-new .chip:nth-child(4) { animation-delay: 90ms; }
.guess-row.is-new .chip:nth-child(5) { animation-delay: 135ms; }
.guess-row.is-new .chip:nth-child(6) { animation-delay: 180ms; }
.guess-row.is-new .chip:nth-child(7) { animation-delay: 225ms; }
.rules-panel { max-width: 48rem; margin: 1.5rem auto 0; color: var(--muted); font-size: .75rem; scroll-margin-top: 1rem; }
.legend { margin-bottom: .75rem; text-align: center; line-height: 1.8; }
.legend > span { display: block; }

summary { min-height: 44px; padding: .7rem .25rem; font-weight: 700; color: var(--ink); }





.reveal { position: relative; background: #f3ecff; border: 1px solid #c9b7e9; border-radius: 1.5rem; padding: 2rem; margin: 2rem auto 0; scroll-margin-top: 1.25rem; animation: clue-arrive .3s ease-out; }
.reveal-celebration { float: right; font-size: 3rem; margin-left: .5rem; }
.reveal .eyebrow { margin-bottom: .4rem; color: var(--accent); }
.reveal-message { font-weight: 650; font-size: .875rem; color: var(--accent); margin-bottom: .35rem; }
.reveal h2 { font-size: clamp(1.8rem,4vw,2.6rem); letter-spacing: -.045em; margin-bottom: .8rem; overflow-wrap: anywhere; }
.reveal > p:not(.eyebrow):not(.reveal-message), .reveal details, .roster-links { font-size: .85rem; }
.reveal details { margin-bottom: 1rem; }
.reveal label { display: block; font-weight: 700; font-size: .875rem; margin-bottom: .5rem; }
.reveal textarea { width: 100%; min-height: 11rem; border: 1px solid var(--strong-border); border-radius: .875rem; background: #fff; padding: 1rem; color: var(--ink); font-size: .875rem; resize: vertical; }
.secondary-button { min-height: 44px; border: 1px solid var(--strong-border); background: #fff; color: var(--accent-hover); padding: .65rem 1rem; border-radius: .75rem; font-weight: 700; }
.secondary-button:hover { background: var(--lilac); }
.actions, .copy-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.actions a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; }
.copy-controls span { color: var(--muted); font-size: .8rem; }
.reveal .roster-details { border-top: 1px solid #d9cbe9; padding-top: .5rem; margin: 1.5rem 0 0; }
.roster-details summary > span { color: var(--muted); font-weight: 400; }
.roster-links { padding: 0; list-style: none; }
.roster-links li { display: inline; }
.roster-links li::after { content: ''; display: block; }
.roster-links a { display: inline-flex; align-items: center; min-height: 44px; }
article { max-width: 48rem; margin: 2.5rem auto 0; background: #fff; border: 1px solid var(--border); border-radius: 1.5rem; padding: 2rem; overflow-wrap: anywhere; box-shadow: 0 5px 0 #eee5da; }
article h1 { font-size: clamp(1.8rem,4vw,2.75rem); letter-spacing: -.045em; margin-bottom: 1.5rem; }
article .eyebrow { color: var(--accent); }
.person-list, .archive-list { padding: 0; list-style: none; }
.person-list li, .archive-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); padding: .7rem 0; }
.person-list a, .archive-list a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }
.person-list li > span, .archive-list li > span { color: var(--muted); font-size: .8rem; }
.archive-list li { border: 1px solid var(--border); background: #faf7ff; border-radius: .9rem; padding: .65rem 1rem; margin-bottom: .75rem; }
.archive-list li:nth-child(even) { background: #fff8ed; }
.facts div { display: grid; grid-template-columns: 10rem minmax(0,1fr); gap: 1rem; border-bottom: 1px solid var(--border); padding: .75rem 0; }
.facts dt { color: var(--muted); font-size: .875rem; }
.facts dd { margin: 0; font-weight: 600; }
article table { width: 100%; border-collapse: collapse; }
article th, article td { border: 1px solid var(--border); padding: .5rem; text-align: left; vertical-align: top; }
article form { display: grid; gap: .5rem; }
article form label { display: grid; gap: .25rem; }
article input, article select { max-width: 100%; min-height: 44px; }
.error, .sample-banner { background: #fff0e7; border: 1px solid #e8c7b2; border-radius: .75rem; padding: .75rem 1rem; font-size: .875rem; }
.error { color: var(--risk); font-weight: 700; }
.sample-banner { margin-top: 1rem; margin-bottom: 0; }
footer { max-width: 65rem; margin: auto; padding: 1.7rem 1.5rem 2rem; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: .65rem; }
footer p { margin-bottom: .5rem; }
.footer-note { color: var(--ink); font-size: .8rem; font-weight: 650; }
.footer-note span { font-size: 1.15rem; margin-right: .3rem; }
@keyframes clue-arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 800px) {
  .intro { grid-template-columns: minmax(0,1fr) 13rem; gap: 1rem; }
  .birthday-card { padding: 1rem .5rem 1.5rem; }
  .hero-cake { font-size: 4.5rem; }
  .card-date { font-size: 1.25rem; }
  .play-topline { flex-wrap: wrap; }
  .guess-table, .guess-table tbody { display: block; }
  .guess-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .guess-table tr { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(5.3rem,100%),1fr)); gap: .4rem; margin-bottom: 1rem; }
  .guess-table th:first-child { display: flex; align-items: center; grid-column: 1/-1; width: 100%; padding: .4rem 0; font-size: .85rem; }
  .guess-table td { padding: .65rem .3rem; }
  .mobile-axis { display: block; font-size: .6rem; margin-bottom: .2rem; font-weight: 500; }
}
@media (max-width: 600px) {
  .site-header { min-height: 4.5rem; padding: .7rem 1rem; gap: .25rem; flex-wrap: wrap; }
  .brand { gap: .35rem; }
  .brand img { width: 136px; }
  .brand-cake { font-size: 1.55rem; }
  .site-header nav { gap: 0; }
  .site-header nav a { padding: .45rem .6rem; font-size: .75rem; }
  main { padding: 0 1rem 2rem; }
  .intro { grid-template-columns: minmax(0,1fr) 5.75rem; padding: 1.75rem .25rem 1.75rem 0; gap: .5rem; }
  .intro-copy { display: contents; }
  .intro .eyebrow { grid-column: 1/-1; font-size: .58rem; margin-bottom: .25rem; letter-spacing: .06em; }
  .intro h1 { grid-column: 1; grid-row: 2; font-size: clamp(1.8rem,7.6vw,2.8rem); margin-bottom: .5rem; }
  .intro-description { grid-column: 1/-1; font-size: .83rem; margin: .25rem 0 .5rem; }
  .date-meta { grid-column: 1/-1; font-size: .65rem; gap: .4rem; }
  .birthday-card { grid-column: 2; grid-row: 2; padding: .3rem; border-radius: 1.1rem; box-shadow: 3px 4px 0 #e7dcc7; }
  .hero-cake { font-size: 3rem; line-height: 1.65; }
  .card-caption, .card-sticker, .card-date, .card-spark, .birthday-card::before, .birthday-card::after { display: none; }
  .game-panel { padding: 1rem; border-radius: 1.25rem; }
  .play-topline { gap: .8rem; margin-bottom: 1rem; }
  .play-invitation { font-size: .7rem; }
  .play-invitation > span[aria-hidden] { font-size: 1rem; }
  .chances { flex-shrink: 1; flex-wrap: wrap; }
  #remaining { font-size: .7rem; }
  .guess-form { grid-template-columns: minmax(0,1fr); gap: .6rem; }
  .guess-form label { font-size: .8rem; }
  .guess-form input[type=search] { min-height: 3.25rem; font-size: 1rem; }
  .guess-form button { min-height: 3.15rem; font-size: .875rem; }
  .search-hint { font-size: .65rem; line-height: 1.6; }
  .board-heading { margin-top: 1.2rem; padding-top: 1rem; }
  .board-heading h2 { font-size: .875rem; }
  .board-heading > span { font-size: .6rem; }
  .empty-clues { grid-template-columns: repeat(auto-fit,minmax(min(max(4.75rem,28%),100%),1fr)); gap: .4rem; }
  .empty-clues > div { padding: .35rem .1rem; }
  .empty-clues strong { font-size: 1.4rem; }
  .empty-state > p { font-size: .75rem; }
  .empty-state > p > span { font-size: .65rem; }
  .guess-table tr { grid-template-columns: repeat(auto-fit,minmax(min(max(4.75rem,28%),100%),1fr)); }
  .chip-value { font-size: .8rem; }
  .chip-state, .chip-direction { font-size: .6rem; }
  .clue-key { font-size: .6rem; gap: .4rem; }
  .rules-panel { font-size: .7rem; margin-top: 1.25rem; }
  .reveal { padding: 1.25rem; }
  .reveal-celebration { font-size: 2rem; }
  article { margin-top: 1.5rem; padding: 1.25rem; }
  .person-list li, .archive-list li { display: block; }
  .person-list li > span, .archive-list li > span { display: block; }
  .facts div { grid-template-columns: minmax(0,1fr); gap: .25rem; }
  article table { display: block; overflow-x: auto; }
  article th, article td { min-width: 8rem; }
  footer { margin: 0 1rem; padding: 1.25rem .25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Small invitation details: tactile, quiet, and useful during play. */
::selection { background: #e0d1ff; color: var(--ink); }
.site-header nav a { transition: color .16s, background .16s; }
.brand-cake { transition: transform .2s; }
.brand:hover .brand-cake { transform: rotate(-9deg); }
.birthday-card { isolation: isolate; transition: transform .25s, box-shadow .25s; }
.card-caption { border-bottom: 1px dashed #c9b7e9; padding-bottom: .65rem; margin-bottom: .3rem; }
.card-sticker { box-shadow: 0 2px 0 #c9b46142; }
.wish-trigger { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: inherit; background: transparent; z-index: 2; }
.wish-trigger:focus-visible { outline-offset: 6px; }
.wish-sparkles { position: absolute; left: 50%; top: 48%; pointer-events: none; z-index: 3; --reach: 1; }
.wish-sparkles i { position: absolute; opacity: 0; font-size: 1.25rem; font-style: normal; color: var(--accent); }
.wish-sparkles i:nth-child(1) { --x: -110px; --y: -65px; }
.wish-sparkles i:nth-child(2) { --x: 85px; --y: -90px; color: #99542c; }
.wish-sparkles i:nth-child(3) { --x: 100px; --y: 55px; }
.wish-sparkles i:nth-child(4) { --x: -85px; --y: 70px; color: #99542c; }
.wish-sparkles i:nth-child(5) { --x: -15px; --y: -105px; color: #07594c; }
.wish-sparkles i:nth-child(6) { --x: 25px; --y: 90px; color: #07594c; }
.wish-made .wish-sparkles i { animation: birthday-wish 1.1s ease-out both; }
.wish-made .hero-cake { animation: cake-nod .5s ease-in-out; }
@keyframes birthday-wish { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(var(--x) * var(--reach)), calc(var(--y) * var(--reach))) rotate(35deg) scale(.7); } }
@keyframes cake-nod { 50% { transform: rotate(-12deg) translateY(-4px); } }
@media (hover: hover) and (pointer: fine) {
  .birthday-card.wish-ready:hover { transform: rotate(2deg) translateY(-3px); box-shadow: 7px 10px 0 #e7dcc7; }
  .empty-clues > div { transition: transform .16s; }
  .empty-clues > div:hover { transform: translateY(-3px) rotate(-2deg); }
}
.game-panel { background-image: linear-gradient(90deg, #eee5ff, #ffe1ce, #d9f0ea); background-size: 100% 4px; background-position: top; background-repeat: no-repeat; }
.candle { transition: background .2s; }
.candle::before { transition: opacity .22s, transform .22s; }
.candle.spent::before { transform: translateY(-4px) scale(.5); }
.guess-form input[type=search] { transition: border-color .15s, box-shadow .15s, background .15s; }
.guess-form input[type=search]:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px #eee5ff; }
.guess-form input[type=search]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.guess-form.has-selection input[type=search] { border-color: #137a68; background: #f3fbf8; }
.has-selection .search-icon { border: none; border-radius: 0; color: var(--hit-text); }
.has-selection .search-icon::after { content: '✓'; background: none; top: -.35rem; left: 0; width: auto; height: auto; transform: none; font-size: 1.15rem; font-weight: 750; }
.search-hint { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem 1rem; font-size: .75rem; }
.search-hint p { margin: 0; }
.has-selection .search-hint p { color: var(--hit-text); font-weight: 650; }
.keyboard-hint { font-size: .65rem; white-space: nowrap; }
kbd { display: inline-block; min-width: 1.1rem; padding: 0 .2rem; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: .25rem; margin-right: .15rem; background: #faf8fc; font: inherit; text-align: center; }
#suggestions { padding: .4rem; }
#suggestions li { display: flex; gap: .7rem; align-items: center; padding: .65rem; min-height: 3.25rem; }
.option-initials { flex: 0 0 2rem; display: flex; align-items: center; justify-content: center; height: 2rem; border-radius: .65rem; background: var(--lilac); color: var(--accent); font-size: .7rem; font-weight: 750; }
#suggestions li:nth-child(3n+2) .option-initials { color: #743e25; background: var(--peach); }
#suggestions li:nth-child(3n) .option-initials { color: var(--hit-text); background: var(--hit); }
.option-name { min-width: 0; flex: 1; overflow-wrap: anywhere; font-size: .9rem; }
.option-name mark { color: inherit; background: transparent; font-weight: 750; text-decoration: underline; text-decoration-color: #c9b7e9; text-underline-offset: .18em; }
.option-arrow { color: var(--accent); opacity: 0; }
#suggestions li[aria-selected=true] .option-arrow, #suggestions li:hover .option-arrow { opacity: 1; }
.submit-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.15rem; transition: transform .15s; }
.guess-form button:hover .submit-icon { transform: translateX(3px); }
.guess-form[aria-busy=true] .submit-icon { font-size: 0; width: 1rem; height: 1rem; border: 2px solid #ffffff70; border-top-color: white; border-radius: 50%; animation: button-spin .65s linear infinite; }
@keyframes button-spin { to { transform: rotate(360deg); } }
#game-status { min-height: 1.25rem; margin-top: .65rem; font-size: .75rem; }
.board-heading { margin-top: .75rem; }
.board-heading h2 { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.guess-count { display: inline-flex; align-items: center; padding: .2rem .4rem; border-radius: .4rem; background: #f5f1fb; color: var(--muted); font-size: .65rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.guess-table tbody th { font-size: .875rem; }
.guess-table td { border: 1px solid #30244308; box-shadow: inset 0 1px 0 #ffffff80; }
.chip-state { font-size: .7rem; }
.chip-direction { font-size: .7rem; }
.chip-value { font-size: .9rem; }
.empty-clues span { font-size: .7rem; }
.empty-clues strong { font-weight: 500; }
.empty-state > p { margin-top: 1.25rem; }
.empty-state > p > span { font-size: .75rem; }
.clue-key { font-size: .7rem; }
.rules-panel { max-width: none; margin-top: 2.5rem; font-size: .8rem; }
.rules-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.rules-heading h2 { font-size: 1.25rem; letter-spacing: -.035em; margin: 0; color: var(--ink); }
.rules-heading > span { font-size: .7rem; }
.howto-steps { list-style: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5rem; margin: 0; padding: 0; }
.howto-steps li { display: flex; gap: .75rem; align-items: flex-start; min-width: 0; }
.step-number { flex: 0 0 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; border-radius: .6rem; color: var(--accent); background: var(--lilac); font-size: .7rem; font-weight: 750; transform: rotate(-4deg); }
.howto-steps li:nth-child(2) .step-number { background: var(--peach); color: #743e25; transform: rotate(4deg); }
.howto-steps li:nth-child(3) .step-number { background: var(--hit); color: var(--hit-text); }
.howto-steps h3 { color: var(--ink); font-size: .85rem; line-height: 1.4; margin: .2rem 0 .45rem; letter-spacing: -.02em; }
.howto-steps p { font-size: .78rem; line-height: 1.7; margin: 0; }
.howto-steps strong { font-weight: 650; }
.arrow-guide { border-top: 1px dashed #cfc2dd; border-bottom: 1px dashed #cfc2dd; margin-top: 1.5rem; padding: 1rem 0; }
.arrow-guide .legend { text-align: left; font-size: .75rem; margin-bottom: .65rem; }
.arrow-guide > div { display: flex; flex-wrap: wrap; gap: .65rem 2rem; font-size: .75rem; }
.arrow-guide > div > span { display: inline-flex; align-items: center; gap: .5rem; }
.arrow-guide b { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; flex-shrink: 0; border: 1px solid var(--border); border-radius: .45rem; color: var(--accent); background: #fff; }
.fame-note { font-size: .7rem; margin: .7rem 0 0; }
.scorecard { background: #fff; border: 1px solid #d8cce9; border-radius: 1rem; padding: 1rem; margin-top: 1.4rem; box-shadow: 0 3px 0 #d8cce950; }
.scorecard-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding-bottom: .8rem; border-bottom: 1px dashed var(--border); }
.scorecard-heading label { font-size: .8rem; margin: 0; }
.scorecard-heading > span { color: var(--accent); }
.scorecard textarea { border: 0; border-radius: .4rem; min-height: 0; padding: .9rem 0 .25rem; background: transparent; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .8rem; line-height: 1.65; }
.scorecard .copy-controls { margin-bottom: 0; gap: .65rem; }
.copy-icon { display: inline-block; min-width: 1rem; margin-right: .25rem; }
.secondary-button.is-copied { border-color: #137a68; color: var(--hit-text); background: #f3fbf8; }
.copy-controls span { max-width: 100%; }
.reveal-message { font-size: .95rem; }
.page-intro { color: var(--muted); font-size: .9rem; line-height: 1.7; }
.archive-list li { padding: 0; transition: border-color .15s, transform .15s; }
.archive-list li:hover { border-color: var(--accent); transform: translateX(2px); }
.archive-list a { width: 100%; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; text-decoration: none; }
.archive-arrow { display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--border); border-radius: 50%; width: 2rem; height: 2rem; flex-shrink: 0; }
@media (max-width: 800px) {
  .howto-steps { gap: 1rem; }
  .howto-steps li { display: block; }
  .step-number { width: 2rem; margin-bottom: .6rem; }
  .keyboard-hint { display: none; }
}
@media (max-width: 600px) {
  .site-header nav a { padding-inline: .45rem; }
  .site-header { column-gap: .5rem; }
  .wish-sparkles { --reach: .28; }
  .birthday-card.wish-made .card-sticker { display: block; font-size: .5rem; padding: .25rem; bottom: -.3rem; max-width: 100%; white-space: normal; width: max-content; }
  .search-hint { font-size: .75rem; }
  .board-heading { margin-top: .75rem; }
  .mobile-axis { font-size: .65rem; }
  .chip-value { font-size: .875rem; }
  .chip-state, .chip-direction { font-size: .68rem; }
  .empty-state > p { font-size: .85rem; }
  .empty-state > p > span { font-size: .75rem; }
  .clue-key { font-size: .67rem; }
  .rules-panel { margin-top: 2rem; }
  .rules-heading { margin-bottom: 1.3rem; }
  .rules-heading h2 { font-size: 1.15rem; }
  .howto-steps { grid-template-columns: minmax(0,1fr); gap: 1.15rem; }
  .howto-steps li { display: flex; gap: .75rem; }
  .step-number { margin: 0; }
  .howto-steps h3 { margin-top: .1rem; }
  .howto-steps p { font-size: .8rem; }
  .scorecard { padding: .8rem; }
  .scorecard .copy-controls { align-items: flex-start; flex-direction: column; }
  .footer-note { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Reflow around the reader's text size, not only the viewport width. */
main { container-type: inline-size; }
@container (max-width: 16rem) {
  .intro { grid-template-columns: minmax(0,1fr); }
  .intro h1 { grid-column: 1; grid-row: 2; overflow-wrap: anywhere; }
  .intro .birthday-card { grid-column: 1; grid-row: 3; justify-self: start; width: 4.5rem; margin: .5rem 0; }
  .game-panel { padding: 1rem; padding: min(1rem,16px); }
  .board-heading > span { display: none; }
  .howto-steps li { display: block; }
  .step-number { margin-bottom: .5rem; }
}
@media (max-width: 600px) {
  main { padding-inline: min(1rem,16px); }
}
/* Play stays within reach: latest turn first, optional history on a phone. */
@media (max-width: 600px) {
  .intro { padding-top: 1.1rem; padding-bottom: 1.1rem; gap: .75rem; }
  .intro .eyebrow { margin-bottom: .5rem; font-size: .6rem; }
  .intro h1 { font-size: 2rem; margin-bottom: .6rem; }
  .intro-description { font-size: .85rem; line-height: 1.45; margin-bottom: .6rem; }
  .date-meta { font-size: .65rem; gap: .4rem; }
  .date-meta > span:last-child { max-width: 28rem; }
  .game-panel { scroll-margin-top: .5rem; padding: 1rem; }
  .play-topline { margin-bottom: .65rem; gap: .4rem; }
  .guess-form { gap: .4rem; }
  .guess-form input[type=search], .guess-form button { min-height: 46px; }
  .search-hint { font-size: .7rem; }
  .board-heading { margin: .75rem 0 .65rem; padding-top: .65rem; }
  .deduction-note { font-size: .75rem; margin-top: .6rem; padding: .45rem .6rem; }
  .js-enabled [data-history=collapsed] .guess-row:not(:first-child) { display: none; }
  .js-enabled .history-toggle:not([hidden]) { display: block; border: 0; background: transparent; color: var(--accent); min-height: 44px; margin: .3rem auto; font-size: .8rem; font-weight: 650; }
  .chip-value { overflow-wrap: anywhere; }
  .clue-key { flex-wrap: wrap; }
  .clue-key a { flex-basis: 100%; text-align: center; margin-top: .3rem; }
  .rules-panel { margin-top: 1.5rem; }
}
@media (max-width: 360px) {
  .intro h1 { font-size: 1.8rem; }
  .intro .eyebrow { letter-spacing: .04em; }
  .intro-description br { display: none; }
}
.name-choices { grid-column: 1/-1; border: 1px solid var(--border); border-radius: .8rem; display: grid; gap: .5rem; }
.name-choices legend { color: var(--muted); font-size: .8rem; }
.name-choices button { display: block; text-align: left; background: var(--lilac); color: var(--ink); box-shadow: none; }
.name-choices small { display: block; font-weight: 400; }
@media (max-width: 600px) {
  .intro { row-gap: .3rem; padding-top: .85rem; padding-bottom: .85rem; }
  .intro-description { margin: .1rem 0 .3rem; }
  .intro .eyebrow { margin-bottom: .25rem; }
  .intro h1 { line-height: 1.08; }
  .date-meta { gap: .25rem .5rem; }
  .date-meta > span:last-child { font-size: .62rem; }
  .game-panel .play-topline { flex-wrap: nowrap; align-items: center; }
  .play-invitation { max-width: 54%; }
  .chances { justify-content: flex-end; gap: .35rem; }
  .chances #remaining { font-size: .65rem; }
}
@media (max-width: 600px) and (max-height: 700px) {
  .intro .eyebrow { display: none; }
  .intro h1, .birthday-card { grid-row: 1; }
  .intro { padding-top: .6rem; padding-bottom: .6rem; }
}
