/* Eldrathar landing — stone hall, torches, Continue / New Game */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=IM+Fell+English:ital@0;1&family=Press+Start+2P&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
    width: 100%;
}

body.landing-body {
    overflow: auto;
    background: #0d120e;
    color: hsl(40, 22%, 54%);
    font-family: 'Cinzel', serif;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 0.02em;
    padding: 0;
    display: block;
    text-transform: none;
}

/* ─── Castle stone wall background ─── */
.stone-bg {
    background-color: #0d120e;
    background-image:
        linear-gradient(rgba(7, 8, 14, 0.52), rgba(7, 5, 10, 0.72)),
        url('../img/ui/castle-wall.png');
    background-size: cover, cover;
    background-position: center, center;
    position: relative;
    min-height: 100vh;
}

.stone-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 25%, rgba(3, 3, 7, 0.78) 100%);
    pointer-events: none;
    z-index: 0;
}

.vignette {
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
}

.landing-warm-cast {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(160, 60, 0, 0.07) 0%, transparent 100%);
    z-index: 1;
}

/* ─── Pixel torch ─── */
@keyframes flame-frame-cycle {
    0%, 24.99% { opacity: 1; }
    25%, 100%  { opacity: 0; }
}
@keyframes torch-halo-pulse {
    0%, 100% { opacity: 0.95; transform: translate(-50%) scale(1); }
    50%      { opacity: 1;    transform: translate(-50%) scale(1.06); }
}
@keyframes torch-ember-rise {
    0%   { opacity: 0; transform: translate(-50%) scale(1); }
    10%  { opacity: 1; }
    80%  { opacity: 0.6; }
    100% { opacity: 0; transform: translate(calc(-50% + var(--ember-drift, 0px))) translateY(-80px) scale(0.4); }
}

.landing-torch {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    z-index: 50;
    pointer-events: none;
    user-select: none;
}
.landing-torch--left  { left: clamp(60px, 10vw, 120px); }
.landing-torch--right { right: clamp(60px, 10vw, 120px); }

.landing-torch__shade {
    position: absolute;
    top: 90px;
    width: 36px;
    height: 160px;
    transform: translateY(-50%);
    filter: blur(3px);
    z-index: 2;
}
.landing-torch--left .landing-torch__shade {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.3) 55%, transparent 100%);
    border-radius: 0 4px 4px 0;
}
.landing-torch--right .landing-torch__shade {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.3) 55%, transparent 100%);
    border-radius: 4px 0 0 4px;
}

.pixel-torch {
    transform-origin: bottom;
    width: 56px;
    height: 180px;
    position: relative;
    transform: scale(1.4);
}
.pixel-torch__halo {
    pointer-events: none;
    filter: blur(10px);
    mix-blend-mode: screen;
    z-index: 0;
    background: radial-gradient(circle, rgba(255,204,102,0.6) 0%, rgba(255,140,26,0.3) 18%, rgba(230,77,0,0.14) 40%, transparent 72%);
    width: 360px;
    height: 360px;
    animation: torch-halo-pulse 1.4s ease-in-out infinite;
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translate(-50%);
}
.pixel-torch__halo::after {
    content: "";
    filter: blur(6px);
    background: radial-gradient(circle, rgba(255,249,179,0.85), transparent 65%);
    width: 110px;
    height: 110px;
    position: absolute;
    bottom: 40%;
    left: 50%;
    transform: translate(-50%, 50%);
}
.pixel-torch__bracket {
    z-index: 1;
    height: 56px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}
.pixel-torch__bracket-plate {
    background: radial-gradient(circle at 30% 30%, #dda23c, #835521 55%, #3d200b);
    border-radius: 4px;
    width: 34px;
    height: 30px;
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translate(-50%);
    box-shadow: inset 0 2px rgba(249,220,134,0.35), inset 0 -2px rgba(0,0,0,0.6), 0 3px 6px rgba(0,0,0,0.7);
}
.pixel-torch__bracket-plate::before,
.pixel-torch__bracket-plate::after {
    content: "";
    background: radial-gradient(circle at 30% 30%, #f7d56e, #492c12);
    border-radius: 50%;
    width: 5px;
    height: 5px;
    position: absolute;
    top: 4px;
    box-shadow: 0 1px rgba(0,0,0,0.7);
}
.pixel-torch__bracket-plate::before { left: 4px; }
.pixel-torch__bracket-plate::after  { right: 4px; }
.pixel-torch__bracket-arm {
    background: linear-gradient(90deg, #3d200b, #bd8228, #3d200b);
    width: 10px;
    height: 18px;
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translate(-50%);
    box-shadow: inset 0 1px rgba(249,220,134,0.3);
}
.pixel-torch__bracket-cup {
    background: linear-gradient(#3d200b, #d99726 40%, #5d3614);
    border-radius: 3px 3px 6px 6px;
    width: 28px;
    height: 14px;
    position: absolute;
    bottom: 38px;
    left: 50%;
    transform: translate(-50%);
    box-shadow: inset 0 2px rgba(249,220,134,0.4), inset 0 -3px 3px rgba(0,0,0,0.7), 0 2px 3px rgba(0,0,0,0.7);
}
.pixel-torch__handle {
    z-index: 2;
    background: repeating-linear-gradient(0deg, rgba(38,21,13,0.5) 0 1px, transparent 1px 5px), linear-gradient(90deg, #341f14, #6f4520 45%, #341f14);
    border-radius: 2px;
    width: 14px;
    height: 36px;
    position: absolute;
    bottom: 46px;
    left: 50%;
    transform: translate(-50%);
    box-shadow: inset 0 1px rgba(204,140,51,0.3), inset 0 -1px rgba(0,0,0,0.7);
}
.pixel-torch__rag {
    z-index: 3;
    background: repeating-linear-gradient(115deg, rgba(0,0,0,0.4) 0 1px, transparent 1px 4px), linear-gradient(#504030, #2e2019 70%, #1d100c);
    border-radius: 5px 5px 2px 2px;
    width: 22px;
    height: 18px;
    position: absolute;
    bottom: 78px;
    left: 50%;
    transform: translate(-50%);
    box-shadow: inset 0 2px rgba(134,104,45,0.4), inset 0 -2px 3px rgba(0,0,0,0.8);
}
.pixel-torch__flame {
    z-index: 4;
    pointer-events: none;
    shape-rendering: crispEdges;
    filter: drop-shadow(0 0 6px rgba(255,170,51,0.85)) drop-shadow(0 0 14px rgba(255,106,0,0.55));
    width: 56px;
    height: 112px;
    position: absolute;
    bottom: 92px;
    left: 50%;
    overflow: visible;
    transform: translate(-50%);
}
.pixel-torch__flame .flame-frame { opacity: 0; }
.pixel-torch__flame .flame-frame--1 { animation: 0.32s step-end infinite flame-frame-cycle; }
.pixel-torch__flame .flame-frame--2 { animation: 0.32s step-end -0.08s infinite flame-frame-cycle; }
.pixel-torch__flame .flame-frame--3 { animation: 0.32s step-end -0.16s infinite flame-frame-cycle; }
.pixel-torch__flame .flame-frame--4 { animation: 0.32s step-end -0.24s infinite flame-frame-cycle; }
.pixel-torch__flame-mid .flame-frame--1 { animation-duration: 0.24s; animation-delay: 0s; }
.pixel-torch__flame-mid .flame-frame--2 { animation-duration: 0.24s; animation-delay: -0.06s; }
.pixel-torch__flame-mid .flame-frame--3 { animation-duration: 0.24s; animation-delay: -0.12s; }
.pixel-torch__flame-mid .flame-frame--4 { animation-duration: 0.24s; animation-delay: -0.18s; }
.pixel-torch__flame-core .flame-frame--1 { animation-duration: 0.18s; animation-delay: 0s; }
.pixel-torch__flame-core .flame-frame--2 { animation-duration: 0.18s; animation-delay: -0.045s; }
.pixel-torch__flame-core .flame-frame--3 { animation-duration: 0.18s; animation-delay: -0.09s; }
.pixel-torch__flame-core .flame-frame--4 { animation-duration: 0.18s; animation-delay: -0.135s; }
.pixel-torch__ember {
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    background: #ffb54c;
    border-radius: 50%;
    width: 2.5px;
    height: 2.5px;
    position: absolute;
    bottom: 100px;
    left: 50%;
    box-shadow: 0 0 6px #f93, 0 0 12px rgba(255,85,0,0.5);
}
.pixel-torch__ember--1 { --ember-drift: 10px;  animation: 2.2s linear infinite torch-ember-rise; }
.pixel-torch__ember--2 { --ember-drift: -12px; animation: 2.6s linear 0.9s infinite torch-ember-rise; left: calc(50% + 3px); }
.pixel-torch__ember--3 { --ember-drift: 4px;   animation: 1.9s linear 1.5s infinite torch-ember-rise; left: calc(50% - 4px); }

/* ─── Layout ─── */
.landing-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 3vh 0 4vh;
    min-height: 100vh;
}

.landing-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1440px;
    padding: 0 32px;
}

.landing-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(1.6rem, 4.5vw, 3.2rem);
    font-weight: 400;
    color: hsl(41, 82%, 54%);
    letter-spacing: 0.06em;
    text-shadow:
        3px 3px 0 rgba(0, 0, 0, 0.9),
        0 0 40px hsl(41 80% 34% / 0.6),
        0 0 80px hsl(41 70% 20% / 0.3);
    line-height: 1.2;
    margin-bottom: 8px;
    text-align: center;
    image-rendering: pixelated;
}

.landing-seo-tagline {
    font-family: 'IM Fell English', serif;
    font-size: clamp(0.78rem, 1.4vw, 0.95rem);
    font-style: italic;
    color: hsl(40, 18%, 48%);
    text-align: center;
    max-width: 36rem;
    margin: 0 auto 14px;
    line-height: 1.45;
    letter-spacing: 0.02em;
}

.landing-footer-seo {
    font-family: 'Cinzel', serif !important;
    font-size: 0.55rem !important;
    letter-spacing: 0.1em !important;
    color: hsl(40, 14%, 32%) !important;
    margin-bottom: 6px !important;
}
.landing-footer-seo a {
    color: hsl(41, 45%, 42%);
    text-decoration: none;
}
.landing-footer-seo a:hover {
    color: hsl(41, 60%, 52%);
}

.landing-chapter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}
.landing-chapter__line {
    height: 1px;
    flex: 1;
    max-width: 220px;
    background: linear-gradient(to right, transparent, hsl(41, 50%, 30%));
}
.landing-chapter__line--rev {
    background: linear-gradient(to left, transparent, hsl(41, 50%, 30%));
}
.landing-chapter__text {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.38rem, 0.8vw, 0.5rem);
    color: hsl(41, 50%, 38%);
    letter-spacing: 0.16em;
    white-space: nowrap;
}

.landing-cols {
    display: flex;
    gap: 24px;
    align-items: stretch;
    flex-wrap: wrap;
}
.landing-left {
    flex: 0 0 390px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}
.landing-right {
    flex: 1 1 380px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ─── Tabs ─── */
.landing-tabs {
    display: flex;
    width: 100%;
    border: 1px solid hsl(0, 0%, 12%);
    border-bottom: none;
}
.landing-tab {
    flex: 1;
    padding: 11px 0;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    font-weight: 700;
    cursor: pointer;
    border: none;
    border-bottom: 2px solid transparent;
    background: hsl(0 0% 4%);
    color: hsl(40, 16%, 38%);
    transition: all 0.18s;
    text-transform: uppercase;
}
.landing-tab.is-active {
    border-bottom-color: hsl(41, 80%, 50%);
    background: hsl(0 0% 6%);
    color: hsl(41, 85%, 60%);
}
.landing-tab:hover:not(.is-active) {
    color: hsl(40, 22%, 50%);
}

.landing-panel {
    background: hsl(0 0% 4%);
    border: 1px solid hsl(0, 0%, 12%);
    border-top: none;
    padding: 26px 32px 24px;
    flex: 1;
}

.landing-panel-title {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: hsl(41, 80%, 55%);
    margin-bottom: 3px;
}
.landing-panel-sub {
    font-size: 0.78rem;
    color: hsl(40, 20%, 44%);
    margin-bottom: 22px;
    font-family: 'IM Fell English', serif;
    font-style: italic;
}

/* ─── Form fields ─── */
.landing-field {
    margin-bottom: 16px;
}
.landing-field label {
    display: block;
    font-size: 0.62rem;
    color: hsl(40, 25%, 52%);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 5px;
    font-family: 'Cinzel', serif;
}
.landing-field-wrap {
    position: relative;
}
.landing-field input[type="text"],
.landing-field input[type="password"],
.landing-field input[type="email"] {
    background: hsl(0 0% 3%);
    border: 1px solid hsl(0, 0%, 12%);
    border-bottom: 2px solid hsl(0, 0%, 9%);
    color: hsl(40, 30%, 82%);
    font-family: 'IM Fell English', serif;
    font-size: 0.9rem;
    width: 100%;
    padding: 9px 12px;
    outline: none;
    text-transform: none;
    letter-spacing: normal;
}
.landing-field input:focus {
    border-color: hsl(41, 50%, 28%);
    border-bottom-color: hsl(41, 55%, 36%);
}
.landing-field input.has-error {
    border-color: hsl(0, 55%, 35%);
    border-bottom-color: hsl(0, 60%, 40%);
}
.landing-field input[type="password"],
.landing-field input.has-toggle {
    padding-right: 48px;
}
.landing-toggle-pw {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: hsl(40, 18%, 38%);
    font-size: 0.7rem;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.06em;
    padding: 2px 0;
}
.landing-toggle-pw:hover {
    color: hsl(41, 60%, 50%);
}
.landing-field-error {
    font-size: 0.67rem;
    color: hsl(0, 62%, 52%);
    margin-top: 4px;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.04em;
}
.landing-form-error {
    font-size: 0.72rem;
    color: hsl(0, 62%, 52%);
    text-align: center;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}
.landing-success {
    background: hsl(140, 38%, 8%);
    border: 1px solid hsl(140, 42%, 22%);
    padding: 9px 14px;
    margin-bottom: 16px;
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    color: hsl(140, 58%, 56%);
    letter-spacing: 0.06em;
    line-height: 1.5;
}

.landing-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 12px;
}
.landing-check input {
    accent-color: hsl(41, 70%, 48%);
    width: 13px;
    height: 13px;
    cursor: pointer;
}
.landing-check span {
    font-family: 'Cinzel', serif;
    font-size: 0.6rem;
    color: hsl(40, 25%, 46%);
    letter-spacing: 0.1em;
}

/* ─── OSRS gold button ─── */
.osrs-btn {
    display: block;
    width: 100%;
    background: linear-gradient(180deg, hsl(44 90% 56%) 0%, hsl(41 75% 42%) 100%);
    border: 3px solid rgba(0, 0, 0, 0.7);
    box-shadow:
        0 0 0 1px hsl(44 85% 68%),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    color: hsl(0 0% 4%);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.04em;
    padding: 0.75rem 1.1rem;
    cursor: pointer;
    transition: filter 0.1s, transform 0.1s;
    text-transform: uppercase;
    text-align: center;
    margin-top: 6px;
}
.osrs-btn:hover:not(:disabled) {
    filter: brightness(1.12);
    box-shadow:
        0 0 0 1px hsl(44 85% 72%),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 14px hsl(44 80% 48% / 0.45);
}
.osrs-btn:active:not(:disabled) {
    filter: brightness(0.9);
    transform: translateY(1px);
}
.osrs-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ─── Donate strip (separated from login form) ─── */
.landing-support {
    margin-top: 28px;
    padding: 20px 14px 4px;
    border-top: 1px solid hsl(0, 0%, 12%);
    box-shadow: inset 0 12px 18px -14px rgba(0, 0, 0, 0.75);
    text-align: center;
}
.landing-support__title {
    font-family: 'Cinzel', serif;
    font-size: 0.6rem;
    font-weight: 700;
    color: hsl(41, 58%, 40%);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 10px;
}
.landing-support__copy {
    font-family: 'IM Fell English', serif;
    font-size: 0.76rem;
    line-height: 1.5;
    color: hsl(40, 16%, 38%);
    text-align: center;
    margin: 0 auto 14px;
    max-width: 26rem;
    font-style: italic;
}
.landing-donate-btn {
    display: inline-block;
    min-width: 8.5rem;
    padding: 9px 20px;
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: linear-gradient(to bottom, hsl(41, 70%, 38%), hsl(41, 65%, 28%));
    border: 1px solid hsl(41, 50%, 28%);
    border-bottom: 2px solid hsl(41, 45%, 18%);
    color: hsl(41, 85%, 72%);
    cursor: pointer;
    text-decoration: none;
}
.landing-donate-btn:hover {
    filter: brightness(1.12);
}
button.landing-donate-btn {
    appearance: none;
    -webkit-appearance: none;
}
.landing-footer a {
    color: hsl(40, 25%, 42%);
    text-decoration: none;
}
.landing-footer a:hover {
    color: hsl(41, 60%, 52%);
}

/* ─── Ko-fi tip modal (Eldrathar chrome) ─── */
body.kofi-modal-open {
    overflow: hidden;
}
.kofi-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 14px;
}
.kofi-modal.is-hidden {
    display: none;
}
.kofi-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 5, 8, 0.78);
    backdrop-filter: blur(3px);
}
.kofi-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    max-height: min(780px, 92vh);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, hsl(0 0% 6%), hsl(0 0% 3%));
    border: 1px solid hsl(41, 40%, 28%);
    box-shadow:
        0 0 0 1px hsl(0 0% 0% / 0.6),
        0 18px 48px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 hsl(41 50% 40% / 0.15);
}
.kofi-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid hsl(0, 0%, 12%);
}
.kofi-modal__title {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: hsl(41, 72%, 52%);
}
.kofi-modal__close {
    width: 30px;
    height: 30px;
    background: hsl(0 0% 8%);
    border: 1px solid hsl(0, 0%, 16%);
    color: hsl(40, 20%, 58%);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}
.kofi-modal__close:hover {
    color: hsl(41, 70%, 55%);
    border-color: hsl(41, 40%, 32%);
}
.kofi-modal__lede {
    margin: 0;
    padding: 10px 16px 6px;
    font-family: 'IM Fell English', serif;
    font-size: 0.85rem;
    font-style: italic;
    line-height: 1.45;
    color: hsl(40, 16%, 48%);
    text-align: center;
}
.kofi-modal__rewards {
    margin: 0;
    padding: 4px 14px 12px;
    border-bottom: 1px solid hsl(0, 0%, 10%);
}
.kofi-modal__rewards-title {
    margin: 0 0 8px;
    font-family: 'Cinzel', serif;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: hsl(41, 45%, 42%);
    text-align: center;
}
.kofi-modal__tier-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.kofi-modal__tier {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: hsl(41 20% 10% / 0.4);
    border: 1px solid hsl(41 30% 22% / 0.55);
}
.kofi-modal__tier .patron-badge {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    vertical-align: middle;
    display: inline-block;
    border-radius: 2px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    object-fit: cover;
    box-shadow: 0 0 0 1px hsl(41 40% 28% / 0.45);
}
.kofi-modal__tier-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    line-height: 1.25;
}
.kofi-modal__tier-body strong {
    font-family: 'IM Fell English', serif;
    font-size: 0.75rem;
    color: hsl(41, 60%, 58%);
    font-weight: 600;
}
.kofi-modal__tier-body em {
    font-family: 'IM Fell English', serif;
    font-size: 0.68rem;
    font-style: normal;
    color: hsl(40, 14%, 48%);
}
.kofi-modal__match {
    margin: 0;
    font-family: 'IM Fell English', serif;
    font-size: 0.72rem;
    line-height: 1.4;
    color: hsl(40, 16%, 50%);
    text-align: center;
}
.kofi-modal__match strong {
    color: hsl(41, 55%, 58%);
    font-weight: 600;
}
.kofi-modal__frame-wrap {
    flex: 1 1 auto;
    min-height: 420px;
    background: hsl(0 0% 4%);
}
.kofi-modal__frame {
    display: block;
    width: 100%;
    height: min(520px, 58vh);
    border: 0;
    background: #fff;
}
.kofi-modal__foot {
    padding: 10px 16px 12px;
    text-align: center;
    border-top: 1px solid hsl(0, 0%, 10%);
}
.kofi-modal__full-link {
    font-family: 'Cinzel', serif;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: hsl(40, 18%, 42%);
    text-decoration: none;
}
.kofi-modal__full-link:hover {
    color: hsl(41, 60%, 52%);
}

/* ─── Right panel ─── */
.landing-right-panel {
    background: hsl(0 0% 4%);
    border: 1px solid hsl(0, 0%, 12%);
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}
.landing-right-tabs {
    display: flex;
    flex-shrink: 0;
    border-bottom: 1px solid hsl(0, 0%, 10%);
    padding: 0 22px;
}
.landing-right-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 14px 9px;
    font-family: 'Cinzel', serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: hsl(40, 18%, 32%);
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 0.15s;
}
.landing-right-tab.is-active {
    border-bottom-color: hsl(41, 72%, 50%);
    color: hsl(41, 78%, 52%);
}
.landing-right-body {
    padding: 18px 22px 16px;
    /* Grow with content — no inner scroll; page scrolls if needed */
    overflow: visible;
    /* Stack panes so height = taller tab (Decalogue), Welcome matches */
    display: grid;
}
.landing-right-pane {
    grid-row: 1;
    grid-column: 1;
    visibility: hidden;
    pointer-events: none;
}
.landing-right-pane.is-active {
    visibility: visible;
    pointer-events: auto;
}

.welcome-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    padding-top: 20px;
    padding-bottom: 8px;
    justify-content: space-between;
}
.welcome-title {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: hsl(41, 80%, 56%);
    letter-spacing: 0.08em;
    margin: 0 0 1.1em;
}
.welcome-copy {
    font-family: 'IM Fell English', serif;
    font-size: 0.92rem;
    line-height: 1.85;
    color: hsl(40, 22%, 52%);
    margin: 0 0 1.15em;
}
.welcome-copy:last-child,
.welcome-copy--closing {
    margin-bottom: 0;
}
.welcome-copy--closing {
    margin-top: 0.5em;
    padding-top: 1.1em;
    border-top: 1px solid hsl(0, 0%, 10%);
    font-style: italic;
    color: hsl(40, 24%, 48%);
}

.dec-section {
    margin-bottom: 2px;
}
.dec-section h3 {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: hsl(40, 45%, 56%);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.dec-copy {
    font-family: 'IM Fell English', serif;
    font-size: 0.84rem;
    font-style: italic;
    line-height: 1.5;
    color: hsl(40, 20%, 50%);
    margin: 0;
}
.dec-copy strong,
.dec-gold {
    color: hsl(41, 80%, 56%);
    font-weight: 700;
    font-family: 'Cinzel', serif;
    font-style: normal;
}
.dec-meta {
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    color: hsl(41, 55%, 36%);
    letter-spacing: 0.08em;
    margin-top: 10px;
}
.dec-meta span {
    color: hsl(41, 72%, 50%);
}
.dec-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, hsl(0, 0%, 11%) 20%, hsl(0, 0%, 11%) 80%, transparent);
    margin: 10px 0;
}
.dec-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dec-list li {
    font-family: 'IM Fell English', serif;
    font-size: 0.84rem;
    color: hsl(40, 22%, 44%);
}
.dec-list--ranked {
    list-style: decimal;
    padding-left: 20px;
}
.dec-list--ranked li {
    color: hsl(40, 28%, 60%);
    font-size: 0.86rem;
}

.glory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px 32px;
    margin-top: 4px;
}
.glory-entry {
    border-left: 2px solid hsl(0, 0%, 11%);
    padding-left: 12px;
}
.glory-entry__label {
    font-family: 'Cinzel', serif;
    font-size: 0.63rem;
    font-weight: 700;
    color: hsl(41, 65%, 42%);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.glory-entry__value {
    font-family: 'IM Fell English', serif;
    font-size: 0.83rem;
    line-height: 1.5;
    color: hsl(40, 22%, 54%);
    margin: 0;
}
.glory-entry__value.is-empty {
    color: hsl(0, 0%, 26%);
    font-style: italic;
}
.glory-num {
    color: hsl(41, 72%, 54%);
    font-weight: 700;
}

/* ─── Updates ─── */
.landing-updates {
    margin-top: 12px;
    background: hsl(0 0% 4%);
    border: 1px solid hsl(0, 0%, 12%);
    padding: 20px 28px 22px;
}
.landing-updates__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid hsl(0, 0%, 10%);
}
.landing-updates__head h2 {
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: hsl(41, 78%, 52%);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0;
}
.landing-updates__list {
    max-height: 230px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: hsl(0, 0%, 14%) transparent;
}
.landing-update {
    border-left: 2px solid hsl(0, 0%, 11%);
    padding-left: 14px;
    flex-shrink: 0;
}
.landing-update__meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}
.landing-update__date {
    font-family: 'Cinzel', serif;
    font-size: 0.6rem;
    color: hsl(41, 65%, 44%);
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.landing-update__title {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: hsl(40, 40%, 70%);
    letter-spacing: 0.06em;
}
.landing-update__body {
    font-family: 'IM Fell English', serif;
    font-size: 0.85rem;
    line-height: 1.55;
    color: hsl(40, 20%, 50%);
    margin: 0;
}

.landing-footer {
    margin-top: 16px;
    text-align: center;
    border-top: 1px solid hsl(0, 0%, 9%);
    padding-top: 12px;
}
.landing-footer p {
    font-family: 'Cinzel', serif;
    font-size: 0.58rem;
    color: hsl(40, 14%, 26%);
    letter-spacing: 0.14em;
    margin: 0;
}

/* Tab panes (left) */
.landing-tab-pane {
    display: none;
}
.landing-tab-pane.is-active {
    display: block;
}

@media (max-width: 900px) {
    .landing-torch { display: none !important; }
    .landing-wrapper { padding: 0 16px; }
    .landing-cols { flex-direction: column; gap: 16px; }
    .landing-left,
    .landing-right { flex: none; width: 100%; min-width: 0; }
}

/* ─── Create hero (same stone hall language as login) ─── */
.create-hero-page.landing-page {
    justify-content: flex-start;
    padding-bottom: 4vh;
}
.create-hero-wrapper {
    max-width: 1180px;
    width: 100%;
}
.create-hero-cols {
    align-items: stretch;
    gap: 20px;
}
.create-hero-left {
    flex: 1 1 58%;
    min-width: 0;
}
.create-hero-right {
    flex: 0 1 340px;
    min-width: 280px;
}
.create-hero-panel {
    padding-bottom: 18px;
}
.create-hero-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.create-hero-hint {
    margin: 6px 0 0;
    font-family: 'IM Fell English', serif;
    font-size: 0.78rem;
    font-style: italic;
    color: hsl(40, 16%, 40%);
    line-height: 1.4;
}
.create-hero-select {
    width: 100%;
    background: hsl(0 0% 3%);
    border: 1px solid hsl(0, 0%, 12%);
    border-bottom: 2px solid hsl(0, 0%, 9%);
    color: hsl(40, 30%, 82%);
    font-family: 'IM Fell English', serif;
    font-size: 0.9rem;
    padding: 9px 12px;
    outline: none;
    appearance: auto;
    cursor: pointer;
}
.create-hero-select:focus {
    border-color: hsl(41, 50%, 32%);
}
.create-hero-flavor {
    margin: 4px 0 12px;
    padding: 10px 12px;
    font-family: 'IM Fell English', serif;
    font-size: 0.82rem;
    font-style: italic;
    line-height: 1.45;
    color: hsl(40, 22%, 58%);
    background: hsl(0 0% 3%);
    border: 1px solid hsl(0, 0%, 10%);
    border-left: 2px solid hsl(41, 55%, 36%);
}
.create-hero-points {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 14px 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid hsl(0, 0%, 10%);
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: hsl(40, 22%, 48%);
}
.create-hero-points strong {
    color: hsl(41, 75%, 52%);
    font-size: 0.72rem;
}
.create-hero-stats {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 8px;
}
.create-hero-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid hsl(0, 0%, 9%);
}
.create-hero-stat-lab {
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    color: hsl(40, 22%, 56%);
    min-width: 2.5rem;
    cursor: help;
    border-bottom: 1px dotted hsl(40, 20%, 36%);
}
.create-hero-stat-lab:hover,
.create-hero-stat-lab:focus {
    color: hsl(41, 65%, 58%);
    outline: none;
}

/* Themed tooltips (ui.js) on create-hero */
.ui-tooltip {
    position: fixed;
    z-index: 1800;
    max-width: 260px;
    padding: 8px 10px;
    background: hsl(0 0% 6%);
    border: 1px solid hsl(41, 55%, 36%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    font-family: 'IM Fell English', serif;
    font-size: 0.82rem;
    font-weight: normal;
    color: hsl(40 18% 72%);
    line-height: 1.45;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.14s ease, visibility 0.14s ease;
    text-transform: none;
    letter-spacing: normal;
}
.ui-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
}
.ui-tooltip.is-below::after,
.ui-tooltip:not(.is-below)::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
}
.ui-tooltip:not(.is-below)::after {
    bottom: -10px;
    border-top-color: hsl(41, 55%, 36%);
}
.ui-tooltip.is-below::after {
    top: -10px;
    border-bottom-color: hsl(41, 55%, 36%);
}
.create-hero-stat-ctrl {
    display: flex;
    align-items: center;
    gap: 10px;
}
.create-hero-stat-val {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: hsl(40, 30%, 82%);
    min-width: 1.8rem;
    text-align: center;
    transition: color 0.12s ease;
}
.create-hero-stat-val.is-boosted {
    color: hsl(92, 48%, 52%);
    text-shadow: 0 0 10px hsl(92 50% 40% / 0.35);
    font-weight: 700;
}
.create-hero-label-hint {
    font-family: 'IM Fell English', serif;
    font-size: 0.72rem;
    font-style: italic;
    letter-spacing: normal;
    text-transform: none;
    color: hsl(40, 14%, 40%);
    font-weight: normal;
    margin-left: 6px;
}
.create-hero-gender {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.create-hero-gender-opt {
    flex: 1 1 0;
    cursor: pointer;
}
.create-hero-gender-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.create-hero-gender-opt span {
    display: block;
    text-align: center;
    padding: 10px 8px;
    background: hsl(0 0% 3%);
    border: 1px solid hsl(0, 0%, 12%);
    border-bottom-width: 2px;
    border-bottom-color: hsl(0, 0%, 9%);
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: hsl(40, 22%, 56%);
    transition: border-color 0.12s, color 0.12s;
}
.create-hero-gender-opt:hover span {
    border-color: hsl(41, 40%, 30%);
    color: hsl(41, 55%, 58%);
}
.create-hero-gender-opt input:checked + span,
.create-hero-gender-opt input:focus-visible + span {
    border-color: hsl(41, 60%, 42%);
    color: hsl(41, 75%, 58%);
    box-shadow: 0 0 0 1px hsl(41 55% 36% / 0.45);
}
.create-hero-confirm {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid hsl(41, 40%, 28%);
    background: linear-gradient(180deg, hsl(41 30% 12% / 0.35), hsl(0 0% 3%));
}
.create-hero-confirm-label {
    margin: 0 0 4px;
    font-family: 'Cinzel', serif;
    font-size: 0.5rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: hsl(40, 16%, 42%);
}
.create-hero-confirm-line {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: hsl(41, 72%, 54%);
    line-height: 1.35;
}
.create-hero-class-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 6px;
}
@media (min-width: 1000px) {
    .create-hero-class-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
.create-hero-class-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px 8px;
    background: hsl(0 0% 3%);
    border: 1px solid hsl(0, 0%, 12%);
    border-bottom-width: 2px;
    border-bottom-color: hsl(0, 0%, 9%);
    cursor: pointer;
    color: hsl(40, 22%, 58%);
    font-family: 'Cinzel', serif;
    font-size: 0.55rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: border-color 0.12s, color 0.12s, filter 0.12s;
}
.create-hero-class-card:hover {
    border-color: hsl(41, 40%, 30%);
    color: hsl(41, 55%, 58%);
    filter: brightness(1.06);
}
.create-hero-class-card.is-selected {
    border-color: hsl(41, 60%, 42%);
    box-shadow: 0 0 0 1px hsl(41 55% 36% / 0.5), inset 0 0 18px hsl(41 50% 20% / 0.2);
    color: hsl(41, 75%, 58%);
}
.create-hero-class-art {
    width: 56px;
    height: 56px;
    border: 1px solid hsl(0, 0%, 14%);
    background: hsl(0 0% 5%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    image-rendering: pixelated;
}
.create-hero-class-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.create-hero-class-card.is-selected .create-hero-class-art {
    border-color: hsl(41, 50%, 36%);
}
.create-hero-class-name {
    text-align: center;
    line-height: 1.2;
}
.create-hero-preview {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 12px 0 10px;
    padding: 10px;
    border: 1px solid hsl(0, 0%, 12%);
    background: hsl(0 0% 3%);
}
.create-hero-preview img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border: 1px solid hsl(41, 40%, 28%);
    background: hsl(0 0% 5%);
    image-rendering: pixelated;
}
.create-hero-preview-name {
    margin: 0 0 4px;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: hsl(41, 70%, 52%);
    text-transform: uppercase;
}
.osrs-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: none;
}
.create-hero-stat-btn {
    width: 28px;
    height: 28px;
    background: hsl(0 0% 8%);
    border: 1px solid hsl(41, 40%, 28%);
    color: hsl(41, 70%, 55%);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}
.create-hero-stat-btn:hover {
    filter: brightness(1.15);
    border-color: hsl(41, 55%, 40%);
}
.create-hero-logout {
    margin: 14px 0 0;
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.create-hero-logout a {
    color: hsl(40, 18%, 42%);
    text-decoration: none;
}
.create-hero-logout a:hover {
    color: hsl(41, 60%, 52%);
}
.create-hero-side {
    min-height: 100%;
}
.create-hero-side-head {
    flex-shrink: 0;
    padding: 12px 22px 10px;
    border-bottom: 1px solid hsl(0, 0%, 10%);
}
.create-hero-side-title {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: hsl(41, 78%, 52%);
    cursor: default;
    user-select: none;
}
.create-hero-side-lede {
    font-family: 'IM Fell English', serif;
    font-size: 0.88rem;
    font-style: italic;
    line-height: 1.5;
    color: hsl(40, 18%, 52%);
    margin: 0 0 14px;
}
.create-hero-start-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    border: 1px solid hsl(0, 0%, 11%);
    background: hsl(0 0% 3%);
}
.create-hero-start-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 9px 12px;
    border-bottom: 1px solid hsl(0, 0%, 9%);
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: hsl(40, 18%, 48%);
}
.create-hero-start-list li:last-child {
    border-bottom: 0;
}
.create-hero-start-list strong {
    font-size: 0.78rem;
    color: hsl(41, 72%, 52%);
    letter-spacing: 0.04em;
}
.create-hero-side-note {
    font-family: 'IM Fell English', serif;
    font-size: 0.8rem;
    line-height: 1.45;
    color: hsl(40, 16%, 46%);
    margin: 0 0 10px;
}
.create-hero-side-note strong {
    color: hsl(41, 55%, 52%);
    font-weight: normal;
}
.create-hero-side-note--soft {
    font-style: italic;
    color: hsl(40, 14%, 38%);
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .create-hero-row {
        grid-template-columns: 1fr;
    }
    .create-hero-wrapper {
        max-width: 640px;
    }
    .create-hero-right {
        flex: 1 1 auto;
        min-width: 0;
    }
    .create-hero-class-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
