@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

body.panel-theme {
    --font-display: "Fraunces", serif;
    --font-body: "IBM Plex Sans", system-ui, sans-serif;
    --font-ui: var(--font-body);
    font-family: var(--font-body);
    color: #182126;
    background:
        radial-gradient(circle at top left, rgba(201, 137, 66, 0.22), transparent 28%),
        radial-gradient(circle at top right, rgba(38, 117, 122, 0.14), transparent 24%),
        linear-gradient(180deg, #f7f2e8 0%, #f4efe4 46%, #e9dec8 100%);
    padding: 24px 18px 80px;
}

body.panel-theme::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(24, 33, 38, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 33, 38, 0.03) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at center, black 52%, transparent 92%);
}

body.panel-theme .container {
    position: relative;
    z-index: 1;
    max-width: 1260px;
}

body.panel-theme header,
body.panel-theme .login-section,
body.panel-theme .journey-panel,
body.panel-theme .mission-card,
body.panel-theme .modal-content,
body.panel-theme .story-section,
body.panel-theme .action-section,
body.panel-theme .validation-section,
body.panel-theme .feedback-section,
body.panel-theme #gps-status,
body.panel-theme .simulate-popup {
    background: rgba(255, 251, 245, 0.84);
    border: 1px solid rgba(24, 33, 38, 0.1);
    box-shadow: 0 18px 48px rgba(24, 33, 38, 0.12);
    backdrop-filter: blur(10px);
}

body.panel-theme .login-section {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
    gap: 20px;
    max-width: 1320px;
    margin: 0 0 24px;
    padding: 28px;
    border-radius: 28px;
    text-align: left;
}

body.panel-theme .login-section::after {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(177, 77, 47, 0.18), transparent 65%);
}

body.panel-theme .login-copy,
body.panel-theme .login-aside {
    position: relative;
    z-index: 1;
}

body.panel-theme .brand-mark {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
}

body.panel-theme .brand-mark img {
    width: 56px;
    height: 56px;
}

body.panel-theme .login-eyebrow,
body.panel-theme .header-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #26757a;
    font-family: var(--font-ui);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

body.panel-theme .login-eyebrow::before,
body.panel-theme .header-kicker::before {
    content: "";
    width: 44px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #c98942, #b8503a);
}

body.panel-theme .login-title {
    margin: 12px 0 12px;
    max-width: 13ch;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

body.panel-theme .login-title .accent {
    color: #b8503a;
}

body.panel-theme .login-intro {
    max-width: 56ch;
    color: #42515a;
    font-size: 1.02rem;
    line-height: 1.65;
}

body.panel-theme .login-form {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

body.panel-theme input {
    min-height: 56px;
    border: var(--border, 1px solid rgba(104, 77, 48, 0.12));
    border-radius: 999px;
    background: #fffdf9;
    box-shadow: none;
}

body.panel-theme input:focus {
    outline: 2px solid rgba(177, 77, 47, 0.16);
    border-color: #b8503a;
}

body.panel-theme #playerName {
    flex: 1 1 240px;
}

body.panel-theme button {
    min-height: 48px;
    border-radius: 999px;
    padding: 12px 18px;
    font-family: var(--font-ui);
    font-weight: 700;
    background: linear-gradient(135deg, #b8503a 0%, #8f3828 100%);
    box-shadow: 0 12px 26px rgba(177, 77, 47, 0.24);
}

body.panel-theme .login-actions button {
    min-width: 180px;
}

body.panel-theme .login-pills,
body.panel-theme .login-metrics,
body.panel-theme .badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.panel-theme .login-pills {
    margin-top: 22px;
}

body.panel-theme .utility-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

body.panel-theme .utility-links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(24, 33, 38, 0.1);
    background: rgba(255, 255, 255, 0.58);
    color: #182126;
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
}

body.panel-theme .utility-links a:hover {
    transform: translateY(-1px);
}

body.panel-theme .pill,
body.panel-theme .badge,
body.panel-theme .route-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(24, 33, 38, 0.1);
    color: #42515a;
    font-size: 0.92rem;
}

body.panel-theme .badge {
    background: rgba(38, 117, 122, 0.1);
    color: #26757a;
}

body.panel-theme .login-aside {
    display: grid;
    gap: 16px;
    align-content: start;
}

body.panel-theme .aside-card {
    background: rgba(255, 251, 245, 0.84);
    border-radius: 22px;
    padding: 18px;
    border: var(--border, 1px solid rgba(104, 77, 48, 0.12));
    box-shadow: 0 18px 44px rgba(70, 45, 20, 0.16);
}

body.panel-theme .aside-label {
    margin-bottom: 8px;
    color: #42515a;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.panel-theme .aside-copy {
    margin: 0 0 14px;
    color: #42515a;
    line-height: 1.55;
}

.aside-title {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: 1.8rem;
    line-height: 1;
}

.route-track {
    position: relative;
    height: 150px;
}

.route-track svg {
    width: 100%;
    height: 100%;
}

.route-node {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 4px solid #f7f2e8;
    box-shadow: 0 0 0 1px rgba(24, 33, 38, 0.14);
}

.route-node.node-a {
    top: 14px;
    left: 20px;
    background: #26757a;
}

.route-node.node-b {
    top: 58px;
    right: 42px;
    background: #c98942;
}

.route-node.node-c {
    bottom: 18px;
    left: 110px;
    background: #b8503a;
}

body.panel-theme .metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.panel-theme .metric {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.62);
    border: var(--border, 1px solid rgba(104, 77, 48, 0.12));
}

.metric strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
}

.metric span {
    color: #42515a;
    font-size: 0.92rem;
}

body.panel-theme header {
    padding: 20px;
    border-radius: 24px;
    margin-bottom: 20px;
}

body.panel-theme .header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

body.panel-theme .header-brand img {
    width: 54px;
    height: 54px;
}

body.panel-theme h1 {
    margin: 18px 0 12px;
}

body.panel-theme .header-subtitle,
body.panel-theme .journey-copy,
body.panel-theme .journey-meta,
body.panel-theme .progress-info,
body.panel-theme .feedback-copy,
body.panel-theme .app-footer,
body.panel-theme .player-role {
    color: #42515a;
}

body.panel-theme .header-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

body.panel-theme .header-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(24, 33, 38, 0.1);
    background: rgba(255, 255, 255, 0.56);
    color: #182126;
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
}

body.panel-theme .journey-panel,
body.panel-theme .mission-card,
body.panel-theme .modal-content {
    border-radius: 22px;
}

body.panel-theme .game-tabs,
body.panel-theme .mission-focus-banner {
    background: rgba(255, 251, 245, 0.88);
    border: 1px solid rgba(24, 33, 38, 0.1);
    box-shadow: 0 18px 40px rgba(24, 33, 38, 0.12);
    backdrop-filter: blur(10px);
}

body.panel-theme .game-tab-button {
    font-family: var(--font-ui);
    font-weight: 700;
}

body.panel-theme .game-tab-button.active {
    background: linear-gradient(135deg, #b8503a 0%, #8f3828 100%);
    color: #fff8f2;
    box-shadow: 0 12px 24px rgba(177, 77, 47, 0.22);
}

body.panel-theme .section-head-copy p,
body.panel-theme .mission-focus-copy {
    color: #42515a;
}

body.panel-theme .button-secondary {
    background: rgba(255, 255, 255, 0.68);
    color: #182126;
    border-color: rgba(24, 33, 38, 0.12);
}

body.panel-theme .mission-focus-label {
    color: #26757a;
}

body.panel-theme .mission-focus-title {
    color: #182126;
    font-family: var(--font-display);
    font-size: 1.45rem;
}

body.panel-theme .modal-topbar {
    border-bottom: 1px solid rgba(24, 33, 38, 0.08);
    padding-bottom: 12px;
}

body.panel-theme .journey-item {
    border-left: 4px solid #b8503a;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    border: var(--border, 1px solid rgba(104, 77, 48, 0.12));
}

body.panel-theme .journey-time {
    color: #b8503a;
}

body.panel-theme .mission-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 251, 245, 0.84);
    padding: 20px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

body.panel-theme .mission-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, #d79e2b 0%, #b14d2f 100%);
}

body.panel-theme .mission-card:hover {
    transform: translateY(-1px);
}

body.panel-theme .mission-card.completed {
    background: rgba(241, 247, 238, 0.9);
}

body.panel-theme .mission-card.active {
    background: linear-gradient(145deg, rgba(255, 224, 191, 0.96), rgba(240, 139, 87, 0.94));
    border-color: rgba(198, 90, 45, 0.34);
    box-shadow: 0 22px 42px rgba(207, 101, 41, 0.18);
}

body.panel-theme .mission-status {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 10px;
}

body.panel-theme .status-locked { background: #ddd; color: #666; }
body.panel-theme .status-available { background: #b14d2f; color: #fff8f2; }
body.panel-theme .status-active { background: #c65a2d; color: #fffdf9; }
body.panel-theme .status-completed { background: #d7e2d0; color: #53644b; }

body.panel-theme .mission-title {
    position: relative;
    z-index: 1;
    color: #182126;
    margin: 10px 0;
}

body.panel-theme .mission-meta {
    position: relative;
    z-index: 1;
    color: #42515a;
}

body.panel-theme .story-section {
    background: rgba(255, 251, 245, 0.74);
}

body.panel-theme .story-switcher {
    background: rgba(24, 33, 38, 0.06);
}

body.panel-theme .story-switcher button {
    background: transparent;
    color: #42515a;
    box-shadow: none;
}

body.panel-theme .story-switcher button.active {
    background: linear-gradient(135deg, #c65a2d 0%, #8f3118 100%);
    color: #fff8f2;
}

body.panel-theme .story-media-shell {
    border-radius: 16px;
    border: 1px solid rgba(104, 77, 48, 0.16);
    background: #182126;
}

body.panel-theme .story-media-note {
    color: #5f6c73;
}

body.panel-theme .action-section {
    background: rgba(255, 251, 245, 0.74);
}

body.panel-theme .validation-section {
    background: rgba(255, 251, 245, 0.74);
}

body.panel-theme .validation-input {
    border-radius: 12px;
    border: var(--border, 1px solid rgba(104, 77, 48, 0.12));
    background: #fffdf9;
}

body.panel-theme .feedback-section h3 {
    color: #7b4a16;
}

body.panel-theme #gps-status {
    border-radius: 14px;
}

body.panel-theme #simulate-gps {
    background: linear-gradient(135deg, #b14d2f 0%, #8f3118 100%);
    color: #f4efe4;
    box-shadow: 0 12px 26px rgba(177, 77, 47, 0.24);
}

body.panel-theme .simulate-popup {
    border-radius: 18px;
}

body.panel-theme .notice-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1400;
    display: grid;
    gap: 10px;
    max-width: min(420px, calc(100vw - 36px));
}

body.panel-theme .notice {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(24, 33, 38, 0.1);
    background: rgba(255, 251, 245, 0.94);
    box-shadow: 0 18px 48px rgba(24, 33, 38, 0.14);
    color: #182126;
    line-height: 1.45;
    transform: translateY(-6px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body.panel-theme .notice.visible {
    transform: translateY(0);
    opacity: 1;
}

body.panel-theme .notice-success {
    border-color: rgba(83, 100, 75, 0.22);
}

body.panel-theme .notice-error {
    border-color: rgba(182, 58, 51, 0.22);
}

body.panel-theme .notice-info {
    border-color: rgba(38, 117, 122, 0.22);
}

body.panel-theme .app-footer {
    color: rgba(24, 33, 38, 0.74);
}

body.panel-theme .app-footer strong {
    color: #182126;
}

@media (max-width: 920px) {
    body.panel-theme .login-section {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    body.panel-theme .login-title {
        max-width: none;
    }

    body.panel-theme .login-aside {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body.panel-theme {
        padding: 14px 14px 96px;
    }

    body.panel-theme .login-form {
        flex-direction: column;
    }

    body.panel-theme .login-actions button,
    body.panel-theme #playerName {
        width: 100%;
    }

    body.panel-theme .utility-links,
    body.panel-theme .header-links {
        flex-direction: column;
    }

    body.panel-theme .utility-links a,
    body.panel-theme .header-links a {
        width: 100%;
        justify-content: center;
    }

    body.panel-theme header {
        padding: 18px;
    }

    body.panel-theme .header-brand {
        align-items: flex-start;
    }

    body.panel-theme .notice-stack {
        left: 14px;
        right: 14px;
        top: 14px;
        max-width: none;
    }
}
