/* ===========================================================
   Helbreath Sacrifice Launcher · V7 Battlefield Map
   =========================================================== */

/* Medieval display font for main titles (bundled, offline-safe). */
@font-face {
    font-family: 'Medieval';
    src: url('BlackChancery.ttf') format('truetype');
    font-display: swap;
}

:root {
    --gold: #d4a64a;
    --gold-hi: #f0c870;
    --gold-dim: #8a7340;
    --bg: #0a0907;
    --panel: #14110c;
    --panel-2: #1c1812;
    --line: #3a2e10;
    --line-soft: #2a2218;
    --text: #e6dccb;
    --text-dim: #8c8270;
    --text-muted: #5a5347;
    --aresden: #ef4444;
    --aresden-glow: #fca5a5;
    --elvine: #3b82f6;
    --elvine-glow: #93c5fd;
    --neutral: #a78bfa;
    --ok: #22c55e;
    --warn: #f59e0b;
    --crimson: #b91c1c;
}

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

html, body {
    background: var(--panel);
    color: var(--text);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    height: 100vh;
    user-select: none;
    cursor: default;
}

body {
    display: flex;
    flex-direction: column;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

button:disabled { opacity: .45; cursor: not-allowed; }

a { color: inherit; text-decoration: none; cursor: pointer; }

/* ===========================================================
   Title bar
   =========================================================== */

#titlebar {
    height: 36px;
    background: linear-gradient(180deg, #0a0907 0%, #060503 100%);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    padding: 0 0 0 14px;
    gap: 14px;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
    user-select: none;
}
/* Subtle gold accent line at the very top — matches the example screenshot. */
#titlebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
    opacity: 0.45;
}

.brand-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    image-rendering: pixelated;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(212, 166, 74, 0.4));
}

.brand-name {
    color: var(--gold);
    font-family: 'Cinzel', 'Trajan Pro', serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 4px;
}

.brand-name small {
    color: var(--text-dim);
    font-size: 9px;
    letter-spacing: 2px;
    display: block;
    font-weight: 400;
    margin-top: -1px;
}

.realm {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 2px;
    border-left: 1px solid var(--line-soft);
    padding-left: 14px;
}

.realm strong { color: var(--gold); }

.tb-spacer { flex: 1; }

#server-pill {
    background: rgba(34,197,94,.1);
    border: 1px solid rgba(34,197,94,.3);
    color: var(--ok);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

#server-pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ok);
}

#server-pill.offline {
    background: rgba(239,68,68,.1);
    border-color: rgba(239,68,68,.3);
    color: var(--elvine);
}

#server-pill.offline .dot { background: var(--elvine); }

.tb-icons { display: flex; gap: 6px; }

.tb-icon {
    width: 26px;
    height: 26px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--line-soft);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    transition: color .15s, border-color .15s;
}

.tb-icon:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* Window controls — flush with the right edge of the titlebar, no border,
   hover fills the cell. Matches the Windows-style min/close convention. */
.tb-winbtn {
    width: 46px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: background .12s, color .12s;
    margin: 0;
    padding: 0;
}
.tb-winbtn:hover { background: rgba(255, 255, 255, 0.08); color: var(--gold); }
.tb-winbtn-close:hover { background: #c43838; color: #fff; }
.tb-icons { padding-right: 0; }

/* ===========================================================
   Hero
   =========================================================== */

#hero {
    height: 130px;
    position: relative;
    overflow: hidden;
    background: #1a0a08;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.hero-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 40%;
    opacity: 0;
    transition: opacity 1s ease;
}

#hero-image-a {
    background-image: url('banner.png');
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 0%, transparent 60%, rgba(0,0,0,.85) 100%),
        linear-gradient(90deg, rgba(0,0,0,.6) 0%, transparent 30%, transparent 70%, rgba(0,0,0,.6) 100%);
    pointer-events: none;
}

.hero-content {
    position: absolute;
    inset: 0;
    padding: 16px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hero-season {
    color: var(--gold-hi);
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 6px;
    text-shadow: 0 2px 8px rgba(0,0,0,.9);
}

.hero-season-label { color: var(--text-dim); }
.hero-season strong { color: white; }

.hero-day {
    background: rgba(0,0,0,.6);
    border: 1px solid var(--line);
    padding: 5px 11px;
    border-radius: 4px;
    color: var(--text);
    font-size: 10px;
    letter-spacing: 1px;
}

.hero-day strong { color: var(--gold); }

.hero-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.hero-headline {
    color: white;
    font-family: 'Cinzel', serif;
    font-size: 15px;
    letter-spacing: 3px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,.95);
}

.hero-headline small {
    display: block;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--gold-hi);
    margin-top: 4px;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
}

.hero-progress-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dim);
    font-size: 9px;
    letter-spacing: 2px;
}

.hero-bar {
    width: 100px;
    height: 3px;
    background: rgba(255,255,255,.1);
    border-radius: 99px;
    overflow: hidden;
}

.hero-bar-fill {
    height: 100%;
    width: 16.7%;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold-hi));
}

.hero-pct { color: var(--gold); }

/* ===========================================================
   Body
   =========================================================== */

#body {
    flex: 1;
    display: flex;
    min-height: 0;
}

#map-wrap {
    flex: 1;
    background: #0a0907;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    min-width: 0;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.map-title {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 3px;
    font-weight: 700;
}

.map-title::before { content: '◆ '; color: var(--gold-dim); }

.map-stats {
    display: flex;
    gap: 14px;
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.map-stats .stat { display: flex; gap: 5px; }
.map-stats .stat .v { color: var(--gold); font-weight: 700; }
.map-stats .stat.battles .v { color: var(--gold-hi); }
.map-stats .stat.engaged .v { color: var(--ok); }

.regions {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 7px;
    min-height: 0;
}

.region {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: transform .15s, border-color .15s, box-shadow .15s;
    min-height: 0;
}

.region:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    box-shadow: 0 6px 14px rgba(0,0,0,.6), 0 0 0 1px rgba(212,166,74,.3);
}

.region img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.region::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,.3) 0%, transparent 30%, transparent 60%, rgba(0,0,0,.92) 100%),
        linear-gradient(0deg, rgba(0,0,0,.3) 0%, transparent 50%);
}

.region.aresden { box-shadow: inset 0 0 0 1px rgba(59,130,246,.3); }
.region.elvine { box-shadow: inset 0 0 0 1px rgba(239,68,68,.3); }
.region.contested { box-shadow: inset 0 0 0 1px rgba(212,166,74,.5); }
.region.neutral { box-shadow: inset 0 0 0 1px rgba(167,139,250,.3); }

.region-stripe {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    z-index: 2;
}

.region.aresden .region-stripe { background: var(--aresden); }
.region.elvine .region-stripe { background: var(--elvine); }
.region.contested .region-stripe { background: var(--gold); }
.region.neutral .region-stripe { background: var(--neutral); }

.region-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,.85);
    border: 1px solid;
    color: white;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 2px;
    letter-spacing: 1px;
    font-weight: 700;
    z-index: 2;
}

.region-tag.aresden { border-color: var(--aresden); color: var(--aresden-glow); }
.region-tag.elvine { border-color: var(--elvine); color: var(--elvine-glow); }
.region-tag.contested { border-color: var(--gold); color: var(--gold-hi); }
.region-tag.neutral { border-color: var(--neutral); color: var(--neutral); }
.region-tag.siege {
    background: rgba(212,166,74,.95);
    color: #1a1408;
    border-color: var(--gold-hi);
    animation: blink-tag 1.5s infinite;
}

@keyframes blink-tag {
    0%, 100% { opacity: 1; }
    50% { opacity: .65; }
}

.region-pop {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 9, 7, 0.55);
    border: 1px solid rgba(212, 166, 74, 0.35);
    color: white;
    font-family: 'Cinzel', serif;
    font-size: 15px;
    padding: 5px 12px;
    border-radius: 3px;
    letter-spacing: 2px;
    font-weight: 700;
    z-index: 2;
    display: flex;
    gap: 7px;
    align-items: center;
    backdrop-filter: blur(4px);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.region-pop .live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
    animation: pulse-dot 1.5s infinite;
    box-shadow: 0 0 6px var(--ok);
}

.region-pop.contested .live { background: var(--gold-hi); }
.region-pop.elvine .live { background: var(--elvine-glow); }

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: .6; }
}

.region-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 7px 9px;
    z-index: 2;
}

.region-name {
    color: white;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,.9);
}

.region-meta {
    color: var(--text-dim);
    font-size: 9px;
    letter-spacing: 1px;
    margin-top: 2px;
}

.region-meta strong { color: var(--gold); }

.region-pulse-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(212,166,74,.18) 0%, transparent 70%);
    animation: pulse-bg 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse-bg {
    0%, 100% { opacity: .3; }
    50% { opacity: .8; }
}

/* ===========================================================
   Sidebar
   =========================================================== */

#side {
    width: 290px;
    background: var(--panel-2);
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.side-tabs {
    display: flex;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(0,0,0,.4);
}

.side-tabs .t {
    flex: 1;
    padding: 9px;
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-dim);
    cursor: pointer;
    text-align: center;
    transition: color .15s;
    border-bottom: 2px solid transparent;
    font-family: 'Cinzel', serif;
    font-weight: 600;
}

.side-tabs .t.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.side-tabs .t:hover { color: var(--gold); }

.side-section {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line-soft);
}

.side-section.side-grow {
    flex: 1;
    overflow-y: auto;
    border-bottom: none;
}

.side-section.side-grow::-webkit-scrollbar { width: 4px; }
.side-section.side-grow::-webkit-scrollbar-track { background: var(--panel-2); }
.side-section.side-grow::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }

.side-section h3 {
    font-size: 9px;
    color: var(--gold);
    letter-spacing: 3px;
    margin-bottom: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.side-section h3.margin-top { margin-top: 14px; }
.side-section h3::before { content: '◆'; color: var(--gold-dim); font-size: 8px; }

.power {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 11px;
}

.power:last-child { margin-bottom: 0; }

.power-crest {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.power-crest img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.power-info { flex: 1; min-width: 0; }

.power-name {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
}

.power.aresden .power-name { color: var(--aresden-glow); }
.power.elvine .power-name { color: var(--elvine-glow); }

.power-name .pct { color: var(--text); font-variant-numeric: tabular-nums; }

.power-bar {
    height: 5px;
    background: rgba(0,0,0,.5);
    margin-top: 4px;
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
}

.power-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--aresden), var(--aresden-glow));
    transition: width .8s cubic-bezier(.4,0,.2,1);
}

.power.elvine .power-bar-fill {
    background: linear-gradient(90deg, var(--elvine), var(--elvine-glow));
}

.power-meta {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 3px;
    letter-spacing: 1px;
}

.power-meta .siege { color: var(--gold-hi); }

.engagement {
    display: flex;
    gap: 9px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line-soft);
    cursor: pointer;
    transition: background .15s;
    margin: 0 -14px;
    padding-left: 14px;
    padding-right: 14px;
    align-items: center;
}

.engagement:hover { background: rgba(212,166,74,.05); }
.engagement:last-child { border-bottom: none; }

.engagement .e-thumb {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: #2a1f0e;
    border: 1px solid;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.engagement.siege .e-thumb { border-color: var(--gold); }
.engagement.skirmish .e-thumb { border-color: var(--elvine); }
.engagement.patrol .e-thumb { border-color: var(--neutral); }

.engagement .e-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    transform: scale(1.6);
    transform-origin: center 35%;
}

.engagement .e-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.6));
}

.engagement .e-info { flex: 1; min-width: 0; }

.engagement .e-name {
    font-size: 11px;
    color: var(--text);
    font-weight: 600;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}

.engagement .e-meta {
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-top: 2px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.engagement .e-tag {
    font-size: 8px;
    padding: 1px 5px;
    border-radius: 2px;
    letter-spacing: 1px;
    font-weight: 700;
}

.engagement.siege .e-tag { background: var(--gold); color: #1a1408; }
.engagement.skirmish .e-tag { background: var(--elvine); color: white; }
.engagement.patrol .e-tag { background: var(--neutral); color: #1a1408; }

.engagement .e-count {
    font-size: 10px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    text-align: right;
    min-width: 56px;
    flex-shrink: 0;
}

.engagement .e-count .live {
    color: var(--ok);
    font-size: 9px;
    letter-spacing: 1px;
}

.engagement .e-count .live::before { content: '● '; }

.kill-feed {
    padding: 4px 0;
    font-size: 12px;
    line-height: 1.7;
}

.kill-feed .k {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 0;
    color: var(--text-dim);
    font-family: 'Consolas', monospace;
}

.kill-feed .k .killer.a { color: var(--aresden-glow); font-weight: 700; }
.kill-feed .k .killer.e { color: var(--elvine-glow); font-weight: 700; }
.kill-feed .k .arrow { color: var(--gold); }
.kill-feed .k .verb { color: var(--text-muted); font-style: italic; font-size: 11px; }
.kill-feed .k .victim.a { color: var(--aresden-glow); opacity: .65; }
.kill-feed .k .victim.e { color: var(--elvine-glow); opacity: .65; }
.kill-feed .k .time { margin-left: auto; color: var(--text-muted); font-size: 10px; }
.kill-feed .k .weapon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    image-rendering: pixelated;
    flex-shrink: 0;
}

/* ===========================================================
   Bottom action bar
   =========================================================== */

#bottom {
    background: rgba(0,0,0,.7);
    border-top: 1px solid var(--line);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.bottom-left { flex: 1; min-width: 0; }

#status-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.status-icon.status-idle { background: var(--text-muted); }
.status-icon.status-progress { background: var(--gold); animation: pulse-dot 1s infinite; }
.status-icon.status-success { background: var(--ok); }
.status-icon.status-error { background: var(--elvine); }

#status-text { color: var(--text); }
#status-text.status-success { color: var(--ok); }
#status-text.status-error { color: var(--elvine); }

.progress-row { max-width: 280px; }

#progress-track {
    height: 4px;
    background: rgba(0,0,0,.6);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold-hi));
    transition: width .3s;
}

.crusade-countdown {
    text-align: right;
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 1px;
    line-height: 1.3;
}

.cc-label { font-size: 9px; }

.cc-value {
    color: var(--gold);
    font-size: 14px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(212,166,74,.4);
}

.cc-sub { color: var(--text-muted); font-size: 9px; }

.action-stack {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-aux {
    background: rgba(212,166,74,.06);
    color: var(--text-dim);
    border: 1px solid rgba(212,166,74,.2);
    padding: 7px 12px;
    font-size: 10px;
    letter-spacing: 1px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all .15s;
}

.btn-aux:hover:not(:disabled) {
    color: var(--gold);
    border-color: var(--gold);
}

.btn-aux svg { color: currentColor; flex-shrink: 0; }

.link-icon {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--line-soft);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    transition: color .15s, border-color .15s;
}

.link-icon:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.version {
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 1px;
    padding: 0 4px;
}

.btn-play {
    background: linear-gradient(180deg, var(--gold-hi), var(--gold), #a37f2c);
    color: #1a1408;
    border: 1px solid var(--gold-hi);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 4px;
    padding: 13px 28px;
    font-size: 13px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(212,166,74,.4), inset 0 1px 0 rgba(255,255,255,.4);
    transition: transform .1s;
}

.btn-play:hover:not(:disabled) { transform: translateY(-1px); }

.btn-play svg { color: #1a1408; flex-shrink: 0; }

/* ===========================================================
   Settings overlay
   =========================================================== */

#settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .2s;
}

#settings-overlay.hidden { display: none; }

#settings-panel {
    background: var(--panel-2);
    border: 1px solid var(--gold);
    border-radius: 6px;
    width: 540px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
    overflow: hidden;
}

.settings-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(0,0,0,.4);
}

.settings-head h2 {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: var(--gold);
    letter-spacing: 4px;
    font-weight: 700;
}

.settings-close {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--line-soft);
    border-radius: 4px;
    color: var(--text-dim);
    font-size: 18px;
    line-height: 1;
}

.settings-close:hover {
    color: var(--elvine);
    border-color: var(--elvine);
}

.settings-body {
    padding: 22px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.col-label {
    font-size: 10px;
    color: var(--gold);
    letter-spacing: 3px;
    margin-bottom: 12px;
    font-weight: 700;
    font-family: 'Cinzel', serif;
}

.radio-stack, .toggle-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio, .toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text);
    cursor: pointer;
    padding: 6px 0;
}

.radio input { display: none; }

.radio-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(0,0,0,.4);
    flex-shrink: 0;
    position: relative;
    transition: border-color .15s;
}

.radio:hover .radio-dot { border-color: var(--gold); }

.radio input:checked + .radio-dot {
    border-color: var(--gold);
    background: rgba(212,166,74,.2);
}

.radio input:checked + .radio-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-hi);
}

.toggle { justify-content: space-between; }

.toggle input { display: none; }

.toggle .switch {
    width: 32px;
    height: 16px;
    background: rgba(0,0,0,.5);
    border: 1px solid var(--line);
    border-radius: 99px;
    position: relative;
    transition: background .15s, border-color .15s;
    flex-shrink: 0;
}

.toggle .switch::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 12px;
    height: 12px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: left .15s, background .15s;
}

.toggle input:checked + .switch {
    background: rgba(212,166,74,.3);
    border-color: var(--gold);
}

.toggle input:checked + .switch::after {
    left: 17px;
    background: var(--gold-hi);
}

/* ===========================================================
   Battle Detail Overlay (sidebar engagement → full sheet)
   =========================================================== */

#battle-detail {
    position: fixed;
    inset: 0;
    background: var(--panel);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: bd-fade-in .15s ease-out;
}

#battle-detail.hidden { display: none; }

@keyframes bd-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bd-bar {
    flex-shrink: 0;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(0,0,0,.4);
    border-bottom: 1px solid var(--line);
}

.bd-bar.bd-bottom {
    border-top: 1px solid var(--line);
    border-bottom: none;
}

.bd-back {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold-dim);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    letter-spacing: 1px;
    transition: background .12s, color .12s;
}

.bd-back:hover { background: rgba(212,166,74,.1); color: var(--gold-hi); }

.bd-breadcrumb {
    flex: 1;
    color: var(--text-dim);
    font-size: 12px;
    letter-spacing: 1px;
}

.bd-breadcrumb #bd-crumb { color: var(--gold); }

.bd-live-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--gold-dim);
    border-radius: 14px;
    padding: 4px 12px;
    font-size: 11px;
    color: var(--gold);
    letter-spacing: 1px;
}

.bd-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 6px var(--ok);
    animation: bd-pulse 1.6s infinite;
}

@keyframes bd-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
}

.bd-body {
    flex: 1;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
    padding: 16px 18px;
    overflow: auto;
}

.bd-left, .bd-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.bd-hero {
    position: relative;
    height: 200px;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
}

.bd-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .7;
}

.bd-hero-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    border: 1px solid var(--gold-dim);
    background: rgba(0,0,0,.6);
    color: var(--gold);
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 3px;
    letter-spacing: 1px;
}

.bd-hero-title {
    position: absolute;
    bottom: 50px;
    left: 16px;
    color: var(--text);
    font-family: 'Cinzel', 'Trajan Pro', serif;
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 4px;
    text-shadow: 0 2px 8px rgba(0,0,0,.9);
    margin: 0;
}

.bd-hero-sub {
    position: absolute;
    bottom: 30px;
    left: 16px;
    color: var(--text-dim);
    font-size: 12px;
    letter-spacing: 3px;
    text-shadow: 0 1px 4px rgba(0,0,0,.9);
}

.bd-hero-strip {
    position: absolute;
    bottom: 10px;
    left: 16px;
    right: 16px;
    display: flex;
    gap: 16px;
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 1px;
}

.bd-card {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
}

.bd-card h4 {
    color: var(--gold);
    font-size: 11px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 600;
}

.bd-stub {
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
    padding: 10px 4px;
    text-align: center;
}

.bd-score-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px 0 12px 0;
}

.bd-side { font-size: 12px; }
.bd-side.a { text-align: right; }
.bd-side.e { text-align: left; }
.bd-side-name {
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
    margin-bottom: 4px;
}
.bd-side.a .bd-side-name { color: var(--aresden); }
.bd-side.e .bd-side-name { color: var(--elvine); }
.bd-side-stats { color: var(--text-dim); font-size: 11px; }

.bd-crest {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}
.bd-crest img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.bd-vs {
    color: var(--text);
    font-family: 'Cinzel', serif;
    font-size: 24px;
    letter-spacing: 4px;
    padding: 0 8px;
    white-space: nowrap;
}

.bd-strength-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--panel);
    overflow: hidden;
    display: flex;
    border: 1px solid var(--line-soft);
}

.bd-strength-fill.a { background: linear-gradient(90deg, var(--aresden), var(--aresden-glow)); }
.bd-strength-fill.e { background: linear-gradient(90deg, var(--elvine-glow), var(--elvine)); }

.bd-strength-pcts {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-dim);
}
.bd-strength-pcts .bd-trend-text { color: var(--text-muted); font-style: italic; }

.bd-params {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bd-param {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 4px;
    padding: 8px 10px;
}

.bd-param-label {
    color: var(--text-muted);
    font-size: 9px;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.bd-param-val {
    color: var(--gold);
    font-size: 13px;
    font-weight: 600;
}

.bd-zone-feed-list {
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bd-zone-feed-list .k {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 11px;
    padding: 5px 0;
    border-bottom: 1px solid var(--line-soft);
}

.bd-zone-feed-list .k:last-child { border-bottom: none; }
.bd-zone-feed-list .killer.a, .bd-zone-feed-list .victim.a { color: var(--aresden); }
.bd-zone-feed-list .killer.e, .bd-zone-feed-list .victim.e { color: var(--elvine); }
.bd-zone-feed-list .arrow { color: var(--text-muted); }
.bd-zone-feed-list .verb { color: var(--text-muted); font-style: italic; font-size: 11px; }
.bd-zone-feed-list .weapon { width: 18px; height: 18px; object-fit: contain; image-rendering: pixelated; flex-shrink: 0; }
.bd-zone-feed-list .time { margin-left: auto; color: var(--text-muted); font-size: 10px; }
.bd-zone-feed-list .empty { color: var(--text-muted); font-style: italic; padding: 12px 4px; text-align: center; }

.bd-recommend {
    flex: 1;
    color: var(--text-dim);
    font-size: 12px;
}
.bd-recommend strong { color: var(--gold); }

.bd-actions {
    display: flex;
    gap: 10px;
}

.bd-btn {
    border: 1px solid var(--gold-dim);
    background: transparent;
    color: var(--text);
    padding: 8px 16px;
    font-size: 11px;
    letter-spacing: 2px;
    border-radius: 4px;
    transition: background .12s, border-color .12s, color .12s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bd-btn:not(:disabled):hover {
    background: rgba(212,166,74,.12);
    border-color: var(--gold);
    color: var(--gold-hi);
}

.bd-btn-enter {
    background: var(--gold);
    color: #14110c;
    border-color: var(--gold);
}
.bd-btn-enter:not(:disabled):hover {
    background: var(--gold-hi);
}

.bd-btn-icon { margin-right: 2px; }

/* engagement clickable affordance */
#engagements .engagement {
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
#engagements .engagement:hover {
    background: rgba(212,166,74,.06);
    border-color: var(--gold-dim);
}

/* Top Combatants grid (Aresden | Elvine) */
.bd-tc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.bd-tc-col-head {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line-soft);
}
.bd-tc-col-head.a { color: var(--aresden); }
.bd-tc-col-head.e { color: var(--elvine); }
.bd-tc-row {
    display: grid;
    grid-template-columns: 18px 1fr auto auto;
    gap: 8px;
    align-items: center;
    font-size: 11px;
    padding: 4px 0;
    border-bottom: 1px solid var(--line-soft);
}
.bd-tc-row:last-child { border-bottom: none; }
.bd-tc-row .rank { color: var(--text-muted); font-weight: 600; }
.bd-tc-row .name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-tc-row .meta { color: var(--text-muted); font-size: 10px; }
.bd-tc-row .kills { color: var(--gold); font-weight: 600; }
.bd-tc-empty { color: var(--text-muted); font-style: italic; font-size: 11px; padding: 6px 0; text-align: center; }

/* Balance Timeline histogram */
.bd-tl-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 90px;
    padding: 4px 2px;
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 4px;
}
.bd-tl-bar {
    flex: 1 1 0;
    min-width: 4px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(0,0,0,.3);
    border-radius: 1px;
    overflow: hidden;
}
.bd-tl-bar .e {
    background: linear-gradient(180deg, var(--elvine-glow), var(--elvine));
}
.bd-tl-bar .a {
    background: linear-gradient(180deg, var(--aresden), var(--aresden-glow));
    margin-top: auto;
}
.bd-tl-axis {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
    letter-spacing: 1px;
}

/* ============== Music control (inline in titlebar) ============== */
#music-ctrl {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px 3px 4px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(212, 166, 74, 0.25);
    border-radius: 999px;
    user-select: none;
    transition: border-color 0.15s;
}
#music-ctrl:hover { border-color: rgba(212, 166, 74, 0.55); }
#music-ctrl.hidden { display: none; }

.music-btn {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    color: var(--gold);
    cursor: pointer;
    background: transparent;
    transition: color 0.15s;
    flex-shrink: 0;
    padding: 0;
}
.music-btn:hover { color: var(--gold-hi); }
.music-btn.muted { color: var(--gold-dim); }

#music-vol {
    -webkit-appearance: none;
    appearance: none;
    width: 64px;
    height: 3px;
    background: rgba(212, 166, 74, 0.22);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
#music-vol::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: var(--gold);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(212, 166, 74, 0.6);
    border: none;
}
#music-vol::-webkit-slider-thumb:hover { background: var(--gold-hi); }
#music-vol::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: var(--gold);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

/* ============== Restart prompt modal ============== */
#restart-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
}
#restart-overlay.hidden { display: none; }

/* ── Launch security-check modal (Play button) ─────────────────────────── */
#launch-check-overlay {
    position: fixed;
    inset: 0;
    z-index: 6000;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
}
#launch-check-overlay.hidden { display: none; }
#launch-check-panel {
    width: 430px;
    background: linear-gradient(180deg, #14110c 0%, #0a0907 100%);
    border: 1px solid var(--gold);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    position: relative;
    padding-bottom: 18px;
}
#launch-check-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--gold-hi) 50%, transparent 100%);
}
.launch-check-head {
    text-align: center;
    letter-spacing: 2px;
    font-size: 12px;
    color: var(--gold);
    padding: 12px 0 10px;
    border-bottom: 1px solid rgba(155, 125, 45, 0.25);
}
.launch-check-body {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px 16px;
}
.launch-check-gif {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    object-fit: contain;
}
.launch-check-text {
    font-size: 13px;
    line-height: 1.45;
    color: #d8c9a8;
}
.launch-check-bar {
    margin: 0 20px;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(155, 125, 45, 0.3);
    overflow: hidden;
}
#launch-check-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-hi) 100%);
    transition: width 0.2s ease;
}

#restart-panel {
    width: 360px;
    background: linear-gradient(180deg, #14110c 0%, #0a0907 100%);
    border: 1px solid var(--gold);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    position: relative;
}
#restart-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--gold-hi) 50%, transparent 100%);
}

.restart-head {
    background: linear-gradient(180deg, #1c1812 0%, #0a0907 100%);
    padding: 10px 16px;
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 4px;
    border-bottom: 1px solid var(--line);
}

.restart-body {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 22px 18px;
}

.restart-icon {
    width: 48px;
    height: 48px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background: rgba(212, 166, 74, 0.10);
    display: grid;
    place-items: center;
    color: var(--gold-hi);
    flex-shrink: 0;
    box-shadow: 0 0 18px rgba(212, 166, 74, 0.25);
}

.restart-title {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: var(--gold-hi);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.restart-msg {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.5;
}

.restart-foot {
    display: flex;
    justify-content: flex-end;
    padding: 10px 22px 18px;
}

.restart-btn {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dim) 100%);
    color: #0a0907;
    border: 1px solid var(--gold-hi);
    padding: 9px 26px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter 0.15s, transform 0.15s;
    box-shadow: 0 0 14px rgba(212, 166, 74, 0.35);
}
.restart-btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.restart-btn:active { transform: translateY(0); filter: brightness(0.95); }

/* ===== News & Patch Notes feed (left body column) — replaces the old map ===== */
#news-wrap {
    flex: 1;
    background: #0a0907;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    min-width: 0;
}
.news-header { display: flex; justify-content: space-between; align-items: baseline; }
.news-title {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 3px;
    font-weight: 700;
}
.news-title::before { content: '◆ '; color: var(--gold-dim); }
.news-feed {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}
.news-feed::-webkit-scrollbar { width: 8px; }
.news-feed::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.news-card {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    padding: 11px 14px;
}
.news-card .nc-date {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--gold-dim);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.news-card .nc-title {
    color: var(--text);
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 4px;
}
.news-card .nc-body {
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.45;
}

/* ===== News cards clickable + detail modal ===== */
.news-card { cursor: pointer; transition: border-color .15s, background .15s, transform .05s; }
.news-card:hover { border-left-color: var(--gold); background: #221c12; }
.news-card:hover .nc-more { color: var(--gold); }
.news-card:active { transform: translateY(1px); }
.nc-more {
    margin-top: 8px;
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--gold-dim);
}

#news-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}
#news-overlay.hidden { display: none; }
#news-panel {
    background: var(--panel-2);
    border: 1px solid var(--gold);
    border-radius: 6px;
    width: 600px;
    max-width: 90%;
    max-height: 80%;
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.news-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(0,0,0,.4);
}
.news-modal-head .nd-date {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--gold-dim);
    text-transform: uppercase;
    margin-bottom: 5px;
}
.news-modal-head h2 {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    color: var(--gold);
    letter-spacing: 1px;
    font-weight: 700;
}
.news-modal-body {
    padding: 18px 22px;
    overflow-y: auto;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.6;
}
.news-modal-body::-webkit-scrollbar { width: 8px; }
.news-modal-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.news-modal-body p { margin-bottom: 10px; color: var(--text); }
.news-modal-body ul { list-style: none; padding: 0; margin: 0; }
.news-modal-body li {
    position: relative;
    padding: 7px 0 7px 18px;
    border-bottom: 1px solid var(--line-soft);
}
.news-modal-body li:last-child { border-bottom: none; }
.news-modal-body li::before { content: '◆'; position: absolute; left: 0; color: var(--gold-dim); font-size: 9px; top: 9px; }
.news-modal-body b { color: var(--text); }

/* ===== Split Art + Panel layout (Concept C) ===== */
#body.split { display: flex; flex: 1; min-height: 0; }

#art-pane {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-width: 0;
    background: #120a08;
}
#art-pane .hero-image {
    background-position: center 30%;
    transform-origin: center 35%;
    will-change: transform;
    animation: art-kenburns 28s ease-in-out infinite alternate;
}
@keyframes art-kenburns {
    0%   { transform: scale(1.06) translate(0, 0); }
    50%  { transform: scale(1.14) translate(-1.4%, -1.2%); }
    100% { transform: scale(1.09) translate(1.2%, 0.8%); }
}
@media (prefers-reduced-motion: reduce) {
    #art-pane .hero-image { animation: none; }
}
.art-shade {
    position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(8,6,4,.15) 0%, transparent 35%, transparent 78%, rgba(8,6,4,.9) 100%),
        linear-gradient(180deg, rgba(8,6,4,.25) 0%, transparent 30%, transparent 55%, rgba(8,6,4,.92) 100%);
}
.art-overlay { position: absolute; left: 40px; bottom: 4px; right: 40px; pointer-events: none; text-align: center; }

/* Rotating info tips, centered over the hero art. */
.art-tips {
    position: absolute;
    left: 0; right: 0;
    top: 44%;
    transform: translateY(-50%);
    text-align: center;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity .6s ease;
    padding: 20px 30px;
    /* Square gradient band: solid-ish black in the middle, fading out to the
       sides (horizontal) and top/bottom (vertical) so it blends into the art. */
    background:
        linear-gradient(180deg, transparent 0%, rgba(0,0,0,.72) 35%, rgba(0,0,0,.72) 65%, transparent 100%),
        linear-gradient(90deg, transparent 0%, rgba(0,0,0,.72) 28%, rgba(0,0,0,.72) 72%, transparent 100%);
}
.art-tip-title {
    font-family: 'Medieval', 'Cinzel', serif;
    font-size: 30px;
    letter-spacing: 1px;
    color: var(--gold);
    text-shadow: 0 2px 12px rgba(0,0,0,.95), 0 0 20px rgba(0,0,0,.6);
    margin-bottom: 7px;
}
.art-tip-body {
    font-size: 13px;
    letter-spacing: .3px;
    color: #e0d6c2;
    line-height: 1.45;
    max-width: 520px;
    margin: 0 auto;
    text-shadow: 0 2px 10px rgba(0,0,0,.95), 0 0 16px rgba(0,0,0,.6);
}
.art-logo {
    font-family: 'Cinzel', serif;
    font-size: 44px;
    font-weight: 800;
    letter-spacing: 5px;
    color: #f2e7cc;
    text-shadow: 0 3px 18px rgba(0,0,0,.8);
    line-height: 1.05;
}
.art-logo span { color: var(--gold); }
.art-tagline {
    margin-top: 10px;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    letter-spacing: 4px;
    color: #d8cdb8;
    text-shadow: 0 2px 10px rgba(0,0,0,.8);
}

#panel {
    width: 380px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #14100a, #0c0907);
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.panel-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}
.panel-scroll::-webkit-scrollbar { width: 8px; }
.panel-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.panel-block { display: flex; flex-direction: column; gap: 8px; }
.panel-news-block { flex: 1; min-height: 0; }
.pb-label {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 3px;
    font-weight: 700;
}
.pb-label::before { content: '◆ '; color: var(--gold-dim); }
#panel .news-feed { flex: none; overflow: visible; padding-right: 0; }
#panel .crusade-countdown { padding: 4px 0 0; text-align: left; }

.panel-foot {
    border-top: 1px solid var(--line);
    background: rgba(0,0,0,.45);
    padding: 14px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}
.panel-actions { display: flex; align-items: center; gap: 8px; }
.panel-actions .pa-spacer { flex: 1; }
#panel .btn-play { width: 100%; justify-content: center; padding: 14px 0; font-size: 16px; }
#panel #progress-track { width: 100%; }

/* Logo image in the split-art overlay (replaces the big HELBREATH SACRIFICE text) */
.art-logo-img {
    display: block;
    width: auto;
    max-width: 94%;
    max-height: 260px;
    height: auto;
    margin: 0 auto 8px;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,.8));
}

/* ============================================================
 * Beta Mode UI (Login button + PLAY BETA + modal)
 * ============================================================ */
.play-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.play-row .btn-play { flex: 1; min-width: 160px; }

#beta-login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
#beta-login-panel {
    background: #1a1410;
    border: 1px solid rgba(200, 168, 55, 0.6);
    border-radius: 8px;
    width: 380px;
    max-width: 92%;
    box-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.beta-login-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(80,60,30,.6);
}
.beta-login-head h2 {
    margin: 0;
    font-size: 16px;
    color: #c8a837;
    letter-spacing: 1px;
}
.btn-modal-close {
    background: none;
    border: none;
    color: #c8a837;
    font-size: 18px;
    cursor: pointer;
    padding: 0 6px;
}
.btn-modal-close:hover { color: #ffd76b; }
.beta-login-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.beta-login-hint {
    font-size: 12px;
    color: #b8b8b8;
    margin: 0 0 6px 0;
    line-height: 1.4;
}
.beta-login-hint code {
    background: rgba(200, 168, 55, 0.15);
    padding: 1px 6px;
    border-radius: 3px;
    color: #ffd76b;
    font-family: 'Consolas', monospace;
}
.beta-login-body label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: #b0b0b0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.beta-login-body input[type="text"],
.beta-login-body input[type="password"] {
    background: #0c0a08;
    border: 1px solid rgba(80,60,30,.8);
    border-radius: 4px;
    padding: 8px 10px;
    color: #e8e8e8;
    font-size: 13px;
    outline: none;
}
.beta-login-body input:focus {
    border-color: rgba(200, 168, 55, 0.8);
}
.beta-login-error {
    font-size: 12px;
    color: #ff8080;
    background: rgba(200, 60, 60, 0.12);
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid rgba(200, 60, 60, 0.4);
}
#beta-login-submit { margin-top: 6px; }
.beta-remember-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    text-transform: none !important;
    color: #c8c8c8 !important;
    font-size: 12px !important;
    letter-spacing: 0 !important;
    cursor: pointer;
    user-select: none;
}
.beta-remember-row input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    accent-color: #c8a837;
}
