@font-face {
  font-family: Manrope;
  src: url("../fonts/Manrope.ttf") format("truetype");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: Unbounded;
  src: url("../fonts/Unbounded.ttf") format("truetype");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --bg: #090b10;
  --card: #141820;
  --tile: #171b22;
  --text: #f4f0e8;
  --muted: #aea89d;
  --line: rgba(244, 240, 232, 0.08);
  --gold: #e6b15a;
  --gold-ink: #1b140c;
  --ambient: rgba(120, 100, 220, 0.28);
}

* { box-sizing: border-box; }

html {
  height: 100%;
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button, input { font-family: inherit; }

button {
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus { outline: none; }

button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

#ambient {
  position: fixed;
  z-index: 0;
  width: 72vw;
  height: 72vw;
  left: -18vw;
  top: -30vw;
  pointer-events: none;
  background: radial-gradient(circle, var(--ambient), rgba(0, 0, 0, 0) 68%);
}

#app {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(230px, 1.22fr) minmax(150px, 1fr) 76px;
  grid-gap: 12px;
  padding: 12px;
  padding-top: calc(12px + env(safe-area-inset-top));
  padding-right: calc(12px + env(safe-area-inset-right));
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  padding-left: calc(12px + env(safe-area-inset-left));
}

.top {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  grid-gap: 12px;
  min-height: 0;
}

.card {
  position: relative;
  min-height: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Weather */

.weather { color: #f6f3ec; }

.sky,
.wx-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.sky { overflow: hidden; background: #151b28; }

.wx-content {
  z-index: 4;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 14px;
}

.moon,
.mist,
.sun-wrap,
#precip,
.flash,
.veil { position: absolute; }

.moon,
.mist,
.sun-wrap { display: none; }

.moon {
  z-index: 2;
  width: 72px;
  height: 72px;
  top: 16%;
  right: 14%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #e4ecf8 42%, rgba(190, 210, 240, 0) 70%);
}

.sun-wrap {
  z-index: 2;
  width: 340px;
  height: 340px;
  top: -48px;
  right: -36px;
  pointer-events: none;
}

.sun-wrap .sun-glow,
.sun-wrap .sun {
  position: absolute;
  border-radius: 50%;
}

.sun-wrap .sun-glow {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: radial-gradient(circle at 62% 58%,
    rgba(255, 252, 240, 0.92) 0%,
    rgba(255, 214, 130, 0.38) 12%,
    rgba(255, 186, 80, 0.12) 28%,
    rgba(255, 170, 60, 0) 58%);
  animation: breathe 11s ease-in-out infinite;
}

.sun-wrap .sun {
  width: 28px;
  height: 28px;
  left: 62%;
  top: 58%;
  margin-left: -14px;
  margin-top: -14px;
  background: radial-gradient(circle at 40% 38%, #fff 0%, #fff7dc 45%, #ffe08a 100%);
}

.mist {
  z-index: 2;
  width: 88%;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.82), rgba(226, 232, 238, 0.42) 42%, rgba(255, 255, 255, 0) 72%);
}
.m1 { top: 18%; left: -10%; animation: mist 22s ease-in-out infinite; }
.m2 { top: 42%; left: 8%; height: 90px; animation: mist 30s ease-in-out infinite reverse; }
.m3 { top: 62%; left: -4%; height: 70px; animation: mist 26s -8s ease-in-out infinite; }

#precip {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

.flash,
.veil { z-index: 3; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }

.flash { background: #fff; opacity: 0; }

.veil { background: linear-gradient(to top, rgba(6, 8, 12, 0.5), rgba(6, 8, 12, 0) 72%); }

.weather[data-ink="dark"] { color: #1c160f; }

.weather[data-ink="dark"] .veil {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 70%);
}

.weather[data-ink="light"] .wx-temp,
.weather[data-ink="light"] #wx-cond,
.weather[data-ink="light"] .wx-meta {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.weather[data-scene="loading"] .sky { background: linear-gradient(160deg, #1c2436, #10141c); }
.weather[data-scene="clear-day"] .sky { background: linear-gradient(160deg, #ffe7c2 0%, #ffc56b 24%, #89c2ef 64%, #3f86c8 100%); }
.weather[data-scene="partly-day"] .sky { background: linear-gradient(165deg, #d7e8fb 0%, #a9c8ee 46%, #6ea4dc 100%); }
.weather[data-scene="cloudy"] .sky { background: linear-gradient(180deg, #6d7e90 0%, #3c4854 100%); }
.weather[data-scene="cloudy-night"] .sky { background: linear-gradient(180deg, #1c2433 0%, #0e1218 100%); }
.weather[data-scene="clear-night"] .sky { background: linear-gradient(165deg, #1d2d6e 0%, #161433 46%, #0c0d16 100%); }
.weather[data-scene="partly-night"] .sky { background: linear-gradient(165deg, #24345f 0%, #151a2e 100%); }
.weather[data-scene="fog"] .sky { background: linear-gradient(180deg, #d9e0e8 0%, #b7c0ca 100%); }
.weather[data-scene="drizzle"] .sky { background: linear-gradient(180deg, #61778d 0%, #2c3a4a 100%); }
.weather[data-scene="rain"] .sky { background: linear-gradient(180deg, #3d5168 0%, #151c27 100%); }
.weather[data-scene="snow"] .sky { background: linear-gradient(180deg, #eef3f8 0%, #c5d4e4 58%, #9eb4c9 100%); }
.weather[data-scene="snow-night"] .sky { background: linear-gradient(180deg, #243044 0%, #121820 100%); }
.weather[data-scene="thunder"] .sky { background: linear-gradient(180deg, #2a2140 0%, #100e18 100%); }

.weather[data-scene="clear-day"] .sun-wrap,
.weather[data-scene="partly-day"] .sun-wrap { display: block; }
.weather[data-scene="clear-night"] .moon,
.weather[data-scene="partly-night"] .moon { display: block; }
.weather[data-scene="fog"] .mist { display: block; }

body.is-minimal .sun-wrap,
body.is-minimal .mist,
body.is-minimal .moon {
  display: none !important;
  animation: none !important;
}

.weather.lightning .flash { animation: bolt 0.55s ease-out; }

.wx-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

#city-btn {
  max-width: 48%;
  min-height: 44px;
  padding: 8px 0;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: left;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

#city-btn::after { content: "  ›"; opacity: 0.7; }

#wx-cond {
  max-width: 52%;
  padding-top: 10px;
  font-size: 15px;
  font-weight: 600;
  text-align: right;
}

.wx-temp {
  display: flex;
  align-items: flex-start;
  margin-top: auto;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 84px;
  font-size: clamp(64px, 8vh, 108px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.86;
}

.deg { margin-top: 0.16em; margin-left: 2px; font-size: 0.42em; }

.wx-meta {
  margin: 8px 0 10px;
  overflow: hidden;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.82;
}

.wx-forecast {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 4px;
  padding: 8px 6px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
}

.weather[data-ink="dark"] .wx-forecast { background: rgba(255, 255, 255, 0.38); }

.fx { display: flex; flex-direction: column; align-items: center; }
.fx-day { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.75; }
.fx-ico { height: 22px; margin-top: 2px; }
.fx-ico svg { width: 18px; height: 18px; display: block; }
.fx-t { font-size: 14px; font-weight: 700; }

/* Clock */

.clock {
  display: flex;
  flex-direction: column;
  padding: 14px 16px 14px;
}

.clock-head { display: flex; align-items: center; }

.mark-wrap { display: flex; align-items: center; }

.sec-ring { width: 26px; height: 26px; transform: rotate(-90deg); }
.sec-ring circle { fill: none; stroke-width: 3; }
.sec-ring .track { stroke: rgba(244, 240, 232, 0.14); }
.sec-ring .arc { stroke: var(--gold); stroke-linecap: round; }

.mark {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.status {
  display: flex;
  align-items: center;
  max-width: 46%;
  margin-left: auto;
  margin-right: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #d0a15a;
  flex: 0 0 auto;
}

#status-dot.is-ok { background: #7dba89; }
#status-dot.is-wait { background: #d0a15a; }
#status-dot.is-bad { background: #e07a72; }

#gear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--muted);
  flex: 0 0 auto;
}

#gear svg { width: 20px; height: 20px; }
#gear:active { background: rgba(255, 255, 255, 0.06); }

.time { display: flex; align-items: flex-start; margin-top: 4px; }

#hhmm {
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 76px;
  font-size: clamp(56px, 7.2vw, 104px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

#sec {
  margin-top: 10px;
  margin-left: 8px;
  color: var(--gold);
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 22px;
  font-weight: 500;
}

.date { margin: 8px 0 0; font-size: 18px; font-weight: 600; }
.greet { margin: 2px 0 0; color: var(--gold); font-size: 15px; font-weight: 700; }

#pc-more {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

#pc-more svg { width: 20px; height: 20px; transition: transform 0.25s ease; }
.clock.is-more #pc-more { color: var(--gold); background: rgba(230, 177, 90, 0.14); }
.clock.is-more #pc-more svg { transform: rotate(180deg); }

#clock-drawer {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  padding: 12px 12px 46px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #1b202a;
}

.uptime {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stats { margin-top: auto; }

.meter { margin-top: 8px; }
.stats .meter:first-child { margin-top: 0; }

.meter-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meter-top b {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.meter-track {
  height: 6px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(244, 240, 232, 0.08);
}

.meter-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), #f4e2c2);
  transition: width 0.5s ease;
}

/* Actions and dock */

.actions-wrap {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.section-bar {
  display: flex;
  align-items: center;
  height: 26px;
  flex: 0 0 auto;
  padding: 0 6px 6px;
}

#section-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-hint {
  margin-left: 12px;
  color: #6f6a62;
  font-size: 12px;
  font-weight: 600;
}

.section-hint[hidden] { display: none; }

.section-dots { display: flex; align-items: center; margin-left: auto; }

.section-dots button {
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 99px;
  background: rgba(244, 240, 232, 0.22);
}

.section-dots button.is-on {
  width: 18px;
  background: var(--gold);
}

.actions-viewport { flex: 1; min-height: 0; overflow: hidden; }

.actions-track {
  display: flex;
  width: 300%;
  height: 100%;
  transition: transform 0.48s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.actions {
  width: 33.333%;
  height: 100%;
  flex: 0 0 33.333%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr 1fr;
  grid-gap: 12px;
}

.tile {
  display: flex;
  align-items: center;
  height: 100%;
  min-width: 0;
  padding-right: 14px;
  padding-left: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--tile);
  text-align: left;
  transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease;
}

.tile:active { transform: scale(0.975); }
.tile.is-ok { border-color: rgba(230, 177, 90, 0.9); }
.tile.is-missing { opacity: 0.78; }
.tile.is-missing .tile-sub { color: #e0a36a; }
.tile[data-busy="1"] { opacity: 0.7; }

.tile-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  flex: 0 0 auto;
}

.tile-ico svg { width: 26px; height: 26px; display: block; }
.tile-ico.has-logo { background: transparent; }
.tile-logo { width: 30px; height: 30px; display: block; object-fit: contain; }
.tile-text { min-width: 0; margin-left: 14px; }
.tile-label,
.tile-sub { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tile-label { font-size: 18px; font-weight: 700; }
.tile-sub { margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 600; }

.ico-youtube { color: #ff8d7d; }
.ico-telegram { color: #7ec8ff; }
.ico-code { color: #8fd0b0; }
.ico-discord { color: #b9a8ff; }
.ico-mic { color: #f0b56a; }
.ico-music { color: #b6e38a; }
.ico-folder { color: #e6c27a; }
.ico-desktop { color: #ddd6cb; }
.ico-globe { color: #8eb7ff; }
.ico-app { color: #ddd6cb; }
.ico-book { color: #d7c4a4; }
.ico-formula { color: #e0b56a; }
.ico-triangle { color: #8fc4b2; }
.ico-pencil { color: #e0a08a; }
.ico-spark { color: #c4b2ff; }
.tile[data-id="be-lang"] .tile-ico { color: #d4897c; }
.tile[data-id="ru-lang"] .tile-ico { color: #8eb4d6; }
.tile[data-id="english"] .tile-ico { color: #9db7e4; }
.tile[data-id="visual-geo"] .tile-ico { color: #b7a6e0; }
.tile[data-id="gemini"] .tile-ico { color: #8eb6f2; }
.tile[data-id="qwen"] .tile-ico { color: #c4b2ff; }
.tile[data-id="claude"] .tile-ico { color: #e0b089; }
.tile[data-id="deepseek"] .tile-ico { color: #7ec8c4; }
.tile[data-id="grok"] .tile-ico { color: #e6b15a; }
.tile[data-id="chatgpt"] .tile-ico { color: #8fce9a; }

.pager {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.pager button {
  width: 8px;
  height: 8px;
  margin: 0 4px;
  border-radius: 50%;
  background: rgba(244, 240, 232, 0.28);
  pointer-events: auto;
}

.pager button.is-on { background: var(--gold); }

.dock {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-gap: 8px;
  min-height: 0;
  overflow: visible;
}

.dock button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #171b22;
  color: #f4f0e8;
}

.dock button:active { transform: scale(0.96); }
.dock .dock-ico svg { width: 22px; height: 22px; display: block; }
.dock .lbl { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }

.dock button.is-power {
  color: var(--gold);
}

.power-slot {
  position: relative;
  min-width: 0;
  height: 100%;
}

.power-slot > .is-power { width: 100%; }

.power-slot.is-open > .is-power {
  border-color: rgba(230, 177, 90, 0.85);
  background: #221c14;
}

.power-menu {
  position: absolute;
  right: 0;
  bottom: 76px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  width: 220px;
  padding: 6px;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 18px;
  background: #12151b;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.dock .power-menu button {
  flex-direction: row;
  justify-content: flex-start;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.dock .power-menu button + button { margin-top: 2px; }
.dock .power-menu button:active { background: rgba(244, 240, 232, 0.06); }
.dock .power-menu .lbl { margin-top: 0; margin-left: 10px; color: var(--text); font-size: 14px; }
.dock .power-menu button.is-sleep { color: var(--gold); }
.dock .power-menu button.is-sleep .lbl { color: var(--gold); }

/* Выключение компьютера: удержание две секунды */

.dock .power-menu button.is-off { color: #e0705f; }
.dock .power-menu button.is-off .lbl { color: #e0705f; }
.dock .power-menu button.is-hold {
  position: relative;
  overflow: hidden;
  touch-action: none;
}
.dock .power-menu button.is-hold .dock-ico,
.dock .power-menu button.is-hold .lbl {
  position: relative;
  z-index: 1;
}
.dock .power-menu .hold-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  border-radius: 12px;
  background: rgba(224, 112, 95, 0.32);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}
.dock .power-menu button.is-holding { background: rgba(224, 112, 95, 0.1); }
.dock .power-menu button.is-holding .hold-fill {
  transform: scaleX(1);
  transition: transform 2s linear;
}
.dock button.is-pending {
  border-color: rgba(224, 112, 95, 0.85);
  background: #221414;
  color: #e0705f;
}

.dock button.is-ok { border-color: rgba(230, 177, 90, 0.9); }

/* Overlays */

#boot,
#offline,
#welcome,
#farewell,
#sheet,
#modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#boot { z-index: 30; background: #090b10; }
#welcome { z-index: 32; background: #090b10; opacity: 1; transition: opacity 0.7s ease; }
#welcome.is-out { opacity: 0; }
#farewell { z-index: 31; background: #090b10; }
#offline { z-index: 28; background: #07080c; }
#sheet,
#modal { z-index: 24; background: rgba(9, 11, 16, 0.72); }

#boot[hidden],
#offline[hidden],
#welcome[hidden],
#farewell[hidden],
#clock-drawer[hidden],
.power-menu[hidden],
#sheet[hidden],
#modal[hidden],
#pin-form[hidden],
.pager[hidden] { display: none !important; }

.boot-card,
.sheet-card {
  width: 100%;
  max-width: 440px;
  text-align: center;
}

.boot-card h1,
.welcome-card h1,
.sheet-card h2 {
  margin: 0;
  font-family: Unbounded, Manrope, sans-serif;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.boot-card h1 { margin-top: 18px; font-size: 52px; }
.welcome-card { width: 100%; max-width: 640px; text-align: center; }
.welcome-card h1 {
  margin-top: 14px;
  font-size: 64px;
  font-size: clamp(40px, 6vw, 72px);
  animation: welcome-in 0.9s ease both;
}
.welcome-kicker,
.standby-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.welcome-kicker { margin-top: 22px; animation: welcome-in 0.7s ease both; }
.welcome-line {
  width: 0;
  height: 2px;
  margin: 18px auto 0;
  background: var(--gold);
  animation: welcome-line 0.8s 0.25s ease forwards;
}
#welcome-sub {
  margin-top: 16px;
  color: var(--gold);
  font-size: 18px;
  font-weight: 700;
  animation: welcome-in 0.9s 0.15s ease both;
}
.farewell-card { width: 100%; max-width: 640px; text-align: center; }
.farewell-card h1 {
  margin: 14px 0 0;
  font-family: Unbounded, Manrope, sans-serif;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-size: clamp(40px, 6vw, 72px);
  animation: welcome-in 0.9s ease both;
}
.farewell-kicker {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  animation: welcome-in 0.7s ease both;
}
.farewell-line {
  width: 0;
  height: 2px;
  margin: 18px auto 0;
  background: var(--gold);
  animation: welcome-line 0.8s 0.25s ease forwards;
}
#farewell-sub {
  margin: 16px auto 0;
  max-width: 420px;
  color: var(--muted);
  font-size: 17px;
  animation: welcome-in 0.9s 0.15s ease both;
}
body.tod-night #farewell .farewell-line { background: #c4b2ff; }
.standby { width: 100%; max-width: 860px; }
.standby-kicker { display: flex; align-items: center; justify-content: center; }
.standby-dot {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #8d8578;
}
.standby-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  grid-gap: 14px;
  margin-top: 18px;
}
.quiet-card {
  min-height: 168px;
  padding: 16px 18px 14px;
  border: 1px solid rgba(244, 240, 232, 0.06);
  border-radius: 22px;
  background: #12141a;
  text-align: left;
}
.quiet-label {
  margin: 0;
  color: #8a847b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.quiet-time {
  margin-top: 8px;
  color: #d9d3c8;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 54px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.quiet-date { margin: 8px 0 0; color: #b7b1a6; font-size: 15px; }
.quiet-greet { margin: 2px 0 0; color: #a89060; font-size: 14px; font-weight: 700; }
.quiet-weather { position: relative; overflow: hidden; }
.quiet-weather .quiet-label,
.quiet-temp,
.quiet-cond,
.quiet-city { position: relative; z-index: 1; }
.quiet-temp {
  margin-top: 10px;
  color: #d9d3c8;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.quiet-cond { margin: 8px 0 0; color: #c9c3b8; font-size: 16px; font-weight: 600; }
.quiet-city { margin: 2px 0 0; color: #8a847b; font-size: 13px; }
.quiet-weather[data-scene="clear-day"] { background: linear-gradient(160deg, #2a241c, #1a1c22); }
.quiet-weather[data-scene="clear-night"] { background: linear-gradient(160deg, #16182a, #101218); }
.quiet-weather[data-scene="rain"],
.quiet-weather[data-scene="drizzle"],
.quiet-weather[data-scene="thunder"] { background: linear-gradient(180deg, #1a222c, #12141a); }
.quiet-weather[data-scene="snow"],
.quiet-weather[data-scene="snow-night"] { background: linear-gradient(180deg, #1c2228, #12141a); }
.quiet-weather[data-scene="cloudy"],
.quiet-weather[data-scene="cloudy-night"],
.quiet-weather[data-scene="partly-day"],
.quiet-weather[data-scene="partly-night"],
.quiet-weather[data-scene="fog"] { background: linear-gradient(180deg, #1a1e26, #12141a); }
.standby-note {
  max-width: 520px;
  margin: 16px auto 0;
  color: #6f6a62;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
body.is-standby #app { visibility: hidden; }
body.is-standby .sun-wrap,
body.is-standby .mist,
body.is-standby .moon { animation: none !important; }
body.is-reveal .card,
body.is-reveal .tile,
body.is-reveal .dock > button,
body.is-reveal .power-slot { animation: rise 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
body.is-reveal .tile:nth-child(1) { animation-delay: 0.04s; }
body.is-reveal .tile:nth-child(2) { animation-delay: 0.08s; }
body.is-reveal .tile:nth-child(3) { animation-delay: 0.12s; }
body.is-reveal .tile:nth-child(4) { animation-delay: 0.16s; }
body.is-reveal .tile:nth-child(5) { animation-delay: 0.2s; }
body.is-reveal .tile:nth-child(6) { animation-delay: 0.24s; }
body.is-reveal .tile:nth-child(7) { animation-delay: 0.28s; }
body.is-reveal .tile:nth-child(8) { animation-delay: 0.32s; }
body.is-reveal .dock > :nth-child(1) { animation-delay: 0.2s; }
body.is-reveal .dock > :nth-child(2) { animation-delay: 0.24s; }
body.is-reveal .dock > :nth-child(3) { animation-delay: 0.28s; }
body.is-reveal .dock > :nth-child(4) { animation-delay: 0.32s; }
body.is-reveal .dock > :nth-child(5) { animation-delay: 0.36s; }
body.is-reveal .dock > :nth-child(6) { animation-delay: 0.4s; }
body.is-reveal .dock > :nth-child(7) { animation-delay: 0.44s; }
.boot-card p,
.sheet-card p {
  margin: 10px auto 0;
  max-width: 380px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.ring {
  width: 92px;
  height: 92px;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 70%, var(--gold) 88%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%);
  mask: radial-gradient(circle, transparent 62%, #000 64%);
  animation: spin 2.8s linear infinite;
}

#boot-btn,
#pin-form button,
#city-save,
#modal-yes {
  min-width: 220px;
  min-height: 56px;
  margin-top: 22px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--gold-ink);
  font-size: 18px;
  font-weight: 800;
}

#boot-btn:active,
#city-save:active,
#modal-yes:active { transform: scale(0.98); }

#pin-form { width: 100%; max-width: 320px; }

#city-input,
#pin-input {
  width: 100%;
  min-height: 56px;
  margin-top: 16px;
  padding: 0 16px;
  border: 1px solid rgba(244, 240, 232, 0.14);
  border-radius: 16px;
  background: #10141c;
  color: var(--text);
  font-size: 18px;
  -webkit-user-select: text;
  user-select: text;
}

#city-input::placeholder,
#pin-input::placeholder { color: #8d877c; }

.sheet-card {
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #141820;
  text-align: left;
}

.sheet-card h2 { font-size: 28px; }

.sheet-actions button {
  width: 100%;
  min-height: 52px;
  margin-top: 10px;
  border-radius: 16px;
  background: #222733;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.sheet-actions #city-save,
.sheet-actions #modal-yes { background: var(--gold); color: var(--gold-ink); }

.sheet-actions.row { display: flex; }
.sheet-actions.row button { width: auto; flex: 1 1 0; }
.sheet-actions.row button + button { margin-left: 10px; }

.sheet-hint,
.sheet-note { font-size: 13px !important; }

/* Язык панели */

.lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(244, 240, 232, 0.08);
  border-radius: 16px;
  background: #10141c;
}

.lang-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lang-switch { display: flex; padding: 3px; border-radius: 999px; background: #171b22; }

.lang-switch button {
  min-width: 76px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.lang-switch button.is-on { background: var(--gold); color: var(--gold-ink); }
.lang-switch button:active { transform: scale(0.97); }

#toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  z-index: 40;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 999px;
  background: #1c212b;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 50;
  color: var(--text);
}

body.scene-clear-day { --ambient: rgba(255, 186, 92, 0.42); }
body.scene-partly-day { --ambient: rgba(140, 190, 255, 0.35); }
body.scene-cloudy,
body.scene-cloudy-night,
body.scene-loading { --ambient: rgba(150, 168, 188, 0.2); }
body.scene-fog { --ambient: rgba(220, 226, 232, 0.22); }
body.scene-drizzle,
body.scene-rain { --ambient: rgba(90, 150, 230, 0.34); }
body.scene-thunder { --ambient: rgba(150, 120, 255, 0.32); }
body.scene-snow,
body.scene-snow-night { --ambient: rgba(200, 220, 240, 0.28); }
body.scene-clear-night,
body.scene-partly-night { --ambient: rgba(110, 90, 220, 0.34); }

body.tod-morning { --gold: #f0b56a; }
body.tod-day { --gold: #e6b15a; }
body.tod-evening { --gold: #f09a6a; }
body.tod-night { --gold: #c4b2ff; }

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes mist {
  0% { transform: translate3d(-12%, 0, 0); opacity: 0.55; }
  50% { transform: translate3d(10%, -12px, 0); opacity: 0.92; }
  100% { transform: translate3d(26%, 8px, 0); opacity: 0.6; }
}

@keyframes bolt {
  0% { opacity: 0; }
  10% { opacity: 0.8; }
  22% { opacity: 0.05; }
  34% { opacity: 0.42; }
  100% { opacity: 0; }
}

@keyframes welcome-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes welcome-line { to { width: 132px; } }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes shake {
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.tile.is-fail,
.dock button.is-fail { animation: shake 0.35s linear; }

@media (prefers-reduced-motion: reduce) {
  .sun-wrap .sun-glow, .mist, .ring, .meter-track i { animation: none; }
  .farewell-card h1, .farewell-kicker, #farewell-sub { animation: none; }
  .farewell-line { width: 132px; animation: none; }
}

@media (max-height: 700px) {
  #app { grid-template-rows: minmax(200px, 1.1fr) minmax(130px, 1fr) 68px; }
  #hhmm { font-size: 56px; }
  .wx-temp { font-size: 60px; }
  .date { font-size: 16px; }
}

@media (max-width: 1100px) {
  .dock > button .lbl,
  .power-slot > .is-power .lbl {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
}

@media (orientation: portrait), (max-width: 820px) {
  body { height: auto; min-height: 100%; overflow: auto; }
  #app {
    height: auto;
    min-height: 100%;
    grid-template-rows: auto auto auto;
  }
  .top { grid-template-columns: 1fr; }
  .weather { height: 340px; }
  .clock { min-height: 280px; }
  .actions { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 96px; height: auto; }
  .standby-grid { grid-template-columns: 1fr; }
  #app.is-power-open .dock { padding-top: 124px; }
  #app.is-power-open .power-menu { top: auto; bottom: calc(100% + 80px); }
  .dock { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 72px; height: auto; }
  .dock > button .lbl,
  .power-slot > .is-power .lbl,
  .dock .lbl { position: static; width: auto; height: auto; overflow: visible; }
}

::-webkit-scrollbar { width: 0; height: 0; }
