@font-face { font-family: "Cormorant Garamond"; src: url('../fonts/cormorant-garamond.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url('../fonts/dm-sans.woff2') format('woff2'); font-weight: 100 1000; font-display: swap; }
:root { color-scheme: dark; font-family: "DM Sans", system-ui, sans-serif; color: #f8edda; background: #151016; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-height: 100svh; margin: 0; background: #151016 url('../images/winterstall.webp') center / cover fixed; isolation: isolate; display: flex; flex-direction: column; }
body::before { content: ""; position: fixed; inset: 0; background: radial-gradient(ellipse at 38% 49%, #19131d45, #080a14cc), linear-gradient(#17111aa8, transparent 55%, #121019dd); z-index: -1; pointer-events: none; }
button { font: inherit; color: inherit; }
button:focus-visible { outline: 2px solid #f2ca86; outline-offset: 4px; }
.site-header { position: relative; z-index: 3; padding: 23px 20px 4px; text-align: center; }
.edition-year { display: block; margin-bottom: 7px; font-size: .76rem; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; color: #dfbb80; }
h1 { margin: 0; font: 500 clamp(2.1rem, 4.1vw, 3.65rem)/1.03 "Cormorant Garamond", Georgia, serif; letter-spacing: -.025em; text-shadow: 0 3px 24px #000c; text-wrap: balance; }
.site-header > p { margin: 11px 0 0; color: #e2cfb7; font-size: .79rem; letter-spacing: .025em; text-wrap: balance; }
.header-actions { position: absolute; top: 20px; right: 27px; display: flex; align-items: center; gap: 10px; }
.header-action { display: flex; align-items: center; gap: 11px; min-height: 41px; border: 1px solid #d8bd906b; background: #20151ce8; padding: 9px 14px; border-radius: 25px; cursor: pointer; font-size: .74rem; box-shadow: 0 4px 15px #0005; white-space: nowrap; }
.header-action:hover, .header-action[aria-pressed="true"]:not(#sound) { background: #4e302d; }
.header-action small { color: #f0c380; font-size: .86rem; }
#sound[aria-pressed="false"] { opacity: .68; }
/* Compact music player, anchored to the header buttons on every screen size. */
#music-toggle.music-playing small { color: #fff0bd; text-shadow: 0 0 9px #f5cd85; }
#music-toggle.music-open { background: #4e302d; }
.music-panel { position: absolute; z-index: 10; top: calc(100% + 11px); right: 0; width: min(346px, calc(100vw - 26px)); padding: 20px; background: #21171df5; border: 1px solid #d4af7b9c; border-radius: 8px; box-shadow: 0 16px 55px #000c, inset 0 1px #f8ddad24; text-align: left; white-space: normal; backdrop-filter: blur(14px); }
.music-panel-heading { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.music-eyebrow { display: block; color: #cba775; font-size: .59rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 750; }
.music-panel h2 { font: 600 1.85rem/1.1 "Cormorant Garamond", Georgia, serif; margin: 4px 0 0; }
.music-close { flex: 0 0 auto; border: 1px solid #d3ac765d; background: #37272a; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 1.25rem; line-height: 1; }
.music-now-playing { background: #44302585; border-left: 2px solid #d9af76; padding: 10px 12px; }
.music-now-playing span { display: block; color: #d0ac7f; font-size: .6rem; text-transform: uppercase; letter-spacing: .12em; }
.music-now-playing strong { display: block; margin-top: 4px; color: #f6e6cb; font-size: .79rem; }
.music-controls { display: grid; grid-template-columns: 1fr auto 74px; align-items: center; gap: 10px; margin: 14px 0 17px; }
.music-controls label { font-size: .65rem; color: #dfc9af; }
.music-play { border: 1px solid #d3aa76; border-radius: 3px; padding: 8px 9px; cursor: pointer; font-size: .68rem; font-weight: 700; color: #2b1a16; background: #d9ad75; }
.music-play:hover { background: #f2ce9c; }
#music-volume { width: 74px; accent-color: #e3b87d; cursor: pointer; }
.music-mode-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 16px; }
.music-mode-row label { flex: 0 0 auto; font-size: .68rem; color: #dfc9af; }
.music-mode-row select { width: min(198px, 100%); min-width: 0; padding: 9px 28px 9px 10px; border: 1px solid #b89a7370; border-radius: 4px; background: #38282c; color: #f8edda; font: 600 .72rem "DM Sans", system-ui, sans-serif; cursor: pointer; }
.music-mode-row select:hover { background: #4e3335; }
.music-mode-row select:focus-visible { outline: 2px solid #f2ca86; outline-offset: 2px; }
.music-track-heading { margin: 0 0 9px; font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; color: #e0bf91; font-weight: 700; }
.music-track-list { display: grid; gap: 6px; }
.music-track { display: grid; grid-template-columns: 25px minmax(0, 1fr) 33px; align-items: center; gap: 9px; width: 100%; padding: 10px; text-align: left; background: #3b2b2d; border: 1px solid #b89a7352; border-radius: 4px; cursor: pointer; }
.music-track:hover { background: #543936; }
.music-track[aria-pressed="true"] { border-color: #e3b47b; background: #63442f; }
.music-track-index { color: #d7b381; font: 600 1.17rem "Cormorant Garamond", Georgia, serif; }
.music-track-title { font-size: .72rem; overflow-wrap: anywhere; }
.music-track-duration { justify-self: end; font-size: .62rem; color: #d6bea2; font-variant-numeric: tabular-nums; }
.music-status { margin: 12px 0 0; min-height: 18px; font-size: .66rem; line-height: 1.5; color: #debf8d; }
main { display: flex; flex: 1; min-height: 0; align-items: center; justify-content: center; }
#calendar { position: relative; width: min(1400px, 100%); height: clamp(520px, calc(100svh - 217px), 950px); min-height: 520px; overflow: hidden; }
#scene, #doors { position: absolute; inset: 0; }
#scene canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
#doors { pointer-events: none; }
.door-access { position: absolute; border: 0; color: transparent; background: transparent; padding: 0; opacity: 0; pointer-events: none; border-radius: 3px; cursor: pointer; }
.door-access:focus-visible { opacity: 1; outline: 2px solid #ffe2a5; outline-offset: 4px; color: transparent; }
#loading { position: absolute; top: 46%; width: 100%; text-align: center; font-size: .82rem; pointer-events: none; }
.briefing { position: absolute; z-index: 1; top: 50%; right: clamp(35px, 7.5%, 112px); transform: translateY(-50%); width: min(375px, 36%); transition: opacity .45s ease, transform .5s ease, visibility .45s; }
.eyebrow { color: #e6bd80; text-transform: uppercase; letter-spacing: .16em; font-size: .62rem; font-weight: 750; line-height: 1.6; }
.briefing h2 { margin: 6px 0 15px; font: 500 clamp(2.5rem, 4.5vw, 4.3rem)/.96 "Cormorant Garamond", Georgia, serif; letter-spacing: -.03em; }
.briefing > p:not(.eyebrow, .instruction) { font-size: .88rem; line-height: 1.78; color: #eadbc7; text-wrap: pretty; }
.mission-progress { display: flex; align-items: baseline; justify-content: space-between; margin-top: 27px; font-size: .75rem; color: #d6c4ae; }
.mission-progress strong { font: 500 1.6rem "Cormorant Garamond", Georgia, serif; color: #f1ca91; }
.progress-track { height: 4px; margin: 10px 0 25px; border-radius: 10px; overflow: hidden; background: #e7cc9b35; }
#progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #b07c4e, #ffe0a0); border-radius: inherit; transition: width .4s ease; }
.primary-action { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 45px; border: 1px solid #e0b77f; background: #c49b63; color: #241918; border-radius: 3px; padding: 12px 19px; cursor: pointer; font-size: .75rem; font-weight: 800; letter-spacing: .025em; transition: background .18s ease, transform .18s ease; }
.primary-action:hover { transform: translateY(-2px); background: #f0ce95; }
.instruction { color: #cab5a1; font-size: .67rem; margin-top: 15px; }
.news-link { color: #e5c48f; font-size: .69rem; line-height: 1.6; text-decoration: none; }
.news-link:hover { color: #ffe1ad; text-decoration: none; }
.news-link:focus-visible { outline: 2px solid #f2ca86; outline-offset: 4px; }
#calendar.focused .briefing { opacity: 0; transform: translate(30px, -50%); visibility: hidden; pointer-events: none; }
.back-action { position: absolute; top: 30px; left: 35px; z-index: 2; border: 1px solid #d5b78270; background: #1c171bcb; padding: 10px 14px; border-radius: 3px; font-size: .74rem; cursor: pointer; }
.back-action:hover { background: #4c312a; }
.wooden-sign { position: absolute; z-index: 2; left: 78%; top: 51%; width: clamp(160px, 16%, 220px); padding: 27px 14px 19px; transform: translateY(-50%) perspective(500px) rotateY(-14deg) rotateZ(2deg); border: 8px ridge #65402a; border-radius: 7px; box-shadow: inset 0 0 0 2px #c6985f55, inset 0 0 25px #27120b88, 13px 16px 0 -6px #2b1a14, 19px 24px 30px #000b; background: repeating-linear-gradient(1deg, #74482b 0, #8d5b36 13px, #86512d 18px, #754428 31px); text-align: center; color: #fbe8bf; pointer-events: none; text-shadow: 0 2px 4px #190b07b5; }
.sign-nail { position: absolute; top: 7px; width: 9px; height: 9px; background: radial-gradient(circle at 35% 35%, #ffebb4, #7b614a 70%); border-radius: 50%; box-shadow: 1px 1px 2px #0009; }
.sign-nail-left { left: 9px; }
.sign-nail-right { right: 9px; }
.sign-overline, #sign-prompt, #sign-count { display: block; }
.sign-overline { color: #ffe2ad; font: 700 .59rem/1.4 "DM Sans", sans-serif; text-transform: uppercase; letter-spacing: .12em; }
#sign-date { display: block; margin: 8px 0 7px; font: 600 1.35rem/1.02 "Cormorant Garamond", Georgia, serif; }
.sign-divider { display: block; width: 65%; height: 1px; margin: 12px auto; background: #e5c38c88; }
#sign-prompt { margin: 3px 0 0; font-size: .67rem; }
.sign-next { display: block; margin: 4px 0 0; font: 600 3.7rem/.95 "Cormorant Garamond", Georgia, serif; }
#sign-count { margin-top: 10px; font-size: .65rem; color: #f5dcb4; }
#atmosphere { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
#message { position: fixed; z-index: 6; inset: auto 16px 28px; margin: auto; width: fit-content; max-width: calc(100% - 32px); text-align: center; background: #21171df1; border: 1px solid #c6a77966; border-radius: 5px; padding: 12px 17px; font-size: .8rem; opacity: 0; transition: opacity .2s; pointer-events: none; }
#message.visible { opacity: 1; }
dialog { width: min(1010px, calc(100vw - 32px)); max-width: unset; max-height: min(88dvh, 820px); padding: 0; border: 1px solid #b89468; border-radius: 7px; color: inherit; background: #1c1619; box-shadow: 0 25px 110px #000c; overflow: auto; }
dialog::backdrop { background: #08090be8; backdrop-filter: blur(9px); }
dialog[open] { animation: reveal .36s ease-out; }
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 470px; }
.report-image-wrap { position: relative; display: flex; align-items: stretch; min-width: 0; min-height: 0; overflow: hidden; isolation: isolate; background: #100e10; }
.report-image-wrap::after { content: ""; position: absolute; z-index: 1; inset: 38% 0 0; pointer-events: none; background: linear-gradient(to bottom, transparent 0%, #0b090c25 45%, #0b090ce5 100%); }
#horse-photo { display: block; width: 100%; height: 100%; max-height: 82dvh; object-fit: cover; }
.report-copy { padding: clamp(27px, 4vw, 58px); align-self: center; }
.report-name { position: absolute; z-index: 2; left: clamp(18px, 3vw, 34px); right: 18px; bottom: clamp(18px, 3vw, 30px); margin: 0; color: #fff0d2; font: 700 clamp(2.1rem, 4.1vw, 3.75rem)/.95 "Cormorant Garamond", Georgia, serif; text-wrap: balance; overflow-wrap: break-word; text-shadow: 0 3px 16px #000e, 0 1px 3px #000f; }
.report-copy h2 { margin: 5px 0 22px; font: 500 clamp(2.3rem, 4vw, 3.9rem)/.96 "Cormorant Garamond", Georgia, serif; }
.report-location { display: flex; align-items: baseline; gap: 14px; border-block: 1px solid #cdb18a39; padding: 13px 0; font-size: .76rem; }
.report-location span { color: #bba48b; }
.report-location strong { font-weight: 700; color: #f1d39c; }
.report-text { font-size: .9rem; line-height: 1.8; color: #efe1d0; }
.clue { margin: 23px 0 27px; border-left: 2px solid #d3a86c; padding: 2px 0 2px 16px; }
.clue span { color: #e2b884; font-size: .65rem; text-transform: uppercase; font-weight: 800; letter-spacing: .1em; }
.clue p { font-size: .81rem; line-height: 1.65; margin: 8px 0 0; color: #d9c7b0; }
#ending { color: #f6d39a; font: 600 1.6rem "Cormorant Garamond", Georgia, serif; }
#close-photo { position: absolute; right: 12px; top: 12px; z-index: 3; border: 1px solid #e4be8b9c; width: 39px; height: 39px; border-radius: 50%; font-size: 1.5rem; background: #21171df1; cursor: pointer; line-height: 1; }
body:has(dialog[open]) { overflow: hidden; }
.fallback #scene { display: none; }
.fallback #doors { padding: 35px; position: absolute; inset: 0 43% 0 0; display: grid; grid-template-columns: repeat(4, 1fr); align-content: center; gap: 9px; pointer-events: auto; }
.fallback .door-access { position: relative; inset: auto !important; width: auto !important; height: 70px !important; opacity: 1; pointer-events: auto; color: #f3d69a; background: #4c2028; border: 1px solid #c4a478; font: 500 2rem "Cormorant Garamond", Georgia, serif; }
.fallback .door-access[data-status="opened"] { background: #244639; }
.fallback #loading { display: none; }
.fallback.focused #doors { inset: 0 25% 0 12%; }
/* The gift section shares the same snowy stable background and page chrome. */
.site-footer { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 12px; padding: 10px 20px 17px; text-align: center; }
.site-footer .news-link { grid-column: 3; grid-row: 1; justify-self: end; text-align: right; }
.site-footer p { grid-column: 2; grid-row: 1; }
.site-footer p { margin: 0; color: #ead3b0; font: italic 600 1.13rem/1.35 "Cormorant Garamond", Georgia, serif; text-shadow: 0 2px 8px #000d; }
.gifts-view { width: min(1180px, calc(100% - 42px)); margin: 26px auto 36px; padding: clamp(20px, 2.8vw, 34px); background: #171319e8; border: 1px solid #c9a7745c; border-radius: 9px; box-shadow: 0 24px 80px #0008, inset 0 1px #ffebc71a; animation: reveal .35s ease-out; }
.gift-intro { max-width: 730px; margin: 0 auto 26px; text-align: center; }
.gift-intro h2 { margin: 6px 0 12px; font: 500 clamp(2.2rem, 4vw, 3.8rem)/1 "Cormorant Garamond", Georgia, serif; }
.gift-intro > p:last-child { margin: 0 auto; max-width: 630px; color: #dcc6ae; font-size: .85rem; line-height: 1.65; }
.gift-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gift-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #292026; border: 1px solid #b8986c56; border-radius: 7px; box-shadow: 0 10px 23px #0004; }
.gift-art { display: grid; place-items: center; height: clamp(180px, 19vw, 243px); overflow: hidden; background: radial-gradient(ellipse at 48% 38%, #89684977, transparent 64%), radial-gradient(ellipse at bottom, #41332c, #241d23 70%); border-bottom: 1px solid #ba9a7152; }
.gift-art img { display: block; height: 94%; max-width: 96%; width: auto; object-fit: contain; filter: drop-shadow(7px 13px 7px #0008); transition: transform .35s ease; }
.gift-card:hover .gift-art img { transform: translateY(-5px) rotate(-2deg) scale(1.04); }
.gift-details { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 21px 21px 24px; }
.gift-index { color: #d9af79; font-size: .61rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.gift-details h3 { margin: 8px 0 9px; font: 600 clamp(1.5rem, 2.1vw, 2rem)/1.05 "Cormorant Garamond", Georgia, serif; color: #f6dfc1; }
.gift-details p { flex: 1; margin: 0 0 20px; font-size: .77rem; color: #dfceb9; line-height: 1.72; }
.gift-stamp { padding: 8px 11px; border: 1px solid #b9925b69; border-radius: 3px; color: #ecc995; font-size: .64rem; letter-spacing: .04em; }
.gift-bottom { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 27px; }
.gift-bottom p { margin: 0; color: #bdaa95; font-size: .7rem; line-height: 1.5; }
.gift-bottom .primary-action { flex-shrink: 0; }
@keyframes reveal { from { transform: translateY(18px) scale(.97); opacity: 0; } }
@media (max-width: 1250px) {
  .site-header { padding-top: 72px; }
  #calendar { height: clamp(520px, calc(100svh - 242px), 950px); }
  .briefing { right: 5%; width: 36%; }
  .back-action { left: 18px; }
}
@media (max-width: 1050px) {
  .site-footer { grid-template-columns: minmax(0, 1fr); row-gap: 7px; }
  .site-footer p { grid-column: 1; grid-row: 1; }
  .site-footer .news-link { grid-column: 1; grid-row: 2; }
}
@media (max-width: 780px) {
  .site-header { padding: 78px 18px 0; }
  h1 { font-size: clamp(2.15rem, 6.5vw, 3rem); }
  .header-actions { top: 14px; right: 15px; }
  .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gift-card:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gift-card:last-child .gift-art { height: 100%; min-height: 205px; border-bottom: 0; border-right: 1px solid #ba9a7152; }
  #calendar { height: max(700px, calc(100svh - 195px)); }
  .briefing { right: 5%; width: 42%; }
  .briefing h2 { font-size: clamp(2.1rem, 5.6vw, 3.4rem); }
  .briefing > p:not(.eyebrow, .instruction) { font-size: .75rem; line-height: 1.65; }
  .wooden-sign { left: auto; right: 4%; top: auto; bottom: 15px; width: 155px; transform: perspective(400px) rotateY(-12deg) rotateZ(2deg); padding: 14px 10px 11px; }
  #sign-date { font-size: 1.1rem; }
  .sign-next { font-size: 2.7rem; }
}
@media (max-width: 540px) {
  .site-header > p { max-width: 330px; margin: 9px auto 0; line-height: 1.4; }
  .header-actions { right: 13px; gap: 8px; }
  .header-action { min-height: 39px; padding: 8px 11px; gap: 7px; font-size: .68rem; }
  .gift-grid { grid-template-columns: 1fr; }
  .gift-card:last-child { display: flex; grid-column: auto; }
  .gift-card:last-child .gift-art { height: 220px; border-right: 0; border-bottom: 1px solid #ba9a7152; }
  .gift-art { height: 220px; }
  .gift-bottom { flex-direction: column; align-items: stretch; text-align: center; }
  .gift-bottom .primary-action { justify-content: center; }
  .gifts-view { width: calc(100% - 22px); margin-block: 22px; padding: 17px; }
  .site-footer { padding-bottom: 16px; }
  .site-footer p { font-size: .94rem; }
  #calendar { height: max(750px, calc(100svh - 175px)); }
  .briefing { top: 48%; right: 4%; width: 43%; }
  .briefing h2 { font-size: 2.25rem; }
  .briefing > p:not(.eyebrow, .instruction) { font-size: .73rem; }
  .mission-progress { margin-top: 18px; }
  .progress-track { margin-bottom: 18px; }
  .primary-action { font-size: .7rem; padding-inline: 11px; }
  .instruction { font-size: .62rem; }
  .wooden-sign { top: 46%; right: 4px; bottom: auto; width: 113px; padding: 16px 6px 13px; transform: translateY(-50%) perspective(400px) rotateY(-11deg) rotateZ(2deg); }
  .sign-overline { font-size: .5rem; }
  #sign-date { font-size: 1rem; }
  .sign-next { font-size: 2.6rem; }
  #sign-count { font-size: .56rem; }
  .back-action { top: 6px; left: 11px; }
  .fallback #doors { inset: 0; grid-template-columns: repeat(3, 1fr); padding: 14px; }
  .fallback:not(.focused) #doors { inset: 0 46% 0 0; grid-template-columns: repeat(2, 1fr); padding: 9px; }
  .fallback .door-access { height: 54px !important; font-size: 1.6rem; }
  .fallback.focused #doors { inset: 28px 0 175px; grid-template-columns: repeat(4, 1fr); }
  .report-layout { grid-template-columns: 1fr; }
  .report-image-wrap { height: min(36dvh, 310px); }
  .report-name { left: 18px; right: 18px; bottom: 16px; font-size: clamp(2rem, 8vw, 2.8rem); }
  #horse-photo { max-height: none; object-position: 50% 33%; }
  .report-copy { padding: 22px 25px 31px; }
  .report-copy h2 { font-size: 2.45rem; }
  .report-text { font-size: .83rem; }
  dialog { max-height: 92dvh; }
}
@media (max-width: 374px) {
  .wooden-sign { top: auto; right: 50%; bottom: 5px; width: 132px; transform: translateX(50%) perspective(400px) rotateY(-8deg); }
}
@media (prefers-reduced-motion: reduce) {
  #atmosphere { display: none; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Advent calendar game gallery. Game HUD and controls render inside each Canvas, not in HTML panels. */
.preview-link { display: inline-flex; margin-top: 2px; padding: 9px 0; border: 0; border-bottom: 1px solid #caa06b80; background: transparent; color: #f2c58b; font-size: .74rem; font-weight: 700; cursor: pointer; }
.preview-link span { margin-left: 10px; }
.game-gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.game-gallery-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; background: #291d23ee; border: 1px solid #c09b6b7a; border-radius: 6px; padding: 24px; box-shadow: 0 12px 32px #0007; }
.game-gallery-card h3 { font: 600 2rem/1.05 "Cormorant Garamond", Georgia, serif; margin: 0; }
.game-gallery-card p { flex: 1; font-size: .81rem; color: #dfcab1; line-height: 1.6; margin: 0 0 10px; }
.game-gallery-card .primary-action { align-self: stretch; }
.game-close { flex-shrink: 0; cursor: pointer; }
@media (max-width: 760px) { .game-gallery-grid { grid-template-columns: 1fr; } .game-gallery-card { padding: 19px; } }

/* Royal lock legend: available in both calendar camera positions. */
.lock-help-button { position: absolute; z-index: 4; top: 30px; right: 35px; display: inline-flex; align-items: center; gap: 9px; min-height: 43px; padding: 9px 12px; border-radius: 4px; border: 1px solid #e6bf80a3; background: #261a1ddd; color: #f5d9ae; box-shadow: 0 5px 18px #0008; cursor: pointer; font-size: .75rem; font-weight: 700; }
.lock-help-button:hover { background: #583930; }
.lock-help-button svg { width: 20px; height: 20px; color: #eeca90; }
.lock-help-q { display: grid; place-items: center; width: 15px; height: 15px; border: 1px solid #e8c58c; border-radius: 50%; color: #e8c58c; font: bold .62rem/1 "DM Sans",sans-serif; }
.lock-help-dialog { width: min(565px, calc(100vw - 24px)); max-height: 90dvh; overflow: auto; padding: clamp(18px, 3vw, 32px); border: 1px solid #d2a66e; border-radius: 9px; background: linear-gradient(150deg, #322126, #1c171e); color: #f6e5ce; box-shadow: 0 25px 80px #000e; }
.lock-help-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 19px; }
.lock-help-heading > div { flex: 1; }
.lock-help-heading .eyebrow { margin: 0; }
.lock-help-heading h2 { margin: 4px 0 0; font: 600 clamp(1.8rem, 4vw, 2.5rem)/1.08 "Cormorant Garamond",Georgia,serif; }
.lock-help-heading .game-close { width: 34px; height: 34px; font-size: 1.2rem; }
.lock-help-emblem { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border: 1px solid #bd905f; border-radius: 8px; color: #f2cb8b; background: #664530; font-size: 1.65rem; }
.lock-help-lead { font-size: .86rem; line-height: 1.7; color: #f4dec5; }
.lock-help-detail { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid #dfb98233; }
.lock-help-detail > span { font-size: 1.55rem; line-height: 1.4; }
.lock-help-detail p { margin: 0; color: #e0c6ad; font-size: .79rem; line-height: 1.65; }
.lock-help-detail strong { color: #f3d29c; }
.lock-help-tip { font-size: .74rem; line-height: 1.7; color: #cdb59b; }
#lock-help-done { margin-top: 6px; }
.lock-help-dialog::backdrop { background: #09070bca; backdrop-filter: blur(4px); }

/* Unified playable game presentation: controls, HUD, score and victory screens are drawn inside the Canvas. */
.game-dialog { position: relative; width: min(1020px, calc(100vw - 18px)); max-height: 97dvh; border: 2px solid #cba773; border-radius: 16px; padding: 13px; overflow: auto; background: #171821; box-shadow: 0 22px 100px #000e; }
.game-dialog::backdrop { background: #090b17d9; backdrop-filter: blur(8px); }
.game-dialog-header { position: absolute; z-index: 2; right: 22px; top: 17px; margin: 0; }
.game-dialog-header .game-close { width: 33px; height: 33px; min-height: 33px; background: #481f31e8; color: #ffe6b4; font-size: 1.25rem; border-radius: 8px; border: 1px solid #e8c18c; }
.game-stage { min-height: 0; }
.arcade-canvas { border-radius: 9px; border: 1px solid #cda66c; box-shadow: 0 5px 24px #000a; cursor: pointer; user-select: none; -webkit-user-select: none; }
.arcade-canvas:focus-visible { outline: 3px solid #efd297; outline-offset: 3px; }
.game-screenreader { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
.game-footer { position: absolute!important; width: 1px!important; height: 1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; padding: 0!important; margin: 0!important; }
.game-cover { display: block; width: 100%; height: 145px; object-fit: cover; border-radius: 6px; border: 1px solid #c8a47880; background: #203145; }
.game-gallery-card { overflow: hidden; }
@media (max-width: 640px) { .game-dialog { width: calc(100vw - 8px); max-height: 95dvh; padding: 5px; border-radius: 9px; } .game-dialog-header { top: 13px; right: 11px; } .game-dialog-header .game-close { width: 27px; height: 27px; font-size: 1rem; } .game-cover { height: 125px; } }

.briefing-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.finale-panel { margin-top: 22px; padding: 18px; border: 1px solid #d3ab74; border-radius: 16px; background: linear-gradient(180deg, #3a2530, #22181f); box-shadow: inset 0 1px 0 #fff1; }
.finale-panel h3 { margin: 6px 0 10px; font: 700 clamp(1.4rem, 2.6vw, 2rem) / 1.05 "Cormorant Garamond", Georgia, serif; color: #ffe5bb; }
.finale-panel p { margin: 0 0 14px; color: #f7e7cc; }
.finale-group-photo { display: block; width: 100%; border-radius: 14px; border: 1px solid #d7b283; box-shadow: 0 12px 30px #0006; }
/* The barn is a full-screen destination, not another panel on top of the winter background. */
.stable-toggle { position: fixed; top: 20px; left: 27px; z-index: 35; display: inline-flex; align-items: center; gap: 9px; min-height: 41px; padding: 9px 15px; border: 1px solid #d8bd906b; border-radius: 25px; background: #20151ce8; color: #f8edda; box-shadow: 0 4px 15px #0008; font: 700 .74rem/1 "DM Sans", sans-serif; cursor: pointer; }
.stable-toggle:hover, .stable-toggle:focus-visible, .stable-toggle[aria-pressed="true"] { border-color: #dfb875; background: #4e302d; }
.stable-toggle svg { width: 20px; height: 20px; color: #f0c380; }
body.stable-active { overflow: hidden; }
.stable-page { position: fixed; inset: 0; z-index: 30; width: 100vw; height: 100dvh; min-height: 0; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 50% 36%, #34414b 0%, #1f262b 55%, #0d1419 100%); animation: stable-focus-in .4s cubic-bezier(.19,.82,.27,1) both; }
.stable-page[hidden] { display: none !important; }
.stable-page .stable-stage { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; overflow: hidden; }
.stable-page .stable-stage canvas { display: block; width: 100%; height: 100%; touch-action: manipulation; }
.stable-slot-labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.stable-slot-label { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; min-width: 32px; height: 27px; padding: 2px 5px; border: 1px solid #cfb27a; border-radius: 5px; background: #32231de3; color: #f4dfad; box-shadow: 0 2px 7px #0009; font: 750 .75rem/1 "DM Sans", sans-serif; font-variant-numeric: tabular-nums; cursor: pointer; pointer-events: auto; }
.stable-slot-label.occupied { background: #29483ce8; border-color: #efcb87; color: #fff2ce; }
.stable-slot-label:hover, .stable-slot-label:focus-visible { background: #8a572f; color: white; box-shadow: 0 0 0 2px #f5d99a8c, 0 4px 15px #000a; z-index: 5; }
.stable-tooltip { position: absolute; z-index: 7; transform: translate(-50%, -100%); max-width: 255px; padding: 9px 13px; background: #2b1d1bf5; border: 1px solid #e4bf82; border-radius: 7px; box-shadow: 0 5px 22px #000a; pointer-events: none; color: #ffe5b8; font: 700 .82rem/1.35 "DM Sans", sans-serif; text-align: center; }
body.stable-active #message { z-index: 45; }
@media (max-width: 780px) { .stable-toggle { top: 14px; left: 15px; min-height: 39px; padding: 8px 11px; font-size: .68rem; } }
@media (max-width: 540px) { .stable-slot-label { min-width: 27px; height: 24px; font-size: .67rem; } .stable-tooltip { max-width: 185px; font-size: .7rem; } }

@keyframes stable-focus-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .stable-page { animation: none; } }

/* Found horses are the main visual; their door number remains a small corner badge. */
.stable-slot-label.occupied { min-width: 25px; height: 22px; padding: 1px 4px; border-radius: 5px; background: #263b30ec; box-shadow: 0 2px 6px #0009; }
