/* shivers.dev styles */

/* Self-hosted fonts */
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/IBMPlexMono-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/IBMPlexMono-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/IBMPlexMono-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'PT Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/PTSerif-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'PT Serif';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/PTSerif-Italic.woff2') format('woff2');
}

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    color-scheme: dark;
    --sky-night: #0e1729;
    --slate: #1a2744;
    --cloud: #9ca6b3;
    --white: #e8eef4;
    --gold: #d4a84b;
    --gold-soft: rgba(212, 168, 75, 0.15);
    --border: #28374b;
    --constellation-line: #4a6488;
    --noise-opacity: 0.03;
    --text-secondary: #6b7f99;
    --label-star: #5a626c;
    --label-constellation: #5f6e82;
    --slider-hitbox-debug: transparent;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    background: var(--sky-night);
    color: var(--white);
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* noise texture - white+alpha overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('/bkg-noise.webp');
    background-size: 200px 200px;
    opacity: var(--noise-opacity, 0.03);
    pointer-events: none;
    z-index: 100;
}

/* main frame */
.frame {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 874px;
    min-height: 100vh;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

/* navbar */
.topbar {
    width: 100%;
    background: rgba(14, 23, 41, 0.85);
    color: var(--white);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    position: relative;
    z-index: 20;
    pointer-events: none;
}
.topbar-inner {
    max-width: 874px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}
.topbar a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.15s;
    pointer-events: auto;
}
.topbar a:hover {
    color: var(--gold);
}
.topbar-nav {
    display: flex;
    gap: 1.5rem;
}

/* starfield crop window */
.starfield-disc-wrapper button:focus,
.starfield-disc-wrapper input:focus,
.starclock-page button:focus,
.starclock-page input:focus {
    outline: none;
}
.starfield-disc-wrapper {
    position: relative;
    /*margin-top: -44px; /* pull up behind navbar */
    margin-top: 0px;
}
/* NOTE: height is set dynamically by JS from CONFIG.container.defaultHeight */
.starfield {
    background: var(--sky-night);
    position: relative;
    overflow: hidden;
}
.horizon-handle {
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 32px;
    height: 12px;
    background: var(--border);
    cursor: ns-resize;
    z-index: 10;
}
@media (pointer: coarse) {
    .horizon-handle::before {
        content: '';
        position: absolute;
        top: -20px;
        bottom: -20px;
        left: -15px;
        right: -15px;
    }
}
.horizon-handle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 4px;
    right: 4px;
    height: 2px;
    background: var(--sky-night);
    box-shadow: 0 4px 0 var(--sky-night);
}
.horizon-handle:hover,
.horizon-handle.dragging {
    background: var(--gold);
}
#latitude-ticker {
    position: fixed;
    display: none;
    background: var(--sky-night);
    border: 2px solid var(--border);
    padding: 6px 10px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--white);
    pointer-events: none;
    z-index: 1000;
    box-shadow: 4px 4px 0 #000;
}
/* NOTE: top is set dynamically by JS from DERIVED.canvasTopCSS */
.starfield canvas {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    image-rendering: auto;
    background-image: linear-gradient(transparent, transparent); /* fix Chrome backdrop-filter bug */
}
.starfield-coords {
    position: absolute;
    bottom: 10px;
    left: 12px;
    font-size: 12px;
    color: var(--border);
    z-index: 10;
}
.starfield-label {
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-size: 12px;
    color: var(--border);
    z-index: 10;
}


/* tooltip */
#tooltip {
    position: fixed;
    display: none;
    background: var(--sky-night);
    border: 1px solid var(--border);
    padding: 8px 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--white);
    pointer-events: none;
    z-index: 1000;
    box-shadow: 4px 4px 0 #000;
}
#tooltip .name {
    font-weight: bold;
    margin-bottom: 4px;
}
#tooltip .field {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
#tooltip .label {
    color: var(--cloud);
}
#tooltip .tooltip-actions {
    margin-top: 8px;
    border-top: 1px solid var(--border);
    margin-left: -12px;
    margin-right: -12px;
    margin-bottom: -8px;
    display: none;
    pointer-events: auto;
}
#tooltip .tooltip-more-btn {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    color: var(--cloud);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    padding: 7px 12px;
    cursor: pointer;
    pointer-events: auto;
    text-align: center;
}
#tooltip .tooltip-more-btn:hover {
    color: var(--gold);
}
@media (pointer: coarse) {
    #tooltip {
        pointer-events: auto;
    }
    #tooltip .tooltip-actions {
        display: flex;
    }
}

/* object details modal */
.starfield-object-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    z-index: 30;
    padding: 16px;
    padding-top: max(16px, env(safe-area-inset-top, 0px) + 16px);
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px) + 16px);
}
.starfield-object-modal.open {
    display: flex;
}
.starfield-object-modal-card {
    width: min(520px, 96vw);
    max-height: min(80vh, 100%);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    background: var(--sky-night);
    box-shadow: 4px 4px 0 #000;
    font-size: 12px;
}
.starfield-object-modal-header {
    flex-shrink: 0;
}
.starfield-object-modal-title {
    color: var(--cloud);
}
.starfield-object-modal-subtitle {
    margin-top: 4px;
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--cloud);
}
.starfield-object-modal-body {
    padding-top: 10px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.starfield-object-modal-body::-webkit-scrollbar {
    width: 6px;
}
.starfield-object-modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.starfield-object-modal-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.starfield-detail-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
    margin-bottom: 12px;
}
.starfield-detail-col h4 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cloud);
    margin-bottom: 6px;
}
.starfield-detail-col .field {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--white);
    margin-bottom: 4px;
}
.starfield-detail-col .label {
    color: var(--cloud);
    white-space: nowrap;
}
.starfield-detail-col .field span:last-child {
    text-align: right;
}
.starfield-object-detail-section {
    margin-bottom: 12px;
}
.starfield-object-detail-section h4 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cloud);
    margin-bottom: 6px;
}
.starfield-object-detail-section .field {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--white);
    margin-bottom: 4px;
}
.starfield-object-detail-section .label {
    color: var(--cloud);
}
.starfield-object-blurb {
    font-family: 'PT Serif', serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--white);
    margin: 8px 0 12px;
    padding: 0 4px;
}
.starfield-object-blurb:first-of-type {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin: 12px -12px 12px;
    padding-left: 12px;
    padding-right: 12px;
}
.starfield-object-blurb + .starfield-object-blurb {
    margin-top: -4px;
}
.starfield-wiki-inline {
    font-style: italic;
    text-decoration: underline;
    text-underline-offset: 2px;
    color: var(--gold);
    white-space: nowrap;
}
.starfield-wiki-inline:hover {
    color: var(--white);
}

/* main content */
.content {
    flex: 1;
    padding: 2.5rem 1.5rem;
    background: var(--sky-night);
}

.intro {
    font-family: 'PT Serif', serif;
    font-size: 1.35rem;
    line-height: 1.5;
    color: var(--cloud);
    max-width: 540px;
    margin-bottom: 3rem;
}
.intro strong {
    color: var(--white);
    font-weight: 500;
}
.intro .hl {
    background: var(--gold-soft);
    color: var(--gold);
    padding: 0 0.15em;
}

/* sections */
.section {
    margin-bottom: 3rem;
}
.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.section-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--border);
}
.section-line {
    flex: 1;
    height: 1px;
    background: var(--slate);
}

/* entries */
.entry {
    display: block;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    border: 1px dashed var(--slate);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, border-style 0.15s, background 0.15s;
}
.entry:hover {
    border-color: var(--gold);
    border-style: solid;
    background: rgba(212, 168, 75, 0.03);
}
.entry-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 0.35rem;
    transition: color 0.15s;
}
.entry:hover .entry-title {
    color: var(--gold);
}
.entry-desc {
    font-family: 'PT Serif', serif;
    font-size: 0.95rem;
    color: var(--cloud);
    margin-bottom: 0.5rem;
}
.entry-meta {
    font-size: 0.65rem;
    color: var(--border);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.entry-arrow {
    float: right;
    color: var(--border);
    transition: transform 0.15s, color 0.15s;
}
.entry:hover .entry-arrow {
    color: var(--gold);
    transform: translateX(3px);
}

/* footer */
.footer {
    background: var(--border);
    color: var(--white);
    border-top: 1px solid var(--border);
    padding: 1rem 1.25rem;
    font-size: 0.7rem;
    display: flex;
    justify-content: space-between;
}
.footer a {
    color: var(--white);
    text-decoration: none;
}
.footer a:hover {
    color: var(--gold);
}

/* blog post styles */
.post {
    max-width: 640px;
}
.post h1 {
    font-family: 'PT Serif', serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.post-meta {
    font-size: 0.75rem;
    color: var(--border);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2rem;
}
.post-content {
    font-family: 'PT Serif', serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--cloud);
}
.post-content h2 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin: 2rem 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.post-content p {
    margin-bottom: 1.25rem;
}
.post-content a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.post-content a:hover {
    color: var(--white);
}
.post-content code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9em;
    background: var(--slate);
    padding: 0.15em 0.4em;
    border-radius: 2px;
}
.post-content pre {
    background: var(--slate);
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-left: 3px solid var(--border);
}
.post-content pre code {
    background: none;
    padding: 0;
}
.post-content blockquote {
    border-left: 3px solid var(--gold);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--cloud);
}
.post-content ul, .post-content ol {
    margin: 1rem 0 1.25rem 1.5rem;
}
.post-content li {
    margin-bottom: 0.5rem;
}
.post-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
}

/* starfield settings panel */
.starfield-settings-btn {
    position: absolute;
    top: 54px; /* below navbar */
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(14, 23, 41, 0.85);
    border: 1px solid var(--border);
    color: var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    z-index: 15;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.starfield-settings-btn.active {
    color: var(--gold);
    border-color: var(--gold);
}
@media (hover: hover) {
    .starfield-settings-btn:hover,
    .starfield-settings-btn.active:hover {
        background: rgba(255,255,255,0.12);
    }
}
.starfield-recenter-btn {
    display: none;
}
.starfield-recenter-btn.is-visible {
    display: flex;
}

.seizure-warning-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}
.seizure-warning-modal {
    background: var(--sky-night);
    border: 1px solid var(--border);
    box-shadow: 4px 4px 0 #000;
    max-width: 300px;
    font-size: 12px;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--cloud);
}
.seizure-warning-title {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cloud);
}
.seizure-warning-body {
    padding: 12px;
    line-height: 1.5;
    border-bottom: 1px solid var(--border);
}
.seizure-warning-buttons {
    display: flex;
    gap: 0;
}
.seizure-warning-btn {
    flex: 1;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    padding: 10px 12px;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--cloud);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.15s;
}
.seizure-warning-btn:hover {
    background: rgba(255,255,255,0.08);
}
.seizure-btn-stop + .seizure-btn-continue {
    border-left: 1px solid var(--border);
}
.seizure-btn-continue {
    color: var(--gold);
}

.starfield-location-btn {
    right: 52px; /* 12px + 32px gear + 8px gap */
}
/* Twin pixel tracer glow for first-time hint */
@keyframes trace-border {
    0%      { top: 0; left: 0; }
    25%     { top: 0; left: calc(100% - 1px); }
    50%     { top: calc(100% - 1px); left: calc(100% - 1px); }
    75%     { top: calc(100% - 1px); left: 0; }
    100%    { top: 0; left: 0; }
}
.location-hint-glow {
    position: relative;
    overflow: visible !important;
}
/* In starclock header, .starfield-settings-btn sets position: static with higher specificity.
   Re-assert relative positioning so tracer dots are anchored to the location button only. */
.starclock-header-buttons .starfield-settings-btn.location-hint-glow {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 36px;
    height: 36px;
    min-width: 36px;
}
.location-hint-glow .tracer-dot {
    position: absolute;
    width: 1px;
    height: 1px;
    pointer-events: none;
    z-index: 1;
    animation: trace-border 2s linear infinite;
}
.starfield-location-btn.has-minimap {
    padding: 2px;
    overflow: hidden;
}
.starfield-location-btn.has-minimap svg {
    display: block;
    width: 100%;
    height: 100%;
}
.starfield-location-btn.has-minimap .map-land {
    fill: var(--cloud);
}

/* Location Modal */
.starfield-location-modal {
    position: absolute;
    top: 54px;
    right: 52px;
    width: fit-content;
    max-width: calc(100vw - 24px);
    background: var(--sky-night);
    border: 1px solid var(--border);
    z-index: 14;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
    box-shadow: 4px 4px 0 #000;
}
.starfield-location-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.location-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}
.location-modal-title {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cloud);
}
.location-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 8px;
    margin: -8px;
}
.location-modal-close:hover {
    color: var(--gold);
}

.location-modal-body {
    padding: 12px;
}

.location-map-container {
    border: 1px solid var(--border);
    cursor: crosshair;
}
.location-map {
    display: block;
    width: 360px;
    height: 180px;
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
}
.starfield-location-modal.map-dragging {
    opacity: 0.5;
}
.starfield-location-modal:has(.location-map.dragging) {
    opacity: 0.5;
}
.map-ocean {
    fill: var(--sky-night);
}
.map-land {
    fill: var(--border);
}
.map-marker {
    fill: var(--gold);
}

.location-hint {
    margin-top: 8px;
    text-align: center;
    color: var(--cloud);
    font-size: 12px;
}
.location-coords {
    margin-top: 4px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
}
.location-coords span {
    color: var(--cloud);
}

/* DateTime Modal */
.starfield-datetime-modal {
    position: absolute;
    top: 54px;
    left: 12px;
    width: 200px;
    background: var(--sky-night);
    border: 1px solid var(--border);
    z-index: 14;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
    box-shadow: 4px 4px 0 #000;
}
.starfield-datetime-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.datetime-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}
.datetime-modal-title {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cloud);
}
.datetime-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 8px;
    margin: -8px;
}
.datetime-modal-close:hover {
    color: var(--gold);
}

.datetime-modal-body {
    padding: 12px;
}

.datetime-input-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.datetime-label {
    width: 40px;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
}
.datetime-input {
    flex: 1;
    background: var(--sky-night);
    border: 1px solid var(--border);
    color: var(--cloud);
    padding: 4px 6px;
    font-family: inherit;
    font-size: 12px;
}
.datetime-input:focus {
    outline: none;
    border-color: var(--gold);
}
/* Style the calendar/clock icons in date/time inputs */
.datetime-input::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: pointer;
}

.datetime-now-btn {
    width: 100%;
    padding: 6px 12px;
    background: var(--sky-night);
    border: 1px solid var(--border);
    color: var(--cloud);
    font-family: inherit;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    margin-top: 4px;
}
.datetime-now-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.starfield-settings-panel {
    position: absolute;
    top: 54px;
    right: 12px;
    width: 260px;
    background: var(--sky-night);
    border: 1px solid var(--border);
    z-index: 14;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
    box-shadow: 4px 4px 0 #000;
}
.starfield-settings-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}
.settings-title {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cloud);
}
.settings-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.settings-close:hover {
    color: var(--gold);
}

.settings-body {
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    user-select: none;
    -webkit-user-select: none;
}
.settings-body::-webkit-scrollbar {
    width: 6px;
}
.settings-body::-webkit-scrollbar-track {
    background: transparent;
}
.settings-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.settings-section {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}
.settings-section:last-child {
    border-bottom: none;
}
.settings-section-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.settings-details {
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 4px;
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
}
.settings-details summary {
    cursor: pointer;
    list-style: none;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.settings-details summary::-webkit-details-marker {
    display: none;
}
.settings-details summary::after {
    content: '[+]';
    font-size: inherit;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-secondary);
    padding: 4px 0;
}
.settings-details[open] summary::after {
    content: '[−]';
}
@media (hover: hover) {
    .settings-details summary:hover::after {
        color: var(--gold);
    }
}
.settings-details summary:focus-visible::after {
    color: var(--gold);
}
.settings-details[open] summary {
    margin-bottom: 8px;
}
.settings-details:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.settings-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    cursor: pointer;
}
.settings-toggle input {
    accent-color: var(--gold);
}
.settings-toggle span {
    color: var(--white);
}

.settings-toggle + .settings-slider {
    margin-top: 8px;
}
.settings-slider {
    padding: 6px 0;
}
.settings-slider label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    color: var(--white);
}
.settings-value {
    color: var(--text-secondary);
    font-family: 'IBM Plex Mono', monospace;
}
.settings-slider input[type="range"] {
    width: 100%;
    height: 4px;
    background: var(--slate);
    border: none;
    outline: none;
    -webkit-appearance: none;
}
.settings-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--gold);
    cursor: pointer;
}
.settings-slider input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--gold);
    border: none;
    cursor: pointer;
}
.settings-slider-hit {
    position: absolute;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    background: var(--slider-hitbox-debug);
    z-index: 2;
    touch-action: none;
    cursor: pointer;
}
.settings-slider {
    position: relative;
    overflow: hidden;
}

.settings-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
}
.settings-select span {
    font-size: 12px;
    color: var(--white);
}
.settings-select select {
    background: var(--slate);
    border: 1px solid var(--border);
    color: var(--white);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    padding: 3px 6px;
    cursor: pointer;
    outline: none;
}
.settings-select select:focus {
    border-color: var(--gold);
}
.settings-select select option {
    background: var(--sky-night);
    color: var(--white);
}

.settings-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    margin-top: 6px;
    background: var(--slate);
    border: 1px solid var(--border);
    color: var(--white);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.settings-btn:first-of-type {
    margin-top: 0;
}
.settings-btn:hover {
    background: var(--gold);
    color: var(--sky-night);
    border-color: var(--gold);
}

/* Live mode indicator */
.live-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    margin-left: auto;
}
.live-indicator.active {
    background: #ef4444;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Settings info display */
.settings-info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}
.settings-info-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}
.info-label {
    color: var(--border);
    font-size: 12px;
}
.info-value {
    color: var(--white);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
}

/* fullscreen mode */
.starfield-disc-wrapper:fullscreen {
    background: var(--sky-night);
    display: flex;
    align-items: center;
    justify-content: center;
}
.starfield-disc-wrapper:fullscreen .starfield-disc {
    height: 100vh !important;
}
.starfield-disc-wrapper:fullscreen .starfield-settings-btn {
    top: 12px;
}
.starfield-disc-wrapper:fullscreen .starfield-settings-panel {
    top: 12px;
}

/* starclock page - fullscreen layout */
body:has(.starclock-page),
html:has(.starclock-page) {
    overflow: hidden;
    overscroll-behavior: none;
    position: fixed;
    width: 100%;
    height: 100%;
}
.frame:has(.starclock-page) {
    max-width: 100%;
    padding: 0;
    border: none;
    box-shadow: none;
}
.starclock-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
}
.starclock-page .starfield-disc-wrapper {
    transform: translateY(18px);
}
/* Overlay container for title and info */
.starclock-overlay {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 12px), 1400px);
    z-index: 20;
    pointer-events: none;
}
.starclock-overlay > * {
    pointer-events: auto;
}
.starclock-header-buttons {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}
/* Compact panel - visible by default */
.starclock-compact {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cloud);
    background: rgba(0,0,0,0.5);
    padding: 7px 12px 6px;
    white-space: nowrap;
    width: 42ch;
}
.starclock-compact #compact-datetime {
    display: inline-block;
    cursor: pointer;
}
.starclock-compact #compact-datetime:hover {
    color: var(--gold);
}
.starclock-compact .compact-live,
.starclock-compact .go-live-btn {
    display: none;
    text-align: center;
}
.starclock-compact .compact-live.shown,
.starclock-compact .go-live-btn.shown {
    display: inline-block;
}
.starclock-compact.hidden {
    display: none !important;
}
.starclock-compact .compact-live {
    color: var(--cloud);
}
.starclock-compact .compact-live-dot {
    color: #e53935;
    animation: pulse 1.5s ease-in-out infinite;
}
.panel-expand-btn, .panel-collapse-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--cloud);
    font-family: 'IBM Plex Mono', monospace;
    font-size: inherit;
    cursor: pointer;
    padding: 0;
    line-height: inherit;
}
.panel-expand-btn:focus-visible,
.panel-collapse-btn:focus-visible {
    color: var(--gold);
    outline: none;
}
@media (hover: hover) {
    .panel-expand-btn:hover,
    .panel-collapse-btn:hover {
        color: var(--gold);
    }
}
.panel-expand-btn::before, .panel-collapse-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: transparent;
}
.panel-collapse-btn {
    position: absolute;
    top: 6px;
    right: 12px;
    display: block;
}
.panel-collapse-btn.hidden {
    display: none;
}
@media (max-width: 600px) {
    .starclock-header-buttons {
        flex-direction: column;
    }
}
.scale-step-btn {
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
}
.starclock-scale-slider {
    display: none;
}
.starclock-info {
    display: none;
    position: relative;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(0,0,0,0.5);
    padding: 7px 12px 6px;
    width: 42ch;
}
.starclock-info.starclock-info-expanded {
    display: block;
}
.starclock-info-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    line-height: 1.4;
}
.starclock-info-row:first-child {
    margin-top: 0;
}
.starclock-info-row.starclock-title-row {
    display: none;
}
.starclock-info-row.starclock-title-row + .starclock-info-row {
    margin-top: 0;
}
.starclock-col1 {
    min-width: 14ch;
}
.starclock-info-row .info-key {
    margin-left: 8px;
}
.starclock-col1 .info-key {
    margin-left: 0;
    margin-right: 4px;
}
/* Status row (Row 1) */
.starclock-status-row {
    margin-bottom: 4px;
}
.status-symbol {
    font-size: 12px;
    line-height: 1;
    width: 2ch;
    text-align: center;
    margin-right: 1ch;
    position: relative;
    top: -1px;
}
.status-symbol.live {
    color: #e53935;
    animation: pulse 1.5s ease-in-out infinite;
}
.status-symbol.paused {
    color: var(--cloud);
    opacity: 0.6;
    animation: none;
}
.status-symbol.playing-slow {
    color: var(--cloud);
    animation: pulse-slow 1.5s ease-in-out infinite;
}
@keyframes pulse-slow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.35; }
}
.status-symbol.playing-1 { color: var(--cloud); animation: pulse-slow 1.6s ease-in-out infinite; }
.status-symbol.playing-2 { color: var(--cloud); animation: pulse-slow 1.3s ease-in-out infinite; }
.status-symbol.playing-3 { color: var(--cloud); animation: pulse-slow 1.05s ease-in-out infinite; }
.status-symbol.playing-4 { color: var(--cloud); animation: pulse-slow 0.85s ease-in-out infinite; }
.status-symbol.playing-5 { color: var(--cloud); animation: pulse-slow 0.65s ease-in-out infinite; }
.status-symbol.playing-6 { color: var(--cloud); animation: pulse-slow 0.5s ease-in-out infinite; }
.status-symbol.playing-7 { color: var(--cloud); animation: pulse-slow 0.35s ease-in-out infinite; }
.status-symbol.playing-8 { color: var(--cloud); animation: pulse-slow 0.22s ease-in-out infinite; }
.status-symbol.playing-9 { color: var(--cloud); animation: pulse-slow 0.12s ease-in-out infinite; }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.status-text {
    color: var(--cloud);
    font-weight: 400;
    min-width: 70px;
}
.status-date {
    color: var(--cloud);
    cursor: pointer;
}
.status-time {
    color: var(--cloud);
    cursor: pointer;
    margin-left: 8px;
    min-width: 16ch;
}
.status-date:hover,
.status-time:hover {
    color: var(--gold);
}
@supports selector(:has(*)) {
    .starclock-datetime-row:has(.status-date:hover) .status-date,
    .starclock-datetime-row:has(.status-date:hover) .status-time,
    .starclock-datetime-row:has(.status-time:hover) .status-date,
    .starclock-datetime-row:has(.status-time:hover) .status-time {
        color: var(--gold);
    }
}
.go-live-btn {
    margin-left: 8px;
    background: none;
    border: none;
    color: var(--gold);
    font-family: inherit;
    font-size: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    padding: 0 4px 0 0;
    opacity: 0.8;
}
.go-live-btn:hover {
    opacity: 1;
}
.go-live-btn.hidden {
    display: none;
}

/* Controls row (Row 2) */
.starclock-controls-row {
    position: relative;
    margin-bottom: 2px;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}
.play-hit-area,
.thumb-hit-area {
    position: absolute;
    height: 44px;
    width: 44px;
    top: 0;
    left: 0;
    z-index: 3;
    background: transparent;
    pointer-events: auto;
    display: none;
    cursor: pointer;
}
.thumb-hit-area {
    z-index: 2;
    touch-action: none;
    height: 32px;
    cursor: grab;
}
.thumb-hit-area:active {
    cursor: grabbing;
}
.play-pause-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--cloud);
    cursor: pointer;
    padding: 0;
    width: 16px;
    display: flex;
    align-items: center;
}
.play-pause-btn:hover,
.play-pause-btn:focus-visible {
    color: var(--gold);
    text-shadow: 0 0 6px rgba(255, 196, 0, 0.45);
    outline: none;
}
@supports selector(:has(*)) {
    .starclock-controls-row:has(.play-hit-area:hover) .play-pause-btn {
        color: var(--gold);
        text-shadow: 0 0 6px rgba(255, 196, 0, 0.45);
    }
}
.speed-slider {
    flex: 1;
    height: 4px;
    --thumb-size: 10px;
    --thumb-color: #5d6878;
    -webkit-appearance: none;
    appearance: none;
    background: #5d6878;
    cursor: grab;
}
.speed-slider:active {
    cursor: grabbing;
}
.speed-slider:hover,
.speed-slider:focus-visible {
    --thumb-color: var(--gold);
    outline: none;
}
@supports selector(:has(*)) {
    .starclock-controls-row:has(.thumb-hit-area:hover) .speed-slider {
        --thumb-color: var(--gold);
    }
}
.starclock-controls-row.slider-dragging .speed-slider {
    --thumb-color: var(--gold);
}
.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: var(--thumb-color);
    border-radius: 50%;
    cursor: grab;
}
.speed-slider:active::-webkit-slider-thumb {
    cursor: grabbing;
}
.speed-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: var(--thumb-color);
    border-radius: 50%;
    cursor: grab;
    border: none;
}
.speed-slider:active::-moz-range-thumb {
    cursor: grabbing;
}
.speed-value {
    width: 9ch;
    text-align: left;
    color: var(--cloud);
    flex-shrink: 0;
}
.tl-toggle {
    flex-shrink: 0;
    cursor: pointer;
    color: var(--cloud);
    opacity: 0.35;
    font-size: inherit;
    letter-spacing: 0.5px;
    padding: 2px 4px;
    user-select: none;
    -webkit-user-select: none;
}
.tl-toggle.active {
    opacity: 1;
    color: var(--gold);
}
.info-key {
    color: var(--cloud);
    opacity: 0.6;
}
.starclock-ra-row,
.starclock-altaz-row {
    display: none;
}
.starclock-ra-row.visible,
.starclock-altaz-row.visible {
    display: flex;
}
.info-val {
    color: var(--cloud);
    min-width: 60px;
}
.starfield-disc-wrapper {
    position: relative;
    overflow: visible; /* allow halftone to show behind navbar */
    background: var(--sky-night);
}
.starfield-disc {
    position: relative;
    background: var(--sky-night);
}
.starfield-disc canvas {
    position: absolute;
    top: 0;
    left: 0;
    transform: none;
    image-rendering: auto;
    background: var(--sky-night);
}
.starfield canvas.pan-cursor,
.starfield-disc canvas.pan-cursor {
    cursor: grab;
}
.starfield canvas.pan-cursor.pan-cursor-active,
.starfield-disc canvas.pan-cursor.pan-cursor-active {
    cursor: grabbing;
}
.starfield canvas.spin-cursor-crosshair,
.starfield-disc canvas.spin-cursor-crosshair {
    cursor: crosshair;
}
.starfield canvas.spin-cursor-grab,
.starfield-disc canvas.spin-cursor-grab {
    cursor: grab;
}
.starfield canvas.spin-cursor-active,
.starfield-disc canvas.spin-cursor-active {
    cursor: grabbing;
}
.starfield-label-canvas {
    z-index: 6;
    pointer-events: none;
    background: transparent;
    image-rendering: auto;
}
.starfield #starfield,
.starfield-disc #starfield {
    z-index: 2;
}
/* Disc mode horizon handle - top set by JS */
.starfield-disc-wrapper .horizon-handle.disc-handle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
    margin-right: 0;
    z-index: 15;
}
/* Compass labels */
.compass-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}
.compass-label {
    position: absolute;
    font-family: 'PT Serif', serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--text);
    opacity: 0.7;
    transform: translate(-50%, -50%);
    visibility: hidden;
}
.compass-ns {
    /* Positioned by JS at bottom center of window */
}
.compass-e, .compass-w {
    /* Positioned by JS at equator/horizon intersection */
}
.horizon-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--cloud);
    visibility: hidden;
}
.starclock-flourish {
    position: absolute;
    bottom: 2rem;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    opacity: 0.5;
}
.starclock-flourish-left {
    left: 1.5rem;
    border-right: none;
    border-top: none;
}
.starclock-flourish-right {
    right: 1.5rem;
    border-left: none;
    border-top: none;
}
.starclock-content {
    margin-top: 4rem;
    padding: 0 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
/* Starclock page - buttons are in header flex, modals positioned below */
.starclock-header-buttons .starfield-settings-btn {
    position: static;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.5);
    color: var(--cloud);
    border: none;
}
.starclock-header-buttons .starfield-settings-btn.active {
    color: var(--gold);
}
@media (hover: hover) {
    .starclock-header-buttons .starfield-settings-btn:hover,
    .starclock-header-buttons .starfield-settings-btn.active:hover {
        background: rgba(0,0,0,0.7);
    }
}
.starclock-page .starfield-settings-panel.starclock-settings {
    position: absolute;
    top: 48px;
    right: max(6px, calc((100vw - 1400px) / 2));
    left: auto;
    z-index: 20;
}
.starclock-page .starfield-location-modal.starclock-settings {
    position: absolute;
    top: 48px;
    right: calc(max(6px, (100vw - 1400px) / 2) + 42px);
    left: auto;
    z-index: 20;
}
@media (max-width: 600px) {
    .starclock-page .starfield-location-modal.starclock-settings {
        right: max(6px, calc((100vw - 1400px) / 2));
        top: 90px;
    }
}
.starclock-page .starfield-datetime-modal.starclock-settings {
    position: absolute;
    top: 48px;
    left: max(1rem, calc(50% - min(600px, 50vw - 1.5rem) + 1rem));
    right: auto;
    z-index: 20;
}
.starclock-content p {
    color: var(--cloud);
    line-height: 1.8;
}
.fps-counter {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: white;
    z-index: 100;
    display: none;
}
.embed-container {
    margin: 2rem 0;
    padding: 2rem;
    border: 1px dashed var(--border);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border);
    font-size: 12px;
}
.embed-container::before {
    content: 'WebGL embed placeholder';
}

/* responsive */
/* NOTE: starfield height/canvas top now controlled by JS - see CONFIG.container.minHeight */
@media (max-width: 600px) {
    .content { padding: 1.5rem 1rem; }
    .intro { font-size: 1.15rem; }
    .starfield-disc {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
}
@media (hover: none), (pointer: coarse) {
    .starclock-ra-row,
    .starclock-altaz-row {
        display: none !important;
    }
}

/* ========================================
   Navigation Ribbons
   ======================================== */
.ribbon-nav {
    position: fixed;
    z-index: 50;
    left: max(6px, calc(50vw - 700px));
    display: flex;
    width: 36px;
    height: 56px;
    text-decoration: none;
    color: var(--cloud);
    background: var(--sky-night);
    border: 1px solid var(--border);
    box-shadow: 4px 4px 0 #000;
    transition: transform 0.15s, box-shadow 0.15s, color 0.15s;
}
.ribbon-nav:hover {
    color: var(--gold);
}
.ribbon-nav svg {
    width: 20px;
    height: 20px;
}
.ribbon-nav-bottom {
    bottom: -20px;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8px;
    border-bottom: none;
}
.ribbon-nav-bottom:hover {
    transform: translateY(-4px);
}
@media (max-width: 600px) {
    .ribbon-nav {
        width: 32px;
        height: 50px;
    }
    .ribbon-nav svg {
        width: 18px;
        height: 18px;
    }
    .ribbon-nav-bottom {
        padding-top: 7px;
    }
}

/* ========================================
   About / Controls Modal
   ======================================== */
.starfield-about-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 60;
    padding: 16px;
    padding-top: max(16px, env(safe-area-inset-top, 0px) + 16px);
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px) + 16px);
}
.starfield-about-modal.open {
    display: flex;
}
.starfield-about-modal-card {
    width: min(680px, 96vw);
    height: min(80vh, 100%);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    background: var(--sky-night);
    box-shadow: 4px 4px 0 #000;
}
.about-modal-header {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    gap: 0;
    flex-shrink: 0;
}
.about-tab {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cloud);
    background: none;
    border: none;
    border-right: 1px solid var(--border);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    padding: 8px 12px;
    cursor: pointer;
    opacity: 0.5;
    display: flex;
    align-items: center;
}
.about-tab:hover {
    opacity: 0.8;
}
.about-tab.active {
    opacity: 1;
    border-bottom-color: var(--gold);
}
.about-modal-close {
    margin-left: auto;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 18px;
    color: var(--cloud);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    opacity: 0.5;
    display: flex;
    align-items: center;
}
.about-modal-close:hover {
    opacity: 1;
}
.about-modal-body {
    padding: 24px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.about-modal-body::-webkit-scrollbar {
    width: 6px;
}
.about-modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.about-modal-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.about-tab-content {
    display: none;
}
.about-tab-content.active {
    display: block;
}
/* About tab typography */
.about-tab-content h1 {
    font-family: 'PT Serif', serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--white);
    margin: 0 0 8px;
    line-height: 1.15;
}
.about-tab-content .about-subtitle {
    font-family: 'PT Serif', serif;
    font-size: 1.1rem;
    color: var(--cloud);
    margin: 0 0 24px;
    line-height: 1.5;
}
.about-tab-content h2 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--white);
    margin: 28px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.about-tab-content p {
    font-family: 'PT Serif', serif;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--cloud);
    margin: 0 0 12px;
}
.about-tab-content .about-lede {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--white);
}
.about-tab-content blockquote {
    margin: 16px 0;
    padding: 12px 16px 12px 20px;
    border-left: 3px solid var(--gold);
}
.about-tab-content blockquote p {
    color: var(--white);
    margin: 0;
}
/* Controls tab */
.controls-device-picker {
    margin-bottom: 20px;
}
.controls-device-select {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--white);
    background: var(--sky-night);
    border: 1px solid var(--border);
    padding: 5px 8px;
    cursor: pointer;
}
.controls-section-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--white);
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.controls-section-title:not(:first-child) {
    margin-top: 28px;
}
.controls-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.controls-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
}
.controls-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 2px 0;
}
.controls-action {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--white);
    white-space: nowrap;
    flex-shrink: 0;
}
.controls-methods {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--cloud);
    line-height: 1.6;
}
.controls-method {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--cloud);
    line-height: 1.6;
}
.controls-divider {
    color: #667;
    margin: 0 2px;
}
.controls-method kbd,
.controls-methods kbd {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--white);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3px;
    padding: 1px 5px;
    margin: 0 1px;
}
@media (max-width: 600px) {
    .about-modal-body {
        padding: 16px;
    }
    .about-tab-content h1 {
        font-size: 1.5rem;
    }
    .about-tab-content p {
        font-size: 0.95rem;
    }
}
