/* RETRO-OS — kujundatud 1024x768 lavale (iPad mini 2 landscape).
   Safari 12: EI kasuta flexbox 'gap', 'inset', 'aspect-ratio', ':is()'. */

@font-face { font-family: 'VT323'; src: url(../fonts/vt323.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF, U+2500-25FF; }
@font-face { font-family: 'VT323'; src: url(../fonts/vt323-ext.woff2) format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Pix'; src: url(../fonts/silkscreen.woff2) format('woff2');
  unicode-range: U+0000-00FF; }
@font-face { font-family: 'Pix'; src: url(../fonts/silkscreen-ext.woff2) format('woff2');
  unicode-range: U+0100-024F; }
@font-face { font-family: 'Pix'; font-weight: 700; src: url(../fonts/silkscreen-bold.woff2) format('woff2');
  unicode-range: U+0000-00FF; }
@font-face { font-family: 'Pix'; font-weight: 700; src: url(../fonts/silkscreen-ext-bold.woff2) format('woff2');
  unicode-range: U+0100-024F; }

:root {
  --g:  #5cff8f;   /* fosfor, hele */
  --g2: #2fbf62;   /* keskmine */
  --g3: #145c2d;   /* tuhm */
  --g4: #072611;   /* väga tuhm */
  --bg: #000;
  --red: #ff2a14;
  --glow: 0 0 6px rgba(92,255,143,.45);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  background: #000; overflow: hidden; position: fixed;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-text-size-adjust: 100%;
}
body { font-family: 'VT323', 'Courier New', monospace; color: var(--g); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.hidden { display: none !important; }

/* ---------- LAVA ---------- */
#stage {
  position: absolute; left: 50%; top: 50%;
  width: 1024px; height: 768px; margin: -384px 0 0 -512px;
  overflow: hidden; background: var(--bg);
  -webkit-transform-origin: 50% 50%; transform-origin: 50% 50%;
}
#views { position: absolute; left: 0; top: 0; width: 1024px; height: 724px; }
.view {
  position: absolute; left: 0; top: 0; width: 1024px; height: 724px;
  display: none; overflow: hidden;
}
.view.active { display: block; }
.view.enter-l { -webkit-animation: enterL .28s steps(6) both; animation: enterL .28s steps(6) both; }
.view.enter-r { -webkit-animation: enterR .28s steps(6) both; animation: enterR .28s steps(6) both; }
@-webkit-keyframes enterL { from { -webkit-transform: translateX(-60px); opacity: 0; } to { -webkit-transform: none; opacity: 1; } }
@keyframes enterL { from { transform: translateX(-60px); opacity: 0; } to { transform: none; opacity: 1; } }
@-webkit-keyframes enterR { from { -webkit-transform: translateX(60px); opacity: 0; } to { -webkit-transform: none; opacity: 1; } }
@keyframes enterR { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }

/* CRT kate: scanline'id + vinjett. Staatiline, seega odav. */
#crt {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 50;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.28) 3px),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 62%, rgba(0,0,0,.55) 100%);
}

/* ---------- NAVIGATSIOON ---------- */
#nav {
  position: absolute; left: 0; bottom: 0; width: 1024px; height: 44px;
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center;
  border-top: 2px solid var(--g3); background: #000; z-index: 20;
  font-family: 'Pix', monospace; font-size: 13px;
}
.nav-arrow { width: 64px; height: 44px; color: var(--g2); font-size: 18px; }
.nav-arrow:active { color: #000; background: var(--g); }
#nav-tabs { -webkit-flex: 1; flex: 1; display: -webkit-flex; display: flex; -webkit-justify-content: center; justify-content: center; }
.nav-tab { padding: 0 14px; height: 44px; line-height: 44px; color: var(--g3); margin: 0 2px; letter-spacing: 1px; }
.nav-tab.on { color: #000; background: var(--g2); }

/* ---------- ÜHISED TERMINALI-ELEMENDID ---------- */
.term-h { color: var(--g2); font-size: 28px; text-shadow: var(--glow); }
.term-list { list-style: none; margin: 6px 0 0; padding: 0; }
.term-list li { font-size: 30px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--glow); }
.term-list li .t { color: var(--g2); }
.term-list li .who { color: #000; background: var(--g2); padding: 0 4px; margin-right: 6px; font-size: 24px; }
.term-list li.dim { color: var(--g3); text-shadow: none; }
.cursor { display: inline-block; width: .55em; background: var(--g); color: transparent; -webkit-animation: blink 1s steps(1) infinite; animation: blink 1s steps(1) infinite; }
@-webkit-keyframes blink { 50% { opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 1. TERMINAL ---------- */
.view-term { padding: 18px 40px; }
.term-status {
  display: -webkit-flex; display: flex; -webkit-justify-content: space-between; justify-content: space-between;
  font-size: 24px; color: #000; background: var(--g2); padding: 0 10px; height: 30px; line-height: 30px;
}
.home-main { display: -webkit-flex; display: flex; margin-top: 18px; height: 360px; }
.home-clock { width: 560px; }
.big-clock { font-size: 232px; line-height: 200px; letter-spacing: -4px; text-shadow: 0 0 14px rgba(92,255,143,.55); margin-top: 6px; }
.big-clock .colon.off { opacity: .15; }
.clock-date { font-size: 40px; margin-top: 14px; text-shadow: var(--glow); }
.clock-sub { font-size: 28px; color: var(--g2); }
.home-today { -webkit-flex: 1; flex: 1; border-left: 2px dashed var(--g3); padding-left: 24px; margin-left: 10px; min-width: 0; }
.home-fortune { border: 2px solid var(--g3); padding: 10px 18px 14px; height: 196px; position: relative; }
.fortune-text { font-size: 38px; line-height: 1.12; text-shadow: var(--glow); margin-top: 4px; }
.fortune-text .src { display: block; color: var(--g2); font-size: 28px; margin-top: 6px; }
.home-msg { margin-top: 14px; font-size: 28px; color: var(--g2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 34px; }
.home-msg b { font-weight: normal; color: #000; background: var(--g); padding: 0 6px; margin-right: 8px; }

/* ---------- MAC-STIILIS GUI (rohelises monokroomis) ---------- */
.mac-menubar {
  height: 30px; line-height: 30px; border-bottom: 2px solid var(--g); padding: 0 12px;
  font-family: 'Pix', monospace; font-size: 14px; position: relative; background: #000;
}
.mac-menubar span { margin-right: 22px; }
.mac-logo { font-size: 18px; }
.mac-menu-right { position: absolute; right: 0; top: 0; margin-right: 12px !important; }
.mac-desktop {
  position: absolute; left: 0; top: 30px; right: 0; bottom: 0;
  /* 2x2 dither muster */
  background-color: #000;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='1' height='1' fill='%23145c2d'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23145c2d'/%3E%3C/svg%3E");
}
.mac-window { background: #000; border: 2px solid var(--g); box-shadow: 4px 4px 0 var(--g3); }
.mac-titlebar {
  height: 26px; position: relative; border-bottom: 2px solid var(--g);
  background: repeating-linear-gradient(to bottom, #000 0, #000 3px, var(--g2) 3px, var(--g2) 4px);
  background-clip: content-box; padding: 4px 3px;
  text-align: center; font-family: 'Pix', monospace; font-size: 14px; line-height: 18px;
}
.mac-title { background: #000; padding: 0 12px; position: relative; top: -1px; }
.mac-close { position: absolute; left: 10px; top: 4px; width: 16px; height: 16px; border: 2px solid var(--g); background: #000; }
.mac-statusbar {
  height: 28px; line-height: 26px; border-top: 2px solid var(--g); padding: 0 10px;
  font-family: 'Pix', monospace; font-size: 12px; color: var(--g2);
  display: -webkit-flex; display: flex; -webkit-justify-content: space-between; justify-content: space-between;
}
.mac-btn {
  font-family: 'Pix', monospace; font-size: 15px; padding: 8px 18px; min-width: 110px;
  border: 2px solid var(--g); border-radius: 10px; color: var(--g); background: #000; margin: 0 6px;
}
.mac-btn:active, .mac-btn.pressed { background: var(--g); color: #000; }
.mac-btn-default { box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--g); }
.mac-btn-row { text-align: center; padding: 12px 0 14px; }
.mac-icons { position: absolute; right: 18px; top: 24px; width: 90px; text-align: center; font-family: 'Pix', monospace; font-size: 11px; }
.mac-icon { margin-bottom: 26px; }
.mac-icon div:last-child { background: #000; display: inline-block; padding: 1px 4px; margin-top: 4px; }
.mac-icon-img { width: 40px; height: 32px; margin: 0 auto; border: 2px solid var(--g); background: #000; position: relative; }
.mac-icon-img.disk:after { content: ''; position: absolute; left: 4px; bottom: 4px; width: 6px; height: 3px; background: var(--g); }
.mac-icon-img.trash { width: 30px; height: 36px; border-top-width: 4px;
  background: repeating-linear-gradient(to right, #000 0, #000 5px, var(--g2) 5px, var(--g2) 6px); }

/* ---------- 2. KALENDER ---------- */
.cal-window { position: absolute; left: 18px; top: 14px; width: 870px; height: 664px; }
.cal-grid { height: 606px; display: -webkit-flex; display: flex; }
.cal-day { -webkit-flex: 1; flex: 1; border-right: 1px solid var(--g3); min-width: 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.cal-day:last-child { border-right: 0; }
.cal-dayhead { height: 52px; text-align: center; border-bottom: 2px solid var(--g3); padding-top: 4px; }
.cal-dayhead .dn { font-family: 'Pix', monospace; font-size: 13px; color: var(--g2); }
.cal-dayhead .dd { font-size: 30px; line-height: 26px; }
.cal-day.today .cal-dayhead { background: var(--g); color: #000; }
.cal-day.today .cal-dayhead .dn { color: #000; }
.cal-day.pastday { opacity: .5; }
.cal-day.weekend { background: rgba(20,92,45,.18); }
.cal-events { -webkit-flex: 1; flex: 1; overflow: hidden; padding: 4px 4px; }
.cal-ev { border: 1px solid var(--g2); margin-bottom: 5px; padding: 2px 4px 3px; font-size: 21px; line-height: 19px; overflow: hidden; }
.cal-ev .tm { display: block; font-size: 18px; color: var(--g2); }
.cal-ev .who { float: right; color: #000; background: var(--g2); padding: 0 3px; font-size: 16px; line-height: 17px; margin-left: 3px; }
.cal-ev .ev-ico { font-size: 26px; line-height: 26px; margin-right: 4px; vertical-align: -3px; }
.cal-ev.allday { background: var(--g2); color: #000; border-color: var(--g2); }
.cal-ev.allday .who { background: #000; color: var(--g2); }
.cal-ev.past { opacity: .4; }
.cal-ev.now { border: 2px solid var(--g); box-shadow: 0 0 6px rgba(92,255,143,.6); }
.cal-more { font-size: 18px; color: var(--g2); text-align: center; }
.cal-empty { color: var(--g3); text-align: center; font-size: 20px; margin-top: 10px; }
#cal-legend span { margin-left: 12px; }

/* ---------- 3. AI-SILM ---------- */
.view-hal { background: #000; }
#hal-eye { position: absolute; left: 322px; top: 10px; width: 380px; height: 380px; }
.hal-side { position: absolute; top: 40px; width: 270px; }
.hal-left { left: 40px; }
.hal-right { right: 40px; text-align: right; font-size: 24px; line-height: 34px; color: var(--g2); }
.hal-right b { font-weight: normal; color: var(--g); text-shadow: var(--glow); }
.hal-name { font-family: 'Pix', monospace; font-weight: 700; font-size: 34px; line-height: 40px; text-shadow: var(--glow); }
.hal-name span { display: inline-block; background: var(--g); color: #000; padding: 0 8px; margin-top: 4px; text-shadow: none; }
.hal-sub { font-family: 'Pix', monospace; font-size: 12px; color: var(--g2); margin-top: 14px; letter-spacing: 1px; }
.hal-console { position: absolute; left: 30px; right: 30px; top: 404px; bottom: 14px; border: 2px solid var(--g3); overflow: hidden; }
.hal-console-h {
  display: -webkit-flex; display: flex; -webkit-justify-content: space-between; justify-content: space-between;
  height: 30px; line-height: 30px; padding: 0 12px; font-size: 24px; color: #000; background: var(--g3);
}
#hal-lines { padding: 10px 16px 0; }
#hal-lines div { font-size: 31px; line-height: 1.15; color: var(--g); text-shadow: var(--glow); margin-bottom: 10px; }
#hal-lines div.old { color: var(--g2); text-shadow: none; }
#hal-lines div.sys { color: var(--g3); text-shadow: none; font-size: 24px; }

/* ---------- 4. LOOSIRATAS ---------- */
.wheel-wrap { position: absolute; left: 40px; top: 52px; width: 600px; height: 600px; }
#wheel { width: 600px; height: 600px; }
.wheel-pointer {
  position: absolute; left: 50%; top: -28px; margin-left: -20px; width: 0; height: 0; z-index: 2;
  border-left: 20px solid transparent; border-right: 20px solid transparent; border-top: 44px solid var(--g);
}
.wheel-side { position: absolute; left: 680px; top: 60px; width: 310px; }
.wheel-side-body { padding: 16px 14px 0; }
.wheel-q { font-size: 32px; line-height: 30px; text-shadow: var(--glow); min-height: 64px; }
.wheel-presets { margin: 10px 0; }
.wheel-presets button { display: block; width: 100%; text-align: left; font-size: 24px; padding: 4px 8px; color: var(--g2); border: 1px solid var(--g3); margin-bottom: 6px; }
.wheel-presets button.on { color: #000; background: var(--g2); border-color: var(--g2); }
.wheel-result { font-size: 48px; text-align: center; height: 70px; line-height: 70px; border: 2px dashed var(--g3); margin: 14px 0 4px; overflow: hidden; white-space: nowrap; }
.wheel-result.win { border-style: solid; border-color: var(--g); background: var(--g); color: #000; -webkit-animation: blink .5s steps(1) 6; animation: blink .5s steps(1) 6; }

/* ---------- 5. HELID ---------- */
.view-sound { padding: 22px 40px; }
.sound-h { margin-bottom: 16px; }
.sound-grid { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin: 0 -8px; }
.sbtn {
  width: 220px; height: 196px; margin: 8px; border: 2px solid var(--g2); border-radius: 12px;
  text-align: center; position: relative; background: #000; box-shadow: 4px 4px 0 var(--g3);
}
.sbtn .ico { font-size: 64px; line-height: 110px; height: 110px; display: block; text-shadow: var(--glow); }
.sbtn .lbl { font-family: 'Pix', monospace; font-size: 15px; display: block; color: var(--g2); }
.sbtn.pressed, .sbtn:active { background: var(--g); box-shadow: none; -webkit-transform: translate(4px,4px); transform: translate(4px,4px); }
.sbtn.pressed .ico, .sbtn.pressed .lbl, .sbtn:active .ico, .sbtn:active .lbl { color: #000; text-shadow: none; }

/* ---------- KATTED ---------- */
.overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 30; background: rgba(0,0,0,.6); }
.alert-box { position: absolute; left: 212px; top: 190px; width: 600px; }
.alert-body { display: -webkit-flex; display: flex; padding: 22px 26px 6px; }
.alert-icon {
  width: 64px; height: 64px; border: 3px solid var(--g); border-radius: 32px; text-align: center;
  font-family: 'Pix', monospace; font-weight: 700; font-size: 40px; line-height: 58px; margin-right: 22px; -webkit-flex-shrink: 0; flex-shrink: 0;
}
.alert-text { font-size: 38px; line-height: 1.12; text-shadow: var(--glow); word-wrap: break-word; min-width: 0; }

#night { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #000; z-index: 40; }
#night-clock { position: absolute; font-size: 96px; color: var(--g3); left: 400px; top: 320px; }

#boot { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #000; z-index: 45; padding: 36px 46px; }
#boot-text { font-family: 'VT323', monospace; font-size: 30px; line-height: 1.15; margin: 0; text-shadow: var(--glow); white-space: pre-wrap; }
#boot-press { position: absolute; left: 0; width: 100%; bottom: 90px; text-align: center; font-size: 44px; -webkit-animation: blink 1.2s steps(1) infinite; animation: blink 1.2s steps(1) infinite; }

#debug {
  position: absolute; left: 10px; top: 10px; width: 600px; max-height: 400px; overflow: hidden; z-index: 60;
  background: rgba(0,0,0,.92); border: 2px solid var(--red); color: #ff8a70; font-size: 20px; padding: 8px; white-space: pre-wrap;
}

/* ---------- ILM ---------- */
.home-weather { font-size: 28px; margin-top: 12px; color: var(--g); text-shadow: var(--glow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 545px; }
.home-weather .k { color: #000; background: var(--g2); padding: 0 6px; margin-right: 8px; }
.home-weather .d { color: var(--g2); }

.view-weather { padding: 16px 30px 0; }
.wx-top { display: -webkit-flex; display: flex; height: 214px; -webkit-align-items: center; align-items: center; }
.wx-art { font-family: 'VT323', monospace; font-size: 34px; line-height: 34px; margin: 0; width: 290px; text-shadow: var(--glow); }
.wx-now { width: 300px; }
.wx-place { font-family: 'Pix', monospace; font-size: 16px; color: var(--g2); letter-spacing: 2px; }
.wx-temp { font-size: 150px; line-height: 128px; text-shadow: 0 0 12px rgba(92,255,143,.5); }
.wx-temp .deg { font-size: 70px; vertical-align: top; line-height: 70px; margin-left: 4px; }
.wx-desc { font-size: 32px; }
.wx-cdate { font-size: 18px; color: var(--g2); text-align: center; margin-top: 4px; }
.wx-details { -webkit-flex: 1; flex: 1; font-size: 27px; line-height: 36px; border-left: 2px dashed var(--g3); padding-left: 22px; }
.wx-details .k { display: inline-block; width: 112px; color: var(--g2); }
.wx-h-title { font-size: 24px; margin-top: 2px; }
.wx-hours { display: -webkit-flex; display: flex; height: 138px; border-bottom: 2px solid var(--g3); margin-bottom: 14px; }
.wx-h { -webkit-flex: 1; flex: 1; text-align: center; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.wx-ht { font-size: 22px; height: 24px; }
.wx-bar-wrap { -webkit-flex: 1; flex: 1; position: relative; margin: 0 14px; }
.wx-bar { position: absolute; left: 0; bottom: 0; width: 100%; border: 2px solid var(--g); border-bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='1' height='1' fill='%232fbf62'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%232fbf62'/%3E%3C/svg%3E"); }
.wx-bar.night { border-color: var(--g2); background-image: none; background-color: var(--g4); }
.wx-hh { font-size: 22px; color: var(--g2); height: 22px; line-height: 22px; }
.wx-hp { font-size: 18px; color: var(--g); height: 20px; line-height: 20px; }
.wx-days { display: -webkit-flex; display: flex; margin: 0 -5px; }
.wx-card { -webkit-flex: 1; flex: 1; margin: 0 5px; height: 254px; min-width: 0; box-shadow: 3px 3px 0 var(--g3); }
.wx-card .mac-titlebar { font-size: 12px; }
.wx-card.today { border-color: var(--g); box-shadow: 0 0 8px rgba(92,255,143,.5); }
.wx-card.weekend .mac-title { text-decoration: underline; }
.wx-sart { font-family: 'VT323', monospace; font-size: 22px; line-height: 21px; margin: 2px 0 2px; text-align: center; color: var(--g); }
.wx-cdesc { font-size: 18px; color: var(--g2); text-align: center; height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.wx-ctemp { font-size: 34px; text-align: center; text-shadow: var(--glow); }
.wx-ctemp span { font-size: 24px; color: var(--g2); margin-left: 8px; }
.wx-cline { font-size: 18px; padding: 0 8px; white-space: nowrap; overflow: hidden; }
.wx-cline .k { color: var(--g2); margin-right: 5px; }
.wx-status { position: absolute; left: 30px; bottom: 4px; font-family: 'Pix', monospace; font-size: 10px; color: var(--g3); }

/* ---------- KÜLALISREŽIIM / LUKK ---------- */
.nav-lock { height: 44px; padding: 0 14px; font-family: 'Pix', monospace; font-size: 13px; letter-spacing: 1px;
  color: var(--g2); border-left: 2px solid var(--g3); }
.nav-lock.on { color: #000; background: var(--g); }
.pin-box { position: absolute; left: 332px; top: 70px; width: 360px; }
.pin-display { font-size: 64px; text-align: center; letter-spacing: 8px; margin-top: 14px; text-shadow: var(--glow); }
.pin-msg { font-size: 24px; text-align: center; color: var(--g2); height: 30px; }
.pin-pad { padding: 8px 18px 20px; overflow: hidden; }
.pin-key { float: left; width: 92px; min-width: 0; height: 64px; margin: 6px; padding: 0; font-family: 'VT323', monospace; font-size: 40px; border-radius: 8px; }
.pin-key:nth-child(10), .pin-key:nth-child(12) { font-family: 'Pix', monospace; font-size: 12px; }
.pin-box.shake { -webkit-animation: shake .4s steps(8); animation: shake .4s steps(8); }
@-webkit-keyframes shake { 25% { -webkit-transform: translateX(-12px); } 75% { -webkit-transform: translateX(12px); } }
@keyframes shake { 25% { transform: translateX(-12px); } 75% { transform: translateX(12px); } }

/* ---------- UUDISED ---------- */
.home-fortune { height: 164px !important; }
.home-news { margin-top: 12px; font-size: 28px; height: 32px; line-height: 32px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--glow); }
.home-news .k { color: #000; background: var(--g2); padding: 0 6px; margin-right: 10px; text-shadow: none; }
.home-news .t { color: var(--g2); margin-right: 6px; }
.home-news .cursor { display: none; }

.view-news { padding: 14px 30px 0; }
.news-head { margin-bottom: 8px; }
.news-list { height: 660px; overflow: hidden; }
.news-row { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; height: 59px; border-bottom: 1px solid var(--g4); }
.news-rank { width: 46px; font-size: 30px; color: var(--g3); -webkit-flex-shrink: 0; flex-shrink: 0; }
.news-thumb { position: relative; width: 88px; height: 50px; overflow: hidden; border: 1px solid var(--g3); background: var(--g4); -webkit-flex-shrink: 0; flex-shrink: 0; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block;
  -webkit-filter: grayscale(1) contrast(1.25) brightness(.95); filter: grayscale(1) contrast(1.25) brightness(.95); }
.news-thumb i { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #5cff8f; mix-blend-mode: multiply; }
.news-thumb i:after { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 1px, rgba(0,0,0,.35) 2px); }
.news-thumb.noimg { text-align: center; font-family: 'Pix', monospace; font-size: 11px; line-height: 50px; color: var(--g3); }
.news-title { -webkit-flex: 1; flex: 1; min-width: 0; font-size: 24px; line-height: 26px; padding: 0 16px; max-height: 52px; overflow: hidden; text-shadow: var(--glow); }
.news-time { width: 120px; text-align: right; font-size: 19px; line-height: 21px; color: var(--g2); -webkit-flex-shrink: 0; flex-shrink: 0; }
.news-time b { font-weight: normal; color: var(--g); font-size: 24px; }
.news-row.top { height: 120px; }
.news-row.top .news-rank { color: var(--g); }
.news-row.top .news-thumb { width: 180px; height: 104px; }
.news-row.top .news-title { font-size: 36px; line-height: 34px; max-height: 104px; }
.news-cat { display: inline-block; font-family: 'Pix', monospace; font-size: 11px; line-height: 14px; vertical-align: 3px; color: #000; background: var(--g3); padding: 0 5px; margin-right: 8px; text-shadow: none; }
.news-row.top .news-cat { font-size: 13px; line-height: 16px; vertical-align: 6px; }
.news-empty { color: var(--g3); font-size: 30px; padding: 20px; }

/* ---------- MÄNGUD (lastele: värvid lubatud) ---------- */
.view-game { background: #0b0b14; }
body.in-extra #crt { opacity: .35; }
.game-head { height: 60px; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center;
  font-family: 'Pix', monospace; font-weight: 700; font-size: 26px; color: #fff; padding: 0 16px; }
.game-back { width: 80px; height: 50px; margin-right: 18px; border: 3px solid #fff; border-radius: 12px; color: #fff; font-size: 24px; }
.game-back:active { background: #fff; color: #000; }
.nav-games { color: #ffd400; }
.game-cards { display: -webkit-flex; display: flex; -webkit-justify-content: center; justify-content: center; margin-top: 50px; }
.game-card { width: 380px; height: 460px; margin: 0 24px; border-radius: 28px; text-align: center; box-shadow: 0 10px 0 rgba(0,0,0,.5); border: 6px solid #fff; }
.game-card:active { -webkit-transform: translateY(8px); transform: translateY(8px); box-shadow: 0 2px 0 rgba(0,0,0,.5); }
.game-card span { display: block; font-size: 200px; line-height: 330px; }
.game-card b { display: block; font-family: 'Pix', monospace; font-size: 34px; color: #000; }

.drum-pads { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; padding: 0 12px; }
.drum-pad { width: 238px; height: 140px; margin: 6px; border-radius: 22px; text-align: center; border: 4px solid rgba(255,255,255,.7);
  box-shadow: 0 6px 0 rgba(0,0,0,.55); }
.drum-pad span { font-size: 76px; line-height: 132px; }
.drum-pad.hit { -webkit-animation: padhit .25s ease-out; animation: padhit .25s ease-out; }
@-webkit-keyframes padhit { 0% { -webkit-transform: scale(.92); background-color: #fff; } 100% { -webkit-transform: none; } }
@keyframes padhit { 0% { transform: scale(.92); background-color: #fff; } 100% { transform: none; } }
.seq-wrap { display: -webkit-flex; display: flex; padding: 16px 18px 0; }
.seq { -webkit-flex: 1; flex: 1; }
.seq-row { display: -webkit-flex; display: flex; height: 62px; -webkit-align-items: center; align-items: center; }
.seq-ico { width: 60px; font-size: 36px; text-align: center; }
.seq-cell { -webkit-flex: 1; flex: 1; height: 50px; margin: 0 4px; border: 3px solid #444; border-radius: 10px; background: #1a1a26; }
.seq-cell.beat { border-color: #777; }
.seq-cell.cur { box-shadow: 0 0 0 3px #fff; }
.seq-cell.on.cur { -webkit-filter: brightness(1.5); filter: brightness(1.5); }
.seq-ctrl { width: 170px; text-align: center; padding-left: 12px; }
.seq-btn { width: 150px; height: 90px; border: 4px solid #fff; border-radius: 18px; color: #fff; font-size: 44px; margin-bottom: 14px; background: #1a1a26; }
.seq-btn.on { background: #5cff8f; color: #000; }
.seq-btn.small { width: 56px; height: 56px; font-size: 30px; border-radius: 12px; margin-bottom: 14px; }
.seq-tempo { color: #fff; font-size: 30px; white-space: nowrap; }
.seq-tempo span { display: inline-block; width: 40px; }
.seq-tempo .seq-btn.small { margin-bottom: 14px; width: 52px; }

.draw-frame { position: absolute; left: 16px; top: 66px; width: 820px; height: 644px; border: 2px solid #fff; background: #000; }
#draw-canvas { display: block; width: 816px; height: 640px; }
.draw-frame.shake { -webkit-animation: shake .5s steps(10); animation: shake .5s steps(10); }
.draw-tools { position: absolute; left: 852px; top: 66px; width: 156px; }
.draw-colors { overflow: hidden; padding: 6px 0 0 6px; margin: -6px 0 0 -6px; }
.draw-swatch { float: left; width: 66px; height: 66px; margin: 0 8px 8px 0; border-radius: 33px; border: 4px solid #333; }
.draw-swatch.on { border-color: #fff; box-shadow: 0 0 0 3px #000, 0 0 0 6px #fff; }
.draw-row { display: -webkit-flex; display: flex; -webkit-justify-content: space-between; justify-content: space-between; margin-top: 8px; }
.draw-size { width: 46px; height: 46px; border: 3px solid #555; border-radius: 10px; display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; }
.draw-size i { display: block; background: #fff; }
.draw-size.on { border-color: #fff; }
.draw-tool { width: 74px; height: 60px; border: 3px solid #fff; border-radius: 12px; color: #fff; font-family: 'Pix', monospace; font-size: 11px; line-height: 54px; text-align: center; }
.draw-tool.on { background: #fff; color: #000; }
.draw-tool:active { background: #ffd400; color: #000; }

/* Noolekolmnurgad CSS-iga: iOS joonistab tähemärgid ◀ ▶ värviliste emojidena */
.tri { display: inline-block; width: 0; height: 0; vertical-align: middle;
  border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.tri.l { border-right: 13px solid currentColor; }
.tri.r { border-left: 13px solid currentColor; }
.game-back .tri { border-top-width: 11px; border-bottom-width: 11px; border-right-width: 18px; }
.seq-play .tri { border-top-width: 20px; border-bottom-width: 20px; border-left-width: 32px; margin-left: 8px; }
.seq-play .sq { display: inline-block; width: 30px; height: 30px; background: currentColor; vertical-align: middle; }

/* ---------- RAKETT (missioonijuhtimine) ---------- */
.game-card { width: 290px !important; height: 420px !important; margin: 0 14px !important; }
.game-card span { font-size: 160px !important; line-height: 300px !important; }
.game-card b { font-size: 28px !important; }

.view-rocket { background: #0a140e; }
.view-rocket .game-head { color: #5cff8f; }
.view-rocket .game-back { border-color: #5cff8f; color: #5cff8f; }
.rk-col { position: absolute; top: 66px; width: 270px; height: 648px; }
.rk-left-col { left: 12px; }
.rk-right-col { left: 742px; }
.rk-mod { position: relative; background: #12241a; border: 2px solid #2a4a35; border-radius: 10px; height: 154px; margin-bottom: 9px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.05), 0 3px 0 #000; padding: 8px 12px; }
.rk-mod:before, .rk-mod:after { content: ''; position: absolute; top: 6px; width: 6px; height: 6px; border-radius: 3px; background: #2f4d3a; }
.rk-mod:before { left: 6px; } .rk-mod:after { right: 6px; }
.rk-mh { display: -webkit-flex; display: flex; -webkit-justify-content: space-between; justify-content: space-between; -webkit-align-items: center; align-items: center;
  font-family: 'Pix', monospace; font-size: 13px; color: #5cff8f; height: 26px; padding: 0 8px; }
.rk-lamp { display: block; width: 22px; height: 22px; border-radius: 11px; background: #5a1510; border: 2px solid #1d2a22; box-shadow: inset 0 -3px 0 rgba(0,0,0,.35); }
.rk-lamp.on { background: #5cff8f; box-shadow: 0 0 10px #5cff8f; }
.rk-lamp.warn { background: #ffb000; box-shadow: 0 0 10px #ffb000; }
.rk-lamp.hint { -webkit-animation: rkhint .7s steps(1) infinite; animation: rkhint .7s steps(1) infinite; }
@-webkit-keyframes rkhint { 50% { background: #ffb000; box-shadow: 0 0 12px #ffb000; } }
@keyframes rkhint { 50% { background: #ffb000; box-shadow: 0 0 12px #ffb000; } }

/* toitehoob */
.rk-lever { position: relative; width: 120px; height: 104px; margin: 6px auto 0; border-radius: 10px; background: #050a07; border: 2px solid #2a4a35; }
.rk-lever b { position: absolute; left: 8px; width: 100px; height: 40px; top: 56px; border-radius: 8px; background: #9a9a9a;
  box-shadow: inset 0 -6px 0 #666, 0 3px 0 #000; -webkit-transition: top .12s; transition: top .12s; }
.rk-lever.on b { top: 4px; background: #5cff8f; box-shadow: inset 0 -6px 0 #2fbf62, 0 0 14px rgba(92,255,143,.6); }
.rk-lever span { position: absolute; right: -2px; font-family: 'Pix', monospace; font-size: 9px; color: #2f4d3a; display: none; }

/* kütus */
.rk-fuel-row, .rk-crew-row { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: space-around; justify-content: space-around; height: 112px; }
.rk-hold { width: 104px; height: 104px; border-radius: 52px; background: #1f5a33; border: 4px solid #5cff8f; color: #5cff8f; font-family: 'Pix', monospace; font-size: 16px;
  box-shadow: 0 6px 0 #000; }
.rk-hold.down { background: #5cff8f; color: #000; -webkit-transform: translateY(4px); transform: translateY(4px); box-shadow: 0 2px 0 #000; }
.rk-gauge { position: relative; width: 44px; height: 100px; border: 3px solid #5cff8f; border-radius: 6px; background: #050a07; overflow: hidden; }
.rk-gauge-fill { position: absolute; left: 0; bottom: 0; width: 100%; height: 0; background: repeating-linear-gradient(to top, #5cff8f 0, #5cff8f 6px, #2fbf62 6px, #2fbf62 8px); }

/* meeskond */
.rk-crew { width: 110px; height: 100px; border-radius: 16px; background: #1f5a33; border: 4px solid #5cff8f; font-size: 60px; line-height: 88px; box-shadow: 0 6px 0 #000; }
.rk-crew:active { -webkit-transform: translateY(4px); transform: translateY(4px); box-shadow: 0 2px 0 #000; }
.rk-dots { width: 40px; }
.rk-dot { display: block; width: 26px; height: 26px; border-radius: 13px; margin: 5px auto; background: #1d2a22; border: 2px solid #2f4d3a; }
.rk-dot.on { background: #5cff8f; box-shadow: 0 0 8px #5cff8f; }

/* mootorite lülitid */
.rk-tog-row { display: -webkit-flex; display: flex; -webkit-justify-content: space-around; justify-content: space-around; padding-top: 6px; }
.rk-tog { position: relative; width: 62px; height: 104px; border-radius: 10px; background: #050a07; border: 2px solid #2a4a35; }
.rk-tog b { position: absolute; left: 7px; width: 44px; height: 46px; top: 50px; border-radius: 8px; background: #9a9a9a; box-shadow: inset 0 -5px 0 #666;
  -webkit-transition: top .1s; transition: top .1s; }
.rk-tog.on b { top: 4px; background: #ffb000; box-shadow: inset 0 -5px 0 #b37a00, 0 0 12px rgba(255,176,0,.6); }

/* ekraan */
.rk-bezel { position: absolute; left: 290px; top: 66px; width: 444px; height: 498px; border-radius: 40px; background: #1a2c22;
  border: 3px solid #2a4a35; box-shadow: inset 0 0 0 10px #0e1a13, 0 4px 0 #000; }
#rk-screen { position: absolute; left: 23px; top: 21px; width: 392px; height: 450px; border-radius: 26px; background: #000;
  box-shadow: 0 0 0 4px #000, 0 0 24px rgba(92,255,143,.25); }

/* juhtnooled */
.rk-steer { position: absolute; top: 576px; width: 216px; height: 136px; border-radius: 22px; background: #12241a; border: 4px solid #2a4a35;
  color: #2f4d3a; box-shadow: 0 6px 0 #000; }
#rk-left { left: 290px; } #rk-right { left: 518px; }
.rk-steer .tri { border-top-width: 34px; border-bottom-width: 34px; }
.rk-steer .tri.l { border-right-width: 54px; } .rk-steer .tri.r { border-left-width: 54px; }
.rk-steer.live { color: #5cff8f; border-color: #5cff8f; }
.rk-steer.down { background: #5cff8f; color: #000; -webkit-transform: translateY(4px); transform: translateY(4px); box-shadow: 0 2px 0 #000; }

/* näidikud */
.rk-disps { overflow: hidden; margin-bottom: 9px; }
.rk-disp { float: left; width: 130px; height: 96px; margin: 0 10px 9px 0; background: #000; border: 2px solid #2a4a35; border-radius: 8px; text-align: center; }
.rk-disp:nth-child(2n) { margin-right: 0; }
.rk-disp label { display: block; font-family: 'Pix', monospace; font-size: 9px; color: #2fbf62; margin-top: 6px; }
.rk-disp b { display: block; font-weight: normal; font-size: 60px; line-height: 64px; color: #5cff8f; text-shadow: 0 0 10px rgba(92,255,143,.6); }
.rk-status { height: 130px; }
.rk-sep { display: block; width: 100%; height: 56px; margin-top: 10px; border-radius: 10px; background: #2a1d00; border: 3px solid #5a4100; color: #5a4100;
  font-family: 'Pix', monospace; font-size: 18px; }
.rk-sep { position: relative; overflow: hidden; }
.rk-sep i { position: absolute; left: 0; bottom: 0; height: 8px; width: 0; background: #000; }
.rk-sep.danger { background: #ff3b2f !important; color: #fff !important; -webkit-animation-duration: .2s !important; animation-duration: .2s !important; }
.rk-sep.danger i { background: #fff; }
.rk-sep.ask { background: #ffb000; border-color: #fff; color: #000; -webkit-animation: rkhint .5s steps(1) infinite; animation: rkhint .5s steps(1) infinite; }

/* START + turvakaas */
.rk-launch-wrap { position: relative; height: 194px; border-radius: 12px; background: #12241a; border: 2px solid #2a4a35; overflow: hidden; }
.rk-launch { position: absolute; left: 50%; top: 50%; width: 156px; height: 156px; margin: -78px 0 0 -78px; border-radius: 78px;
  background: #5a1510; border: 6px solid #2a0a08; color: #2a0a08; font-family: 'Pix', monospace; font-weight: 700; font-size: 26px; box-shadow: 0 8px 0 #000; }
.rk-launch.armed { background: #ff3b2f; color: #fff; border-color: #fff; -webkit-animation: rkpulse .8s ease-in-out infinite; animation: rkpulse .8s ease-in-out infinite; }
@-webkit-keyframes rkpulse { 50% { box-shadow: 0 8px 0 #000, 0 0 30px #ff3b2f; } }
@keyframes rkpulse { 50% { box-shadow: 0 8px 0 #000, 0 0 30px #ff3b2f; } }
.rk-launch:active { -webkit-transform: translateY(5px); transform: translateY(5px); }
.rk-cover { position: absolute; left: 10px; top: 10px; right: 10px; bottom: 10px; border-radius: 10px; border: 3px solid #000;
  background: repeating-linear-gradient(45deg, #ffd400 0, #ffd400 18px, #111 18px, #111 36px); opacity: .92;
  -webkit-transition: -webkit-transform .5s ease-in; transition: transform .5s ease-in; }
.rk-cover.open { -webkit-transform: translateY(-110%); transform: translateY(-110%); }
.rk-again { width: 100%; height: 194px; border-radius: 12px; background: #5cff8f; color: #000; font-size: 120px; line-height: 180px; border: 4px solid #fff; }

/* öörežiimi ajal pehmem */
body.is-night #crt { background: none; }
