:root {
  --paper: #F6F2EA;
  --surface: #FFFFFF;
  --ink: #1D2B2F;
  --muted: #5F6E70;
  --line: #E4DED2;
  --teal: #1F5E5B;
  --teal-soft: #DCEAE6;
  --gold: #E0A526;
  --gold-soft: #FBF1D9;
  --danger: #A63D36;
  --danger-soft: #F7E3E0;
  --ok: #2F7A4A;
  --bubble-me: #1F5E5B;
  --bubble-me-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(29, 43, 47, .08), 0 4px 14px rgba(29, 43, 47, .06);
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141A1B; --surface: #1D2527; --ink: #ECEFEE; --muted: #9AA7A8; --line: #2C3739;
    --teal: #5FB3AC; --teal-soft: #203B39; --gold: #E8B54A; --gold-soft: #3A3120; --danger: #E07A70; --danger-soft: #3B2523;
    --ok: #6CC08A; --bubble-me: #2A6C68; --bubble-me-ink: #FFFFFF; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141A1B; --surface: #1D2527; --ink: #ECEFEE; --muted: #9AA7A8; --line: #2C3739;
  --teal: #5FB3AC; --teal-soft: #203B39; --gold: #E8B54A; --gold-soft: #3A3120; --danger: #E07A70; --danger-soft: #3B2523;
  --ok: #6CC08A; --bubble-me: #2A6C68; --bubble-me-ink: #FFFFFF; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  background: var(--paper); color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal); }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }

/* ---------- Κουμπιά & φόρμες ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--teal); color: #fff; font-weight: 600; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn--soft { background: var(--teal-soft); color: var(--teal); }
.btn--ghost { background: transparent; color: var(--teal); border: 1.5px solid var(--line); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--sm { min-height: 38px; padding: 0 12px; font-size: .92rem; border-radius: 10px; }
.btn--block { width: 100%; }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-size: .82rem; margin-top: 4px; }
.input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: transparent; }
.err { color: var(--danger); font-size: .92rem; min-height: 1.2em; margin: 6px 0; }

/* ---------- Εγκατάσταση / σύνδεση ---------- */
.wizard { max-width: 520px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px 40px; }
.wizard__steps { display: flex; gap: 6px; margin: 4px 0 22px; }
.wizard__steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.wizard__steps i.on { background: var(--teal); }
.wizard h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.01em; }
.wizard .lead { color: var(--muted); margin: 0 0 22px; }
.wizard__nav { display: flex; gap: 10px; margin-top: 22px; }
.wizard__nav .btn { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--surface); border-radius: 99px; padding: 8px 14px; font-size: .92rem; }
.chip.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.choice { display: block; width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.choice b { display: block; margin-bottom: 2px; }
.choice span { color: var(--muted); font-size: .9rem; }
.choice.on { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.consent { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.consent input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--teal); }
.consent b { display: block; margin-bottom: 2px; }
.consent span { color: var(--muted); font-size: .9rem; }
.pin { letter-spacing: .4em; text-align: center; font-size: 1.4rem; }
.hero { text-align: center; padding-top: 6vh; }
.hero img { width: 84px; height: 84px; border-radius: 22px; box-shadow: var(--shadow); }

/* ---------- Κεντρική οθόνη ---------- */
.shell { display: flex; flex-direction: column; height: 100dvh; max-width: 720px; margin: 0 auto; }
.top { display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 14px 10px; background: var(--paper); border-bottom: 1px solid var(--line); }
.top__title { flex: 1; min-width: 0; }
.top__title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__title span { font-size: .8rem; color: var(--muted); }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; }
.icon-btn svg { width: 22px; height: 22px; }
.banner { margin: 10px 14px 0; padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); font-size: .92rem; display: flex; gap: 10px; align-items: center; }
.banner .btn { margin-left: auto; flex: 0 0 auto; }

.feed > * { flex-shrink: 0; }
.feed { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word; box-shadow: var(--shadow); }
.msg--agent { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 6px; }
.msg--user { align-self: flex-end; background: var(--bubble-me); color: var(--bubble-me-ink); border-bottom-right-radius: 6px; }
.msg--user img { display: block; max-width: 220px; border-radius: 12px; margin: -2px -6px 6px; }
.notice { align-self: center; max-width: 92%; font-size: .85rem; color: var(--muted); background: var(--teal-soft); padding: 6px 12px; border-radius: 99px; text-align: center; }
.typing { align-self: flex-start; color: var(--muted); font-size: .9rem; padding: 4px 6px; }
.typing i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }

/* ---------- Κάρτα έγκρισης ---------- */
.card { align-self: stretch; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card--pending { border-color: var(--gold); }
.card__head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--gold-soft); font-size: .86rem; font-weight: 600; }
.card--done .card__head { background: var(--teal-soft); }
.card--off .card__head { background: var(--line); }
.card__head .tag { margin-left: auto; font-weight: 500; color: var(--muted); }
.card img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; background: #111; }
.card video { display: block; width: 100%; max-height: 480px; background: #000; }
.card__body { padding: 12px 14px; }
.card__text { white-space: pre-wrap; margin: 0; }
.card__quote { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--muted); font-size: .92rem; }
.card__when { margin: 10px 0 0; font-size: .88rem; color: var(--muted); }
.card__act { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.card__act .btn { flex: 1 1 auto; }
.card textarea { margin-top: 4px; }
.pl { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; color: #fff; font-size: .7rem; font-weight: 700; }
.pl--facebook { background: #1877F2; } .pl--instagram { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); }

/* ---------- Γραμμή γραφής ---------- */
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.composer textarea { flex: 1; min-height: 46px; max-height: 140px; padding: 11px 14px; border-radius: 22px; border: 1.5px solid var(--line); background: var(--surface); resize: none; }
.composer .icon-btn { width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; }
.composer .send { background: var(--teal); color: #fff; }
.attach { display: flex; align-items: center; gap: 8px; padding: 6px 12px 0; font-size: .85rem; color: var(--muted); overflow-x: auto; }
.attach__item { position: relative; flex: 0 0 auto; }
.attach img, .attach__ph { display: block; width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--line); }
.attach__item button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-size: 14px; line-height: 22px; padding: 0; }
.attach__txt { flex: 0 0 auto; }
.composer .mic.on { background: var(--danger); color: #fff; animation: micpulse 1.2s infinite; }
@keyframes micpulse { 50% { box-shadow: 0 0 0 6px rgba(200, 60, 60, .2); } }
.msg--agent { position: relative; padding-right: 34px; }
.speak { position: absolute; right: 4px; bottom: 4px; border: 0; background: none; font-size: 15px; opacity: .55; padding: 2px; }
.speak.on { opacity: 1; }
.msg__imgs { display: grid; gap: 4px; margin-bottom: 6px; }
.msg__imgs--2 { grid-template-columns: 1fr 1fr; }
.msg__imgs--3 { grid-template-columns: 1fr 1fr 1fr; }
.msg__imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.quick { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 8px; scrollbar-width: none; }
.quick button { flex: 0 0 auto; border: 1.5px solid var(--line); background: var(--surface); border-radius: 99px; padding: 7px 12px; font-size: .88rem; white-space: nowrap; }

/* ---------- Ρυθμίσεις ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; background: var(--paper); overflow-y: auto; }
.sheet__in { max-width: 620px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 16px 40px; }
.sheet__top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sheet__top h2 { flex: 1; margin: 0; font-size: 1.3rem; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.box h3 { margin: 0 0 10px; font-size: 1.02rem; }
.box p { margin: 0 0 10px; }
.muted { color: var(--muted); font-size: .9rem; }
.row { display: flex; align-items: center; gap: 10px; }
.row + .row { margin-top: 10px; }
.switch { position: relative; width: 50px; height: 30px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + i { background: var(--teal); }
.switch input:checked + i::after { transform: translateX(20px); }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); font-size: .94rem; }
.facts li:first-child { border-top: 0; }
.facts li span { flex: 1; }
.facts button { border: 0; background: none; color: var(--danger); font-size: .86rem; }
.cost { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); max-width: calc(100% - 32px); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; z-index: 40; font-size: .92rem; box-shadow: var(--shadow); }
@media (min-width: 720px) { .msg { max-width: 72%; } }

/* ---------- Συζητήσεις (ενότητες) ---------- */
.threads { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 12px 12px; overscroll-behavior: contain; }
.threads__h { font-size: 1.05rem; margin: 10px 4px 10px; color: var(--muted); font-weight: 700; letter-spacing: .02em; }
.threads__empty { padding: 6px 6px 0; }
.th { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; box-shadow: var(--shadow); }
.th--inbox { border-color: var(--gold); background: var(--gold-soft); }
.th__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 12px; border: 0; background: none; text-align: left; }
.th__ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); font-weight: 800; font-size: 1.1rem; }
.th--inbox .th__ic { background: var(--surface); }
.th__txt { flex: 1; min-width: 0; }
.th__txt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th__txt span { display: block; font-size: .86rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th__meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.th__meta small { color: var(--muted); font-size: .75rem; }
.th__dot { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--teal); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.th__more { flex: none; color: var(--muted); margin-right: 4px; }
.newbar { padding: 10px 14px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.newbar .btn svg { width: 20px; height: 20px; }
.sheet--mini { display: flex; align-items: flex-end; background: rgba(0,0,0,.35); }
.sheet--mini .sheet__in { width: 100%; max-width: 720px; margin: 0 auto; background: var(--paper); border-radius: 20px 20px 0 0; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); display: grid; gap: 8px; height: auto; }
.sheet__ttl { margin: 0 0 6px; font-weight: 700; text-align: center; }

.plats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.plat { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); font-size: .92rem; }
.plat input { accent-color: var(--teal); }
.plat--soon { opacity: .55; }
.plat small { color: var(--muted); font-size: .75rem; }

.pl--google { background: #fff; color: #4285F4; border: 1px solid var(--line); font-weight: 800; }
.stars { color: #E0A526; letter-spacing: 1px; }

.pl--tiktok { background: #111; color: #fff; font-weight: 800; }
.pl--youtube { background: #FF0000; color: #fff; }
.pl--tripadvisor { background: #34E0A1; color: #000; font-weight: 800; }

/* Ανάρτηση στο TikTok */
.tt-acc { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line, #e5e0d8); border-radius: 14px; margin-bottom: 14px; }
.tt-acc img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.tt-prev { width: 100%; max-height: 360px; border-radius: 14px; background: #000; margin-bottom: 14px; }
.tt-chk { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: .95rem; }
.tt-chk.is-off { opacity: .45; }
.tt-note { font-size: .88rem; color: var(--muted); margin: 6px 0 0; }
.tt-consent { font-size: .88rem; margin: 6px 0 10px; }
.tt-small { font-size: .82rem; }
.tt-status { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.05); font-size: .92rem; }
.tt-status.is-ok { background: rgba(16,185,129,.12); }
.tt-status.is-bad { background: rgba(220,38,38,.1); color: var(--danger); }

/* Βίντεο στα συνημμένα και στα μηνύματα */
.attach__item video { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: #000; }
.msg__imgs video { width: 100%; max-height: 320px; border-radius: 12px; background: #000; }

/* Email */
.pl--email { background: #0F766E; color: #fff; }
.howto { margin: 0 0 14px; font-size: .9rem; }
.howto summary { cursor: pointer; color: var(--teal); font-weight: 600; padding: 4px 0; }
.howto p { margin: 8px 0; color: var(--muted); }
.howto .field { margin-top: 10px; }


/* Φωνητική συνομιλία με πρόσωπο (πρωτότυπο) */
.vm-open { padding: 0; overflow: hidden; font-size: 20px; }
.vm-open img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.vm { position: fixed; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 300; background: linear-gradient(135deg, #1d3532, #0d1314); color: #fff; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.vm__x { flex: 0 0 auto; align-self: flex-start; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 15px; }
.vm__face { position: relative; flex: 0 0 auto; width: 68px; height: 68px; border-radius: 50%; border: 0; padding: 0; background: #1F5E5B; cursor: pointer; transition: transform .12s ease; }
.vm__face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.vm__emoji { font-size: 38px; line-height: 68px; }
.vm__ring { position: absolute; inset: -5px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); pointer-events: none; }
.vm--listening .vm__ring { border-color: #4ade80; animation: vmPulse 1.2s ease-out infinite; }
.vm--thinking .vm__ring { border-color: #E8B54A; border-top-color: transparent; animation: vmSpin 1s linear infinite; }
.vm--speaking .vm__ring { border-color: #5FB3AC; }
.vm--speaking .vm__face { animation: vmTalk .32s ease-in-out infinite alternate; }
.vm__beat { transform: scale(1.045); }
.vm__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vm__top { font-size: 13px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vm__name { font-size: 14px; }
.vm__said { font-size: 14px; line-height: 1.35; max-height: 3.9em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.vm__said:empty { display: none; }
.vm__hf { font-size: 12px; opacity: .75; display: flex; gap: 6px; align-items: center; }
/* Όσο μιλάμε, η συζήτηση αφήνει χώρο κάτω για να μην κρύβεται η τελευταία κάρτα πίσω από τη μπάρα */
body.vm-on .feed { padding-bottom: 150px; }
body.vm-on .composer { visibility: hidden; }
@keyframes vmPulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.14); opacity: .15; } }
@keyframes vmSpin { to { transform: rotate(360deg); } }
@keyframes vmTalk { from { transform: scale(1); } to { transform: scale(1.035); } }

/* Μπάρα «βάλε το εικονίδιο»: σταθερή, λίγο πάνω από το κάτω κουμπί/πεδίο γραφής, για να μην κρύβει τίποτα */
.installbar { position: fixed; left: 0; right: 0; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 74px); z-index: 35; margin: 0 10px; box-shadow: var(--shadow); }
.quick { display: flex; gap: 8px; padding: 12px 14px 0; }
.quick__a { flex: 1; text-align: center; padding: 10px 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; font-weight: 600; font-size: .92rem; }

body.vm-on .installbar, body.has-attach .installbar, body:has(.sheet) .installbar { display: none; }

/* 🎙️ Ηχογράφηση (20/10/2026) */
.composer .rec { font-size: 20px; }
.attach__audio { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 12px; background: var(--teal-soft); color: var(--teal); }
.attach__audio b { font-size: 22px; line-height: 1; }
.attach__audio small { font-size: 12px; font-weight: 600; margin-top: 2px; }
.msg__imgs audio { width: 100%; min-width: 220px; }
.recsheet { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 60; }
.recsheet__in { background: var(--surface, #fff); width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.recsheet__t { font-weight: 700; font-size: 18px; margin: 0; }
.recsheet__time { font-size: 40px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; color: var(--danger, #c0392b); }
.recsheet__lvl { height: 8px; border-radius: 99px; background: rgba(0,0,0,.08); overflow: hidden; }
.recsheet__lvl i { display: block; height: 100%; width: 0; background: var(--teal, #1f6f6a); transition: width .1s; }
.recsheet .row { display: flex; gap: 10px; }
.recsheet .row .btn { flex: 1; }

/* 📚 Βιβλιοθήκη του Hub */
.attach__lib { display: flex; flex-direction: column; align-items: center; width: 60px; }
.attach__lib small { max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; }
.attach__ph--music { display: grid; place-items: center; font-style: normal; font-size: 22px; }
.lib__tabs { display: flex; gap: 6px; margin: 4px 0 14px; }
.lib__tabs button { flex: 1; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 9px 6px; font: inherit; font-weight: 600; }
.lib__tabs button.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.lib__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding-bottom: 90px; }
.lib__cell { position: relative; }
.lib__item { display: block; width: 100%; padding: 0; border: 2px solid transparent; border-radius: 14px; background: var(--surface); overflow: hidden; text-align: left; color: var(--ink); box-shadow: var(--shadow); font: inherit; }
.lib__item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.lib__item span { display: block; padding: 7px 9px; font-size: .9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib__tick { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: #fff; font-style: normal; display: none; place-items: center; font-weight: 700; }
.lib__cell.on .lib__item { border-color: var(--teal); }
.lib__cell.on .lib__tick { display: grid; }
.lib__del { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 15px; }
.lib__add { margin-bottom: 12px; }
.lib__empty { padding: 18px 4px; }
.lib__cat { margin: 14px 0 6px; font-size: 1rem; }
.lib__track { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; }
.lib__track.on { border-color: var(--teal); }
.lib__track span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib__play { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--teal-soft); color: var(--teal); font-size: 15px; flex: 0 0 auto; }
.lib__bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.lib__bar span { flex: 1; min-width: 0; color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 380px) { .lib__grid { grid-template-columns: repeat(2, 1fr); } }
