/* Mister DEX — welcome page.
   The platform's look: deep green-blue
   surfaces, emerald accent, copper hairlines, Inter; the hall picture by night (dark appearance) and by day
   (light appearance); the gamepad logo; the copper-dot «Mister DEX» inscription. Nothing redrawn. Static: no
   requests to other sites, no animation. */

@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(assets/fonts/inter-cyrillic-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(assets/fonts/inter-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(assets/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(assets/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --bg-0: #051113;
  --panel: rgba(7, 24, 27, 0.74);
  --line: rgba(193, 139, 99, 0.35);
  --line-2: rgba(193, 139, 99, 0.65);
  --line-3: rgba(214, 162, 122, 0.9);
  --tx-1: #f5f9fc;
  --tx-2: #dae5eb;
  --tx-3: #bccbd4;
  --accent: #49d4b1;
  --accent-soft: rgba(42, 185, 149, 0.13);
  --scrim: linear-gradient(rgba(5, 17, 19, 0.58), rgba(5, 17, 19, 0.74));
  --picture: url(assets/bg-night.webp);
  --word-filter: none;
  --font: "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  color-scheme: dark;
}

/* By day: the day picture with a thin wash, dark text, the copper wire darker. */
@media (prefers-color-scheme: light) {
  :root {
    --bg-0: #edf4f2;
    --panel: rgba(244, 249, 248, 0.84);
    --line: rgba(150, 98, 60, 0.4);
    --line-2: rgba(150, 98, 60, 0.7);
    --line-3: rgba(122, 76, 42, 0.95);
    --tx-1: #0b2226;
    --tx-2: #1f3f46;
    --tx-3: #3b5d64;
    --accent: #0b7a63;
    --accent-soft: rgba(11, 122, 99, 0.1);
    --scrim: linear-gradient(rgba(237, 244, 242, 0.5), rgba(237, 244, 242, 0.3));
    --picture: url(assets/bg-day.webp);
    --word-filter: brightness(0.45) saturate(0.9);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg-0);
  color: var(--tx-1);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

/* The picture stays still under the page (a fixed layer, not background-attachment: iOS ignores that). */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--scrim), var(--picture) center / cover no-repeat, var(--bg-0);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 14px max(24px, env(safe-area-inset-left));
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand-logo { display: block; flex: none; height: 38px; width: auto; }
.brand-name { font-size: 19px; font-weight: 760; letter-spacing: 0.025em; white-space: nowrap; }
.brand-name .dex { color: var(--accent); }

.lang {
  position: relative;
  display: flex;
  align-items: center;
  flex: none;
}
.lang-icon {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--tx-3);
  stroke-width: 1.6;
  pointer-events: none;
}
.lang select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 40px;
  padding: 8px 34px 8px 34px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--panel)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23c18b63' stroke-width='1.6'/%3E%3C/svg%3E")
    no-repeat right 12px center / 11px 8px;
  color: var(--tx-1);
  font: 500 14px/1.2 var(--font);
  cursor: pointer;
}
.lang select:hover { border-color: var(--line-3); }
.lang select:focus-visible, .ch:focus-visible, .brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lang option { color: #0b2226; background: #f5f9fc; }

.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vh, 20px);
  padding: 8px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
}

/* The copper-dot inscription (as on the platform's home page): painted once by app.js, again only when its size changes. */
.word {
  display: block;
  width: min(1100px, 100%);
  height: clamp(84px, 17vw, 220px);
  filter: var(--word-filter);
}

.card {
  width: min(680px, 100%);
  padding: clamp(22px, 4vw, 34px) clamp(18px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  text-align: center;
}
.card h1 {
  margin: 0 0 14px;
  font-size: clamp(27px, 4.4vw, 44px);
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.lede {
  margin: 0 auto;
  max-width: 34em;
  color: var(--tx-2);
  font-size: clamp(16px, 1.5vw, 18.5px);
  line-height: 1.6;
  text-wrap: pretty;
}
.soon {
  margin: 16px 0 0;
  color: var(--accent);
  font-size: clamp(16.5px, 1.7vw, 20px);
  font-weight: 650;
  text-wrap: balance;
}
.launch {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  margin: 18px 0 0;
  padding: 8px 16px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--tx-2);
  font-size: 15px;
}
.launch time { color: var(--tx-1); font-weight: 650; }
.launch[hidden] { display: none; }

.channels { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.channels h2 {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.channels ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.channels li { flex: 0 1 calc((100% - 20px) / 3); min-width: 0; }
.channels li[hidden] { display: none; }
.ch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  color: var(--tx-1);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: border-color 0.15s, background-color 0.15s;
}
.ch svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.ch svg.line { fill: none; stroke: currentColor; stroke-width: 1.9; }
.ch svg.line .dot { fill: currentColor; stroke: none; }
.ch:hover { border-color: var(--line-3); background: var(--accent-soft); }

.foot {
  padding: 14px 16px max(16px, env(safe-area-inset-bottom));
  color: var(--tx-3);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 560px) {
  .top { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .brand { gap: 7px; }
  .brand-logo { height: 28px; }
  .brand-name { font-size: 16px; }
  .lang select { min-height: 44px; font-size: 15px; }
  .channels li { flex-basis: calc((100% - 10px) / 2); }
  .ch { padding: 10px 12px; }
}

/* Korean breaks between words, not inside them; Chinese by the strict rules. */
:lang(ko) .card { word-break: keep-all; overflow-wrap: anywhere; }
:lang(zh-Hans) .card { line-break: strict; }
:lang(zh-Hans) .launch { column-gap: 2px; } /* the full-width colon carries its own space */

@media (prefers-reduced-motion: reduce) {
  .ch { transition: none; }
}
