/* ============ Miki – osnovni slog (najprej telefon) ============ */
:root {
  --bg: #16101a;
  --bg2: #1d1522;
  --card: #241b2a;
  --card2: #2c2233;
  --line: rgba(255, 240, 230, .09);
  --line2: rgba(255, 240, 230, .16);
  --text: #f3ede6;
  --muted: #a99db0;
  --gold: #e3b464;
  --gold2: #f0c97f;
  --ink: #1a1208;
  --danger: #e0605a;
  --ok: #7cc47f;
  --warn: #e8a54a;
  --radius: 14px;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.noscroll { overflow: hidden; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
code { font-size: .88em; background: rgba(255,255,255,.07); padding: .1em .35em; border-radius: 5px; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.inline { display: inline; margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- gumbi in polja ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 44px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--line2);
  background: var(--card2); color: var(--text); font: 600 .95rem var(--sans); cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--gold); color: var(--text); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.primary:hover { background: var(--gold2); color: var(--ink); }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; border-color: rgba(224,96,90,.5); color: #f08c86; }
.btn.danger:hover { background: rgba(224,96,90,.12); border-color: var(--danger); }
.btn.sm { min-height: 38px; padding: 0 .85rem; font-size: .86rem; }
.btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: rgba(227,180,100,.1); }
.btn:disabled { opacity: .6; cursor: progress; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.linkbtn:hover { color: var(--text); }
.iconbtn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line2); background: var(--card); color: var(--text); font-size: 1.3rem; cursor: pointer;
}
.iconbtn:hover { border-color: var(--gold); color: var(--gold); }

input, select, textarea {
  width: 100%; min-height: 44px; padding: .6rem .8rem; border-radius: 10px;
  border: 1px solid var(--line2); background: var(--bg2); color: var(--text); font: 16px var(--sans);
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(227,180,100,.18); }
input[type="file"] { padding: .5rem; }
input[type="checkbox"] { width: auto; min-height: 0; }
label { display: block; font-size: .85rem; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: .3rem; }
.stack { display: grid; gap: .9rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.row-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }

.switch { display: flex; align-items: center; gap: .65rem; color: var(--text); font-size: .95rem; cursor: pointer; min-height: 40px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { flex: none; width: 42px; height: 24px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line2); position: relative; transition: .2s; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: .2s; }
.switch input:checked + span { background: var(--gold); border-color: var(--gold); }
.switch input:checked + span::after { left: 20px; background: var(--ink); }
.switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 .9rem; border-radius: 999px;
  border: 1px solid var(--line2); background: var(--card); color: var(--text); font: 500 .88rem var(--sans);
  cursor: pointer; white-space: nowrap; transition: .15s;
}
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--gold); color: var(--ink); font-size: .72rem; font-weight: 700; }

.flash { margin: .8rem 1rem; padding: .75rem 1rem; border-radius: 12px; border: 1px solid; font-size: .92rem; }
.flash.ok { border-color: rgba(124,196,127,.4); background: rgba(124,196,127,.1); }
.flash.err { border-color: rgba(224,96,90,.45); background: rgba(224,96,90,.1); }
.flash.warn { border-color: rgba(232,165,74,.45); background: rgba(232,165,74,.1); }
main .flash { margin: 0 0 1rem; }

.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 .55rem; border-radius: 6px; font-size: .74rem; font-weight: 600; background: rgba(255,255,255,.07); color: var(--muted); }
.tag.lvl-Lahko { color: #9fd6a1; background: rgba(124,196,127,.13); }
.tag.lvl-Srednja { color: #f0c97f; background: rgba(227,180,100,.13); }
.tag.lvl-Težka { color: #f59a94; background: rgba(224,96,90,.15); }
.tag.warn { color: var(--warn); background: rgba(232,165,74,.14); }
.tag.gold { color: var(--ink); background: var(--gold); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dc, var(--gold)); margin-right: .45em; vertical-align: .05em; flex: none; }

/* ---------- glava ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem 1rem; padding-top: max(.6rem, env(safe-area-inset-top)); background: rgba(22,16,26,.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--gold); font: 600 1.1rem var(--serif);
}
.brand-text { font: 600 1.15rem var(--serif); }
.topnav { display: flex; align-items: center; gap: 1rem; font-size: .9rem; }
.topnav a { color: var(--muted); padding: .3rem 0; border-bottom: 2px solid transparent; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topnav a:hover { color: var(--text); }
.topnav a.on { color: var(--text); border-bottom-color: var(--gold); }
@media (max-width: 420px) { .brand-text { display: none; } .topnav { gap: .8rem; } }

/* ---------- prijava ---------- */
body.auth { display: grid; place-items: center; padding: 1.5rem 1rem;
  background: radial-gradient(ellipse at 20% 0%, rgba(227,180,100,.12), transparent 55%), radial-gradient(ellipse at 100% 100%, rgba(212,106,154,.10), transparent 50%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 1.8rem 1.5rem; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.auth-brand { display: inline-block; margin-bottom: 1rem; }
.auth-card .btn { width: 100%; }

/* ---------- knjižnica ---------- */
.lib { padding-bottom: calc(2rem + var(--safe-b)); }
.lib-bar { display: flex; gap: .6rem; padding: .9rem 1rem .5rem; }
.search { flex: 1; position: relative; }
.search svg { position: absolute; left: .85rem; top: 50%; translate: 0 -50%; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; }
.search input { padding-left: 2.5rem; border-radius: 999px; background: var(--card); }
.filters-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.dance-strip { display: flex; gap: .45rem; overflow-x: auto; padding: .3rem 1rem .8rem; scrollbar-width: none; scroll-snap-type: x proximity; }
.dance-strip::-webkit-scrollbar { display: none; }
.dance-chip { scroll-snap-align: start; padding-left: .7rem; }
.dance-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--dc); margin-right: .45rem; }
.dance-chip[aria-pressed="true"] { background: var(--dc); border-color: var(--dc); color: var(--ink); }
.dance-chip[aria-pressed="true"]::before { background: var(--ink); opacity: .5; }

.lib-body { padding: 0 1rem; }
.count { color: var(--muted); font-size: .85rem; margin: 0 0 .6rem; }
.group { font: 600 .78rem var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 1.2rem 0 .5rem; grid-column: 1 / -1; }
.group:first-child { margin-top: 0; }
.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }

/* filtri: spodnji list na telefonu */
.filters {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 85vh; overflow-y: auto;
  background: var(--bg2); border-top: 1px solid var(--line2); border-radius: 20px 20px 0 0;
  padding: 1rem 1.2rem calc(1.2rem + var(--safe-b)); transform: translateY(105%); transition: transform .25s ease;
  box-shadow: 0 -20px 50px rgba(0,0,0,.45);
}
.filters.open { transform: none; }
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters-head h2 { margin: 0; }
.filters fieldset { border: 0; padding: 0; margin: 1.1rem 0 0; }
.filters legend { font: 600 .74rem var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: .5rem; padding: 0; }
.filters-actions { display: flex; gap: .6rem; margin-top: 1.4rem; position: sticky; bottom: 0; }
.filters-actions .btn { flex: 1; }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); }

/* kartice: na telefonu vrstice */
.grid { display: grid; gap: .6rem; }
.card {
  position: relative; display: grid; grid-template-columns: 116px 1fr auto; gap: .8rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; padding-right: .3rem;
  transition: border-color .15s;
}
.card:hover { border-color: var(--line2); }
.card.is-hidden { opacity: .72; border-style: dashed; }
.thumb {
  position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--dc) 55%, #1d1522), #1d1522 75%);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ph { position: absolute; inset: auto .5rem .4rem; font: 600 .78rem var(--serif); color: rgba(255,255,255,.85); line-height: 1.1; }
.thumb::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--dc); }
.thumb .play { position: absolute; inset: 0; margin: auto; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.45); backdrop-filter: blur(3px); opacity: 0; transition: .15s; }
.thumb .play::after { content: ''; position: absolute; left: 11px; top: 8px; border: 7px solid transparent; border-left: 11px solid #fff; border-right: 0; }
.thumb:hover .play { opacity: 1; }
.badge { position: absolute; top: .3rem; right: .3rem; background: rgba(0,0,0,.65); color: #fff; font-size: .66rem; font-weight: 600; padding: .1rem .4rem; border-radius: 5px; }
.badge.warn { left: .3rem; right: auto; background: rgba(232,165,74,.9); color: var(--ink); }
.meta { min-width: 0; display: grid; gap: .25rem; }
.title { color: var(--text); font-weight: 600; font-size: .98rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.title:hover { color: var(--gold2); }
.sub { color: var(--muted); font-size: .8rem; margin: 0; display: flex; align-items: center; flex-wrap: wrap; }
.sub .date { white-space: nowrap; }
.fav { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; border-radius: 50%; color: var(--muted); }
.fav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; transition: transform .15s; }
.fav[aria-pressed="true"] { color: var(--gold); }
.fav[aria-pressed="true"] svg { fill: var(--gold); }
.fav:active svg { transform: scale(1.25); }
.fav:hover { color: var(--gold); }

/* ---------- predvajalnik ---------- */
body.watch { background: #0f0b12; }
.watch-wrap { max-width: 1100px; margin: 0 auto; padding-bottom: calc(2rem + var(--safe-b)); }
.watch-top { display: flex; align-items: center; justify-content: space-between; padding: .6rem 1rem; }
.back { font-weight: 500; }
.prevnext { display: flex; align-items: center; gap: .5rem; }

.player { background: #000; }
.stage { position: relative; display: grid; place-items: center; background: #000; }
.stage video { display: block; width: 100%; max-height: 50vh; max-height: 50svh; background: #000; cursor: pointer; }
.bigplay { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(227,180,100,.92); cursor: pointer; }
.bigplay::after { content: ''; position: absolute; left: 29px; top: 22px; border: 16px solid transparent; border-left: 24px solid var(--ink); border-right: 0; }
.vid-error { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 1.5rem; background: rgba(15,11,18,.9); line-height: 1.6; }
.speed-badge { position: absolute; top: .6rem; right: .6rem; background: rgba(0,0,0,.6); color: var(--gold); font: 700 .85rem var(--sans); padding: .2rem .55rem; border-radius: 8px; pointer-events: none; }

.controls { background: var(--bg2); border-top: 1px solid var(--line); padding: .3rem 1rem 1rem; }

.timeline { position: relative; height: 48px; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
.tl-track { position: absolute; left: 0; right: 0; top: 50%; height: 6px; translate: 0 -50%; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; }
.tl-played { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.35); }
.tl-loop { position: absolute; top: 0; bottom: 0; background: rgba(227,180,100,.28); }
.has-loop .tl-loop { background: rgba(227,180,100,.55); }
.tl-head { position: absolute; top: 50%; width: 16px; height: 16px; margin-left: -8px; translate: 0 -50%; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.5); pointer-events: none; }
.tl-handle {
  position: absolute; top: 4px; width: 26px; height: 40px; margin-left: -13px; border: 0; background: none; padding: 0; cursor: ew-resize; touch-action: none; z-index: 2;
}
.tl-handle span {
  position: absolute; left: 50%; top: 0; translate: -50% 0; width: 4px; height: 40px; border-radius: 2px; background: var(--gold);
  font-size: 0;
}
.tl-handle::after {
  position: absolute; left: 50%; top: -2px; translate: -50% 0; font: 700 .65rem var(--sans); color: var(--ink);
  background: var(--gold); border-radius: 4px; padding: 0 .25rem; line-height: 14px;
}
.tl-handle.a::after { content: 'A'; }
.tl-handle.b::after { content: 'B'; }
.timeline:not(.has-loop) .tl-handle { opacity: .45; }
.timeline.dragging .tl-head { transform: scale(1.2); }

.times { display: flex; justify-content: space-between; align-items: center; font: 500 .8rem var(--sans); font-variant-numeric: tabular-nums; color: var(--muted); margin-top: -4px; }
.loopinfo { color: var(--gold); }

.ctl-row { display: flex; align-items: center; gap: .5rem; margin-top: .7rem; }
.ctl-row.main { justify-content: center; gap: 1.4rem; position: relative; }
.ctl.fs { position: absolute; right: 0; width: 44px; height: 44px; border-color: transparent; background: transparent; color: var(--muted); }
.ctl.fs:hover { color: var(--text); }
.ctl-row.ab { flex-wrap: wrap; }
.ctl-row .spacer { flex: 1; }
.ctl { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line2); background: var(--card); color: var(--text); cursor: pointer; }
.ctl svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ctl:hover { border-color: var(--gold); }
.ctl.play { width: 64px; height: 64px; background: var(--gold); border-color: var(--gold); color: var(--ink); }
.ctl.play svg { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.ctl.play .i-pause, body.playing .ctl.play .i-play { display: none; }
body.playing .ctl.play .i-pause { display: block; }

.speed { margin-top: .9rem; display: grid; gap: .6rem; }
.speed-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.speed-presets .chip { justify-content: center; font-variant-numeric: tabular-nums; min-height: 40px; }
.speed-slider { display: flex; align-items: center; gap: .8rem; }
.speed-slider output { min-width: 4.2em; text-align: right; font: 700 .95rem var(--sans); font-variant-numeric: tabular-nums; color: var(--gold); }

input[type="range"] { -webkit-appearance: none; appearance: none; flex: 1; height: 32px; padding: 0; border: 0; background: transparent; min-height: 0; box-shadow: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: rgba(255,255,255,.15); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: rgba(255,255,255,.15); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--gold); border: 3px solid var(--bg2); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--gold); border: 3px solid var(--bg2); }

.info { padding: 1.1rem 1rem 0; }
.info-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.info h1 { font-size: 1.45rem; margin-bottom: .3rem; }
.info .sub { font-size: .9rem; margin-bottom: .5rem; }
.fav.big { width: 52px; height: 52px; border: 1px solid var(--line2); flex: none; }
.fav.big svg { width: 26px; height: 26px; }
.notes { background: var(--card); border-radius: 12px; padding: .8rem 1rem; margin: 1rem 0 0; }
.keys { margin-top: 1rem; }

.info-actions { display: flex; gap: .5rem; flex: none; }
.edit-btn { width: 52px; height: 52px; }
.edit-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.edit-btn[aria-expanded="true"] { border-color: var(--gold); color: var(--gold); }
.admin-edit { margin-top: 1rem; background: var(--card); border: 1px solid rgba(227,180,100,.35); border-radius: var(--radius); scroll-margin-top: 70px; }
.admin-edit-head { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem .4rem; }
.admin-edit-head h2 { margin: 0; font-size: 1.1rem; }
.admin-edit form { padding: 0 1rem 1rem; }
.admin-edit .danger-zone { padding: 1rem; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1rem !important; margin-top: .2rem; }

/* celozaslonski način */
.player:fullscreen { display: flex; flex-direction: column; background: #000; }
.player:fullscreen .stage { flex: 1; min-height: 0; }
.player:fullscreen video { max-height: 100%; height: 100%; }
.player:fullscreen .controls { padding-bottom: max(1rem, var(--safe-b)); }
.player:fullscreen .speed { display: flex; align-items: center; }
.player:fullscreen .speed-presets { flex: none; grid-template-columns: repeat(4, auto); }
.player:fullscreen .speed-slider { flex: 1; }

/* ležeči telefon */
@media (orientation: landscape) and (max-height: 520px) {
  .topbar { display: none; }
  .stage video { max-height: 78vh; max-height: 78svh; }
  .ctl-row.main { gap: .8rem; margin-top: .3rem; }
  .ctl { width: 44px; height: 44px; } .ctl.play { width: 52px; height: 52px; }
}

/* ---------- administracija, profil ---------- */
.narrow { max-width: 760px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; }
.panel h2 { margin-bottom: .8rem; }
.panel h3 { margin-top: 1.4rem; }
.panel p { margin: 0 0 .8rem; }
.tabs { display: flex; gap: .4rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.tabs a { padding: .6rem .9rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a.on { color: var(--text); border-bottom-color: var(--gold); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .8rem; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; text-align: center; }
.stats strong { display: block; font: 600 1.6rem var(--serif); color: var(--gold); }
.stats span { color: var(--muted); font-size: .8rem; }
.dance-counts { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .82rem; color: var(--muted); margin-bottom: 1.2rem; }
.dance-counts b { color: var(--text); font-weight: 600; }
.convlog { margin: .8rem 0; padding-left: 1.2rem; max-height: 260px; overflow: auto; font-size: .85rem; color: var(--muted); }
.convlog li.err { color: #f08c86; }
progress { width: 100%; height: 8px; accent-color: var(--gold); }
.userlist { display: grid; gap: .5rem; }
.user { border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.user summary { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .7rem .9rem; cursor: pointer; list-style: none; }
.user summary::-webkit-details-marker { display: none; }
.user summary .muted { font-size: .85rem; word-break: break-all; }
.user > p, .user > form { padding: 0 .9rem; margin: 0 0 .9rem; }
.user .danger-zone { padding-bottom: .9rem; }

.only-desktop { display: none; }
@media (max-width: 899px) { .ab-btn { display: none !important; } }

/* ---------- večji zasloni ---------- */
@media (min-width: 900px) {
  h1 { font-size: 2rem; }
  .only-mobile { display: none !important; }
  .only-desktop { display: block; }
  .lib { max-width: 1400px; margin: 0 auto; }
  .lib-bar { padding: 1.4rem 1.5rem .6rem; }
  .filters-btn { display: none; }
  .dance-strip { padding: .3rem 1.5rem 1rem; flex-wrap: wrap; overflow: visible; }
  .lib-body { display: grid; grid-template-columns: 250px 1fr; gap: 1.8rem; padding: 0 1.5rem; align-items: start; }
  .filters { position: sticky; top: 76px; transform: none; max-height: none; background: transparent; border: 0; box-shadow: none; padding: 0; z-index: 1; border-radius: 0; }
  .filters-head .iconbtn { display: none; }
  .filters fieldset:first-of-type { margin-top: .6rem; }
  .filters-actions { position: static; }
  .scrim { display: none !important; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
  .card { grid-template-columns: 1fr; align-items: stretch; padding: 0; gap: 0; overflow: hidden; }
  .thumb { border-radius: 0; aspect-ratio: 16 / 9; }
  .thumb .ph { font-size: 1.1rem; inset: auto 1rem .8rem; }
  .meta { padding: .75rem .9rem 1rem; padding-right: 3rem; }
  .fav { position: absolute; right: .25rem; bottom: .55rem; }
  .card .play { width: 48px; height: 48px; }
  .card .play::after { left: 18px; top: 14px; border-width: 10px; border-left-width: 16px; }

  .watch-wrap { padding: 0 1.5rem 3rem; }
  .watch-top { padding: 1rem 0; }
  .player { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
  .stage video { max-height: 68vh; }
  .speed { grid-template-columns: auto 1fr; align-items: center; gap: 1.2rem; }
  .speed-presets { grid-template-columns: repeat(4, auto); }
  .info { padding: 1.4rem 0 0; }
  .info h1 { font-size: 1.9rem; }
}

/* ============ predstavitvena stran ============ */
body.landing {
  background:
    radial-gradient(ellipse 80% 50% at 85% 0%, rgba(212,106,154,.14), transparent 60%),
    radial-gradient(ellipse 70% 50% at 0% 30%, rgba(227,180,100,.10), transparent 60%),
    var(--bg);
}
.land-top { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; padding-top: max(1rem, env(safe-area-inset-top)); max-width: 1200px; margin: 0 auto; }
.hero { position: relative; max-width: 1200px; margin: 0 auto; padding: 1rem 1.2rem 3rem; display: grid; gap: 1rem; }
.hero-art { width: 100%; max-width: 300px; justify-self: center; opacity: .95; order: 2; }
.hero-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; }
.eyebrow { color: var(--gold); font: 600 .78rem var(--sans); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 .8rem; }
.hero h1 { font-size: clamp(2.3rem, 9vw, 4.4rem); font-weight: 400; line-height: 1.02; letter-spacing: -.02em; }
.hero h1 em { font-style: italic; color: var(--gold); }
.lead { font-size: 1.08rem; color: #d6cbd9; max-width: 34em; margin: 0 0 1.6rem; }
.land-section { max-width: 1200px; margin: 0 auto; padding: 2.5rem 1.2rem; border-top: 1px solid var(--line); }
.land-section h2 { font-size: 1.7rem; font-weight: 400; margin-bottom: 1.4rem; }
.dance-groups { display: grid; gap: 1.6rem; }
.dgroup h3 { font: 600 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.dgroup ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.dgroup li { display: inline-flex; align-items: center; padding: .45rem .9rem; border: 1px solid var(--line2); border-radius: 999px; font-family: var(--serif); font-size: 1.02rem; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.gallery figure { margin: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.gallery figure:hover img { transform: scale(1.04); }
.members { display: grid; gap: 1.2rem; align-items: center; }
.members p { color: #d6cbd9; margin: 0; max-width: 40em; }
.members .btn { justify-self: start; }
.land-foot { text-align: center; color: var(--muted); font-size: .82rem; padding: 2rem 1rem calc(2rem + var(--safe-b)); border-top: 1px solid var(--line); }

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr 1fr; align-items: center; padding: 3rem 1.5rem 5rem; gap: 3rem; }
  .hero-art, .hero-img { order: 2; max-width: none; }
  .land-top, .land-section { padding-left: 1.5rem; padding-right: 1.5rem; }
  .land-section { padding-top: 4rem; padding-bottom: 4rem; }
  .land-section h2 { font-size: 2.3rem; }
  .dance-groups { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); gap: .8rem; }
  .members { grid-template-columns: 1fr auto; }
}

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

.copyrow { display: flex; gap: .5rem; margin-top: .3rem; }
.copyrow input { margin: 0; font-size: 13px; }
.invite-result .flash { margin: 0 0 1rem; }
.user .danger-zone { padding: .9rem; margin: 0; }

.inactive-list { margin: .4rem 0 1rem; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .9rem; }
.inactive-list a { color: var(--text); word-break: break-word; }
.inactive-list .muted { display: block; }

.card .edit { position: absolute; top: .4rem; left: .4rem; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; z-index: 2; }
.card .edit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.card .edit:hover { background: var(--gold); color: var(--ink); }
.grid.is-admin .badge.warn { left: 2.7rem; top: .55rem; }

/* ---------- pokončni izrez (admin) ---------- */
.crop-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; touch-action: none; cursor: grab; }
.crop-canvas:active { cursor: grabbing; }
body.cropping .speed-badge, body.cropping .bigplay { display: none !important; }
.crop-bar { background: #1f1726; border-top: 1px solid rgba(227,180,100,.35); padding: .8rem 1rem .9rem; display: grid; gap: .7rem; }
.crop-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; }
.crop-head strong { font-family: var(--serif); font-weight: 600; color: var(--gold); }
.crop-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.crop-row.end { justify-content: flex-end; }
.crop-zoom { color: var(--text); font-size: .85rem; }
.zoomrow { display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.crop-help { margin: 0; }
.crop-bar progress { height: 6px; }
.portrait-box { border-top: 1px solid var(--line); padding: 1rem; }
.portrait-box h3 { margin: 0 0 .3rem; font-size: 1rem; }
.portrait-box p { margin: 0 0 .7rem; }
