/* ==========================================================================
   L2 Dolomita — site stylesheet
   Original retro layout: CSS frames, gradients and inline SVG ornaments only
   (no bitmap chrome). Palette: night blue, steel/silver, gold.
   ========================================================================== */

:root {
    --ink: #060b13;
    --night: #0a1424;
    --panel: #0d1a2b;
    --panel-2: #112238;
    --panel-3: #16304d;
    --line: #2a3e58;
    --line-soft: rgba(58, 84, 116, 0.45);
    --steel: #8fa3bd;
    --silver: #c8d2df;
    --text: #d6dee8;
    --muted: #8796ab;
    --gold: #d6b05a;
    --gold-hi: #f0d68e;
    --gold-lo: #7d6123;
    --link: #73bfdc;
    --ok: #3ccf7a;
    --bad: #f05a64;
    --dawn: #49c47c;
    --dusk: #a46ae8;
    --serif: "Cinzel", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --sans: Tahoma, Verdana, "Segoe UI", sans-serif;
    --wrap: 1180px;
}

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

html, body, h1, h2, h3, h4, h5, p, ul, ol, dl, dd, figure, table, form, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; }
button { font: inherit; }

body {
    min-width: 1000px;
    font-family: var(--sans);
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--ink);
    background-image:
        radial-gradient(ellipse 70% 420px at 50% 0, rgba(38, 72, 116, 0.55), transparent 70%),
        linear-gradient(180deg, #0b1830 0, #08111f 520px, var(--ink) 900px);
    background-repeat: no-repeat;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--gold-hi); text-decoration: underline; }

strong { color: #eef2f7; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ==========================================================================
   TOP BAR (status, clock, Discord, login, language)
   ========================================================================== */
.topbar {
    background: linear-gradient(180deg, #03070d, #08101b);
    border-bottom: 1px solid #1c2a3c;
    font-size: 11px;
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 34px;
}

.topbar-spacer { flex: 1; }

.status-pill { display: inline-flex; align-items: center; gap: 7px; }
.status-text { font-weight: bold; letter-spacing: 0.6px; color: var(--silver); }

.status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    transform: rotate(45deg);
    background: var(--ok);
    box-shadow: 0 0 6px var(--ok);
}
.status-dot.is-online { animation: dot-glow 2.4s ease-in-out infinite; }
.status-dot.is-offline { background: var(--bad); box-shadow: 0 0 6px var(--bad); }
.status-dot.is-pending { background: #6f8098; box-shadow: none; }

@keyframes dot-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.topbar-clock { display: inline-flex; align-items: center; gap: 5px; color: var(--gold-hi); }
.topbar-clock svg { width: 12px; height: 12px; }

.topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    color: var(--silver);
    border: 1px solid #2b3d55;
    background: #0d1828;
    font-weight: bold;
}
.topbar-link:hover { color: var(--gold-hi); border-color: var(--gold-lo); text-decoration: none; }
.topbar-link svg { width: 13px; height: 13px; }

.topbar-login {
    color: #1a1305;
    border-color: var(--gold);
    background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #a8842f);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.topbar-login:hover { color: #000; border-color: var(--gold-hi); }

.lang-picker { display: inline-flex; border: 1px solid #2b3d55; }
.lang-btn {
    padding: 3px 8px;
    border: 0;
    border-left: 1px solid #2b3d55;
    background: #0a1422;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: bold;
    cursor: pointer;
}
.lang-btn:first-child { border-left: 0; }
.lang-btn:hover { color: var(--gold-hi); background: #12233a; }
.lang-btn.active { color: #1a1305; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }

/* ==========================================================================
   MASTHEAD (wordmark over a night scene: armoured elf on the right,
   castle far left, twinkling stars, moon, warm rim light, drifting mist, embers)
   ========================================================================== */
.masthead {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: radial-gradient(120% 140% at 70% 0%, #14243c 0%, #0a1424 55%, #060b13 100%);
}

.masthead-art { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.masthead-art > span { position: absolute; }
/* Fade into the menu bar and keep a dark pool behind the wordmark. */
.masthead-art::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    background:
        radial-gradient(560px 170px at calc(50% - 330px) 55%, rgba(5, 9, 16, 0.7), transparent 70%),
        linear-gradient(180deg, transparent 55%, rgba(6, 11, 19, 0.9) 100%);
}
.mh-stars {
    inset: 0 0 25% 0;
    z-index: 1;
    background-image:
        radial-gradient(1px 1px at 18px 24px, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 92px 70px, #cfe0ff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 151px 18px, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 203px 96px, #9fb6d6 50%, transparent 51%),
        radial-gradient(1px 1px at 60px 112px, #cfe0ff 50%, transparent 51%);
    background-size: 240px 130px;
    animation: mh-twinkle 4s ease-in-out infinite alternate;
}
.mh-stars-2 {
    background-size: 330px 150px;
    background-position: 110px 40px;
    animation-duration: 5.5s;
    animation-delay: -2.5s;
}
.mh-castle {
    left: calc(50% - 860px);
    bottom: 0;
    z-index: 1;
    width: 284px;
    height: 240px;
    background: url(../assets/images/art/masthead-castle.webp) 0 0 / 100% 100% no-repeat;
    opacity: 0.6;
    -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent);
    mask-image: radial-gradient(closest-side, #000 45%, transparent);
}
/* C3 screenshot of an elf in armour, graded to night; its centre sits near the right edge of the content column. */
.mh-scene {
    top: -8px;
    left: calc(50% + 199px);
    z-index: 2;
    width: 400px;
    height: 247px;
    background: url(../assets/images/art/masthead-elf.webp) 0 0 / 100% 100% no-repeat;
    -webkit-mask-image: radial-gradient(50% 58% at 47% 45%, #000 55%, transparent);
    mask-image: radial-gradient(50% 58% at 47% 45%, #000 55%, transparent);
    transform-origin: 47% 30%;
    animation: mh-breathe 20s ease-in-out infinite alternate;
}
.mh-moon {
    top: 28px;
    left: calc(50% + 90px);
    z-index: 3;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 38%, #fffaf0, #eadfbf 60%, #b8aa86);
    box-shadow: 0 0 14px 4px rgba(240, 226, 180, 0.35);
}
.mh-moon::after {
    content: "";
    position: absolute;
    inset: -34px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(240, 226, 180, 0.3), transparent);
    animation: mh-pulse 6s ease-in-out infinite alternate;
}
/* Warm rim light around the figure. */
.mh-glow {
    top: -50px;
    left: calc(50% + 200px);
    z-index: 3;
    width: 380px;
    height: 320px;
    background: radial-gradient(closest-side, rgba(240, 200, 110, 0.4), rgba(214, 150, 60, 0.14) 55%, transparent);
    mix-blend-mode: screen;
    animation: mh-pulse 7s ease-in-out infinite alternate;
}
/* Two copies of the mist side by side; sliding by one copy loops seamlessly. */
.mh-mist {
    left: 0;
    bottom: -10px;
    z-index: 4;
    width: 200%;
    height: 120px;
    background:
        radial-gradient(30% 60% at 25% 70%, rgba(140, 165, 200, 0.14), transparent 70%),
        radial-gradient(25% 50% at 72% 80%, rgba(140, 165, 200, 0.1), transparent 70%);
    background-size: 50% 100%;
    animation: mh-drift 80s linear infinite;
}
.mh-embers { left: calc(50% + 120px); bottom: 0; z-index: 4; width: 0; height: 0; }
.mh-embers::before, .mh-embers::after {
    content: "";
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    opacity: 0;
    animation: mh-rise 9s linear infinite;
}
.mh-embers::before {
    box-shadow: 10px -4px 1px #ffbe5c, 70px -30px 1px #ffd27a, 140px -12px 1px #ff9c40, 205px -48px 1px #ffc76b, 262px -20px 1px #ffb04f,
                318px -40px 1px #ffd98c, 380px -8px 1px #ff9c40, 430px -34px 1px #ffc76b, -60px -22px 1px #ffb04f, -140px -6px 1px #ffd27a;
}
.mh-embers::after {
    box-shadow: 40px -18px 1px #ffd27a, 110px -44px 1px #ffb04f, 175px -6px 1px #ffc76b, 236px -28px 1px #ff9c40, 296px -12px 1px #ffd98c,
                350px -52px 1px #ffbe5c, 410px -20px 1px #ffb04f, -20px -40px 1px #ffc76b, -100px -16px 1px #ff9c40, -190px -30px 1px #ffd27a;
    animation-duration: 13s;
    animation-delay: -6s;
}
@keyframes mh-twinkle { from { opacity: 0.3; } to { opacity: 1; } }
@keyframes mh-pulse { from { opacity: 0.55; } to { opacity: 1; } }
@keyframes mh-breathe { from { transform: scale(1); } to { transform: scale(1.035); } }
@keyframes mh-drift { to { transform: translateX(-50%); } }
@keyframes mh-rise {
    0% { opacity: 0; transform: translateY(20px); }
    15% { opacity: 0.9; }
    100% { opacity: 0; transform: translateY(-190px); }
}
@media (prefers-reduced-motion: reduce) {
    .masthead-art > span, .mh-moon::after { animation: none; }
    .mh-embers { display: none; }
}

.masthead-inner { position: relative; z-index: 6; height: 100%; display: flex; align-items: center; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    color: inherit;
}
.brand:hover { text-decoration: none; }

.brand-mark {
    width: 104px;
    height: 104px;
    flex: 0 0 auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

.brand-text { display: flex; flex-direction: column; }

.brand-name {
    font-family: var(--serif);
    font-weight: 900;
    font-size: 46px;
    line-height: 1;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--silver);
    background: linear-gradient(180deg, #ffffff 0%, #d5dde8 45%, #8597ae 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 #02050a) drop-shadow(0 0 14px rgba(120, 160, 210, 0.25));
}

.brand-name em {
    font-style: normal;
    background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, #9c7a30);
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-tag {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(214, 176, 90, 0.55);
    font-family: var(--serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
}

/* ==========================================================================
   MAIN NAVIGATION (horizontal bar, live text, dropdowns)
   ========================================================================== */
.mainnav {
    position: relative;
    z-index: 50;
    background: linear-gradient(180deg, #1b2f48 0%, #122238 48%, #0b1727 100%);
    border-top: 1px solid #3d5675;
    border-bottom: 1px solid #03060b;
    box-shadow: 0 2px 0 var(--gold-lo), 0 8px 18px rgba(0, 0, 0, 0.5);
}

.menu { display: flex; align-items: stretch; justify-content: center; }

.menu-item { position: relative; display: flex; }
.menu-item + .menu-item::before {
    content: "";
    align-self: center;
    width: 5px;
    height: 5px;
    transform: rotate(45deg);
    background: var(--gold-lo);
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;
    height: 44px;
    border: 0;
    background: none;
    font-family: var(--serif);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--silver);
    cursor: pointer;
    white-space: nowrap;
}
.menu-link:hover, .menu-item.is-open > .menu-link { color: var(--gold-hi); text-decoration: none; }
.menu-item.is-current > .menu-link {
    color: var(--gold-hi);
    background: linear-gradient(180deg, transparent, rgba(214, 176, 90, 0.14));
    box-shadow: inset 0 -2px 0 var(--gold);
}

.menu-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.7;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    padding: 8px 0;
    background: linear-gradient(180deg, #13243a, #0b1626);
    border: 1px solid #3a5272;
    border-top: 2px solid var(--gold);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.65);
}
.menu-item.is-open > .submenu { display: block; }

.submenu a {
    display: block;
    padding: 6px 18px 6px 26px;
    position: relative;
    font-size: 12px;
    color: var(--text);
    white-space: nowrap;
}
.submenu a::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 4px;
    height: 4px;
    margin-top: -2px;
    transform: rotate(45deg);
    background: var(--steel);
}
.submenu a:hover, .submenu a.is-current { color: var(--gold-hi); background: rgba(214, 176, 90, 0.08); text-decoration: none; }
.submenu a:hover::before, .submenu a.is-current::before { background: var(--gold); }

.menu-toggle { display: none; }

/* ==========================================================================
   PAGE LAYOUT
   ========================================================================== */
.page { padding-top: 22px; padding-bottom: 26px; }

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 22px;
    align-items: start;
}
.layout.is-wide { grid-template-columns: minmax(0, 1fr); }

/* Framed surface: steel border, inner hairline, gold top rule and diamond rivets. */
.frame {
    position: relative;
    background: linear-gradient(180deg, rgba(17, 34, 56, 0.97), rgba(10, 20, 34, 0.98));
    border: 1px solid var(--line);
    box-shadow: inset 0 0 0 1px #070e18, inset 0 0 0 4px rgba(32, 50, 74, 0.45), 0 10px 26px rgba(0, 0, 0, 0.55);
}
.frame::before, .frame::after {
    content: "";
    position: absolute;
    top: -5px;
    width: 9px;
    height: 9px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, var(--gold-hi), var(--gold-lo));
    box-shadow: 0 0 0 2px var(--ink);
    z-index: 1;
}
.frame::before { left: -5px; }
.frame::after { right: -5px; }
.frame > .frame-rule {
    position: absolute;
    top: -1px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-hi) 50%, var(--gold) 80%, transparent);
}

.main-col { padding: 26px 30px 30px; min-width: 0; }

.side-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ==========================================================================
   CONTENT BLOCKS
   ========================================================================== */
.block { margin-bottom: 30px; }
.block:last-child { margin-bottom: 0; }

.block > h2, .block-title {
    position: relative;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0 0 9px 20px;
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ecdcae;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.8);
}
.block > h2::before, .block-title::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.45em;
    width: 9px;
    height: 9px;
    transform: rotate(45deg);
    border: 2px solid var(--gold);
}
.block > h2::after, .block-title::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--gold), rgba(143, 163, 189, 0.5) 40%, transparent);
}
.block > h2 small, .block-title small {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: normal;
    letter-spacing: 0.5px;
    color: var(--steel);
    text-shadow: none;
}

.block h3 {
    margin: 18px 0 8px;
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-hi);
    letter-spacing: 0.5px;
}
.block h3:first-child { margin-top: 0; }

.lead { font-size: 13.5px; color: #e4eaf2; margin-bottom: 12px; }

.prose p, .prose ul, .prose ol { margin-bottom: 10px; }
.prose p:last-child, .prose ul:last-child, .prose ol:last-child { margin-bottom: 0; }
.prose ul > li { position: relative; padding-left: 16px; margin-bottom: 4px; }
.prose ul > li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.62em;
    width: 5px;
    height: 5px;
    transform: rotate(45deg);
    background: var(--gold);
}
.prose ol { list-style: decimal; padding-left: 22px; }
.prose ol > li { margin-bottom: 5px; padding-left: 4px; }
.prose ol > li::marker { color: var(--gold); font-weight: bold; }

/* News/entry list */
.entry {
    padding: 14px 0;
    border-bottom: 1px dashed var(--line-soft);
}
.entry:first-of-type { padding-top: 0; }
.entry:last-child { border-bottom: 0; padding-bottom: 0; }

.entry-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.entry-title { font-family: var(--serif); font-size: 14.5px; font-weight: 700; color: var(--gold-hi); margin: 0 !important; }
.entry-meta { font-size: 11px; color: var(--steel); white-space: nowrap; }
.entry-more { margin-top: 6px; font-size: 12px; font-weight: bold; }
.entry-more a::after { content: " \203A"; }

.tag {
    display: inline-block;
    margin-right: 6px;
    padding: 0 6px;
    vertical-align: 2px;
    font-family: var(--sans);
    font-size: 9.5px;
    font-weight: bold;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    line-height: 16px;
    color: #1a1305;
    background: linear-gradient(180deg, var(--gold-hi), var(--gold));
}
.tag-steel { color: #0b1626; background: linear-gradient(180deg, #dfe6ee, var(--steel)); }

/* Key/value fact sheet */
.facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    border: 1px solid var(--line);
    background: rgba(5, 12, 22, 0.5);
}
.facts dt, .facts dd { padding: 6px 12px; border-bottom: 1px solid var(--line-soft); }
.facts dt { color: var(--steel); font-weight: bold; border-right: 1px solid var(--line-soft); }
.facts dd { color: #eef2f7; }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
    position: relative;
    padding: 12px 14px 12px 16px;
    background: linear-gradient(160deg, rgba(24, 44, 70, 0.75), rgba(9, 18, 31, 0.85));
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold-lo);
}
.card h3, .card h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 13px; font-weight: 700; color: var(--gold-hi); }
.card p { font-size: 12px; color: #b9c5d4; }
.card .card-figure { display: block; font-family: var(--serif); font-size: 24px; font-weight: 900; color: var(--silver); line-height: 1.1; }

/* Cards with artwork: rounded, image on top fading into the card body. */
.card-art {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-top-color: rgba(214, 176, 90, 0.45);
    border-radius: 10px;
    background: linear-gradient(180deg, #0f1d30, #08111d);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: border-color 0.2s, transform 0.2s;
}
.card-art:hover { border-color: rgba(214, 176, 90, 0.55); transform: translateY(-2px); }
.card-media {
    display: block;
    width: 100%;
    height: 112px;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
    mask-image: linear-gradient(180deg, #000 55%, transparent);
    transition: transform 0.4s ease;
}
.card-art:hover .card-media { transform: scale(1.05); }
.card-body { position: relative; margin-top: -24px; padding: 0 14px 14px; }
.card-art .card-figure { text-shadow: 0 2px 6px #000; }

/* Page banner: section artwork on the right, fading into a blurred copy of itself behind the title. */
.art-banner {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 180px;
    margin-bottom: 22px;
    padding: 26px 30px;
    overflow: hidden;
    border: 1px solid rgba(214, 176, 90, 0.35);
    border-radius: 12px;
    background: #070d18 center / cover no-repeat;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}
.art-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(6, 11, 19, 0.94) 0%, rgba(6, 11, 19, 0.72) 45%, rgba(6, 11, 19, 0.2) 100%),
        radial-gradient(130% 110% at 70% 50%, transparent 45%, rgba(3, 6, 12, 0.8) 100%);
}
.art-banner-img {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
    mask-image: linear-gradient(90deg, transparent, #000 45%);
}
.art-banner-text { position: relative; z-index: 1; max-width: 54%; }
.main-col .art-banner h1 { margin-bottom: 8px; text-shadow: 0 2px 8px #000; }
.art-banner .lead { margin: 0; color: #dfe6ef; text-shadow: 0 1px 3px #000; }
.art-banner-town { background-image: url(../assets/images/art/starter-town-blur.webp); }
.art-banner-hall { background-image: url(../assets/images/art/castle-hall-blur.webp); }
.art-banner-eclipse { background-image: url(../assets/images/art/eclipse-blur.webp); }

/* Screenshot gallery: rounded tiles, dimmed until hovered. */
.art-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.art-gallery img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    filter: saturate(0.9) brightness(0.85);
    transition: filter 0.25s, border-color 0.25s, transform 0.25s;
}
.art-gallery img:hover { filter: none; border-color: rgba(214, 176, 90, 0.6); transform: translateY(-2px); }

/* Character portrait beside a page's opening text. */
.portrait-art {
    float: right;
    width: 150px;
    height: auto;
    margin: -4px 0 10px 18px;
    border: 1px solid rgba(214, 176, 90, 0.55);
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55);
}

/* Callout */
.note {
    margin: 12px 0;
    padding: 10px 14px 10px 40px;
    position: relative;
    background: rgba(214, 176, 90, 0.07);
    border: 1px solid rgba(214, 176, 90, 0.35);
    color: #e9dfc2;
}
.note::before {
    content: "!";
    position: absolute;
    left: 12px;
    top: 10px;
    width: 18px;
    height: 18px;
    font-weight: bold;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    color: #1a1305;
    background: var(--gold);
    transform: rotate(45deg);
}
.note-info { background: rgba(115, 191, 220, 0.07); border-color: rgba(115, 191, 220, 0.35); color: #d4e7f0; }
.note-info::before { content: "i"; background: var(--link); }

/* Numbered steps */
.steps { counter-reset: step; }
.steps > li {
    counter-increment: step;
    position: relative;
    padding: 0 0 12px 40px;
    min-height: 30px;
}
.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    font-family: var(--serif);
    font-weight: 900;
    line-height: 26px;
    text-align: center;
    color: var(--gold-hi);
    border: 1px solid var(--gold-lo);
    background: #0c1828;
}

.anchor-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.anchor-list a {
    padding: 3px 10px;
    font-size: 11px;
    color: var(--silver);
    border: 1px solid var(--line);
    background: rgba(13, 26, 43, 0.85);
}
.anchor-list a:hover { color: var(--gold-hi); border-color: var(--gold-lo); text-decoration: none; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

/* Pointer to the game's official site (home + downloads). */
.official-notice {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 24px;
    padding: 11px 16px;
    border: 1px solid #3b5878;
    border-left: 3px solid var(--link);
    background: linear-gradient(90deg, rgba(115, 191, 220, 0.12), rgba(13, 26, 43, 0.4));
    color: #d4e7f0;
}
.official-notice strong { color: #fff; }
.official-notice a { font-weight: bold; white-space: nowrap; }
.official-notice::before {
    content: "";
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    border: 2px solid var(--link);
}

/* Legal pages: narrower reading measure. */
.legal .prose, .legal .block > p, .legal .facts { max-width: 820px; }

/* Page title (first heading of a page). */
.main-col h1 {
    margin: 0 0 8px;
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #f3e4b4;
    text-shadow: 0 2px 4px #000;
}
.legal-updated { margin-bottom: 18px; font-size: 11.5px; color: var(--muted); }

.form-check label { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--text); cursor: pointer; }
.form-check input[type="checkbox"] { flex: 0 0 auto; width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--gold); }

/* Tables */
.table-l2 { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 12px; }
.table-l2 th {
    padding: 7px 10px;
    text-align: left;
    font-family: var(--serif);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--gold-hi);
    background: linear-gradient(180deg, #1d3452, #12233a);
    border: 1px solid #34506f;
}
.table-l2 td { padding: 6px 10px; border: 1px solid #1d3048; color: #d0d9e4; }
.table-l2 tbody tr:nth-child(odd) td { background: rgba(5, 12, 22, 0.55); }
.table-l2 tbody tr:nth-child(even) td { background: rgba(17, 34, 56, 0.55); }
.table-l2 tbody tr:hover td { background: rgba(214, 176, 90, 0.08); }

.txt-ok { color: var(--ok); font-weight: bold; }
.txt-warn { color: var(--gold-hi); font-weight: bold; }
.txt-info { color: var(--link); font-weight: bold; }
.txt-muted { color: var(--muted); }

/* Buttons */
.cta-button {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 9px 10px;
    font-family: var(--serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
    color: #f4f7fb;
    border: 1px solid #3f5878;
    background: linear-gradient(180deg, #2a4466, #172a42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 4px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    text-shadow: 0 1px 2px #000;
}
.cta-button:hover { color: #fff; border-color: var(--gold); text-decoration: none; filter: brightness(1.12); }
.cta-button.cta-gold { color: #1a1305; text-shadow: none; border-color: var(--gold-hi); background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #a07d2f); }
.cta-button.cta-teal { border-color: #4d97ae; background: linear-gradient(180deg, #2f7189, #1a4253); }
.cta-button.cta-blue { border-color: #4a6f9a; background: linear-gradient(180deg, #2f5786, #1b3352); }
.cta-button.cta-dark { border-color: #33435a; background: linear-gradient(180deg, #1d2a3b, #111a26); }
button.cta-button { font-family: var(--serif); }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.btn-row .cta-button { width: auto; margin: 0; padding: 8px 18px; }

/* Forms */
.form-group { margin-bottom: 12px; }
.form-label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: bold; color: var(--gold-hi); }
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 8px 10px;
    font-family: var(--sans);
    font-size: 12px;
    color: #fff;
    background: #050c16;
    border: 1px solid #2d4561;
    outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(214, 176, 90, 0.25); }
.form-help { margin-top: 3px; font-size: 11px; color: var(--muted); }

/* ==========================================================================
   HOME HERO (rotating slides: character art over a blurred, darkened scene)
   ========================================================================== */
.hero {
    position: relative;
    isolation: isolate;
    margin-bottom: 26px;
    overflow: hidden;
    border: 1px solid rgba(214, 176, 90, 0.35);
    border-radius: 12px;
    background: #070d18;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}
/* Slides share one grid cell, so the hero grows to the tallest translation instead of clipping it. */
.hero-slides { position: relative; display: grid; }
.hero-slide {
    position: relative;
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    min-height: 310px;
    padding: 30px 32px 54px 47%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
}
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-bg, .hero-figure { position: absolute; pointer-events: none; }
.hero-bg { inset: 0; background: center / cover no-repeat; }
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 11, 19, 0.2) 0%, rgba(6, 11, 19, 0.72) 46%, rgba(6, 11, 19, 0.9) 100%),
        radial-gradient(120% 95% at 28% 40%, transparent 40%, rgba(3, 6, 12, 0.85) 100%);
}
/* Character fills the left half and fades into the backdrop to the right and at the bottom. */
.hero-figure {
    top: 0;
    bottom: 0;
    left: 0;
    width: 54%;
    background: left top / cover no-repeat;
    -webkit-mask-image: linear-gradient(90deg, #000 50%, transparent 95%), linear-gradient(0deg, transparent 3%, #000 26%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, #000 50%, transparent 95%), linear-gradient(0deg, transparent 3%, #000 26%);
    mask-composite: intersect;
    transform: scale(1.05);
    transform-origin: 30% 25%;
    transition: transform 7s ease-out;
}
.hero-slide.is-active .hero-figure { transform: scale(1); }
.hero-art-welcome .hero-bg { background-image: url(../assets/images/art/hero-knight-blur.webp); }
.hero-art-welcome .hero-figure { background-image: url(../assets/images/art/hero-knight.webp); background-position: left center; }
.hero-art-signs .hero-bg { background-image: url(../assets/images/art/eclipse-blur.webp); }
.hero-art-signs .hero-figure { background-image: url(../assets/images/art/ss-guardian.webp); background-position: left center; }
.hero-art-boss .hero-bg { background-image: url(../assets/images/art/grand-boss-blur.webp); }
.hero-art-boss .hero-figure { background-image: url(../assets/images/art/grand-boss.webp); background-position: center top; }
.hero-art-siege .hero-bg { background-image: url(../assets/images/art/hero-paladin-blur.webp); }
.hero-art-siege .hero-figure { background-image: url(../assets/images/art/hero-paladin.webp); background-position: left center; }

.hero-copy { position: relative; z-index: 1; max-width: 430px; }
.hero-kicker { font-size: 10.5px; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }
.hero-slide h2 {
    margin: 6px 0 10px;
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 900;
    line-height: 1.15;
    color: #f3e4b4;
    text-shadow: 0 2px 10px #000;
}
.hero-slide p { font-size: 13px; color: #d3dce7; text-shadow: 0 1px 3px #000; }
.hero-slide .hero-cta { margin-top: 18px; }
.hero-cta a {
    display: inline-block;
    padding: 9px 22px;
    font-family: var(--serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    color: #1b1205;
    background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #a57f32);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(214, 176, 90, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.hero-cta a:hover { color: #1b1205; text-decoration: none; filter: brightness(1.1); }
.hero-cta a::after { content: " \203A"; }

.hero-dots { position: absolute; z-index: 2; left: 47%; bottom: 20px; display: flex; gap: 10px; }
.hero-dots button {
    width: 11px;
    height: 11px;
    padding: 0;
    transform: rotate(45deg);
    border: 1px solid var(--gold);
    background: transparent;
    cursor: pointer;
}
.hero-dots button.is-active { background: var(--gold); box-shadow: 0 0 6px rgba(240, 214, 142, 0.7); }

@media (prefers-reduced-motion: reduce) {
    .hero-figure, .card-art, .card-media, .art-gallery img { transition: none; transform: none; }
    .hero-slide.is-active .hero-figure, .card-art:hover, .card-art:hover .card-media, .art-gallery img:hover { transform: none; }
}

/* ==========================================================================
   SIDEBAR WIDGETS
   ========================================================================== */
.sidebar-widget { padding: 0; }
.widget-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 14px 8px;
    font-family: var(--serif);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--gold-hi);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(37, 60, 90, 0.6), rgba(13, 26, 43, 0.2));
}
.widget-title small { font-family: var(--sans); font-size: 11px; letter-spacing: 0; text-transform: none; }
.widget-body { padding: 12px 14px; font-size: 11.5px; }
.widget-actions { padding: 14px 14px 6px; }

.status-grid { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; }
.status-label { color: var(--muted); }
.status-val { font-weight: bold; text-align: right; color: #fff; }
.status-val.online-count { color: var(--ok); }
.status-val.is-online { color: var(--ok); }
.status-val.is-offline { color: var(--bad); }
.status-val.is-pending { color: var(--muted); }

.rates-list { line-height: 1.5; }
.rates-row { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dotted var(--line-soft); }
.rates-row:last-child { border-bottom: 0; }
.rates-name { color: #a9b7c9; }
.rates-multiplier { font-weight: bold; color: var(--gold-hi); }
.widget-more { margin-top: 8px; text-align: right; font-size: 11px; }

.support-box { text-align: center; }
/* Cat mascot cut-out: warm gold halo behind it and a soft shadow under its feet. */
.support-box .widget-body { position: relative; }
.support-box .widget-body::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    width: 170px;
    height: 150px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(240, 200, 110, 0.22), rgba(214, 150, 60, 0.06) 60%, transparent);
    pointer-events: none;
}
.support-box .mascot {
    position: relative;
    display: block;
    width: auto;
    height: 150px;
    margin: 0 auto 8px;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(240, 210, 140, 0.18));
}
.support-box p { margin-bottom: 10px; color: #b7c4d4; }

/* Seven Signs bars (js/live.js?v=46394207f0) */
.cabal-bar { display: flex; height: 10px; margin: 4px 0 6px; overflow: hidden; background: #050b14; border: 1px solid #2d4561; }
.cabal-bar-dawn { height: 100%; background: linear-gradient(90deg, #2f9b5c, var(--dawn)); }
.cabal-bar-dusk { height: 100%; background: linear-gradient(90deg, #7d47bf, var(--dusk)); }
.cabal-labels { display: flex; justify-content: space-between; font-size: 10.5px; }
.cabal-label-dawn { color: var(--dawn); font-weight: bold; }
.cabal-label-dusk { color: var(--dusk); font-weight: bold; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.sitefoot {
    margin-top: 10px;
    padding: 22px 0 30px;
    border-top: 1px solid #1d2c40;
    background: linear-gradient(180deg, #050a12, #03060b);
    box-shadow: 0 -2px 0 rgba(125, 97, 35, 0.6);
    font-size: 11.5px;
    color: var(--muted);
}
.sitefoot-inner { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: start; }
.sitefoot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 900; font-size: 15px; letter-spacing: 2px; color: var(--silver); text-transform: uppercase; }
.sitefoot-brand img { width: 44px; height: 44px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 8px; }
.footer-links a { color: var(--silver); font-weight: bold; }
.footer-links a:hover { color: var(--gold-hi); }
.footer-legal a { color: var(--steel); font-weight: normal; }
.footer-disclaimer { max-width: 860px; margin-top: 4px; line-height: 1.55; }
.footer-disclaimer a { white-space: nowrap; }
.footer-copy { margin-top: 6px; color: #5f6f84; }

/* Toast */
.toast-notice {
    display: none;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10000;
    max-width: 340px;
    padding: 12px 18px;
    font-size: 12px;
    color: #fff;
    background: #0c1828;
    border: 1px solid var(--gold);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   ACCOUNT PANEL (ucp/)
   ========================================================================== */
.ucp-alert { margin: 0 0 12px; padding: 8px 12px; font-size: 12px; border: 1px solid; }
.ucp-alert-success { background: rgba(10, 52, 30, 0.85); border-color: var(--ok); color: #c9f7d9; }
.ucp-alert-error { background: rgba(64, 12, 18, 0.85); border-color: var(--bad); color: #ffd2d6; }

.ucp-form { max-width: 400px; margin: 12px 0; padding: 18px; background: rgba(5, 12, 22, 0.6); border: 1px solid var(--line); }
.ucp-form .cta-button { margin: 6px 0 0; }
.ucp-form-link { margin-top: 10px; font-size: 11.5px; text-align: center; }
.ucp-turnstile { min-height: 65px; }
.ucp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cta-button.ucp-btn-inline { display: inline-block; width: auto; margin: 0; padding: 7px 16px; }
.cta-button.ucp-btn-small { display: inline-block; width: auto; margin: 0; padding: 3px 10px; font-size: 10.5px; }
.ucp-subheading { margin: 18px 0 6px; font-family: var(--serif); font-size: 13px; color: var(--gold-hi); }
.ucp-list { padding-left: 18px; list-style: disc; color: #a9b7c9; font-size: 11.5px; }
.ucp-account-table th { width: 180px; }
.ucp-chars-table td, .ucp-chars-table th { padding: 6px 8px; vertical-align: middle; }
.ucp-chars-table form { margin: 0; }
.ucp-gold { color: var(--gold-hi); }
.ucp-ok { color: var(--ok); font-weight: bold; }
.ucp-warn { color: #ffbe54; font-weight: bold; }
.ucp-muted { color: var(--muted); }
.ucp-small { font-size: 11px; color: var(--muted); }
.ucp-side-login { margin-bottom: 8px; font-weight: bold; text-align: center; color: var(--gold-hi); word-break: break-all; }
.ucp-side-text { color: #a9b7c9; }

/* ==========================================================================
   LIVE SERVER DATA (js/live.js?v=46394207f0) + RAID BOSS MAP
   ========================================================================== */
.live-empty { padding: 4px 0; text-align: center; font-size: 11px; color: var(--muted); }
.live-line { margin-bottom: 4px; font-size: 11px; color: #a9b7c9; }
.live-center { margin-top: 4px; text-align: center; }
.live-link { margin-top: 8px; text-align: center; font-size: 11px; }
.live-bosses .rates-row { align-items: center; }

.boss-status { font-size: 11px; font-weight: bold; }
.boss-status.boss-alive { color: var(--ok); }
.boss-status.boss-dead, .boss-dead-text { color: var(--bad); }
.boss-status.boss-unknown { color: var(--muted); }

.live-panel { margin: 10px 0; padding: 16px; background: rgba(5, 12, 22, 0.6); border: 1px solid var(--line); }
.live-panel-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.live-panel-head h3 { margin: 0; font-family: var(--serif); font-size: 16px; color: var(--gold-hi); }
.live-right { text-align: right; }
.live-score-labels { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; font-size: 11.5px; }
.cabal-bar.live-bar-big { height: 14px; }
.live-seals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.live-seal { padding: 8px 10px; font-size: 11px; background: #07101c; border: 1px solid var(--line); }
.live-seal h4 { margin-bottom: 4px; font-size: 12px; color: var(--gold-hi); }
.live-foot { margin-top: 10px; }

.bossmap-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0 8px; font-size: 11.5px; }
.bossmap-toolbar label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.bossmap-search { width: 190px; padding: 5px 8px; }
.bossmap-zoom { display: inline-flex; gap: 4px; margin-left: auto; }
.bossmap-zoom button { width: 28px; height: 26px; font-weight: bold; color: var(--gold-hi); background: #0c1828; border: 1px solid #34506f; cursor: pointer; }
.bossmap-zoom button:hover { border-color: var(--gold); }

.bossmap-viewport {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    background: #0b1f33;
    border: 1px solid #34506f;
    box-shadow: inset 0 0 0 1px #050b14;
}
.bossmap-viewport.is-dragging { cursor: grabbing; }
.bossmap-layer { position: absolute; top: 0; left: 0; width: 100%; transform-origin: 0 0; --inv: 1; }
.bossmap-layer img { display: block; width: 100%; height: 100%; user-select: none; pointer-events: none; }
.bossmap-markers { position: absolute; inset: 0; pointer-events: none; }
.bossmap-markers > * { pointer-events: auto; }
.worldmap-shapes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.worldmap-shapes > * { pointer-events: visiblePainted; cursor: pointer; }

.boss-marker {
    position: absolute;
    width: 11px;
    height: 11px;
    padding: 0;
    border: 2px solid rgba(0, 0, 0, 0.75);
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%) scale(var(--inv));
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}
.boss-marker.boss-alive { background: var(--ok); box-shadow: 0 0 7px var(--ok); }
.boss-marker.boss-dead { background: var(--bad); }
.boss-marker.boss-unknown { background: #9aa9b8; }
.boss-marker.is-grand { width: 16px; height: 16px; border: 3px solid var(--gold-hi); }
.boss-marker.is-selected { outline: 3px solid #fff; outline-offset: 2px; z-index: 2; }
.boss-marker:hover { z-index: 3; filter: brightness(1.3); }

.boss-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; }
.boss-dot.boss-alive { background: var(--ok); }
.boss-dot.boss-dead { background: var(--bad); }
.boss-dot.boss-unknown { background: #9aa9b8; }
.boss-dot.boss-grand { background: transparent; border: 2px solid var(--gold-hi); }

.bossmap-tip {
    position: absolute;
    z-index: 5;
    min-width: 150px;
    max-width: 210px;
    padding: 6px 8px;
    pointer-events: none;
    font-size: 11.5px;
    color: var(--text);
    background: rgba(4, 10, 18, 0.95);
    border: 1px solid var(--gold);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}
.bossmap-count { margin: 6px 0; text-align: right; }
.bossmap-table tr.is-selected td { background: rgba(214, 176, 90, 0.14) !important; }

/* ==========================================================================
   SKILL TREE (skills.html / js/skilltree.js)
   ========================================================================== */
.st-races { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; border-bottom: 1px solid var(--line); }
.st-race {
    padding: 6px 14px;
    font-family: var(--serif);
    font-size: 12px;
    font-weight: 700;
    color: var(--silver);
    background: #0b1626;
    border: 1px solid var(--line);
    border-bottom: 0;
    cursor: pointer;
}
.st-race:hover { color: var(--gold-hi); }
.st-race.is-active { color: var(--gold-hi); background: #16304d; box-shadow: inset 0 2px 0 var(--gold); }

.st-tree { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; padding: 16px 8px; background: rgba(5, 12, 22, 0.55); border: 1px solid var(--line); border-top: 0; }
.st-branch { display: flex; flex-direction: column; align-items: center; }
.st-root { position: relative; padding-bottom: 12px; }
.st-root::after { content: ""; position: absolute; left: 50%; bottom: 0; height: 12px; border-left: 1px solid #4a6789; }
.st-firsts { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid #4a6789; }
.st-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.st-seconds { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; border-top: 1px dashed #2f4a69; }

.st-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 118px;
    padding: 5px 4px;
    font-family: var(--serif);
    line-height: 1.15;
    text-align: center;
    color: #e3e9f1;
    background: linear-gradient(180deg, #2a4466, #172a42);
    border: 1px solid #45628a;
    cursor: pointer;
}
.st-node.st-tier-0 { background: linear-gradient(180deg, #33527a, #1f3654); }
.st-node.st-tier-2 { background: linear-gradient(180deg, #1c2f48, #111f33); }
.st-node-name { font-size: 11px; font-weight: 700; }
.st-node-lv { font-family: var(--sans); font-size: 9.5px; color: #a3b3c7; }
.st-node:hover { border-color: var(--gold-hi); color: #fff; }
.st-node.is-path { border-color: var(--link); }
.st-node.is-active { border-color: var(--gold-hi); color: var(--gold-hi); box-shadow: 0 0 8px rgba(240, 214, 142, 0.5); }

.st-panel { margin-top: 14px; }
.st-panel-head h3 { margin: 0; font-family: var(--serif); font-size: 16px; color: var(--gold-hi); }
.st-panel-tier { margin-left: 6px; font-family: var(--sans); font-size: 11px; color: var(--link); }
.st-path { margin: 2px 0 8px; font-size: 11.5px; color: var(--muted); }
.st-path strong { color: #e0e8f0; }
.st-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 11.5px; }
.st-controls label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.st-search { width: 220px; padding: 5px 8px; }
.st-table { width: 100%; }
.st-table tr.st-group td { background: #16304d !important; color: var(--gold-hi); font-weight: bold; }
.st-num { text-align: center; white-space: nowrap; }
.st-book { color: var(--link); }
.st-auto { color: var(--ok); }
.st-skill { display: flex; align-items: center; gap: 8px; }
.st-icon {
    flex: 0 0 auto;
    box-sizing: content-box;
    width: 32px;
    height: 32px;
    border: 1px solid #34506f;
    background-color: #050b14;
    background-image: url("../assets/images/skills/skill-icons.webp?v=8a5c7a9391");
    background-repeat: no-repeat;
}
.st-origin { margin-left: 4px; font-size: 10px; color: var(--muted); }
.st-total { margin-top: 6px; text-align: right; color: var(--muted); }
.st-note { margin-top: 8px; font-size: 11px; color: var(--muted); }
.st-empty { padding: 12px 0; color: var(--muted); }

/* ==========================================================================
   DATABASE (database.html / js/database.js)
   ========================================================================== */
.db-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 4px; border-bottom: 1px solid var(--line); }
.db-sections { display: flex; flex-wrap: wrap; gap: 4px; }
.db-sections a {
    padding: 6px 14px;
    font-family: var(--serif);
    font-size: 12px;
    font-weight: 700;
    color: var(--silver);
    background: #0b1626;
    border: 1px solid var(--line);
    border-bottom: 0;
}
.db-sections a:hover, .db-sections a.is-active { color: var(--gold-hi); background: #16304d; text-decoration: none; }
.db-sections a.is-active { box-shadow: inset 0 2px 0 var(--gold); }
.db-search { flex: 0 1 300px; margin-bottom: 4px; }
.db-search .form-input { width: 100%; padding: 5px 8px; }
.db-rates { margin: 6px 0 8px; font-size: 11px; color: var(--muted); }
.db-view { min-height: 200px; }
.db-loading, .db-count { margin: 6px 0; color: var(--muted); }
.db-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.db-chip { padding: 3px 10px; font-size: 11px; color: #b9c5d4; background: #0b1626; border: 1px solid var(--line); }
.db-chip:hover { color: var(--gold-hi); border-color: #4a6789; text-decoration: none; }
.db-chip.is-active { color: #1a1305; background: var(--gold-hi); border-color: var(--gold-hi); font-weight: bold; }
.db-table { width: 100%; margin: 4px 0 10px; }
.db-table th, .db-table td { padding-left: 6px; padding-right: 6px; }
.db-table th[data-sort] { cursor: pointer; user-select: none; }
.db-table th.is-sorted { color: #fff; }
.db-num { text-align: center; white-space: nowrap; }
.db-table tr.db-group td { background: #16304d !important; color: var(--gold-hi); font-weight: bold; }
.db-pager { display: flex; flex-wrap: wrap; gap: 3px; margin: 6px 0; }
.db-pager button { min-width: 28px; padding: 3px 6px; color: #b9c5d4; background: #0b1626; border: 1px solid var(--line); cursor: pointer; }
.db-pager button.is-active { color: #1a1305; background: var(--gold-hi); border-color: var(--gold-hi); }

.db-icon { flex: 0 0 auto; width: 32px; height: 32px; vertical-align: middle; background: #050b14; border: 1px solid #34506f; }
.db-icon-empty { display: inline-block; }
.db-crystal { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.db-crystal-icon { width: 16px; height: 16px; }
.db-item { display: inline-flex; align-items: center; gap: 6px; }
.db-item:hover { text-decoration: none; }
.db-add { color: var(--link); font-size: 0.92em; }
.db-title { color: var(--muted); font-size: 0.9em; }
.db-grade { display: inline-block; min-width: 14px; padding: 0 3px; font-size: 9.5px; font-weight: bold; line-height: 14px; text-align: center; color: #0b1626; background: #9aa7b4; }
.db-grade-d { background: #9ec7e0; } .db-grade-c { background: #7fd37f; } .db-grade-b { background: #e0c060; } .db-grade-a { background: #e89a4c; } .db-grade-s { background: #e86a6a; }
.db-flag { display: inline-block; margin: 0 1px; padding: 0 4px; font-size: 9.5px; font-weight: bold; color: #0b1626; background: var(--link); }
.db-flag-s { background: var(--gold-hi); }

.db-head { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; }
.db-head h3 { margin: 0; font-family: var(--serif); font-size: 16px; color: var(--gold-hi); }
.db-sub { font-size: 11px; color: var(--muted); }
.db-stats { display: grid; grid-template-columns: repeat(auto-fill, 130px 120px); gap: 3px 10px; margin: 6px 0 10px; }
.db-stats dt { color: var(--muted); }
.db-stats dd { margin: 0; color: #e0e8f0; }
.db-section { margin: 12px 0; }
.db-section h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 13px; color: var(--link); }
.db-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.db-list-npc span { white-space: nowrap; }
.db-skill { display: inline-flex; align-items: center; gap: 6px; }
.db-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; border-bottom: 1px solid var(--line); }
.db-tab { padding: 5px 12px; color: var(--silver); background: #0b1626; border: 1px solid var(--line); border-bottom: 0; }
.db-tab.is-active, .db-tab:hover { color: var(--gold-hi); background: #16304d; text-decoration: none; }
.db-tab small { color: var(--muted); }
.db-note { font-size: 11px; color: var(--muted); }
.db-recipe, .db-set { margin: 6px 0; padding: 7px 9px; background: rgba(5, 12, 22, 0.6); border: 1px solid var(--line); }
.db-recipe-mats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0; }
.db-mat { display: inline-block; margin: 2px 8px 2px 0; }
.db-set-skills { margin-top: 6px; }
.db-map { margin: 6px 0 10px; }
.db-map-toolbar { margin: 4px 0 6px; }
.db-map-toolbar > span:not(.bossmap-zoom) { display: inline-flex; align-items: center; gap: 5px; }
.db-map .bossmap-viewport { height: 480px; }
/* Traço em unidades da imagem dividido pelo zoom (--inv): a camada é escalada por CSS, que o non-scaling-stroke ignora. */
.db-map-area { fill: rgba(255, 90, 60, 0.3); stroke: #ff5a3c; stroke-width: calc(2.6px * var(--inv)); stroke-linejoin: round; }
.db-map-area:hover, .db-map-area.is-selected { fill: rgba(255, 214, 90, 0.45); stroke: #ffd65a; }
.db-map-marker, .db-map-key {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ff3c28;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.9);
}
.db-map-marker { position: absolute; cursor: pointer; transform: translate(-50%, -50%) scale(var(--inv)); }
.db-map-marker.is-area, .db-map-key.is-area { width: 7px; height: 7px; border-width: 1px; background: #ff7a5c; }
.db-map-key { display: inline-block; }
.db-map-key.is-area { width: 12px; height: 9px; border: 2px solid #ff5a3c; border-radius: 2px; background: rgba(255, 90, 60, 0.3); }
.db-map-marker:hover, .db-map-marker.is-selected { z-index: 2; background: #ffd65a; outline: 2px solid #fff; outline-offset: 1px; }
.db-spawn-table tbody tr { cursor: pointer; }
.db-spawn-table tr.is-selected td { background: rgba(214, 176, 90, 0.14) !important; }

/* ==========================================================================
   NARROW SCREENS (< 1000px): one column, collapsible menu
   ========================================================================== */
@media (max-width: 999px) {
    body { min-width: 0; font-size: 14px; }
    .wrap { padding: 0 10px; }

    .topbar-inner { flex-wrap: wrap; justify-content: center; gap: 8px; padding: 6px 0; }
    .topbar-spacer { display: none; }
    .lang-btn, .topbar-link { padding: 6px 10px; font-size: 12px; }

    .masthead { height: auto; padding: 26px 0 34px; }
    .mh-castle { display: none; }
    .mh-scene { top: -6px; left: calc(100% - 300px); width: 324px; height: 200px; opacity: 0.6; }
    .mh-moon { display: none; }
    .mh-glow { top: -40px; left: calc(100% - 240px); width: 260px; height: 240px; }
    .mh-embers { left: calc(100% - 320px); }
    .brand { gap: 12px; }
    .brand-mark { width: 70px; height: 70px; }
    .brand-name { font-size: 30px; letter-spacing: 3px; }
    .brand-tag { font-size: 10.5px; letter-spacing: 2px; }

    .menu-toggle {
        display: block;
        width: 100%;
        padding: 12px;
        font-family: var(--serif);
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 1px;
        color: var(--gold-hi);
        background: none;
        border: 0;
        cursor: pointer;
    }
    .menu { display: none; flex-direction: column; padding-bottom: 8px; }
    body.nav-mobile-open .menu { display: flex; }
    .menu-item { flex-direction: column; }
    .menu-item + .menu-item::before { display: none; }
    .menu-link { height: auto; padding: 11px 12px; border-top: 1px solid rgba(61, 86, 117, 0.5); font-size: 14px; }
    .submenu { position: static; transform: none; min-width: 0; box-shadow: none; border-left: 0; border-right: 0; }
    .submenu a { font-size: 14px; padding: 9px 12px 9px 30px; white-space: normal; }

    .page { padding-top: 12px; }
    .layout { display: block; }
    .side-col { margin-top: 18px; }
    .main-col { padding: 18px 14px; }

    .hero-slide { position: relative; display: none; min-height: 260px; padding: 22px 16px 46px; }
    .hero-slide.is-active { display: flex; }
    .hero-figure { width: 100%; opacity: 0.4; }
    .hero-copy { max-width: none; }
    .hero-dots { left: 16px; }

    .art-banner { padding: 20px 16px; }
    .art-banner-img { width: 100%; opacity: 0.35; }
    .art-banner-text { max-width: none; }
    .art-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portrait-art { width: 110px; }

    .card-grid, .card-grid.is-3, .split, .live-seals { grid-template-columns: 1fr; }
    .facts { grid-template-columns: 1fr; }
    .facts dt { border-right: 0; border-bottom: 0; padding-bottom: 0; }

    .table-l2 { display: block; overflow-x: auto; white-space: nowrap; font-size: 13px; }
    .ucp-account-table { white-space: normal; }
    .ucp-account-table th { width: auto; }

    .cta-button { padding: 12px 10px; font-size: 13px; }
    .form-input, .form-select, .form-textarea { font-size: 16px; padding: 10px 12px; }
    .ucp-form { max-width: none; }
    .ucp-actions .cta-button.ucp-btn-inline { flex: 1 1 100%; }
    .live-panel-head, .live-score-labels { flex-direction: column; gap: 6px; }
    .live-right { text-align: left; }

    .sitefoot-inner { grid-template-columns: 1fr; gap: 14px; }

    .bossmap-viewport, .db-map .bossmap-viewport { height: auto; aspect-ratio: var(--map-aspect, 1.1); }
    .bossmap-table { display: table; white-space: normal; }
    .bossmap-search { width: 100%; }
    .bossmap-zoom { margin-left: 0; }
    .bossmap-zoom button { width: 40px; height: 36px; font-size: 18px; }

    .st-race, .db-sections a { font-size: 13px; padding: 8px 10px; }
    .st-tree { flex-direction: column; align-items: stretch; gap: 14px; padding: 12px 6px; }
    .st-firsts { flex-wrap: wrap; justify-content: center; }
    .st-node { width: 104px; }
    .st-search, .bossmap-search { width: 100%; }
    .st-table, .db-table { white-space: normal; }
    .db-search { flex-basis: 100%; }
    .db-chip { font-size: 13px; padding: 5px 10px; }
    .db-stats { grid-template-columns: 1fr 1fr; }
}
