/* =====================================================================
   Realm Panel - Daily Briefing Overlay
   Covers the same bounding box as #viewport, sits above the map (z 1)
   but below the right sidebar (z 2000) and header chrome (z 3000).
   ===================================================================== */
/* Realm panel - solid dark base; banner element scrolls with content */
#realm-panel {
}
.rp-banner {
    position: relative;
    width: 100%;
    height: 1000px;
    margin-bottom: -1000px; /* pulls following content up to overlap */
    background: #05070a url(/assets/screen-realm-DAWoQNrv.avif) left top/contain no-repeat;
    background-size: auto 315px;
    pointer-events: none;
    flex-shrink: 0;
}
.rp-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 6, 10, 0.35) 0%, #080b10 30%);
}
#realm-panel.realm-panel--open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
    transition:
        opacity 0.22s ease,
        transform 0.22s ease;
}

/* Inner content wrapper */
.rp-inner {
    position: relative;
    z-index: 1;
    margin-top: -420px;
    max-width: var(--content-max-w);
    margin-left: auto;
    margin-right: auto;
    padding: var(--space-xl) clamp(var(--space-lg), 5vw, 4.5rem) var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* ── Section wrapper ─────────────────────────────────────────────── */
.rp-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

#rp-tab-dispatch .rp-section {
    margin-top: 4rem;
}
/* .panel-section-title - canonical definition moved to base.css */

/* ── Daily rewards strip ─────────────────────────────────────────── */
.rp-daily-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-xs);
}
.rp-daily-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 4px 6px;
    border-radius: 6px;
    border: 1px solid rgba(197, 160, 89, 0.18);
    background: rgba(0, 0, 0, 0.25);
    position: relative;
    cursor: default;
    transition: border-color 0.2s;
}
.rp-daily-day--today {
    border-color: rgba(197, 160, 89, 0.75);
    background: rgba(197, 160, 89, 0.08);
}
.rp-daily-day--claimed {
    border-color: rgba(74, 165, 100, 0.35);
    background: rgba(74, 165, 100, 0.07);
    opacity: 0.8;
}
.rp-daily-day--claimed .rp-daily-icon {
    opacity: 0.5;
}
.rp-daily-day--claimed .rp-daily-reward {
    opacity: 0.4;
}
.rp-daily-claimed-badge {
    margin-top: 2px;
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #4aa564;
    background: rgba(74, 165, 100, 0.14);
    border: 1px solid rgba(74, 165, 100, 0.35);
    border-radius: 3px;
    padding: 2px 6px;
    animation: claimed-pop 0.25s ease-out;
}
@keyframes claimed-pop {
    from {
        transform: scale(0.75);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
.rp-daily-day--locked {
    opacity: 0.3;
}
.rp-daily-label {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(197, 160, 89, 0.6);
}
.rp-daily-icon {
    font-size: var(--font-size-2xl);
    line-height: 1;
}
.rp-daily-reward {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    color: #a89070;
    text-align: center;
}
.rp-daily-claim-btn {
    margin-top: 2px;
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(197, 160, 89, 0.18);
    color: var(--gold);
    border: 1px solid rgba(197, 160, 89, 0.45);
    border-radius: 3px;
    padding: 2px 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.rp-daily-claim-btn:hover {
    background: rgba(197, 160, 89, 0.32);
}

/* ── Hero header ─────────────────────────────────────────────────── */
.rp-hero {
    padding-bottom: 0;
    position: relative;
    margin-bottom: 4rem;
}
.rp-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
}

/* Remove browser number-input spinners globally */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type='number'] {
    -moz-appearance: textfield;
    appearance: textfield;
}
.rp-eyebrow {
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    letter-spacing: 0.24em;
    color: rgb(197 160 89 / 65%);
    text-transform: uppercase;
    text-shadow: 2px 2px 4px #090e14;
    margin-bottom: 10px;
}
.rp-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-5xl);
    font-weight: bold;
    letter-spacing: 0.01em;
    margin: 0 0 6px;
    line-height: 1.15;
    background: linear-gradient(135deg, #fef2b3, #e7a800 66%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.rp-subtitle {
    font-family: var(--font-body);
    font-size: var(--font-size-xl);
    font-style: italic;
    color: #9a8c78;
    line-height: 1.4;
    margin-bottom: 6px;
}
.rp-summary {
    font-family: var(--font-body);
    font-size: var(--font-size-lg);
    color: #4a5568;
    line-height: 1.6;
    max-width: 600px;
}

/* ── Featured event card ─────────────────────────────────────────── */
.rp-featured-event {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 3px;
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    transition: background 0.15s;
    cursor: default;
}
.rp-featured-event:hover {
    background: rgba(255, 255, 255, 0.05);
}
.rp-feat-icon {
    font-size: var(--font-size-3xl);
    flex-shrink: 0;
    margin-top: 1px;
}
.rp-feat-body {
    flex: 1;
    min-width: 0;
}
.rp-feat-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 6px;
}
.rp-feat-title {
    font-family: var(--font-body);
    font-size: var(--font-size-xl);
    font-weight: bold;
    color: #e8dcc8;
    flex: 1;
}
.rp-feat-badge {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    letter-spacing: 0.12em;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 2px;
    flex-shrink: 0;
}
.rp-feat-badge--new {
    background: rgba(165, 74, 74, 0.3);
    color: #e07070;
    border: 1px solid rgba(165, 74, 74, 0.5);
}
.rp-feat-desc {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: #6a7585;
    line-height: 1.55;
    margin-bottom: 8px;
}
.rp-feat-time {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: #363e4a;
}

/* ── Smaller event rows ──────────────────────────────────────────── */
.rp-events {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}
.rp-event-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 11px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.14s;
}
.rp-event-row:last-child {
    border-bottom: none;
}
.rp-event-row:hover {
    background: rgba(197, 160, 89, 0.04);
}
.rp-event-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.rp-event-dot--warn {
    background: var(--gold);
    box-shadow: 0 0 6px rgba(197, 160, 89, 0.5);
}
.rp-event-dot--info {
    background: #4a7fa5;
    box-shadow: 0 0 6px rgba(74, 127, 165, 0.4);
}
.rp-event-dot--alert {
    background: #a54a4a;
    box-shadow: 0 0 6px rgba(165, 74, 74, 0.4);
}
.rp-event-text {
    flex: 1;
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: #6a7585;
    line-height: 1.4;
}
.rp-event-text strong {
    color: #b8c4d0;
    font-weight: normal;
}
.rp-event-time {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: #2e3644;
    white-space: nowrap;
}

/* ── Big 3-stat strip ────────────────────────────────────────────── */
.rp-stat-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}
.rp-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 3px;
    padding: 22px 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
    overflow: hidden;
    transition: border-color 0.15s;
}
.rp-stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.rp-stat-card:hover {
    border-color: rgba(197, 160, 89, 0.2);
}
.rp-stat-num {
    font-family: var(--font-body);
    font-size: var(--font-size-4xl);
    font-weight: bold;
    color: #e8dcc8;
    letter-spacing: 0.02em;
    line-height: 1;
    position: relative;
}
.rp-stat-label {
    font-family: var(--font-body);
    font-size: var(--font-size-lg);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(197, 160, 89, 0.45);
    position: relative;
}
.rp-stat-sub {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: #2e3644;
    text-align: center;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

/* ── Captain's Orders recommendation cards ──────────────────────── */
.rp-orders-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid #1e1d19;
    margin-bottom: 20px;
}
.rp-orders-count {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: rgba(197, 160, 89, 0.45);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.rp-order-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.rp-order-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    transition:
        background 0.15s,
        border-color 0.15s;
}
.rp-order-card:hover {
    background: rgba(255, 255, 255, 0.055);
}
.rp-order-card--primary {
    border-color: rgba(197, 160, 89, 0.3);
    background: rgba(197, 160, 89, 0.04);
    padding: 16px 16px 14px;
}
.rp-order-card--primary:hover {
    background: rgba(197, 160, 89, 0.07);
}
.rp-order-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}
.rp-order-title {
    font-family: var(--font-body);
    font-size: var(--font-size-xl);
    font-weight: bold;
    color: #e8dcc8;
    flex: 1;
    min-width: 0;
}
.rp-order-card--primary .rp-order-title {
    font-size: var(--font-size-xl);
    color: #f0e8d0;
}
.rp-order-type-badge {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 2px;
    font-weight: bold;
    flex-shrink: 0;
}
.rp-order-type--progression {
    background: rgba(197, 160, 89, 0.12);
    color: var(--gold);
    border: 1px solid rgba(197, 160, 89, 0.3);
}
.rp-order-type--exploration {
    background: rgba(74, 181, 181, 0.1);
    color: #4ab5b5;
    border: 1px solid rgba(74, 181, 181, 0.3);
}
.rp-order-type--economy {
    background: rgba(74, 165, 100, 0.1);
    color: #4aa564;
    border: 1px solid rgba(74, 165, 100, 0.3);
}
.rp-order-type--activity {
    background: rgba(104, 144, 212, 0.1);
    color: #6890d4;
    border: 1px solid rgba(104, 144, 212, 0.3);
}
.rp-order-desc {
    font-family: var(--font-body);
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
}
.rp-order-card--primary .rp-order-desc {
    color: rgba(255, 255, 255, 0.55);
}
.rp-order-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-top: 2px;
}
.rp-order-progress {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: rgba(197, 160, 89, 0.5);
    letter-spacing: 0.05em;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rp-order-cta {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: bold;
    padding: 5px 12px;
    border-radius: 2px;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background 0.15s,
        color 0.15s;
    border: 1px solid rgba(197, 160, 89, 0.6);
    background: transparent;
    color: var(--gold);
}
.rp-order-cta:hover {
    background: rgba(197, 160, 89, 0.15);
}
.rp-order-card--primary .rp-order-cta {
    background: rgba(197, 160, 89, 0.85);
    border-color: transparent;
    color: #1a1200;
}
.rp-order-card--primary .rp-order-cta:hover {
    background: var(--gold);
}
.rp-order-empty {
    font-family: var(--font-body);
    font-size: var(--font-size-lg);
    color: #3a4050;
    font-style: italic;
}

/* ── Events feed ──────────────────────────────────────────────────── */
.rp-event-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.12s;
    content-visibility: auto;
    contain-intrinsic-size: auto 40px;
}
.rp-event-row:hover {
    background: rgba(255, 255, 255, 0.03);
}
.rp-event--unread {
    border-left: 2px solid var(--gold);
}
.rp-event-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    min-width: 0;
}
.rp-event-title {
    font-size: var(--font-size-md);
    color: #c8d0da;
    font-weight: 500;
}
.rp-event--unread .rp-event-title {
    color: #f0e0b0;
    font-weight: 600;
}
.rp-event-body {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.35);
}
.rp-event-age {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    margin-top: 2px;
}

@media (max-width: 640px) {
    .rp-stat-strip {
        grid-template-columns: 1fr;
    }
}
