/* Mobile-First Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a9eff;
    --primary-dark: #3088e0;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --bg-color: #000000;
    --card-bg: #111111;
    --border-color: #333333;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    color: var(--text-primary);
    background: var(--bg-color);
    margin: 0;
    padding: 0;
}

/* Body scroll lock for when chat is open */
body.chat-scroll-lock {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Ensure other images don't cause horizontal scrolling */
.final-image img,
.consequence-image img {
    height: auto;
    max-width: 100%;
}

/* Map Simulation Page */
.map-body {
    background: linear-gradient(135deg, #090909 0%, #161616 100%);
    min-height: 100vh;
    color: var(--text-primary);
}

.map-main {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.map-shell {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.map-header {
    background: rgba(17, 17, 17, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.map-header h1 {
    font-size: clamp(1.6rem, 5vw, 2.3rem);
    font-weight: 700;
}

.map-overview {
    font-size: 1rem;
    color: var(--text-secondary);
}

.map-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.map-controls .btn {
    flex: 1 1 180px;
}

.map-status {
    min-height: 1.4rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.map-status[data-type="success"] {
    color: var(--success-color);
}

.map-status[data-type="error"] {
    color: var(--danger-color);
}

.map-status[data-type="loading"] {
    color: var(--primary-color);
}

.map-content {
    background: rgba(12, 12, 12, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.map-grid-wrapper {
    display: flex;
    justify-content: center;
}

.map-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
    max-width: 680px;
    transition: opacity 0.3s ease;
}

.map-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.map-grid-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.65rem;
}

.map-grid-cell {
    background: radial-gradient(circle at top, rgba(74, 158, 255, 0.25), rgba(0, 0, 0, 0.95));
    border: 1px solid rgba(74, 158, 255, 0.35);
    border-radius: 12px;
    color: #fff;
    font-size: clamp(1rem, 3vw, 1.4rem);
    font-weight: 600;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 12px 25px rgba(74, 158, 255, 0.15);
}

.map-grid-cell:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(74, 158, 255, 0.25);
    border-color: rgba(74, 158, 255, 0.65);
}

.map-grid-cell:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.map-grid-placeholder {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    background: rgba(30, 30, 30, 0.85);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

.map-legend-panel {
    background: rgba(22, 22, 22, 0.9);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.map-legend-panel h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.map-legend-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.map-notes {
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.1rem;
}

.map-notes.hidden {
    display: none;
}

.map-notes h3 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.map-notes ul {
    list-style: disc;
    margin-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.map-legend-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: rgba(10, 10, 10, 0.75);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.map-legend-key {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.35), rgba(74, 158, 255, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    border: 1px solid rgba(74, 158, 255, 0.4);
}

.map-legend-description {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.map-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.map-crumb {
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.map-crumb:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(74, 158, 255, 0.6);
}

.map-crumb:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (min-width: 900px) {
    .map-content {
        flex-direction: row;
        align-items: stretch;
    }

    .map-grid-wrapper {
        flex: 3;
        justify-content: flex-start;
    }

    .map-legend-panel {
        flex: 2;
        max-width: 320px;
    }
}


/* Index Page */
.index-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    padding: 1rem;
    padding-top: calc(60px + 1rem);
}

.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.main-logo {
    font-size: clamp(2.5rem, 10vw, 4rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.crown-logo {
    width: 150px;
    height: auto;
    margin-bottom: -15px;
}

.subtitle {
    font-size: clamp(1rem, 4vw, 1.2rem);
    color: #888;
    font-weight: 400;
}

.user-welcome, .trial-notice {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.user-welcome {
    background: var(--success-color);
    color: white;
}

.trial-notice {
    background: var(--warning-color);
    color: #000;
}

.prompt-section {
    width: 100%;
    max-width: 480px;
}

.start-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.start-buttons .btn {
    width: 100%;
}

@media (min-width: 640px) {
    .start-buttons {
        flex-direction: row;
    }
}

.input-container {
    margin-bottom: 1rem;
}

.settings-container {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toggle-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ccc;
    text-align: center;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-label-left,
.toggle-label-right {
    font-size: 0.8rem;
    font-weight: 500;
    color: #aaa;
    width: 70px;
    text-align: center;
    transition: color 0.3s ease;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #333 0%, #444 100%);
    border: 1px solid #555;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.toggle-input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

/* Highlight the active side */
.toggle-group .toggle-label-left {
    color: #fff;
    font-weight: 600;
}

.toggle-input:checked ~ .toggle-container .toggle-label-left,
.toggle-group:has(.toggle-input:checked) .toggle-label-left {
    color: #aaa;
    font-weight: 500;
}

.toggle-input:checked ~ .toggle-container .toggle-label-right,
.toggle-group:has(.toggle-input:checked) .toggle-label-right {
    color: #fff;
    font-weight: 600;
}

/* Fallback for browsers that don't support :has() */
.toggle-container:has(.toggle-input:checked) .toggle-label-left {
    color: #aaa;
    font-weight: 500;
}

.toggle-container:has(.toggle-input:checked) .toggle-label-right {
    color: #fff;
    font-weight: 600;
}

/* Slider Styles */
.slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 320px;
}

.slider-label-left,
.slider-label-right {
    font-size: 0.8rem;
    font-weight: 500;
    color: #aaa;
    min-width: 20px;
    text-align: center;
}

.custom-slider {
    position: relative;
    flex: 1;
    height: 30px;
    display: flex;
    align-items: center;
}

.slider-input {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(135deg, #333 0%, #444 100%);
    border: 1px solid #555;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.slider-input::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.slider-input:hover::-webkit-slider-thumb {
    transform: scale(1.1);
    border-color: #764ba2;
}

.slider-input:hover::-moz-range-thumb {
    transform: scale(1.1);
    border-color: #764ba2;
}

.slider-value {
    min-width: 30px;
    text-align: center;
}

.slider-value span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    border: 1px solid #667eea;
}

#prompt-input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 1px solid #333;
    border-radius: 8px;
    background: #111;
    color: #fff;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s;
}

#prompt-input:focus {
    outline: none;
    border-color: #555;
}

#prompt-input::placeholder {
    color: #666;
}

#start-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#start-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.4), transparent);
    transition: left 0.6s;
}

#start-btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 50%, #2d2d2d 100%);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 215, 0, 0.6);
}

#start-btn:hover::before {
    left: 100%;
}

#start-btn:active {
    transform: translateY(-1px);
    transition: transform 0.1s;
}

/* Play Page */
.play-body {
    background: #000;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-screen.hidden {
    display: none;
}

.loading-content {
    text-align: center;
    padding: 1rem;
}

.loading-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.loading-phrases p {
    font-size: 1rem;
    color: #888;
    margin-bottom: 1rem;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #333;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dramatic Intro */
.dramatic-intro {
    min-height: 100vh;
    min-height: 100svh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.dramatic-intro.hidden {
    display: none;
}

.intro-content {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.intro-text {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 3rem;
    opacity: 0;
}

.character-reveal {
    margin-bottom: 3rem;
    opacity: 0;
}

.character-announcement .character-name {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.character-announcement .character-title {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: #888;
    font-style: italic;
}

.objective-reveal {
    margin-bottom: 3rem;
    opacity: 0;
}

.objective-text {
    font-size: clamp(1rem, 3.5vw, 1.2rem);
    color: #ddd;
    line-height: 1.5;
}

.begin-journey-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
}

.begin-journey-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.begin-journey-btn:active {
    transform: scale(0.98);
}



/* Game Interface - Redesigned for Mobile-First Vertical Layout */
.game-interface {
    background: #000;
    min-height: 100vh;
    min-height: 100svh;
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

.game-interface.hidden {
    display: none;
}
 
.game-header {
    background: #111;
    padding: 1rem;
    border-bottom: 1px solid #222;
}

.turn-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.nav-btn {
    background: #222;
    border: 1px solid #333;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-weight: bold;
}

.nav-btn:hover:not(:disabled) {
    background: #333;
    border-color: #444;
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.game-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.game-info {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

/* Game Content - Mobile-First Vertical Layout */
.game-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Character Info - Compact */
.character-info {
    background: #0a0a0a;
    padding: 0.75rem;
    border: 1px solid #222;
    border-radius: 8px;
    flex-shrink: 0;
}

.character-info .character-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.character-info .character-title {
    font-size: 0.9rem;
    color: #888;
}

/* Aspects Section - Highly Collapsible and Small */
.aspects-section {
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.aspects-section h3 {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.75rem;
    margin: 0;
    background: #111;
    border-bottom: 1px solid #222;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
}

.aspects-section h3:hover {
    background: #1a1a1a;
}

.aspects-section h3::after {
    content: '▼';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.aspects-section.collapsed h3::after {
    transform: translateY(-50%) rotate(-90deg);
}

#aspects-grid {
    padding: 0.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
}

.aspects-section.collapsed #aspects-grid {
    display: none;
}

/* Aspect Cards - Ultra Compact */
.aspect-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.aspect-card:hover {
    background: #1a1a1a;
    border-color: #333;
}

.aspect-card.expanded {
    background: #1a1a1a;
    border-color: #444;
}

.aspect-header {
    padding: 0.5rem;
    position: relative;
}

.aspect-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.15rem;
    line-height: 1.2;
    padding-right: 20px;
}

.aspect-short-state {
    font-size: 0.7rem;
    color: #999;
    line-height: 1.2;
}

.expand-indicator {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 14px;
    height: 14px;
    background: #222;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #666;
    transition: all 0.2s ease;
}

.aspect-card:hover .expand-indicator {
    background: #333;
    color: #aaa;
}

.aspect-full-state {
    border-top: 1px solid #222;
    padding: 0.5rem;
    background: #0a0a0a;
}

.aspect-full-state.hidden {
    display: none;
}

.aspect-full-text {
    font-size: 0.75rem;
    color: #ccc;
    line-height: 1.3;
}

/* Consequence Display - Moved to Top */
.consequence-display {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0;
    flex-shrink: 0;
}

.consequence-display.hidden {
    display: none;
}

.consequence-header h4 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.consequence-display .advisor-response {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.consequence-display .advisor-response p {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Event Image - Completely New Approach */
.event-image {
    width: 100%;
    background: #000;
    text-align: center;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
}

/* Event Section */
.event-section {
    background: #0a0a0a;
    padding: 0.75rem;
    border: 1px solid #222;
    border-radius: 8px;
    flex-shrink: 0;
}

.event-header {
    margin-bottom: 0.75rem;
}

.event-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.event-header p {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.3;
}

.more-info-section {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: flex-start;
}

.more-info-btn {
    background: #222;
    color: #fff;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.more-info-btn:hover {
    background: #333;
    border-color: #444;
}

.more-info-btn:active {
    transform: scale(0.95);
}

.choices-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.suggestion-generator {
    margin-bottom: 0.5rem;
}

.suggestion-buttons {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    margin-bottom: 0.5rem;
    width: 100%;
}

.suggestion-btn {
    padding: 0.4rem 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    background: #222;
    color: #fff;
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-height: 2.8rem;
    text-align: center;
    line-height: 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
}

.suggestion-btn:hover {
    background: #333;
    border-color: #444;
}

.suggestion-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.custom-choice {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

#custom-choice-input {
    flex: 1;
    padding: 0.5rem;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    min-height: 2.5rem;
    resize: vertical;
    font-family: inherit;
    line-height: 1.3;
}

#custom-choice-input:focus {
    outline: none;
    border-color: #555;
}

#custom-choice-input::placeholder {
    color: #666;
}

#custom-choice-input.loading {
    padding-right: 40px;
    position: relative;
}

#custom-choice-input.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid #333;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#custom-choice-btn {
    padding: 0.5rem 0.75rem;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    min-height: 2.5rem;
    align-self: stretch;
}

#custom-choice-btn:hover {
    background: #f0f0f0;
}

#custom-choice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* User Choice Display */
.user-choice-display {
    background: transparent;
    padding: 0;
    margin-top: 0.75rem;
}

.user-choice-display h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.user-choice-text {
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 0.75rem;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.4;
    border-left: 3px solid #4CAF50;
}

/* Consequence Section */
.consequence-section {
    padding: 1rem;
    background: #0a0a0a;
    border-top: 1px solid #222;
}

.consequence-section.hidden {
    display: none;
}

.consequence-image {
    width: 100%;
    height: 200px;
    background: #111;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.consequence-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.consequence-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.advisor-response {
    background: #111;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid #333;
}

.advisor-response p {
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.4;
}

.continue-btn {
    width: 100%;
    padding: 1rem;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
}

.continue-btn:hover {
    background: #f0f0f0;
}

/* Final Score */
.final-score {
    min-height: 100vh;
    min-height: 100svh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

.final-score.hidden {
    display: none;
}

.score-content {
    text-align: center;
    max-width: 480px;
    width: 100%;
}

.score-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.scenario-summary-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.metrics-display {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.simulation-grade-card, .historical-accuracy-card {
    width: 40vw;
    max-width: none;
    min-width: 0;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.simulation-grade-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #667eea;
}

.historical-accuracy-card {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: 2px solid #4CAF50;
}

.card-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.score-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.accuracy-percentage {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.achievement-description, .historical-impact {
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.share-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.review-turns-btn, .share-btn, .play-again-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
}

.review-turns-btn {
    background: #111;
    color: #fff;
    border: 1px solid #333;
}

.review-turns-btn:hover {
    background: #1a1a1a;
    border-color: #444;
}

.share-btn {
    background: #111;
    color: #fff;
    border: 1px solid #333;
}

.share-btn:hover {
    background: #1a1a1a;
    border-color: #444;
}

.play-again-btn {
    background: #fff;
    color: #000;
}

.play-again-btn:hover {
    background: #f0f0f0;
}

/* Mobile optimizations */
@media (max-width: 767px) {
    .game-content {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    /* Mobile image styling - already handled by main rule */
    
    #aspects-grid {
        max-height: 150px;
    }
    
    .aspect-title {
        font-size: 0.7rem;
    }
    
    .aspect-short-state {
        font-size: 0.65rem;
    }
    
    .metrics-display {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .simulation-grade-card, .historical-accuracy-card {
        max-width: none;
    }
    
    .scenario-summary-title {
        font-size: 1.1rem;
    }
    
    /* Chat window mobile adjustments */
    .chat-window {
        padding: 1rem;
    }
    
    .chat-window-content {
        height: 90vh;
        height: 90svh;
    }
    
    .chat-header {
        padding: 0.75rem 1rem;
    }
    
    .chat-messages {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .chat-input-section {
        padding: 0.75rem 1rem;
    }
}

/* Tablet and Desktop */
@media (min-width: 768px) {
    .prompt-section {
        max-width: 600px;
    }
    
    .game-content {
        max-width: 800px;
        margin: 0 auto;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    /* Tablet image styling - handled by main rule */
    
    #aspects-grid {
        grid-template-columns: 1fr 1fr;
        max-height: 250px;
    }
    
    .share-section {
        flex-direction: row;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Large Desktop */
@media (min-width: 1024px) {
    .game-content {
        max-width: 1200px; /* Increase to accommodate smaller images */
    }
    
    #aspects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Desktop image styling - make turn-by-turn images smaller like final score */
    .event-image {
        max-width: 400px; /* Much smaller for desktop */
        margin: 0 auto;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .consequence-image {
        max-width: 400px; /* Much smaller for desktop */
        height: 250px; /* Smaller height for desktop */
        margin: 0 auto 1rem auto;
        border-radius: 8px;
    }
    
    /* Keep final score image at current size for consistency */
    .final-image {
        max-width: 400px;
        margin: 0 auto 1.5rem auto;
        border-radius: 8px;
        overflow: hidden;
    }
}

/* Chat Window */
.chat-window {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.chat-window-content {
    width: 100%;
    max-width: 800px;
    height: 80vh;
    height: 80svh;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-window.hidden {
    display: none;
}

.chat-header {
    background: #111;
    border-bottom: 1px solid #333;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
}

.advisor-info {
    display: flex;
    flex-direction: column;
}

#advisor-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

#advisor-title {
    font-size: 0.8rem;
    color: #aaa;
}

.close-chat-btn {
    background: none;
    border: 1px solid #333;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-chat-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #555;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chat-message.player {
    align-items: flex-end;
}

.chat-message.advisor {
    align-items: flex-start;
}

.message-sender {
    font-size: 0.7rem;
    color: #aaa;
    font-weight: 500;
}

.message-content {
    max-width: 80%;
    padding: 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-message.player .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-message.advisor .message-content {
    background: #222;
    color: #fff;
    border: 1px solid #333;
    border-bottom-left-radius: 4px;
}

.message-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #aaa;
    font-style: italic;
}

.message-loading .loading-dots {
    display: flex;
    gap: 2px;
}

.message-loading .loading-dots span {
    width: 4px;
    height: 4px;
    background: #aaa;
    border-radius: 50%;
    animation: loadingDots 1.5s ease-in-out infinite;
}

.message-loading .loading-dots span:nth-child(1) { animation-delay: 0s; }
.message-loading .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.message-loading .loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingDots {
    0%, 60%, 100% { transform: scale(1); opacity: 0.5; }
    30% { transform: scale(1.2); opacity: 1; }
}

.chat-input-section {
    background: #111;
    border-top: 1px solid #333;
    padding: 1rem 1.25rem;
    flex-shrink: 0;
    border-radius: 0 0 12px 12px;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

#chat-input {
    flex: 1;
    background: #000;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    padding: 0.75rem;
    font-size: 1rem;
    resize: none;
    font-family: inherit;
    max-height: 120px;
    line-height: 1.3;
}

#chat-input:focus {
    outline: none;
    border-color: #555;
}

#chat-input::placeholder {
    color: #666;
}

.send-chat-btn {
    background: #fff;
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    align-self: stretch;
    min-height: 2.5rem;
}

.send-chat-btn:hover {
    background: #f0f0f0;
}

.send-chat-btn:disabled {
    background: #444;
    color: #aaa;
    cursor: not-allowed;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #000;
    border-bottom: 1px solid #333;
    z-index: 1000;
    height: 60px;
}

.nav-container {
    height: 100%;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 1rem;
    width: max-content;
}

.nav-btn {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    background: #111;
    border: 1px solid #333;
    transition: all 0.2s ease;
    width: max-content;

}

.nav-btn:hover {
    background: #222;
    border-color: #444;
}

/* Google Sign-in Button */
.google-signin-btn {
    background: #4285f4 !important;
    border-color: #4285f4 !important;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
}

.google-signin-btn:hover {
    background: #3367d6 !important;
    border-color: #3367d6 !important;
    transform: translateY(-1px);
}

.google-signin-btn svg {
    fill: white;
}

/* User Info Display */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.3);
}

.btn:active {
    transform: translateY(1px);
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

.primary-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #2070c0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
}

.secondary-btn {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.secondary-btn:hover {
    background: var(--border-color);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Authentication Pages */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.auth-container h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.auth-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.message {
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
    text-align: center;
}

.message.success {
    background: var(--success-color);
    color: white;
}

.message.error {
    background: var(--danger-color);
    color: white;
}

.auth-switch {
    text-align: center;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-benefits {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.auth-benefits h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.auth-benefits ul {
    list-style: none;
    padding: 0;
}

.auth-benefits li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.auth-benefits li:last-child {
    border-bottom: none;
}

/* Container adjustments for auth pages */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .settings-container {
        gap: 0.75rem;
    }
    
    .toggle-container {
        gap: 0.5rem;
    }
    
    .toggle-label-left,
    .toggle-label-right {
        font-size: 0.75rem;
        min-width: 40px;
    }
    
    .toggle-switch {
        width: 50px;
        height: 26px;
    }
    
    .toggle-slider {
        border-radius: 13px;
    }
    
    .toggle-slider:before {
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
    }
    
    .toggle-input:checked + .toggle-slider:before {
        transform: translateX(24px);
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .google-signin-btn {
        min-width: 140px;
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .google-signin-btn svg {
        width: 14px;
        height: 14px;
        margin-right: 6px;
    }
    
    .user-info {
        font-size: 0.8rem;
        gap: 0.3rem;
        margin-right: 0.3rem;
    }
    
    .user-avatar {
        width: 24px;
        height: 24px;
    }
    
    .user-name {
        max-width: 80px;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .primary-btn:hover, .secondary-btn:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
    }
    
    #start-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    #start-btn:hover, #start-btn:active {
        transform: none;
    }
    
    .auth-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

.notification-banner {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    max-width: 90vw;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    background: rgba(24, 24, 27, 0.9);
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
    z-index: 9999;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.notification-banner.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -20px);
}

.notification-banner[data-type="error"] {
    background: rgba(220, 38, 38, 0.95);
}

.notification-banner[data-type="info"] {
    background: rgba(59, 130, 246, 0.95);
}

#notification-message {
    flex: 1;
    font-weight: 500;
}

#notification-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

#notification-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

/* Exploration map experience */
.exploration-body {
    background: #020204;
    color: #f8f8f8;
    min-height: 100vh;
}

.exploration-main {
    position: relative;
    min-height: calc(100vh - 72px);
    width: 100%;
    overflow: hidden;
}

.exploration-map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.exploration-hud {
    position: absolute;
    top: 90px;
    left: 24px;
    z-index: 3;
    max-width: clamp(280px, 28vw, 420px);
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 18, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.exploration-title {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #fff7d6;
}

.exploration-year {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
}

.exploration-terrain {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.exploration-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.exploration-instructions {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

.exploration-status {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(15, 15, 25, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
    color: #ffe7a3;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.exploration-status[data-tone="error"] {
    color: #ffb7b7;
    border-color: rgba(255, 105, 105, 0.4);
}

.exploration-status[data-tone="success"] {
    color: #b7ffc8;
    border-color: rgba(92, 255, 174, 0.35);
}

.exploration-status[data-tone="loading"] {
    color: #ffe7a3;
    border-color: rgba(255, 231, 163, 0.35);
}

.city-info-panel {
    position: absolute;
    right: 24px;
    top: 120px;
    max-width: clamp(320px, 32vw, 460px);
    z-index: 4;
    backdrop-filter: blur(14px);
    background: rgba(8, 8, 12, 0.82);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
}

.city-info-panel.hidden {
    display: none;
}

.city-info-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: none;
    font-size: 1.4rem;
    line-height: 32px;
    cursor: pointer;
}

.city-info-content h2 {
    font-size: clamp(1.4rem, 2.2vw, 1.9rem);
    margin-bottom: 0.5rem;
    color: #ffe7a3;
}

.city-info-context {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
}

.city-info-media img {
    width: 100%;
    border-radius: 14px;
    margin-bottom: 1rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.city-info-language {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.ship-marker {
    font-size: 2rem;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
}

.city-marker {
    font-size: 1.3rem;
    color: #ffe7a3;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.75);
}

.city-marker::after {
    content: '\25CF';
}

.leaflet-container {
    background: #0b111b;
}

.exploration-tooltip {
    background: rgba(12, 12, 18, 0.85);
    color: #ffe7a3;
    border: none;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
    padding: 0.3rem 0.55rem;
}

@media (max-width: 1024px) {
    .exploration-hud {
        position: static;
        margin: 1rem;
    }

    .city-info-panel {
        position: fixed;
        right: 16px;
        left: 16px;
        top: auto;
        bottom: 16px;
    }
}

@media (max-width: 640px) {
    .exploration-main {
        min-height: calc(100vh - 64px);
    }

    .exploration-hud {
        margin: 0.75rem;
        padding: 1.1rem;
    }

    .exploration-actions {
        flex-direction: column;
    }

    .city-info-panel {
        max-height: 70vh;
        overflow-y: auto;
    }
}
