/* ASTRONAUTENBAR · NICKERCHEN · V1 */

.nickerchen-page {
    --nap-green: #39d98a;
    --nap-soft: #6fbf8f;
    --nap-pale: #9ce3b9;
    --nap-line: rgba(57, 217, 138, .34);
}

.nickerchen-main { padding-bottom: 12px; }

.nickerchen-title {
    margin: 8px 0 0;
    color: var(--foreground);
    font-size: 1.45rem;
    line-height: 1.25;
    letter-spacing: .07em;
    text-shadow: 1px 0 var(--accent), -1px 0 var(--cyan);
}

.nickerchen-mccoy-section { margin-top: 28px; }

.nickerchen-board {
    padding: 13px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: var(--font-system);
    line-height: 1.9;
    letter-spacing: .025em;
}

.nickerchen-board-active { color: var(--cyan); }

.nickerchen-disclosure {
    max-width: 760px;
    min-height: 0 !important;
    margin-top: 32px;
    padding: 0 !important;
    border-top: 1px solid rgba(57, 217, 138, .22);
    border-bottom: 1px solid rgba(57, 217, 138, .22);
}

.nickerchen-disclosure summary {
    min-height: 56px;
    padding: 14px 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    color: var(--nap-green);
    font-size: var(--font-system);
    letter-spacing: .07em;
}

.nickerchen-disclosure summary::-webkit-details-marker { display: none; }
.nickerchen-disclosure summary > span:nth-child(2) { flex: 1; }
.nickerchen-disclosure-doctor { position: static !important; margin-left: auto; }

.nickerchen-disclosure-content {
    padding: 8px 28px 25px;
    border-left: 1px solid var(--nap-line);
    background: linear-gradient(90deg, rgba(57, 217, 138, .038), rgba(57, 217, 138, 0));
    color: var(--nap-soft);
    font-size: 1rem;
    line-height: 1.75;
}

.nickerchen-disclosure-content p { margin: 0 0 1.05em; }
.nickerchen-disclosure-content p:last-child { margin-bottom: 0; }
.nickerchen-disclosure-content p:first-child { color: var(--nap-green); }

.nickerchen-tool {
    max-width: 760px;
    margin-top: 42px;
    padding-top: 26px;
    border-top: 1px solid var(--nap-line);
}

.nickerchen-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, .6fr);
    gap: 26px 28px;
    align-items: start;
}

.nickerchen-control-label {
    margin-bottom: 10px;
    color: var(--nap-soft);
    font-size: var(--font-meta);
    letter-spacing: .10em;
}

.nickerchen-window-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.nickerchen-window,
.nickerchen-test-button,
.nickerchen-action,
.nickerchen-feedback-actions button {
    appearance: none;
    border-radius: 1px;
    border: 1px solid rgba(57, 217, 138, .3);
    background: transparent;
    color: var(--nap-soft);
    font: inherit;
    cursor: pointer;
}

.nickerchen-window {
    min-height: 67px;
    padding: 10px;
    display: grid;
    gap: 5px;
    text-align: left;
}

.nickerchen-window strong { color: inherit; font-size: var(--font-meta); letter-spacing: .04em; }
.nickerchen-window span { color: rgba(111, 191, 143, .66); font-size: var(--font-micro); letter-spacing: .055em; }

.nickerchen-window.is-selected {
    border-color: rgba(57, 217, 138, .74);
    background: rgba(57, 217, 138, .055);
    box-shadow: inset 0 0 18px rgba(57, 217, 138, .075);
    color: var(--nap-green);
}

.nickerchen-test-button,
.nickerchen-action { padding: 10px 14px; font-size: var(--font-system); letter-spacing: .06em; }
.nickerchen-test-button { width: 100%; color: var(--nap-green); text-align: left; }

.nickerchen-feedback[hidden] { display: none; }

.nickerchen-stage {
    position: relative;
    width: min(100%, 560px);
    aspect-ratio: 1 / .82;
    margin: 42px auto 20px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(57, 217, 138, .18);
    background: radial-gradient(ellipse at center, rgba(57, 217, 138, .055), rgba(57, 217, 138, .012) 47%, transparent 72%);
    transition: background 1.4s ease, border-color 1.4s ease;
}

.nickerchen-orbit {
    position: absolute;
    border: 1px solid rgba(57, 217, 138, .25);
    border-radius: 50%;
    transition: opacity 1.4s ease, transform 1.4s ease;
}


.nickerchen-core {
    position: absolute;
    width: 26%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid rgba(57, 217, 138, .38);
    border-radius: 50%;
    box-shadow: inset 0 0 26px rgba(57, 217, 138, .09), 0 0 24px rgba(57, 217, 138, .09);
    transition: transform 1.4s ease, opacity 1.4s ease;
}

.nickerchen-core i { position: absolute; width: 52%; border-top: 1px solid rgba(156, 227, 185, .42); }
.nickerchen-core i:nth-child(1) { transform: rotate(0deg); }
.nickerchen-core i:nth-child(2) { transform: rotate(60deg); }
.nickerchen-core i:nth-child(3) { transform: rotate(120deg); }

.nickerchen-readout { position: relative; z-index: 2; text-align: center; pointer-events: none; }
.nickerchen-state { color: var(--nap-green); font-size: 1.02rem; letter-spacing: .11em; }
.nickerchen-time { margin-top: 8px; color: var(--nap-pale); font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1; letter-spacing: .04em; }
.nickerchen-detail { max-width: 28ch; margin: 12px auto 0; color: rgba(111,191,143,.68); font-size: var(--font-micro); line-height: 1.55; letter-spacing: .075em; }


.nickerchen-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.nickerchen-start { color: var(--nap-green); border-color: rgba(57,217,138,.65); }
.nickerchen-awake { color: var(--nap-pale); border-color: rgba(156,227,185,.72); }
.nickerchen-action[hidden] { display: none; }
.nickerchen-hint { margin: 15px 0 0; color: rgba(111,191,143,.62); text-align: center; font-size: var(--font-micro); letter-spacing: .055em; }

.nickerchen-feedback {
    margin-top: 28px;
    padding: 18px;
    border: 1px solid rgba(57,217,138,.28);
    background: rgba(57,217,138,.035);
    color: var(--nap-green);
    font-size: var(--font-system);
    letter-spacing: .07em;
}

.nickerchen-feedback p { margin: 9px 0 18px; color: var(--nap-soft); font-size: var(--font-meta); line-height: 1.6; }
.nickerchen-feedback-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.nickerchen-feedback-actions button { padding: 8px 10px; font-size: var(--font-meta); letter-spacing: .045em; }
.nickerchen-feedback-note { margin-bottom: 0 !important; color: var(--nap-pale) !important; }

.nickerchen-research { margin-top: 38px; }
.nickerchen-sources { color: rgba(111,191,143,.62); font-size: var(--font-micro); line-height: 1.65; letter-spacing: .025em; overflow-wrap: anywhere; }
.nickerchen-system-message { color: var(--cyan); font-size: var(--font-system); line-height: 1.75; }

.nickerchen-window:hover,
.nickerchen-window:focus-visible,
.nickerchen-test-button:hover,
.nickerchen-test-button:focus-visible,
.nickerchen-action:hover,
.nickerchen-action:focus-visible,
.nickerchen-feedback-actions button:hover,
.nickerchen-feedback-actions button:focus-visible {
    border-color: rgba(57,217,138,.78);
    color: var(--nap-green);
    background: rgba(57,217,138,.06);
    outline: none;
}

.nickerchen-disclosure summary:focus-visible,
.nickerchen-window:focus-visible,
.nickerchen-test-button:focus-visible,
.nickerchen-action:focus-visible,
.nickerchen-feedback-actions button:focus-visible { outline: 2px solid var(--foreground); outline-offset: 3px; }

@media (max-width: 620px) {
    .nickerchen-settings { grid-template-columns: 1fr; }
    .nickerchen-disclosure summary { padding: 14px; }
    .nickerchen-disclosure-content { padding: 8px 16px 21px; font-size: .96rem; }
    .nickerchen-board { font-size: var(--font-meta); line-height: 1.85; }
    .nickerchen-stage { width: min(94vw, 390px); max-width: 100%; margin-top: 31px; }
    .nickerchen-window-grid { gap: 6px; }
    .nickerchen-window { min-height: 64px; padding: 9px; }
    .nickerchen-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .nickerchen-awake { grid-column: 1 / -1; }
    .nickerchen-action { min-width: 0; }
}

@media (max-width: 380px) {
    .nickerchen-window-grid { grid-template-columns: 1fr; }
    .nickerchen-actions { grid-template-columns: 1fr; }
    .nickerchen-awake { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .nickerchen-orbit,
    .nickerchen-core { animation: none !important; }
}

/* V2-Angleichung: McCoy-Sektionen folgen der gemeinsamen Hauptachse;
   nur das Instrument bleibt als freies Objekt auf der CRT-Fläche zentriert. */
.nickerchen-v2 .nickerchen-terminal-shell {
    width: min(900px, calc(100% - 24px));
}

.nickerchen-v2 .nickerchen-main {
    display: grid;
    gap: 12px;
    padding-bottom: 0;
}

.nickerchen-v2 .nickerchen-title {
    margin: 0;
    padding: 22px 30px 20px;
    color: var(--nap-pale);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .05em;
    text-shadow: 0 0 3px rgba(151,255,198,.56), 0 0 12px rgba(57,217,138,.32);
}

.nickerchen-v2 .nickerchen-mccoy-section {
    margin: 0;
    color: var(--nap-soft);
}

.nickerchen-v2 .nickerchen-board {
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--nap-soft);
    font-size: var(--font-system);
    line-height: 1.9;
}

.nickerchen-v2 .nickerchen-board-time { color: var(--cyan); }
.nickerchen-v2 .nickerchen-board-time.is-late,
.nickerchen-v2 .nickerchen-board-late.is-late {
    color: #f0a550;
}

.nickerchen-v2 .nickerchen-board-spacer { height: .7em; }

.nickerchen-v2 .nickerchen-board-time.is-late {
    animation: napLatePulse 8s ease-in-out infinite;
}

@keyframes napLatePulse {
    0%, 100% { opacity: .7; text-shadow: 0 0 3px rgba(240,165,80,.12); }
    50% { opacity: 1; text-shadow: 0 0 8px rgba(240,165,80,.3); }
}

.nickerchen-v2 .nickerchen-disclosure {
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--life-system-line);
    border-bottom: 1px solid var(--life-system-line);
}

.nickerchen-v2 .nickerchen-disclosure > summary {
    min-height: 76px;
    padding: 24px 30px;
    color: var(--nap-pale);
}

.nickerchen-v2 .nickerchen-disclosure-content {
    margin: 0;
    padding: 0 110px 28px 30px;
    border: 0;
    background: transparent;
    color: var(--nap-soft);
    font-size: .96rem;
    line-height: 1.72;
    animation: napDisclosureReveal .34s ease-out both;
}

@keyframes napDisclosureReveal {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: none; }
}

.nickerchen-v2 .nickerchen-tool {
    width: min(100%, 760px);
    max-width: 760px;
    margin: 18px auto;
    padding: 18px 0 10px;
    border: 0;
}

.nickerchen-v2 .nickerchen-control-label {
    color: var(--nap-pale);
    text-shadow: 0 0 7px rgba(57,217,138,.22);
}

.nickerchen-v2 .nickerchen-window,
.nickerchen-v2 .nickerchen-test-button,
.nickerchen-v2 .nickerchen-action,
.nickerchen-v2 .nickerchen-feedback-actions button {
    border-color: rgba(57,217,138,.5);
    border-radius: 3px;
    background: rgba(5,18,12,.72);
    box-shadow: inset 0 0 13px rgba(57,217,138,.035);
}

.nickerchen-v2 .nickerchen-window.is-selected,
.nickerchen-v2 .nickerchen-action.is-active {
    border-color: var(--nap-pale);
    background: rgba(57,217,138,.11);
    color: var(--nap-pale);
    box-shadow: inset 0 0 20px rgba(57,217,138,.11), 0 0 7px rgba(57,217,138,.2);
    text-shadow: 0 0 6px rgba(151,255,198,.34);
}

/* Bestehender Lebenssysteme-Schreibimpuls: lokale Auswahl wird sichtbar bestätigt. */
button.life-save-flash {
    position: relative;
    overflow: hidden;
}

button.life-save-flash::before {
    content: "";
    position: absolute;
    z-index: 20;
    left: -20%;
    top: 0;
    width: 18%;
    height: 100%;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--cyan) 32%, transparent), transparent);
    pointer-events: none;
    animation: lifeSaveWrite .62s steps(5,end) both;
}

button.life-save-flash::after {
    content: "✓";
    position: absolute;
    z-index: 21;
    top: 2px;
    right: 4px;
    color: var(--cyan);
    font-size: .58rem;
    line-height: 1;
    font-weight: 600;
    text-shadow: 0 0 5px color-mix(in srgb, var(--cyan) 35%, transparent);
    pointer-events: none;
    animation: lifeSaveCheck .95s ease-out both;
}

@keyframes lifeSaveWrite {
    0% { left: -20%; opacity: 0; }
    18% { opacity: .78; }
    72% { opacity: .5; }
    100% { left: 105%; opacity: 0; }
}

@keyframes lifeSaveCheck {
    0% { opacity: 0; transform: scale(.4); }
    18% { opacity: 1; transform: scale(1); }
    72% { opacity: 1; }
    100% { opacity: 0; transform: scale(.86); }
}

.nickerchen-v2 .nickerchen-stage {
    width: min(100%, 520px);
    aspect-ratio: 1 / .78;
    margin: 42px auto 20px;
    overflow: visible;
    border: 0;
    background: transparent;
    filter: drop-shadow(0 0 12px rgba(57,217,138,.055));
}

.nickerchen-v2 .nickerchen-orbit,
.nickerchen-v2 .nickerchen-depth-ring {
    position: absolute;
    width: 86%;
    height: 58%;
    border: 1px solid rgba(57,217,138,.34);
    border-radius: 50%;
    opacity: 0;
    transform-origin: center;
    animation: napSink 25s cubic-bezier(.38,.04,.55,1) infinite;
}

.nickerchen-v2 .nickerchen-orbit::after { display: none; }
.nickerchen-v2 .nickerchen-orbit-a { border-color: rgba(57,217,138,.46); animation-delay: -2s; }
.nickerchen-v2 .nickerchen-orbit-b { width: 74%; height: 50%; border-color: rgba(57,217,138,.28); border-style: solid; animation-delay: -10s; }
.nickerchen-v2 .nickerchen-orbit-c { width: 62%; height: 42%; border-color: rgba(57,217,138,.4); border-style: solid; animation-delay: -18s; }
.nickerchen-v2 .nickerchen-depth-ring-a { width: 94%; height: 64%; border-color: rgba(57,217,138,.38); animation-delay: -6s; }
.nickerchen-v2 .nickerchen-depth-ring-b { width: 78%; height: 53%; border-color: rgba(57,217,138,.5); animation-delay: -14s; }
.nickerchen-v2 .nickerchen-depth-ring-c { width: 68%; height: 46%; border-color: rgba(57,217,138,.26); animation-delay: -22s; }

@keyframes napSink {
    0% { opacity: 0; transform: translateY(-2%) scale(1.18); }
    10% { opacity: .39; }
    58% { opacity: .2; transform: translateY(6%) scale(.58); }
    82% { opacity: .045; transform: translateY(10%) scale(.18); }
    100% { opacity: 0; transform: translateY(11%) scale(.1); }
}

.nickerchen-v2 .nickerchen-core {
    width: 22%;
    border-color: rgba(57,217,138,.24);
    box-shadow: inset 0 0 22px rgba(57,217,138,.055), 0 0 16px rgba(57,217,138,.045);
}

.nickerchen-v2 .nickerchen-stage[data-state] .nickerchen-core { animation: none; }

.nickerchen-v2 .nickerchen-stage[data-state="rest"] {
    background: transparent;
    border: 0;
}

.nickerchen-v2 .nickerchen-stage[data-state="rest"] .nickerchen-orbit,
.nickerchen-v2 .nickerchen-stage[data-state="rest"] .nickerchen-depth-ring {
    animation-duration: 36s;
}

.nickerchen-v2 .nickerchen-stage[data-state="wake"] {
    background: transparent;
    border: 0;
}

.nickerchen-v2 .nickerchen-stage[data-state="wake"] .nickerchen-orbit,
.nickerchen-v2 .nickerchen-stage[data-state="wake"] .nickerchen-depth-ring {
    border-color: rgba(156,227,185,.48);
    animation-name: napRise;
    animation-duration: 18s;
}

@keyframes napRise {
    0% { opacity: 0; transform: translateY(10%) scale(.12); }
    24% { opacity: .13; }
    76% { opacity: .34; transform: translateY(-2%) scale(1.08); }
    100% { opacity: 0; transform: translateY(-3%) scale(1.2); }
}

.nickerchen-v2 .nickerchen-research {
    max-width: none;
    margin: 0;
}

.nickerchen-v2 .nickerchen-closing-section { padding-bottom: 24px; }

.nickerchen-v2 .nickerchen-system-message {
    max-width: none;
    margin: 0;
    padding-right: 80px;
    color: var(--nap-pale);
    line-height: 1.75;
}

.nickerchen-v2 .nickerchen-footer {
    margin: 0;
    padding: 30px 0 0;
}

@media (max-width: 620px) {
    .nickerchen-v2 .nickerchen-title { padding: 18px 14px 16px; font-size: 1.32rem; }
    .nickerchen-v2 .nickerchen-disclosure > summary { min-height: 66px; padding: 20px 14px; gap: 8px; }
    .nickerchen-v2 .nickerchen-disclosure-content { padding: 0 14px 22px; font-size: .94rem; }
    .nickerchen-v2 .nickerchen-tool { margin: 10px auto; padding: 14px 2px 8px; }
    .nickerchen-v2 .nickerchen-stage { width: min(100%, 390px); }
    .nickerchen-v2 .nickerchen-system-message { padding-right: 0; }
    .nickerchen-v2 .nickerchen-footer { padding-top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .nickerchen-v2 .nickerchen-board-time.is-late,
    .nickerchen-v2 .nickerchen-orbit,
    .nickerchen-v2 .nickerchen-depth-ring,
    .nickerchen-v2 .nickerchen-stage[data-state] .nickerchen-core { animation: none !important; }
    button.life-save-flash::before { display: none; }
    button.life-save-flash::after { animation: none; opacity: 1; }
}
