/* Talvi-Explorer 1.0 — MyWinterSync, still loading */

@font-face {
  font-family: "Workbench";
  font-display: swap;
  src: url("workbench-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Workbench";
  font-display: swap;
  src: url("workbench-symbols.woff2") format("woff2");
  unicode-range: U+2190-2199, U+2300-243F, U+25A0-27BF;
}

:root {
  --night: #081428;
  --deep: #0e2244;
  --ice: #e8f4ff;
  --frost: #7fd4ff;
  --glow: #ffb347;
  --font: "Workbench", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }

html[data-lang="es"] [data-l="en"],
html[data-lang="en"] [data-l="es"] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 120%, #17345f 0%, var(--night) 60%);
  color: var(--ice);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: none;
  overflow-x: hidden;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 20, 0.14) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 20, 0.4) 100%);
}

a { color: var(--frost); text-underline-offset: 3px; }
a:hover { color: var(--glow); }
:focus-visible { outline: 2px dashed var(--glow); outline-offset: 2px; }

.snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.bar,
.foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--ice);
  color: var(--deep);
  font-size: 16px;
}
.bar { height: 30px; border-bottom: 2px solid #000; }
.bar > * { padding: 0 12px; display: flex; align-items: center; height: 100%; }
.bar-title { flex: 1; }
.bar-temp { border-left: 2px solid var(--deep); }
.lang { border-left: 2px solid var(--deep); padding: 0 6px; }
.lang button {
  font: inherit;
  color: var(--deep);
  background: none;
  border: 0;
  padding: 2px 6px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--deep); color: var(--ice); }
.foot { justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; padding: 6px 14px; border-top: 2px solid #000; font-size: 14px; }

.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

.win {
  position: relative;
  width: min(860px, 100%);
  background: var(--deep);
  border: 2px solid var(--ice);
  box-shadow: 8px 8px 0 #000;
}
.win-bar {
  display: flex;
  align-items: stretch;
  height: 30px;
  background: var(--ice);
  color: var(--deep);
  border-bottom: 2px solid var(--ice);
}
.win-title { flex: 1; line-height: 28px; padding: 0 12px; font-size: 17px; }
.gad { position: relative; width: 30px; flex: none; }
.gad-close { border-right: 2px solid var(--deep); }
.gad-close::before { content: ""; position: absolute; inset: 6px 8px; border: 2px solid var(--deep); }
.gad-depth { border-left: 2px solid var(--deep); }
.gad-depth::before,
.gad-depth::after { content: ""; position: absolute; width: 12px; height: 9px; border: 2px solid var(--deep); }
.gad-depth::before { left: 6px; top: 5px; }
.gad-depth::after { left: 11px; top: 10px; background: var(--deep); }
.gad-size {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 24px;
  height: 20px;
  border: 2px solid var(--ice);
  background: var(--deep);
}

.win-body { padding: 30px 30px 28px; text-align: center; }

.logo {
  margin: 6px 0 4px;
  font-size: clamp(36px, 8vw, 88px);
  font-weight: normal;
  line-height: 1.1;
  letter-spacing: 0.06em;
  color: var(--ice);
  text-shadow:
    -3px 0 0 #000, 3px 0 0 #000, 0 -3px 0 #000, 0 3px 0 #000,
    3px 3px 0 var(--frost), 6px 6px 0 var(--frost), 9px 9px 0 #000;
}
.tag { margin: 6px 0 30px; font-size: clamp(18px, 2.6vw, 24px); color: var(--frost); }

.loader {
  height: 26px;
  border: 2px solid var(--ice);
  background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(232, 244, 255, 0.08) 10px 12px);
  padding: 2px;
}
.loader-fill {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(90deg, var(--frost) 0 10px, transparent 10px 12px);
}
.readout {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  font-size: 16px;
  text-align: left;
}
.status { color: var(--ice); }
.status::after { content: "_"; animation: blink 1s steps(1) infinite; color: var(--glow); }
.pct { color: var(--glow); flex: none; }
@keyframes blink { 50% { opacity: 0; } }

.note {
  margin: 30px 0 0;
  padding-top: 18px;
  border-top: 2px dashed rgba(232, 244, 255, 0.35);
  font-size: 16px;
}

@media (max-width: 560px) {
  .win-body { padding: 22px 16px; }
  .bar-title { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
