/* Orrery 49 – Viktorianisches Messing-Planetarium */
:root {
    --or49-bg:       #0a0806;
    --or49-brass:    #fbbf24;
    --or49-dark:     #92400e;
    --or49-shine:    #fde68a;
    --or49-text:     #fef3c7;
    --or49-muted:    #d97706;
    --or49-panel:    rgba(10, 8, 6, 0.82);
    --or49-border:   rgba(251, 191, 36, 0.3);
    --planet-color:  #fbbf24;
}

/* ── Wrapper ──────────────────────────────── */
.or49-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--or49-bg);
    border-radius: 3px;
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
    user-select: none;
    cursor: grab;
}

.or49-wrapper:active { cursor: grabbing; }

.or49-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ── Loading ──────────────────────────────── */
.or49-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--or49-bg);
    color: var(--or49-brass);
    font-size: 0.9rem;
    letter-spacing: 0.18em;
    gap: 1.2rem;
    z-index: 20;
    text-transform: uppercase;
}

.or49-gear-anim svg { filter: drop-shadow(0 0 6px rgba(251,191,36,0.5)); }

.or49-gear-spin {
    transform-origin: 30px 30px;
    animation: or49-spin 1.8s linear infinite;
}

@keyframes or49-spin { to { transform: rotate(360deg); } }

/* ── Tooltip ──────────────────────────────── */
.or49-tooltip {
    position: absolute;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--or49-panel);
    border: 1px solid var(--planet-color, var(--or49-border));
    border-radius: 2px;
    padding: 0.6rem 1.2rem;
    color: var(--or49-text);
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    min-width: 140px;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.08);
}

.or49-tooltip--visible { opacity: 1; }

.or49-tooltip-name {
    font-size: 1rem;
    font-weight: bold;
    color: var(--or49-brass);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.or49-tooltip-desc {
    font-size: 0.75rem;
    color: var(--or49-text);
    opacity: 0.75;
    margin-top: 0.25rem;
    line-height: 1.4;
    font-style: italic;
}

/* ── Speed Panel ──────────────────────────── */
.or49-speed-panel {
    position: absolute;
    bottom: 1.2rem;
    left: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--or49-panel);
    border: 1px solid var(--or49-border);
    border-radius: 2px;
    padding: 0.45rem 0.8rem;
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.3s;
}

.or49-wrapper:hover .or49-speed-panel { opacity: 1; }

.or49-speed-label {
    font-size: 0.65rem;
    color: var(--or49-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.or49-speed-range {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 3px;
    background: var(--or49-border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.or49-speed-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--or49-brass);
    cursor: pointer;
    box-shadow: 0 0 4px rgba(251, 191, 36, 0.5);
}

.or49-speed-range::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--or49-brass);
    cursor: pointer;
    border: none;
}

.or49-pause-btn {
    background: none;
    border: 1px solid var(--or49-border);
    color: var(--or49-brass);
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.or49-pause-btn:hover { background: rgba(251, 191, 36, 0.15); }

/* ── Date Display ─────────────────────────── */
.or49-date-display {
    position: absolute;
    bottom: 1.2rem;
    right: 1.2rem;
    background: var(--or49-panel);
    border: 1px solid var(--or49-border);
    border-radius: 2px;
    padding: 0.4rem 0.8rem;
    text-align: right;
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.3s;
}

.or49-wrapper:hover .or49-date-display { opacity: 1; }

.or49-date-label {
    display: block;
    font-size: 0.6rem;
    color: var(--or49-muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.or49-date-value {
    display: block;
    font-size: 0.85rem;
    color: var(--or49-brass);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
}

/* ── Lightbox ─────────────────────────────── */
.or49-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    cursor: zoom-out;
}

.or49-lightbox--open { display: flex; }

.or49-lightbox-inner {
    position: relative;
    width: 88vw;
    max-width: 960px;
    background: var(--or49-bg);
    border: 1px solid var(--planet-color, var(--or49-border));
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(251, 191, 36, 0.1);
    cursor: default;
}

.or49-lightbox-canvas {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    opacity: 0.4;
}

.or49-lightbox-info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.or49-lb-name {
    font-size: 1.8rem;
    color: var(--planet-color, var(--or49-brass));
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px currentColor;
}

.or49-lb-desc {
    font-size: 1rem;
    color: var(--or49-text);
    font-style: italic;
    line-height: 1.7;
    max-width: 520px;
    opacity: 0.85;
}

.or49-lightbox-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: var(--or49-panel);
    border: 1px solid var(--or49-border);
    color: var(--or49-brass);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.or49-lightbox-close:hover { background: rgba(251, 191, 36, 0.2); }

/* ── Editor Placeholder ───────────────────── */
.or49-editor-placeholder {
    min-height: 220px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--or49-bg) !important;
    border: 2px dashed var(--or49-border);
}

.or49-editor-notice {
    color: var(--or49-brass);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    padding: 2rem;
    line-height: 1.8;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 600px) {
    .or49-speed-panel,
    .or49-date-display  { opacity: 1; }
    .or49-lb-name       { font-size: 1.3rem; }
    .or49-lb-desc       { font-size: 0.85rem; }
}

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