/* pages.css — the Throne Room, the Decree, the Bounty, the Hall of Arms, the Tower,
   Your Lordship, a coin's page, the Forge and the sealed gate. */

:root {
  --bricks: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='28'><rect width='56' height='28' fill='%232c2731'/><path d='M0 1H56M0 15H56M28 1V14M0 15V28M56 15V28' stroke='%23141117' stroke-width='2'/><rect x='3' y='3' width='23' height='10' fill='%23fff' opacity='.035'/><rect x='31' y='17' width='23' height='9' fill='%23000' opacity='.14'/></svg>");
}

/* =================== THE THRONE ROOM =================== */
.throne {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(560px, calc(100svh - var(--bar-h) - var(--crier-h)), 1000px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(24px, 5vh, 56px) var(--gutter) clamp(72px, 10vh, 110px);
}
.throne__vault {
  position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(110, 52, 160, .38), transparent 70%),
    radial-gradient(ellipse 40% 60% at 50% 110%, rgba(201, 162, 74, .14), transparent 70%),
    linear-gradient(180deg, #100b16 0%, #0b0a0d 70%);
}
.throne__vault::before { /* a ghostly row of gothic arches */
  content: ''; position: absolute; inset: 8% 0 auto; height: 70%; opacity: .16;
  background: radial-gradient(ellipse 50% 100% at 50% 100%, transparent 70%, #2a2236 71% 74%, transparent 75%) 0 0 / 220px 100% repeat-x;
  -webkit-mask: linear-gradient(180deg, #000, transparent 85%); mask: linear-gradient(180deg, #000, transparent 85%);
}
.throne__art { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.throne__artbox { position: absolute; right: 0; bottom: 0; width: max(100%, 1100px); aspect-ratio: 3 / 1; }
.throne__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s var(--ease); }
.throne.has-art .throne__img { opacity: 1; }
.throne__artbox::after { /* melt the art into the vault, and shade the copy side */
  content: ''; position: absolute; inset: -1px;
  background:
    linear-gradient(180deg, #0b0a0d 0%, rgba(11, 10, 13, .55) 22%, transparent 45%, transparent 85%, rgba(11, 10, 13, .9) 100%),
    linear-gradient(90deg, rgba(11, 10, 13, .9) 0%, rgba(11, 10, 13, .45) 30%, transparent 52%);
}
.artglow {
  position: absolute; left: var(--x); top: var(--y); z-index: 1; display: none;
  width: calc(150px * var(--s, 1)); aspect-ratio: 1; transform: translate(-50%, -50%) scale(var(--flick, .85));
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 176, 80, .5), rgba(255, 120, 40, .14) 40%, transparent 68%);
  mix-blend-mode: screen; opacity: var(--flick, .85);
}
.artglow--throne { background: radial-gradient(circle, rgba(255, 236, 160, .32), rgba(20, 241, 149, .08) 45%, transparent 70%); }
.throne.has-art .artglow { display: block; }
.throne__beams { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.throne__beams i {
  position: absolute; top: -20%; width: 120px; height: 140%; transform: skewX(-20deg);
  background: linear-gradient(180deg, rgba(196, 160, 255, .13), rgba(196, 160, 255, .04) 55%, transparent 85%);
  filter: blur(10px); mix-blend-mode: screen; animation: beam 11s ease-in-out infinite alternate;
}
.throne__beams i:nth-child(1) { left: 24%; }
.throne__beams i:nth-child(2) { left: 50%; width: 180px; animation-delay: -4s; }
.throne__beams i:nth-child(3) { left: 74%; width: 90px; animation-delay: -7s; }
@keyframes beam { from { opacity: .45; } to { opacity: 1; } }
.throne__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* DOM torches (when no hero art) */
.torch { position: absolute; top: 26%; width: 44px; height: 170px; z-index: 0; pointer-events: none; }
.torch--l { left: max(12px, 4vw); }
.torch--r { right: max(12px, 4vw); }
.torch__glow { position: absolute; left: 50%; top: 10px; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 160, 70, .26), rgba(255, 120, 40, .08) 40%, transparent 70%); opacity: var(--flick, .85); mix-blend-mode: screen; }
.torch__fire { position: absolute; left: 2px; top: -12px; width: 40px; height: 70px; transform-origin: 50% 90%; transform: scale(var(--flick, .85), calc(.6 + var(--flick, .85) * .45)); }
.torch__f1 { fill: #ff8a1f; filter: drop-shadow(0 0 8px #ff7a00); }
.torch__f2 { fill: #ffe39a; }
.torch__sconce { position: absolute; left: 2px; top: 46px; width: 40px; height: 90px; }
.throne.has-art .torch { display: none; }

.throne__inner { position: relative; z-index: 1; width: 100%; max-width: 760px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.throne__crown { position: relative; z-index: 1; flex: none; width: clamp(220px, 26vw, 360px); aspect-ratio: 100 / 68; margin-bottom: 4px; pointer-events: none; }
.throne__title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: .2em .5em; margin: 0 0 .25em; }
.throne__name {
  font: 900 clamp(2.5rem, 6.4vw, 5rem)/1 var(--f-display); letter-spacing: .03em;
  background: linear-gradient(180deg, #fff6d0 0%, #f0cd70 35%, #b07a22 62%, #f4d27a 82%, #8a5b14 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #1a1006) drop-shadow(0 0 30px rgba(241, 213, 138, .25));
}
.throne__ticker { font: 500 clamp(.9rem, 2vw, 1.1rem) var(--f-mono); color: var(--mint); border: 1px solid rgba(20, 241, 149, .5); padding: .2em .6em; border-radius: 4px; letter-spacing: .08em; }
.throne__lede { max-width: 54ch; font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--text-dim); }
.treasury { display: flex; flex-direction: column; align-items: center; margin: 10px 0 18px; }
.treasury__label { font: 700 .74rem var(--f-caps); letter-spacing: .4em; text-transform: uppercase; color: var(--gold); }
.treasury__plate {
  display: flex; align-items: center; gap: .2em; margin: 8px 0 6px; padding: .12em .5em .18em;
  font: 700 clamp(2.3rem, 7.4vw, 4.4rem)/1 var(--f-caps);
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(30, 20, 10, .55));
  border: 1px solid rgba(201, 162, 74, .35); border-radius: 8px;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, .8), inset 0 -1px 0 rgba(241, 213, 138, .2), 0 0 40px rgba(201, 162, 74, .1);
}
.treasury__sol { color: var(--gold); font-size: .62em; margin-right: .1em; }
.treasury__sub { color: var(--text-faint); font-size: .95rem; font-style: italic; }
.odo { display: inline-flex; }
.odo__drums { display: inline-flex; filter: drop-shadow(0 2px 0 #000) drop-shadow(0 -1px 0 rgba(255, 240, 200, .15)); }
.odo__d { display: inline-block; width: .76em; height: 1em; overflow: hidden; line-height: 1; text-align: center; }
.odo__s {
  display: block; line-height: 1; transition: transform 1.8s cubic-bezier(.2, .8, .2, 1);
  background: linear-gradient(180deg, #fff3c4, #e2b450 45%, #9b6a1a 80%, #e9c062) 0 0 / 100% 10% repeat-y;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.odo__d--frac { font-size: .62em; height: 1em; align-self: flex-end; margin-bottom: .1em; }
.odo__p { color: var(--gold-lo); }

.throne__facts { display: grid; grid-template-columns: repeat(4, auto); gap: 6px clamp(18px, 3.5vw, 44px); margin: 0 0 24px; }
.throne__facts div { display: flex; flex-direction: column; gap: 2px; }
.throne__facts dt { font: 600 .66rem var(--f-caps); letter-spacing: .2em; text-transform: uppercase; color: var(--text-faint); }
.throne__facts dd { margin: 0; font: 500 1.02rem var(--f-mono); color: var(--gold-hi); }
.throne__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; }
.throne__down { position: absolute; left: 50%; bottom: 18px; width: 44px; height: 44px; margin-left: -22px; z-index: 2; border: 0; background: none; cursor: pointer; }
.throne__down span { display: block; width: 14px; height: 14px; margin: 0 auto; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(7px) rotate(45deg); opacity: .5; } }

@media (min-width: 1000px) {
  /* with the hall art: copy on the dark left, the glyph crown hovers over the vault above the throne */
  .throne.has-art { align-items: flex-start; }
  .throne.has-art .throne__crown { position: absolute; right: 7vw; top: 9%; width: clamp(260px, 27vw, 420px); margin: 0; }
  .throne.has-art .throne__inner { align-items: flex-start; text-align: left; max-width: 620px; margin-left: clamp(0px, 3vw, 60px); }
  .throne.has-art .throne__title, .throne.has-art .throne__cta { justify-content: flex-start; }
  .throne.has-art .treasury { align-items: flex-start; }
  .throne.has-art .throne__facts { grid-template-columns: repeat(2, auto); }
}
@media (max-width: 999px) {
  .throne.has-art { padding-bottom: clamp(220px, 38vw, 340px); }
  .throne__artbox { width: max(100%, 960px); }
  .throne.has-art .throne__artbox::after { background: linear-gradient(180deg, #0b0a0d 0%, rgba(11, 10, 13, .3) 30%, transparent 50%); }
}
@media (max-width: 700px) {
  .torch { display: none; }
  .throne__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: center; }
  .throne__facts div { align-items: center; }
  .throne__beams i:nth-child(3) { display: none; }
}

/* =================== THE ROYAL DECREE =================== */
.decree-wrap { padding: clamp(40px, 8vw, 96px) var(--gutter); filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .65)); }
.decree {
  position: relative; max-width: 900px; margin: 0 auto; padding: clamp(40px, 7vw, 84px) clamp(22px, 7vw, 88px);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% 8%, rgba(120, 80, 30, .25), transparent 40%),
    radial-gradient(ellipse at 90% 85%, rgba(120, 80, 30, .3), transparent 45%),
    radial-gradient(circle at 70% 20%, rgba(255, 250, 230, .5), transparent 50%),
    var(--noise), linear-gradient(180deg, #ecdfbf, #dcc796);
}
.decree__head { text-align: center; margin-bottom: 26px; }
.decree .kicker { color: #8a1426; }
.decree .sec-title { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #2b1a0c; filter: none; font-family: var(--f-black); font-size: clamp(2.4rem, 6vw, 4rem); text-shadow: 0 1px 0 rgba(255, 255, 255, .45); }
.decree p, .decree li { font-size: clamp(1.08rem, 1.8vw, 1.22rem); }
.decree b { color: #5b1f12; }
.decree__open { overflow: hidden; }
.dropcap {
  float: left; width: 3.3em; height: 3.3em; margin: .25em .5em 0 0; position: relative;
  display: grid; place-items: center; border-radius: 4px;
  background: radial-gradient(circle at 30% 30%, #6c34a0, #2a0f40);
  box-shadow: inset 0 0 0 3px #c9952f, inset 0 0 0 5px #2a0f40, inset 0 0 0 6px #e8c25d, 0 3px 6px rgba(60, 30, 0, .4);
}
.dropcap::before { /* vine flourishes */
  content: ''; position: absolute; inset: 8px; border-radius: 2px; opacity: .35;
  background: radial-gradient(circle at 0 0, transparent 30%, #e8c25d 31% 33%, transparent 34%) 0 0 / 16px 16px;
}
.dropcap span { position: relative; font: 700 2.6em/1 var(--f-black); color: #f4d98a; text-shadow: 0 2px 0 #1a0828; }
.articles { list-style: none; margin: 28px 0; padding: 0; display: grid; gap: 20px; }
.articles li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.articles__n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font: 700 .95rem var(--f-caps); color: #f7e3c4; background: radial-gradient(circle at 35% 30%, #c8384c, #7a1020); box-shadow: 0 2px 4px rgba(60, 20, 0, .4); }
.articles h3 { font: 700 1.08rem var(--f-caps); letter-spacing: .04em; color: #3b2410; margin-bottom: .25em; }
.articles p { margin: 0; color: #4a3420; }
.decree__mults { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 30px 0 10px; }
.mseal { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 52% 48% 55% 45% / 48% 54% 46% 52%; font: 900 .95rem var(--f-display); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .15), inset 2px 3px 5px rgba(255, 255, 255, .3), 0 3px 5px rgba(60, 30, 0, .35); }
.mseal--0 { background: radial-gradient(circle at 35% 30%, #a9b0b8, #5d636b); }
.mseal--1 { background: radial-gradient(circle at 35% 30%, #eef2f6, #8b96a3); color: #222; text-shadow: none; }
.mseal--2 { background: radial-gradient(circle at 35% 30%, #f6d77a, #a8741f); color: #3a2208; text-shadow: none; }
.mseal--3 { background: radial-gradient(circle at 35% 30%, #b98aff, #4b1f6f); }
.mseal--4 { background: radial-gradient(circle at 35% 30%, #7dffcb, #0a8a55); color: #04261a; text-shadow: none; }
.decree__sign { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(90, 65, 40, .35); }
.decree__sign p { margin: 0; font-style: italic; color: #5a4128; }
.decree__wax { flex: none; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 52% 48% 55% 45% / 48% 54% 46% 52%; transform: rotate(-12deg); background: radial-gradient(circle at 36% 30%, #d4465b, #8a1426 55%, #4a0712); color: #f2b8a8; font: 700 2.6rem var(--f-black); box-shadow: inset 0 0 0 6px rgba(0, 0, 0, .15), inset 0 0 0 9px rgba(255, 180, 170, .15), 0 4px 8px rgba(60, 20, 0, .5); text-shadow: 0 -1px 0 rgba(0, 0, 0, .5); }

/* =================== THE BOUNTY OF FIVE =================== */
.bounty { padding: clamp(48px, 8vw, 96px) 0; }
.bounty__hang { position: relative; max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }
.bounty__rod { height: 14px; border-radius: 7px; margin: 0 -6px; background: linear-gradient(180deg, #a06a32, #5a3418 50%, #2c180c); box-shadow: 0 6px 14px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 220, 160, .3); position: relative; }
.bounty__rod::before, .bounty__rod::after { content: ''; position: absolute; top: -7px; width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1bf, #c9952f 50%, #6b4a10); }
.bounty__rod::before { left: -8px; }
.bounty__rod::after { right: -8px; }
.bounty__banners { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(6px, 2.2vw, 30px); }
.bnr { position: relative; padding-top: 24px; }
.bnr__cords { position: absolute; top: -2px; left: 22%; right: 22%; height: 30px; border-left: 2px solid #8a6a2a; border-right: 2px solid #8a6a2a; }
.bnr__cloth { position: relative; height: clamp(230px, 32vw, 330px); transform-origin: 50% -24px; animation: sway 7s ease-in-out infinite; animation-delay: calc(var(--i) * -1.4s); filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .55)); }
@keyframes sway { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }
.bnr:hover .bnr__cloth { animation-play-state: paused; transform: translateY(-6px); }
.bnr__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bnr__content { position: absolute; inset: 0 0 18% 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; padding: 14px 6px 0; text-align: center; background: linear-gradient(180deg, rgba(8, 6, 10, .55), rgba(8, 6, 10, .25) 45%, rgba(8, 6, 10, .65)); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); }
.bnr__n { font: 700 .72rem var(--f-caps); letter-spacing: .2em; color: var(--gold-hi); text-shadow: 0 1px 2px #000; }
.bnr__medal { position: relative; width: clamp(36px, 7vw, 64px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #3a2a50, #120c18); box-shadow: 0 0 0 3px #c9952f, 0 0 0 5px #3a2708, 0 4px 8px rgba(0, 0, 0, .6); }
.bnr__medal span { font: 700 clamp(1rem, 3vw, 1.8rem) var(--f-black); color: var(--gold-hi); }
.bnr__medal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.bnr__sym { font: 700 clamp(.78rem, 2.2vw, 1.3rem) var(--f-caps); letter-spacing: .04em; color: #fff; text-shadow: 0 2px 4px #000, 0 0 2px #000; max-width: 100%; overflow-wrap: anywhere; }
.bnr__name { font-size: .9rem; font-style: italic; color: #f2e6cc; text-shadow: 0 1px 3px #000; line-height: 1.15; }
.bnr__plaque { margin-top: auto; margin-bottom: 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; border-radius: 4px; background: rgba(8, 6, 10, .82); border: 1px solid rgba(201, 162, 74, .4); max-width: 94%; }
.bnr__price { font: 500 clamp(.62rem, 1.6vw, .9rem) var(--f-mono); color: #fff; }
.bnr__chg { font: 500 clamp(.6rem, 1.5vw, .8rem) var(--f-mono); }
.bnr__chg.is-up { color: var(--up); }
.bnr__chg.is-down { color: var(--down); }
.bnr__vol { font: 400 .68rem var(--f-mono); color: var(--text-dim); }
.bounty__empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; color: var(--text-dim); font-style: italic; }
@media (max-width: 640px) {
  .bnr__name, .bnr__vol { display: none; }
  .bnr__content { padding-top: 10px; gap: 5px; inset: 0 0 22% 0; }
  .bnr__sym { font-size: .64rem; letter-spacing: 0; white-space: nowrap; }
  .bnr__plaque { padding: 4px 2px; margin-bottom: 4px; max-width: 100%; }
  .bnr__price { font-size: .54rem; letter-spacing: -.03em; }
  .bnr__chg { font-size: .56rem; }
}

/* =================== THE HALL OF ARMS =================== */
.hall { padding: clamp(48px, 8vw, 96px) 0; }
.seat { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; max-width: 1100px; margin: 0 auto clamp(48px, 7vw, 88px); padding: 0 var(--gutter); }
.seat__stage { position: relative; aspect-ratio: 300 / 400; max-width: 440px; width: 100%; margin: 0 auto; }
.seat__stage::before { /* a shaft of light upon the throne */
  content: ''; position: absolute; left: 10%; right: 10%; top: -30%; bottom: 0; z-index: -1;
  background: conic-gradient(from 160deg at 50% 0%, transparent 0deg, rgba(241, 213, 138, .14) 18deg, rgba(241, 213, 138, .2) 20deg, rgba(241, 213, 138, .14) 22deg, transparent 40deg);
  filter: blur(4px);
}
.seat__stage .throne-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.seat__stage--empty .throne-svg { opacity: .8; }
.seat__arms { position: absolute; left: 13%; right: 13%; top: 8%; display: block; transition: transform .5s var(--ease); }
.seat__arms:hover { transform: translateY(-6px) scale(1.02); }
.seat__copy { max-width: 560px; }
.seat__title { font: 700 clamp(1.8rem, 4vw, 2.8rem) var(--f-display); color: var(--gold-hi); margin-bottom: .4em; }
.seat__title span { font: 500 .5em var(--f-mono); color: var(--mint); vertical-align: middle; }
.seat__copy > p { color: var(--text-dim); }
.ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 20px 0 26px; }
.ledger div { padding: 10px 0; border-bottom: 1px dotted rgba(201, 162, 74, .4); }
.ledger dt { font: 600 .66rem var(--f-caps); letter-spacing: .2em; text-transform: uppercase; color: var(--text-faint); }
.ledger dd { margin: 2px 0 0; font: 500 1.05rem var(--f-mono); color: var(--gold-hi); overflow-wrap: anywhere; }
.ledger dd small { color: var(--text-dim); font-size: .78em; }
@media (max-width: 760px) {
  .seat { grid-template-columns: 1fr; text-align: center; }
  .seat__stage { max-width: 320px; }
  .seat__copy { margin: 0 auto; }
  .seat .ledger { text-align: left; }
}

.hall__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px; max-width: 1200px; margin: 0 auto 30px; padding: 0 var(--gutter); }
.hall__lbl { font: italic 500 1rem var(--f-body); color: var(--text-faint); }
.hall__sorts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 4px; border: 1px solid rgba(201, 162, 74, .3); border-radius: 999px; background: rgba(0, 0, 0, .3); }
.hall__sorts button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: none; cursor: pointer; font: 600 .74rem var(--f-caps); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); transition: background .25s, color .25s; }
.hall__sorts button:hover { color: var(--gold-hi); }
.hall__sorts button[aria-pressed="true"] { background: linear-gradient(180deg, #4b1f6f, #2a0f40); color: var(--gold-hi); box-shadow: inset 0 0 0 1px rgba(201, 162, 74, .5); }
.hall__grid { list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: 1240px; display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 30px 20px; }
.tile__link { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "arms candle" "meta meta"; align-items: end; gap: 6px 4px; padding: 16px 10px 14px; border-radius: 12px; text-decoration: none; color: var(--text); transition: background .4s; }
.tile__link::before { content: ''; position: absolute; inset: 0; border-radius: 12px; background: radial-gradient(circle at 50% 30%, rgba(201, 162, 74, .16), transparent 65%); opacity: 0; transition: opacity .4s; }
.tile__link:hover::before, .tile__link:focus-visible::before { opacity: 1; }
.tile__arms { grid-area: arms; position: relative; transition: transform .5s var(--ease); }
.tile__link:hover .tile__arms { transform: translateY(-6px) rotate(-1.5deg); }
.tile__candle { grid-area: candle; position: relative; padding-bottom: 50px; }
.tile__meta { grid-area: meta; position: relative; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.tile__name { font: 700 1.02rem/1.2 var(--f-caps); color: var(--gold-hi); overflow-wrap: anywhere; }
.tile__stats { display: flex; justify-content: center; gap: 12px; font: 400 .74rem var(--f-mono); color: var(--text-dim); }
.tile--ghost { height: 300px; }
.tile__ghost { height: 100%; margin: 16px 20px; border-radius: 10px 10px 50% 50% / 10px 10px 40% 40%; background: linear-gradient(100deg, rgba(255, 255, 255, .03) 30%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .03) 70%) 0 0 / 300% 100%; animation: ghost 1.6s linear infinite; }
@keyframes ghost { to { background-position: -150% 0; } }
.hall__empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; color: var(--text-dim); font-style: italic; }
@media (max-width: 520px) {
  .hall__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 8px; }
  .tile__link { padding: 10px 2px; grid-template-columns: 1fr 22px; }
  .tile__candle .candle { --wax-w: 10px; --track: 50px; }
  .tile__candle { padding-bottom: 46px; }
  .tile__candle .crowned svg { width: 28px; height: 28px; }
  .tile__candle .crowned span { display: none; }
  .tile__name { font-size: .9rem; }
  .tile__stats { flex-direction: column; gap: 0; }
}

/* =================== THE TOWER OF RANKS =================== */
.you-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; max-width: 760px; margin: 0 auto; padding: 14px 20px; text-align: center; border: 1px dashed rgba(20, 241, 149, .45); border-radius: 10px; background: rgba(20, 241, 149, .04); }
.you-strip p { margin: 0; }
.you-strip__ins { width: 44px; height: 44px; }
.you-strip__next { color: var(--mint); white-space: nowrap; }
.you-strip__warn { flex-basis: 100%; color: var(--down); font-style: italic; }
.tower { position: relative; max-width: 860px; margin: 40px auto 0; padding: 0 var(--gutter); }
.tower::before { content: ''; position: absolute; left: 6px; top: 120px; bottom: 90px; width: 1px; background: linear-gradient(180deg, transparent, rgba(201, 162, 74, .4) 10%, rgba(201, 162, 74, .4) 90%, transparent); }
.tower__lantern { position: absolute; left: -6px; top: 110px; z-index: 5; width: 26px; height: 40px; pointer-events: none; transition: transform .25s linear; }
.tower__lamp { position: absolute; inset: 6px 3px 0; border-radius: 6px 6px 10px 10px; border: 2px solid #3a2a10; background: radial-gradient(circle at 50% 60%, #fff3c0, #ffb347 40%, #a85a10 80%); box-shadow: 0 0 18px 6px rgba(255, 170, 70, .45), 0 0 60px 20px rgba(255, 140, 50, .15); }
.tower__chain { position: absolute; left: 50%; top: -4px; width: 8px; height: 10px; margin-left: -4px; border: 2px solid #8a6a2a; border-radius: 50%; }
.tower__flag { width: 120px; margin: 0 0 -8px calc(50% - 10px); }
.tower__flagsvg { display: block; width: 120px; height: 90px; }
.tower__battlements {
  width: 76%; margin: 0 auto; height: 34px; background: var(--bricks);
  -webkit-mask: linear-gradient(#000, #000) bottom / 100% 14px no-repeat, repeating-linear-gradient(90deg, #000 0 28px, transparent 28px 44px) top / 100% 22px no-repeat;
  mask: linear-gradient(#000, #000) bottom / 100% 14px no-repeat, repeating-linear-gradient(90deg, #000 0 28px, transparent 28px 44px) top / 100% 22px no-repeat;
}
.floors { list-style: none; margin: 0; padding: 0; }
.floor { position: relative; width: var(--w); margin: 0 auto; }
.floor__inner {
  position: relative; padding: 24px clamp(14px, 4vw, 64px) 30px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .6), transparent 16%, transparent 84%, rgba(0, 0, 0, .6)), var(--bricks);
  border-left: 3px solid #141117; border-right: 3px solid #141117;
}
.floor::after { /* cornice between floors */
  content: ''; position: absolute; left: -14px; right: -14px; bottom: -8px; height: 16px; z-index: 2;
  background: linear-gradient(180deg, #4d4554, #221d27); border-top: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 8px 12px rgba(0, 0, 0, .6);
  -webkit-mask: linear-gradient(#000, #000) top / 100% 8px no-repeat, repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 22px) bottom / 100% 8px no-repeat;
  mask: linear-gradient(#000, #000) top / 100% 8px no-repeat, repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 22px) bottom / 100% 8px no-repeat;
}
.floor--8 .floor__inner { background: linear-gradient(90deg, rgba(0, 0, 0, .6), rgba(75, 31, 111, .35) 16%, rgba(75, 31, 111, .35) 84%, rgba(0, 0, 0, .6)), var(--bricks); }
.floor__win { position: absolute; top: 28px; width: 26px; height: 50px; border-radius: 13px 13px 2px 2px; background: #07060a; border: 3px solid #141117; transition: background 1.2s .3s, box-shadow 1.2s .3s; }
.floor__win--l { left: clamp(10px, 2.4vw, 22px); }
.floor__win--r { right: clamp(10px, 2.4vw, 22px); }
.floor.is-in .floor__win { background: radial-gradient(ellipse at 50% 70%, #ffd27a, #c06a10 70%); box-shadow: 0 0 18px rgba(255, 170, 70, .45); }
.floor.is-yours .floor__win { background: radial-gradient(ellipse at 50% 70%, #b6ffe0, #0a8a55 70%); box-shadow: 0 0 22px rgba(20, 241, 149, .55); }
.floor.is-yours .floor__inner { box-shadow: inset 0 0 0 2px rgba(20, 241, 149, .4), inset 0 0 60px rgba(20, 241, 149, .1); }
.floor__plaque { display: flex; align-items: center; justify-content: center; gap: 14px 18px; flex-wrap: wrap; text-align: left; }
.floor__ins { width: 64px; height: 64px; }
.floor--8 .floor__ins, .floor--7 .floor__ins { width: 76px; height: 76px; }
.floor__title { display: flex; flex-direction: column; }
.floor__num { font: 600 .7rem var(--f-caps); letter-spacing: .3em; color: var(--gold); }
.floor__name { font: 700 clamp(1.8rem, 4.4vw, 2.6rem)/1 var(--f-black); color: var(--gold-hi); text-shadow: 0 2px 0 #000, 0 0 20px rgba(241, 213, 138, .2); }
.floor__req { margin: 2px 0 0; font-style: italic; color: var(--text-dim); font-size: 1rem; }
.floor__count { font: 500 .78rem var(--f-mono); color: var(--text-dim); padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(201, 162, 74, .25); }
.floor__count b { color: var(--gold-hi); }
.floor__banners { list-style: none; margin: 16px 0 0; padding: 12px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 10px; background: linear-gradient(180deg, #8a6a2a, #3a2a10) top / 100% 3px no-repeat; }
.hb { width: 66px; display: flex; flex-direction: column; align-items: center; gap: 3px; opacity: 0; transform: translateY(-16px) scaleY(.4); transform-origin: top; transition: opacity .5s, transform .7s cubic-bezier(.3, 1.5, .5, 1); transition-delay: calc(.25s + var(--i) * 45ms); }
.floor.is-in .hb { opacity: 1; transform: none; }
.hb__flag { display: block; width: 34px; height: 52px; transform-origin: 50% 0; animation: sway 5s ease-in-out infinite; animation-delay: calc(var(--i) * -.7s); filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .6)); }
.hb__name { font: 500 .62rem var(--f-mono); color: var(--text-dim); white-space: nowrap; }
.hb__held { font: 400 .6rem var(--f-mono); color: var(--text-faint); white-space: nowrap; }
.hb.is-you { width: auto; min-width: 96px; }
.hb.is-you .hb__flag { width: 44px; height: 66px; filter: drop-shadow(0 0 10px rgba(20, 241, 149, .8)) drop-shadow(0 0 24px rgba(20, 241, 149, .4)); animation: sway 5s ease-in-out infinite, youglow 2.4s ease-in-out infinite; }
@keyframes youglow { 50% { filter: drop-shadow(0 0 4px rgba(20, 241, 149, .5)) drop-shadow(0 0 12px rgba(20, 241, 149, .2)); } }
.hb.is-you .hb__name { color: var(--mint); font-weight: 700; font-size: .72rem; }
.hb.is-you .hb__held { color: var(--mint); font-size: .66rem; }
.hb--more, .hb--empty { width: auto; align-self: center; font-style: italic; color: var(--text-faint); font-size: .95rem; }
.hb--more span { font: 700 .9rem var(--f-mono); color: var(--gold); font-style: normal; }
.tower__gate { position: relative; height: 96px; background: linear-gradient(90deg, rgba(0, 0, 0, .6), transparent 16%, transparent 84%, rgba(0, 0, 0, .6)), var(--bricks); border-left: 3px solid #141117; border-right: 3px solid #141117; }
.tower__door { position: absolute; left: 50%; bottom: 0; width: 86px; height: 80px; transform: translateX(-50%); border-radius: 43px 43px 0 0; border: 4px solid #141117; background: repeating-linear-gradient(90deg, #4a2c16 0 12px, #2c180c 12px 14px); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .3); }
.tower__door::after { content: ''; position: absolute; left: 50%; top: 44px; width: 8px; height: 8px; border-radius: 50%; margin-left: 10px; background: var(--gold); }
.dungeon { position: relative; max-width: 860px; margin: 0 auto; padding: 60px var(--gutter) 20px; text-align: center; background: radial-gradient(ellipse at 50% 30%, rgba(163, 40, 58, .14), transparent 60%); }
.dungeon__bars { height: 110px; max-width: 360px; margin: 0 auto 18px; border-radius: 55px 55px 0 0; border: 6px solid #2b2a30; background: repeating-linear-gradient(90deg, transparent 0 26px, #3a3840 26px 34px), radial-gradient(ellipse at 50% 100%, rgba(163, 40, 58, .35), #050407 70%); }
.dungeon__title { font: 700 clamp(1.8rem, 4vw, 2.4rem) var(--f-black); color: #e0707f; margin-bottom: .3em; }
.dungeon p { color: var(--text-dim); max-width: 52ch; margin: 0 auto; }
@media (max-width: 700px) {
  .floor { width: min(100%, calc(var(--w) + 14%)); }
  .floor__win, .tower__lantern, .tower::before { display: none; }
  .floor__plaque { text-align: center; flex-direction: column; gap: 6px; }
  .floor__title { align-items: center; }
  .floor::after { left: -6px; right: -6px; }
  .hb { width: 58px; }
}

/* =================== YOUR LORDSHIP =================== */
.me-page { max-width: 1100px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) 0; }
.letter { max-width: 560px; margin: 40px auto; padding: 56px 32px 40px; text-align: center; }
.letter__seal { display: grid; place-items: center; width: 76px; height: 76px; margin: -88px auto 18px; border-radius: 52% 48% 55% 45% / 48% 54% 46% 52%; background: radial-gradient(circle at 36% 30%, #d4465b, #8a1426 55%, #4a0712); color: #f2b8a8; font: 700 2.2rem var(--f-black); box-shadow: 0 6px 14px rgba(0, 0, 0, .6); }
.letter p { color: var(--text-dim); }
.letter .page-title { margin-bottom: .4em; font-size: clamp(1.8rem, 5vw, 2.6rem); }
.letter .seal-btn { margin: 10px 0 18px; }
.letter__fine { font-size: .92rem; font-style: italic; }
.lordship { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(18px, 4vw, 48px); }
.lordship__ins { position: relative; width: clamp(110px, 18vw, 170px); aspect-ratio: 1; display: grid; place-items: center; }
.lordship__ins::before { content: ''; position: absolute; inset: -20%; border-radius: 50%; background: radial-gradient(circle, rgba(241, 213, 138, .22), transparent 65%); animation: halo 4s ease-in-out infinite; }
.lordship__insignia, .lordship__ins .insignia { position: relative; width: 100%; height: 100%; }
.insignia--none { display: grid; place-items: center; border: 2px dashed var(--gold-lo); border-radius: 50%; font: 700 3rem var(--f-display); color: var(--gold); }
.lordship__rank { font: 700 clamp(3rem, 9vw, 5.8rem)/1 var(--f-black); background: linear-gradient(180deg, #fff3c4, #e2b450 50%, #9b6a1a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #000); }
.lordship__wallet { margin: 8px 0 0; }
.lordship__wallet a { color: var(--text-dim); text-decoration: none; font-size: .9rem; }
.lordship__glass { display: flex; align-items: center; gap: 16px; }
.hg { width: 84px; height: 140px; flex: none; }
.hg__top { transform: translateY(calc(22px + var(--frac) * 78px)); transition: transform 1s; }
.hg__bot { transform: translateY(calc(178px - var(--frac) * 78px)); transition: transform 1s; }
.hg__stream { animation: sand 1s linear infinite; }
@keyframes sand { to { stroke-dashoffset: -16; } }
.lordship__count { display: flex; flex-direction: column; }
.lordship__count .kicker { margin-bottom: .3em; }
.lordship__count b { font-size: clamp(1.4rem, 3.4vw, 2rem); color: var(--mint); }
.lordship__count small { color: var(--text-faint); font-style: italic; font-size: .9rem; }
.ladder { list-style: none; margin: clamp(32px, 5vw, 56px) 0; padding: 16px 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; border-top: 1px solid rgba(201, 162, 74, .25); border-bottom: 1px solid rgba(201, 162, 74, .25); }
.ladder li { display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: .38; filter: grayscale(.8); font: 600 .62rem var(--f-caps); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.ladder .insignia { width: 44px; height: 44px; }
.ladder li.is-won { opacity: 1; filter: none; color: var(--gold-hi); }
.ladder li.is-here .insignia { filter: drop-shadow(0 0 10px rgba(20, 241, 149, .8)); }
.ladder li.is-here { color: var(--mint); }
.purse { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px 20px; margin: 0 0 clamp(36px, 6vw, 64px); }
.purse div { padding-top: 10px; border-top: 3px double rgba(201, 162, 74, .45); }
.purse dt { font: 600 .66rem var(--f-caps); letter-spacing: .2em; text-transform: uppercase; color: var(--text-faint); }
.purse dd { margin: 4px 0 0; font: 500 1.4rem var(--f-mono); color: var(--gold-hi); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.purse dd small { font-size: .7rem; color: var(--text-dim); }
.purse dd em { flex-basis: 100%; font: italic 500 .95rem var(--f-body); color: var(--text-dim); }
.purse dd.is-ok { color: var(--mint); }
.purse dd.is-warn { color: var(--down); }
.spoils { padding: clamp(24px, 4vw, 40px); }
.spoils .sec-title { text-align: center; margin-bottom: 18px; }
.spoils__list { list-style: none; margin: 0; padding: 0; }
.spoil { display: grid; grid-template-columns: 130px 140px 56px 1fr 170px auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dotted rgba(201, 162, 74, .3); }
.spoil__date { font: 400 .78rem var(--f-mono); color: var(--text-faint); }
.spoil__rank { font: 600 .8rem var(--f-caps); letter-spacing: .08em; color: var(--gold); }
.spoil__seal { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 52% 48% 55% 45% / 48% 54% 46% 52%; font: 900 .78rem var(--f-display); color: #fff; background: radial-gradient(circle at 35% 30%, #d4465b, #8a1426); box-shadow: inset 2px 3px 4px rgba(255, 255, 255, .25); }
.spoil__seal.m0_5 { background: radial-gradient(circle at 35% 30%, #a9b0b8, #5d636b); }
.spoil__seal.m1 { background: radial-gradient(circle at 35% 30%, #eef2f6, #8b96a3); color: #222; }
.spoil__seal.m2 { background: radial-gradient(circle at 35% 30%, #f6d77a, #a8741f); color: #3a2208; }
.spoil__seal.m5 { background: radial-gradient(circle at 35% 30%, #b98aff, #4b1f6f); }
.spoil__seal.m20 { background: radial-gradient(circle at 35% 30%, #7dffcb, #0a8a55); color: #04261a; box-shadow: 0 0 16px rgba(20, 241, 149, .6); }
.spoil__amt { font: 500 .95rem var(--f-mono); }
.spoil__amt b { color: #fff; }
.spoil__amt small { display: block; color: var(--text-dim); }
.spoil__st { font-size: .95rem; color: var(--text-dim); font-style: italic; }
.spoil--paid .spoil__st { color: var(--mint); font-style: normal; }
.spoil--failed .spoil__st { color: var(--down); }
.spoil__relive { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(201, 162, 74, .4); background: none; color: var(--gold-hi); cursor: pointer; font: 600 .7rem var(--f-caps); letter-spacing: .14em; text-transform: uppercase; }
.spoil__relive:hover { background: rgba(201, 162, 74, .12); }
.spoils__empty { text-align: center; color: var(--text-dim); font-style: italic; }
.me-page__out { text-align: center; margin-top: 32px; }
@media (max-width: 860px) {
  .lordship { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .lordship__glass { justify-content: center; text-align: left; }
  .ladder { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 14px; }
  .spoil { grid-template-columns: 52px 1fr auto; grid-template-areas: "seal amt relive" "seal rank rank" "seal date st"; gap: 2px 12px; }
  .spoil__seal { grid-area: seal; }
  .spoil__amt { grid-area: amt; }
  .spoil__rank { grid-area: rank; }
  .spoil__date { grid-area: date; }
  .spoil__st { grid-area: st; text-align: right; font-size: .85rem; }
  .spoil__relive { grid-area: relive; }
}

/* =================== A COIN OF THE REALM =================== */
.coin-page { max-width: 1200px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--gutter) 0; }
.coin-page--lost { text-align: center; padding-top: 100px; }
.coin-hero { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.coin-hero__arms { position: relative; width: min(360px, 82vw); margin: 0 auto; }
.coin-page--main .coin-hero__arms { padding-top: 6%; }
.coin-page--main .coin-hero__arms .throne-svg { position: absolute; inset: -4% -8% 0; width: 116%; height: 104%; opacity: .9; }
.coin-page--main .coin-hero__arms .arms { position: relative; width: 82%; margin: 0 auto; }
.coin-title { font: 700 clamp(2rem, 5.4vw, 3.4rem)/1.08 var(--f-display); color: var(--gold-hi); overflow-wrap: anywhere; text-shadow: 0 3px 0 #000; }
.coin-title__sym { display: inline-block; font: 500 .42em var(--f-mono); color: var(--mint); vertical-align: middle; border: 1px solid rgba(20, 241, 149, .45); padding: .2em .5em; border-radius: 4px; text-shadow: none; }
.coin-desc { margin-top: .8em; font-size: 1.25rem; font-style: italic; color: var(--text-dim); overflow-wrap: anywhere; }
.coin-heralds { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.herald { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(201, 162, 74, .4); background: rgba(0, 0, 0, .3); color: var(--gold-hi); text-decoration: none; cursor: pointer; font: 500 .8rem var(--f-mono); transition: background .2s, border-color .2s; }
.herald:hover { background: rgba(201, 162, 74, .14); border-color: var(--gold-hi); }
.herald .ico { width: 18px; height: 18px; }
.ledger--coin { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.coin-body { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; margin-top: clamp(40px, 6vw, 72px); }
.coin-candle { text-align: center; }
.coin-candle .sec-title { margin-bottom: 18px; }
.coin-candle__note { margin-top: 14px; color: var(--text-dim); font-size: 1rem; }
.trade { padding: clamp(24px, 4vw, 36px); }
.trade .sec-title { margin-bottom: 16px; }
.trade__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.trade__tabs button { min-height: 52px; border-radius: 8px; border: 1px solid rgba(201, 162, 74, .3); background: rgba(0, 0, 0, .3); color: var(--text-dim); cursor: pointer; font: 700 .86rem var(--f-caps); letter-spacing: .1em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: background .2s, color .2s, border-color .2s; }
.trade__tabs button small { font: 400 .62rem var(--f-mono); letter-spacing: .1em; color: var(--text-faint); }
.trade__tabs button[aria-selected="true"] { background: linear-gradient(180deg, #2a5a3e, #11301f); border-color: var(--up); color: #fff; }
.trade.is-sell .trade__tabs button[aria-selected="true"] { background: linear-gradient(180deg, #6e1424, #3a0a12); border-color: var(--down); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field__lbl { font: 600 .7rem var(--f-caps); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.field__lbl small { text-transform: none; letter-spacing: 0; font: italic 500 .95rem var(--f-body); color: var(--text-faint); }
.field__box { display: flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 14px; border-radius: 6px; border: 1px solid rgba(201, 162, 74, .35); background: rgba(0, 0, 0, .4); transition: border-color .2s, box-shadow .2s; }
.field__box:focus-within { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(20, 241, 149, .2); }
.field__box input, .field__box textarea { flex: 1; min-width: 0; padding: 12px 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 1.12rem; }
.field__box input[type="number"] { font-family: var(--f-mono); font-size: 1.05rem; }
.field__box textarea { resize: vertical; min-height: 80px; }
.field__box input::placeholder, .field__box textarea::placeholder { color: #7d7262; font-style: italic; }
.field__box input[aria-invalid="true"] { color: var(--down); }
.field__unit { font: 500 .8rem var(--f-mono); color: var(--text-dim); }
.field__unit--pre { color: var(--gold); font-size: 1rem; }
.field__err { color: var(--down); font-size: .95rem; min-height: 0; }
.field__err:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(201, 162, 74, .35); background: rgba(0, 0, 0, .3); color: var(--text); cursor: pointer; font: 500 .82rem var(--f-mono); display: inline-flex; align-items: center; }
.chip:hover { border-color: var(--gold-hi); }
.chip[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold-hi); }
.chip--custom { padding: 0 10px; }
.chip--custom input { width: 84px; border: 0; background: transparent; color: var(--text); font: 500 .82rem var(--f-mono); outline: 0; }
.chip--custom:focus-within { border-color: var(--mint); }
.slip { border: 0; padding: 0; margin: 0; }
.slip legend { font: 600 .7rem var(--f-caps); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; padding: 0; }
.slip .chips { margin-top: 0; }
.trade__est { font: 500 .85rem var(--f-mono); color: var(--text-dim); min-height: 1.4em; }
.trade__est b { color: var(--gold-hi); }
.trade__fee { font-size: .95rem; color: var(--text-faint); font-style: italic; }
.trade.is-busy [data-go] { animation: breathe 1.4s ease-in-out infinite; }
.trade__result, .forge__result { margin-top: 14px; }
.trade__result p, .forge__result p { margin: 0; }
.is-ok { color: var(--mint); }
.is-err { color: var(--down); }
.chronicle { max-width: 820px; margin: clamp(48px, 7vw, 80px) auto 0; }
.chronicle .sec-title { text-align: center; margin-bottom: 18px; }
.chronicle__list { list-style: none; margin: 0; padding: 0; }
.chronicle__list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dotted rgba(201, 162, 74, .25); }
.chronicle__list li span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chronicle__list time { font-size: .75rem; color: var(--text-faint); }
.chronicle__quiet { justify-content: center; color: var(--text-faint); font-style: italic; }
@media (max-width: 860px) {
  .coin-hero, .coin-body { grid-template-columns: 1fr; }
  .coin-hero__copy { text-align: center; }
  .coin-heralds { justify-content: center; }
  .ledger--coin { grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; }
}

/* =================== THE FORGE =================== */
.forge-page, .gate-page { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.forge { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.forge__stage { position: sticky; top: calc(var(--bar-h) + 30px); height: 520px; border-radius: 12px; overflow: hidden; background: radial-gradient(ellipse at 50% 92%, rgba(255, 110, 30, .3), transparent 60%), linear-gradient(180deg, #0f0b12, #160e0c); border: 1px solid rgba(201, 162, 74, .2); }
.forge__embers { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: radial-gradient(ellipse at 30% 100%, rgba(255, 120, 30, .55), transparent 55%), radial-gradient(ellipse at 70% 100%, rgba(255, 70, 20, .45), transparent 50%); animation: embers 3s ease-in-out infinite alternate; }
@keyframes embers { to { opacity: .55; transform: scaleY(.9); } }
.forge__coin { position: absolute; left: 50%; top: 92px; width: 200px; height: 200px; margin-left: -100px; z-index: 2; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .7)); transition: filter .8s; }
.forge__coin svg { width: 100%; height: 100%; display: block; }
.forge__coin.is-hot { filter: sepia(1) saturate(5) hue-rotate(-25deg) brightness(1.25) drop-shadow(0 0 30px #ff6a00); }
.forge__coin.is-born { animation: born 1.8s ease-out; }
@keyframes born { 0% { filter: brightness(2.2) drop-shadow(0 0 50px #fff2b8); } 100% { filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .7)); } }
.forge__hammer { position: absolute; left: calc(50% - 6px); top: 104px; width: 170px; height: 170px; z-index: 3; transform-origin: 92% 87%; transform: rotate(20deg); pointer-events: none; }
.forge__hammer svg { width: 100%; height: 100%; display: block; }
.forge__anvil { position: absolute; left: 50%; top: 286px; width: 280px; margin-left: -140px; z-index: 1; }
.forge__anvil svg { width: 100%; display: block; }
.forge__sparks { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
.forge__form { padding: clamp(24px, 4vw, 40px); }
.forge__form .sec-title { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 2fr 1fr; gap: 0 14px; }
.field-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-set { border: 0; padding: 0; margin: 0 0 4px; }
.field-set legend { font: 600 .7rem var(--f-caps); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); padding: 0; margin-bottom: 8px; }
.field-set legend small { text-transform: none; letter-spacing: 0; font: italic 500 .95rem var(--f-body); color: var(--text-faint); }
.sigil { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-height: 76px; border-radius: 8px; border: 1px dashed rgba(201, 162, 74, .55); background: rgba(0, 0, 0, .3); cursor: pointer; transition: border-color .2s, background .2s; }
.sigil:hover, .sigil.is-over { border-color: var(--gold-hi); background: rgba(201, 162, 74, .08); }
.sigil:focus-within { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(20, 241, 149, .2); }
.sigil input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.sigil__thumb { flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #3a2a50, #120c18); box-shadow: 0 0 0 2px #c9952f; color: var(--gold); }
.sigil__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sigil__txt { color: var(--text-dim); font-style: italic; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .forge { grid-template-columns: 1fr; }
  .forge__stage { position: relative; top: 0; height: 400px; }
  .forge__stage > * { translate: 0 -40px; }
  .forge__embers { translate: 0 0; }
}
@media (max-width: 560px) {
  .field-row, .field-row--3 { grid-template-columns: 1fr; }
  .forge__stage { height: 330px; }
  .forge__coin { width: 150px; height: 150px; margin-left: -75px; top: 92px; }
  .forge__hammer { width: 130px; height: 130px; top: 96px; left: calc(50% - 10px); }
  .forge__anvil { width: 220px; margin-left: -110px; top: 236px; }
}

/* the sealed gate */
.gate { text-align: center; padding: clamp(32px, 6vw, 64px) 0 20px; overflow: hidden; }
.gate__arch { position: relative; width: min(420px, 86vw); margin: 0 auto 26px; }
.gate__arch::before { /* torches either side */
  content: ''; position: absolute; inset: 10% -30% 20%; z-index: -1; pointer-events: none;
  background: radial-gradient(circle 140px at 8% 40%, rgba(255, 150, 60, .3), transparent), radial-gradient(circle 140px at 92% 40%, rgba(255, 150, 60, .3), transparent);
  animation: halo 2.6s ease-in-out infinite;
}
.gate__arch::after { /* mist rolling at the threshold */
  content: ''; position: absolute; left: -10%; right: -10%; bottom: -6%; height: 34%; pointer-events: none;
  background: radial-gradient(ellipse at 30% 60%, rgba(180, 160, 220, .16), transparent 60%), radial-gradient(ellipse at 70% 70%, rgba(180, 160, 220, .12), transparent 60%);
  filter: blur(6px); animation: mist 9s ease-in-out infinite alternate;
}
@keyframes mist { to { transform: translateX(6%); opacity: .6; } }
.gate__svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .7)); }
.gate--slam .gate__portcullis { animation: slam .8s cubic-bezier(.6, 0, 1, 1) both; }
@keyframes slam { 0% { transform: translateY(-400px); } 70% { transform: translateY(0); } 82% { transform: translateY(-16px); } 100% { transform: translateY(0); } }
.gate--slam .gate__arch { animation: thud .35s .56s ease-out; }
.gate__seal { position: absolute; left: 50%; top: 54%; width: 96px; height: 96px; margin: -48px 0 0 -48px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .7)); animation: sealpulse 4s ease-in-out infinite; }
.gate__seal svg { width: 100%; height: 100%; }
.gate__title { font: 700 clamp(2rem, 5.6vw, 3.4rem)/1.12 var(--f-black); color: var(--gold-hi); max-width: 20ch; margin: 0 auto .5em; text-shadow: 0 3px 0 #000, 0 0 30px rgba(241, 213, 138, .2); }
.gate__lede { max-width: 54ch; margin: 0 auto 26px; color: var(--text-dim); font-size: 1.15rem; }
.gate__cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 28px; }
