.fullscreen-button {
    pointer-events: auto; display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; flex-shrink: 0; min-height: 40px; padding: 10px 14px;
    font: 600 13px system-ui, sans-serif; color: #edf2ec; background: #152b30;
    border: 1px solid #80968f60; border-radius: 3px; cursor: pointer;
}
.fullscreen-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.fullscreen-button:hover { background: #234148; }
.fullscreen-button:focus-visible { outline: 2px solid #d0e9dd; outline-offset: 3px; }
#fullscreen-exit, #fullscreen-error { display: none; }
.iceage-fullscreen #fullscreen-error:not(:empty) { display: block; grid-column: 1 / -1; font-size: 11px; color: #e6c39b; }
.fullscreen-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Leave only terrain and the compact timeline. Inline responsive styles remain intact for exit. */
.iceage-fullscreen #interface > :not(#timeline-panel),
.iceage-fullscreen #map > :not(canvas),
.iceage-fullscreen .timeline-ticks,
.iceage-fullscreen .timeline-status,
.iceage-fullscreen #sea,
.iceage-fullscreen #restart,
.iceage-fullscreen #speed { display: none !important; }
.iceage-fullscreen #timeline-panel {
    display: grid !important; grid-template-columns: max-content 36px minmax(0, 1fr) 36px;
    align-items: center; gap: 10px; box-sizing: border-box;
    left: 50% !important; right: auto !important; bottom: max(14px, env(safe-area-inset-bottom)) !important;
    transform: translateX(-50%); width: min(640px, calc(100% - 32px)); padding: 8px 12px !important;
    background: rgba(10, 23, 27, 0.82) !important; border-radius: 8px !important;
}
.iceage-fullscreen .timeline-heading,
.iceage-fullscreen .timeline-date,
.iceage-fullscreen .timeline-controls { display: contents !important; }
.iceage-fullscreen #year { grid-area: 1 / 1; font-size: 19px !important; width: 112px; max-width: 240px; line-height: 1.15; white-space: normal; }
/* Reserve a stable date column so running digits cannot move Pause mid-click. */
.iceage-fullscreen #year[data-annotation="true"] { width: 240px; }
.iceage-fullscreen #play {
    grid-area: 1 / 2; width: 36px; height: 36px; min-height: 36px !important;
    padding: 0 !important; font-size: 0 !important;
}
.iceage-fullscreen #play::before { content: '▶'; font: 14px system-ui, sans-serif; }
.iceage-fullscreen #play[aria-pressed="true"]::before { content: 'Ⅱ'; }
.iceage-fullscreen #timeline { grid-area: 1 / 3; min-width: 0; margin: 0 !important; height: 32px !important; }
.iceage-fullscreen #fullscreen-exit { display: inline-flex; grid-area: 1 / 4; width: 36px; height: 36px; min-height: 36px; padding: 0; }
@media (max-width: 759px) {
    #fullscreen-toggle { width: 44px; height: 44px; min-height: 44px; padding: 0; }
    #fullscreen-toggle span { display: none; }
    .iceage-fullscreen #timeline-panel { width: calc(100% - 24px); gap: 6px; padding: 6px 8px !important; }
    .iceage-fullscreen #year { font-size: 13px !important; width: 88px; max-width: 128px; }
    .iceage-fullscreen #year[data-annotation="true"] { width: 128px; }
}
@media (pointer: coarse) {
    .iceage-fullscreen #timeline-panel { grid-template-columns: max-content 44px minmax(0, 1fr) 44px; }
    .iceage-fullscreen #play, .iceage-fullscreen #fullscreen-exit { width: 44px; height: 44px; min-height: 44px !important; }
    .iceage-fullscreen #timeline { height: 44px !important; }
}
