:root {
    --bg: #0b0d11;
    --bg-soft: #131821;
    --panel: #191e27;
    --panel-2: #212734;
    --stone: #2b313d;
    --stone-edge: #4b4334;
    --ink: #e7dfc8;
    --muted: #b7ae92;
    --gold: #d4b16a;
    --gold-bright: #f0d89a;
    --iron: #778198;
    --danger: #b35b55;
    --danger-bright: #efb0a8;
    --success: #7ab589;
    --albion: #d8b86a;
    --midgard: #8ea3c9;
    --hibernia: #79b285;
    --neutral: #9c8f76;
    --shadow: 0 16px 48px rgba(0, 0, 0, .45);
    --radius: 18px;
    --container: min(1180px, calc(100% - 2rem));
    --parchment: #d7c8a6;
    --parchment-edge: #8d744b;
    --border: rgba(212,177,106,.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    background:
        linear-gradient(180deg, rgba(8, 10, 14, .88), rgba(8, 10, 14, .96)),
        url("/images/branding/daoc-legends-cover.png") center top / cover fixed no-repeat,
        var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.container, .page-shell { width: var(--container); margin-inline: auto; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.page-shell { padding: 1.2rem 0 2.5rem; }


.site-shell {
    position: relative;
    isolation: isolate;
}
.site-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top, rgba(255, 226, 170, .08), transparent 28%),
        linear-gradient(180deg, rgba(5, 7, 11, .15), rgba(5, 7, 11, .55));
    z-index: -1;
}

.legend-logo {
    width: min(240px, 60vw);
    margin-bottom: 1rem;
    filter: drop-shadow(0 12px 24px rgba(0,0,0,.38));
}
.legend-logo--auth {
    width: 180px;
    margin-bottom: .8rem;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(10px);
    background: rgba(10, 13, 18, .72);
    border-bottom: 1px solid rgba(212, 177, 106, .18);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.topbar__glow {
    position: absolute;
    inset: auto 0 -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(212,177,106,.55), rgba(121,178,133,.35), rgba(142,163,201,.45), transparent);
}
.topbar__inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    justify-content: space-between;
    padding: .95rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
}
.brand__crest {
    width: 118px;
    height: 52px;
    padding: .25rem .45rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(47,55,70,.72), rgba(20,24,31,.82));
    border: 1px solid rgba(212,177,106,.32);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 8px 20px rgba(0,0,0,.3);
}
.brand__crest img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.brand strong {
    display: block;
    font-size: 1.06rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.brand small {
    display: block;
    color: var(--muted);
}
.main-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}
.main-nav a {
    padding: .55rem .9rem;
    border-radius: 999px;
    color: #d9cfb8;
    transition: .2s ease;
}
.main-nav a:hover,
.footer-links a:hover,
.inline-actions a:hover,
.auth-footer a:hover,
.wysiwyg a:hover,
.topic-hero a:hover { color: var(--gold-bright); }
.main-nav a:hover { background: rgba(212,177,106,.08); }
.topbar__actions, .hero__actions, .btn-row, .badge-row, .icon-row, .inline-actions, .admin-actions, .topic-hero__meta, .topic-row__badges {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
}
.logout-form { margin: 0; }
.user-pill {
    padding: .45rem .8rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.03);
    color: var(--muted);
}

.hero, .section { padding: 1.4rem 0; }
.section--narrow { padding-top: .5rem; }
.section--compact { padding: .8rem 0; }
.hero__grid,
.forum-grid,
.grid.two-columns,
.site-footer__grid {
    display: grid;
    gap: 1rem;
}
.hero__grid { grid-template-columns: 1.15fr .95fr; align-items: stretch; }
.hero--cover .hero__grid { grid-template-columns: 1.05fr .95fr; }
.hero-panel--legend {
    min-height: 420px;
    background:
        linear-gradient(110deg, rgba(10, 12, 18, .86) 15%, rgba(14, 18, 25, .68) 55%, rgba(10, 12, 18, .82) 100%),
        url("/images/branding/daoc-legends-cover.png") center center / cover no-repeat;
}
.hero-panel--legend::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(250, 214, 152, .06), transparent 40%, rgba(5, 7, 10, .14));
    pointer-events: none;
}
.hero-visual {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    display: flex;
    align-items: end;
}
.hero-visual__image {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7, 9, 12, .05), rgba(7, 9, 12, .78)),
        url("/images/branding/daoc-legends-cover.png") center center / cover no-repeat;
    transform: scale(1.03);
}
.hero-visual__content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(180deg, rgba(10,12,17,.05), rgba(10,12,17,.78));
}
.hero-visual h2 {
    margin: 0 0 .6rem;
    font-size: clamp(1.5rem, 3vw, 2.3rem);
}
.hero-visual p {
    margin: 0 0 1rem;
    color: #e1d7c0;
    line-height: 1.65;
}
.forum-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two-columns,
.site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-footer__grid { grid-template-columns: 1.3fr .8fr 1fr; }
.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}
.section-heading--tight { margin-bottom: .8rem; }
.eyebrow {
    margin: 0 0 .55rem;
    color: var(--gold-bright);
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .78rem;
}
.hero h1, .topic-hero h1, .profile-hero h1 {
    margin: 0;
    font-size: clamp(2.1rem, 4.4vw, 4.1rem);
    line-height: .98;
    text-wrap: balance;
    text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.hero__lead {
    max-width: 62ch;
    margin: 1rem 0 0;
    color: #d4ccb8;
    font-size: 1.05rem;
    line-height: 1.7;
}
.hero__lead--compact { max-width: 48rem; margin-top: .75rem; }

.hero-panel,
.stone-frame,
.forum-card,
.topic-hero,
.post-card,
.content-panel,
.profile-hero,
.notice-panel,
.empty-state {
    position: relative;
    background:
        linear-gradient(180deg, rgba(41,48,60,.96), rgba(21,26,34,.98)),
        linear-gradient(120deg, rgba(255,255,255,.03), transparent 30%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hero-panel::before,
.stone-frame::before,
.forum-card::before,
.topic-hero::before,
.post-card::before,
.profile-hero::before,
.notice-panel::before,
.content-panel::before,
.empty-state::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: calc(var(--radius) - 8px);
    border: 1px solid rgba(255,255,255,.04);
    pointer-events: none;
}
.hero-panel, .stone-frame, .content-panel, .profile-hero, .notice-panel, .empty-state { padding: 1.15rem; }
.hero-panel { overflow: hidden; }
.realm-grid, .stack { display: grid; gap: .85rem; }
.compact-stack { gap: .8rem; }
.realm-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: .9rem;
    align-items: center;
    padding: .95rem;
    border-radius: 16px;
    background: rgba(7, 10, 14, .35);
    border: 1px solid rgba(255,255,255,.05);
}
.realm-card h3, .forum-card h3, .topic-row h3, .mini-card h3, .auth-card h1, .form-card h1, .form-card h2, .post-card__author h2 { margin: 0 0 .25rem; }
.realm-card p, .forum-card__meta, .forum-card p, .forum-card__footer small, .topic-row p, .site-footer p, .site-footer li, .post-card small, .meta, .auth-footer, .remember-row, .mini-card p {
    color: var(--muted);
}
.realm-card img { width: 56px; height: 56px; }
.realm-card--albion { box-shadow: inset 0 0 0 1px rgba(216,184,106,.08); }
.realm-card--midgard { box-shadow: inset 0 0 0 1px rgba(142,163,201,.08); }
.realm-card--hibernia { box-shadow: inset 0 0 0 1px rgba(121,178,133,.08); }

.forum-card {
    padding: 1rem;
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.forum-card:hover {
    transform: translateY(-3px);
    border-color: rgba(240,216,154,.35);
    box-shadow: 0 22px 56px rgba(0,0,0,.46);
}
.forum-card__header,
.forum-card__footer,
.topic-row,
.topic-row__stats,
.post-card__toolbar,
.profile-hero,
.profile-hero__identity,
.profile-hero__meta {
    display: flex;
    gap: .8rem;
    align-items: center;
}
.forum-card__header,
.forum-card__footer,
.topic-row,
.profile-hero,
.post-card__toolbar { justify-content: space-between; }
.forum-card__footer { margin-top: 1rem; align-items: end; }
.forum-card__footer strong { display: block; max-width: 22ch; text-align: right; }
.forum-card__footer--actions { align-items: center; }
.forum-card--albion { box-shadow: inset 0 0 0 1px rgba(216,184,106,.09), var(--shadow); }
.forum-card--midgard { box-shadow: inset 0 0 0 1px rgba(142,163,201,.09), var(--shadow); }
.forum-card--hibernia { box-shadow: inset 0 0 0 1px rgba(121,178,133,.1), var(--shadow); }

.topic-list { padding: .45rem; }
.topic-row {
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.04);
    background: rgba(6,9,13,.22);
}
.topic-row + .topic-row { margin-top: .65rem; }
.topic-row__main { min-width: 0; }
.topic-row__stats { flex-shrink: 0; color: var(--muted); }
.topic-row__stats div {
    min-width: 92px;
    text-align: center;
    padding: .45rem .7rem;
    border-radius: 12px;
    background: rgba(255,255,255,.025);
}
.topic-row__stats dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; }
.topic-row__stats dd { margin: .35rem 0 0; font-size: 1.1rem; color: var(--ink); }
.topic-row--empty { justify-content: flex-start; }

.realm-badge,
.topic-status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .38rem .7rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .72rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,.08);
}
.realm-badge--albion { color: var(--albion); background: rgba(216,184,106,.09); }
.realm-badge--midgard { color: var(--midgard); background: rgba(142,163,201,.1); }
.realm-badge--hibernia { color: var(--hibernia); background: rgba(121,178,133,.1); }
.realm-badge--neutral { color: var(--neutral); background: rgba(156,143,118,.11); }
.topic-status { color: #ddd4c2; background: rgba(255,255,255,.05); }
.topic-status--pinned { color: var(--gold-bright); background: rgba(212,177,106,.13); }
.topic-status--locked { color: #d0c4d7; background: rgba(164,138,181,.15); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.1);
    padding: .8rem 1.1rem;
    cursor: pointer;
    font-weight: 700;
    transition: .18s ease;
}
.btn--small { padding: .5rem .85rem; font-size: .9rem; }
.btn--primary {
    color: #1d1305;
    border-color: rgba(240,216,154,.28);
    background: linear-gradient(180deg, #efd99a, #c79f56);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 26px rgba(0,0,0,.26);
}
.btn--primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn--ghost {
    color: var(--ink);
    background: rgba(255,255,255,.04);
}
.btn--ghost:hover {
    background: rgba(212,177,106,.09);
    border-color: rgba(240,216,154,.22);
}
.btn--danger {
    color: #ffe3dd;
    background: rgba(179,91,85,.18);
    border-color: rgba(179,91,85,.28);
}
.btn--danger:hover { background: rgba(179,91,85,.28); }

.post-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1rem;
    padding: 1rem;
}
.post-card--albion { box-shadow: inset 0 0 0 1px rgba(216,184,106,.07), var(--shadow); }
.post-card--midgard { box-shadow: inset 0 0 0 1px rgba(142,163,201,.08), var(--shadow); }
.post-card--hibernia { box-shadow: inset 0 0 0 1px rgba(121,178,133,.08), var(--shadow); }
.post-card__author {
    display: grid;
    align-content: start;
    gap: .45rem;
    padding-right: .5rem;
}
.post-card__body {
    border-radius: 16px;
    border: 1px solid rgba(141,116,75,.36);
    padding: 1rem;
}
.parchment-panel {
    background:
        linear-gradient(180deg, rgba(215,200,166,.97), rgba(190,167,120,.96)),
        repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0, rgba(255,255,255,.07) 1px, transparent 1px, transparent 5px);
    color: #342617;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.parchment-panel .wysiwyg,
.parchment-panel p,
.parchment-panel small,
.parchment-panel a,
.mini-card--parchment .wysiwyg,
.mini-card--parchment p,
.mini-card--parchment a,
.mini-card--parchment .meta { color: #342617; }
.avatar {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}
.avatar--large { width: 84px; height: 84px; font-size: 2rem; }
.avatar--albion { background: linear-gradient(180deg, rgba(216,184,106,.25), rgba(81,57,17,.35)); color: var(--gold-bright); }
.avatar--midgard { background: linear-gradient(180deg, rgba(142,163,201,.28), rgba(33,45,73,.34)); color: #d7e3ff; }
.avatar--hibernia { background: linear-gradient(180deg, rgba(121,178,133,.28), rgba(24,60,43,.34)); color: #d8ffdf; }
.avatar--neutral { background: linear-gradient(180deg, rgba(156,143,118,.26), rgba(65,54,38,.35)); color: #efe4c7; }
.wysiwyg { line-height: 1.8; white-space: normal; overflow-wrap: anywhere; }
.wysiwyg p:first-child { margin-top: 0; }
.wysiwyg p:last-child { margin-bottom: 0; }
.excerpt { line-height: 1.65; }

.themed-form,
.auth-card {
    max-width: 760px;
    margin-inline: auto;
}
.auth-card {
    max-width: 620px;
    overflow: hidden;
}
.auth-card--illustrated {
    padding: 0;
}
.auth-card__banner {
    height: 180px;
    background:
        linear-gradient(180deg, rgba(9, 10, 14, .05), rgba(9, 10, 14, .55)),
        url("/images/branding/daoc-legends-cover.png") center center / cover no-repeat;
    border-bottom: 1px solid rgba(212,177,106,.16);
}
.auth-card__banner--register {
    background-position: center 35%;
}
.auth-card__content {
    padding: 1.2rem;
}
label { display: block; font-weight: 700; margin-bottom: .45rem; }
input, textarea, select {
    width: 100%;
    margin-bottom: 1rem;
    padding: .9rem .95rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(9,12,16,.5);
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: rgba(240,216,154,.4);
    box-shadow: 0 0 0 3px rgba(212,177,106,.12);
}
textarea { min-height: 180px; resize: vertical; }
.form-row, .field-row { margin-bottom: .35rem; }
ul { padding-left: 1.2rem; }
li + li { margin-top: .35rem; }
.help-text, .form-help { color: var(--muted); }
.remember-row { display: flex; align-items: center; gap: .55rem; font-weight: 500; margin-bottom: 1rem; }
.remember-row input { width: auto; margin: 0; }
.auth-footer { margin-top: 1rem; }
.form-errors,
.invalid-feedback,
.error,
.form-error-message { color: var(--danger-bright); }

.flash {
    border-radius: 14px;
    padding: .95rem 1rem;
    margin: 1rem 0 0;
    border: 1px solid rgba(255,255,255,.08);
}
.flash-success { background: rgba(122,181,137,.14); color: #d9f5df; }
.flash-error { background: rgba(179,91,85,.18); color: #ffe3dd; }
.flash-warning { background: rgba(212,177,106,.15); color: #f6e3b4; }

.flash-info { background: rgba(93, 130, 196, .16); color: #dce8ff; }
.flash strong { display: block; margin-bottom: .25rem; }
.flash p { margin: 0; }
.form-feedback { margin-bottom: 1rem; }
.form-error-list { margin: .65rem 0 0 1rem; padding: 0; display: grid; gap: .4rem; }
.process-panel {
    margin: 0 0 1rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg, rgba(19,25,34,.92), rgba(11,15,21,.95));
    border: 1px solid rgba(216,184,106,.14);
}
.process-panel h2 { margin: 0 0 .35rem; }
.process-panel__lead { margin: 0 0 .8rem; color: var(--muted); }
.step-list { margin: 0; padding-left: 1.1rem; display: grid; gap: .7rem; }
.step-list li { padding-left: .15rem; }
.step-list strong { display: block; color: var(--heading); margin-bottom: .15rem; }
.step-list span { color: var(--muted); line-height: 1.55; }

.pagination {
    display: flex;
    gap: .5rem;
    justify-content: center;
    margin-top: 1.4rem;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    padding: 0 .8rem;
}
.pagination a:hover { border-color: rgba(240,216,154,.25); color: var(--gold-bright); }
.pagination .current {
    color: #1d1305;
    background: linear-gradient(180deg, #efd99a, #c79f56);
}

.mini-card {
    padding: .95rem;
    border-radius: 16px;
    background: rgba(7,10,14,.24);
    border: 1px solid rgba(255,255,255,.05);
}
.mini-card--parchment {
    background: linear-gradient(180deg, rgba(215,200,166,.97), rgba(190,167,120,.96));
    border-color: rgba(141,116,75,.35);
}
.mini-card__badges { margin-bottom: .6rem; }
.notice-panel h2, .empty-state h3 { margin-top: 0; }
.profile-hero__identity { justify-content: flex-start; }
.content-panel { height: 100%; }

.site-footer {
    margin-top: auto;
    border-top: 1px solid rgba(212,177,106,.12);
    background: rgba(8,10,14,.86);
}
.site-footer__grid {
    padding: 1.35rem 0 2rem;
    align-items: start;
}
.footer-links { margin: 0; }

@media (max-width: 980px) {
    .hero__grid,
    .forum-grid,
    .grid.two-columns,
    .site-footer__grid,
    .post-card { grid-template-columns: 1fr; }
    .topbar__inner,
    .topic-row,
    .profile-hero,
    .forum-card__footer,
    .post-card__toolbar { align-items: flex-start; }
}

@media (max-width: 760px) {
    .topbar__inner,
    .main-nav,
    .topbar__actions,
    .topic-hero,
    .profile-hero,
    .topic-row,
    .forum-card__header,
    .forum-card__footer,
    .post-card__toolbar { flex-direction: column; }
    .topic-row__stats { width: 100%; }
    .topic-row__stats div { flex: 1; }
}


.topbar,
.topbar__inner,
.main-nav,
.topbar__actions,
.global-banner,
.hero,
.topic-hero,
.hero-panel,
.form-card,
.notice-panel,
.profile-hero,
.forum-card,
.post-card {
    position: relative;
}
.topbar__glow,
.hero-panel::before,
.stone-frame::before,
.forum-card::before,
.topic-hero::before,
.post-card::before,
.profile-hero::before,
.notice-panel::before,
.content-panel::before,
.empty-state::before,
.realm-hero-art,
.realm-hero-art * {
    pointer-events: none;
}
.main-nav,
.topbar__actions,
.brand,
.hero__actions,
.topic-hero__actions {
    z-index: 2;
}
.global-banner {
    padding: .75rem 0 .15rem;
    position: relative;
    overflow: hidden;
}
.global-banner__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .9rem;
}
.realm-banner {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: .9rem;
    align-items: center;
    padding: 1rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(32,38,49,.92), rgba(15,19,26,.98));
    border: 1px solid rgba(255,255,255,.06);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.realm-banner::after {
    content: "";
    position: absolute;
    inset: auto -10% -35% auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.12), transparent 65%);
    opacity: .6;
}
.realm-banner img {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 10px 16px rgba(0,0,0,.35));
}
.realm-banner strong { text-transform: uppercase; letter-spacing: .12em; }
.realm-banner p { margin: .3rem 0 0; color: var(--muted); }
.realm-banner--albion { box-shadow: inset 0 0 0 1px rgba(216,184,106,.13), var(--shadow); }
.realm-banner--midgard { box-shadow: inset 0 0 0 1px rgba(142,163,201,.14), var(--shadow); }
.realm-banner--hibernia { box-shadow: inset 0 0 0 1px rgba(121,178,133,.14), var(--shadow); }

.topic-hero--realm,
.forum-card[style],
.post-card[style] {
    border-color: color-mix(in srgb, var(--category-accent, var(--gold)) 34%, rgba(255,255,255,.04));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--category-accent, var(--gold)) 15%, transparent), var(--shadow);
}
.topic-hero--realm .eyebrow,
.forum-card[style] .eyebrow,
.post-card[style] .eyebrow {
    color: color-mix(in srgb, var(--category-accent, var(--gold)) 82%, white 18%);
}
.topic-hero--realm h1,
.forum-card[style] h3 a:hover,
.topic-row h3 a:hover {
    color: color-mix(in srgb, var(--category-accent, var(--gold)) 86%, white 14%);
}
.realm-hero-art {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
}
.realm-hero-art__mist {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 25%, rgba(255,255,255,.10), transparent 25%),
        radial-gradient(circle at 82% 20%, rgba(255,255,255,.06), transparent 22%),
        linear-gradient(90deg, rgba(0,0,0,.0), rgba(0,0,0,.18), rgba(0,0,0,.0));
}
.realm-hero-art__sigil {
    position: absolute;
    top: 50%;
    width: 180px;
    height: 180px;
    transform: translateY(-50%);
    opacity: .1;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,.32));
}
.realm-hero-art__sigil img { width: 100%; height: 100%; }
.realm-hero-art__sigil--left { left: -18px; }
.realm-hero-art__sigil--right { right: -18px; transform: translateY(-50%) scaleX(-1); }
.topic-hero > div,
.profile-hero > div,
.hero-panel > * { position: relative; z-index: 1; }

.forum-card {
    border-color: color-mix(in srgb, var(--category-accent, rgba(212,177,106,.22)) 36%, rgba(255,255,255,.06));
}
.forum-card::after {
    content: "";
    position: absolute;
    inset: auto -20% -40% auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--category-accent, var(--gold)) 18%, transparent), transparent 65%);
    pointer-events: none;
}
.post-card__body.parchment-panel {
    background:
        linear-gradient(180deg, rgba(215,200,166,.96), rgba(202,184,145,.98)),
        repeating-linear-gradient(0deg, rgba(108,78,38,.05) 0, rgba(108,78,38,.05) 1px, transparent 1px, transparent 28px);
    color: #2b2317;
    border: 1px solid rgba(141,116,75,.5);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}
.post-card__body.parchment-panel .btn--ghost {
    color: #2f2417;
    border-color: rgba(58,45,30,.2);
    background: rgba(255,255,255,.18);
}
.post-card__body.parchment-panel .btn--danger {
    color: #fff4f0;
}
.wysiwyg { line-height: 1.75; }

@media (max-width: 980px) {
    .global-banner__grid,
    .hero__grid,
    .forum-grid,
    .grid.two-columns,
    .site-footer__grid {
        grid-template-columns: 1fr;
    }
    .topbar__inner { flex-wrap: wrap; }
    .main-nav { order: 3; width: 100%; justify-content: flex-start; }
}

.setup-code {
    margin: 1rem 0 0;
    padding: .95rem 1rem;
    white-space: pre-wrap;
    border-radius: 14px;
    background: rgba(7, 10, 14, .55);
    border: 1px solid rgba(255,255,255,.08);
    color: var(--gold-bright);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .95rem;
}


.welcome-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background:
        radial-gradient(circle at top right, rgba(212,177,106,.12), transparent 28%),
        linear-gradient(180deg, rgba(45,53,66,.98), rgba(20,25,33,.98));
}
.welcome-banner h2 {
    margin: 0 0 .45rem;
    font-size: clamp(1.5rem, 2.8vw, 2.2rem);
}
.welcome-banner p {
    margin: 0;
    color: #d4ccb8;
    line-height: 1.65;
    max-width: 66ch;
}
@media (max-width: 900px) {
    .welcome-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}


.flash-account-created {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(205, 169, 92, 0.35);
    background: linear-gradient(180deg, rgba(61, 48, 28, 0.95), rgba(30, 24, 15, 0.95));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.flash-account-created p {
    margin: 0.35rem 0 0;
}

@media (max-width: 720px) {
    .flash-account-created {
        align-items: flex-start;
        flex-direction: column;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.stat-card {
    border-radius: 16px;
    padding: .9rem 1rem;
    background: linear-gradient(180deg, rgba(31, 24, 19, .92), rgba(15, 13, 11, .96));
    border: 1px solid rgba(235, 205, 144, .15);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.stat-card strong {
    display: block;
    font-size: 1.6rem;
    color: var(--heading);
}

.stat-card span {
    color: var(--muted);
    font-size: .92rem;
}

.quick-topic-card {
    border-color: rgba(216, 184, 106, .22);
    box-shadow: 0 18px 42px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,255,255,.03);
}

.notice-panel--cta {
    display: grid;
    gap: 1rem;
}

.form-grid {
    margin-bottom: .25rem;
}

@media (max-width: 720px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.topic-status--admin { color: #ffe9b5; background: rgba(212,177,106,.22); border-color: rgba(240,216,154,.28); }
.topic-status--user { color: #d8e1ef; background: rgba(126,148,181,.18); border-color: rgba(126,148,181,.24); }


.welcome-banner--legend {
    background:
        linear-gradient(105deg, rgba(10, 12, 18, .82), rgba(10, 12, 18, .58)),
        url("/images/branding/daoc-legends-cover.png") center center / cover no-repeat;
    border-color: rgba(212,177,106,.22);
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.footer-brand img {
    width: 120px;
    object-fit: contain;
    filter: drop-shadow(0 12px 22px rgba(0,0,0,.28));
}
@media (max-width: 760px) {
    .brand__crest { width: 96px; }
    .legend-logo { width: min(190px, 56vw); }
    .hero-panel--legend,
    .hero-visual { min-height: 320px; }
    .auth-card__banner { height: 140px; }
    .footer-brand { align-items: flex-start; flex-direction: column; }
}


:root {
    --realm-wall-albion: url('/images/realms/albion-marketplace.jpg');
    --realm-wall-midgard: url('/images/realms/midgard-marketplace.jpg');
    --realm-wall-hibernia: url('/images/realms/hibernia-marketplace.jpg');
}

.realm-badge__icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
}

.realm-banner {
    overflow: hidden;
}
.realm-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .28;
}
.realm-banner--albion::before { background-image: linear-gradient(180deg, rgba(18,11,10,.32), rgba(18,11,10,.78)), var(--realm-wall-albion); }
.realm-banner--midgard::before { background-image: linear-gradient(180deg, rgba(10,13,20,.34), rgba(10,13,20,.78)), var(--realm-wall-midgard); }
.realm-banner--hibernia::before { background-image: linear-gradient(180deg, rgba(10,17,13,.34), rgba(10,17,13,.78)), var(--realm-wall-hibernia); }
.realm-banner > * { position: relative; z-index: 1; }

.realm-hero-art__bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    opacity: .36;
    filter: saturate(.95) contrast(1.02);
}
.realm-hero-art--albion .realm-hero-art__bg { background-image: linear-gradient(180deg, rgba(25,9,9,.30), rgba(10,7,8,.70)), var(--realm-wall-albion); }
.realm-hero-art--midgard .realm-hero-art__bg { background-image: linear-gradient(180deg, rgba(10,12,18,.30), rgba(8,9,14,.75)), var(--realm-wall-midgard); }
.realm-hero-art--hibernia .realm-hero-art__bg { background-image: linear-gradient(180deg, rgba(8,16,11,.30), rgba(7,12,8,.75)), var(--realm-wall-hibernia); }

.topic-hero--showcase {
    overflow: hidden;
    min-height: 250px;
}
.topic-hero--showcase > div:last-child {
    position: relative;
    z-index: 1;
}

.forum-card {
    isolation: isolate;
}
.forum-card::after {
    z-index: 0;
}
.forum-card__header,
.forum-card h3,
.forum-card p,
.forum-card__footer {
    position: relative;
    z-index: 1;
}
.forum-card--albion,
.forum-card--midgard,
.forum-card--hibernia {
    background-size: cover;
    background-position: center;
}
.forum-card--albion { background-image: linear-gradient(180deg, rgba(20,15,17,.88), rgba(18,13,16,.95)), var(--realm-wall-albion); }
.forum-card--midgard { background-image: linear-gradient(180deg, rgba(12,16,25,.88), rgba(11,15,21,.95)), var(--realm-wall-midgard); }
.forum-card--hibernia { background-image: linear-gradient(180deg, rgba(12,19,15,.88), rgba(9,15,12,.95)), var(--realm-wall-hibernia); }

.realm-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.realm-showcase {
    overflow: hidden;
    min-height: 360px;
    padding: 0;
}
.realm-showcase__art {
    height: 170px;
    background-position: center;
    background-size: cover;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.realm-showcase__content {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 1rem;
    padding: 1.1rem;
    align-items: start;
}
.realm-showcase__content img {
    width: 82px;
    height: 82px;
    filter: drop-shadow(0 12px 24px rgba(0,0,0,.34));
}
.realm-showcase__content h3 {
    margin: 0 0 .45rem;
    font-size: 1.35rem;
}
.realm-showcase__content p:last-child {
    margin: 0;
    color: #d8cfb8;
    line-height: 1.65;
}
.realm-showcase--albion .realm-showcase__art { background-image: linear-gradient(180deg, rgba(22,14,14,.12), rgba(22,14,14,.74)), var(--realm-wall-albion); }
.realm-showcase--midgard .realm-showcase__art { background-image: linear-gradient(180deg, rgba(9,12,20,.12), rgba(9,12,20,.74)), var(--realm-wall-midgard); }
.realm-showcase--hibernia .realm-showcase__art { background-image: linear-gradient(180deg, rgba(11,18,12,.12), rgba(11,18,12,.74)), var(--realm-wall-hibernia); }

@media (max-width: 980px) {
    .realm-showcase-grid {
        grid-template-columns: 1fr;
    }
}
