/**
 * Solar system viewer — layout & UI
 */
:root {
    --panel-bg: rgba(0, 0, 0, 0.5);
    --menu-bg: rgba(0, 0, 0, 0.9);
    --btn-bg: #444;
    --accent: #7fb4ff;
    --accent-strong: #a8cdff;
    --glass: rgba(12, 24, 48, 0.72);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    touch-action: none;
}

canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.label {
    fill: #0f172a;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-anchor: middle;
    opacity: 0.96;
    stroke: rgba(226, 239, 255, 0.95);
    stroke-width: 1.1px;
    paint-order: stroke fill;
}

.info,
.controls,
.data-display,
.calendar-display,
.menu {
    background: var(--glass);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(146, 184, 255, 0.24);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

.info {
    position: absolute;
    top: 10px;
    left: 10px;
}

.hamburger {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 10px;
    background: linear-gradient(180deg, rgba(99, 150, 226, 0.72), rgba(58, 97, 156, 0.72));
    color: #fff;
    border: 1px solid rgba(180, 211, 255, 0.5);
    border-radius: 10px;
    cursor: pointer;
    z-index: 3;
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

.menu,
.controls {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: min(320px, 92vw);
    height: 100%;
    padding: 58px 10px 14px;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(10, 22, 46, 0.96), rgba(5, 10, 22, 0.96));
    border-right: 1px solid rgba(130, 178, 255, 0.35);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.45);
    z-index: 2;
}

.controls button,
.menu a,
.controls select {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin: 6px 0;
    background: linear-gradient(180deg, rgba(86, 127, 189, 0.38), rgba(56, 78, 113, 0.38));
    color: #fff;
    border: 1px solid rgba(177, 208, 255, 0.35);
    border-radius: 8px;
    text-align: right;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
    min-height: 44px;
    touch-action: manipulation;
}

.controls input[type="range"] {
    width: 100%;
    margin: 6px 0;
}

.observer-row {
    display: grid;
    gap: 6px;
    margin: 8px 0;
    font-size: 12px;
    color: #d5e6ff;
}

.controls button:hover,
.menu a:hover {
    transform: translateX(-2px);
    background: linear-gradient(180deg, rgba(110, 162, 241, 0.5), rgba(66, 100, 151, 0.45));
    border-color: rgba(191, 219, 255, 0.65);
}

.controls button:active,
.menu a:active {
    transform: translateX(0);
}

.menu__title {
    font-size: 13px;
    letter-spacing: 1.8px;
    color: #9bc3ff;
    margin: 0 2px 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(154, 194, 255, 0.25);
}

.menu__section-label {
    margin: 10px 2px 6px;
    font-size: 11px;
    color: #c8dcff;
    opacity: 0.9;
}

.menu__links {
    margin-top: 4px;
}

.about-project-card {
    margin-top: 6px;
    padding: 10px;
    border: 1px solid rgba(177, 208, 255, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 12px;
    line-height: 1.5;
}

.about-sources {
    border: 1px solid rgba(154, 194, 255, 0.26);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 8px 4px;
    max-height: 120px;
    overflow-y: auto;
}

.disclosure-card {
    margin-top: 6px;
    padding: 9px 10px;
    border: 1px solid rgba(177, 208, 255, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 12px;
    line-height: 1.45;
    color: #d9e9ff;
}

.about-project-card h3,
.about-project-card h4 {
    margin: 0 0 6px;
    color: #cfe2ff;
}

.about-project-card p {
    margin: 0 0 8px;
}

.about-project-card ul {
    margin: 0 0 10px;
    padding-right: 18px;
}

.about-project-card li {
    margin-bottom: 4px;
}

.about-project-card code {
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 12px;
    color: #e6f0ff;
    direction: ltr;
    unicode-bidi: isolate;
    font-family: "Courier New", Courier, monospace;
    white-space: nowrap;
}

.donate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 173, 173, 0.65) !important;
    background: rgba(255, 123, 123, 0.16) !important;
    color: #ffd6d6 !important;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    min-height: 28px;
}

.menu::-webkit-scrollbar,
.controls::-webkit-scrollbar {
    width: 8px;
}

.menu::-webkit-scrollbar-thumb,
.controls::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(132, 177, 250, 0.45);
}

/* Unified scrollbar style for app panels */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(132, 177, 250, 0.52) rgba(10, 22, 46, 0.38);
}

.menu::-webkit-scrollbar,
.controls::-webkit-scrollbar,
.data-display::-webkit-scrollbar,
.calendar-display::-webkit-scrollbar,
.calendar-app::-webkit-scrollbar,
.trivia-app::-webkit-scrollbar,
.facts-app::-webkit-scrollbar,
.history-app::-webkit-scrollbar,
.judaism-app::-webkit-scrollbar,
.events-app::-webkit-scrollbar,
.phenomena-app::-webkit-scrollbar,
.appendix-app::-webkit-scrollbar,
.install-help-panel::-webkit-scrollbar {
    width: 10px;
}

.menu::-webkit-scrollbar-track,
.controls::-webkit-scrollbar-track,
.data-display::-webkit-scrollbar-track,
.calendar-display::-webkit-scrollbar-track,
.calendar-app::-webkit-scrollbar-track,
.trivia-app::-webkit-scrollbar-track,
.facts-app::-webkit-scrollbar-track,
.history-app::-webkit-scrollbar-track,
.judaism-app::-webkit-scrollbar-track,
.events-app::-webkit-scrollbar-track,
.phenomena-app::-webkit-scrollbar-track,
.install-help-panel::-webkit-scrollbar-track {
    background: rgba(9, 20, 42, 0.42);
    border-radius: 999px;
}

.menu::-webkit-scrollbar-thumb,
.controls::-webkit-scrollbar-thumb,
.data-display::-webkit-scrollbar-thumb,
.calendar-display::-webkit-scrollbar-thumb,
.calendar-app::-webkit-scrollbar-thumb,
.trivia-app::-webkit-scrollbar-thumb,
.facts-app::-webkit-scrollbar-thumb,
.history-app::-webkit-scrollbar-thumb,
.judaism-app::-webkit-scrollbar-thumb,
.events-app::-webkit-scrollbar-thumb,
.phenomena-app::-webkit-scrollbar-thumb,
.install-help-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 2px solid rgba(9, 20, 42, 0.35);
    background: linear-gradient(180deg, rgba(117, 164, 242, 0.8), rgba(75, 116, 191, 0.78));
}

.menu::-webkit-scrollbar-thumb:hover,
.controls::-webkit-scrollbar-thumb:hover,
.data-display::-webkit-scrollbar-thumb:hover,
.calendar-display::-webkit-scrollbar-thumb:hover,
.calendar-app::-webkit-scrollbar-thumb:hover,
.trivia-app::-webkit-scrollbar-thumb:hover,
.facts-app::-webkit-scrollbar-thumb:hover,
.history-app::-webkit-scrollbar-thumb:hover,
.judaism-app::-webkit-scrollbar-thumb:hover,
.events-app::-webkit-scrollbar-thumb:hover,
.phenomena-app::-webkit-scrollbar-thumb:hover,
.install-help-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(145, 186, 255, 0.9), rgba(91, 136, 214, 0.88));
}

.data-display {
    position: absolute;
    top: 10px;
    right: 10px;
    width: min(320px, 42vw);
    max-height: 45vh;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.5;
}

#planet-info strong {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--accent-strong);
}

#planet-info {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(154, 194, 255, 0.24);
    border-radius: 10px;
    padding: 10px;
}

.data-display__section {
    margin-bottom: 8px;
}

.data-display__section--muted {
    opacity: 0.9;
    font-size: 12px;
}

.calendar-display {
    position: absolute;
    bottom: 54px;
    right: 10px;
    width: min(320px, 90vw);
    max-height: min(42vh, calc(100vh - 220px));
    overflow: hidden;
    padding-top: 34px;
    font-size: 13px;
    line-height: 1.45;
}

#calendar-display-content {
    max-height: calc(100% - 2px);
    overflow-y: auto;
    padding-left: 4px;
}

.calendar-info-card {
    border: 1px solid rgba(154, 194, 255, 0.26);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    padding: 10px;
}

.calendar-info-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px dashed rgba(154, 194, 255, 0.2);
    padding: 5px 0;
    font-size: 12px;
}

.calendar-info-row:last-child {
    border-bottom: none;
}

.calendar-info-row b {
    color: var(--accent-strong);
    font-weight: 600;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px;
    border-radius: 5px;
    pointer-events: none;
    display: none;
    z-index: 4;
    max-width: 280px;
    font-size: 12px;
}

.panel-close {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    z-index: 9;
}

.panel-close--menu {
    top: 12px;
    right: 10px;
    left: auto;
}

.highlighted {
    stroke: #ff0;
    stroke-width: 2;
}

.orbit-path {
    filter: drop-shadow(0 0 4px rgba(166, 207, 255, 0.3));
    animation-name: orbitDashFlow;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes orbitDashFlow {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -220;
    }
}

.gravity-line {
    animation: gravityWave 6s linear infinite;
}

@keyframes gravityWave {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -16; }
}

.realistic-planet {
    box-shadow:
        0 0 10px rgba(0, 0, 0, 0.5),
        inset 0 0 10px rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.08));
}

.sun-halo {
    filter: blur(8px);
}

.moon-planet {
    opacity: 0.6;
}

.footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(6, 12, 26, 0.92), rgba(3, 7, 16, 0.95));
    padding: 8px 12px;
    text-align: center;
    font-size: 13px;
    z-index: 35;
    border-top: 1px solid rgba(146, 184, 255, 0.25);
}

/* פינה שמאלית־תחתונה: סמל בלבד להצגת הפס; פינה ימנית־תחתונה: סמל לסגירה */
.footer-corner-btn__glyph {
    display: block;
    font-size: 18px;
    line-height: 1;
}

.footer-pull-handle {
    position: fixed;
    bottom: 10px;
    left: 14px;
    z-index: 42;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(186, 215, 255, 0.58);
    background: linear-gradient(180deg, rgba(72, 122, 197, 0.95), rgba(38, 74, 133, 0.95));
    color: #fff;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    min-width: 40px;
    min-height: 40px;
}

.footer-pull-handle:active {
    filter: brightness(1.08);
}

.footer-pull-handle:focus-visible {
    outline: 2px solid var(--accent-strong, #9ac4ff);
    outline-offset: 2px;
}

.footer-banner-toggle {
    position: fixed;
    bottom: 10px;
    right: 14px;
    z-index: 42;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(186, 215, 255, 0.58);
    background: linear-gradient(180deg, rgba(74, 126, 203, 0.95), rgba(40, 77, 138, 0.95));
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    min-width: 40px;
    min-height: 40px;
}

.footer-banner-toggle:focus-visible {
    outline: 2px solid var(--accent-strong, #9ac4ff);
    outline-offset: 2px;
}

.footer-holidays {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.holiday-actions {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.holiday-toggle {
    border: 1px solid rgba(173, 204, 255, 0.5);
    background: rgba(106, 146, 214, 0.25);
    color: #e9f3ff;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.holiday-toggle .holiday-icon {
    font-size: 16px;
}

.holiday-download {
    border: 1px solid rgba(173, 204, 255, 0.5);
    background: rgba(88, 135, 206, 0.28);
    color: #e9f3ff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
}

.holiday-list {
    list-style: none;
    margin: 0;
    padding: 10px;
    width: min(360px, calc(100vw - 28px));
    border: 1px solid rgba(154, 194, 255, 0.3);
    border-radius: 10px;
    background: rgba(8, 18, 38, 0.95);
    display: grid;
    gap: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
}

.holiday-list li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    border-bottom: 1px dashed rgba(154, 194, 255, 0.2);
    padding-bottom: 3px;
}

.holiday-list li:last-child {
    border-bottom: none;
}

.footer a {
    color: var(--accent-strong);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-credit {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.92;
}

.hidden-panel {
    display: none !important;
}

.calendar-fab {
    position: fixed;
    bottom: 54px;
    left: 14px;
    z-index: 6;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(186, 215, 255, 0.58);
    background: linear-gradient(180deg, rgba(72, 122, 197, 0.95), rgba(38, 74, 133, 0.95));
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.share-fab {
    position: fixed;
    bottom: 56px;
    right: 14px;
    z-index: 40;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(186, 215, 255, 0.58);
    background: linear-gradient(180deg, rgba(74, 126, 203, 0.95), rgba(40, 77, 138, 0.95));
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.install-info-fab {
    position: fixed;
    bottom: 108px;
    right: 14px;
    z-index: 40;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(186, 215, 255, 0.58);
    background: linear-gradient(180deg, rgba(52, 95, 156, 0.95), rgba(26, 52, 95, 0.95));
    color: #fff;
    font-size: 20px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.accessibility-fab {
    position: fixed;
    bottom: 158px;
    right: 14px;
    z-index: 40;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(186, 215, 255, 0.58);
    background: linear-gradient(180deg, rgba(55, 90, 140, 0.95), rgba(33, 62, 105, 0.95));
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.install-help-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(340px, calc(100vw - 28px));
    z-index: 55;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(4, 9, 20, 0.98);
    padding: 34px 16px 16px;
    display: grid;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
}

.accessibility-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(280px, calc(100vw - 28px));
    z-index: 55;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(4, 9, 20, 0.98);
    padding: 34px 16px 16px;
    display: grid;
    gap: 10px;
    font-size: 13px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
}

body.a11y-high-contrast {
    filter: none;
    background: #000;
    color: #fff;
}

body.a11y-high-contrast .menu,
body.a11y-high-contrast .controls,
body.a11y-high-contrast .data-display,
body.a11y-high-contrast .calendar-display,
body.a11y-high-contrast .calendar-app,
body.a11y-high-contrast .trivia-app,
body.a11y-high-contrast .facts-app,
body.a11y-high-contrast .history-app,
body.a11y-high-contrast .judaism-app,
body.a11y-high-contrast .events-app,
body.a11y-high-contrast .phenomena-app,
body.a11y-high-contrast .appendix-app,
body.a11y-high-contrast .install-help-panel,
body.a11y-high-contrast .accessibility-panel {
    background: rgba(0, 0, 0, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.72) !important;
    color: #fff !important;
}

body.a11y-high-contrast .controls button,
body.a11y-high-contrast .menu a,
body.a11y-high-contrast .holiday-toggle,
body.a11y-high-contrast .holiday-download,
body.a11y-high-contrast .trivia-option,
body.a11y-high-contrast .facts-app__footer button,
body.a11y-high-contrast .trivia-app__footer button,
body.a11y-high-contrast .install-help-actions button {
    background: #0e2a56 !important;
    border-color: #fff !important;
    color: #fff !important;
}

body.a11y-high-contrast a {
    color: #9ad0ff !important;
    text-decoration: underline;
}

body.a11y-large-text {
    font-size: 18px;
    line-height: 1.6;
}

body.a11y-large-text .menu,
body.a11y-large-text .controls,
body.a11y-large-text .data-display,
body.a11y-large-text .calendar-display,
body.a11y-large-text .calendar-app,
body.a11y-large-text .trivia-app,
body.a11y-large-text .facts-app,
body.a11y-large-text .history-app,
body.a11y-large-text .judaism-app,
body.a11y-large-text .events-app,
body.a11y-large-text .phenomena-app,
body.a11y-large-text .appendix-app,
body.a11y-large-text .install-help-panel,
body.a11y-large-text .accessibility-panel {
    font-size: 16px !important;
}

body.a11y-large-text .menu__section-label,
body.a11y-large-text .history-app__header,
body.a11y-large-text .judaism-app__header,
body.a11y-large-text .events-app__header,
body.a11y-large-text .phenomena-app__header,
body.a11y-large-text .appendix-app__header,
body.a11y-large-text .trivia-app__header,
body.a11y-large-text .facts-app__header {
    font-size: 17px !important;
}

body.a11y-large-text .controls button,
body.a11y-large-text .menu a,
body.a11y-large-text .holiday-toggle,
body.a11y-large-text .holiday-download,
body.a11y-large-text .trivia-option,
body.a11y-large-text .trivia-app__footer button,
body.a11y-large-text .facts-app__footer button,
body.a11y-large-text .install-help-actions button {
    font-size: 15px !important;
    min-height: 44px;
}

body.a11y-large-text .calendar-info-row,
body.a11y-large-text .calendar-weekday,
body.a11y-large-text .calendar-day,
body.a11y-large-text .facts-topic,
body.a11y-large-text .trivia-feedback,
body.a11y-large-text .footer,
body.a11y-large-text .footer-credit {
    font-size: 14px !important;
}

body.a11y-large-text .about-project-card code,
body.a11y-large-text code {
    font-size: 13px !important;
}

.install-help-actions button {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    padding: 6px 8px;
}

.alien-cta {
    position: fixed;
    left: 14px;
    bottom: 158px;
    z-index: 11;
    display: inline-flex;
    align-items: flex-end;
    gap: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.alien-cta.alien-cta--show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.alien-cta__bubble {
    background: rgba(14, 29, 56, 0.96);
    color: #dff9ff;
    border: 1px solid rgba(145, 229, 198, 0.66);
    border-radius: 14px;
    padding: 8px 10px;
    font-size: 12px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.alien-cta__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(10, 26, 36, 0.95);
    border: 1px solid rgba(145, 229, 198, 0.66);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.alien-cta__icon svg {
    width: 38px;
    height: 38px;
}

.ui-toggles-fab {
    position: fixed;
    bottom: 104px;
    left: 14px;
    z-index: 6;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(186, 215, 255, 0.58);
    background: linear-gradient(180deg, rgba(74, 126, 203, 0.95), rgba(40, 77, 138, 0.95));
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.side-tabs-drawer {
    position: fixed;
    top: 38%;
    right: 8px;
    transform: translate(78%, -50%);
    z-index: 30;
    transition: transform 0.22s ease;
    display: grid;
    gap: 8px;
    overflow: visible;
}

.side-tabs-drawer.side-tabs-drawer--open {
    transform: translate(0, -50%);
}

.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list {
    background: linear-gradient(180deg, rgba(8, 18, 38, 0.95), rgba(4, 10, 22, 0.98));
    border-radius: 12px 0 0 12px;
    padding: 10px 12px 10px 8px;
    border: 1px solid rgba(154, 194, 255, 0.2);
    border-right: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list .trivia-fab,
.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list .facts-fab,
.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list .history-fab,
.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list .judaism-fab,
.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list .events-fab,
.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list .phenomena-fab,
.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list .appendix-fab {
    background: linear-gradient(180deg, rgba(55, 70, 120, 0.92), rgba(38, 52, 92, 0.95));
}

.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list .facts-fab { background: linear-gradient(180deg, rgba(52, 78, 118, 0.92), rgba(38, 58, 96, 0.95)); }
.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list .history-fab { background: linear-gradient(180deg, rgba(58, 76, 112, 0.92), rgba(42, 58, 88, 0.95)); }
.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list .judaism-fab { background: linear-gradient(180deg, rgba(54, 72, 108, 0.92), rgba(40, 54, 82, 0.95)); }
.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list .events-fab { background: linear-gradient(180deg, rgba(52, 74, 112, 0.92), rgba(38, 54, 86, 0.95)); }
.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list .phenomena-fab { background: linear-gradient(180deg, rgba(50, 72, 108, 0.92), rgba(36, 52, 80, 0.95)); }
.side-tabs-drawer.side-tabs-drawer--open .side-tabs-list .appendix-fab { background: linear-gradient(180deg, rgba(48, 70, 106, 0.92), rgba(34, 50, 78, 0.95)); }

.side-tabs-toggle {
    position: relative;
    z-index: 3;
    overflow: visible;
    border: 1px solid rgba(255, 182, 220, 0.95);
    border-right: none;
    border-radius: 14px 0 0 14px;
    background: linear-gradient(155deg, #ffd6ec 0%, #ff8dc7 35%, #e11d74 100%);
    color: #1a0a14;
    font-weight: 800;
    padding: 10px 14px;
    min-height: 48px;
    cursor: pointer;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.side-tabs-list {
    display: grid;
    gap: 6px;
    opacity: 0.92;
}

/* לשוניות פנימיות — עדינות, לא מתחרות בידית */
.side-tabs-list .trivia-fab,
.side-tabs-list .facts-fab,
.side-tabs-list .history-fab,
.side-tabs-list .judaism-fab,
.side-tabs-list .events-fab,
.side-tabs-list .phenomena-fab,
.side-tabs-list .appendix-fab {
    position: static !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    z-index: auto;
    border: 1px solid rgba(154, 194, 255, 0.28);
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: #e8f1ff;
    font-weight: 600;
    padding: 8px 12px;
    min-height: 40px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.side-tabs-list .trivia-fab { background: linear-gradient(180deg, rgba(55, 70, 120, 0.55), rgba(38, 52, 92, 0.62)); }
.side-tabs-list .facts-fab { background: linear-gradient(180deg, rgba(52, 78, 118, 0.55), rgba(38, 58, 96, 0.62)); }
.side-tabs-list .history-fab { background: linear-gradient(180deg, rgba(58, 76, 112, 0.55), rgba(42, 58, 88, 0.62)); }
.side-tabs-list .judaism-fab { background: linear-gradient(180deg, rgba(54, 72, 108, 0.55), rgba(40, 54, 82, 0.62)); }
.side-tabs-list .events-fab { background: linear-gradient(180deg, rgba(52, 74, 112, 0.55), rgba(38, 54, 86, 0.62)); }
.side-tabs-list .phenomena-fab { background: linear-gradient(180deg, rgba(50, 72, 108, 0.55), rgba(36, 52, 80, 0.62)); }
.side-tabs-list .appendix-fab { background: linear-gradient(180deg, rgba(48, 70, 106, 0.55), rgba(34, 50, 78, 0.62)); }

.side-tabs-list .trivia-fab:hover,
.side-tabs-list .facts-fab:hover,
.side-tabs-list .history-fab:hover,
.side-tabs-list .judaism-fab:hover,
.side-tabs-list .events-fab:hover,
.side-tabs-list .phenomena-fab:hover,
.side-tabs-list .appendix-fab:hover {
    border-color: rgba(186, 215, 255, 0.45);
    background: linear-gradient(180deg, rgba(72, 98, 150, 0.65), rgba(48, 68, 110, 0.72));
}

.trivia-fab {
    position: fixed;
    top: 38%;
    right: -86px;
    transform: translateY(-50%);
    z-index: 8;
    border: 1px solid rgba(186, 215, 255, 0.58);
    border-right: none;
    border-radius: 12px 0 0 12px;
    background: linear-gradient(180deg, rgba(83, 92, 220, 0.96), rgba(56, 66, 180, 0.96));
    color: #fff;
    font-weight: 700;
    padding: 12px 10px;
    min-height: 44px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: right 0.22s ease;
}

.facts-fab {
    position: fixed;
    top: calc(38% + 54px);
    right: -86px;
    transform: translateY(-50%);
    z-index: 8;
    border: 1px solid rgba(186, 215, 255, 0.58);
    border-right: none;
    border-radius: 12px 0 0 12px;
    background: linear-gradient(180deg, rgba(82, 146, 225, 0.96), rgba(54, 104, 175, 0.96));
    color: #fff;
    font-weight: 700;
    padding: 12px 10px;
    min-height: 44px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: right 0.22s ease;
}

.history-fab {
    position: fixed;
    top: calc(38% + 108px);
    right: -86px;
    transform: translateY(-50%);
    z-index: 8;
    border: 1px solid rgba(186, 215, 255, 0.58);
    border-right: none;
    border-radius: 12px 0 0 12px;
    background: linear-gradient(180deg, rgba(102, 136, 211, 0.96), rgba(66, 95, 167, 0.96));
    color: #fff;
    font-weight: 700;
    padding: 12px 10px;
    min-height: 44px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: right 0.22s ease;
}

.judaism-fab {
    position: fixed;
    top: calc(38% + 162px);
    right: -86px;
    transform: translateY(-50%);
    z-index: 8;
    border: 1px solid rgba(186, 215, 255, 0.58);
    border-right: none;
    border-radius: 12px 0 0 12px;
    background: linear-gradient(180deg, rgba(95, 124, 199, 0.96), rgba(58, 86, 152, 0.96));
    color: #fff;
    font-weight: 700;
    padding: 12px 10px;
    min-height: 44px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: right 0.22s ease;
}

.events-fab {
    position: fixed;
    top: calc(38% + 216px);
    right: -86px;
    transform: translateY(-50%);
    z-index: 8;
    border: 1px solid rgba(186, 215, 255, 0.58);
    border-right: none;
    border-radius: 12px 0 0 12px;
    background: linear-gradient(180deg, rgba(86, 124, 220, 0.96), rgba(52, 86, 173, 0.96));
    color: #fff;
    font-weight: 700;
    padding: 12px 10px;
    min-height: 44px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: right 0.22s ease;
}

.phenomena-fab,
.appendix-fab {
    position: fixed;
    top: calc(38% + 270px);
    right: -86px;
    transform: translateY(-50%);
    z-index: 8;
    border: 1px solid rgba(186, 215, 255, 0.58);
    border-right: none;
    border-radius: 12px 0 0 12px;
    background: linear-gradient(180deg, rgba(84, 118, 205, 0.96), rgba(51, 79, 158, 0.96));
    color: #fff;
    font-weight: 700;
    padding: 12px 10px;
    min-height: 44px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: right 0.22s ease;
}

.appendix-fab { top: calc(38% + 324px); }

.trivia-fab:hover,
.trivia-fab:focus-visible,
.facts-fab:hover,
.facts-fab:focus-visible,
.history-fab:hover,
.history-fab:focus-visible,
.judaism-fab:hover,
.judaism-fab:focus-visible,
.events-fab:hover,
.events-fab:focus-visible,
.phenomena-fab:hover,
.phenomena-fab:focus-visible,
.appendix-fab:hover,
.appendix-fab:focus-visible {
    right: 8px;
}

.trivia-app {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(390px, calc(100vw - 28px));
    max-height: 82vh;
    overflow: auto;
    z-index: 50;
    padding: 34px 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(4, 9, 20, 0.96);
    backdrop-filter: blur(5px);
    display: grid;
    gap: 10px;
}

.facts-app {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(390px, calc(100vw - 28px));
    max-height: 82vh;
    overflow: auto;
    z-index: 50;
    padding: 34px 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(4, 9, 20, 0.96);
    backdrop-filter: blur(5px);
    display: grid;
    gap: 10px;
}

.history-app {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(430px, calc(100vw - 28px));
    max-height: 82vh;
    overflow: auto;
    z-index: 50;
    padding: 34px 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(4, 9, 20, 0.96);
    backdrop-filter: blur(5px);
}

.judaism-app {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(430px, calc(100vw - 28px));
    max-height: 82vh;
    overflow: auto;
    z-index: 50;
    padding: 34px 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(4, 9, 20, 0.96);
    backdrop-filter: blur(5px);
}

.events-app {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(440px, calc(100vw - 28px));
    max-height: 82vh;
    overflow: auto;
    z-index: 50;
    padding: 34px 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(4, 9, 20, 0.96);
    backdrop-filter: blur(5px);
}

.phenomena-app,
.appendix-app {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(440px, calc(100vw - 28px));
    max-height: 82vh;
    overflow: auto;
    z-index: 50;
    padding: 34px 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(4, 9, 20, 0.96);
    backdrop-filter: blur(5px);
}

.appendix-app__header {
    font-size: 14px;
    color: #d4e4ff;
    margin-bottom: 8px;
}

.appendix-content {
    font-size: 13px;
    line-height: 1.6;
}

.appendix-content h4 {
    margin: 8px 0 6px;
    color: #cfe2ff;
}

.appendix-content ul {
    margin: 0 0 8px;
    padding-right: 18px;
}

.appendix-content li {
    margin-bottom: 5px;
}

.appendix-content code {
    direction: ltr;
    unicode-bidi: isolate;
    font-family: "Courier New", Courier, monospace;
    background: rgba(255, 255, 255, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
}

.appendix-more {
    margin-top: 12px;
}

.appendix-more a {
    color: #a8cdff;
}

.phenomena-app__header {
    font-size: 14px;
    color: #d4e4ff;
    margin-bottom: 8px;
}

.phenomena-content {
    font-size: 13px;
    line-height: 1.6;
}

.phenomena-content h4 {
    margin: 8px 0 6px;
    color: #cfe2ff;
}

.phenomena-content ul {
    margin: 0 0 8px;
    padding-right: 18px;
}

.phenomena-content li {
    margin-bottom: 5px;
}

.phenomena-sources a {
    color: #a8cdff;
    text-decoration: none;
}

.phenomena-sources a:hover {
    text-decoration: underline;
}

.events-app__header {
    font-size: 14px;
    color: #d4e4ff;
    margin-bottom: 8px;
}

.events-content {
    font-size: 13px;
    line-height: 1.6;
}

.events-content h4 {
    margin: 8px 0 6px;
    color: #cfe2ff;
}

.events-content ul {
    margin: 0 0 8px;
    padding-right: 18px;
}

.events-content li {
    margin-bottom: 5px;
}

.events-sources a {
    color: #a8cdff;
    text-decoration: none;
}

.events-sources a:hover {
    text-decoration: underline;
}

.judaism-app__header {
    font-size: 14px;
    color: #d4e4ff;
    margin-bottom: 8px;
}

.judaism-content {
    font-size: 13px;
    line-height: 1.6;
}

.judaism-content h4 {
    margin: 8px 0 6px;
    color: #cfe2ff;
}

.judaism-content ul {
    margin: 0 0 8px;
    padding-right: 18px;
}

.judaism-content li {
    margin-bottom: 5px;
}

.judaism-sources a {
    color: #a8cdff;
    text-decoration: none;
}

.judaism-sources a:hover {
    text-decoration: underline;
}

.judaism-note {
    font-size: 12px;
    opacity: 0.9;
}

.history-app__header {
    font-size: 14px;
    color: #d4e4ff;
    margin-bottom: 8px;
}

.history-content {
    font-size: 13px;
    line-height: 1.6;
}

.history-content h4 {
    margin: 8px 0 6px;
    color: #cfe2ff;
}

.history-content ul {
    margin: 0 0 8px;
    padding-right: 18px;
}

.history-content li {
    margin-bottom: 5px;
}

.history-sources a {
    color: #a8cdff;
    text-decoration: none;
}

.history-sources a:hover {
    text-decoration: underline;
}

.facts-app__header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    color: #d4e4ff;
}

.verify-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.verify-btn {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(187, 214, 255, 0.6);
    background: rgba(113, 165, 245, 0.22);
    color: #e8f1ff;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.facts-topic {
    font-size: 12px;
    color: #9ec4ff;
}

.facts-content {
    border: 1px solid rgba(154, 194, 255, 0.26);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    padding: 10px;
    line-height: 1.55;
    font-size: 14px;
}

.facts-app__footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.facts-app__footer button {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    border-radius: 7px;
    cursor: pointer;
    padding: 7px 9px;
    min-height: 36px;
}

.trivia-app__header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    color: #d4e4ff;
}

.trivia-question {
    border: 1px solid rgba(154, 194, 255, 0.26);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    padding: 10px;
    line-height: 1.5;
    font-size: 14px;
}

.trivia-options {
    display: grid;
    gap: 6px;
}

.trivia-option {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    padding: 8px 10px;
    text-align: right;
    min-height: 40px;
}

.trivia-option:hover {
    background: rgba(126, 168, 232, 0.26);
}

.trivia-option--correct {
    border-color: rgba(74, 255, 141, 0.7);
    background: rgba(56, 171, 99, 0.28);
}

.trivia-option--wrong {
    border-color: rgba(255, 117, 117, 0.8);
    background: rgba(193, 64, 64, 0.3);
}

.trivia-feedback {
    min-height: 20px;
    font-size: 12px;
    color: #d4e4ff;
}

.trivia-app__footer {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.trivia-app__footer button {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    border-radius: 7px;
    cursor: pointer;
    padding: 7px 9px;
    min-height: 36px;
}

.ui-toggles-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(280px, calc(100vw - 28px));
    z-index: 55;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    background: rgba(6, 14, 32, 0.95);
    display: grid;
    gap: 8px;
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
}

.switch-row input[type="checkbox"] {
    width: 40px;
    height: 22px;
    appearance: none;
    background: #2f3a52;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.switch-row input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.switch-row input[type="checkbox"]:checked {
    background: #3f8cff;
}

.switch-row input[type="checkbox"]:checked::before {
    transform: translateX(18px);
}

.calendar-app {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(360px, calc(100vw - 28px));
    max-height: 78vh;
    overflow: auto;
    z-index: 50;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(4, 9, 20, 0.94);
    backdrop-filter: blur(5px);
}

.calendar-app__header {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.calendar-app__header button {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    padding: 4px 8px;
    min-height: 36px;
    touch-action: manipulation;
}

.calendar-app__close {
    color: #ffb5b5;
}

.calendar-mode-toggle {
    min-width: 56px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}

.calendar-day,
.calendar-weekday {
    text-align: center;
    padding: 5px 0;
    border-radius: 6px;
}

.calendar-weekday {
    font-size: 11px;
    color: #b3c5ff;
}

.calendar-day {
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    font-size: 12px;
}

.calendar-day--today {
    border-color: #68a6ff;
}

.calendar-day--selected {
    background: rgba(104, 166, 255, 0.35);
}

.calendar-day--has-data {
    box-shadow: inset 0 -2px 0 #7cf0a3;
}

.calendar-editor {
    display: grid;
    gap: 8px;
    font-size: 12px;
}

.calendar-editor textarea,
.calendar-editor input {
    width: 100%;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 7px;
}

.calendar-reminder-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 6px;
}

.calendar-notify-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.calendar-reminders {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 5px;
}

.calendar-reminders li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px;
}

.calendar-reminder-meta {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #b7cbef;
}

.calendar-reminders button,
.calendar-actions button,
#calendar-add-reminder {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    padding: 6px 8px;
    min-height: 38px;
    touch-action: manipulation;
}

.calendar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
