:root {
  color-scheme: light;
  --paper: #f8f2e5;
  --ink: #243b30;
  --muted: #526258;
  --pine: #173d33;
  --holly: #a14039;
  --gold: #f2d383;
  --line: #d9cbb2;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(ellipse at 20% 10%, #fffaf0, transparent 65%), var(--paper);
}
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid #b4543a; outline-offset: 4px; }
.wrap { width: min(1136px, calc(100% - 64px)); margin-inline: auto; }
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 78px; border-bottom: 1px solid var(--line);
  color: var(--pine); font-size: .875rem; font-weight: 650;
}
.masthead span:first-child { display: flex; gap: .7rem; align-items: center; }
.masthead b { color: var(--holly); font-size: 1.25rem; }
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.23fr); gap: 54px;
  align-items: center; padding-block: 35px 44px;
}
.intro { padding-block: 12px; }
.eyebrow {
  margin: 0 0 15px; color: var(--holly); font-size: .875rem;
  font-weight: 750; letter-spacing: .12em; text-transform: uppercase;
}
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { margin: 0; font-size: clamp(3.1rem, 6.2vw, 6.1rem); line-height: .97; letter-spacing: -.07em; }
h1 span { color: var(--holly); font-style: italic; }
.lede { max-width: 33ch; margin: 24px 0; color: var(--muted); font-size: 1.125rem; line-height: 1.6; }
.rule { width: 54px; border: 0; border-top: 1px solid #a98c5a; margin: 24px 0; }
.guidance { margin: 0 0 16px; line-height: 1.5; font-weight: 600; }
.demo-toggle {
  padding: 10px 15px; min-height: 44px; text-align: left; color: var(--pine); background: transparent;
  border: 1px solid #9b9f8b; border-radius: 99px; font-weight: 650;
}
.demo-toggle:hover { background: #e9e8d8; }
.board {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 18px 8px 15px; border-radius: 32px; background: radial-gradient(ellipse at 50% 40%, #326651, #173a30 72%);
  color: var(--paper); text-align: center; box-shadow: 0 18px 38px #392b1e24;
}
.board::before {
  content: ''; position: absolute; inset: 10px; z-index: -1;
  border: 1px solid #f2d38350; border-radius: 25px; pointer-events: none;
}
.board::after {
  content: ''; position: absolute; z-index: -1; inset: 5% 5% 14%; pointer-events: none;
  opacity: .45;
  background:
    radial-gradient(circle at 10% 27%, #efd481 1px, transparent 2px),
    radial-gradient(circle at 20% 48%, #efd481 1px, transparent 2px),
    radial-gradient(circle at 85% 17%, #efd481 1px, transparent 2px),
    radial-gradient(circle at 92% 45%, #efd481 1px, transparent 2px),
    radial-gradient(circle at 78% 32%, #efd481 1px, transparent 2px),
    radial-gradient(circle at 12% 67%, #efd481 1px, transparent 2px),
    radial-gradient(circle at 88% 84%, #efd481 1px, transparent 2px),
    radial-gradient(circle at 23% 16%, #efd481 1px, transparent 2px);
}
.tree {
  --size: clamp(47px, 5.2vw, 67px);
  --gap: 7px;
  position: relative; z-index: 0; padding-bottom: 10px;
}
.tree::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  background: linear-gradient(155deg, #4b7b54, #285a44); left: 5%; right: 5%; top: 37px; bottom: 66px;
  clip-path: polygon(50% 0, 64% 19%, 59% 19%, 75% 40%, 68% 40%, 85% 65%, 78% 65%, 100% 98%, 90% 100%, 10% 100%, 0 98%, 22% 65%, 15% 65%, 32% 40%, 25% 40%, 41% 19%, 36% 19%);
  opacity: .84;
}
.star { display: block; height: 39px; margin: 3px auto 5px; color: var(--gold); line-height: 1; font-size: 2.5rem; text-shadow: 0 0 24px #fde6a8a0; }
.row { display: flex; justify-content: center; gap: var(--gap); margin-bottom: 6px; }
.row:last-child { margin: 11px 0 0; }
.door {
  position: relative; display: grid; place-items: center; flex: 0 0 var(--size); width: var(--size); height: var(--size);
  border: 1px solid #f7e2ae6b; border-radius: 50%; background: #1c463a; color: #f9eace; isolation: isolate;
  box-shadow: inset 0 0 0 4px #17352a4d, 0 2px 3px #0c27177d;
  font-family: var(--serif); font-size: 1.12rem; font-variant-numeric: lining-nums;
  transition: transform .2s ease, box-shadow .2s ease;
}
.door::before { content: ''; position: absolute; z-index: -1; inset: 5px; border: 1px dashed currentColor; opacity: .36; border-radius: inherit; }
.door.available { background: #f2d997; color: #293b2d; border-color: #fff0c5; box-shadow: inset 0 0 0 4px #9a672123, 0 2px 4px #091f1c69; }
.door.today { background: #ffe6a0; box-shadow: inset 0 0 0 4px #b981282c, 0 0 0 2px var(--pine), 0 0 0 4px #f5d88a, 0 0 20px #f2d3838c; z-index: 1; }
.door.opened {
  color: #f5dcaa; border: 3px solid #be9e67;
  background: radial-gradient(circle at 52% 76%, #315748, #0e281f 75%);
  box-shadow: inset 0 7px 8px #06140f, 0 2px 4px #16352b;
}
.door.opened::before { inset: -4px; border: 2px solid #f2d594; opacity: 1; border-radius: 48% 52% 51% 49%; clip-path: polygon(0 0, 100% 0, 100% 48%, 92% 66%, 100% 100%, 0 100%); }
.door span { pointer-events: none; }
.door:hover { transform: translateY(-2px); }
.door:focus-visible { outline-color: #f9e4a5; }
.door.punch { animation: punch .38s ease-out both; }
@keyframes punch {
  38% { transform: scale(.82) rotate(-10deg); filter: brightness(1.24); }
  72% { transform: scale(1.09) rotate(6deg); }
  100% { transform: scale(1); opacity: 1; }
}
.legend {
  margin: 6px 0 8px; min-height: 22px; color: #fff1d2; font-size: .875rem; font-weight: 600;
}
dialog {
  width: min(440px, calc(100vw - 28px)); max-height: calc(100dvh - 28px);
  padding: 33px 28px 26px; color: var(--ink); background: var(--paper);
  border: 1px solid #b99861; border-radius: 22px; box-shadow: 0 20px 60px #15241b7a;
}
dialog::backdrop { background: #102820b8; }
dialog h2 { margin: 0 0 13px; font-size: 2.25rem; line-height: 1.03; }
dialog p { margin: 0 0 16px; line-height: 1.6; }
dialog .eyebrow { margin-bottom: 12px; }
.close {
  min-height: 44px; padding: 10px 17px; border: 0; border-radius: 99px; background: var(--pine);
  color: #fff9ec; font-weight: 650;
}
.photo-placeholder[hidden] { display: none; }
.photo-placeholder {
  display: grid; min-height: 112px; margin: 0 0 16px; padding: 12px;
  place-items: center; color: var(--pine); background: #e6e9db; border: 1px dashed #899886;
  border-radius: 10px; text-align: center; font-weight: 600;
}
@media (max-width: 860px) {
  .wrap { width: min(600px, calc(100% - 32px)); }
  .masthead { min-height: 56px; }
  .layout { grid-template-columns: 1fr; padding-block: 24px; gap: 16px; }
  .intro { padding-block: 0; }
  h1 { font-size: clamp(2.7rem, 10vw, 4.5rem); }
  h1 br { display: none; }
  .eyebrow { margin-bottom: 8px; }
  .lede { margin-block: 12px; font-size: 1rem; max-width: 45ch; }
  .rule { display: none; }
  .guidance { margin-bottom: 9px; }
  .tree { --size: clamp(45px, 13.5vw, 63px); --gap: 6px; }
}
@media (max-width: 370px) {
  .wrap { width: calc(100% - 16px); }
  .tree { --size: clamp(42px, 13vw, 48px); --gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.sponsor {
  padding: 16px 0 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
}
.sponsor strong { color: var(--pine); }
.directory { min-height: min(600px, 72vh); padding: clamp(36px, 9vw, 100px) 0 56px; }
.directory-intro { margin-bottom: 36px; }
.directory h1 { font-size: clamp(3.3rem, 8vw, 6.1rem); }
.directory h1 span { white-space: nowrap; }
.directory-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px; padding: 0; margin: 0; list-style: none;
}
.tree-link {
  display: flex; align-items: center; gap: .9rem; min-height: 72px; padding: 12px 16px;
  border: 1px solid var(--line); background: #fff9eb; border-radius: 14px;
  color: var(--pine); text-decoration: none;
}
.tree-link:hover, .tree-link:focus-visible { border-color: var(--pine); background: #eceddf; }
.tree-link strong { display: block; font: 1.4rem var(--serif); }
.tree-link small { display: block; margin-top: .18rem; font-size: .875rem; color: var(--muted); }
.tree-mark { color: var(--holly); font-size: 1.4rem; }
.family-photo { width: 100%; max-height: 44vh; object-fit: contain; margin: 0 0 16px; border-radius: 10px; }
.family-photo[hidden], .demo-toggle[hidden] { display: none; }
@media (max-width: 390px) {
  .directory h1 span { white-space: normal; }
}
