/* Torgaria: the night market. Flat woodcut look: indigo night, parchment, copper, vermilion, lantern gold. */

/* ------------------------------------------------------------------ fonts (self-hosted, OFL) */
@font-face { font-family: "Grenze Gotisch"; src: url("fonts/grenze-gotisch-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Grenze Gotisch"; src: url("fonts/grenze-gotisch-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "IM Fell English SC"; src: url("fonts/im-fell-english-sc-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("fonts/alegreya-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("fonts/alegreya-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("fonts/alegreya-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/caveat-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/caveat-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("fonts/courier-prime-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("fonts/courier-prime-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ------------------------------------------------------------------ tokens */
:root {
  --ink: #0f1430;
  --night: #141a3c;
  --night-2: #1d2550;
  --night-3: #2e3b80;
  --night-4: #3d4c98;
  --parch: #f1e3c2;
  --parch-2: #e7d3a6;
  --parch-3: #d4b983;
  --parch-ink: #2b2016;
  --copper: #c47a3e;
  --copper-2: #dd9659;
  --copper-dk: #8e5228;
  --verm: #d63c25;
  --verm-dk: #9e2914;
  --gold: #f2b84b;
  --gold-2: #ffd88a;
  --wood: #7d4a2b;
  --wood-dk: #4e2e1a;
  --wood-md: #5e3822;
  --verd: #3e6e60;
  --slate: #1f2b2a;
  --text: var(--parch);
  --text-dim: #cbbd9c;
  --f-display: "Grenze Gotisch", Georgia, "Times New Roman", serif;
  --f-label: "IM Fell English SC", Georgia, serif;
  --f-text: "Alegreya", Georgia, serif;
  --f-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --f-mono: "Courier Prime", "Courier New", ui-monospace, monospace;
  --maxw: 1240px;
  --gut: clamp(16px, 4vw, 40px);
  --print: 0 4px 0 var(--ink);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--night);
  background-image:
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(241, 227, 194, .018) 5px 6px),
    radial-gradient(1200px 500px at 50% -10%, #26306a 0%, transparent 70%);
  color: var(--text);
  font: 400 18px/1.55 var(--f-text);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 7% 12%, var(--parch) 50%, transparent 51%),
    radial-gradient(1px 1px at 23% 34%, var(--parch) 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 41% 8%, var(--gold-2) 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 27%, var(--parch) 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 76% 14%, var(--parch) 50%, transparent 51%),
    radial-gradient(1px 1px at 89% 41%, var(--parch) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 15% 66%, var(--parch) 50%, transparent 51%),
    radial-gradient(1px 1px at 67% 72%, var(--parch) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 94% 86%, var(--gold-2) 50%, transparent 51%);
  background-size: 640px 420px;
  opacity: .55;
}
img { max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-2); }
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-weight: 800; line-height: 1.02; letter-spacing: .005em; }
p { margin: 0 0 .8em; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.eyebrow { font-family: var(--f-label); color: var(--copper-2); letter-spacing: .08em; font-size: 15px; margin: 0 0 .4em; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--text-dim); max-width: 38em; }
.fine { font-size: 14px; color: var(--text-dim); }
.ic { width: 1em; height: 1em; vertical-align: -.14em; flex: none; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
[tabindex="-1"]:focus-visible { outline: none; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--ink); padding: 10px 16px; font-weight: 700; border: 2px solid var(--ink); border-radius: 4px; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ buttons */
.btn-copper, .btn-verm, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: 8px 20px;
  border: 2.5px solid var(--ink); border-radius: 6px;
  font-family: var(--f-label); font-size: 18px; letter-spacing: .03em; text-decoration: none;
  box-shadow: var(--print);
  transition: transform .12s ease, box-shadow .12s ease, background-color .15s;
}
.btn-copper { background: var(--copper); color: var(--ink); }
.btn-copper:hover { background: var(--copper-2); color: var(--ink); }
.btn-verm { background: var(--verm); color: var(--parch); }
.btn-verm:hover { background: #e24a32; color: #fff8e8; }
.btn-ghost { background: transparent; color: var(--parch); border-color: var(--copper); box-shadow: none; }
.btn-ghost:hover { background: rgba(196, 122, 62, .16); color: var(--parch); }
.btn-copper:active, .btn-verm:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-copper:disabled, .btn-verm:disabled, .btn-ghost:disabled { opacity: .55; transform: none; }
.btn-small { min-height: 36px; padding: 4px 12px; font-size: 15px; }
.chip { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 4px 12px; border: 2px solid var(--parch-ink); border-radius: 6px; background: var(--parch-2); color: var(--parch-ink); font-family: var(--f-label); font-size: 15px; }
.chip:hover { background: var(--gold-2); }
.chip-sq { width: 40px; padding: 0; }
.chip-sq .ic { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ top bar: the hanging town sign */
.townbar { position: sticky; top: 0; z-index: 40; background: linear-gradient(var(--night-2), #18204a); border-bottom: 3px solid var(--ink); box-shadow: 0 3px 0 var(--copper-dk), 0 10px 24px rgba(0, 0, 0, .35); }
.townbar-beam {
  height: 12px;
  background:
    repeating-linear-gradient(90deg, transparent 0 140px, rgba(0, 0, 0, .25) 140px 142px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 2px, transparent 2px 5px),
    var(--wood);
  border-bottom: 2px solid var(--ink);
}
.townbar-in { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); display: flex; align-items: center; gap: 18px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--parch); flex: none; }
.brand img { width: 48px; height: 48px; border-radius: 50%; }
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 32px; line-height: 1; color: var(--parch); text-shadow: 0 2px 0 var(--ink); }
.brand:hover .brand-name { color: var(--gold-2); }
.nav { flex: 1; min-width: 0; align-self: stretch; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; height: 100%; justify-content: center; }
.nav li { display: flex; }
.nav a {
  position: relative; display: flex; align-items: flex-start; padding-top: 14px; text-decoration: none;
  transform-origin: 50% 0; transition: transform .25s ease;
}
.nav a::before, .nav a::after { content: ""; position: absolute; top: 0; width: 2px; height: 16px; background: var(--copper); }
.nav a::before { left: 22%; }
.nav a::after { right: 22%; }
.nav a span {
  display: block; padding: 6px 14px 7px; border: 2px solid var(--ink); border-radius: 4px;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 6px), var(--wood);
  color: var(--parch); font-family: var(--f-label); font-size: 16px; white-space: nowrap; box-shadow: 0 3px 0 var(--ink);
}
.nav a:hover { transform: rotate(-2deg); }
.nav a:hover span { color: var(--gold-2); }
.nav a[aria-current="page"] span { background: var(--gold); color: var(--ink); box-shadow: 0 3px 0 var(--ink), 0 0 22px rgba(242, 184, 75, .45); }
.nav a:focus-visible { outline: none; }
.nav a:focus-visible span { outline: 3px solid var(--gold); outline-offset: 3px; }

.wallet { position: relative; flex: none; margin-left: auto; }
.lamp-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 4px 16px 4px 10px;
  border: 2.5px solid var(--ink); border-radius: 24px; background: var(--wood-dk); color: var(--parch);
  font-family: var(--f-label); font-size: 17px; box-shadow: var(--print);
}
.lamp-btn:hover { background: var(--wood-md); }
.lamp-ic { width: 20px; height: 30px; color: var(--parch-3); }
.lamp-glass { fill: #3a3550; transition: fill .3s; }
.lamp-flame { opacity: 0; transition: opacity .3s; }
.lamp-btn:hover .lamp-glass { fill: #6b5838; }
.lamp-btn.is-lit .lamp-glass, .lamp-btn.is-pending .lamp-glass { fill: var(--gold); }
.lamp-btn.is-lit .lamp-flame { opacity: 1; animation: flicker 2.6s infinite; transform-origin: 50% 80%; transform-box: fill-box; }
.lamp-btn.is-pending .lamp-flame { opacity: 1; animation: flicker .6s infinite; transform-box: fill-box; }
.lamp-btn.is-lit { background: #3a2817; box-shadow: var(--print), 0 0 26px rgba(242, 184, 75, .35); }
.lamp-big { margin-top: 6px; }
.wallet-menu { position: absolute; right: 0; top: calc(100% + 10px); width: min(320px, calc(100vw - 32px)); padding: 16px; background: var(--parch); color: var(--parch-ink); border: 2.5px solid var(--ink); border-radius: 8px; box-shadow: 6px 6px 0 rgba(0, 0, 0, .4); z-index: 50; }
.wallet-menu-name { font-family: var(--f-label); margin-bottom: 2px; }
.wallet-menu-addr { font-size: 13px; word-break: break-all; }
.wallet-menu .btn-ghost { color: var(--parch-ink); border-color: var(--copper-dk); width: 100%; font-size: 16px; }
.wallet-menu :focus-visible, .on-parch :focus-visible { outline-color: var(--verm-dk); }

/* devnet: a slim warning strip under the town sign */
.devnet-strip { margin: 0; padding: 6px var(--gut); text-align: center; font-size: 15px; line-height: 1.35; color: var(--ink); background: repeating-linear-gradient(-45deg, var(--gold) 0 14px, #e8a93a 14px 28px); border-bottom: 2px solid var(--ink); }
.devnet-strip[hidden] { display: none; }
.devnet-strip b { font-family: var(--f-label); font-weight: 400; letter-spacing: .03em; }

/* ------------------------------------------------------------------ page frame */
main { display: block; min-height: 60vh; }
.page > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; padding-left: var(--gut); padding-right: var(--gut); }
.page-head { padding-top: 48px; margin-bottom: 28px; }
.page-head h1, .page-head h2 { font-size: clamp(40px, 6vw, 72px); margin-bottom: 12px; }
.sec-h { font-size: clamp(30px, 3.4vw, 40px); margin-bottom: 10px; }
.sec-sub { color: var(--text-dim); font-size: 16px; max-width: 40em; }

.loading { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 120px 16px; font-family: var(--f-label); color: var(--text-dim); font-size: 19px; }
.loading-lamp { width: 22px; height: 34px; border: 2.5px solid var(--ink); border-radius: 5px 5px 7px 7px; background: var(--gold); box-shadow: 0 0 24px 6px rgba(242, 184, 75, .5); transform-origin: 50% -12px; animation: swing 1.6s ease-in-out infinite; position: relative; }
.loading-lamp::before { content: ""; position: absolute; left: 50%; top: -14px; width: 2px; height: 12px; background: var(--copper); }
.offer-body .loading { padding: 40px 8px; color: var(--parch-ink); font-size: 17px; }

.notice { padding: 18px 20px; border: 2.5px solid var(--ink); border-radius: 8px; background: var(--night-2); margin: 24px 0; }
.notice-err { border-color: var(--verm); background: #2a1830; }
.notice-title { font-family: var(--f-display); font-size: 28px; margin-bottom: 6px; }
.page > .notice { margin-top: 60px; margin-bottom: 60px; }
.lost { padding-top: 90px; padding-bottom: 90px; text-align: center; }
.lost h1 { font-size: clamp(44px, 7vw, 80px); margin-bottom: 12px; }

/* ------------------------------------------------------------------ HOME: market square */
.square {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(240px, 330px) minmax(0, 1fr);
  gap: 24px clamp(16px, 3vw, 44px); align-items: end; padding-top: 40px; padding-bottom: 10px;
}
.square-sky { position: absolute; inset: 0; pointer-events: none; }
.moon { position: absolute; right: calc(var(--gut) + 20px); top: 18px; width: 58px; height: 58px; border-radius: 50%; box-shadow: -13px 7px 0 0 var(--parch); transform: rotate(-12deg); filter: drop-shadow(0 0 18px rgba(241, 227, 194, .35)); }
.square-title { position: relative; align-self: center; padding-bottom: 40px; }
.square-title h1 { font-size: clamp(40px, 5vw, 68px); line-height: .94; margin-bottom: 20px; text-shadow: 0 3px 0 var(--ink); }
.h-accent { color: var(--gold); }
.square-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.square-tower { position: relative; display: flex; flex-direction: column; align-items: center; }
.square-tower::before { content: ""; position: absolute; left: 50%; top: 30%; width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(242, 184, 75, .16), transparent 70%); pointer-events: none; }
.tower-wrap { position: relative; width: 100%; max-width: 320px; }
.tower-svg { display: block; width: 100%; height: auto; overflow: visible; }
.clock-num { font-family: var(--f-label); font-size: 10.5px; fill: var(--ink); }
.tower-svg .hand { transition: transform .3s cubic-bezier(.4, 2.2, .6, 1); }
.tower-svg .beam { transform-origin: 160px 38px; animation: balance 9s ease-in-out infinite; }
.tower-flame, .door-fire { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 2.2s infinite; }
.door-fire + .door-fire { animation-duration: 1.7s; }
.tower-window { animation: glow 4s ease-in-out infinite; }
.tower-plaque {
  position: relative; width: min(100%, 300px); margin-top: -22px; padding: 14px 16px 12px; text-align: center;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 2px, transparent 2px 7px), var(--wood);
  border: 3px solid var(--ink); border-radius: 6px; box-shadow: var(--print), 0 0 0 4px var(--wood-dk) inset;
}
.tower-plaque::before, .tower-plaque::after { content: ""; position: absolute; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--copper); border: 1.5px solid var(--ink); }
.tower-plaque::before { left: 8px; }
.tower-plaque::after { right: 8px; }
.plaque-k { font-family: var(--f-label); font-size: 16px; margin: 0; color: var(--parch); letter-spacing: .06em; }
.plaque-v { font-size: clamp(40px, 4.4vw, 52px); font-weight: 700; line-height: 1.05; color: var(--gold); margin: 2px 0 4px; text-shadow: 0 0 18px rgba(242, 184, 75, .55), 0 2px 0 var(--ink); }
.plaque-s { font-size: 14px; color: var(--parch-2); margin: 0; line-height: 1.4; }
.plaque-s b { color: var(--gold-2); font-family: var(--f-mono); }

.square-banners { position: relative; align-self: start; padding-top: 70px; }
.banner-rope { position: absolute; left: -10%; top: 60px; width: 120%; height: 54px; overflow: visible; }
.pennants { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.pennant { position: relative; min-height: 210px; transform-origin: 50% 0; animation: pennant 7s ease-in-out infinite; }
.pennant:nth-child(2) { margin-top: 26px; animation-delay: -2s; }
.pennant:nth-child(3) { margin-top: -4px; animation-delay: -4s; }
.pennant:nth-child(4) { margin-top: 18px; animation-delay: -1s; }
.pennant > a, .pennant { color: inherit; text-decoration: none; }
.pennant > a { display: block; position: absolute; inset: 0; border-radius: 6px; }
.pennant-cloth { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pennant-label, .pennant-value, .pennant-unit { position: relative; display: block; text-align: center; padding: 0 14px; }
.pennant-label { padding-top: 38px; font-family: var(--f-label); font-size: 15px; line-height: 1.15; }
.pennant-value { font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 3vw, 40px); line-height: 1.1; margin-top: 8px; }
.pennant-unit { font-size: 14px; font-style: italic; opacity: .9; }
.pennant > a .pennant-label { padding-top: 38px; }
.tone-verm .pc-fill { fill: var(--verm); } .tone-verm { color: var(--parch); }
.tone-indigo .pc-fill { fill: var(--night-3); } .tone-indigo { color: var(--parch); }
.tone-parch .pc-fill { fill: var(--parch); } .tone-parch { color: var(--parch-ink); }
.tone-copper .pc-fill { fill: var(--copper); } .tone-copper { color: var(--ink); }
.pc-trim { stroke: currentColor; opacity: .45; fill: none; }
.pennant > a:hover .pennant-value { text-decoration: underline; text-decoration-thickness: 2px; }

/* ------------------------------------------------------------------ HOME: the street */
.page-home > .street-sec { max-width: none; padding: 0; margin-top: 36px; }
.street-head, .street-walk { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.street-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
.street-head h2 { font-size: clamp(44px, 5.4vw, 66px); text-shadow: 0 3px 0 var(--ink); }
.street-sub { color: var(--text-dim); font-size: 16px; max-width: 34em; margin: 6px 0 0; }

.sign-rod { position: relative; display: flex; gap: 12px; padding: 0 10px; }
.sign-rod::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 3px; background: var(--copper); border: 2px solid var(--ink); }
.hang-sign { position: relative; background: none; border: 0; padding: 22px 0 6px; transform-origin: 50% 0; transition: transform .3s ease; }
.hang-sign::before, .hang-sign::after { content: ""; position: absolute; top: 4px; width: 2px; height: 20px; background: var(--parch-3); }
.hang-sign::before { left: 24%; }
.hang-sign::after { right: 24%; }
.hang-sign span { display: block; padding: 7px 14px; border: 2.5px solid var(--ink); border-radius: 5px; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 2px, transparent 2px 6px), var(--wood-md); color: var(--parch); font-family: var(--f-label); font-size: 16px; white-space: nowrap; box-shadow: 0 3px 0 var(--ink); transition: background-color .2s, color .2s, box-shadow .2s; }
.hang-sign:hover { transform: rotate(2.5deg); }
.hang-sign[aria-pressed="true"] { transform: translateY(5px); }
.hang-sign[aria-pressed="true"]::before, .hang-sign[aria-pressed="true"]::after { height: 25px; }
.hang-sign[aria-pressed="true"] span { background: var(--gold); color: var(--ink); box-shadow: 0 3px 0 var(--ink), 0 0 24px rgba(242, 184, 75, .5); }
.hang-sign:focus-visible { outline: none; }
.hang-sign:focus-visible span { outline: 3px solid var(--gold); outline-offset: 3px; }

.street {
  position: relative; margin-top: 10px; overflow: hidden;
  background: linear-gradient(180deg, transparent 0%, rgba(29, 37, 80, .6) 40%, #1a2148 100%);
}
.street-houses {
  position: absolute; left: 0; right: 0; bottom: 96px; height: 170px; pointer-events: none; opacity: .95;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 170'><g fill='%23111739'><path d='M0 170V90L30 60L60 90V170Z'/><path d='M56 170V70L96 30L136 70V170Z'/><path d='M132 170V104H200V170Z'/><path d='M196 170V80L226 52L256 80V170Z'/><path d='M252 170V62H268V40H282V62H298L330 92V170Z'/><path d='M326 170V96L366 66L406 96V170Z'/><path d='M402 170V76L441 44L480 76V170Z'/></g><g fill='%23f2b84b' opacity='.75'><rect x='22' y='100' width='7' height='9'/><rect x='88' y='78' width='8' height='10'/><rect x='104' y='112' width='7' height='9'/><rect x='160' y='120' width='9' height='8'/><rect x='222' y='92' width='7' height='9'/><rect x='300' y='110' width='8' height='10'/><rect x='360' y='108' width='7' height='9'/><rect x='432' y='90' width='8' height='10'/><rect x='446' y='126' width='7' height='9'/></g><path d='M0 30Q120 60 240 34T480 30' fill='none' stroke='%23c47a3e' stroke-width='1.2' opacity='.5'/></svg>") repeat-x left bottom / 480px 170px;
}
.street-ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 98px; pointer-events: none;
  border-top: 3px solid var(--ink);
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(242, 184, 75, .14), transparent 70%),
    radial-gradient(circle at 50% 100%, transparent 0 9px, rgba(241, 227, 194, .1) 9px 10.5px, transparent 10.5px 14px, rgba(241, 227, 194, .07) 14px 15.5px, transparent 15.5px) 0 0 / 34px 17px,
    radial-gradient(circle at 50% 100%, transparent 0 9px, rgba(241, 227, 194, .1) 9px 10.5px, transparent 10.5px 14px, rgba(241, 227, 194, .07) 14px 15.5px, transparent 15.5px) 17px 8.5px / 34px 17px,
    #1a2148;
}
.lane {
  position: relative; z-index: 2; list-style: none; margin: 0;
  display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden;
  padding: 18px max(var(--gut), calc((100% - var(--maxw)) / 2 + var(--gut))) 30px;
  scroll-padding-inline: max(var(--gut), calc((100% - var(--maxw)) / 2 + var(--gut)));
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--copper) transparent;
  cursor: grab;
}
.lane::-webkit-scrollbar { height: 10px; }
.lane::-webkit-scrollbar-thumb { background: var(--copper); border-radius: 5px; border: 2px solid #1a2148; }
.lane:focus-visible { outline-offset: -4px; }
.lane.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.lane.is-dragging .stall-a { pointer-events: none; }

.stall { position: relative; flex: 0 0 248px; height: 430px; scroll-snap-align: start; }
.stall-a { position: absolute; inset: 0; display: block; color: var(--parch); text-decoration: none; border-radius: 8px; transition: transform .25s ease; }
.stall-a:hover, .stall-a:focus-visible { transform: translateY(-4px); }
.stall-a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.stall-garland { position: absolute; top: 0; left: -10px; width: 268px; height: 36px; }
.garland-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.bulb { animation: twinkle 3.2s ease-in-out infinite; }
.bulb.b1 { animation-delay: -1.1s; }
.bulb.b2 { animation-delay: -2.3s; }
.stall-crown { position: absolute; top: 4px; left: 50%; width: 56px; transform: translateX(-50%); z-index: 4; filter: drop-shadow(0 0 10px rgba(242, 184, 75, .6)); }
.crown-svg { display: block; width: 100%; height: auto; }
.stall-awning { position: absolute; top: 30px; left: 0; width: 248px; z-index: 3; }
.awning-svg { display: block; width: 100%; height: auto; overflow: visible; }
.awning-svg .valance { transform-box: fill-box; transform-origin: 50% 0; }
.stall-a:hover .valance, .stall-a:focus-visible .valance { animation: sway 1.6s ease-in-out infinite; }
.stall-posts::before, .stall-posts::after { content: ""; position: absolute; top: 112px; bottom: 30px; width: 11px; background: linear-gradient(90deg, var(--wood) 60%, var(--wood-dk) 60%); border: 2.5px solid var(--ink); }
.stall-posts::before { left: 12px; }
.stall-posts::after { right: 12px; }
.stall-lantern { position: absolute; top: 116px; right: 2px; width: 26px; z-index: 4; }
.lantern-svg { position: relative; display: block; width: 100%; height: auto; filter: brightness(calc(.55 + .55 * var(--glow))); }
.lantern-svg .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 2.4s infinite; animation-delay: calc(var(--i) * -.37s); }
.halo { position: absolute; left: 50%; top: 58%; width: calc(70px + 170px * var(--glow)); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(242, 184, 75, .55), rgba(242, 184, 75, .16) 55%, transparent); opacity: calc(.25 + .75 * var(--glow)); pointer-events: none; animation: halo 3.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.6s); }
.stall-a:hover .halo { opacity: 1; }
.stall-sign { position: absolute; top: 108px; left: 50%; width: 126px; margin-left: -63px; z-index: 2; transform-origin: 50% 0; }
.stall-a:hover .stall-sign, .stall-a:focus-visible .stall-sign { animation: swing-sm 1.8s ease-in-out infinite; }
.sign-chain { display: block; height: 16px; margin: 0 26px; border-left: 2px dashed var(--parch-3); border-right: 2px dashed var(--parch-3); }
.sign-board { display: flex; flex-direction: column; align-items: center; padding: 8px 8px 6px; border: 2.5px solid var(--ink); border-radius: 6px; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 2px, transparent 2px 6px), var(--wood-md); box-shadow: 0 4px 0 var(--ink); }
.sign-board .token-img { display: block; width: 84px; height: 84px; object-fit: cover; border: 2.5px solid var(--ink); border-radius: 4px; background: var(--parch); }
.sign-name { display: block; margin-top: 5px; max-width: 108px; font-family: var(--f-label); font-size: 13.5px; line-height: 1.1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stall-counter { position: absolute; left: 0; right: 0; bottom: 0; height: 178px; z-index: 3; }
.stall-counter::before { content: ""; position: absolute; right: -30px; top: -80px; width: 220px; height: 200px; background: radial-gradient(closest-side, rgba(242, 184, 75, .22), transparent); opacity: var(--glow); pointer-events: none; }
.counter-planks { position: absolute; left: 0; right: 0; top: 34px; bottom: 0; border: 3px solid var(--ink); border-radius: 3px; background: repeating-linear-gradient(180deg, var(--wood) 0 24px, var(--wood-dk) 24px 26px); box-shadow: 0 6px 0 rgba(0, 0, 0, .3); }
.counter-planks::before { content: ""; position: absolute; left: -9px; right: -9px; top: -14px; height: 14px; background: var(--copper); border: 3px solid var(--ink); border-radius: 3px; }
.chalk {
  position: absolute; z-index: 2; left: 18px; right: 18px; top: 18px; padding: 8px 12px 9px;
  background: radial-gradient(120% 90% at 30% 20%, #2c3b39, var(--slate)); border: 5px solid var(--wood-dk); outline: 2.5px solid var(--ink); border-radius: 3px;
  font-family: var(--f-hand); color: #f3ecd8; transform: rotate(-1.2deg); box-shadow: 0 4px 0 rgba(0, 0, 0, .35);
}
.stall:nth-child(even) .chalk { transform: rotate(.9deg); }
.chalk-sym { display: block; font-size: 27px; font-weight: 700; line-height: 1; color: var(--gold-2); margin-bottom: 3px; }
.chalk-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 19px; line-height: 1.12; border-bottom: 1px dashed rgba(243, 236, 216, .18); }
.chalk-row:last-child { border-bottom: 0; }
.chalk-row span { opacity: .82; }
.chalk-row b { font-weight: 700; }
.chalk-row i { font-style: normal; font-size: .82em; opacity: .8; }
.stall-tag { position: absolute; z-index: 5; left: -4px; top: 118px; padding: 2px 10px 3px; background: var(--verm); color: var(--parch); border: 2px solid var(--ink); font-family: var(--f-label); font-size: 13px; transform: rotate(-4deg); box-shadow: 0 2px 0 var(--ink); }
.stall-tag.tag-curve { background: var(--night-3); }
.is-crown .stall-sign .sign-board { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 6px), #6f2a1a; }

.plot .stall-a { display: flex; align-items: center; justify-content: center; }
.plot-post { position: absolute; left: 50%; bottom: 30px; width: 12px; height: 200px; margin-left: -6px; background: var(--wood); border: 2.5px solid var(--ink); }
.plot-sign { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 200px; margin-top: 30px; padding: 14px 12px; text-align: center; background: var(--parch); color: var(--parch-ink); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 0 5px 0 var(--ink); transform: rotate(-3deg); transition: transform .25s; }
.plot .stall-a:hover .plot-sign, .plot .stall-a:focus-visible .plot-sign { transform: rotate(0); }
.plot-sign-small { font-family: var(--f-label); font-size: 13px; color: var(--copper-dk); }
.plot-sign-big { font-family: var(--f-display); font-size: 30px; line-height: 1; }

.street-walk { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.walk { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 22px; border: 0; background: none; color: var(--parch); font-family: var(--f-label); font-size: 16px; isolation: isolate; }
.walk::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 0 50%); }
.walk::after { content: ""; position: absolute; inset: 3px 3px 3px 4px; z-index: -1; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 2px, transparent 2px 6px), var(--wood); clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%); }
.walk-e::before { clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%); }
.walk-e::after { inset: 3px 4px 3px 3px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); }
.walk:hover { color: var(--gold-2); }
.walk .ic { width: 18px; height: 18px; }
.walk-pos { margin: 0; font-family: var(--f-label); color: var(--text-dim); font-size: 15px; text-align: center; }

/* notice board */
.notices { margin-top: 70px; margin-bottom: 30px; }
.board-title { font-size: clamp(34px, 4vw, 46px); margin-bottom: 18px; text-align: center; }
.notice-list {
  list-style: none; margin: 0; padding: clamp(18px, 3vw, 34px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 30px);
  background: radial-gradient(rgba(0, 0, 0, .18) 1px, transparent 1.5px) 0 0 / 9px 9px, #5a3a26;
  border: 12px solid var(--wood); outline: 3px solid var(--ink); outline-offset: 0; box-shadow: inset 0 0 0 3px var(--ink), 0 10px 0 rgba(0, 0, 0, .3); border-radius: 4px;
}
.note { position: relative; padding: 26px 20px 18px; background: var(--parch); color: var(--parch-ink); border: 2px solid var(--ink); box-shadow: 4px 6px 0 rgba(0, 0, 0, .35); }
.note.n1 { transform: rotate(-1.6deg); }
.note.n2 { transform: rotate(1.1deg) translateY(8px); }
.note.n3 { transform: rotate(-.6deg); }
.note::before { content: ""; position: absolute; top: 8px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f6a58e, var(--verm) 55%, var(--verm-dk)); border: 2px solid var(--ink); }
.note-n { float: right; font-family: var(--f-display); font-size: 34px; line-height: .8; color: var(--copper-dk); }
.note h3 { font-size: 27px; margin-bottom: 8px; }
.note p { font-size: 16.5px; margin: 0; }
.notice-more { text-align: center; margin-top: 28px; font-family: var(--f-label); font-size: 18px; }

/* ------------------------------------------------------------------ STALL page */
.crumbs { padding-top: 22px; font-family: var(--f-label); font-size: 16px; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.shopsign { position: relative; margin-top: 14px; }
.shopsign-valance {
  position: relative; z-index: 2; height: 40px; margin: 0 -6px;
  background: repeating-linear-gradient(90deg, var(--aw-a) 0 34px, var(--aw-b) 34px 68px);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% 22px no-repeat, radial-gradient(circle at 17px 22px, #000 16.5px, transparent 17px) 0 0 / 34px 40px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% 22px no-repeat, radial-gradient(circle at 17px 22px, #000 16.5px, transparent 17px) 0 0 / 34px 40px repeat-x;
  filter: drop-shadow(0 3px 0 var(--ink));
}
.shopsign::before { content: ""; position: absolute; z-index: 3; left: -6px; right: -6px; top: -4px; height: 10px; background: var(--copper); border: 2.5px solid var(--ink); border-radius: 4px; }
.shopsign-board {
  position: relative; margin-top: -12px; padding: clamp(26px, 3vw, 40px) clamp(18px, 3vw, 36px) clamp(20px, 2.4vw, 28px);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 30px; align-items: center;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .1) 0 2px, transparent 2px 9px), repeating-linear-gradient(90deg, transparent 0 220px, rgba(0, 0, 0, .14) 220px 222px), #5b3621;
  border: 3px solid var(--ink); border-radius: 0 0 10px 10px; box-shadow: inset 0 0 0 5px var(--wood-dk), inset 0 0 0 7px var(--copper-dk), 0 8px 0 rgba(0, 0, 0, .3);
}
.ss-medal { position: relative; width: 132px; height: 132px; flex: none; }
.ss-medal .token-img { width: 132px; height: 132px; object-fit: cover; border-radius: 50%; border: 5px solid var(--copper); outline: 3px solid var(--ink); background: var(--parch); }
.ss-crown { position: absolute; top: -26px; left: 50%; width: 58px; transform: translateX(-50%) rotate(-6deg); filter: drop-shadow(0 0 12px rgba(242, 184, 75, .6)); }
.ss-main h1 { font-size: clamp(38px, 5vw, 62px); margin-bottom: 8px; text-shadow: 0 3px 0 var(--ink); overflow-wrap: anywhere; }
.ss-sym { font-family: var(--f-mono); font-size: .42em; font-weight: 700; color: var(--gold); letter-spacing: .02em; vertical-align: .25em; white-space: nowrap; }
.ss-desc { color: var(--parch-2); max-width: 44em; font-size: 17px; }
.ss-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 15px; color: var(--parch-2); margin: 0; }
.ss-phase { padding: 1px 10px; border: 1.5px solid var(--parch-3); border-radius: 20px; font-family: var(--f-label); font-size: 13.5px; }
.ss-phase.is-migrated { border-color: var(--gold); color: var(--gold-2); }
.ss-copy { background: none; border: 1.5px dashed var(--parch-3); border-radius: 4px; padding: 2px 8px; font-size: 13.5px; color: var(--parch-2); }
.ss-copy:hover { border-color: var(--gold); color: var(--gold-2); }
.ss-copy.is-copied::after { content: " copied"; color: var(--gold); font-family: var(--f-label); }
.ss-facts { margin: 0; display: grid; gap: 10px; padding-left: 26px; border-left: 2px dashed rgba(241, 227, 194, .3); }
.ss-facts div { display: grid; }
.ss-facts dt { font-family: var(--f-label); font-size: 14px; color: var(--parch-3); }
.ss-facts dd { margin: 0; font-size: 15px; color: var(--parch-2); }
.ss-facts dd .mono { font-size: 23px; font-weight: 700; color: var(--gold); }
.ss-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; border-top: 2px solid rgba(0, 0, 0, .25); }
.ss-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 14px; border: 2px solid var(--parch-3); border-radius: 6px; color: var(--parch); text-decoration: none; font-family: var(--f-label); font-size: 16px; }
.ss-link:hover { background: rgba(241, 227, 194, .1); color: var(--gold-2); border-color: var(--gold); }
.ss-trade { background: var(--verm); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.ss-trade:hover { background: #e24a32; color: #fff8e8; border-color: var(--ink); }
.ss-devnote { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px; border: 2px dashed var(--gold); border-radius: 6px; color: var(--gold-2); font-family: var(--f-label); font-size: 16px; }
.ss-soc { width: 40px; padding: 0; justify-content: center; }
.ss-soc .ic { width: 18px; height: 18px; }

/* the treasury is a wide band on top; the ladder and the offer slip stand side by side below it */
.stall-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 370px); gap: clamp(22px, 2.8vw, 36px); align-items: start; margin-top: 40px; }
.treasury { grid-column: 1 / -1; }

/* treasury: an arched stone niche lying on its side */
.treasury {
  position: relative; display: grid; grid-template-columns: minmax(200px, 250px) minmax(0, 1fr); gap: 10px clamp(20px, 3vw, 44px); align-items: center;
  padding: 24px clamp(20px, 3vw, 36px) 22px 30px;
  background: repeating-linear-gradient(0deg, transparent 0 22px, rgba(0, 0, 0, .18) 22px 24px), var(--night-2);
  border: 3px solid var(--ink); border-radius: 130px 12px 12px 130px; box-shadow: inset 0 0 0 5px var(--night-3), inset 0 0 0 7px var(--copper-dk);
}
.treasury-chest { text-align: center; }
.treasury .sec-h { margin: 0 0 2px; }
.chest { width: min(200px, 100%); margin: 0 auto; filter: drop-shadow(0 0 22px rgba(242, 184, 75, .28)); }
.chest-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chest-amt { margin: 4px 0 0; font-family: var(--f-label); font-size: 18px; color: var(--parch-2); white-space: nowrap; }
.chest-amt .mono { font-size: 40px; font-weight: 700; color: var(--gold); text-shadow: 0 0 16px rgba(242, 184, 75, .45); }
.chest-facts { margin: 0 0 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 26px; }
.chest-facts div { display: grid; align-content: start; gap: 2px; padding: 9px 2px 10px; border-bottom: 1px dashed rgba(241, 227, 194, .2); min-width: 0; }
.chest-facts dt { font-family: var(--f-label); font-size: 14.5px; color: var(--text-dim); }
.chest-facts dd { margin: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chest-facts .mono, .chest-facts dd.mono { font-weight: 700; font-size: 19px; }
.cf-hi dd, .cf-hi dd .mono { color: var(--gold); }
.cf-hi dd .mono { font-size: 22px; }
.saving-note { margin: 0 0 10px; padding: 9px 12px; border-left: 4px solid var(--gold); background: rgba(242, 184, 75, .1); font-size: 15.5px; color: var(--parch); }
.treasury .fine { margin: 0; }

/* the ladder */
.ladder-sec { min-width: 0; }
.ladder { position: relative; margin-top: 18px; padding: 10px 0; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); background: linear-gradient(180deg, transparent, rgba(242, 184, 75, .03)); }
.rung-row { position: relative; height: 31px; }
.rung-row.st-full { background: rgba(242, 184, 75, .13); }
.rung-row.st-part { background: linear-gradient(0deg, rgba(242, 184, 75, .13) 50%, transparent 50%); }
.rung {
  position: relative; z-index: 1; display: grid; grid-template-columns: 62px 58px minmax(0, 1fr) 66px; align-items: center;
  width: 100%; height: 100%; padding: 0 6px 0 0; border: 0; background: transparent; color: var(--parch); text-align: left; border-radius: 3px;
}
.rung:hover { background: rgba(241, 227, 194, .06); }
.rung:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.rung-pct { font-size: 14.5px; text-align: right; padding-right: 8px; color: var(--text-dim); }
.rung-rails { position: relative; align-self: stretch; }
.rung-rails::before, .rung-rails::after { content: ""; position: absolute; top: -1px; bottom: -1px; width: 9px; background: linear-gradient(90deg, var(--wood) 55%, var(--wood-dk) 55%); border-left: 2.5px solid var(--ink); border-right: 2.5px solid var(--ink); }
.rung-rails::before { left: 6px; }
.rung-rails::after { right: 6px; }
.rung-dowel { position: absolute; left: 12px; right: 12px; top: 50%; height: 7px; margin-top: -3.5px; background: var(--copper); border: 2px solid var(--ink); border-radius: 3px; }
.rung-shelf { position: relative; display: flex; align-items: center; gap: 8px; height: 100%; padding-left: 4px; min-width: 0; }
.rung-plank { position: relative; display: block; width: calc(var(--len) * 100%); height: 17px; background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(0, 0, 0, .12) 18px 19px), var(--parch-3); border: 2px solid var(--ink); border-radius: 2px; overflow: hidden; flex: none; max-width: calc(100% - 48px); transition: filter .2s; }
.is-empty .rung-plank { display: none; }
.rung-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--fill) * 100%); background: radial-gradient(circle at 6px 50%, var(--gold-2) 3px, transparent 3.5px) 0 0 / 11px 100%, var(--gold); border-right: 2px solid var(--ink); }
.st-dry .rung-fill { display: none; }
.rung:hover .rung-plank { filter: brightness(1.1); }
.rung-amt { font-size: 14px; text-align: right; color: var(--parch-2); }
.rung-mine { flex: none; padding: 0 7px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--verm); color: var(--parch); font-family: var(--f-label); font-size: 12px; line-height: 17px; }
.rung-lock { position: absolute; right: 70px; top: 50%; transform: translateY(-50%); color: var(--parch-3); }
.rung-lock .ic { width: 15px; height: 15px; }
.is-locked .rung { cursor: not-allowed; }
.is-locked .rung-pct, .is-locked .rung-plank, .is-locked .rung-amt { opacity: .45; }
.is-sel .rung { background: rgba(214, 60, 37, .22); box-shadow: inset 4px 0 0 var(--verm); }
.is-sel .rung-pct { color: var(--gold-2); font-weight: 700; }
.is-sel .rung-plank { border-color: var(--verm); box-shadow: 0 0 0 2px var(--verm); }
.is-sel .rung-dowel { background: var(--verm); }
.is-cap::before { content: ""; position: absolute; left: 120px; right: 0; top: 0; border-top: 1.5px dashed rgba(196, 122, 62, .7); z-index: 2; pointer-events: none; }
.cap-tag { position: absolute; z-index: 2; right: 4px; top: -9px; padding: 0 6px; background: var(--night); color: var(--copper-2); font-family: var(--f-label); font-size: 12px; line-height: 16px; border-radius: 3px; pointer-events: none; }
.tide-line { position: absolute; z-index: 0; left: 120px; right: 66px; top: calc(50% - 5px); height: 10px; pointer-events: none; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 10'><path d='M0 5Q6 0 12 5T24 5' fill='none' stroke='%23f2b84b' stroke-width='2.2'/></svg>") repeat-x 0 0 / 24px 10px; animation: tide 6s linear infinite; opacity: .95; }
.ladder-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-family: var(--f-label); font-size: 14px; color: var(--text-dim); }
.lg::before { content: ""; display: inline-block; width: 22px; height: 12px; margin-right: 7px; vertical-align: -1px; border: 2px solid var(--ink); border-radius: 2px; }
.lg-full::before { background: var(--gold); }
.lg-part::before { border: 0; height: 10px; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 10'><path d='M0 5Q6 0 12 5T24 5' fill='none' stroke='%23f2b84b' stroke-width='2.4'/></svg>") 0 0 / 22px 10px; }
.lg-dry::before { background: var(--parch-3); }
.ladder-note, .ladder-pick { font-size: 16px; color: var(--text-dim); margin: 12px 0 0; }
.ladder-note b, .ladder-pick b { color: var(--gold-2); }
.ladder-pick { padding: 10px 14px; border-left: 4px solid var(--verm); background: rgba(214, 60, 37, .1); color: var(--parch-2); }

/* your offer: a parchment slip */
.offer-sec {
  position: sticky; top: 104px; padding: 22px 20px 20px; color: var(--parch-ink);
  background: radial-gradient(120% 60% at 80% 0%, rgba(196, 122, 62, .14), transparent 60%), var(--parch);
  border: 3px solid var(--ink); border-radius: 4px; box-shadow: 7px 8px 0 rgba(0, 0, 0, .4);
}
.offer-sec::before { content: ""; position: absolute; left: 50%; top: -11px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--copper-2), var(--copper-dk)); border: 2.5px solid var(--ink); }
.offer-sec .sec-h { color: var(--parch-ink); }
.offer-sec :focus-visible { outline-color: var(--verm-dk); }
.offer-sec .eyebrow { color: var(--copper-dk); }
.you-head { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; align-items: center; margin: 6px 0 12px; }
.you-portrait { width: 92px; height: auto; display: block; border-radius: 3px; box-shadow: 3px 3px 0 rgba(0, 0, 0, .3); }
.you-rank { font-family: var(--f-display); font-weight: 800; font-size: 32px; line-height: 1; margin: 0 0 4px; }
.you-cap { margin: 0; font-size: 16px; }
.you-cap b { color: var(--verm-dk); }
.you-copy { font-size: 16.5px; }
.tenure { margin: 4px 0 14px; }
.tenure-k { font-size: 15.5px; margin: 0 0 8px; }
.tenure-rod { position: relative; height: 14px; margin-bottom: 22px; background: var(--parch-2); border: 2px solid var(--ink); border-radius: 7px; }
.tenure-fill { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg, var(--verm) 0 6px, #e04f36 6px 12px); border-radius: 5px; }
.notch { position: absolute; top: -5px; width: 3px; height: 20px; margin-left: -1.5px; background: var(--ink); }
.notch:first-child { margin-left: 0; }
.notch-l { position: absolute; top: 21px; left: 50%; transform: translateX(-50%); font-family: var(--f-label); font-size: 12px; color: var(--parch-ink); }
.notch.is-on .notch-l { color: var(--verm-dk); font-weight: 700; }
.tenure-next { margin: 0; font-size: 15px; }
.tenure-next b { color: var(--verm-dk); }
.you-facts { margin: 0 0 16px; }
.you-facts div { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 4px 0; background: radial-gradient(circle, rgba(43, 32, 22, .45) 1px, transparent 1.5px) 0 calc(100% - 5px) / 7px 7px repeat-x; }
.you-facts dt, .you-facts dd { background: var(--parch); }
.you-facts dt { font-family: var(--f-label); font-size: 14.5px; padding-right: 6px; }
.you-facts dd { margin: 0; font-size: 15px; text-align: right; padding-left: 6px; }
.you-facts .mono { font-weight: 700; }
.offer-form { border-top: 2px solid var(--parch-ink); padding-top: 14px; }
.f-label { display: block; font-family: var(--f-label); font-size: 15.5px; margin-bottom: 4px; }
.f-input { width: 100%; min-height: 46px; padding: 8px 12px; border: 2.5px solid var(--parch-ink); border-radius: 6px; background: #fbf4e0; color: var(--parch-ink); font-size: 19px; }
.f-input:focus-visible { outline: 3px solid var(--verm-dk); outline-offset: 1px; }
.f-input[aria-invalid="true"] { border-color: var(--verm); background: #fde9e2; }
.amt-row { display: flex; gap: 8px; }
.amt-row .chip { min-height: 46px; white-space: nowrap; flex: none; }
.f-hint { font-size: 14px; color: #5a4a36; margin: 6px 0 12px; }
.f-err { min-height: 0; margin: 8px 0 0; color: var(--verm-dk); font-weight: 700; font-size: 15px; }
.f-err:empty { display: none; }
.f-warn { margin: -6px 0 12px; padding: 6px 10px; border-left: 4px solid var(--verm); background: rgba(214, 60, 37, .08); font-size: 14.5px; color: var(--verm-dk); }
.f-warn:empty { display: none; }
.rung-picker { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.rung-picker .f-label { margin: 0 auto 0 0; }
.rp-out { min-width: 72px; text-align: center; font-size: 21px; font-weight: 700; color: var(--verm-dk); }
.lever { position: relative; display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; cursor: pointer; font-size: 15.5px; line-height: 1.3; }
.lever input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lever-track { position: relative; flex: none; width: 52px; height: 28px; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--parch-3); transition: background-color .2s; }
.lever-knob { position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--copper); border: 2px solid var(--ink); transition: transform .2s; }
.lever input:checked + .lever-track { background: var(--verm); }
.lever input:checked + .lever-track .lever-knob { transform: translateX(24px); background: var(--gold); }
.lever input:focus-visible + .lever-track { outline: 3px solid var(--verm-dk); outline-offset: 3px; }
.offer-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.offer-btns .btn-verm { flex: 1 1 auto; }
.offer-sec .btn-ghost { color: var(--parch-ink); border-color: var(--parch-ink); }
.offer-sec .btn-ghost:hover { background: rgba(43, 32, 22, .08); }
.offer-sec .lamp-btn { width: 100%; justify-content: center; }

/* tx status */
.tx { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border: 2px solid var(--copper); border-radius: 6px; font-size: 15.5px; line-height: 1.4; background: rgba(196, 122, 62, .1); }
.tx[hidden] { display: none; }
.tx-glyph { flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 2.5px solid currentColor; }
.tx[data-state="pending"] .tx-glyph { border-color: var(--copper) transparent var(--copper) transparent; animation: spin 1s linear infinite; }
.tx[data-state="ok"] { border-color: var(--verd); background: rgba(62, 110, 96, .14); }
.tx[data-state="ok"] .tx-glyph { background: var(--verd); border-color: var(--verd); box-shadow: inset 0 0 0 3px var(--parch); }
.tx[data-state="err"] { border-color: var(--verm); background: rgba(214, 60, 37, .12); }
.tx[data-state="err"] .tx-glyph { border-color: var(--verm); background: linear-gradient(45deg, transparent 44%, var(--verm) 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, var(--verm) 44% 56%, transparent 56%); }
.offer-sec .tx a, .deed .tx a { color: var(--verm-dk); font-weight: 700; }

/* the guild book */
.ledger { margin-top: 64px; margin-bottom: 40px; }
.ledger .sec-h { text-align: center; margin-bottom: 20px; }
.book {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 14px; border-radius: 10px;
  background: repeating-linear-gradient(45deg, rgba(0, 0, 0, .1) 0 3px, transparent 3px 7px), #6b2318; border: 3px solid var(--ink); box-shadow: 0 12px 0 rgba(0, 0, 0, .35);
}
.book-page {
  position: relative; min-height: 360px; padding: 26px 26px 30px 62px; color: #2a2440;
  background: repeating-linear-gradient(180deg, transparent 0 33px, rgba(46, 59, 128, .22) 33px 34px) 0 58px / 100% 100% no-repeat, var(--parch);
  font-family: var(--f-hand);
}
.book-page::before { content: ""; position: absolute; top: 0; bottom: 0; left: 48px; border-left: 2px solid rgba(214, 60, 37, .45); }
.book-l { border-radius: 6px 0 0 6px; box-shadow: inset -26px 0 30px -20px rgba(43, 32, 22, .45); }
.book-r { border-radius: 0 6px 6px 0; box-shadow: inset 26px 0 30px -20px rgba(43, 32, 22, .45); }
.book-h { font-family: var(--f-display); font-weight: 800; font-size: 30px; color: var(--parch-ink); margin: 0 0 6px; height: 28px; line-height: 28px; }
.ln-list { list-style: none; margin: 0; padding: 0; }
.ln { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; min-height: 34px; align-items: start; font-size: 21px; line-height: 34px; }
.ln-when { position: absolute; left: -58px; top: 0; width: 50px; color: var(--copper-dk); font-weight: 700; font-size: 18px; }
.ln-text { line-height: 1.25; padding: 5px 0 4px; }
.ln-text b { color: var(--verm-dk); font-weight: 700; }
.ln-who { font-family: var(--f-mono); font-size: 15px; color: #3b3360; }
.ln-sig { font-family: var(--f-label); font-size: 14px; color: var(--night-3); padding: 0 4px; }
.ln-sig:hover { color: var(--verm-dk); }
.ln-empty { display: block; font-size: 21px; }
.ln-aside { color: #6a5a7a; font-size: .86em; white-space: nowrap; }
.book-note { margin: 14px 0 0; font-size: 18px; color: var(--copper-dk); }
.book .ln-sig:focus-visible { outline-color: var(--verm-dk); }

/* ------------------------------------------------------------------ RAISE: the charter */
.deed-wrap { padding-top: 56px; padding-bottom: 70px; }
.deed {
  position: relative; max-width: 860px; margin: 0 auto; padding: clamp(36px, 5vw, 64px) clamp(20px, 5vw, 64px) clamp(30px, 4vw, 48px);
  color: var(--parch-ink);
  background:
    radial-gradient(40% 30% at 12% 18%, rgba(196, 122, 62, .14), transparent 70%),
    radial-gradient(30% 24% at 88% 78%, rgba(142, 82, 40, .12), transparent 70%),
    radial-gradient(60% 40% at 50% 100%, rgba(142, 82, 40, .1), transparent 70%),
    var(--parch);
  border-radius: 3px; box-shadow: 0 0 0 2px #c9ad74, 0 22px 50px rgba(0, 0, 0, .5);
}
.deed::before, .deed::after {
  content: ""; position: absolute; left: -14px; right: -14px; height: 24px; border-radius: 12px; border: 3px solid var(--ink);
  background: linear-gradient(180deg, var(--copper-2), var(--wood) 45%, var(--wood-dk));
}
.deed::before { top: -16px; }
.deed::after { bottom: -16px; }
.deed-edge { position: absolute; inset: 22px; border: 1.5px solid var(--copper-dk); outline: 1px solid var(--copper-dk); outline-offset: 5px; pointer-events: none; border-radius: 2px; }
.deed :focus-visible { outline-color: var(--verm-dk); }
.deed-head { position: relative; text-align: center; margin-bottom: 26px; }
.deed-head img { width: 84px; height: 84px; border-radius: 50%; margin-bottom: 6px; }
.deed-head .eyebrow { color: var(--copper-dk); }
.deed-head h1 { font-size: clamp(40px, 6vw, 70px); color: var(--parch-ink); margin-bottom: 12px; }
.deed-intro { font-style: italic; font-size: 18px; max-width: 36em; margin: 0 auto; }
.clause { position: relative; border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.clause legend { display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 10px; font-family: var(--f-display); font-weight: 800; font-size: 26px; }
.clause-n { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--verm); color: var(--parch); border: 2px solid var(--ink); font-family: var(--f-label); font-weight: 400; font-size: 16px; }
.clause-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 6px 24px; }
.clause-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.deed-field { position: relative; min-width: 0; }
.deed-label { display: flex; align-items: center; gap: 6px; font-family: var(--f-label); font-size: 15.5px; color: #4b3a26; }
.deed-label .ic { width: 15px; height: 15px; }
.deed-input { display: block; width: 100%; min-height: 44px; padding: 6px 4px 4px; border: 0; border-bottom: 2px solid var(--parch-ink); background: transparent; color: var(--parch-ink); font-size: 20px; border-radius: 0; }
.deed-input::placeholder { color: rgba(43, 32, 22, .38); font-style: italic; }
.deed-input:focus-visible { outline: 0; background: rgba(214, 60, 37, .07); border-bottom-color: var(--verm); box-shadow: 0 2px 0 var(--verm); }
.deed-input[aria-invalid="true"] { border-bottom-color: var(--verm); background: rgba(214, 60, 37, .08); }
.deed-ticker { padding-left: 22px; text-transform: uppercase; letter-spacing: .06em; }
.deed-prefix { position: absolute; left: 4px; top: 34px; font-family: var(--f-mono); font-size: 20px; font-weight: 700; color: var(--verm-dk); }
.deed-area { resize: vertical; min-height: 92px; line-height: 1.45; background: repeating-linear-gradient(180deg, transparent 0 28px, rgba(43, 32, 22, .2) 28px 29px); border-bottom: 0; }
.deed-short { max-width: 200px; }
.deed-hint { margin: 4px 0 0; font-size: 14px; color: #6a5740; }
.deed-err { margin: 4px 0 0; font-size: 14.5px; font-weight: 700; color: var(--verm-dk); }
.deed-err:empty { display: none; }
.deed-err-main { text-align: right; }
.sign-upload { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.sign-preview { width: 150px; flex: none; display: flex; flex-direction: column; align-items: center; }
.sp-chain { width: 70px; height: 18px; border-left: 2px dashed var(--copper-dk); border-right: 2px dashed var(--copper-dk); border-top: 4px solid var(--copper); }
.sp-board { display: flex; align-items: center; justify-content: center; width: 140px; height: 140px; padding: 8px; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 6px), var(--wood-md); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 0 5px 0 var(--ink); }
.sp-board img { width: 116px; height: 116px; object-fit: cover; border: 2.5px solid var(--ink); border-radius: 4px; background: var(--parch); }
.sp-empty { display: flex; align-items: center; justify-content: center; width: 116px; height: 116px; border: 2.5px dashed var(--parch-3); border-radius: 4px; color: var(--parch-3); font-family: var(--f-hand); font-size: 24px; }
.sign-pick { flex: 1 1 240px; padding-top: 18px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-btn { margin-top: 8px; color: var(--parch-ink); border-color: var(--parch-ink); cursor: pointer; }
.file-btn:hover { background: rgba(43, 32, 22, .08); color: var(--parch-ink); }
.file-input:focus-visible + .file-btn { outline: 3px solid var(--verm-dk); outline-offset: 3px; }
.file-input[aria-invalid="true"] + .file-btn { border-color: var(--verm); }
.terms { margin: 30px 0 10px; padding: 18px 20px; border: 1.5px solid var(--copper-dk); border-radius: 2px; background: rgba(196, 122, 62, .08); }
.terms-h { font-size: 24px; margin-bottom: 8px; }
.terms-list { margin: 0; padding-left: 24px; columns: 2; column-gap: 34px; font-size: 15.5px; list-style: lower-roman; }
.terms-list li { break-inside: avoid; margin-bottom: 6px; }
.seal-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 26px; flex-wrap: wrap; }
.signer { flex: 1 1 260px; margin: 0; padding-bottom: 8px; border-bottom: 2px solid var(--parch-ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.signer-k { font-family: var(--f-label); font-size: 15px; color: #5a4a36; }
.signer-v { font-family: var(--f-hand); font-size: 26px; font-weight: 700; color: var(--night-3); }
.signer .btn-ghost { color: var(--parch-ink); border-color: var(--parch-ink); }
.seal-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px; border: 0; background: none; color: var(--parch-ink); border-radius: 12px; }
.seal-face { display: block; width: 116px; height: 116px; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .28)); transition: transform .25s ease; }
.seal-svg { display: block; width: 100%; height: 100%; }
.seal-btn:hover .seal-face { transform: rotate(-8deg) translateY(-3px); }
.seal-btn:disabled .seal-face { filter: grayscale(.4) drop-shadow(0 6px 0 rgba(0, 0, 0, .2)); }
.seal-label { font-family: var(--f-label); font-size: 18px; }
.seal-btn:focus-visible { outline: 3px solid var(--verm-dk); outline-offset: 4px; }
.is-stamping .seal-face { animation: stamp 1.3s ease-in-out infinite; }
.seal-mark { position: absolute; right: 9%; bottom: 120px; width: 150px; height: 150px; opacity: 0; transform: scale(1.6) rotate(-14deg); mix-blend-mode: multiply; pointer-events: none; transition: opacity .35s ease, transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.seal-mark .seal-svg { width: 100%; height: 100%; }
.is-sealed .seal-mark { opacity: .85; transform: scale(1) rotate(-14deg); }
.is-sealed .seal-btn .seal-face { opacity: .25; }
.raised { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.raised[hidden] { display: none; }
.raised p { margin: 0; }
.deed .notice { color: var(--parch); }

/* ------------------------------------------------------------------ GUILDS */
.guild-stair { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(12px, 2vw, 26px); align-items: end; }
.guild { position: relative; display: flex; flex-direction: column; padding-bottom: calc(var(--rise) + 18px); }
.guild.g1 { --rise: 0px; } .guild.g2 { --rise: 44px; } .guild.g3 { --rise: 88px; } .guild.g4 { --rise: 132px; }
.guild-step { position: absolute; left: -8px; right: -8px; bottom: 0; height: calc(var(--rise) + 12px); background: repeating-linear-gradient(0deg, transparent 0 20px, rgba(0, 0, 0, .25) 20px 22px), var(--night-3); border: 3px solid var(--ink); border-top: 5px solid var(--copper); }
.guild-frame { margin: 0; position: relative; }
.guild-frame img { display: block; width: 100%; border-radius: 3px; box-shadow: 0 0 0 3px var(--ink), 7px 8px 0 rgba(0, 0, 0, .35); }
.guild-plate { position: relative; margin: -22px 10px 0; padding: 6px 8px 8px; text-align: center; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 6px), var(--wood); border: 2.5px solid var(--ink); border-radius: 5px; box-shadow: 0 3px 0 var(--ink); }
.guild-n { display: block; font-family: var(--f-label); font-size: 13px; color: var(--parch-3); }
.guild-name { display: block; font-family: var(--f-display); font-weight: 800; font-size: clamp(24px, 2.4vw, 32px); line-height: 1; color: var(--parch); }
.g4 .guild-plate { background: var(--verm); }
.guild-terms { margin: 14px 0 6px; }
.guild-terms div { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed rgba(241, 227, 194, .22); font-size: 15px; }
.guild-terms dt { font-family: var(--f-label); color: var(--text-dim); }
.guild-terms dd { margin: 0; text-align: right; }
.guild-terms b { color: var(--gold); font-family: var(--f-mono); font-size: 17px; }
.guild-line { position: relative; z-index: 1; font-size: 15.5px; color: var(--text-dim); font-style: italic; margin: 6px 0 12px; }
.climb-note { position: relative; max-width: 640px; margin: 50px auto 0; padding: 22px 24px 18px; background: var(--parch); color: var(--parch-ink); border: 2.5px solid var(--ink); transform: rotate(-.8deg); box-shadow: 6px 7px 0 rgba(0, 0, 0, .35); }
.climb-note::before { content: ""; position: absolute; top: -9px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f6a58e, var(--verm) 55%, var(--verm-dk)); border: 2px solid var(--ink); }
.climb-note h2 { display: flex; align-items: center; gap: 8px; font-size: 30px; margin-bottom: 8px; }
.climb-note h2 .ic { color: var(--verm); }
.climb-note p { margin: 0; }
.torg-seq { padding-bottom: 50px; margin-top: 50px; }
.scenes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 26px; counter-reset: sc; }
.scene { position: relative; }
.scene:not(:last-child)::after { content: ""; position: absolute; top: 74px; right: -22px; width: 18px; height: 18px; background: var(--copper); clip-path: polygon(0 20%, 55% 20%, 55% 0, 100% 50%, 55% 100%, 55% 80%, 0 80%); }
.scene figure { margin: 0; }
.scene-svg { display: block; width: 100%; height: auto; }
.sc-t { font-family: var(--f-label); font-size: 13px; }
.sc-light { fill: var(--parch); }
.sc-dim { fill: var(--parch-3); }
.sc-verm { fill: #ff7a5f; }
.sc-ring { animation: ring 2.4s ease-in-out infinite; }
.scene figcaption { margin-top: 12px; font-size: 15.5px; color: var(--text-dim); }
.scene figcaption b { display: block; font-family: var(--f-display); font-weight: 800; font-size: 25px; line-height: 1.05; color: var(--parch); margin: 4px 0 6px; }
.scene-n { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--ink); border: 2px solid var(--ink); font-family: var(--f-display); font-size: 18px; }
.seq-foot { margin-top: 34px; padding: 16px 20px; border: 2px dashed var(--copper); border-radius: 8px; color: var(--parch-2); }

/* ------------------------------------------------------------------ TOWN */
.page-town > .hall-hero { max-width: none; padding: 0; position: relative; }
.hall-banner img { display: block; width: 100%; height: clamp(220px, 34vw, 520px); object-fit: cover; object-position: 50% 60%; border-bottom: 3px solid var(--ink); }
.hall-title { position: relative; max-width: var(--maxw); margin: -54px auto 0; padding: 0 var(--gut); }
.hall-title > * { position: relative; }
.hall-title .eyebrow { display: inline-block; margin: 0; padding: 4px 12px; background: var(--night); border: 2px solid var(--copper); border-bottom: 0; border-radius: 6px 6px 0 0; }
.hall-title h1 { display: block; max-width: 820px; padding: 16px 22px 18px; font-size: clamp(32px, 4.6vw, 58px); background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 8px), var(--wood); border: 3px solid var(--ink); border-radius: 0 8px 8px 8px; box-shadow: var(--print), inset 0 0 0 4px var(--wood-dk); text-shadow: 0 2px 0 var(--ink); }
.crown { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 30px 50px; align-items: center; margin-top: 56px; }
.crown-chest { position: relative; max-width: 300px; margin: 0 auto; width: 100%; }
.crown-on { position: absolute; top: -18px; left: 50%; width: 76px; transform: translateX(-50%) rotate(-8deg); filter: drop-shadow(0 0 16px rgba(242, 184, 75, .55)); }
.crown-text h2 { font-size: clamp(36px, 4.6vw, 56px); margin-bottom: 14px; }
.crown-text b { color: var(--gold-2); }
.crown-facts { display: flex; flex-wrap: wrap; gap: 12px 34px; margin: 18px 0 22px; }
.crown-facts div { display: grid; }
.crown-facts dt { font-family: var(--f-label); font-size: 14.5px; color: var(--text-dim); }
.crown-facts dd { margin: 0; font-size: 16px; }
.crown-facts .mono { font-size: 28px; font-weight: 700; color: var(--gold); }
.register { margin-top: 60px; }
.stone-h { font-size: clamp(30px, 3.4vw, 40px); text-align: center; margin-bottom: 16px; }
.register-list { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; background: repeating-linear-gradient(90deg, transparent 0 60px, rgba(0, 0, 0, .1) 60px 61px), var(--night-3); box-shadow: inset 0 0 0 5px #24306c, inset 0 0 0 7px var(--copper-dk); }
.register-list div { padding: 22px 18px; text-align: center; border-right: 2px solid rgba(15, 20, 48, .7); }
.register-list div:last-child { border-right: 0; }
.register-list dt { font-family: var(--f-label); font-size: 15px; color: var(--parch-3); }
.register-list dd { margin: 4px 0 0; font-size: 15px; color: var(--parch-2); }
.register-list .mono { display: block; font-size: clamp(26px, 2.8vw, 36px); font-weight: 700; color: var(--parch); text-shadow: 0 2px 0 var(--ink); }
.fees { display: grid; grid-template-columns: minmax(240px, 360px) minmax(0, 1fr); gap: 30px 50px; align-items: center; margin-top: 70px; }
.fee-coin { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.fc-t { font-family: var(--f-display); font-weight: 800; font-size: 24px; fill: var(--ink); }
.fc-s { font-family: var(--f-label); font-size: 12.5px; fill: var(--ink); }
.fc-light { fill: var(--parch); }
.fc-big { font-family: var(--f-display); font-weight: 800; font-size: 22px; fill: var(--ink); }
.fees-text h2 { font-size: clamp(34px, 4vw, 50px); margin-bottom: 14px; }
.fee-legend { list-style: none; margin: 0 0 12px; padding: 0; }
.fee-legend li { display: block; padding: 7px 0 7px 30px; text-indent: -30px; border-bottom: 1px dashed rgba(241, 227, 194, .2); }
.fee-legend .sw { display: inline-block; margin-right: 12px; text-indent: 0; vertical-align: -1px; transform: none; }
.fc-m { font-family: var(--f-display); font-weight: 800; font-size: 17px; fill: var(--ink); }
.fc-xs { font-family: var(--f-label); font-size: 12px; fill: var(--ink); }
.fee-legend b { color: var(--parch); }
.sw { flex: none; width: 18px; height: 18px; border: 2.5px solid var(--ink); border-radius: 50%; transform: translateY(3px); outline: 1.5px solid rgba(241, 227, 194, .5); }
.sw-night { background: var(--night-3); } .sw-verm { background: var(--verm); } .sw-copper { background: #a8622f; } .sw-copper2 { background: var(--copper); }
.divider { display: block; width: min(320px, 80%); height: auto; margin: 70px auto 10px; color: var(--copper); }
.page > .divider { padding: 0; }
.trust h2, .faq h2 { font-size: clamp(34px, 4vw, 50px); margin: 30px 0 22px; }
.trust-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.trust-col { position: relative; padding: 24px 24px 16px; background: var(--parch); color: var(--parch-ink); border: 3px solid var(--ink); border-radius: 4px; box-shadow: 6px 7px 0 rgba(0, 0, 0, .35); }
.trust-col::before, .trust-col::after { content: ""; position: absolute; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--copper-dk); border: 2px solid var(--ink); }
.trust-col::before { left: 10px; } .trust-col::after { right: 10px; }
.trust-col h3 { font-size: 30px; margin-bottom: 10px; }
.trust-col ul { list-style: none; margin: 0; padding: 0; }
.trust-col li { position: relative; padding: 8px 0 8px 32px; border-top: 1px dashed rgba(43, 32, 22, .25); font-size: 16.5px; }
.trust-col li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); }
.trust-no li::before { background: linear-gradient(45deg, transparent 42%, var(--parch) 42% 58%, transparent 58%), linear-gradient(-45deg, transparent 42%, var(--parch) 42% 58%, transparent 58%), var(--verd); }
.trust-yes li::before { background: radial-gradient(circle, var(--parch) 3px, transparent 3.5px), var(--copper); }
.trust-col b { color: var(--verm-dk); }
.trust-foot { margin-top: 18px; font-size: 15.5px; color: var(--text-dim); max-width: 60em; }
.faq { padding-bottom: 60px; }
.faq-list { border-top: 2px solid var(--copper-dk); }
.faq-item { border-bottom: 2px solid var(--copper-dk); }
.faq-item summary { position: relative; display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 10px 44px 10px 0; cursor: pointer; list-style: none; font-family: var(--f-display); font-weight: 600; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.1; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; border: 2.5px solid var(--ink); background: linear-gradient(var(--ink), var(--ink)) center / 10px 2.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2.5px 10px no-repeat, var(--gold); transition: transform .25s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--gold-2); }
.faq-item p { margin: 0 0 18px; color: var(--parch-2); max-width: 46em; }

/* ------------------------------------------------------------------ footer: the town wall */
.townwall { position: relative; margin-top: 80px; background: var(--ink); border-top: 3px solid var(--ink); }
.townwall-roofs { position: absolute; left: 0; right: 0; top: -38px; height: 40px; pointer-events: none; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 40'><path d='M0 40V22H14V10H26V22H44L62 4L80 22H100V14H112V22H128L150 6L172 22H196V12H208V22H222L240 10V40Z' fill='%230f1430'/><rect x='58' y='22' width='6' height='7' fill='%23f2b84b' opacity='.8'/><rect x='146' y='24' width='6' height='7' fill='%23f2b84b' opacity='.8'/></svg>") repeat-x left bottom / 240px 40px; }
.townwall-in { max-width: var(--maxw); margin: 0 auto; padding: 34px var(--gut) 30px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px 40px; }
.foot-brand { display: flex; gap: 16px; align-items: center; }
.foot-brand img { width: 64px; height: 64px; border-radius: 50%; flex: none; }
.foot-brand p { margin: 0; color: var(--text-dim); font-size: 16px; }
.foot-brand strong { font-family: var(--f-display); font-size: 26px; color: var(--parch); }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: center; font-family: var(--f-label); }
.foot-links a { display: inline-flex; align-items: center; gap: 8px; }
.foot-domain { color: var(--text-dim); font-family: var(--f-mono); }
.townwall .fine { grid-column: 1 / -1; margin: 6px 0 0; padding-top: 14px; border-top: 1px solid rgba(241, 227, 194, .14); }

/* ------------------------------------------------------------------ motion */
@keyframes flicker { 0%, 100% { transform: scale(1, 1); opacity: 1; } 20% { transform: scale(.94, 1.06); } 40% { transform: scale(1.04, .95); opacity: .9; } 60% { transform: scale(.97, 1.03); } 80% { transform: scale(1.02, .98); opacity: .95; } }
@keyframes halo { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.07); } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes sway { 0%, 100% { transform: skewX(0deg); } 30% { transform: skewX(var(--sway)); } 70% { transform: skewX(calc(var(--sway) * -1)); } }
@keyframes swing { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes swing-sm { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(2.4deg); } 70% { transform: rotate(-2deg); } }
@keyframes pennant { 0%, 100% { transform: rotate(-1deg); } 50% { transform: rotate(1.2deg); } }
@keyframes balance { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
@keyframes glow { 0%, 100% { opacity: 1; } 50% { opacity: .82; } }
@keyframes tide { from { background-position: 0 0; } to { background-position: 48px 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ring { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes stamp { 0%, 100% { transform: translateY(0) scale(1) rotate(0); } 35% { transform: translateY(-22px) scale(1.12) rotate(-10deg); } 55% { transform: translateY(2px) scale(.9) rotate(-4deg); } 70% { transform: translateY(0) scale(1.03) rotate(-2deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .chest-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scenes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scene::after { display: none; }
}

@media (max-width: 980px) {
  .square { grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); }
  .square-title { grid-column: 1 / -1; padding-bottom: 0; }
  .square-banners { padding-top: 40px; align-self: center; }
  .banner-rope { top: 30px; }
  .nav a span { padding: 5px 10px 6px; font-size: 15px; }
  .shopsign-board { grid-template-columns: auto minmax(0, 1fr); }
  .ss-facts { grid-column: 1 / -1; padding-left: 0; border-left: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 12px; border-top: 2px dashed rgba(241, 227, 194, .3); }
  .guild-stair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 24px; }
  .guild { --rise: 0px !important; padding-bottom: 0; }
  .guild-step { display: none; }
  .register-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .register-list div:nth-child(2) { border-right: 0; }
  .register-list div:nth-child(-n + 2) { border-bottom: 2px solid rgba(15, 20, 48, .7); }
}

@media (max-width: 820px) {
  .townbar { position: relative; }
  .townbar-in { flex-wrap: wrap; gap: 8px 12px; padding-top: 8px; padding-bottom: 6px; }
  .nav { order: 3; flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav ul { justify-content: flex-start; gap: 6px; padding-bottom: 6px; }
  .nav a { padding-top: 10px; }
  .nav a::before, .nav a::after { height: 12px; }
  .stall-grid { grid-template-columns: minmax(0, 1fr); }
  .offer-sec { position: relative; top: 0; }
  .ladder-slot { order: 2; }
  .offer-sec { order: 3; }
  .book { grid-template-columns: 1fr; }
  .book-l, .book-r { border-radius: 6px; box-shadow: none; }
  .book-l { margin-bottom: 12px; }
  .crown, .fees { grid-template-columns: minmax(0, 1fr); }
  .trust-cols { grid-template-columns: 1fr; }
  .notice-list { grid-template-columns: 1fr; }
  .note.n2 { transform: rotate(1deg); }
  .townwall-in { grid-template-columns: 1fr; }
  .terms-list { columns: 1; }
  .clause-grid, .clause-grid.three { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .brand-name { font-size: 27px; }
  .brand img { width: 40px; height: 40px; }
  .lamp-btn { min-height: 42px; font-size: 15px; padding: 3px 12px 3px 8px; }
  .lamp-ic { width: 17px; height: 26px; }
  .square { grid-template-columns: minmax(0, 1fr); padding-top: 26px; }
  .square-tower { max-width: 260px; margin: 0 auto; width: 100%; }
  .square-banners { padding-top: 34px; }
  .banner-rope { left: 0; width: 100%; top: 26px; }
  .pennant { min-height: 186px; }
  .pennant-label { padding-top: 34px; font-size: 14px; }
  .moon { width: 44px; height: 44px; top: 10px; }
  .street-head { align-items: flex-start; }
  .sign-rod { gap: 6px; padding: 0 4px; max-width: 100%; }
  .hang-sign span { padding: 6px 9px; font-size: 14px; }
  .stall { flex-basis: 236px; }
  .walk span { display: none; }
  .walk { padding: 6px 18px; }
  .shopsign-board { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .ss-medal { width: 104px; height: 104px; }
  .ss-medal .token-img { width: 104px; height: 104px; }
  .ss-facts { grid-template-columns: 1fr 1fr; }
  .treasury { grid-template-columns: minmax(0, 1fr); border-radius: 120px 120px 10px 10px; padding: 28px 16px 18px; }
  .chest-facts { grid-template-columns: 1fr 1fr; gap: 0 14px; }
  .chest-facts dd { white-space: normal; }
  .rung { grid-template-columns: 50px 46px minmax(0, 1fr) 52px; padding-right: 2px; }
  .rung-pct { font-size: 13px; padding-right: 5px; }
  .rung-amt { font-size: 12.5px; }
  .rung-rails::before { left: 4px; } .rung-rails::after { right: 4px; }
  .rung-dowel { left: 10px; right: 10px; }
  .rung-lock { right: 54px; }
  .is-cap::before { left: 96px; }
  .rung-mine { display: none; }
  .book { padding: 8px; }
  .book-page { padding: 20px 14px 22px 54px; min-height: 0; }
  .book-page::before { left: 42px; }
  .ln { font-size: 19px; }
  .ln-when { left: -52px; width: 44px; font-size: 16px; }
  .tide-line { left: 96px; right: 52px; }
  .guild-stair { grid-template-columns: minmax(0, 1fr); }
  .guild { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 0 16px; align-items: start; }
  .guild-frame { grid-row: 1 / span 3; }
  .guild-plate { margin: -16px 4px 0; }
  .guild-name { font-size: 20px; }
  .guild-terms { margin-top: 0; }
  .scenes { grid-template-columns: minmax(0, 1fr); }
  .register-list { grid-template-columns: 1fr 1fr; }
  .register-list div { padding: 16px 10px; }
  .deed-wrap { padding-left: calc(var(--gut) + 8px); padding-right: calc(var(--gut) + 8px); }
  .deed::before, .deed::after { left: -10px; right: -10px; }
  .deed-edge { inset: 12px; }
  .seal-row { justify-content: center; }
  .seal-mark { right: 50%; margin-right: -75px; bottom: 150px; }
  .deed-err-main { text-align: center; }
  .hall-title { margin-top: -30px; }
}

@media (max-width: 420px) {
  .nav ul { gap: 4px; }
  .nav a span { padding: 4px 7px 5px; font-size: 13.5px; }
}

@media (max-width: 380px) {
  .brand-name { font-size: 24px; }
  .lamp-btn span { font-size: 14px; }
  .chalk-row { font-size: 18px; }
  .ss-facts { grid-template-columns: 1fr; }
}
