/* LangOrbit Universe (spec 2026-11-06-word-universe-design): one full-screen WebGL sky, the wordmark
   and the phrase band under it, a tip at the bottom-left, the demo's panel at the bottom. Dark by
   choice — it is a night sky — so this sheet spends its OWN palette, not the app's themed tokens;
   only the UI font and the safe-area insets come from tokens.css. Shared by the standalone document
   (/universe) and the SPA page (/progress/universe): js/universe/spa.js injects it with its own ?v=. */

@font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('/_content/LearnWordsAI.SharedUI/fonts/orbitron/orbitron-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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* the face for READING over the cosmos — the phrase band and the tip's word. Orbitron's wide, almost
   identical square letters were heavy going in a whole sentence (owner, 06.11.2026); Exo 2 keeps the
   sci-fi geometry with ordinary proportions. Latin only: the band and the word are the target language. */
@font-face {
    font-family: 'Exo 2';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/_content/LearnWordsAI.SharedUI/fonts/exo2/exo2-latin.woff2') format('woff2');
    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;
}

.uv {
    --uv-bg: #070a14;
    --uv-fg: #e8ecf7;
    --uv-fg-2: #9aa3c0;
    --uv-fg-3: #5e6785;
    --uv-glass: rgba(14, 18, 34, 0.72);
    --uv-glass-line: rgba(154, 163, 192, 0.18);
    --uv-gold: #ffd166;
    --uv-a1: #ffd166; --uv-a2: #ff8a5b; --uv-b1: #f06bb4; --uv-b2: #8c8cff; --uv-c1: #4fd8ec;
    --uv-font: var(--font, 'Schibsted Grotesk', 'Segoe UI', system-ui, sans-serif);
    --uv-cosmic: 'Orbitron', 'Michroma', 'Audiowide', var(--uv-font);
    --uv-read: 'Exo 2', var(--uv-font);
    position: relative;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    background: var(--uv-bg);
    color: var(--uv-fg);
    font-family: var(--uv-font);
    color-scheme: dark;
    -webkit-tap-highlight-color: transparent;
}
.uv * { box-sizing: border-box; }
/* the chips and pills set their own display, which would outrank the UA's [hidden] rule */
.uv [hidden] { display: none !important; }

/* ── The sky ─────────────────────────────────────────────────────── */
.uv-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.uv-gl.uv-drag { cursor: grabbing; }
.uv-gl.uv-pan { cursor: move; }

.uv-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.uv-lbl {
    position: absolute; left: 0; top: 0; transform: translate(-50%, -140%);
    font-size: 12px; font-weight: 500; line-height: 1.25; color: var(--uv-fg); white-space: nowrap; letter-spacing: 0.01em;
    text-shadow: 0 0 6px var(--uv-bg), 0 0 2px var(--uv-bg); will-change: transform; opacity: 0.9;
}
.uv-lbl[hidden] { display: none; }
/* a label takes the colour its star is marked with: gold — the word the phrase in flight was written
   for; cyan — the word the learner tapped. The same two colours as the band's words. */
.uv-lbl.uv-src { color: var(--uv-gold); }
.uv-lbl.uv-sel { color: var(--uv-c1); }
/* the words of the constellation on show: the pale gold of the halo on their stars */
.uv-lbl.uv-pack { color: #f5e2b0; }
.uv-lbl.uv-ring {
    font-family: var(--uv-cosmic); font-size: 12px; letter-spacing: 0.14em; color: var(--uv-fg-2); opacity: 0.8;
    transform: translate(-50%, -50%);
}
.uv-lbl.uv-ring small { font-family: var(--uv-font); font-size: 10px; letter-spacing: 0.04em; margin-left: 6px; color: var(--uv-fg-3); }
/* names on demand (spec 2026-11-09-word-galaxy-star-systems-design): the system under the pointer or chosen — its
   pack's name (warm; an uncharted red dwarf's in a redder tone) over its sector "Theme · LEVEL" */
.uv-lbl.uv-sys { text-align: center; font-size: 13px; font-weight: 600; line-height: 1.25; color: #ffe7b0; opacity: 1; }
.uv-lbl.uv-sys.uv-wild { color: #e8c2b0; }
.uv-lbl.uv-sys small { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0.02em; color: rgba(214, 224, 250, 0.8); }
/* a function word of the corona in the core's warm light; a book word of the belt in the belt's cool grey */
.uv-lbl.uv-cor { color: #ffe6aa; }
.uv-lbl.uv-belt { color: #b9cde4; }
/* a planet (a programme word, the root of its moons) is named above its moons (owner, 11.11.2026) */
.uv-lbl.uv-planet { font-size: 13px; font-weight: 650; }
.uv-lbl.uv-moon { font-size: 11px; font-weight: 400; opacity: 0.85; }
/* the progress lens (spec 2026-11-09, "the progress lens"): the name of a word the learner does not know is quieter, as
   its body is; the learner's finer states are badges after the name — a glyph each, tinted so they read apart at a
   glance (the card says each in words); a system's count of known planets after its sector */
.uv-lbl.uv-dim { opacity: 0.5; }
/* a name far behind the focus (sky.js DOF_*): quieter and a touch soft, as its body is */
.uv-lbl.uv-blur { opacity: 0.55; filter: blur(0.45px); }
.uv-lbl .uv-bdg { margin-left: 3px; font-size: 11px; font-weight: 600; }
.uv-lbl.uv-sys small .uv-bdg { margin-left: 7px; font-weight: 500; }
.uv-bdg-known, .uv-bdg-auto, .uv-bdg-manual { color: #8ce6ad; }
.uv-bdg-due { color: #ffc56b; }
.uv-bdg-learning { color: #8fd0ff; }
.uv-bdg-met { color: rgba(214, 224, 250, 0.75); }
.uv-bdg-captured { color: var(--uv-gold); }
/* something under the mouse that a click would choose */
.uv-gl.uv-hot { cursor: pointer; }

/* ── Chrome over the sky ─────────────────────────────────────────── */
.uv-ui {
    position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between;
    padding: calc(12px + var(--safe-top, 0px)) max(14px, var(--safe-right, 0px)) calc(12px + var(--safe-bottom, 0px)) max(14px, var(--safe-left, 0px));
    gap: 12px;
}
/* The bars are layout only: the top one and the bottom one span the whole width, and a box that takes the pointer there
   made a strip of sky dead to the wheel and the drag (owner, 10.11.2026: "иногда это не работает"). Only what is drawn
   takes the pointer — a control, the card, the demo's panel, the search, a pop-up; the phrase's text lets it through. */
.uv-ui, .uv-ui * { pointer-events: none; }
.uv-ui :is(button, a, input, select, label, .uv-tip, .uv-panel, .uv-find, .uv-gain-pop, .uv-help-pop, .uv-stats),
.uv-ui :is(.uv-tip, .uv-panel, .uv-gain-pop, .uv-help-pop) * { pointer-events: auto; }

.uv-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 10px; }
.uv-top-left { grid-column: 1; justify-self: start; display: flex; gap: 6px; align-items: center; }
.uv-top-right { grid-column: 3; justify-self: end; display: flex; gap: 6px; align-items: center; }
.uv-head { grid-column: 2; justify-self: center; display: grid; justify-items: center; gap: 8px; min-width: 0; max-width: 100%; }

/* the wordmark over the cosmos: a geometric sci-fi face, gold → white → cyan, a faint glow */
.uv-mark { text-align: center; font-family: var(--uv-cosmic); text-transform: uppercase; user-select: none; display: grid; gap: 3px; }
.uv-mark-1 {
    font-weight: 700; font-size: clamp(18px, 3.2vw, 34px); letter-spacing: 0.16em; line-height: 1; padding-left: 0.16em;
    background: linear-gradient(90deg, #ffd166 0%, #fff6dc 55%, #4fd8ec 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.35)) drop-shadow(0 0 24px rgba(79, 216, 236, 0.18));
}
.uv-mark-2 { font-weight: 500; font-size: clamp(9px, 1.1vw, 12px); letter-spacing: 0.52em; padding-left: 0.52em; color: var(--uv-fg-2); }

/* the search (spec 2026-11-10-word-galaxy-stable-sky, "Search"): a glass field under the wordmark, inside the top bar —
   never over it — and a line under the field when nothing was found. The middle column narrows on a phone; the field
   narrows with it. */
.uv-find { width: min(280px, 100%); min-width: 0; margin: 0; }
.uv-find-in {
    display: block; width: 100%; min-width: 0; height: 32px; margin: 0; padding: 0 12px;
    font: inherit; font-size: 13px; color: var(--uv-fg); background: var(--uv-glass); border: 1px solid var(--uv-glass-line);
    border-radius: 999px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); outline: none;
    -webkit-appearance: none; appearance: none;   /* Safari's own search field ignores the radius and the glass */
}
.uv-find-in::-webkit-search-cancel-button { -webkit-appearance: searchfield-cancel-button; cursor: pointer; }
.uv-find-in::placeholder { color: var(--uv-fg-3); opacity: 1; }
.uv-find-in:focus-visible { border-color: rgba(255, 209, 102, 0.55); }
.uv-find-in:disabled { opacity: 0.5; }
.uv-find-note {
    max-width: min(280px, 100%); font-size: 12px; line-height: 1.3; text-align: center; color: var(--uv-fg-2);
    text-shadow: 0 0 2px var(--uv-bg), 0 0 6px var(--uv-bg);
}

/* the phrase band: the sentence hangs in space at the bottom, under the tapped word's tip and over its
   controls — no card, the reading face, a dark halo. ONE colour for the text; a word is coloured only
   when its star is marked in the sky (gold: the word the phrase was written for; cyan: the word the
   learner tapped). The controls sit under the sentence so they stay put while sentences change length. */
.uv-band { align-self: center; display: grid; justify-items: center; gap: 6px; width: min(56ch, 100%); }
.uv-ctrls { display: flex; gap: 6px; justify-content: center; }
.uv-ctrls .uv-chip.uv-icon { font-size: 16px; }
.uv-ctrls .uv-tr-btn { width: auto; padding: 0 10px; font-size: 12px; letter-spacing: 0.02em; }
/* the phrase's translation, under it, in the UI face (the learner's language may not be latin) */
.uv-tr {
    font-family: var(--uv-font); font-size: 13px; font-weight: 400; line-height: 1.35; letter-spacing: 0;
    color: var(--uv-fg-2); margin-top: 4px;
}
.uv-phrase {
    min-width: 0; text-align: center; font-family: var(--uv-read); font-weight: 500; font-size: 16px; line-height: 1.45;
    letter-spacing: 0.01em; color: var(--uv-fg); padding: 2px 4px; text-wrap: balance; opacity: 0; transition: opacity 0.25s;
    text-shadow: 0 0 2px var(--uv-bg), 0 0 6px var(--uv-bg), 0 0 14px var(--uv-bg); will-change: opacity;
}
.uv-phrase .src { color: var(--uv-gold); font-weight: 600; text-shadow: 0 0 2px var(--uv-bg), 0 0 6px var(--uv-bg), 0 0 12px rgba(255, 209, 102, 0.55); }
.uv-phrase .sel { color: var(--uv-c1); font-weight: 600; text-shadow: 0 0 2px var(--uv-bg), 0 0 6px var(--uv-bg), 0 0 12px rgba(79, 216, 236, 0.65); }
/* the sentence lights up as the ship flies it: a word whose star it has not reached yet is dimmer (word galaxy, decision 12) */
.uv-phrase span { transition: opacity 0.25s; }
.uv-phrase .uv-ahead { opacity: 0.42; }

/* ── Controls ────────────────────────────────────────────────────── */
.uv-chip {
    font: inherit; font-size: 12px; font-weight: 500; color: var(--uv-fg-2); background: var(--uv-glass); border: 1px solid var(--uv-glass-line);
    border-radius: 999px; padding: 6px 11px; cursor: pointer; min-height: 32px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.uv-chip[aria-pressed="true"] { color: var(--uv-bg); background: var(--uv-fg); border-color: var(--uv-fg); }
.uv-chip.uv-act { color: var(--uv-bg); background: var(--uv-gold); border-color: var(--uv-gold); }
.uv-chip.uv-act.uv-ghost { color: var(--uv-fg); background: transparent; border-color: var(--uv-glass-line); }
.uv-chip.uv-icon { width: 32px; padding: 0; justify-content: center; font-size: 14px; }
.uv-chip:disabled { opacity: 0.5; cursor: default; }
/* the constellation picker: a native select dressed as a chip (a phone shows its own wheel) */
.uv-select {
    appearance: none; -webkit-appearance: none; max-width: min(320px, 100%); overflow: hidden; text-overflow: ellipsis;
    padding-right: 26px; color: var(--uv-fg);
    background-image: linear-gradient(45deg, transparent 50%, var(--uv-fg-2) 50%), linear-gradient(135deg, var(--uv-fg-2) 50%, transparent 50%);
    background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.uv-bottom-row { display: flex; gap: 6px; align-items: center; }
/* the sky's brightness: a sun chip, its slider dropping under it (tip.js mountGain) */
.uv-gain { position: relative; }
.uv-gain-btn svg { width: 17px; height: 17px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.uv-gain-btn[aria-expanded="true"] { color: var(--uv-fg); border-color: rgba(255, 209, 102, 0.45); }
.uv-gain-pop {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 2; display: flex; align-items: center; gap: 10px;
    width: min(260px, calc(100vw - 28px)); padding: 2px 12px; background: var(--uv-glass); border: 1px solid var(--uv-glass-line);
    border-radius: 999px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
/* the view's tools beside it (tip.js mountViewTools): the whole galaxy, and the controls explained in a pop-up */
.uv-tools { position: relative; display: flex; gap: 6px; }
.uv-tools svg { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.uv-help-btn { font-weight: 600; }
.uv-help-btn[aria-expanded="true"] { color: var(--uv-fg); border-color: rgba(79, 216, 236, 0.5); }
.uv-help-pop {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 2; width: min(330px, calc(100vw - 28px)); padding: 10px 14px 12px;
    background: var(--uv-glass); border: 1px solid var(--uv-glass-line); border-radius: 14px;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; gap: 6px;
}
.uv-help-pop[hidden] { display: none; }
.uv-help-pop b { font-size: 13px; font-weight: 600; color: var(--uv-fg); }
.uv-help-pop div { font-size: 12px; line-height: 1.35; color: var(--uv-fg-2); }
/* the sky's two switches (tip.js mountToggles): the orbits, and the progress lens on a host that has one */
.uv-toggles { display: contents; }
.uv-gain-pop .uv-range { flex: 1 1 auto; min-width: 0; }
.uv-gain-pop .uv-val { margin-left: 0; min-width: 4ch; text-align: right; }
.uv-chip:focus-visible, .uv-range:focus-visible, .uv a:focus-visible { outline: 2px solid var(--uv-gold); outline-offset: 2px; }
.uv a { color: var(--uv-fg); }

.uv-stats {
    font-variant-numeric: tabular-nums; font-size: 11px; color: var(--uv-fg-2); background: var(--uv-glass); border: 1px solid var(--uv-glass-line);
    border-radius: 999px; padding: 6px 10px; white-space: nowrap; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.uv-stats b { color: var(--uv-fg); font-weight: 600; }

/* ── Bottom: the tip and the panel ───────────────────────────────── */
.uv-bottom { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.uv-tip {
    align-self: flex-start; background: var(--uv-glass); border: 1px solid var(--uv-glass-line); border-radius: 14px; padding: 10px 14px 12px;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-width: min(380px, 100%); display: grid; gap: 5px;
}
.uv-tip[hidden] { display: none; }
.uv-tip-w { font-family: var(--uv-read); font-size: 22px; font-weight: 600; line-height: 1.15; letter-spacing: 0.01em; }
.uv-tip-w small { font-family: var(--uv-font); font-size: 12px; color: var(--uv-fg-2); margin-left: 8px; font-weight: 400; letter-spacing: 0; }
/* the word's meanings in the learner's own language — the lead first — cut at two lines */
.uv-tip-g {
    font-size: 14px; line-height: 1.35; color: var(--uv-fg); overflow: hidden;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.uv-tip-s { font-size: 12px; color: var(--uv-fg-2); }
.uv-tip-s em { font-style: normal; color: var(--uv-fg); }
.uv-tip-n { font-size: 12px; color: var(--uv-fg-2); }
.uv-tip-n b { color: var(--uv-fg); font-weight: 500; }
.uv-tip-bk { font-size: 12px; color: var(--uv-fg-2); display: grid; gap: 2px; margin: 2px 0; }
.uv-tip-bk span { display: flex; justify-content: space-between; gap: 12px; }
.uv-tip-bk i { font-style: normal; color: var(--uv-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.uv-tip-bk b { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--uv-fg-2); }
.uv-tip-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.uv-tip-acts:empty { display: none; }
.uv-tip-result { font-size: 12px; color: var(--uv-gold); }

.uv-panel {
    background: var(--uv-glass); border: 1px solid var(--uv-glass-line); border-radius: 16px; padding: 10px 14px 12px;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; gap: 10px;
    grid-template-columns: minmax(0, 1fr);   /* the rows wrap inside the panel instead of widening it past a phone */
}
.uv-panel[hidden] { display: none; }
.uv-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.uv-row label { font-size: 12px; color: var(--uv-fg-2); min-width: 0; }
.uv-val { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--uv-fg); margin-left: auto; white-space: nowrap; min-width: 0; }
.uv-range { flex: 1 1 160px; min-width: 120px; accent-color: var(--uv-gold); height: 28px; margin: 0; }
.uv-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.uv-cta { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.uv-cta a { text-decoration: none; }

.uv-hint {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 13px; color: var(--uv-fg-2); background: var(--uv-glass);
    border: 1px solid var(--uv-glass-line); border-radius: 999px; padding: 8px 14px; pointer-events: none; transition: opacity 0.6s;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
}
.uv-hint.uv-gone { opacity: 0; }

.uv-notice {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; font-size: 14px; color: var(--uv-fg-2);
    background: var(--uv-glass); border: 1px solid var(--uv-glass-line); border-radius: 16px; padding: 14px 18px; max-width: min(360px, 90vw);
}
.uv-notice[hidden] { display: none; }

@media (max-width: 640px) {
    .uv-top { grid-template-columns: auto 1fr auto; }
    .uv-mark-1 { font-size: 17px; }
    .uv-stats { font-size: 10px; }
    .uv-phrase { font-size: 15px; }
    .uv-tip { max-width: 100%; }
    .uv-head { width: 100%; }
    .uv-find { justify-self: center; }
    .uv-find-in { font-size: 16px; }   /* under 16px a phone zooms the page into the field */
    .uv-val { white-space: normal; }    /* the learner's counts wrap on a phone rather than run past the panel */
}
@media (prefers-reduced-motion: reduce) {
    .uv-hint, .uv-phrase, .uv-phrase span { transition: none; }
}

/* a theme's name on the galaxy's rim, for the system under the pointer or chosen (names on demand) — quieter than words */
.uv-lbl.uv-wedge {
    transform: translate(-50%, -50%); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    color: rgba(150, 170, 215, 0.75); opacity: 1;
}
@media (max-width: 560px) { .uv-lbl.uv-wedge { font-size: 9.5px; letter-spacing: 0.06em; } }
