* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: #fff4de; background: radial-gradient(ellipse at 50% 0%, #243d60, #101827 70%); font: 1rem/1.5 Georgia, serif; min-height: 100vh; }
main { margin: auto; max-width: 1120px; padding: 24px 20px; text-align: center; }
header a { color: #f9dca6; text-decoration: none; letter-spacing: .19em; text-transform: uppercase; font-size: .83rem; }
h1 { font-size: clamp(2rem, 6vw, 4rem); font-weight: 400; line-height: 1.05; margin: .25em 0 .17em; text-wrap: balance; }
header p { margin: 0 0 1.1rem; color: #e5eafa; }
.village { width: min(100%, 1000px); aspect-ratio: 3 / 2; position: relative; margin: auto; overflow: hidden; isolation: isolate; border: 1px solid #ae8b61; border-radius: 12px; box-shadow: 0 18px 50px #080d18aa; }
.village img { position: absolute; width: 100%; height: 100%; object-fit: fill; inset: 0; }
.windows { position: absolute; inset: 28% 20% 20%; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, minmax(0, 1fr)) minmax(0, 1.15fr); gap: 5% 5%; perspective: 800px; }
.window { position: relative; isolation: isolate; color: #f1dfc0; border: 2px solid #b79b72; border-bottom: 3px solid #c7b19b; border-radius: 40% 40% 3px 3px / 28% 28% 3px 3px; background: #302533; box-shadow: 0 2px 6px #110c15b0, inset 0 0 0 2px #27222a; font: bold clamp(.9rem, 2.5vw, 1.6rem) Georgia, serif; cursor: pointer; padding: 0; }
.window::before, .window::after { content: ''; position: absolute; z-index: -1; inset: 3px; border-radius: inherit; background: repeating-linear-gradient(#0000 0 5px, #180f283d 6px 7px), linear-gradient(105deg, #4c1d28 0 46%, #221524 48% 52%, #652835 54%); transition: transform .25s ease; }
.window::after { inset: auto 0 -4px; height: 4px; border-radius: 50%; background: #e3eaf2; }
.window:hover { border-color: #fff2ce; }
.window.today { color: #331708; background: #ffe8a4; box-shadow: 0 0 24px #ffcd70; }
.window.today::before { background: radial-gradient(#fff0b6, #efa343); }
.window.past::before { background: linear-gradient(110deg, #69412b, #956339); }
.window.opening::before { transform: rotateY(-75deg); transform-origin: left; }
.window.opening { background: #ffd890; color: #351a11; }
.window:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #ffeea7; outline-offset: 3px; }
.door { grid-column: 3 / 5; width: 58%; justify-self: center; }
footer { color: #d6def0; font-size: .93rem; margin-top: 1rem; }
dialog { width: min(92%, 450px); padding: 30px; background: #fff1d6; color: #36251f; border: 2px solid #bb8f56; border-radius: 14px; box-shadow: 0 12px 60px #120914a0; text-align: center; }
dialog::backdrop { background: #0a1424ad; }
dialog p { margin: .55rem 0; }
.date { color: #79412d; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
h2 { margin: .18em 0; font-size: 2rem; line-height: 1.1; text-wrap: balance; }
.close { position: absolute; right: 10px; top: 6px; background: transparent; color: inherit; border: 0; font-size: 1.8rem; cursor: pointer; }
dialog :focus-visible { outline-color: #913633; }
code { display: inline-block; padding: 8px 12px; background: #efdfbc; border-radius: 6px; overflow-wrap: anywhere; font-size: 1.1rem; user-select: all; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: .8rem; }
.actions > * { font: inherit; display: inline-block; color: white; text-decoration: none; background: #71333b; border: 0; border-radius: 6px; padding: .45em 1em; cursor: pointer; }
.visit { background: #234d43; }
@media (max-width: 800px) {
    main { padding: 22px 10px; }
    .village { aspect-ratio: auto; min-height: 665px; }
    .village img { object-fit: cover; }
    .windows { inset: 27% 6% 18%; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(6, minmax(44px, 1fr)) 53px; gap: 7px 9px; }

    .window { font-size: 1.15rem; }
    .door { grid-column: 2 / 4; }
}
@media (prefers-reduced-motion: reduce) { .window::before { transition: none; } }



header .preview-link { display: block; margin-top: .35rem; color: #ffe3ab; text-transform: none; letter-spacing: normal; text-decoration: underline; text-underline-offset: .18em; font-size: .95rem; }
dialog { width: min(94%, 680px); max-height: 88dvh; padding: 23px; }
dialog h2 { margin-bottom: .65rem; }
.offer-list:not(:empty) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; text-align: left; }
.offer { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 13px; border: 1px solid #ccb48b; border-radius: 8px; background: #fff8e8; }
.offer.featured { grid-column: 1 / -1; padding: 16px; border-color: #9f6738; background: #ffe8b9; }
.offer h3 { margin: 0; font-size: 1.17rem; }
.offer p { margin: .25rem 0; }
.offer .featured-label { color: #79412d; margin: 0 0 .25rem; font-size: .82rem; font-weight: bold; letter-spacing: .09em; text-transform: uppercase; }
.offer .instructions { font-size: .87rem; }
.offer .actions { align-items: center; justify-content: flex-start; padding-top: .45rem; margin-top: auto; font-size: .87rem; }
.offer code { font-size: .92rem; }
.offer .notice { color: #234d43; margin: .25rem 0 0; font-size: .85rem; }
.offer .notice:empty { margin: 0; }
@media (max-width: 540px) {
    dialog { padding: 17px; }
    .offer-list:not(:empty) { grid-template-columns: 1fr; }
}

footer .promote-link { display: inline-block; color: #ffe3ab; margin-top: .35rem; text-underline-offset: .18em; }
