/* ==========================================================================
   ConfShorts — foaia de stil.

   Paleta e aleasă pentru o arhivă contemplativă, nu pentru o rețea socială:
   cerneală albastru-închis în loc de negru pur, alb-os cald în loc de alb
   clinic, iar accentul e lumina unei lămpi, nu un neon.
   ========================================================================== */

:root {
    --ink:       #0D0F14;   /* fundal; albastru-închis, are temperatură */
    --surface:   #141821;   /* panouri, bare */
    --surface-2: #1C212C;   /* stări apăsate, câmpuri */
    --line:      #262C39;
    --fg:        #EDE8DE;   /* alb-os cald */
    --fg-dim:    #9AA0AC;
    --amber:     #D9A441;   /* activ, progres, confirmare */
    --sage:      #7FA98F;   /* întrebare din sală, stare încheiată */
    --ember:     #D2705C;   /* apreciere, ștergere */

    --serif: "Spectral", Georgia, "Times New Roman", serif;
    --sans:  "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

    --tabbar-h: 58px;
    --pad: 16px;
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 22px;

    --shadow: 0 12px 34px rgba(0, 0, 0, .45);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-t: env(safe-area-inset-top, 0px);
}

/* --------------------------------------------------------------------------
   Bază
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--ink);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
}

body { min-height: 100dvh; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .88em;
    background: var(--surface-2);
    padding: .12em .4em;
    border-radius: 5px;
}

:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
    width: 24px;
    height: 24px;
    display: block;
    flex: none;
}
.ico--lg { width: 40px; height: 40px; }

/* --------------------------------------------------------------------------
   Elemente comune
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: var(--amber);
    color: #14100A;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    transition: filter .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(1.06); }

.btn--ghost {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--line);
}
.btn--danger { background: transparent; color: var(--ember); border: 1px solid var(--ember); }
.btn.is-off { opacity: .35; pointer-events: none; }

.iconbtn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.iconbtn:hover { background: var(--surface-2); }

.tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--fg-dim);
    font-size: .72rem;
    letter-spacing: .02em;
}
.tag--sage { color: var(--sage); background: rgba(127, 169, 143, .12); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 12px 0 0; padding: 0; }
.chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--surface-2);
    font-size: .86rem;
}
.chip:hover { background: var(--line); }
.chip.is-on { background: rgba(217, 164, 65, .14); color: var(--amber); }
.chip__n { color: var(--fg-dim); font-size: .74rem; }

/* --------------------------------------------------------------------------
   Bara de jos
   -------------------------------------------------------------------------- */

.tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: calc(var(--tabbar-h) + var(--safe-b));
    padding-bottom: var(--safe-b);
    background: rgba(13, 15, 20, .92);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
}

.tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--fg-dim);
    font-size: .66rem;
    letter-spacing: .02em;
}
.tabbar__item.is-active { color: var(--fg); }
.tabbar__item.is-active .ico { color: var(--amber); }

/* --------------------------------------------------------------------------
   Feed
   -------------------------------------------------------------------------- */

.screen-feed { overflow: hidden; }

.feed {
    position: fixed;
    inset: 0;
    bottom: calc(var(--tabbar-h) + var(--safe-b));
    /* `inset: 0` cu `max-width` ancorează elementul la stânga; `margin: auto`
       îl aduce în centru pe ecrane late. */
    max-width: 480px;
    margin: auto;
    background: #000;
    overflow: hidden;
}

.feed__top {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: calc(var(--safe-t) + 10px) var(--pad) 26px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .72), transparent);
    pointer-events: none;
}
.feed__top > * { pointer-events: auto; }

.tabs { display: flex; gap: 18px; }
.tabs__item {
    color: rgba(237, 232, 222, .62);
    font-size: .9rem;
    font-weight: 400;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}
.tabs__item.is-active { color: var(--fg); font-weight: 600; border-bottom-color: var(--amber); }

.feed__back { display: grid; place-items: center; width: 34px; height: 34px; }
.feed__eventname {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.02rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Derularea pe verticală, cu oprire pe fiecare clip. */
.reel {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}
.reel::-webkit-scrollbar { display: none; }

.slide {
    position: relative;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
}

/* Conferințele sunt filmate 16:9 într-un feed vertical. Marginile se umplu cu
   o copie estompată a cadrului — miniatura, nu un al doilea video: pe telefon
   ar fi însemnat un decodor în plus pentru exact același rezultat. Cadrul nu
   se decupează, ca să nu taie capul vorbitorului. */
.slide__bg {
    position: absolute;
    inset: -10%;
    background-size: cover;
    background-position: center;
    filter: blur(38px) saturate(.7) brightness(.5);
    transform: scale(1.15);
}

.slide__stage {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.slide__poster {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity .25s ease;
}
.slide.is-idle .slide__poster { opacity: 1; }

.player {
    display: none;
    width: 100%;
    height: auto;
    max-height: 100%;
    background: transparent;
}
.player.is-live { display: block; }

/* Legenda, jos-stânga. */
.slide__meta {
    position: absolute;
    left: 0; right: 76px; bottom: 0;
    z-index: 10;
    padding: 60px var(--pad) 18px;
    background: linear-gradient(to top, rgba(0, 0, 0, .82), transparent);
}

.slide__handle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .84rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.slide__handle .tag { font-size: .68rem; }

.slide__title {
    margin: 0 0 6px;
    font-family: var(--serif);
    font-size: 1.16rem;
    font-weight: 400;
    line-height: 1.32;
    letter-spacing: .005em;
}

.slide__part {
    margin: 0 0 5px;
    font-size: .8rem;
    color: var(--amber);
    font-variant-numeric: tabular-nums;
}

.slide__sum {
    margin: 0;
    font-size: .84rem;
    line-height: 1.45;
    color: rgba(237, 232, 222, .74);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.slide.is-open .slide__part {
    margin: 0 0 5px;
    font-size: .8rem;
    color: var(--amber);
    font-variant-numeric: tabular-nums;
}

.slide__sum { -webkit-line-clamp: 8; }

.slide__from {
    margin: 8px 0 0;
    font-size: .74rem;
    color: var(--fg-dim);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Bara de acțiuni, dreapta. */
.rail {
    position: absolute;
    right: 6px;
    bottom: 22px;
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.rail__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: 0;
    padding: 4px;
    cursor: pointer;
    color: var(--fg);
    font-size: .64rem;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}
.rail__btn.is-on { color: var(--amber); }
.rail__btn[data-act="like"].is-on { color: var(--ember); }
.rail__btn[data-act="watched"].is-on { color: var(--sage); }
.rail__btn:active { transform: scale(.92); }

.rail__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #2A3140, #10141C);
    border: 1px solid rgba(217, 164, 65, .5);
    display: grid;
    place-items: center;
    font-family: var(--serif);
    font-size: .95rem;
    color: var(--amber);
}

/* Discul care se rotește cât timp merge sunetul. */
.rail__disc { animation: spin 7s linear infinite; animation-play-state: paused; }
.is-playing .rail__disc { animation-play-state: running; }
/* Mut: discul stă. Mișcarea ar promite un sunet care nu vine. */
.rail__disc.is-muted { animation-play-state: paused !important; color: var(--fg-dim); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Bara de progres: poziția în clip, nu în fișierul de o oră și jumătate. */
.bar {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 14;
    height: 26px;
    display: flex;
    align-items: flex-end;
    touch-action: none;
    cursor: pointer;
}
.bar__track {
    position: relative;
    width: 100%;
    height: 3px;
    background: rgba(237, 232, 222, .2);
}
.bar__fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: var(--amber);
}
.bar__time {
    position: absolute;
    right: var(--pad);
    bottom: 8px;
    font-size: .68rem;
    color: rgba(237, 232, 222, .8);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

/* Semnul de pauză, în mijloc. */
.slide__pause {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 74px;
    height: 74px;
    z-index: 11;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(13, 15, 20, .48);
    opacity: 0;
    transition: opacity .18s ease;
    pointer-events: none;
}
.slide.is-paused .slide__pause { opacity: 1; }

/* Inima de la dubla atingere. */
.burst {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 110px;
    height: 110px;
    z-index: 15;
    color: var(--ember);
    opacity: 0;
    pointer-events: none;
}
.burst.is-on { animation: burst .72s cubic-bezier(.2, .8, .3, 1); }
@keyframes burst {
    0%   { opacity: 0; transform: scale(.4) rotate(-12deg); }
    22%  { opacity: 1; transform: scale(1.12) rotate(4deg); }
    58%  { opacity: 1; transform: scale(1) rotate(0); }
    100% { opacity: 0; transform: scale(1.24); }
}

.slide__spin {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 30px;
    height: 30px;
    z-index: 9;
    border: 2px solid rgba(237, 232, 222, .25);
    border-top-color: var(--amber);
    border-radius: 50%;
    animation: spin .9s linear infinite;
    opacity: 0;
    transition: opacity .2s ease;
}
.slide.is-loading .slide__spin { opacity: 1; }

/* Ecranul curat: totul în afară de clip se retrage. Nu dispare — se stinge și
   nu mai primește atingeri, ca o atingere greșită să nu apese un buton
   invizibil. */
.is-clean .feed__top,
.is-clean .tabbar,
.is-clean .rail,
.is-clean .slide__meta,
.is-clean .bar__time {
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease;
}
.is-clean .bar__track { opacity: .35; }

.feed__top, .tabbar, .rail, .slide__meta, .bar__time,
.bar__track { transition: opacity .22s ease; }

/* --------------------------------------------------------------------------
   Panoul cu transcrierea
   -------------------------------------------------------------------------- */

.sheet {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    max-height: 74%;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    box-shadow: var(--shadow);
    transform: translateY(100%);
    transition: transform .26s cubic-bezier(.3, .8, .3, 1);
}
.sheet.is-open { transform: translateY(0); }
.sheet[hidden] { display: none; }

.sheet__grip {
    width: 38px;
    height: 4px;
    margin: 9px auto 2px;
    border-radius: 999px;
    background: var(--line);
}
.sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px var(--pad) 8px;
}
.sheet__title { margin: 0; font-size: .82rem; font-weight: 600; color: var(--fg-dim); letter-spacing: .06em; text-transform: uppercase; }
.sheet__body {
    padding: 0 var(--pad) 26px;
    overflow-y: auto;
    font-family: var(--serif);
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(237, 232, 222, .88);
}
.sheet__body p { margin: 0 0 1em; }
.sheet__body .note {
    font-family: var(--sans);
    font-size: .78rem;
    color: var(--fg-dim);
    border-left: 2px solid var(--line);
    padding-left: 10px;
}

/* Anunț scurt peste feed: rundă nouă, în principal. */
.toast {
    position: absolute;
    left: 50%;
    bottom: 96px;
    z-index: 32;
    max-width: 82%;
    padding: 11px 18px;
    border-radius: 999px;
    background: rgba(20, 24, 33, .96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    font-size: .84rem;
    text-align: center;
    transform: translate(-50%, 12px);
    opacity: 0;
    transition: opacity .24s ease, transform .24s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast[hidden] { display: none; }

/* Viteza de redare. Butonul din bara de acțiuni arată cifra, nu o pictogramă:
   „1,4×" se citește dintr-o privire, un cadran nu. */
.rail__btn[data-act="speed"] span {
    font-size: .68rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}
.rail__btn[data-act="speed"].is-on { color: var(--amber); }

.sheet--speed { max-height: none; }
.speed__body { padding: 4px var(--pad) 26px; }

.speed__now {
    margin: 6px 0 18px;
    text-align: center;
    font-family: var(--serif);
    font-size: 2.4rem;
    font-weight: 300;
    color: var(--amber);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* Cursorul: desenat de la zero, fiindcă cel implicit vine cu culorile
   sistemului și rupe paleta pe fundal întunecat. */
.speed__range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 30px;
    background: none;
    cursor: pointer;
}
.speed__range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: var(--surface-2);
}
.speed__range::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: var(--surface-2);
}
.speed__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    margin-top: -9px;
    border-radius: 50%;
    background: var(--amber);
    border: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.speed__range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--amber);
    border: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.speed__range:focus-visible { outline: 2px solid var(--amber); outline-offset: 6px; }

.speed__marks {
    display: flex;
    justify-content: space-between;
    margin: -2px 2px 20px;
    font-size: .66rem;
    color: var(--fg-dim);
    font-variant-numeric: tabular-nums;
}

.speed__presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.speed__preset {
    min-width: 58px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--fg);
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.speed__preset:active { transform: scale(.96); }
.speed__preset.is-on {
    background: rgba(217, 164, 65, .14);
    border-color: rgba(217, 164, 65, .5);
    color: var(--amber);
}

.speed__hint {
    margin: 20px 0 0;
    font-size: .76rem;
    line-height: 1.55;
    color: var(--fg-dim);
    text-align: center;
}

/* Discul se rotește mai repede când și clipul merge mai repede: mișcarea
   trebuie să spună același lucru ca cifra de lângă ea. */
.is-fast .rail__disc { animation-duration: 4s; }

/* --------------------------------------------------------------------------
   Serverul de fișiere nu răspunde
   -------------------------------------------------------------------------- */

.mediaerror {
    position: absolute;
    inset: 0;
    z-index: 35;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px;
    text-align: center;
    background: rgba(13, 15, 20, .94);
    color: var(--fg);
}
.mediaerror[hidden] { display: none; }
.mediaerror .ico { color: var(--ember); }
.mediaerror h2 { margin: 0; font-family: var(--serif); font-size: 1.2rem; font-weight: 400; }
.mediaerror p { margin: 0; max-width: 30ch; font-size: .86rem; color: var(--fg-dim); }
.mediaerror__actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }

/* --------------------------------------------------------------------------
   Intrare — ecranul de blocare
   --------------------------------------------------------------------------
   Modelul e ecranul de blocare din iOS: cifre mari și rotunde, aerisite, cu
   literele sub ele. E gestul pe care oricine îl face de zeci de ori pe zi,
   deci mâna știe deja unde să apese. */

.screen-login { display: grid; place-items: center; min-height: 100dvh; }

.lock {
    position: relative;
    width: 100%;
    max-width: 340px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: calc(var(--safe-t) + 32px) 16px calc(var(--safe-b) + 24px);
}

/* Haloul respiră cu un ciclu de 9 secunde — aproape de ritmul unei respirații
   calme, prezent, dar sub pragul la care ar distrage. */
.lock__halo {
    position: absolute;
    top: 14%;
    left: 50%;
    width: 340px;
    height: 340px;
    margin-left: -170px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 164, 65, .15), transparent 68%);
    animation: breathe 9s ease-in-out infinite;
    pointer-events: none;
}
@keyframes breathe {
    0%, 100% { transform: scale(.9);  opacity: .55; }
    50%      { transform: scale(1.1); opacity: 1; }
}

.lock__top { position: relative; text-align: center; margin-bottom: 26px; }
.lock__brand {
    margin: 0;
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: .012em;
}
.lock__sub { margin: 7px 0 0; color: var(--fg-dim); font-size: .84rem; }

.lock__form { position: relative; width: 100%; display: grid; justify-items: center; }

/* Punctele. Umplerea are un mic salt — arcul acela scurt e ce face gestul să
   pară că răspunde, nu doar că se colorează. */
.lock__dots { display: flex; gap: 15px; margin-bottom: 14px; }
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.25px solid rgba(237, 232, 222, .34);
    background: transparent;
    transition: background .18s ease, border-color .18s ease, transform .18s cubic-bezier(.3, 1.6, .5, 1);
}
.dot.is-on {
    background: var(--fg);
    border-color: var(--fg);
    transform: scale(1.18);
}

/* Cod greșit: punctele se scutură scurt, ca la telefon. */
.lock__dots.is-wrong { animation: shake .5s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-7px); }
    40%, 60% { transform: translateX(7px); }
}
.lock__dots.is-busy .dot { animation: pulse 1.1s ease-in-out infinite; }
.lock__dots.is-busy .dot:nth-child(2) { animation-delay: .1s; }
.lock__dots.is-busy .dot:nth-child(3) { animation-delay: .2s; }
.lock__dots.is-busy .dot:nth-child(4) { animation-delay: .3s; }
.lock__dots.is-busy .dot:nth-child(5) { animation-delay: .4s; }
.lock__dots.is-busy .dot:nth-child(6) { animation-delay: .5s; }
.lock__dots.is-busy .dot:nth-child(7) { animation-delay: .6s; }
@keyframes pulse { 50% { opacity: .35; } }

.lock__msg {
    min-height: 20px;
    margin: 0 0 26px;
    font-size: .82rem;
    color: var(--fg-dim);
    text-align: center;
}
.lock__msg.is-error { color: var(--ember); }

.pad {
    display: grid;
    grid-template-columns: repeat(3, 74px);
    gap: 16px 22px;
    justify-content: center;
}
.pad[data-locked] { opacity: .38; pointer-events: none; }

/* Cheia rotundă: lățime fixă plus `aspect-ratio`. `border-radius: 50%` pe o
   celulă de grilă mai lată decât înaltă ar da un oval. */
.key {
    position: relative;
    width: 74px;
    aspect-ratio: 1;
    display: grid;
    place-content: center;
    gap: 1px;
    border: 0;
    border-radius: 50%;
    background: rgba(237, 232, 222, .07);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s ease, transform .08s ease;
}
.key:active { background: rgba(237, 232, 222, .22); transform: scale(.94); }
.key__n {
    font-family: var(--sans);
    font-size: 1.72rem;
    font-weight: 300;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
/* Literele nu au nicio funcție. Sunt acolo fiindcă ochiul le caută: fără ele,
   tastatura arată ca un formular, nu ca un ecran de blocare. */
.key__l {
    font-size: .53rem;
    font-weight: 600;
    letter-spacing: .16em;
    color: var(--fg-dim);
    line-height: 1;
}
.key--void { background: none; pointer-events: none; }
.key--bare { background: none; }
.key--bare:active { background: rgba(237, 232, 222, .12); }
.key--bare .ico { width: 26px; height: 26px; color: var(--fg-dim); }

.lock__locked { position: relative; margin: 22px 0 0; color: var(--ember); font-size: .8rem; }

.lock__langs { position: relative; display: flex; gap: 4px; margin-top: 30px; }
.lock__lang {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--fg-dim);
}
.lock__lang.is-on { background: rgba(237, 232, 222, .09); color: var(--fg); }

/* Ecrane joase: tastatura se strânge, ca să nu iasă din pagină. */
@media (max-height: 700px) {
    .lock__top { margin-bottom: 16px; }
    .lock__brand { font-size: 1.6rem; }
    .pad { grid-template-columns: repeat(3, 64px); gap: 12px 20px; }
    .key { width: 64px; }
    .key__n { font-size: 1.5rem; }
    .lock__msg { margin-bottom: 18px; }
    .lock__langs { margin-top: 18px; }
}

/* --------------------------------------------------------------------------
   Pagini obișnuite (Caută, Salvate, Tu)
   -------------------------------------------------------------------------- */

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: calc(var(--safe-t) + 18px) var(--pad) calc(var(--tabbar-h) + var(--safe-b) + 34px);
}

.page__head { margin-bottom: 16px; }
.page__title {
    margin: 0 0 12px;
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 300;
}
.page__note { margin: 0 0 14px; color: var(--fg-dim); font-size: .8rem; }

.search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    height: 46px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
}
.search__ico { color: var(--fg-dim); width: 19px; height: 19px; }
.search__field {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    color: var(--fg);
    font-size: .94rem;
    outline: none;
}
.search__field::placeholder { color: #5C6474; }
.search__clear { display: grid; place-items: center; color: var(--fg-dim); }
.search__clear .ico { width: 18px; height: 18px; }

/* Rezultatele căutării */
.hits { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hit__link {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 12px;
    padding: 9px;
    border-radius: var(--r-md);
}
.hit__link:hover { background: var(--surface); }

.hit__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface-2);
}
.hit__len {
    position: absolute;
    z-index: 2;
    right: 4px; bottom: 4px;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .72);
    font-size: .66rem;
    font-variant-numeric: tabular-nums;
}

.hit__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hit__title {
    font-family: var(--serif);
    font-size: .98rem;
    line-height: 1.34;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hit__part { font-size: .74rem; color: var(--amber); font-variant-numeric: tabular-nums; }
.hit__meta { font-size: .74rem; color: var(--fg-dim); }
.hit__sum {
    font-size: .78rem;
    color: rgba(237, 232, 222, .6);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Grila de conferințe */
.grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px 12px;
}
.card__link { display: flex; flex-direction: column; gap: 6px; }
.card__art {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--surface-2);
}
.card__art--tall { aspect-ratio: 3 / 4; }
.card__art img, .hit__thumb img {
    /* Imaginea apare doar după ce chiar s-a încărcat; până atunci se vede
       substitutul de dedesubt, nu un dreptunghi gol care sare. */
    position: relative;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .28s ease;
}
.card__art img.is-loaded, .hit__thumb img.is-loaded { opacity: 1; }

/* Substitutul: inițiala titlului, pe fundalul aplicației. Se vede când
   miniatura lipsește sau serverul de fișiere nu răspunde — adică oricând
   până la ridicarea celui de-al doilea server. */
.card__art::before, .hit__thumb::before {
    content: attr(data-initial);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--serif);
    font-weight: 300;
    font-size: 2.4rem;
    color: rgba(217, 164, 65, .3);
    background:
        radial-gradient(120% 90% at 30% 0%, rgba(217, 164, 65, .08), transparent 60%),
        linear-gradient(160deg, var(--surface-2), var(--surface));
    pointer-events: none;
}
.hit__thumb::before { font-size: 1.5rem; }
.card__link:hover .card__art { outline: 1px solid var(--line); }

.card__parts, .card__len {
    position: absolute;
    z-index: 2;
    right: 6px; bottom: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .68);
    font-size: .66rem;
}
.card__title {
    font-family: var(--serif);
    font-size: .92rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card__meta { font-size: .72rem; color: var(--fg-dim); }

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 26px;
}
.pager__at { font-size: .8rem; color: var(--fg-dim); font-variant-numeric: tabular-nums; }

/* Panouri, în profil */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 16px;
    margin-bottom: 14px;
}
.panel__title {
    margin: 0 0 12px;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fg-dim);
}
.panel__note { margin: 8px 0 0; font-size: .78rem; color: var(--fg-dim); }
.panel__sub {
    margin: 20px 0 8px;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--fg-dim);
}

.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.figure { display: flex; flex-direction: column; gap: 2px; }
.figure__n {
    font-family: var(--serif);
    font-size: 1.7rem;
    font-weight: 300;
    color: var(--amber);
    font-variant-numeric: tabular-nums;
}
.figure__l { font-size: .72rem; color: var(--fg-dim); }

.meter {
    position: relative;
    height: 5px;
    margin-top: 16px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
}
.meter__fill { position: absolute; inset: 0 auto 0 0; background: var(--amber); border-radius: 999px; }
/* Bara cu trei bucăți: terminat (chihlimbar), început (salvie), rest.
   Partea „început" stă lipită după cea terminată, în ordinea din flux. */
.meter--split { display: flex; }
.meter--split .meter__fill { position: static; height: 100%; flex: none; }
.meter__part { height: 100%; flex: none; background: var(--sage); opacity: .75; }

.rows { margin: 0; }
.row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: .86rem;
}
.row:last-child { border-bottom: 0; }
.row dt { color: var(--fg-dim); }
.row dd { margin: 0; text-align: right; }

.probe { color: var(--fg-dim); }
.probe.is-ok  { color: var(--sage); }
.probe.is-bad { color: var(--ember); text-align: right; }

.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.log__row { display: grid; gap: 1px; font-size: .78rem; }
.log__when { color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.log__src { color: var(--fg-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    margin-bottom: 14px;
    border-radius: var(--r-md);
    border: 1px solid rgba(210, 112, 92, .45);
    background: rgba(210, 112, 92, .1);
    font-size: .84rem;
}
.alert .ico { color: var(--ember); width: 20px; height: 20px; }

/* Ecrane goale */
.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
    min-height: 320px;
    padding: 40px 28px;
    text-align: center;
}
.empty__ico { width: 34px; height: 34px; color: var(--fg-dim); }
.empty__title { margin: 0; font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.empty__text { margin: 0; max-width: 36ch; font-size: .84rem; color: var(--fg-dim); }

/* --------------------------------------------------------------------------
   Ecrane late și preferințe
   -------------------------------------------------------------------------- */

@media (min-width: 900px) {
    .feed { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
    .tabbar { max-width: 480px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
    .screen-explore .tabbar, .screen-saved .tabbar, .screen-profile .tabbar { max-width: 720px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .login__halo { opacity: .7; }
}

/* --------------------------------------------------------------------------
   Wizardul de instalare
   --------------------------------------------------------------------------
   Aceleași culori și aceleași fonturi ca restul aplicației: instalarea e
   primul lucru pe care îl vede omul, iar dacă arată ca un alt produs, tot
   restul pare improvizat. */

.screen-wizard { min-height: 100dvh; }

.wiz {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px var(--pad) 80px;
}

.wiz-top { text-align: center; margin-bottom: 28px; }
.wiz-brand {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.9rem;
    font-weight: 300;
}
.wiz-sub { margin: 4px 0 26px; color: var(--fg-dim); font-size: .86rem; }

/* Pașii, ca un fir orizontal. Pe telefon rămân pe un rând, cu textul ascuns:
   cifra și bifa spun destul. */
.wiz-steps {
    display: flex;
    justify-content: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.wiz-step {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-size: .76rem;
    color: var(--fg-dim);
}
.wiz-step__n {
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: var(--surface-2);
    font-size: .68rem;
    font-variant-numeric: tabular-nums;
}
.wiz-step.is-now { color: var(--fg); border-color: rgba(217, 164, 65, .5); }
.wiz-step.is-now .wiz-step__n { background: var(--amber); color: #14100A; }
.wiz-step.is-done .wiz-step__n { background: rgba(127, 169, 143, .2); color: var(--sage); }

@media (max-width: 560px) {
    .wiz-step__l { display: none; }
    .wiz-step { padding: 6px; }
}

.wiz-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 26px 22px;
}

.wiz-h1 { margin: 0 0 14px; font-family: var(--serif); font-size: 1.4rem; font-weight: 300; }
.wiz-h2 { margin: 0 0 10px; font-family: var(--serif); font-size: 1.25rem; font-weight: 300; }
.wiz-h3 { margin: 26px 0 8px; font-size: .74rem; font-weight: 600; letter-spacing: .08em;
          text-transform: uppercase; color: var(--fg-dim); }
.wiz-lead { margin: 0 0 20px; font-size: .88rem; line-height: 1.6; color: rgba(237, 232, 222, .8); }
.wiz-prose { font-size: .9rem; line-height: 1.65; color: rgba(237, 232, 222, .82); }
.wiz-prose p { margin: 0 0 1em; }
.wiz-note {
    margin: 18px 0;
    padding: 12px 14px;
    border-left: 2px solid var(--line);
    font-size: .8rem;
    color: var(--fg-dim);
}

.wiz-error {
    margin: 0 0 18px;
    padding: 13px 15px;
    border-radius: var(--r-sm);
    border: 1px solid rgba(210, 112, 92, .45);
    background: rgba(210, 112, 92, .1);
    font-size: .85rem;
    line-height: 1.55;
}

.wiz-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 11px; }
.wiz-list--tight { gap: 5px; margin-top: 12px; }
.wiz-item { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: .85rem; }
.wiz-item__mark { font-weight: 600; line-height: 1.5; }
.wiz-item.is-ok   .wiz-item__mark { color: var(--sage); }
.wiz-item.is-bad  .wiz-item__mark { color: var(--ember); }
.wiz-item.is-warn .wiz-item__mark { color: var(--amber); }
.wiz-item__d { display: block; color: var(--fg-dim); font-size: .8rem; line-height: 1.5; }

.wiz-form { display: grid; gap: 18px; }
.wiz-field { display: grid; gap: 6px; }
.wiz-field > span { font-size: .8rem; font-weight: 600; }
.wiz-field input {
    width: 100%;
    padding: 11px 13px;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--fg);
    font: inherit;
    font-size: .92rem;
}
.wiz-field input:focus { outline: none; border-color: rgba(217, 164, 65, .6); }
.wiz-field input[readonly] { color: var(--amber); font-family: ui-monospace, Menlo, monospace; font-size: .78rem; }
.wiz-field small, .wiz-key small {
    font-size: .76rem;
    line-height: 1.5;
    color: var(--fg-dim);
}

.wiz-keys { display: grid; gap: 14px; margin-bottom: 6px; }
.wiz-key { display: grid; gap: 5px; }
.wiz-key label { font-size: .78rem; font-weight: 600; font-family: ui-monospace, Menlo, monospace; }
.wiz-key input {
    width: 100%;
    padding: 10px 12px;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--amber);
    font-family: ui-monospace, Menlo, monospace;
    font-size: .74rem;
}

.wiz-details { margin-bottom: 20px; font-size: .84rem; }
.wiz-details summary { cursor: pointer; color: var(--sage); }

.wiz-todo { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: .86rem; line-height: 1.55; }
.wiz-todo code { font-size: .82em; }

.wiz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    margin-top: 6px;
    border: 0;
    border-radius: 999px;
    background: var(--amber);
    color: #14100A;
    font: inherit;
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
}
.wiz-btn:hover { filter: brightness(1.06); }
.wiz-btn--ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }


/* --------------------------------------------------------------------------
   Subtitrarea
   --------------------------------------------------------------------------
   Replicile sunt desenate de aplicație, nu de browser: `::cue` acceptă puține
   proprietăți și se poartă altfel de la un browser la altul, iar mărimea
   literelor trebuia să poată fi aleasă. */

.cues {
    position: absolute;
    left: 50%;
    bottom: 122px;
    z-index: 13;
    width: min(92%, 46ch);
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .14s ease;
}
.cues.is-on { opacity: 1; }

/* Fundalul urmează textul, rând cu rând, în loc să fie un dreptunghi care
   acoperă jumătate de cadru când replica e scurtă. */
.cues::before { content: none; }
.cues {
    color: #fff;
    font-family: var(--sans);
    font-weight: 500;
    line-height: 1.4;
    text-wrap: balance;
    white-space: pre-line;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, .95),
        0 0 14px rgba(0, 0, 0, .8);
}

.cues--s  { font-size: clamp(.78rem, 3.2vw, .95rem); }
.cues--m  { font-size: clamp(.94rem, 4vw, 1.16rem); }
.cues--l  { font-size: clamp(1.1rem, 4.9vw, 1.42rem); }
.cues--xl { font-size: clamp(1.3rem, 5.8vw, 1.72rem); }

/* Cu meniurile ascunse, replicile coboară: nu mai au ce ocoli. Ele rămân —
   sunt conținut, nu comenzi. */
.is-clean .cues { bottom: 54px; transition: opacity .14s ease, bottom .3s ease; }

.cc__label {
    margin: 18px 0 10px;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fg-dim);
}
.cc__label:first-child { margin-top: 4px; }

.cc__tracks { display: flex; flex-wrap: wrap; gap: 8px; }
.cc__hint.is-bad { color: var(--ember); }
.cc__hint {
    margin: 12px 0 0;
    font-size: .76rem;
    line-height: 1.5;
    color: var(--fg-dim);
}

.rail__btn[data-act="cc"].is-on { color: var(--amber); }


/* --------------------------------------------------------------------------
   Conturi
   -------------------------------------------------------------------------- */

.page__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: .82rem;
    color: var(--fg-dim);
}
.page__back .ico { width: 18px; height: 18px; }
.page__back:hover { color: var(--fg); }

.flash {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-size: .86rem;
    line-height: 1.5;
}
.flash--ok  { border: 1px solid rgba(127, 169, 143, .45); background: rgba(127, 169, 143, .1); }
.flash--bad { border: 1px solid rgba(210, 112, 92, .45);  background: rgba(210, 112, 92, .1); }

.accs { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.acc {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}
.acc:last-child { border-bottom: 0; }
.acc.is-off { opacity: .55; }

.acc__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acc__name { font-family: var(--serif); font-size: 1.05rem; }
.tag--ember { color: var(--ember); background: rgba(210, 112, 92, .12); }

.acc__meta { margin: 4px 0 0; font-size: .76rem; color: var(--fg-dim); }
.acc__open { display: inline-block; margin-top: 8px; font-size: .8rem; color: var(--amber); }

.acc__edit { margin-top: 12px; display: grid; gap: 10px; }
.acc__form { display: flex; flex-wrap: wrap; gap: 8px; }
.acc__form input {
    flex: 1 1 140px;
    min-width: 0;
    padding: 9px 12px;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--fg);
    font: inherit;
    font-size: .86rem;
}
.acc__form input:focus { outline: none; border-color: rgba(217, 164, 65, .6); }
.acc__row { display: flex; flex-wrap: wrap; gap: 8px; }
.acc__warn { margin: 0; font-size: .86rem; color: var(--ember); line-height: 1.5; }

.btn--small { min-height: 38px; padding: 0 14px; font-size: .82rem; }

.acc__new { display: grid; gap: 16px; }


/* --------------------------------------------------------------------------
   De continuat
   -------------------------------------------------------------------------- */

/* Cifrele din profil duc la listele lor; se vede că sunt de apăsat. */
.figures a.figure { text-decoration: none; }
.figures a.figure:hover .figure__n { filter: brightness(1.15); }
.figures a.figure:hover .figure__l { color: var(--fg); }
.figure--go .figure__n { color: var(--sage); }

.hit--go { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hit--go:last-child { border-bottom: 0; }

/* Cât s-a ascultat din clip. Verde, nu chihlimbar: bara din player arată
   poziția, asta arată altceva, și n-au de ce să semene. */
.goal {
    display: block;
    height: 4px;
    margin: 8px 0 4px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
}
.goal__fill { display: block; height: 100%; background: var(--sage); border-radius: 999px; }

.hit__acts { display: flex; gap: 8px; flex-wrap: wrap; padding-left: 9px; }
