/* RuneCake brand crest, step banners and quest stepper */
/* ---------- Brand crest lockup ---------- */
.brand-lockup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.75rem, 3vw, 1.35rem);
    margin: 0 auto 1.1rem;
    flex-wrap: wrap;
}

.brand-lockup .crest {
    width: clamp(86px, 15vw, 132px);
    height: auto;
    flex: 0 0 auto;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(212, 175, 55, 0.3));
    animation: rsCrestGlow 6s ease-in-out infinite;
}

.brand-copy { text-align: left; min-width: 0; }

.brand-wordmark {
    font-family: 'MedievalSharp', cursive;
    font-size: clamp(1.35rem, 4.4vw, 2.15rem);
    line-height: 1.05;
    color: var(--parchment);
    letter-spacing: 0.06em;
    text-shadow: 0 2px 6px #000, 0 0 18px rgba(212, 175, 55, 0.35);
    margin: 0;
}

.brand-wordmark span { color: var(--gold); }

.brand-rule {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.45rem 0 0.35rem;
    color: var(--gold);
    opacity: 0.9;
}

.brand-rule::before, .brand-rule::after {
    content: '';
    height: 1px;
    width: clamp(18px, 5vw, 44px);
    background: linear-gradient(90deg, transparent, var(--gold));
}

.brand-rule::after { background: linear-gradient(90deg, var(--gold), transparent); }

.brand-rule i {
    width: 5px;
    height: 5px;
    transform: rotate(45deg);
    background: var(--gold);
    display: inline-block;
}

.brand-tagline {
    font-size: clamp(0.62rem, 1.9vw, 0.76rem);
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.85;
    margin: 0;
}

@keyframes rsCrestGlow {
    0%, 100% { filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 14px rgba(212, 175, 55, 0.24)); }
    50% { filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 26px rgba(212, 175, 55, 0.5)); }
}

@media (max-width: 520px) {
    .brand-lockup { flex-direction: column; text-align: center; }
    .brand-copy { text-align: center; }
}

/* ---------- Step-complete toasts ---------- */
.rs-toast-stack {
    position: fixed;
    right: clamp(0.75rem, 3vw, 1.5rem);
    bottom: clamp(0.75rem, 3vw, 1.5rem);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: min(370px, calc(100vw - 1.5rem));
    pointer-events: none;
}

.rs-toast {
    position: relative;
    pointer-events: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.7rem;
    align-items: start;
    overflow: hidden;
    padding: 0.8rem 0.85rem 0.85rem;
    background: linear-gradient(160deg, #3b2216 0%, #21120b 100%);
    border: 2px solid var(--gold);
    border-left-width: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.22);
    color: var(--parchment);
    font-family: 'Cinzel', serif;
    animation: rsToastIn 0.32s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}

.rs-toast.is-leaving { animation: rsToastOut 0.24s ease-in both; }

.rs-toast-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.14);
    border: 1px solid rgba(212, 175, 55, 0.5);
    font-size: 1rem;
    line-height: 1;
}

.rs-toast-body { min-width: 0; }

.rs-toast-title {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gold);
    letter-spacing: 0.03em;
}

.rs-toast-msg {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #ecd9a4;
    overflow-wrap: anywhere;
}

.rs-toast-msg a { color: var(--parchment); text-decoration: underline; }

.rs-toast-close {
    background: transparent;
    border: 0;
    color: var(--gold);
    opacity: 0.7;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.1rem 0.2rem;
    font-family: inherit;
}

.rs-toast-close:hover, .rs-toast-close:focus-visible { opacity: 1; }

.rs-toast-action {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--gold);
    color: var(--gold);
    background: transparent;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    cursor: pointer;
}

.rs-toast-action:hover, .rs-toast-action:focus-visible { background: var(--gold); color: var(--brown); }

.rs-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    transform-origin: left center;
    background: linear-gradient(90deg, var(--gold), var(--parchment));
    opacity: 0.75;
    animation: rsToastTimer linear forwards;
}

.rs-toast-steps {
    display: flex;
    gap: 4px;
    margin-top: 0.45rem;
}

.rs-toast-steps i {
    height: 4px;
    flex: 1;
    background: rgba(212, 175, 55, 0.22);
}

.rs-toast-steps i.done { background: var(--gold); }

.rs-toast--success { border-color: var(--green); border-left-color: var(--green); }
.rs-toast--success .rs-toast-icon { border-color: rgba(81, 207, 102, 0.6); background: rgba(81, 207, 102, 0.14); }
.rs-toast--success .rs-toast-title { color: var(--green); }

.rs-toast--error { border-color: var(--red); border-left-color: var(--red); }
.rs-toast--error .rs-toast-icon { border-color: rgba(255, 107, 107, 0.6); background: rgba(255, 107, 107, 0.14); }
.rs-toast--error .rs-toast-title { color: var(--red); }

.rs-toast--info { border-color: var(--gold); }

@keyframes rsToastIn {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes rsToastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(8px); }
}

@keyframes rsToastTimer {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* ---------- Quest stepper ---------- */
.quest-tracker {
    background: linear-gradient(160deg, rgba(59, 34, 22, 0.95), rgba(33, 18, 11, 0.95));
    border: 2px solid var(--border);
    border-left: 6px solid var(--gold);
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.quest-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.65rem;
}

.quest-kicker {
    font-family: 'MedievalSharp', cursive;
    font-size: 1.05rem;
    color: var(--gold);
}

.quest-progress { font-size: 0.75rem; letter-spacing: 0.08em; color: #ecd9a4; }

.quest-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.quest-step {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.5rem 0.55rem;
    border: 1px solid rgba(139, 115, 85, 0.45);
    background: rgba(0, 0, 0, 0.18);
    min-width: 0;
}

.quest-dot {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: #ecd9a4;
    font-size: 0.75rem;
    font-weight: 700;
}

.quest-text { display: block; min-width: 0; }
.quest-text strong { display: block; font-size: 0.78rem; color: var(--parchment); line-height: 1.3; }
.quest-text small { display: block; font-size: 0.68rem; color: var(--muted); line-height: 1.35; margin-top: 0.12rem; }

.quest-step.is-current { border-color: var(--gold); box-shadow: 0 0 14px rgba(212, 175, 55, 0.22); }
.quest-step.is-current .quest-dot { border-color: var(--gold); color: var(--gold); }

.quest-step.is-done { border-color: rgba(81, 207, 102, 0.55); }
.quest-step.is-done .quest-dot {
    border-color: var(--green);
    background: rgba(81, 207, 102, 0.16);
    color: var(--green);
}
.quest-step.is-done .quest-text strong { color: var(--green); }

@media (max-width: 640px) {
    .quest-steps { grid-template-columns: 1fr; }
}

/* ================================================================
   PRIMARY NAVIGATION — the remote
   A compact keypad of page keys plus LCD-style live readouts, so
   every page is one press away. Collapses into a two-column keypad
   below 1280px.
   ================================================================ */
.header.rs-navbar {
    position: sticky;
    top: 0;
    z-index: 880;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: clamp(0.5rem, 1.2vw, 0.9rem);
    padding: 0.5rem clamp(0.65rem, 1.8vw, 1.2rem);
    background:
        linear-gradient(180deg, rgba(35, 21, 14, 0.97) 0%, rgba(24, 14, 9, 0.95) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.42);
    box-shadow:
        0 12px 34px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(245, 230, 168, 0.13);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
    animation: none;
}

.header.rs-navbar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg,
        transparent 0%, rgba(212, 175, 55, 0.7) 22%,
        rgba(245, 230, 168, 0.95) 50%, rgba(212, 175, 55, 0.7) 78%, transparent 100%);
}

.header.rs-navbar .logo {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    letter-spacing: 0.04em;
    color: #f2dfa0;
    text-decoration: none;
    text-shadow: 0 2px 5px #000, 0 0 16px rgba(212, 175, 55, 0.35);
    white-space: nowrap;
}

.header.rs-navbar .logo:hover { color: #fff4c9; }

.header.rs-navbar #navAuth { display: contents; }

.header.rs-navbar .nav {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.55rem;
    min-width: 0;
}

/* ---- The keypad ---- */
.rs-nav-main,
.rs-nav-side {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
}

.rs-nav-main {
    gap: 0.26rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0.26rem;
    border: 1px solid rgba(255, 226, 140, 0.16);
    border-radius: 16px;
    background: linear-gradient(180deg, #120c07 0%, #22160e 100%);
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.75),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        0 1px 0 rgba(255, 255, 255, 0.04);
}

.rs-nav-side {
    margin-left: 0;
    gap: 0.4rem;
}

.header.rs-navbar .rs-nav-main a {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    flex: 0 0 auto;
    min-width: 60px;
    padding: 0.4rem 0.5rem 0.34rem;
    border: 1px solid rgba(255, 226, 140, 0.22);
    border-radius: 11px;
    background: linear-gradient(180deg, #3a291b 0%, #25180f 55%, #1a1009 100%);
    color: #e8d49b;
    font-family: 'Cinzel', serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.05;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 rgba(255, 246, 207, 0.13),
        inset 0 -1px 0 rgba(0, 0, 0, 0.6),
        0 2px 0 #0b0704,
        0 4px 8px rgba(0, 0, 0, 0.32);
    transition: transform 0.16s var(--ease-out, ease), box-shadow 0.16s,
                background 0.16s, border-color 0.16s, color 0.16s;
}

.rs-nav-icon {
    font-size: 1.08rem;
    line-height: 1;
    filter: drop-shadow(0 1px 1px #000) saturate(0.9);
}

.rs-nav-label {
    font-size: 0.76rem;
    line-height: 1.05;
}

.header.rs-navbar .rs-nav-main a:hover,
.header.rs-navbar .rs-nav-main a:focus-visible {
    color: #fff6cf;
    border-color: rgba(255, 232, 161, 0.55);
    background: linear-gradient(180deg, #493322 0%, #2c1d12 55%, #1d120a 100%);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 246, 207, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.6),
        0 3px 0 #0b0704,
        0 7px 12px rgba(0, 0, 0, 0.4),
        0 0 14px rgba(212, 175, 55, 0.16);
}

.header.rs-navbar .rs-nav-main a.is-active {
    color: #2a1809;
    border-color: #fff3c1;
    background: linear-gradient(180deg, #fff6cf 0%, #f0d477 38%, #d4af37 100%);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    box-shadow:
        inset 0 1px 0 #fffbe6,
        inset 0 -2px 0 rgba(94, 63, 8, 0.4),
        0 2px 0 #6b4d0d,
        0 0 18px rgba(255, 214, 110, 0.42);
}

.header.rs-navbar .rs-nav-main a.is-active .rs-nav-icon {
    filter: none;
}

/* ---- LCD-style live readouts ---- */
.header.rs-navbar .rs-nav-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.06rem;
    flex: 0 0 auto;
    min-width: 144px;
    min-height: 54px;
    padding: 0.34rem 0.6rem 0.38rem;
    border: 1px solid rgba(255, 226, 140, 0.24);
    border-radius: 10px;
    background:
        radial-gradient(120% 160% at 50% 0%, rgba(81, 207, 102, 0.1), transparent 62%),
        #0b0906;
    color: #d9f5c0;
    text-decoration: none;
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.85),
        0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.18s, box-shadow 0.18s;
}

.header.rs-navbar .rs-nav-screen:hover,
.header.rs-navbar .rs-nav-screen:focus-visible {
    border-color: rgba(255, 232, 161, 0.6);
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.85),
        0 0 14px rgba(212, 175, 55, 0.18);
}

.header.rs-navbar .rs-nav-screen.is-active {
    border-color: rgba(184, 245, 160, 0.7);
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.85),
        0 0 16px rgba(81, 207, 102, 0.28);
}

.rs-screen-top {
    display: flex;
    align-items: center;
    gap: 0.24rem;
    color: #d8bd60;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.05;
    text-transform: uppercase;
    white-space: nowrap;
}

.rs-screen-value {
    color: #b8f5a0;
    font-family: 'Cinzel', serif;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 0 8px rgba(81, 207, 102, 0.5);
    white-space: nowrap;
}

.rs-screen-meta {
    display: block;
    max-width: 150px;
    overflow: hidden;
    color: #a8c593;
    font-size: 0.68rem;
    letter-spacing: 0.01em;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Account readout ---- */
.header.rs-navbar .rs-nav-chip {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.08rem;
    flex: 0 0 auto;
    min-width: 0;
    min-height: 54px;
    padding: 0.34rem 0.6rem 0.38rem;
    border: 1px solid rgba(81, 207, 102, 0.3);
    border-radius: 10px;
    background:
        radial-gradient(120% 160% at 50% 0%, rgba(81, 207, 102, 0.09), transparent 62%),
        #0b0906;
    color: #f5e6a8;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    line-height: 1.1;
    text-decoration: none;
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.85),
        0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.18s, box-shadow 0.18s;
}

.header.rs-navbar .rs-nav-chip:hover,
.header.rs-navbar .rs-nav-chip:focus-visible {
    border-color: rgba(81, 207, 102, 0.65);
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.85),
        0 0 15px rgba(81, 207, 102, 0.2);
}

.rs-chip-top {
    display: block;
    max-width: 118px;
    overflow: hidden;
    color: #a9e6b6;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rs-chip-value {
    display: flex;
    align-items: baseline;
    gap: 0.18rem;
    color: #f5e6a8;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.rs-chip-value strong {
    color: #e9ffd9;
    font-size: 0.98rem;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 8px rgba(81, 207, 102, 0.4);
}

.rs-chip-value em {
    font-style: normal;
    font-size: 0.62rem;
    color: #a9e6b6;
}

/* ---- Spin key ---- */
.header.rs-navbar .rs-nav-spin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0.58rem 0.82rem;
    border: 1px solid #f5e6a8;
    border-radius: 10px;
    background: linear-gradient(180deg, #f8eab5 0%, #d4af37 48%, #b8941f 100%);
    color: #2d1810;
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 #fffbe6,
        inset 0 -2px 0 rgba(94, 63, 8, 0.4),
        0 2px 0 #6b4d0d,
        0 4px 10px rgba(0, 0, 0, 0.35),
        0 0 16px rgba(212, 175, 55, 0.26);
    transition: transform 0.16s var(--ease-out, ease), box-shadow 0.16s;
}

.header.rs-navbar .rs-nav-spin:hover,
.header.rs-navbar .rs-nav-spin:focus-visible {
    color: #1d0f08;
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 #fffbe6,
        inset 0 -2px 0 rgba(94, 63, 8, 0.4),
        0 3px 0 #6b4d0d,
        0 7px 14px rgba(0, 0, 0, 0.4),
        0 0 24px rgba(212, 175, 55, 0.5);
}

/* ---- Guest auth + leave key ---- */
.rs-nav-auth {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.header.rs-navbar .rs-nav-auth a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.55rem 0.72rem;
    border: 1px solid rgba(255, 226, 140, 0.38);
    border-radius: 10px;
    background: linear-gradient(180deg, #33241a 0%, #1a1009 100%);
    color: #e8d49b;
    font-family: 'Cinzel', serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 rgba(255, 246, 207, 0.12),
        0 2px 0 #0b0704;
    transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.16s;
}

.rs-nav-auth a:hover,
.rs-nav-auth a:focus-visible {
    color: #fff6cf;
    border-color: rgba(255, 232, 161, 0.7);
    background: linear-gradient(180deg, #493322 0%, #24170e 100%);
    transform: translateY(-1px);
}

.rs-nav-auth a.is-primary {
    border-color: #fff3c1;
    background: linear-gradient(180deg, #fff6cf 0%, #f0d477 38%, #d4af37 100%);
    color: #2a1809;
}

.rs-nav-auth a.is-primary:hover,
.rs-nav-auth a.is-primary:focus-visible {
    color: #1d0f08;
    background: linear-gradient(180deg, #fffbe6 0%, #f8eab5 38%, #e0bc45 100%);
}

.header.rs-navbar .rs-nav-logout {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0.55rem 0.64rem;
    border: 1px solid rgba(139, 115, 85, 0.7);
    border-radius: 10px;
    background: linear-gradient(180deg, #2a1c12 0%, #170e08 100%);
    color: #d8bd60;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 246, 207, 0.08), 0 2px 0 #0b0704;
    transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.16s;
}

.header.rs-navbar .rs-nav-logout:hover,
.header.rs-navbar .rs-nav-logout:focus-visible {
    border-color: rgba(255, 107, 107, 0.6);
    background: rgba(255, 107, 107, 0.08);
    color: #ffb3b3;
    box-shadow: none;
}

/* ---- Remote power key / menu toggle ---- */
.rs-nav-toggle {
    display: none;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    padding: 0.58rem 0.78rem;
    border: 1px solid rgba(255, 226, 140, 0.45);
    border-radius: 12px;
    background: linear-gradient(180deg, #3a291b 0%, #1a1009 100%);
    color: #f0dfa4;
    font-family: 'Cinzel', serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 246, 207, 0.14),
        0 2px 0 #0b0704,
        0 4px 8px rgba(0, 0, 0, 0.32);
}

.rs-nav-toggle::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #51cf66;
    box-shadow: 0 0 7px rgba(81, 207, 102, 0.85);
}

.rs-nav-toggle[aria-expanded="true"]::before {
    background: #ff6b6b;
    box-shadow: 0 0 7px rgba(255, 107, 107, 0.85);
}

.rs-nav-toggle:hover,
.rs-nav-toggle:focus-visible {
    border-color: #d4af37;
    background: linear-gradient(180deg, #493322 0%, #24170e 100%);
}

.rs-nav-toggle-icon {
    font-size: 1rem;
    line-height: 1;
}

/* ---- Shared keyboard focus ring ---- */
.header.rs-navbar .rs-nav-main a:focus-visible,
.header.rs-navbar .rs-nav-screen:focus-visible,
.header.rs-navbar .rs-nav-spin:focus-visible,
.header.rs-navbar .rs-nav-auth a:focus-visible,
.header.rs-navbar .rs-nav-logout:focus-visible,
.rs-nav-toggle:focus-visible {
    outline: 2px solid #fff3c1;
    outline-offset: 2px;
}

@keyframes rsNavCtaGlow {
    0%, 100% { box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35), 0 0 14px rgba(212, 175, 55, 0.28); }
    50% { box-shadow: 0 3px 14px rgba(0, 0, 0, 0.38), 0 0 26px rgba(212, 175, 55, 0.55); }
}

/* ================================================================
   The remote opens into a two-column keypad below 1280px
   ================================================================ */
@media (max-width: 1279px) {
    .header.rs-navbar { flex-wrap: wrap; }

    .rs-nav-toggle { display: inline-flex; }

    .header.rs-navbar .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 0.5rem;
        width: 100%;
        max-height: calc(100vh - 62px);
        padding: 0.7rem clamp(0.65rem, 2vw, 1.2rem) 0.9rem;
        overflow-y: auto;
        background: linear-gradient(180deg, rgba(35, 21, 14, 0.99), rgba(19, 11, 7, 0.99));
        border-bottom: 2px solid rgba(212, 175, 55, 0.62);
        box-shadow: 0 22px 38px rgba(0, 0, 0, 0.62);
    }

    .header.rs-navbar .nav.open { display: flex; }

    .rs-nav-main {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 0.4rem;
        padding: 0.42rem;
        border-radius: 14px;
    }

    .header.rs-navbar .rs-nav-main a {
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.5rem;
        width: 100%;
        min-height: 50px;
        padding: 0.58rem 0.7rem;
        font-size: 0.78rem;
    }

    .header.rs-navbar .rs-nav-main a:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .rs-nav-icon { font-size: 1.2rem; }

    .rs-nav-label { font-size: 0.78rem; line-height: 1.15; min-width: 0; }

    .rs-nav-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        margin-left: 0;
        gap: 0.45rem;
        padding-top: 0.55rem;
        border-top: 1px solid rgba(139, 115, 85, 0.35);
    }

    .header.rs-navbar .rs-nav-screen {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        min-height: 58px;
        padding: 0.5rem 0.7rem;
    }

    .rs-screen-top { font-size: 0.68rem; }
    .rs-screen-value { font-size: 1rem; }
    .rs-screen-meta { max-width: none; font-size: 0.68rem; }

    .header.rs-navbar .rs-nav-account {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 58px;
        padding: 0.5rem 0.7rem;
    }

    .rs-chip-top { max-width: none; font-size: 0.66rem; }
    .rs-chip-value strong { font-size: 1.05rem; }

    .header.rs-navbar .rs-nav-spin {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 48px;
        padding: 0.7rem 0.9rem;
        font-size: 0.86rem;
    }

    .header.rs-navbar .rs-nav-auth {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 0.45rem;
    }

    .header.rs-navbar .rs-nav-auth a {
        width: 100%;
        min-height: 46px;
        font-size: 0.84rem;
    }

    .header.rs-navbar .rs-nav-logout {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 44px;
        font-size: 0.78rem;
    }
}

@media (max-width: 380px) {
    .rs-nav-main { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .header.rs-navbar {
        gap: 0.4rem;
        padding: 0.5rem 0.65rem;
    }

    .header.rs-navbar .logo { font-size: 0.98rem; }

    .rs-nav-toggle {
        padding: 0.56rem 0.68rem;
        font-size: 0.74rem;
    }

    .rs-nav-toggle-icon { font-size: 1.15rem; }

    .rs-nav-toggle-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .rs-nav-spin { animation: none; }
}
