/* =========================================================================
   Scan- und Schicht-Animationen im Web-Terminal
   ========================================================================= */

/* ---------------------------------------------------------------- Radar */
.scanfx { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0 6px; }
.sf-radar {
    position: relative; width: 220px; height: 220px; border-radius: 50%; overflow: hidden;
    background: radial-gradient(circle, rgba(47, 224, 228, .14), rgba(4, 7, 13, .95) 70%);
    border: 1px solid rgba(47, 224, 228, .45); box-shadow: 0 0 40px rgba(47, 224, 228, .25), inset 0 0 30px rgba(47, 224, 228, .15);
}
.sf-ring { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px solid rgba(47, 224, 228, .25); transform: translate(-50%, -50%); }
.sf-ring.r1 { width: 33%; height: 33%; } .sf-ring.r2 { width: 66%; height: 66%; } .sf-ring.r3 { width: 96%; height: 96%; }
.sf-cross { position: absolute; inset: 0; background:
    linear-gradient(rgba(47, 224, 228, .18), rgba(47, 224, 228, .18)) center / 1px 100% no-repeat,
    linear-gradient(rgba(47, 224, 228, .18), rgba(47, 224, 228, .18)) center / 100% 1px no-repeat; }
.sf-sweep {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(47, 224, 228, .55), rgba(47, 224, 228, .12) 40deg, transparent 90deg);
    animation: sfSweep 1.1s linear infinite;
}
@keyframes sfSweep { to { transform: rotate(360deg); } }
.sf-blip {
    position: absolute; width: 9px; height: 9px; margin: -4px 0 0 -4px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 10px #2fe0e4, 0 0 20px #2fe0e4; opacity: 0;
    animation: sfBlip 1.4s ease-out forwards;
}
@keyframes sfBlip { 0% { opacity: 0; transform: scale(.3); } 20% { opacity: 1; transform: scale(1.4); } 100% { opacity: .55; transform: scale(1); } }
.sf-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 2.2rem; filter: drop-shadow(0 0 12px #2fe0e4); animation: sfHover 1.2s ease-in-out infinite; }
@keyframes sfHover { 50% { transform: translate(-50%, -58%); } }
.sf-t { font: 700 1.3rem var(--font-display); letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); text-shadow: 0 0 14px rgba(47, 224, 228, .6); }
.sf-s { font: 500 .85rem var(--font-mono); color: var(--text-dim); min-height: 1.2em; }
.sf-bar { width: 220px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.sf-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, transparent, var(--cyan), transparent); animation: sfBar 1s ease-in-out infinite; }
@keyframes sfBar { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------------------------------------------------------------- Scan-Ergebnis */
.scanres .sr-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.sr-ico { font-size: 2.2rem; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 12px; background: rgba(47, 224, 228, .1); border: 1px solid rgba(47, 224, 228, .35); }
.scanres h2 { margin: 0; }
.sr-total { color: var(--text-dim); font-size: .92rem; }
.sr-total b { font: 700 1.6rem var(--font-display); color: var(--text-bright); font-variant-numeric: tabular-nums; margin-right: 4px; }
.sr-chips { margin-bottom: 12px; }
.sr-chip.gold { border-color: var(--gold); color: var(--gold); }
.sr-chip.violet { border-color: var(--violet); color: var(--violet); }
.scanres.is-crit .sr-ico { background: rgba(245, 166, 35, .15); border-color: var(--gold); box-shadow: 0 0 18px rgba(245, 166, 35, .4); }

/* Verteilungs-Balken */
.sr-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; margin: 4px 0 8px; background: rgba(255, 255, 255, .05); }
.sr-seg { display: block; min-width: 4px; transform-origin: left; animation: srGrow .8s var(--ease) both .15s; }
@keyframes srGrow { from { transform: scaleX(0); } }
.sr-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 14px; font-size: .78rem; color: var(--text-dim); }
.sr-leg { display: inline-flex; align-items: center; gap: 6px; }
.sr-leg i { width: 9px; height: 9px; border-radius: 2px; }
.sr-leg b { color: var(--text-bright); }
.sr-legendary.sr-seg, .sr-leg.sr-legendary i { background: var(--r-legendary); }
.sr-epic.sr-seg, .sr-leg.sr-epic i { background: var(--r-epic); }
.sr-rare.sr-seg, .sr-leg.sr-rare i { background: var(--r-rare); }
.sr-common.sr-seg, .sr-leg.sr-common i { background: var(--r-common); }
.sr-junk.sr-seg, .sr-leg.sr-junk i { background: var(--r-junk); }

/* Gruppen nach Qualitaet */
.sr-groups { max-height: min(52vh, 520px); overflow-y: auto; padding-right: 4px; }
.sr-group { margin-bottom: 14px; }
.sr-gh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sr-gh span { font: 700 .82rem var(--font-display); letter-spacing: .16em; text-transform: uppercase; }
.sr-gh b { font: 700 .82rem var(--font-mono); padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.sr-gh i { flex: 1; height: 1px; opacity: .45; }
.sr-gh small { color: var(--text-dim); font-size: .72rem; }
.sr-group.sr-legendary .sr-gh span, .sr-group.sr-legendary .sr-gh b { color: var(--r-legendary); }
.sr-group.sr-legendary .sr-gh i { background: linear-gradient(90deg, var(--r-legendary), transparent); }
.sr-group.sr-epic .sr-gh span, .sr-group.sr-epic .sr-gh b { color: var(--r-epic); }
.sr-group.sr-epic .sr-gh i { background: linear-gradient(90deg, var(--r-epic), transparent); }
.sr-group.sr-rare .sr-gh span, .sr-group.sr-rare .sr-gh b { color: var(--r-rare); }
.sr-group.sr-rare .sr-gh i { background: linear-gradient(90deg, var(--r-rare), transparent); }
.sr-group.sr-common .sr-gh span, .sr-group.sr-common .sr-gh b { color: var(--r-common); }
.sr-group.sr-common .sr-gh i { background: linear-gradient(90deg, var(--r-common), transparent); }
.sr-group.sr-junk .sr-gh span, .sr-group.sr-junk .sr-gh b { color: var(--r-junk); }
.sr-group.sr-junk .sr-gh i { background: linear-gradient(90deg, var(--r-junk), transparent); }
.sr-slot { animation-fill-mode: both; }
.sr-group.sr-legendary .slot { position: relative; overflow: hidden; }
.sr-group.sr-legendary .slot::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 226, 150, .45) 50%, transparent 65%); background-size: 250% 100%;
    animation: srShine 2.4s ease-in-out infinite 1s;
}
@keyframes srShine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.scanres.has-legendary .sr-ico { border-color: var(--r-legendary); box-shadow: 0 0 22px rgba(255, 197, 66, .45); }

/* ---------------------------------------------------------------- Schicht */
.workfx { position: relative; }
.wf-burst { position: absolute; left: 50%; top: 110px; width: 0; height: 0; pointer-events: none; z-index: 3; }
.wf-burst i {
    position: absolute; font-style: normal; font-size: 1.3rem; opacity: 0;
    animation: wfCoin 1.3s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes wfCoin {
    0% { opacity: 0; transform: translate(0, 0) scale(.4); }
    15% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 180px)) rotate(var(--rot)) scale(1); }
}
.wf-stamp {
    display: table; margin: 4px auto 10px; padding: 6px 18px; border: 3px double var(--green); border-radius: 6px;
    font: 700 1.5rem var(--font-display); letter-spacing: .22em; text-transform: uppercase; color: var(--green);
    text-shadow: 0 0 14px rgba(52, 224, 127, .55); transform: rotate(-4deg);
    animation: wfStamp .55s cubic-bezier(.2, 1.6, .4, 1) both;
}
.wf-stamp.bad { border-color: var(--red); color: var(--red); text-shadow: 0 0 14px rgba(255, 77, 106, .55); }
@keyframes wfStamp { from { opacity: 0; transform: rotate(-4deg) scale(2.3); } to { opacity: 1; transform: rotate(-4deg) scale(1); } }
.wf-total { text-align: center; margin: 14px 0 12px; }
.wf-total small { display: block; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); }
.wf-total b { font: 700 2.6rem/1.1 var(--font-display); color: var(--gold); text-shadow: 0 0 20px rgba(245, 166, 35, .45); font-variant-numeric: tabular-nums; }
.wf-total span { margin-left: 6px; color: var(--text-dim); font-weight: 600; }
.wf-rows { display: flex; flex-direction: column; gap: 8px; }
.wf-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: .86rem; }
.wf-row span { color: var(--text-dim); }
.wf-row b { color: var(--text-bright); font-variant-numeric: tabular-nums; }
.wf-row i { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.wf-row em { display: block; height: 100%; width: var(--w); background: var(--green); border-radius: 3px; transform-origin: left; animation: srGrow .9s var(--ease) both .35s; }
.wf-row.bonus em { background: var(--gold); animation-delay: .55s; }
.workfx.loss { animation: wfShake .5s ease both; }
@keyframes wfShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.wf-alarm { text-align: center; font-size: 2.6rem; animation: wfAlarm .8s ease-in-out infinite; }
@keyframes wfAlarm { 50% { opacity: .35; transform: scale(.92); } }

@media (max-width: 560px) {
    .scanres h2 { font-size: 1.15rem; }
    .sr-ico { width: 44px; height: 44px; font-size: 1.7rem; }
    .sr-total b { font-size: 1.3rem; }
    .sr-groups { max-height: 40vh; }
    .sr-groups .slot-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
    .sf-radar { width: 180px; height: 180px; }
    .sf-bar { width: 180px; }
    .wf-row { grid-template-columns: 90px 1fr auto; }
    .wf-total b { font-size: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .sf-sweep, .sf-blip, .sf-core, .sf-bar i, .sr-seg, .sr-group.sr-legendary .slot::after, .wf-stamp, .wf-row em, .workfx.loss, .wf-alarm { animation: none !important; }
    .sf-blip { opacity: .7; }
}

/* Scanner offline waehrend der Expedition */
.act.offline { opacity: .6; cursor: not-allowed; }
.act.offline .ring .prog { stroke: var(--text-dim); }
.act.offline .act-state { color: var(--gold); }
.sr-chip.green { border-color: var(--green); color: var(--green); }

/* =========================================================================
   Scan 2.0 – Traktorstrahl-Szene
   ========================================================================= */
.sx { --bc: #2fe0e4; --bc2: rgba(47, 224, 228, .35); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 2px 0 4px; }
.sx.sx-rare { --bc: #4a8dff; --bc2: rgba(74, 141, 255, .4); }
.sx.sx-epic { --bc: #b06bff; --bc2: rgba(176, 107, 255, .45); }
.sx.sx-legendary { --bc: #ffc542; --bc2: rgba(255, 197, 66, .5); }
.sx-stage {
    position: relative; width: min(420px, 100%); aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden;
    background: radial-gradient(ellipse at 50% 120%, rgba(47, 224, 228, .18), transparent 55%), linear-gradient(180deg, #03050c, #070d1d 60%, #0b1430);
    border: 1px solid rgba(255, 255, 255, .09); box-shadow: inset 0 0 50px rgba(0, 0, 0, .8), 0 16px 40px rgba(0, 0, 0, .5);
    isolation: isolate;
}
/* Sternenfeld in zwei Tiefen */
.sx-stars, .sx-stars2 { position: absolute; inset: -50% 0 0 0; background-repeat: repeat; opacity: .8; z-index: 0; }
.sx-stars { background-image: radial-gradient(1px 1px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 90px 80px, #cfe8ff, transparent), radial-gradient(1.5px 1.5px at 160px 20px, #fff, transparent), radial-gradient(1px 1px at 60px 140px, #fff, transparent), radial-gradient(1px 1px at 190px 120px, #a9d8ff, transparent);
    background-size: 220px 170px; animation: sxDrift 14s linear infinite; }
.sx-stars2 { background-image: radial-gradient(1px 1px at 40px 60px, rgba(255, 255, 255, .6), transparent), radial-gradient(1px 1px at 130px 10px, rgba(255, 255, 255, .5), transparent), radial-gradient(1px 1px at 100px 110px, rgba(255, 255, 255, .5), transparent);
    background-size: 160px 130px; animation: sxDrift 28s linear infinite; opacity: .6; }
@keyframes sxDrift { to { transform: translateY(33%); } }
/* Planetenoberflaeche */
.sx-planet { position: absolute; left: -20%; right: -20%; bottom: -62%; height: 90%; border-radius: 50%; z-index: 1;
    background: radial-gradient(circle at 50% 8%, #2a3d6e, #121d3a 40%, #070c1b 70%); box-shadow: 0 -8px 40px var(--bc2), inset 0 10px 30px rgba(120, 180, 255, .18); transition: box-shadow .5s; }
.sx-planet::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background:
    radial-gradient(ellipse 60px 14px at 30% 10%, rgba(0, 0, 0, .35), transparent), radial-gradient(ellipse 40px 10px at 64% 14%, rgba(0, 0, 0, .3), transparent), radial-gradient(ellipse 26px 8px at 48% 22%, rgba(0, 0, 0, .3), transparent); }
/* Scan-Wellen auf dem Boden */
.sx-wave { position: absolute; left: 50%; bottom: 17%; width: 60px; height: 16px; margin-left: -30px; border-radius: 50%; border: 2px solid var(--bc); opacity: 0; z-index: 2;
    animation: sxWave 1.6s ease-out infinite; }
.sx-wave.w2 { animation-delay: .53s; } .sx-wave.w3 { animation-delay: 1.06s; }
@keyframes sxWave { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(5.2); } }
/* Traktorstrahl */
.sx-beam { position: absolute; left: 50%; top: 23%; bottom: 14%; width: 46%; transform: translateX(-50%); z-index: 3; pointer-events: none;
    clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
    background: linear-gradient(180deg, var(--bc), var(--bc2) 45%, transparent);
    opacity: .55; animation: sxBeam .9s ease-in-out infinite; transition: background .4s; mix-blend-mode: screen; }
.sx-beam::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .28) 0 2px, transparent 2px 14px); animation: sxScan .7s linear infinite; }
@keyframes sxBeam { 50% { opacity: .78; } }
@keyframes sxScan { from { background-position: 0 14px; } to { background-position: 0 0; } }
/* Schiff */
.sx-ship { position: absolute; left: 50%; top: 8%; transform: translateX(-50%); z-index: 5; font-size: 3.6rem; line-height: 1; animation: sxHover 1.6s ease-in-out infinite;
    filter: drop-shadow(0 0 16px var(--bc)); transition: filter .4s; }
.sx-ship .li { width: 1em; height: 1em; }
@keyframes sxHover { 50% { transform: translate(-50%, -6%) rotate(-2deg); } }
/* Fracht, die hochgezogen wird */
.sx-loot { position: absolute; left: 50%; bottom: 15%; z-index: 4; font-size: 1.7rem; line-height: 1; opacity: 0;
    animation: sxPull var(--d, 1.6s) cubic-bezier(.5, 0, .7, 1) var(--dl, 0s) infinite; }
.sx-loot .li { width: 1em; height: 1em; }
@keyframes sxPull {
    0% { opacity: 0; transform: translate(var(--x), 0) rotate(0) scale(.7); }
    12% { opacity: 1; }
    80% { opacity: 1; transform: translate(calc(var(--x) * .15), calc(-1 * var(--h, 170px))) rotate(var(--r)) scale(.9); }
    100% { opacity: 0; transform: translate(0, calc(-1 * var(--h, 170px) - 14px)) rotate(var(--r)) scale(.2); }
}
/* HUD */
.sx-hud { position: absolute; inset: 10px; z-index: 6; pointer-events: none; font: 600 .66rem var(--font-mono); color: var(--bc); letter-spacing: .08em; }
.sx-hud::before, .sx-hud::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid var(--bc); opacity: .7; }
.sx-hud::before { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.sx-hud::after { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.sx-hud .tl { position: absolute; left: 26px; top: 2px; } .sx-hud .tr { position: absolute; right: 4px; top: 2px; text-align: right; }
.sx-hud .bl { position: absolute; left: 4px; bottom: 2px; } .sx-hud .br { position: absolute; right: 26px; bottom: 2px; }
.sx-hud b { color: #fff; font-weight: 700; }
.sx-lock { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; z-index: 6; border: 1.5px solid var(--bc); border-radius: 4px; opacity: 0;
    animation: sxLock 1.2s ease-out var(--dl, 0s) infinite; }
.sx-lock::before, .sx-lock::after { content: ''; position: absolute; background: var(--bc); }
.sx-lock::before { left: 50%; top: -6px; bottom: -6px; width: 1px; } .sx-lock::after { top: 50%; left: -6px; right: -6px; height: 1px; }
@keyframes sxLock { 0% { opacity: 0; transform: scale(2) rotate(45deg); } 25% { opacity: 1; transform: scale(1) rotate(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: scale(.8); } }
.sx-title { font: 700 1.25rem var(--font-display); letter-spacing: .22em; text-transform: uppercase; color: var(--bc); text-shadow: 0 0 16px var(--bc2); transition: color .4s; }
.sx-status { font: 500 .85rem var(--font-mono); color: var(--text-dim); min-height: 1.2em; }
.sx-status::after { content: '▌'; margin-left: 2px; animation: sxCaret .7s steps(1) infinite; color: var(--bc); }
@keyframes sxCaret { 50% { opacity: 0; } }
.sx-prog { display: flex; gap: 4px; width: min(300px, 90%); }
.sx-prog i { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); transition: background .25s, box-shadow .25s; }
.sx-prog i.on { background: var(--bc); box-shadow: 0 0 8px var(--bc); }
/* Enthuellung */
.sx-flash { position: absolute; inset: 0; z-index: 8; background: radial-gradient(circle at 50% 40%, #fff, var(--bc) 30%, transparent 70%); opacity: 0; pointer-events: none; }
.sx.reveal .sx-flash { animation: sxFlash .7s ease-out; }
@keyframes sxFlash { 0% { opacity: 0; } 15% { opacity: .95; } 100% { opacity: 0; } }
.sx-rays { position: absolute; left: 50%; top: 42%; width: 190%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 2; opacity: 0; pointer-events: none;
    background: repeating-conic-gradient(from 0deg, var(--bc2) 0 7deg, transparent 7deg 20deg); mask-image: radial-gradient(circle, #000 10%, transparent 60%); -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 60%); }
.sx.reveal.big .sx-rays { opacity: 1; animation: sxRays 6s linear infinite; transition: opacity .4s; }
@keyframes sxRays { to { transform: translate(-50%, -50%) rotate(360deg); } }
.sx-banner { position: absolute; left: 50%; top: 50%; z-index: 9; transform: translate(-50%, -50%) scale(2.4); opacity: 0; white-space: nowrap; pointer-events: none;
    font: 800 1.35rem var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: #fff;
    text-shadow: 0 0 12px var(--bc), 0 0 30px var(--bc), 0 3px 0 rgba(0, 0, 0, .6); }
.sx-banner small { display: block; text-align: center; font-size: .62rem; letter-spacing: .3em; color: var(--bc); }
.sx.reveal .sx-banner { animation: sxSlam .5s cubic-bezier(.2, 1.4, .4, 1) .12s forwards; }
@keyframes sxSlam { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.sx.reveal .sx-stage { animation: sxShake .45s ease-out .1s; }
@keyframes sxShake { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-2px, 1px); } 80% { transform: translate(1px, 0); } }
.sx.reveal .sx-loot { animation-duration: .6s; }
@media (prefers-reduced-motion: reduce) { .sx-loot, .sx-wave, .sx-stars, .sx-stars2, .sx-lock, .sx-rays { animation: none !important; } }

/* Scan-Ergebnis: Fracht fliegt mit Leuchtspur ein */
.sr-slot { position: relative; }
.sr-group.sr-epic .sr-slot, .sr-group.sr-legendary .sr-slot { animation-name: srBeamIn; animation-duration: .7s; animation-timing-function: cubic-bezier(.2, 1.3, .4, 1); }
@keyframes srBeamIn { 0% { opacity: 0; transform: translateY(-40px) scale(.6); filter: brightness(3); } 60% { opacity: 1; filter: brightness(1.6); } 100% { opacity: 1; transform: none; filter: none; } }
.sr-group.sr-legendary .sr-slot .glyph { animation: srGlow 2s ease-in-out infinite; }
@keyframes srGlow { 50% { filter: drop-shadow(0 0 10px rgba(255, 197, 66, .8)); } }
.slot .glyph .li.li-item { width: 1.6em; height: 1.6em; vertical-align: middle; }

/* =========================================================================
   Neue Schicht-Minispiele
   ========================================================================= */
.mg-big { min-width: 220px; font-size: 1rem; padding: 14px 24px; }
/* Andocken */
.mg-dock { position: relative; height: 110px; margin: 16px 0 6px; border-radius: 14px; overflow: hidden;
    background: radial-gradient(ellipse at 50% 120%, rgba(47, 224, 228, .18), transparent 60%), linear-gradient(180deg, #050915, #0b1430); border: 1px solid var(--line-strong); }
.mg-zone { position: absolute; top: 0; bottom: 0; left: 50%; width: calc(var(--w) * 2); transform: translateX(-50%); }
.mg-zone.good { background: rgba(255, 197, 66, .12); border-left: 1px dashed rgba(255, 197, 66, .5); border-right: 1px dashed rgba(255, 197, 66, .5); }
.mg-zone.perfect { background: rgba(62, 230, 142, .2); border-left: 1px solid var(--green); border-right: 1px solid var(--green); }
.mg-ferry { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font-size: 2.2rem; line-height: 1; filter: drop-shadow(0 0 10px var(--cyan)); }
.mg-ferry .li { width: 1em; height: 1em; }
.mg-ring { position: absolute; top: 14px; width: 54px; height: 54px; margin-left: -27px; border-radius: 50%; border: 4px solid #9aa7bd; box-shadow: 0 0 0 4px rgba(154, 167, 189, .2), inset 0 0 12px rgba(0, 0, 0, .6); transition: border-color .1s, box-shadow .1s; }
.mg-ring::after { content: ''; position: absolute; left: 50%; bottom: -24px; width: 2px; height: 22px; margin-left: -1px; background: linear-gradient(#9aa7bd, transparent); }
.mg-ring.near { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 197, 66, .25), 0 0 14px rgba(255, 197, 66, .5); }
.mg-ring.hit { border-color: var(--green); box-shadow: 0 0 0 5px rgba(62, 230, 142, .3), 0 0 22px rgba(62, 230, 142, .7); }
/* Sortieren */
.mg-sort { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 14px 0 10px; touch-action: none; }
.mg-sort-count { font: 600 .8rem var(--font-mono); color: var(--text-dim); }
.mg-sort-item { font-size: 5rem; line-height: 1; min-height: 5.4rem; }
.mg-sort-item .li { width: 1em; height: 1em; }
.mg-sort-item.pop { animation: mgPop .28s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes mgPop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }
.mg-sort-name { font: 700 1.05rem var(--font-display); letter-spacing: .06em; color: var(--text-bright); }
.mg-bins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mg-bin { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--bg-slot); color: var(--text); font: inherit; cursor: pointer; transition: transform .1s, border-color .15s; }
.mg-bin span { font-size: 1.8rem; line-height: 1; } .mg-bin b { font-size: .8rem; } .mg-bin small { color: var(--text-dim); font-size: .7rem; }
.mg-bin:hover { border-color: var(--cyan); } .mg-bin.hit { transform: scale(.94); border-color: var(--green); }
/* Signal */
.mg-pads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: min(280px, 100%); margin: 16px auto 10px; }
.mg-pad { aspect-ratio: 1; border-radius: 18px; border: 2px solid rgba(255, 255, 255, .12); cursor: pointer; opacity: .45; transition: opacity .1s, transform .1s, box-shadow .1s; }
.mg-pad.p0 { background: linear-gradient(135deg, #2fe0e4, #1486c9); } .mg-pad.p1 { background: linear-gradient(135deg, #ff5fd6, #b0169a); }
.mg-pad.p2 { background: linear-gradient(135deg, #ffc93d, #d9800b); } .mg-pad.p3 { background: linear-gradient(135deg, #3ee68e, #0d9a55); }
.mg-pad:not(:disabled):hover { opacity: .7; }
.mg-pad.lit { opacity: 1; transform: scale(1.05); box-shadow: 0 0 26px rgba(255, 255, 255, .5); }
.mg-pad:disabled { cursor: default; }
.mg-dots { display: flex; justify-content: center; gap: 8px; }
.mg-dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.mg-dots i.ok { background: var(--green); box-shadow: 0 0 8px var(--green); } .mg-dots i.bad { background: var(--red); box-shadow: 0 0 8px var(--red); }
/* Kuehlkreislauf */
.mg-cool { display: flex; gap: 18px; align-items: stretch; justify-content: center; margin: 14px 0 6px; }
.mg-gauge { position: relative; width: 64px; height: 200px; border-radius: 32px; overflow: hidden; background: linear-gradient(0deg, #0b3a66, #10193a 40%, #3a1020); border: 2px solid var(--line-strong); }
.mg-g-burn { position: absolute; left: 0; right: 0; top: 0; background: repeating-linear-gradient(45deg, rgba(255, 61, 94, .5) 0 6px, rgba(255, 61, 94, .25) 6px 12px); }
.mg-g-freeze { position: absolute; left: 0; right: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(91, 155, 255, .5) 0 6px, rgba(91, 155, 255, .25) 6px 12px); }
.mg-g-ok { position: absolute; left: 0; right: 0; background: rgba(62, 230, 142, .28); border-top: 2px solid var(--green); border-bottom: 2px solid var(--green); }
.mg-needle { position: absolute; left: -4px; right: -4px; height: 6px; margin-bottom: -3px; border-radius: 3px; background: #ff7a8a; box-shadow: 0 0 12px #ff7a8a; transition: bottom .1s linear; }
.mg-needle.ok { background: #fff; box-shadow: 0 0 14px var(--green); }
.mg-cool-side { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-width: 130px; }
.mg-cool-pct { font: 700 2.4rem var(--font-display); color: var(--green); line-height: 1; }
.mg-cool-pct small { display: block; font: 500 .75rem var(--font-body, inherit); color: var(--text-dim); }
.mg-cool-left { font: 600 .85rem var(--font-mono); color: var(--text); }
.mg-coolbtn { background: linear-gradient(180deg, #5b9bff, #2346d6); border-color: #9fc2ff; color: #fff; }
.mg-coolbtn.puff { animation: mgPuff .25s ease-out; }
@keyframes mgPuff { 50% { transform: scale(.95); box-shadow: 0 0 24px rgba(159, 194, 255, .8); } }

/* Schicht-Meisterschaft */
.ms-strip { display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); text-align: left; }
.ms-strip.up { border-color: var(--gold); box-shadow: 0 0 18px rgba(255, 197, 66, .25); }
.ms-ic { font-size: 1.8rem; line-height: 1; }
.ms-main { flex: 1; min-width: 0; }
.ms-top { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; }
.ms-top b { color: var(--text-bright); } .ms-top span { color: var(--gold); font-size: .78rem; white-space: nowrap; }
.ms-bar { height: 6px; margin: 6px 0 4px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.ms-bar i { display: block; height: 100%; background: linear-gradient(90deg, #d9894a, var(--gold)); }
.ms-main small { color: var(--text-dim); font-size: .74rem; }
.ms-up { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 197, 66, .12); color: var(--gold); font-size: .85rem; text-align: center; animation: pbPop .5s cubic-bezier(.2, 1.5, .4, 1) both; }
.ms-best { margin-top: 6px; color: var(--gold); font-weight: 700; text-align: center; }
.ms-tiers { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.ms-tiers span { display: flex; flex-direction: column; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font-size: .82rem; }
.ms-tiers b { font-weight: 500; color: var(--text-dim); font-size: .72rem; }
.ms-list { display: grid; gap: 6px; max-height: min(54vh, 480px); overflow-y: auto; }
.ms-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.ms-gic { font-size: 1.5rem; line-height: 1; }
@keyframes pbPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ms-strip, .ms-row, .ms-tiers { font-family: var(--font-body, inherit); letter-spacing: normal; text-transform: none; }
.ms-row .ms-top b, .ms-row small, .ms-strip .ms-top b, .ms-strip small { font-family: inherit; letter-spacing: normal; text-transform: none; }
.ms-tiers { display: grid; grid-template-columns: repeat(2, 1fr); }
.ms-tiers span { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.ms-tiers b { flex-basis: 100%; }
.ms-row.played .ms-top b { color: var(--text-bright); } .ms-row:not(.played) { opacity: .75; }

/* ---------- Schicht-Minispiele: Feinschliff (7.9.0) ---------- */
.mg-shell { position: relative; }
.mg-shell::before { content: ''; position: absolute; inset: -24px -24px auto; height: 140px; pointer-events: none; z-index: -1;
                    background: radial-gradient(60% 100% at 50% 0%, rgba(47, 224, 228, .14), transparent 70%); }
.mg-kicker { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 6px; font: 700 .66rem var(--font-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); }
.mg-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: mgBlink 1s ease-in-out infinite; }
.mg-kicker b { text-transform: none; min-width: 34px; padding: 2px 7px; border-radius: 6px; background: rgba(47, 224, 228, .12); color: var(--text-bright); letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.mg-kicker b.crit { background: rgba(255, 77, 106, .2); color: #ff9aae; }
.mg-kicker b.tock { animation: mgTock .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes mgBlink { 50% { opacity: .25; } }
@keyframes mgTock { 40% { transform: scale(1.35); } }

.mini-timer { position: relative; height: 7px; }
.mini-timer > i { background: linear-gradient(90deg, var(--cyan), #7ff3ff); box-shadow: 0 0 10px rgba(47, 224, 228, .6); transition: width .1s linear, background .3s; }
.mini-timer.warn > i { background: linear-gradient(90deg, #f5a623, #ffd27a); box-shadow: 0 0 10px rgba(245, 166, 35, .6); }
.mini-timer.crit > i { background: linear-gradient(90deg, #ff4d6a, #ff9aae); box-shadow: 0 0 12px rgba(255, 77, 106, .8); animation: mgCrit .5s ease-in-out infinite; }
@keyframes mgCrit { 50% { opacity: .55; } }
.mg-shell:has(.mini-timer.crit) { animation: mgEdge 1s ease-in-out infinite; }
@keyframes mgEdge { 50% { filter: drop-shadow(0 0 14px rgba(255, 77, 106, .35)); } }

/* Auswahl (Mond, Kabel) */
.mini-choice { transition: transform .12s, border-color .15s, box-shadow .15s; }
.mini-choice:active { transform: scale(.92); }
.mini-choice.picked { transform: scale(1.12); border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(47, 224, 228, .25), 0 0 24px rgba(47, 224, 228, .5); }
.mini-choice:disabled:not(.picked) { opacity: .4; }

/* Andocken: Urteil */
.mg-dock.done .mg-ring { transition: none; }
.mg-dock.perfect { box-shadow: inset 0 0 40px rgba(62, 230, 142, .35); }
.mg-dock.good { box-shadow: inset 0 0 30px rgba(255, 197, 66, .3); }
.mg-dock.miss { animation: wfShake .4s ease both; }
.mg-verdict { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 800 1.6rem var(--font-display); letter-spacing: .12em; white-space: nowrap; pointer-events: none;
              animation: mgVerdict .5s cubic-bezier(.2, 1.6, .4, 1) both; text-shadow: 0 2px 12px #000; }
.mg-verdict.perfect { color: var(--green); } .mg-verdict.good { color: var(--gold); } .mg-verdict.miss { color: var(--red); }
@keyframes mgVerdict { from { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } }

/* Sortieren: Flug in den Behaelter */
.mg-fly { position: fixed; z-index: 9500; font-size: 3rem; line-height: 1; pointer-events: none; transform: translate(-50%, -50%); animation: mgFly .4s cubic-bezier(.5, 0, .7, 1) forwards; }
.mg-fly .li { width: 1em; height: 1em; }
@keyframes mgFly { to { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(.3) rotate(25deg); opacity: .2; } }
.mg-bin.hit { box-shadow: 0 0 0 3px rgba(62, 230, 142, .25), 0 0 18px rgba(62, 230, 142, .4); }

/* Signal: Wellen */
.mg-pad { position: relative; overflow: hidden; }
.mg-pad.ripple::after { content: ''; position: absolute; left: 50%; top: 50%; width: 20%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: rgba(255, 255, 255, .55); animation: mgRipple .45s ease-out forwards; }
@keyframes mgRipple { to { width: 220%; opacity: 0; } }
.mg-dots i { transition: transform .2s; } .mg-dots i.ok, .mg-dots i.bad { transform: scale(1.3); }

/* Kuehlkreislauf */
.mg-gauge { transition: box-shadow .2s, border-color .2s; }
.mg-gauge.good { border-color: rgba(62, 230, 142, .6); box-shadow: 0 0 18px rgba(62, 230, 142, .3); }
.mg-gauge.danger { border-color: var(--red); box-shadow: 0 0 22px rgba(255, 77, 106, .55); animation: wfShake .3s linear infinite; }
.mg-gauge.cold { border-color: #5b9bff; box-shadow: 0 0 22px rgba(91, 155, 255, .55); }
.mg-frost { position: absolute; bottom: 10%; font-style: normal; font-size: .9rem; color: #cfe3ff; pointer-events: none; text-shadow: 0 0 6px #5b9bff; animation: mgFrost .85s ease-out both; }
@keyframes mgFrost { to { transform: translate(var(--dx), -120px) rotate(160deg); opacity: 0; } }

/* Reaktor */
.mini-temp.hot { text-shadow: 0 0 18px rgba(245, 166, 35, .6); }
.mini-temp.crit { text-shadow: 0 0 24px rgba(255, 77, 106, .8); }

@media (prefers-reduced-motion: reduce) {
  .mg-kicker i, .mg-kicker b.tock, .mini-timer.crit > i, .mg-shell, .mg-dock.miss, .mg-verdict, .mg-gauge.danger, .mg-pad.ripple::after { animation: none !important; }
}
