:root {
  --dw-bg: #160c26; --dw-fg: #efe6d4; --dw-accent: #3fe0c5; --dw-panel: rgba(28, 16, 48, .96);
  --dw-font-body: 'Spectral', Georgia, serif; --display: 'Cinzel Decorative', Georgia, serif; --tile: 'Cinzel', Georgia, serif;
  --teal: #3fe0c5; --gold: #f2c35b; --crimson: #b8324a; --parch: #efe6d4; --line: rgba(239, 230, 212, .16);
}
body { overflow-x: hidden; font-size: 1.08rem; background: radial-gradient(70% 50% at 50% 30%, #2a1648, var(--dw-bg) 70%) fixed, var(--dw-bg); }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0 0 .45em; }
h2 { font-size: clamp(1.8rem, 4.2vw, 2.9rem); color: var(--gold); }
section { padding: clamp(56px, 8vw, 110px) clamp(16px, 5vw, 64px); }

.topbar { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 12px clamp(16px, 4vw, 40px); background: #160c26cc; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid #f2c35b33; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--gold); text-decoration: none; letter-spacing: .04em; }
.topbar nav { display: flex; align-items: center; gap: 18px; font-family: var(--tile); font-size: .9rem; }
.topbar nav a { color: var(--parch); text-decoration: none; }
.topbar nav a:hover { color: var(--teal); }
@media (max-width: 640px) { .topbar nav a { display: none; } }

.hero { position: relative; min-height: 100svh; display: grid; align-items: end; justify-items: center; padding: 0; overflow: hidden; text-align: center; }
.hero-art { position: absolute; inset: -4% 0 auto; width: 100%; height: 108%; object-fit: cover; object-position: 50% 48%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(#160c2655, transparent 30%, transparent 45%, #160c26e6 78%, var(--dw-bg)); }
.hero-copy { position: relative; z-index: 2; max-width: 760px; padding: 0 16px clamp(40px, 8vh, 90px); }
.kicker { text-shadow: 0 1px 8px #000, 0 0 2px #000; font-family: var(--tile); font-size: .82rem; letter-spacing: .24em; text-transform: uppercase; color: var(--teal); margin: 0 0 .6rem; }
.hero h1 { font-size: clamp(2.6rem, 7.6vw, 5.6rem); color: var(--parch); text-shadow: 0 4px 30px #000; }
.lede { font-size: clamp(1.08rem, 2vw, 1.28rem); text-shadow: 0 2px 12px #000; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 1.4rem; }
.btn { font-family: var(--tile); font-weight: 700; font-size: .95rem; letter-spacing: .06em; text-decoration: none; color: var(--parch); border: 1px solid var(--gold); padding: .85em 1.4em; border-radius: 4px; background: #160c2699; }
.btn:hover { background: var(--gold); color: #1c1030; }
.btn-hot { background: var(--teal); border-color: var(--teal); color: #08201c; }

.hs { position: absolute; width: 8%; aspect-ratio: 1; border-radius: 50%; border: 2px dashed transparent; background: transparent; transition: border-color .3s, background .3s; z-index: 3; }
.hs:hover, .hs:focus-visible { border-color: var(--gold); background: #f2c35b22; }
.hs.is-found { border-color: #3fe0c588; }
.hs-clash { left: 50%; top: 42%; width: 70px; transform: translate(-50%, -50%); }
.hs-quill { left: 35%; top: 47%; width: 9%; } .hs-medal { left: 43%; top: 61%; width: 9%; } .hs-book { left: 48%; top: 79%; width: 14%; }

.duel { max-width: 1100px; margin: 0 auto; }
.duel-head { text-align: center; max-width: 780px; margin: 0 auto 1.6rem; }
.gild-key { color: #1c1030; background: var(--gold); padding: 0 .3em; border-radius: 3px; font-weight: 700; }
.arena { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 16px; align-items: center; }
@media (max-width: 760px) { .arena { grid-template-columns: 1fr 1fr; } .field { grid-column: 1 / -1; order: 3; } }
.caster { text-align: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #1f1236; }
.caster.you { border-color: #3fe0c566; } .caster.foe { border-color: #b8324a88; }
.sigil { width: 120px; height: 120px; margin: 0 auto; display: grid; place-items: center; font-size: 3.4rem; color: var(--teal); border-radius: 50%; background: radial-gradient(#3fe0c533, transparent 70%); border: 1px solid #3fe0c555; }
.caster img { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; margin: 0 auto; border: 2px solid var(--crimson); }
.who { margin: .5rem 0; display: grid; }
.who b { font-family: var(--display); font-size: 1.1rem; }
.who span { font-size: .85rem; opacity: .75; }
.ink { height: 12px; border-radius: 999px; background: #0007; overflow: hidden; border: 1px solid var(--line); }
.ink i { display: block; height: 100%; width: 100%; transition: width .6s ease; }
.you .ink i { background: linear-gradient(90deg, #1b9c87, var(--teal)); } .foe .ink i { background: linear-gradient(90deg, #7d1f31, #e0566f); }
.hpnum { margin: .35rem 0 0; font-family: var(--tile); font-size: .9rem; }
.field { min-height: 160px; display: grid; align-content: center; text-align: center; gap: .4rem; }
.bolt { margin: 0; min-height: 1.4em; font-family: var(--tile); font-weight: 700; font-size: clamp(1.4rem, 3.6vw, 2.2rem); letter-spacing: .14em; }
.bolt.go-right { color: var(--teal); text-shadow: 0 0 18px var(--teal); animation: right .9s ease-out; }
.bolt.go-left { color: #ff7d93; text-shadow: 0 0 18px #ff4d6d; animation: left .9s ease-out; }
@keyframes right { from { transform: translateX(-40%) scale(.7); opacity: 0; } 60% { opacity: 1; } }
@keyframes left { from { transform: translateX(40%) scale(.7); opacity: 0; } 60% { opacity: 1; } }
.log { margin: 0; font-style: italic; opacity: .9; }
.spellbook { margin-top: 18px; padding: 18px; border-radius: 16px; background: #efe6d4; color: #2a1a10; box-shadow: 0 30px 80px #0009; text-align: center; }
.spell { min-height: 58px; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 6px; border-bottom: 2px dashed #2a1a1033; }
.preview { margin: .4rem 0; font-family: var(--tile); font-size: .95rem; min-height: 1.4em; }
.preview .bad { color: var(--crimson); } .preview .good { color: #11705f; font-weight: 700; }
.rack { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.tile { position: relative; width: 54px; height: 58px; border-radius: 8px; border: 0; cursor: pointer; font-family: var(--tile); font-weight: 700; font-size: 1.7rem; color: #2a1a10;
  background: linear-gradient(#fff8e8, #e5d4b2); box-shadow: 0 4px 0 #a88d5d, 0 6px 12px #0003; transition: transform .1s; padding: 0; }
.tile sub { position: absolute; right: 5px; bottom: 3px; font-size: .7rem; font-family: var(--dw-font-body); }
.tile.gilded { background: linear-gradient(#ffe9a8, #e9b949); box-shadow: 0 4px 0 #a07a1d, 0 0 16px #f2c35b88; }
.tile:hover:not([disabled]) { transform: translateY(-3px); }
.tile[disabled] { opacity: .25; cursor: default; }
.spell .tile { width: 46px; height: 50px; font-size: 1.4rem; }
@media (max-width: 480px) { .tile { width: 40px; height: 46px; font-size: 1.3rem; } .spell .tile { width: 34px; height: 40px; font-size: 1.05rem; } .rack, .spell { gap: 4px; } .spellbook { padding: 14px 10px; } }
.actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; align-items: center; }
.cast { font-family: var(--display); font-weight: 700; font-size: 1.3rem; padding: .4em 1.6em; border-radius: 999px; border: 0; background: #1f1236; color: var(--teal); cursor: pointer; box-shadow: 0 0 20px #3fe0c544; }
.cast[disabled] { opacity: .4; cursor: default; box-shadow: none; }
.minor { font: inherit; font-size: .95rem; background: none; border: 1px solid #2a1a1044; border-radius: 999px; padding: .4em 1em; cursor: pointer; color: #2a1a10; }

.grimbald { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.grimbald .reward, .grimbald .journal { grid-column: 1 / -1; }
@media (max-width: 860px) { .grimbald { grid-template-columns: 1fr; } }
.art { position: relative; margin: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px #f2c35b55, 0 30px 80px #000a; }
.art img { width: 100%; height: auto; }
.features { padding-left: 1.1em; }
.features li { margin: .45em 0; }
.features b { color: var(--teal); }
.found { font-family: var(--tile); color: var(--gold); }
.reward { max-width: 720px; margin: 0 auto; padding: 1rem 1.2rem; border: 1px solid var(--gold); border-radius: 10px; background: #f2c35b14; }
.journal { max-width: 780px; margin: 0 auto; }
.journal li { margin: .5em 0; }

.vote { text-align: center; max-width: 1000px; margin: 0 auto; }
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 1.2rem auto 0; }
.offer { font: inherit; font-family: var(--tile); font-weight: 700; font-size: 1.05rem; color: var(--parch); background: #1f1236; border: 1px solid var(--line); border-radius: 12px; padding: 1em; cursor: pointer; transition: transform .15s, border-color .15s; }
.offer small { font-family: var(--dw-font-body); font-weight: 400; font-size: .88rem; opacity: .8; }
.offer:hover, .offer:focus-visible { transform: translateY(-3px); border-color: var(--teal); }
.offers.small .offer { font-size: .92rem; }

.guild { display: grid; justify-items: center; text-align: center; background: linear-gradient(transparent, #2a1238); }
.guild .dw-optin { text-align: left; width: 100%; }
.offer-note { margin: 0; color: var(--gold); font-family: var(--tile); }

.foot { padding: 30px 16px 10px; text-align: center; border-top: 1px solid var(--line); }
.glyph { font: inherit; font-family: var(--display); background: none; border: 0; color: inherit; padding: 0 .3em; cursor: pointer; font-size: 1.1rem; }
.glyph:hover, .glyph:focus-visible { color: var(--gold); }

@media (max-width: 640px) { .hero-shade { background: linear-gradient(#160c2655, transparent 20%, #160c26aa 45%, #160c26f2 70%, var(--dw-bg)); } }
