@font-face {
  font-family: "Patrick Hand"; src: url("/patrick-hand.ttf") format("truetype");
  font-style: normal; font-weight: 400; font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #121410; --stone: #1d1e18; --well: #161813; --line: #504a37;
  --line-lit: #8c7850; --gold: #dfc58d; --bone: #f0e8d4; --muted: #bab7a4;
  --olive: #c4d991; --focus: #e5eea0; --accent: #c7b285; --dark: #171a0d;
  --serif: Georgia, "Times New Roman", serif;
  --hand: "Patrick Hand", Georgia, serif;
  --sans: system-ui, -apple-system, sans-serif;
  --rune: ui-monospace, "Courier New", monospace;
  --grain: url("/ruin-texture.svg");
}
*, *::before, *::after { box-sizing: border-box }
[hidden] { display: none !important }
html { background: var(--bg) }
body {
  margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  color: var(--bone); font: 1rem/1.53 var(--sans); position: relative; isolation: isolate;
}
.landscape {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, #17191370 0%, #111410 92%),
    radial-gradient(ellipse at 29% 18%, #57534154 0%, transparent 58%),
    #171a14;
}
.landscape::before, .auth-panel::before, .panel:not(.auth-panel)::before, .wish::before, .profile::before {
  content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .14;
  mix-blend-mode: soft-light; pointer-events: none;
}
a { color: inherit }
button, input, select { font: inherit }
button { cursor: pointer }
button:disabled { opacity: .66; cursor: default }
button, a, input, select { outline-offset: 4px }
*:focus-visible { outline: 2px solid var(--focus) }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 20; background: var(--olive); color: var(--dark); padding: .5rem 1rem; transform: translateY(-180%) }
.skip:focus { transform: none }

.mast {
  background: linear-gradient(180deg, #1d1e17, #171913); border-bottom: 1px solid #554a32;
  box-shadow: 0 3px 0 #11130e, 0 4px 0 #353327;
}
.mast-inner, main, .site-footer { width: min(1190px, calc(100% - 64px)); margin-inline: auto }
.mast-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--gold); text-decoration: none; white-space: nowrap; font: bold 1.26rem/1 var(--serif); letter-spacing: .085em; text-transform: uppercase }
.brand img { display: block; width: 40px; height: 40px }
.header-note { color: var(--muted); font: bold .77rem/1.2 var(--rune); letter-spacing: .14em; text-transform: uppercase; display: flex; align-items: center; gap: 10px }
.header-note::before, .footer-divider { content: ""; display: inline-block; flex: 0 0 6px; width: 6px; height: 6px; border: 1px solid var(--line-lit); transform: rotate(45deg) }
nav { display: flex; align-items: center; gap: 6px }
nav button { min-height: 44px; padding: 8px 13px; font-size: .92rem; color: var(--muted); background: transparent; border: 1px solid transparent }
nav button:hover, nav button[aria-current=page] { border-color: var(--line-lit); color: var(--gold); background: linear-gradient(#302d20,#25241b) }
nav button[aria-current=page] { box-shadow: inset 0 -2px #b08a50 }
nav .avatar { width: 42px; padding: 0; text-transform: uppercase; color: var(--olive); border-color: var(--line); background: #222820; font: bold 1rem var(--serif); margin-left: 8px }

main { flex: 1; display: grid; align-content: center; min-height: 0 }
body.signed main { align-content: start }
.auth-layout {
  display: grid; grid-template-columns: minmax(0,1.48fr) minmax(0,1fr);
  margin: clamp(32px, 7vh, 78px) 0;
  border: 1px solid var(--line-lit); outline: 1px solid #37301e; outline-offset: 5px;
  box-shadow: 0 18px 56px #030401a8; background: #191b15;
}
.intro {
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 35.5rem; min-width: 0; padding: clamp(27px,4.2vw,56px);
  border-right: 1px solid var(--line-lit); background: #222820;
}
.intro-art {
  position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(0deg,#10140ffb 0%,#11160ff8 7%,#0d120ee0 20%,#1216115c 42%,#161a1112 64%,#1317118a 100%), url("/festive-vault.webp");
  background-position: center, center 43%;
  background-size: cover;
  background-color: #222820;
}
.intro::after {
  content: ""; position: absolute; inset: 9px; pointer-events: none;
  border: 1px solid #ddc18d45;
}
.overline {
  display: flex; align-items: center; gap: 10px; color: var(--gold);
  font: bold .76rem/1.4 var(--rune); letter-spacing: .19em; text-transform: uppercase;
}
.overline i { background: #cbb47c; width: 6px; height: 6px; transform: rotate(45deg); display: inline-block; flex: 0 0 6px; box-shadow: 0 0 10px #d9b26865 }
.intro-kicker {
  position: absolute; top: 24px; left: clamp(27px,4.2vw,56px);
  width: fit-content; padding: 7px 10px;
  background: #161a13da; border: 1px solid #8e7d52a6;
}
.intro-copy { position: relative }
.intro h1, .page-head h1 {
  margin: 0 0 14px; color: var(--bone); font: normal clamp(3.2rem,7.3vw,6.6rem)/.99 var(--serif);
  letter-spacing: -.085em; text-shadow: 0 4px 18px #040502, 0 2px 2px #040502; overflow-wrap: anywhere;
}
.intro h1 span { color: var(--olive) }
.intro-copy > p { max-width: 29rem; margin: 0; color: #e0dfcd; font-size: clamp(1rem,1.6vw,1.1rem) }
.intro-note { display: flex; align-items: center; gap: 9px; padding-top: 15px; margin-top: 18px; border-top: 1px solid #bba47564; max-width: 29rem; color: #d3cbad; font-size: .9rem }
.intro-note svg { flex: 0 0 16px; width: 16px; color: var(--gold) }

.panel { position: relative; color: var(--bone); background: linear-gradient(130deg,#23251d,#1b1e17 70%); border: 1px solid var(--line); box-shadow: inset 0 0 0 3px #0e110e70, 0 4px 0 #0f110d8c }
.auth-panel {
  align-self: stretch; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(28px,4.2vw,58px); background: radial-gradient(ellipse at 25% 0,#2c2d22,transparent 55%), #1e2018;
  border: 0; box-shadow: none; isolation: isolate;
}
.auth-panel::after { content: ""; position: absolute; inset: 9px; pointer-events: none; border: 1px solid #62563d9a }
.auth-kicker { margin-bottom: 16px; font-size: .72rem }
.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; background: #151812; border: 1px solid #60533a; }
.switch button { min-height: 42px; border: 1px solid transparent; padding: 6px 6px; background: transparent; color: #ceccba; font-size: .89rem; font-weight: 650 }
.switch button:hover, .switch button[aria-pressed=true] { border-color: #8e7950; color: var(--gold); background: linear-gradient(#383222,#292619); }
.switch button[aria-pressed=true] { box-shadow: inset 0 -2px #a28a58 }
h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0 }
h2 { font-size: clamp(1.65rem,2.4vw,2.18rem); letter-spacing: -.038em }
h3 { font-family: var(--hand); font-size: 1.6rem }
.auth-panel h2 { margin: 22px 0 14px }
.auth-panel label, .dialog label, .account-panel label { display: block; margin: 12px 0 5px; font-size: .91rem; font-weight: 650 }
input:not([type=checkbox]), select {
  display: block; width: 100%; min-width: 0; padding: 9px 11px; min-height: 44px; border: 1px solid #716342;
  background: var(--well); color: var(--bone); border-radius: 0; box-shadow: inset 0 2px 4px #0709067d;
}
input::placeholder { color: #9c9b88 }
input:not([type=checkbox]):focus, select:focus { border-color: var(--olive) }
input[type=checkbox] { width: 19px; height: 19px; accent-color: #bbce82; margin: 0; flex-shrink: 0 }
input[type=checkbox]:disabled { opacity: .85 }
select { appearance: none; padding-right: 34px; background-image: url("/select-chevron.svg"); background-repeat: no-repeat; background-size: 17px; background-position: right 9px center }
.primary, .secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 17px;
  min-height: 44px; text-decoration: none; font-size: .94rem; font-weight: 740; text-align: center;
}
.primary { background: linear-gradient(#cfdc9a,#adbd78); color: #242a12; border: 1px solid #e3e7ae; box-shadow: inset 0 0 0 2px #8994588c, 0 3px 0 #14190e; }
.primary:hover:not(:disabled) { background: linear-gradient(#e2edb0,#c2d68a); }
.secondary { background: #28271d; color: #e6d3a6; border: 1px solid #827253; box-shadow: inset 0 0 0 2px #1a1b137d; }
.secondary:hover:not(:disabled) { background: #383323; border-color: var(--gold); }
.auth-panel .primary { width: 100%; margin-top: 16px }
.help { font-size: .875rem; color: var(--muted); margin: 7px 0 0 }
.auth-foot { text-align: center; margin-top: 13px }
.form-error { font-size: .9rem; color: #ffe0d2; background: #4a2d24; border: 1px solid #a36955; padding: 8px 10px; margin: 12px 0 0 }
.support-payment { display: flex; gap: 13px; align-items: center; margin-top: 12px; }
.support-payment img { flex: 0 0 auto; height: auto; aspect-ratio: 1; background: white; }
.support-payment .link-button { display: inline-block; color: var(--gold); }
.footer-divider { opacity: .72 }
.link-button { background: transparent; border: 0; color: inherit; padding: 5px 0; text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { color: var(--olive) }
.loading { padding: 24px; margin: 40px auto; text-align: center }
.loading p { margin: 0 }

.workspace { width: min(1050px,100%); margin-inline: auto; padding: clamp(36px,6vw,68px) 0 75px }
.page-head { display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #665836 }
.page-head h1 { margin: 11px 0 12px; font-size: clamp(2.85rem,6.6vw,5.25rem); color: var(--gold); letter-spacing: -.065em }
.page-head p { margin: 0; max-width: 46rem; color: #d2cfb9 }
.page-head .primary { flex-shrink: 0; }
.breadcrumb { display: inline-block; margin-bottom: 16px; color: var(--gold) }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; margin-bottom: 16px }
.toolbar p { margin: 0; color: var(--muted); font-size: .91rem }
.toolbar label { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--muted) }
.toolbar select { width: auto; max-width: 100%; font-size: .94rem }
.search { display: flex; gap: 10px; align-items: end; padding: 15px 16px; margin-bottom: 16px }
.search > div { flex: 1; min-width: 0; }
.search label { display: block; margin-bottom: 5px; color: var(--muted); font-size: .9rem; }

.wishes, .profiles { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0 }
.wish {
  position: relative; display: grid; grid-template-columns: 43px minmax(0,1fr) auto; gap: 12px; align-items: center;
  color: var(--bone); background: linear-gradient(100deg,#26281f,#1d211a);
  border: 1px solid #665a3e; box-shadow: 0 3px 0 #0e130d; padding: 13px 15px;
}
.wish[data-done=true] { background: linear-gradient(100deg,#283023,#1b2419); border-color: #758052; }
.item-icon { width: 43px; height: 43px; border: 1px solid #66573a; background: #181b14; display: grid; place-items: center; }
.item-icon img { width: 30px; height: 30px }
.wish h3 { margin-bottom: 3px; overflow-wrap: anywhere; color: #f0e3c2; }
.item-meta { display: flex; gap: 3px 13px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.item-meta strong { color: var(--olive) }
.item-meta a { color: #dfcfa1; text-decoration: underline; text-underline-offset: 3px; font-weight: 650 }
.item-right { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 5px 13px; min-width: 0 }
.item-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: .89rem; font-weight: 650; color: #dce5bc; cursor: pointer }
.item-check:has(input:disabled) { cursor: default }
.wish button.link-button { font-size: .88rem; min-height: 44px; color: #e2d5b5 }
.wish button.link-button:hover, .item-meta a:hover { color: var(--olive) }
.profiles { grid-template-columns: repeat(3,minmax(0,1fr)) }
.profile { position: relative; min-height: 75px; padding: 12px; display: flex; align-items: center; gap: 12px; background: linear-gradient(110deg,#25291e,#1b2018); border: 1px solid #6f6041; box-shadow: 0 3px #0e130d; text-decoration: none; overflow-wrap: anywhere; }
.profile:hover { background: #303226; border-color: var(--gold) }
.profile strong { font: 1.48rem/1.12 var(--hand) }
.profile-letter { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border: 1px solid #857346; color: var(--olive); background: #242b1d; font-weight: bold; }
.more { text-align: center; margin: 20px 0 }
.empty { padding: 33px 24px; text-align: center }
.empty h2 { margin-bottom: 9px }
.empty p { color: var(--muted); margin: 0 auto 15px; max-width: 34rem }
.empty img { width: 48px; margin: 0 0 8px }
.account-panel { max-width: 580px; padding: 24px; margin-bottom: 18px }
.account-panel p { margin: 9px 0; color: var(--muted) }
.account-actions { margin-top: 15px; display: flex; gap: 16px; flex-wrap: wrap }
.dialog { width: min(480px,calc(100% - 28px)); padding: 24px; margin: auto; max-height: calc(100svh - 30px); overflow: auto; position: fixed; border-color: var(--line-lit) }
.dialog::backdrop { background: #0a0c08d9 }
.dialog h2 { padding-right: 34px }
.dialog p:not(.form-error) { color: var(--muted) }
.dialog .close { position: absolute; top: 7px; right: 13px; padding: 4px 7px; font: 1.9rem/1 var(--sans); text-decoration: none }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 26px); padding: 10px 15px; background: #283322; border: 1px solid #9fa871; color: var(--bone); box-shadow: 0 5px 18px #0a12089e; z-index: 5 }

@media (max-width: 940px) {
  .mast-inner, main, .site-footer { width: calc(100% - 48px) }
  .auth-layout { grid-template-columns: minmax(0,1.12fr) minmax(0,1fr) }
  .auth-panel { padding-inline: clamp(23px,3.8vw,40px) }
  .profiles { grid-template-columns: repeat(2,minmax(0,1fr)) }
}
@media (max-width: 710px) {
  .mast-inner, main, .site-footer { width: calc(100% - 32px) }
  .mast-inner { min-height: 64px }
  .brand { gap: 7px; font-size: 1.05rem; letter-spacing: .055em }
  .brand img { width: 34px; height: 34px }
  .header-note { display: none }
  nav { gap: 2px }
  nav button { padding: 5px 8px; font-size: .86rem; }
  nav .avatar { width: 38px; margin-left: 2px; }
  .auth-layout { grid-template-columns: 1fr; margin: 27px 0 37px; }
  .intro { min-height: clamp(22rem,64vw,30rem); border-right: 0; border-bottom: 1px solid var(--line-lit); padding: 25px; }
  .intro-art { background-position: center, center 42% }
  .intro-kicker { left: 25px; top: 20px; }
  .intro h1 { font-size: clamp(3.35rem,11vw,5.7rem); margin-bottom: 12px }
  .intro-copy > p { max-width: 25rem; }
  .intro-note { margin-top: 14px; padding-top: 10px; }
  .auth-panel { padding: 24px 25px 26px }
  .page-head { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 18px; padding-bottom: 18px; }
  .toolbar { flex-wrap: wrap; gap: 8px; }
  .item-right { grid-column: 2; justify-content: flex-start }
  .wish { grid-template-columns: 32px minmax(0,1fr); align-items: start; padding: 10px; gap: 4px 9px }
  .item-icon { width: 32px; height: 32px; }
  .item-icon img { width: 23px; height: 23px; }
  .item-check { min-height: 40px }
  .profiles { gap: 7px; }
  .profile { min-height: 59px; padding: 8px; gap: 7px; }
  .profile-letter { flex-basis: 27px; height: 31px; }
  .profile strong { font-size: 1.27rem; }
}
@media (max-width: 375px) {
  .brand { font-size: .96rem; }
  .brand img { width: 27px; height: 27px }
  .intro h1 { font-size: clamp(2.65rem,13vw,3.2rem); }
  nav button { padding-inline: 5px; }
  nav .avatar { width: 34px }
  .toolbar label { flex-wrap: wrap; }
}

@media (max-width: 345px) {
  body.signed .brand img { display: none; }
  .intro { padding-inline: 20px; }
  .intro-kicker { left: 20px; }
}

/* The handwritten guild UI leaves dense help text and form contents in the reading font. */
.brand { font-family: var(--hand); font-size: 1.53rem; letter-spacing: .1em; }
.intro h1, .page-head h1, h2 { font-family: var(--hand); letter-spacing: -.025em; }
.intro h1 { font-size: clamp(4rem,8vw,7.3rem); }
.page-head h1 { font-size: clamp(3.1rem,7vw,5.55rem); }
h2 { font-size: clamp(1.86rem,2.7vw,2.48rem); }
.switch button, nav button, .primary, .secondary, .auth-panel label, .dialog label, .account-panel label, .group-form label {
  font-family: var(--hand); font-size: 1.16rem; font-weight: 400;
}
input:not([type=checkbox]) { font-size: 1rem; }
.mast-controls { display: flex; align-items: center; gap: clamp(9px,2vw,21px); min-width: 0; }
.language { display: flex; border: 1px solid #6b5b3e; background: #141711; padding: 2px; gap: 1px; }
.language button { background: transparent; border: 1px solid transparent; color: var(--muted); min-height: 36px; min-width: 38px; padding: 4px; font: bold .83rem var(--rune); }
.language button:hover, .language button[aria-pressed=true] { border-color: #928057; color: var(--gold); background: #30291c; }
.legacy-toggle { color: var(--gold); font-size: .88rem; margin-top: 5px; }
.group-form { padding: 16px; margin-bottom: 16px; display: flex; gap: 10px; align-items: end; }
.group-form > div { flex: 1; min-width: 0; }
.group-form label { display: block; margin-bottom: 4px; }
.group-card { width: 100%; color: var(--bone); text-align: left; }
.group-card > span:last-child, .group-member-main { display: grid; min-width: 0; }
.group-card small, .group-tag { font: .85rem/1.35 var(--sans); color: var(--muted); }
.group-member { display: grid; gap: 3px; align-content: start; }
.group-member .link-button { justify-self: end; min-height: 36px; font-size: .86rem; }
.group-controls { margin-top: 22px; }
@media (max-width: 710px) {
  .intro h1 { font-size: clamp(3.4rem,13vw,6.1rem); }
  .brand { font-size: 1.28rem; letter-spacing: .06em; }
  nav button { font-size: 1.03rem; }
  .signed .mast-inner { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0 10px; padding-block: 8px; }
  .signed .mast-controls { display: contents; }
  .signed .language { grid-column: 2; grid-row: 1; justify-self: end; }
  .signed nav { grid-row: 2; grid-column: 1 / -1; width: 100%; justify-content: space-between; }
  .signed nav .avatar { margin-left: auto; }
}
@media (max-width: 390px) {
  .intro h1 { font-size: clamp(3rem,13.4vw,4.2rem); }
  .group-form { flex-wrap: wrap; }
  .group-form > div { flex-basis: 100%; }
}

/* Use the handwritten face for the game identity; UI labels use the reading face. */
nav button, .switch button, .primary, .secondary, .auth-panel label, .dialog label,
.account-panel label, .group-form label, .profile strong, .wish h3 {
  font-family: var(--sans); font-weight: 650;
}
nav button, .switch button, .primary, .secondary, .auth-panel label, .dialog label,
.account-panel label, .group-form label { font-size: .94rem; }
.profile strong, .wish h3 { font-size: 1.04rem; line-height: 1.4; }
.page-head h1 { font-family: var(--sans); font-weight: 680; font-size: clamp(2.15rem,4.6vw,3.8rem); letter-spacing: -.035em; line-height: 1.14; }
h2 { line-height: 1.2; letter-spacing: 0; }
.brand { letter-spacing: .045em; }
.brand img { width: 40px; height: 38px; object-fit: contain; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #584b32; padding: 11px 0 15px; color: var(--muted); font-size: .875rem; }
.footer-brand, .footer-links { display: flex; align-items: center; gap: 10px; }
.footer-brand { color: var(--accent); font-family: var(--hand); font-size: 1rem; }
.footer-brand img { object-fit: contain; }
.footer-links .link-button { min-height: 38px; font-size: .85rem; text-align: left; }
.support-dialog { width: min(660px, calc(100% - 28px)); padding: clamp(18px, 4vw, 32px); }
.support-layout {
  display: grid;
  grid-template: "art copy" auto "art payment" auto / minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 16px 24px;
}
.support-copy { grid-area: copy; }
.support-copy h2 { padding-right: 22px; }
.support-copy > p:last-child { margin: 8px 0 0; }
.support-art {
  grid-area: art;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-width: 0;
  padding: 8px 0;
  background: radial-gradient(ellipse at center, #89974c24, transparent 70%);
}
.support-mascot { display: block; width: min(100%, 216px); height: auto; }
.support-transfer { grid-area: payment; min-width: 0; }
.support-dialog .support-payment { margin: 0; }
.support-payment p { margin: 0; }
.support-payment .link-button { min-height: 44px; padding-block: 9px; }
.support-dialog .support-milestone { margin: 0 0 4px; color: var(--olive); font-size: .94rem; }
.support-payment img { width: clamp(104px, 20vw, 144px); }
.directory-controls { padding: clamp(14px,3vw,23px); }
.directory-tabs, .alphabet { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.directory-tabs { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 14px; gap: 8px; }
.directory-tabs button, .alphabet button { background: #191c15; color: var(--bone); border: 1px solid var(--line); border-radius: 2px; }
.directory-tabs button { padding: 7px 12px; min-height: 39px; }
.alphabet button { min-width: 32px; min-height: 35px; padding: 5px 8px; }
.directory-tabs button:hover, .alphabet button:hover,
.directory-tabs button[aria-pressed=true], .alphabet button[aria-pressed=true] {
  border-color: var(--line-lit); color: var(--gold); background: #343025;
}
.directory-controls .search { margin: 0 0 14px; padding: 0; }
.directory-results { margin-top: 20px; }
.directory-section + .directory-section { margin-top: 21px; }
.directory-title { font: 650 1.2rem/1.2 var(--sans); padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--gold); }
.directory-names { list-style: none; margin: 0; padding: 3px 0; }
.directory-names a { display: block; width: fit-content; min-height: 33px; padding: 5px 4px; color: #dce5b5; font-size: 1rem; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.directory-names a:hover { color: #f0efbf; }
.profile-heading { display: flex; align-items: center; gap: 12px; }
.profile-heading img { flex: 0 0 46px; width: 46px; height: 46px; object-fit: cover; border: 1px solid var(--line-lit); border-radius: 50%; }
.avatar { display: inline-grid; place-items: center; vertical-align: middle; }
.avatar img, .photo-preview img { width: 100%; height: 100%; object-fit: cover; }
nav .avatar img { width: 32px; height: 32px; border-radius: 2px; }
.photo-preview { width: 72px; height: 72px; display: grid; place-items: center; margin: 14px 0; border: 1px solid var(--line-lit); background: var(--well); color: var(--olive); font-size: 1.55rem; overflow: hidden; border-radius: 50%; }
.photo-form input[type=file] { min-height: 46px; font-size: .9rem; }
@media (max-width: 410px) {
  .site-footer { align-items: flex-start; }
  .footer-brand { font-size: .9rem; padding-top: 8px; }
  .footer-brand img { display: none; }
  .footer-links { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .footer-links .link-button { font-size: .78rem; }
  .alphabet button { min-width: 31px; min-height: 38px; }
  .brand img { width: 31px; height: 30px; }
}
.wishlist-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bookmark-icon { color: var(--gold); font-size: 1.15em; line-height: 1; }

@media (max-width: 559px) {
  .mast-inner { min-height: 59px; }
  .language button { min-width: 44px; min-height: 44px; }
  .signed .mast-inner { row-gap: 6px; padding-block: 5px 7px; }
  .signed nav {
    display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) 44px; gap: 4px;
    background: #141711; border: 1px solid var(--line); padding: 3px;
  }
  .signed nav button { min-width: 0; min-height: 44px; padding: 4px 2px; font-size: .875rem; line-height: 1.15; }
  .signed nav .avatar { width: 44px; margin: 0; }
  body.signed .brand img { display: block; }

  .auth-layout { margin: 15px 0 21px; }
  .intro {
    min-height: 0; padding: 16px 16px 14px; justify-content: flex-start;
  }
  .intro::after { inset: 5px; }
  .intro-art {
    background-image: linear-gradient(90deg, #121610f5 9%, #121610db 55%, #12161084 100%), url("/festive-vault.webp");
    background-position: center, center 39%;
  }
  .intro-kicker { position: static; padding: 0; background: none; border: none; font-size: .71rem; margin-bottom: 6px; }
  .intro h1 { font-size: clamp(2.55rem, 11vw, 4rem); margin: 0 0 7px; }
  .intro-copy > p { font-size: .97rem; line-height: 1.4; max-width: 29ch; }
  .intro-note { margin-top: 9px; padding-top: 6px; font-size: .86rem; line-height: 1.4; }
  .auth-panel { padding: 16px; }
  .auth-panel::after { inset: 5px; }
  .auth-kicker { display: none; }
  .auth-panel h2 { margin: 13px 0 7px; font-size: 1.65rem; }
  .auth-panel label { margin-top: 9px; }
  .auth-panel .help { margin-top: 4px; }
  .auth-panel .primary { margin-top: 12px; }
  .auth-panel .auth-foot { margin-top: 9px; }

  .workspace { padding: 24px 0 42px; }
  .page-head h1 { margin: 5px 0 8px; font-size: clamp(1.95rem, 8vw, 2.45rem); }
  .page-head p { font-size: .95rem; }
  .page-head > div { min-width: 0; width: 100%; }
  .wishlist-actions > * { flex: 1 1 120px; }
  .page-head .primary { flex-shrink: 1; }
  .directory-controls { padding: 12px; }
  .directory-tabs { gap: 5px; padding-bottom: 9px; margin-bottom: 10px; }
  .directory-tabs button { flex: 1; min-height: 44px; }
  .directory-controls .search { margin-bottom: 10px; gap: 7px; }
  .search button, .group-form button { padding-inline: 12px; }
  .alphabet { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; align-items: stretch; }
  .alphabet button { min-width: 0; min-height: 40px; padding: 3px 0; }
  .alphabet button:first-child { grid-column: 1 / -1; justify-self: start; padding: 5px 11px; }
  .directory-results { margin-top: 16px; }
  .directory-names a { width: 100%; min-height: 44px; padding-block: 10px; }
  .toolbar { align-items: flex-start; }
  .toolbar label { display: grid; gap: 4px; }
  .toolbar select, input:not([type=checkbox]) { font-size: 1rem; }
  .item-right { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: 5px; padding-top: 2px; }
  .item-check, .wish button.link-button { min-height: 44px; }
  .group-form { flex-wrap: wrap; }
  .group-form > div, .group-form > button { flex-basis: 100%; }
  .account-panel { padding: 16px; }
  .account-actions { gap: 8px; }

  .dialog {
    max-height: calc(100dvh - 24px);
    padding: 16px;
  }
  .dialog h2 { padding-right: 28px; }
  .dialog .close { top: 4px; right: 4px; min-width: 44px; min-height: 44px; }
  .dialog-actions { margin-top: 14px; }
  .dialog-actions > * { flex: 1; }
  .support-layout {
    grid-template: "copy copy" auto "art payment" auto / minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
  }
  .support-copy > p:last-child { font-size: .94rem; }
  .support-art { padding: 0; align-self: start; }
  .support-mascot { width: min(100%, 164px); }
  .support-payment { display: grid; justify-items: start; gap: 7px; font-size: .9rem; }
  .support-payment img { width: min(100%, 132px); }
  .site-footer { align-items: center; padding-block: 5px; }
  .footer-brand { padding: 0; white-space: nowrap; }
  .footer-links .link-button { min-height: 44px; padding-block: 6px; font-size: .875rem; }
}

@media (max-width: 359px) {
  .mast-inner, main, .site-footer { width: calc(100% - 24px); }
  .alphabet { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .profiles { grid-template-columns: minmax(0,1fr); }
  .footer-links { gap: 4px; }
}

/* Wishlist accents and readable nickname colors. */
[data-name-color="gold"] { --nick-ink: #eed394; }
[data-name-color="moss"] { --nick-ink: #c5e083; }
[data-name-color="lavender"] { --nick-ink: #ddbbff; }
[data-name-color="sky"] { --nick-ink: #a7d6ff; }
[data-name-color="rose"] { --nick-ink: #f9b5cf; }
[data-name-color="ember"] { --nick-ink: #ffc098; }
[data-name-color="teal"] { --nick-ink: #99e2cc; }
[data-name-color="pearl"] { --nick-ink: #edeae2; }
[data-name-color], .directory-names a[data-name-color] { color: var(--nick-ink); }
.directory-names a[data-name-color]:hover { color: var(--nick-ink); text-decoration-thickness: 2px; }
.wishlist-head { position: relative; }
.wishlist-head h1, .profile-heading > span, .color-preview { min-width: 0; overflow-wrap: anywhere; }
.wishlist-head::after {
  content: ""; position: absolute; bottom: -1px; left: 0; width: min(160px, 48%); height: 1px;
  background: linear-gradient(90deg, #cab174, transparent);
}
.toolbar .wishlist-count { display: inline-flex; gap: 8px; align-items: center; color: var(--gold); font-weight: 650; }
.wishlist-count span { color: #b79b5e; font-size: .64em; }
.wish {
  border-inline-start: 3px solid #9a7e4c; border-radius: 2px;
  background: radial-gradient(ellipse at 12% 0, #9d7e3c18, transparent 70%), linear-gradient(105deg, #292820, #1d211a);
  transition: border-color .16s ease;
}
.wish:hover { border-color: #9a8658; }
.wish-copy { min-width: 0; }
.wish[data-done=true] { border-inline-start-color: #9ba96b; }
.wish[data-surprise=true] {
  border-color: #775894; border-inline-start-color: #c196e9;
  background: radial-gradient(ellipse at 15% 0, #9664bd28, transparent 73%), linear-gradient(105deg,#30243a,#211c29);
}
.wish[data-surprise=true] .item-icon { color: #e6befd; border-color: #815d9d; background: #281c33; font-size: 1.18rem; }
.wish[data-surprise=true] .item-right { border-color: #6a507f; }
.wish[data-surprise=true] h3 { color: #f5e8ff; }
.surprise-tag {
  display: inline-block; margin-bottom: 4px; padding: 2px 6px; border: 1px solid #815d9d;
  color: #edccff; background: #452c55; font-size: .8rem; font-weight: 650; line-height: 1.2;
}
.color-choices { min-width: 0; margin: 14px 0 0; padding: 0; border: 0; display: grid; gap: 7px; grid-template-columns: repeat(auto-fit,minmax(104px,1fr)); }
.color-choices legend { padding: 0 0 8px; color: var(--bone); font-size: .94rem; }
.color-preview span { font-weight: 750; }
.color-form .name-choice { display: flex; position: relative; align-items: stretch; margin: 0; }
.name-choice input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.name-chip {
  display: flex; gap: 6px; align-items: center; width: 100%; min-height: 44px; padding: 5px 8px;
  background: #191c15; border: 1px solid var(--line); cursor: pointer; font-size: .89rem;
}
.name-chip::before { content: ""; width: 11px; height: 11px; flex: 0 0 11px; background: currentColor; border-radius: 50%; }
.name-choice input:checked + .name-chip { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; background: #303126; }
.name-choice input:focus-visible + .name-chip { outline: 2px solid currentColor; outline-offset: 2px; }
.footer-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.footer-copyright { color: var(--muted); font-size: .8rem; }
@media (max-width: 559px) {
  .site-footer { flex-wrap: wrap; align-items: center; gap: 1px 14px; padding-top: 9px; }
  .footer-links { flex-wrap: wrap; justify-content: flex-start; }
  .wishlist-head { gap: 14px; }
  .wish[data-surprise=true] .item-icon { font-size: 1rem; }
}

/* The guide reads like a set of cards from the same vault. */
body:has(.guide-open) { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
.guide-open {
  position: fixed; z-index: 4; right: max(14px, env(safe-area-inset-right, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 7px 12px 7px 9px;
  border: 1px solid #8e7851; border-radius: 3px; background: #26251c; color: #f0dda9;
  box-shadow: inset 0 0 0 2px #13161080, 0 3px 14px #0e100dcc;
  font-weight: 650; font-size: .92rem;
}
.guide-open:hover { border-color: var(--gold); background: #333023; }
.guide-open-mark {
  display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #9c8558;
  border-radius: 50%; color: var(--gold); line-height: 1;
}
body:has(.guide-open) .toast { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
.guide-dialog {
  width: min(660px, calc(100% - 24px)); padding: clamp(14px, 3.8vw, 29px);
  max-height: calc(100dvh - 24px);
}
.guide-dialog .close { min-width: 44px; min-height: 44px; }
.guide-eyebrow {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 16px; padding-right: 38px; margin-bottom: 12px;
  font-size: .89rem; color: var(--muted);
}
.guide-eyebrow span:first-child { color: var(--gold); font-weight: 700; }
.guide-card {
  --guide-accent: #ead499; --guide-edge: #8d7446; --guide-tint: #c9a95a27;
  display: grid; grid-template-columns: minmax(0, .32fr) minmax(0, 1fr);
  border: 1px solid var(--guide-edge); background: #1d2019; min-height: 237px;
}
.guide-card[data-tone="moss"] { --guide-accent: #d3e6a2; --guide-edge: #7e8d56; --guide-tint: #b6d36729; }
.guide-card[data-tone="purple"] { --guide-accent: #e6c6ff; --guide-edge: #8c669f; --guide-tint: #b980dc2b; }
.guide-art {
  display: grid; align-content: center; justify-items: center; gap: 12px; padding: 14px 6px;
  background: radial-gradient(ellipse at center, var(--guide-tint), transparent 76%), #171a15;
  border-inline-end: 1px solid var(--guide-edge);
}
.guide-art img { display: block; width: min(85%, 85px); height: auto; }
.guide-card-icon {
  display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--guide-edge);
  border-radius: 3px; color: var(--guide-accent); font-size: 1.15rem;
}
.guide-text { padding: clamp(13px, 3.2vw, 23px); min-width: 0; }
.guide-dialog .guide-text h2 { padding: 0; margin: 0; color: var(--guide-accent); font-size: clamp(1.75rem,4vw,2.4rem); line-height: 1.1; }
.guide-dialog p#guide-copy { color: var(--bone); margin: 9px 0 0; line-height: 1.43; }
.guide-dialog p#guide-note {
  border-inline-start: 2px solid var(--guide-edge); background: var(--guide-tint);
  padding: 8px 10px; margin: 13px 0 0; color: #f1e9d8; font-size: .97rem; line-height: 1.4;
}
.guide-track { display: flex; gap: 6px; margin: 12px 0 0; }
.guide-track span { flex: 1; background: #191b15; border: 1px solid #605539; height: 5px; }
.guide-track span[data-progress="past"] { background: #9c8b59; }
.guide-track span[data-progress="current"] { background: #dfc58d; border-color: #dfc58d; }
.guide-actions, .guide-buttons { display: flex; align-items: center; gap: 8px; }
.guide-actions { align-items: flex-start; justify-content: space-between; margin-top: 12px; }
.guide-skip { min-height: 44px; color: var(--muted); font-size: .89rem; }
.guide-buttons { margin-left: auto; }
.guide-buttons > * { min-height: 44px; }
@media (max-width: 559px) {
  .guide-card { grid-template-columns: minmax(0,1fr); min-height: 0; }
  .guide-art {
    display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 13px;
    border-inline-end: 0; border-bottom: 1px solid var(--guide-edge);
  }
  .guide-art img { width: 42px; }
  .guide-dialog { width: calc(100% - 18px); padding: 11px; }
  .guide-text { padding: 11px; }
  .guide-actions { flex-direction: column-reverse; gap: 1px; }
  .guide-buttons { width: 100%; }
  .guide-buttons > * { flex: 1; }
  .guide-skip { align-self: center; }
}

/* The public door to the vault uses the existing scene and guide runes. */
.welcome { margin: clamp(24px, 5vh, 58px) 0 34px; }
.welcome-stage {
  display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  position: relative; isolation: isolate; overflow: hidden; min-height: 380px;
  border: 1px solid #816b42; outline: 1px solid #483b27; outline-offset: 4px;
  background: radial-gradient(ellipse at 18% 0, #3b3926, transparent 62%), #1a1d16;
  box-shadow: 0 14px 40px #090b08a8;
}
.welcome-stage::after { content: ""; position: absolute; inset: 8px; border: 1px solid #9a845440; pointer-events: none; }
.welcome-copy { padding: clamp(25px, 4.5vw, 65px); align-self: center; position: relative; z-index: 1; }
.welcome-copy .overline { margin: 0 0 14px; }
.welcome h1 { margin: 0; color: var(--bone); font: normal clamp(3.35rem, 7vw, 6.7rem)/.97 var(--hand); letter-spacing: -.025em; }
.welcome h1 span { color: var(--olive); }
.welcome-lead { color: #e4dcc7; font-size: clamp(1.02rem,1.65vw,1.18rem); line-height: 1.52; max-width: 35ch; margin: 16px 0 22px; }
.welcome-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 16px; }
.welcome-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; }
.welcome-actions .primary { text-decoration: none; }
.welcome-actions .link-button, .auth-return { color: var(--gold); }
.auth-return { align-self: flex-start; margin-top: 12px; min-height: 44px; display: inline-flex; align-items: center; font-size: .9rem; }
.welcome-scene {
  background-image: linear-gradient(90deg, #1a1d16 0%, #171a1300 38%), linear-gradient(0deg,#11140d52,transparent 58%), url('/festive-vault.webp');
  background-position: center, center, center 48%; background-size: cover;
  background-color: #222820; min-width: 0;
}
.welcome-runes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; list-style: none; padding: 0; margin: 17px 0 0; }
.welcome-runes li { display: flex; align-items: flex-start; gap: 12px; border: 1px solid #665737; background: #22251c; padding: clamp(11px, 1.7vw, 19px); }
.welcome-runes li:last-child { border-color: #755891; background: #26202e; }
.welcome-rune { font: 1.12rem/1 var(--sans); display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid #887449; color: var(--gold); background: #171b14; }
.welcome-runes li:last-child .welcome-rune { color: #e6befd; border-color: #997bb2; background: #2a1c37; }
.welcome-runes h2 { font-size: clamp(1.24rem, 2vw, 1.61rem); color: var(--bone); }
.welcome-runes p { font-size: .92rem; color: var(--muted); line-height: 1.42; margin: 4px 0 0; }
nav button:has(.nav-rune) { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.nav-rune { font: 1.08rem/1 var(--sans); color: var(--gold); }
.item-icon { font: 1.13rem/1 var(--sans); color: var(--gold); }
.wish[data-done=true]:not([data-surprise]) .item-icon { color: var(--olive); }
.wishlist-head .wishlist-byline { color: var(--muted); font-size: .94rem; font-weight: 650; }
.wishlist-head .wishlist-message {
  margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 34rem;
  border-inline-start: 2px solid #977b4a; padding: 8px 11px;
  color: var(--bone); background: #b3935114;
}
#list-message { display: block; width: 100%; min-width: 0; padding: 9px 11px; min-height: 84px; border: 1px solid #716342;
  background: var(--well); color: var(--bone); border-radius: 0; font: inherit; resize: vertical; }
#list-details-dialog .help { margin: 7px 0 0; font-size: .94rem; }
@media (max-width: 740px) {
  .welcome-stage { grid-template-columns: minmax(0,1fr) minmax(0,.82fr); min-height: 0; }
  .welcome h1 { font-size: clamp(3.05rem,9vw,4.7rem); }
  .welcome-runes li { gap: 8px; }
}
@media (max-width: 559px) {
  .welcome { margin: 15px 0 25px; }
  .welcome-stage { grid-template-columns: minmax(0,1fr); }
  .welcome-stage::after { inset: 5px; }
  .welcome-copy { padding: 17px 16px 9px; }
  .welcome-copy .overline { margin-bottom: 8px; }
  .welcome-lead { font-size: 1rem; line-height: 1.46; margin: 11px 0 13px; }
  .welcome-actions { column-gap: 13px; }
  .welcome-scene {
    height: clamp(125px, 43vw, 210px);
    background-image: linear-gradient(180deg,#1a1d16 0%,#1a1d1600 40%,#14160f45 100%), url('/festive-vault.webp');
    background-size: cover; background-position: center, center 45%;
  }
  .welcome-runes { grid-template-columns: minmax(0,1fr); margin-top: 12px; gap: 6px; }
  .welcome-runes li { gap: 10px; }
  .signed nav button:has(.nav-rune) { flex-direction: column; gap: 2px; min-height: 46px; }
  .nav-rune { font-size: .91rem; }
}

/* Small guild seals and the one wish the owner puts first. */
.guild-crest {
  --crest-ink: #e7cd92; --crest-back: #302719; display: inline-grid; place-items: center;
  width: 39px; height: 43px; flex: 0 0 39px; border: 1px solid currentColor;
  border-radius: 2px 2px 11px 11px; color: var(--crest-ink);
  background: linear-gradient(155deg,#ffffff10,transparent 58%), var(--crest-back);
  box-shadow: inset 0 0 0 2px #15160f75;
}
.guild-crest[data-crest="blade"] { --crest-ink: #bed0da; --crest-back: #252c33; }
.guild-crest[data-crest="slime"] { --crest-ink: #cde894; --crest-back: #252f1a; }
.guild-crest[data-crest="moon"] { --crest-ink: #dec3f6; --crest-back: #30243c; }
.guild-crest[data-crest="leaf"] { --crest-ink: #bfdabe; --crest-back: #202e27; }
.guild-crest[data-crest=""] { --crest-ink: #b7b2a1; --crest-back: #24251e; }
.guild-crest svg { width: 65%; height: auto; }
.wishlist-title-with-crest { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.wishlist-title-with-crest > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.crest-options { min-width: 0; border: 0; padding: 0; margin: 10px 0 0; }
.crest-options legend { color: var(--bone); font-size: .94rem; font-weight: 650; padding: 0 0 6px; }
.crest-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 5px; }
#list-details-dialog .crest-choice { position: relative; margin: 0; min-width: 0; }
.crest-choice input { position: absolute; width: 1px; min-height: 0; height: 1px; margin: 0; opacity: 0; }
.crest-choice-inner {
  min-height: 64px; display: grid; gap: 4px; place-content: center; justify-items: center; text-align: center;
  padding: 4px 2px; color: var(--bone); background: #181c15; border: 1px solid var(--line); cursor: pointer;
  font-size: .77rem; line-height: 1.15;
}
.crest-choice-inner .guild-crest { width: 28px; height: 29px; }
.crest-choice input:checked + .crest-choice-inner { border-color: var(--gold); background: #322c1f; box-shadow: inset 0 0 0 1px #b69a61; }
.crest-choice input:focus-visible + .crest-choice-inner { outline: 2px solid var(--gold); outline-offset: 2px; }
.wish[data-pinned=true] {
  border-color: #9c8050; border-inline-start-color: #ebc66d;
  background: radial-gradient(ellipse at 12% 0, #9d7e3c2b, transparent 70%), linear-gradient(100deg,#322a1b,#21241a);
}
.wish[data-pinned=true] .item-icon { border-color: #a78a4f; color: #f0cf86; background: #2f2719; }
.top-wish-tag {
  display: inline-block; margin-bottom: 4px; padding: 2px 6px; border: 1px solid #9a7e49;
  color: #f6db9b; background: #483920; font-size: .8rem; font-weight: 650; line-height: 1.2;
}
.wish button.wish-pin-action { color: #f0d7a1; }
@media (max-width: 559px) {
  .wishlist-title-with-crest > .guild-crest { width: 32px; height: 36px; flex-basis: 32px; }
  .crest-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .crest-choice-inner { min-height: 56px; }
}
