:root {
  --bg: #f5ead0;
  --bg-2: #efe1c2;
  --cream: #fdf8ea;
  --cream-2: #f8efd9;
  --field: #fffcf3;
  --ink: #55402f;
  --ink-soft: #654f3b;
  --line: #d8c29a;
  --gold: #c9a46a;
  --gold-pale: #ecd39f;
  --gold-top: #f4e2b8;
  --accent: #9b6a43;
  --accent-2: #b98356;
  --cover: #8d6142;
  --sage: #6c7c4c;
  --slate: #5d7590;
  --slate-pale: #e3e8ec;
  --danger: #a4523a;
  --shadow: rgba(85, 64, 47, .16);
  --orange: var(--accent-2);
  --orange-dark: var(--accent);
  --gold-2: var(--gold);
  --text: 'Martell', 'Slab Fallback', Georgia, serif;
  --font: var(--text);
  --display: var(--text);
  --logo: 'Omnibus', 'Martell', 'Slab Fallback', Georgia, serif;
  --c-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M2 20V2h18' fill='none' stroke='%2355402f' stroke-width='2'/%3E%3Cpath d='M6 14V6h8' fill='none' stroke='%23c9a46a' stroke-width='1.2'/%3E%3Crect x='8.5' y='8.5' width='3' height='3' fill='%23c9a46a' transform='rotate(45 10 10)'/%3E%3C/svg%3E");
  --c-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M20 20V2H2' fill='none' stroke='%2355402f' stroke-width='2'/%3E%3Cpath d='M16 14V6H8' fill='none' stroke='%23c9a46a' stroke-width='1.2'/%3E%3Crect x='10.5' y='8.5' width='3' height='3' fill='%23c9a46a' transform='rotate(45 12 10)'/%3E%3C/svg%3E");
  --c-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M2 2v18h18' fill='none' stroke='%2355402f' stroke-width='2'/%3E%3Cpath d='M6 8v8h8' fill='none' stroke='%23c9a46a' stroke-width='1.2'/%3E%3Crect x='8.5' y='10.5' width='3' height='3' fill='%23c9a46a' transform='rotate(45 10 12)'/%3E%3C/svg%3E");
  --c-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M20 2v18H2' fill='none' stroke='%2355402f' stroke-width='2'/%3E%3Cpath d='M16 8v8H8' fill='none' stroke='%23c9a46a' stroke-width='1.2'/%3E%3Crect x='10.5' y='10.5' width='3' height='3' fill='%23c9a46a' transform='rotate(45 12 12)'/%3E%3C/svg%3E");
  --fans: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Cg fill='none' stroke='%23c9a46a' stroke-opacity='.45' stroke-width='1'%3E%3Cpath d='M0 24a24 24 0 0 1 48 0M8 24a16 16 0 0 1 32 0M16 24a8 8 0 0 1 16 0M-24 12a24 24 0 0 1 48 0M24 12a24 24 0 0 1 48 0M-16 12a16 16 0 0 1 32 0M32 12a16 16 0 0 1 32 0'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 300 17.5px/1.6 var(--text);
  background: var(--bg);
}
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
strong, b { font-weight: 700; }
h1, h2, h3 { font-weight: 700; line-height: 1.18; margin: 0 0 .5em; letter-spacing: 0; }
h1 { font-size: clamp(1.7rem, 4.4vw, 2.5rem); text-wrap: balance; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; font-weight: 400; }
:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; }

.town {
  position: relative;
  height: clamp(200px, 19vw, 290px);
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 4px 0 var(--bg), 0 5px 0 var(--gold);
  background:
    url(/img/town-front.svg) repeat-x 0 100% / auto var(--th, clamp(120px, 13vw, 200px)),
    url(/img/town-mid.svg) repeat-x 37% 100% / auto var(--th, clamp(120px, 13vw, 200px)),
    url(/img/town-back.svg) repeat-x 71% 100% / auto var(--th, clamp(120px, 13vw, 200px)),
    repeating-conic-gradient(from -90deg at 50% 118%, rgba(201, 164, 106, .13) 0 4deg, transparent 4deg 9deg),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.town-img { display: none; }
.page-room .town { height: clamp(170px, 14vw, 220px); --th: clamp(96px, 9.5vw, 140px); }
.topbar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 1080px; margin: 0 auto; padding: 16px 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 56px; height: 56px; }
.brand span { font-family: var(--logo); font-weight: 400; font-size: 2.3rem; line-height: 1; letter-spacing: .04em; color: var(--ink); padding-top: .08em; }
.lang { position: relative; }
.lang select {
  appearance: none; font: 400 .9rem var(--text); color: var(--ink);
  background: var(--cream); border: 1.5px solid var(--ink); border-radius: 0;
  padding: 6px 30px 6px 12px; cursor: pointer;
}
.lang::after { content: ''; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); pointer-events: none; }

.wrap { max-width: 640px; margin: 0 auto; padding: 22px 16px 56px; }
.wrap-wide { max-width: 1000px; margin: 0 auto; padding: 26px 16px 40px; }

.frame, .panel, .tile, .plaque {
  position: relative;
  background: var(--c-tl) 4px 4px no-repeat, var(--c-tr) calc(100% - 4px) 4px no-repeat, var(--c-bl) 4px calc(100% - 4px) no-repeat, var(--c-br) calc(100% - 4px) calc(100% - 4px) no-repeat, var(--cream);
  border: 1.5px solid var(--ink);
  box-shadow: inset 0 0 0 5px var(--cream), inset 0 0 0 6px var(--line), 0 3px 0 var(--shadow);
  padding: 26px 26px 26px;
}
.board {
  position: relative;
  padding: 22px;
  background: var(--fans) 0 0 / 48px 24px, var(--bg-2);
  border: 1.5px solid var(--ink);
  box-shadow: inset 0 0 0 6px var(--bg-2), inset 0 0 0 7px var(--gold), 0 3px 0 var(--shadow);
}
.plaque { text-align: center; padding: 30px 30px 22px; margin-bottom: 20px; }
.plaque h1 { margin-bottom: .4em; }
.plaque p { color: var(--ink); max-width: 58ch; margin: 0 auto 6px; }
.plaque::after {
  content: ''; display: block; width: 150px; height: 10px; margin: 14px auto 0;
  background: linear-gradient(var(--gold), var(--gold)) 0 50% / 60px 1px no-repeat, linear-gradient(var(--gold), var(--gold)) 100% 50% / 60px 1px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='10'%3E%3Cpath d='M15 0l5 5-5 5-5-5z' fill='%23c9a46a'/%3E%3Ccircle cx='4' cy='5' r='1.6' fill='%23c9a46a'/%3E%3Ccircle cx='26' cy='5' r='1.6' fill='%23c9a46a'/%3E%3C/svg%3E") 50% 50% no-repeat;
}
.tiles { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 780px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile-title { margin-bottom: 14px; }
.stack > :not(:empty) ~ :not(:empty) { margin-top: 20px; }

label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.hint { display: block; font-weight: 300; font-size: .86rem; color: var(--ink-soft); margin-top: 3px; line-height: 1.45; }
.field + .field { margin-top: 16px; }
.field-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin-top: 16px; }
.field-row .field + .field { margin-top: 0; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
input[type=text], input[type=password], input[type=url], input[type=date], input[type=search], input[type=number], select.input, textarea {
  width: 100%; font: 400 1rem var(--text); color: var(--ink);
  background: var(--field); border: 1.5px solid var(--line); border-radius: 0; padding: 10px 12px;
}
textarea { min-height: 76px; resize: vertical; }
input:focus, select.input:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); }
input::placeholder, textarea::placeholder { color: #ab9473; font-weight: 300; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.code-input { font: 700 1.8rem/1 var(--text) !important; letter-spacing: .32em; text-align: center; text-transform: uppercase; padding: 13px 12px 11px calc(12px + .32em) !important; color: var(--accent) !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 .9rem/1.2 var(--text); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--ink); border-radius: 0; padding: 13px 24px 12px;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--gold-pale); box-shadow: inset 0 0 0 3px var(--gold-pale), inset 0 0 0 4px var(--ink); }
.btn-primary:hover:not([disabled]) { background: #f1dcad; box-shadow: inset 0 0 0 3px #f1dcad, inset 0 0 0 4px var(--ink); }
.btn-primary:active:not([disabled]) { background: var(--gold); box-shadow: inset 0 0 0 3px var(--gold), inset 0 0 0 4px var(--ink); }
.btn-secondary { background: var(--cream); }
.btn-secondary:hover:not([disabled]) { background: var(--cream-2); box-shadow: inset 0 0 0 3px var(--cream-2), inset 0 0 0 4px var(--line); }
.btn-ghost { background: none; border: none; color: var(--ink-soft); padding: 6px 2px; letter-spacing: .08em; font-size: .8rem; }
.btn-ghost:hover { color: var(--ink); text-decoration: underline; }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 8px 14px 7px; font-size: .76rem; }
.btn-block { width: 100%; }
form .btn-block, .tile > .btn-block { margin-top: 18px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions { margin-top: 18px; }
.error { color: var(--danger); font-weight: 700; font-size: .92rem; margin: 12px 0 0; }
.notice { font-size: .86rem; font-weight: 400; color: var(--ink-soft); border-left: 2px solid var(--gold); padding-left: 10px; margin: 16px 0 0; }

.ribbon {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin: 0 0 24px; font-size: 1.45rem; text-align: center;
}
.ribbon::before, .ribbon::after {
  content: ''; flex: 1; max-width: 220px; height: 10px;
  background: linear-gradient(var(--ink), var(--ink)) 0 3px / 100% 1px no-repeat, linear-gradient(var(--gold), var(--gold)) 0 7px / 100% 1px no-repeat;
}

.how { margin-top: 52px; }
.mysteries { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); counter-reset: m; }
@media (min-width: 780px) { .mysteries { grid-template-columns: repeat(4, 1fr); } }
.mysteries li { counter-increment: m; display: flex; flex-direction: column; border: 1.5px solid var(--ink); background: var(--cream); box-shadow: 0 3px 0 var(--shadow); }
.mysteries .art {
  position: relative; display: grid; place-items: center; height: 128px; margin: 8px 8px 0;
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: 999px 999px 0 0 / 70px 70px 0 0;
  background: repeating-conic-gradient(from -90deg at 50% 100%, rgba(201, 164, 106, .22) 0 6deg, transparent 6deg 12deg), var(--cream-2);
}
.mysteries .art svg { width: 62px; height: 62px; fill: var(--ink-soft); margin-top: 14px; }
.mysteries .art::before {
  content: counter(m); position: absolute; left: 50%; bottom: -14px; z-index: 1;
  width: 28px; height: 28px; margin-left: -14px; display: grid; place-items: center;
  background: var(--cream); color: var(--ink); border: 1.5px solid var(--ink);
  transform: rotate(45deg); font-weight: 700; font-size: .85rem;
}
.mysteries .art::after { content: ''; position: absolute; left: -1px; right: -1px; bottom: 0; height: 1px; background: var(--ink); }
.mysteries p { margin: 0; flex: 1; padding: 22px 14px 14px; color: var(--ink); font-size: .92rem; font-weight: 400; line-height: 1.5; text-align: center; }

.journal { margin-top: 52px; }
.journal-page { display: grid; gap: 34px; grid-template-columns: 1fr; padding: 34px; }
@media (min-width: 820px) { .journal-page { grid-template-columns: 1fr 1fr; gap: 48px; } .journal-page > div + div { border-left: 1px solid var(--line); padding-left: 48px; margin-left: -1px; } }
.journal-page h2 { font-size: 1.2rem; color: var(--accent); padding-bottom: 8px; margin-bottom: 14px; border-bottom: 1px solid var(--gold); }
.feats { margin: 0; }
.feats dt { font-weight: 700; margin-top: 16px; }
.feats dt:first-child { margin-top: 0; }
.feats dd { margin: 2px 0 0; color: var(--ink-soft); font-size: 1rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 11px 0; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 9px; height: 9px; margin-top: 7px; border: 1.5px solid var(--ink); transform: rotate(45deg); transition: background-color .15s; }
.faq details[open] summary::after { background: var(--gold); }
.faq details p { color: var(--ink-soft); margin: 8px 0 2px; font-size: .96rem; }
.foot { text-align: center; color: var(--ink-soft); font-size: .84rem; font-weight: 400; padding: 30px 16px 40px; }
.foot p { margin: 4px 0; }
.foot .credits { font-size: .74rem; opacity: .85; }

.room-head { margin: 4px 0 22px; }
.room-head h1 { margin-bottom: 6px; }
.lead { color: var(--ink-soft); font-size: 1.02rem; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--ink-soft); font-size: .95rem; font-weight: 400; }
.who .btn-ghost { color: var(--accent); padding: 0; }
.chip { display: inline-block; font: 700 .7rem/1.7 var(--text); letter-spacing: .08em; text-transform: uppercase; padding: 0 8px; border: 1px solid var(--line); color: var(--ink-soft); background: var(--field); white-space: nowrap; }
.chip.price { border-color: #b4bf9a; color: var(--sage); background: #f2f3e4; }
.chip.host { border-color: #aebccb; color: #4b627a; background: var(--slate-pale); }

.waiting { text-align: center; }
.waiting .lantern { width: 64px; height: 64px; margin: 0 auto 12px; border: 1.5px solid var(--ink); border-radius: 50%; background: radial-gradient(circle, var(--cream) 0 34%, transparent 35%), repeating-conic-gradient(var(--gold) 0 8deg, var(--gold-pale) 8deg 16deg); box-shadow: inset 0 0 0 4px var(--cream); }
.waiting .count { font-weight: 700; font-size: 1.25rem; color: var(--accent); margin-bottom: 6px; }

.gift { max-width: 360px; margin: 6px auto 0; padding-top: 30px; position: relative; filter: drop-shadow(0 3px 0 var(--shadow)); }
.gift .twine { position: absolute; top: 0; left: 50%; width: 2px; height: 50px; margin-left: -1px; background: var(--gold); transform: rotate(-9deg); transform-origin: top; }
.tag {
  position: relative; padding: 58px 24px 32px; text-align: center; color: var(--ink);
  background: var(--cream); border: 1.5px solid var(--ink);
  clip-path: polygon(24% 0, 76% 0, 100% 16%, 100% 100%, 0 100%, 0 16%);
  transform: rotate(-2deg); box-shadow: inset 0 0 0 6px var(--cream), inset 0 0 0 7px var(--gold); overflow: hidden;
}
.tag::before { content: ''; position: absolute; top: 16px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); z-index: 3; }
.tag .to { color: var(--ink-soft); margin-bottom: 4px; font-weight: 400; }
.tag .target { font-weight: 700; font-size: clamp(2.1rem, 9vw, 2.8rem); line-height: 1.1; color: var(--accent); margin: 0; word-break: break-word; min-height: 1.15em; }
.cover {
  position: absolute; inset: 0; z-index: 2; width: 100%; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--cream); font: 400 .9rem var(--text);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Cg fill='none' stroke='%23ecd39f' stroke-opacity='.35' stroke-width='1'%3E%3Cpath d='M0 24a24 24 0 0 1 48 0M8 24a16 16 0 0 1 32 0M16 24a8 8 0 0 1 16 0M-24 12a24 24 0 0 1 48 0M24 12a24 24 0 0 1 48 0M-16 12a16 16 0 0 1 32 0M32 12a16 16 0 0 1 32 0'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 48px 24px, var(--cover);
  transform-origin: 50% 0; transition: transform .8s cubic-bezier(.55, -0.25, .3, 1.15), opacity .45s .35s;
}
.cover .seal { width: 54px; height: 54px; display: grid; place-items: center; background: var(--gold-pale); color: var(--ink); border: 1.5px solid var(--ink); box-shadow: inset 0 0 0 3px var(--gold-pale), inset 0 0 0 4px var(--ink); transform: rotate(45deg); font-size: 1.3rem; }
.cover .seal { font-weight: 700; }
.cover .big { font-weight: 700; font-size: .95rem; letter-spacing: .16em; text-transform: uppercase; margin-top: 10px; }
.tag.open .cover { transform: perspective(800px) rotateX(-105deg); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .cover { transition: opacity .2s; } .tag.open .cover { transform: none; } }
.target-wishes { margin-top: 28px; }

.wishes { list-style: none; padding: 0; margin: 14px 0 0; }
.wishes li { padding: 13px 0; border-top: 1px solid var(--line); }
.wishes li:first-child { border-top: 0; padding-top: 4px; }
.wish-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.wish-title { font-weight: 700; font-size: 1.04rem; }
.wish-link { display: inline-block; font-size: .9rem; font-weight: 400; word-break: break-all; margin-top: 2px; }
.wish-note { margin: 4px 0 0; color: var(--ink-soft); font-size: .94rem; white-space: pre-wrap; word-break: break-word; }
.wish-tools { margin-top: 4px; display: flex; gap: 12px; }
.wish-form { margin-top: 14px; padding: 18px; border: 1px solid var(--line); background: var(--cream-2); }
.empty { color: var(--ink-soft); font-style: italic; margin: 8px 0 0; }

.excl { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.excl label { font-weight: 400; margin: 0; padding: 9px 11px; border: 1px solid var(--line); background: var(--field); }
.excl label:has(input:checked) { border-color: var(--accent); background: #f7e9d8; }

.share { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 18px; margin: 4px 0 20px; border: 1px solid var(--gold); background: var(--cream-2); box-shadow: inset 0 0 0 4px var(--cream-2), inset 0 0 0 5px var(--line); }
.share .code { font-weight: 700; font-size: 2.3rem; line-height: 1; letter-spacing: .26em; padding-left: .26em; color: var(--accent); }
.share .link { font-size: .82rem; font-weight: 400; color: var(--ink-soft); word-break: break-all; }
.people { list-style: none; padding: 0; margin: 8px 0 0; }
.people li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.people .who-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 400; }
.sub { margin: 26px 0 10px; padding-top: 18px; border-top: 1px solid var(--gold); }
.foot-note { color: var(--ink-soft); font-size: .88rem; font-weight: 400; margin-top: 26px; text-align: center; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px); padding: 12px 20px; background: var(--ink); color: var(--cream); border: 1.5px solid var(--ink); box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px var(--gold); font-weight: 400; }

.page-plain { display: grid; place-items: center; min-height: 100vh; }
.plain { text-align: center; padding: 24px; }
.plain h1 { font-size: 4.5rem; color: var(--accent); margin-bottom: 0; }

.code-input, .share .code, .count, input, .tag .target { font-variant-numeric: lining-nums; }

@media (max-width: 560px) {
  .board { padding: 12px; }
  .plaque { padding: 24px 18px 16px; margin-bottom: 12px; }
  .tiles { gap: 12px; }
  .frame, .panel, .tile { padding: 22px 18px 22px; }
  .journal-page { padding: 26px 20px; }
  .brand img { width: 46px; height: 46px; }
  .brand span { font-size: 1.9rem; }
  .btn { letter-spacing: .1em; }
}
