/* watch.kutnyy.com — indigo night, soft glass, one lantern.
   Feel: deep indigo sky with faint stars at the top, pastel lavender/mint light,
   warm rim highlights, big soft radii, circular buttons. The hero card ("tonight")
   is the luminous object; the score tile colour scale is the system
   (10 mint → 9 blue → 8 violet → 7 magenta → 6 rose → 5 amber).
   Manrope (Cyrillic). Dark by default, light via toggle. */

:root {
  color-scheme: dark;
  --bg: #0e1024;
  --sky-1: #1c1f46; --sky-2: #13152f; --sky-3: #0b0d1f;
  --text: #f2f1fb; --muted: #aaa9cc; --dim: #6f6f97;
  --glass: rgba(150,150,255,.075); --glass-2: rgba(150,150,255,.13);
  --glass-brd: rgba(255,255,255,.11); --glass-hi: rgba(255,255,255,.22);
  --row-line: rgba(255,255,255,.06);
  --ink-on-color: #0e1024;
  --blob-1: rgba(120,230,210,.16); --blob-3: rgba(255,214,170,.10);
  --dock-bg: rgba(28,31,70,.62); --dock-on: #f2f1fb; --dock-on-ink: #0e1024;
  --star: rgba(255,255,255,.55);
  --danger: #ff8a85; --ok: #7ed3a0;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eeedf8;
  --sky-1: #dcdaf3; --sky-2: #e9e8f7; --sky-3: #f4f3fb;
  --text: #191b33; --muted: #6a6b8f; --dim: #a09fbf;
  --glass: rgba(255,255,255,.55); --glass-2: rgba(255,255,255,.8);
  --glass-brd: rgba(255,255,255,.95); --glass-hi: rgba(255,255,255,1);
  --row-line: rgba(40,40,90,.07);
  --ink-on-color: #ffffff;
  --blob-1: rgba(120,230,210,.30); --blob-3: rgba(255,214,170,.28);
  --dock-bg: rgba(255,255,255,.62); --dock-on: #191b33; --dock-on-ink: #ffffff;
  --star: rgba(255,255,255,0);
  --danger: #c9524f; --ok: #2f9e6b;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text);
  background: var(--sky-3) linear-gradient(180deg, var(--sky-1) 0px, var(--sky-2) 420px, var(--sky-3) 900px) no-repeat;
  font-family: "Manrope", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 15px; line-height: 1.4; min-height: 100vh;
  font-feature-settings: "tnum" 1;
}
/* ambient colour follows the score nearest the reader (app.js) */
@property --ambient { syntax: "<color>"; inherits: true; initial-value: #8aa4ff; }
:root { --ambient: #8aa4ff; transition: --ambient 1s ease; }
body::before {
  content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42% 32% at 22% 10%, color-mix(in srgb, var(--ambient) 30%, transparent), transparent 70%),
    radial-gradient(34% 28% at 90% 28%, var(--blob-1), transparent 70%),
    radial-gradient(40% 30% at 55% 96%, var(--blob-3), transparent 70%);
  filter: blur(46px);
}
/* stars, only in the sky */
body::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 560px; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, var(--star), transparent 60%),
    radial-gradient(1px 1px at 78% 9%, var(--star), transparent 60%),
    radial-gradient(1.6px 1.6px at 56% 31%, var(--star), transparent 60%),
    radial-gradient(1px 1px at 33% 52%, var(--star), transparent 60%),
    radial-gradient(1.2px 1.2px at 91% 62%, var(--star), transparent 60%),
    radial-gradient(1px 1px at 8% 78%, var(--star), transparent 60%),
    radial-gradient(1.4px 1.4px at 66% 84%, var(--star), transparent 60%),
    radial-gradient(1px 1px at 45% 6%, var(--star), transparent 60%);
  background-size: 340px 300px; opacity: .7;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); mask-image: linear-gradient(180deg, #000 30%, transparent);
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 12px; }

.top-in, .wrap, .foot { max-width: 680px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* top ------------------------------------------------------------------ */
.top-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; }
.brand { display: flex; gap: 8px; align-items: baseline; min-width: 0; white-space: nowrap; overflow: hidden; font-size: 13px; font-weight: 600; color: var(--muted); }
.brand-main { display: none; }
.right { display: flex; align-items: center; gap: 8px; flex: none; }
.glass, .langs, .theme, .tools, .list, .panel, .pill, .hero, .hero-roll {
  background: var(--glass); border: 1px solid var(--glass-brd);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 12px 32px -20px rgba(0,0,0,.7);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
}
.langs { display: flex; gap: 2px; border-radius: 999px; padding: 3px; font-size: 12px; font-weight: 700; }
.langs a { padding: 6px 11px; border-radius: 999px; color: var(--muted); transition: background .15s, color .15s; }
.langs a.on { background: var(--dock-on); color: var(--dock-on-ink); }
.theme { font: inherit; color: var(--muted); border-radius: 999px; width: 36px; height: 36px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.theme svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
:root[data-theme="light"] .theme .moon { display: none; }
:root:not([data-theme="light"]) .theme .sun { display: none; }

.wrap { padding-bottom: 8px; }
.search-btn.on { color: var(--text); background: var(--glass-2); }
.tools[hidden] { display: none; }
.legend { display: flex; gap: 6px; margin: 0 0 12px; }
.sc.mini { width: 30px; height: 26px; border-radius: 9px; font-size: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.title { font-size: 32px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin: 14px 0 4px; }
.tagline { color: var(--muted); margin: 0 0 14px; font-size: 14px; font-weight: 500; }

/* the lantern: tonight's pick ------------------------------------------- */
.hero { position: relative; display: flex; align-items: center; gap: 8px; border-radius: 26px; padding: 10px 10px 10px 10px; margin-bottom: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, var(--glass)), var(--glass) 60%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 1px color-mix(in srgb, var(--c) 18%, transparent), 0 24px 60px -30px var(--c), 0 12px 32px -20px rgba(0,0,0,.7);
  transition: box-shadow .5s, background .5s; }
.hero-link { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.hero .hero-tile { width: 66px; height: 64px; border-radius: 22px; font-size: 22px; box-shadow: 0 0 0 1px rgba(255,255,255,.28) inset, 0 1px 0 rgba(255,255,255,.5) inset, 0 16px 34px -12px var(--c), 0 0 44px -10px var(--c); transition: background .1s; }
.hero-body { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.hero-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 75%, var(--text)); }
.hero-title { font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-roll { flex: none; width: 46px; height: 46px; border-radius: 999px; cursor: pointer; color: var(--text); display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: transform .15s, background .15s; }
.hero-roll:hover { background: var(--glass-2); }
.hero-roll:active { transform: scale(.9) rotate(-12deg); }
.hero-roll svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.hero-roll svg circle { fill: currentColor; stroke: none; }
.hero.rolling .hero-tile { transform: scale(.94); }
/* the lantern breathes */
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,.28) inset, 0 1px 0 rgba(255,255,255,.5) inset, 0 16px 34px -12px var(--c), 0 0 44px -10px var(--c); }
  50% { box-shadow: 0 0 0 1px rgba(255,255,255,.34) inset, 0 1px 0 rgba(255,255,255,.55) inset, 0 18px 40px -12px var(--c), 0 0 64px -6px var(--c); } }
.hero .hero-tile { animation: breathe 4.5s ease-in-out infinite; }
.hero.landed .hero-tile { animation: land .55s cubic-bezier(.2,.9,.3,1.3); }
@keyframes land { 0% { transform: scale(.9); } 55% { transform: scale(1.1); } 100% { transform: none; } }

/* search + sort in one glass field --------------------------------------- */
.tools { display: flex; align-items: center; gap: 6px; border-radius: 18px; padding: 4px 6px 4px 14px; margin-bottom: 8px; }
.tools input[type=search] { flex: 1; min-width: 0; font: inherit; font-weight: 500; color: var(--text); background: none; border: 0; padding: 9px 0; -webkit-appearance: none; appearance: none; }
.tools input[type=search]:focus { outline: none; }
.tools input::placeholder { color: var(--dim); }
.tools input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.tools select {
  flex: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--glass-2); border: 0; border-radius: 12px;
  padding: 8px 26px 8px 12px; -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23aaa9cc' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 10px;
}
.tools select:focus { outline: none; color: var(--text); }

.sec { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 10px 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.cnt { color: var(--dim); font-weight: 600; }
.empty { color: var(--muted); padding: 56px 0; text-align: center; }

/* the grouped list ------------------------------------------------------ */
.list { list-style: none; margin: 0; padding: 4px; border-radius: 22px; }
.row { border-bottom: 1px solid var(--row-line); }
.row:last-child { border-bottom: 0; }
.row-link { display: flex; gap: 11px; align-items: center; padding: 5px 8px 5px 5px; border-radius: 16px; transition: background .12s, transform .12s; }
.row-link:hover { background: var(--glass); }
.row-link:active { transform: scale(.985); }
.sc {
  flex: none; width: 42px; height: 40px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c); color: var(--ink-on-color);
  font-size: 15px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 18px -10px var(--c), inset 0 1px 0 rgba(255,255,255,.35);
}
.body { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.ttl { font-weight: 700; font-size: 15px; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.yr { color: var(--muted); font-weight: 500; font-size: 13px; }
.meta { display: flex; align-items: baseline; font-size: 12.5px; font-weight: 500; color: var(--muted); line-height: 1.35; min-width: 0; }
.meta > * + *::before { content: "·"; margin: 0 5px; color: var(--dim); }
.tag { flex: none; }
.tag.live { color: var(--text); }
.note { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } to { transform: none; } }
.row .sc { animation: pop .42s cubic-bezier(.2,.9,.3,1.2) both; animation-delay: calc(var(--i, 14) * 28ms); }
.row[style*="--i:14"] .sc { animation: none; }

/* floating dock ---------------------------------------------------------- */
.dock {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(26px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; gap: 2px; padding: 4px; border-radius: 999px; max-width: calc(100vw - 24px);
  background: var(--dock-bg); border: 1px solid var(--glass-brd); box-shadow: inset 0 1px 0 var(--glass-hi), 0 18px 40px -14px rgba(0,0,0,.75);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
  overflow-x: auto; scrollbar-width: none;
}
.dock::-webkit-scrollbar { display: none; }
.dock a { flex: none; font-size: 13px; font-weight: 700; padding: 10px 13px; border-radius: 999px; color: var(--muted); white-space: nowrap; transition: background .15s, color .15s; }
.dock a.on { background: var(--dock-on); color: var(--dock-on-ink); box-shadow: 0 4px 14px -6px rgba(0,0,0,.6); }
@media (max-width: 400px) { .dock a { font-size: 12px; padding: 10px 9px; } .dock { gap: 0; } }
.foot { padding-top: 20px; padding-bottom: calc(110px + env(safe-area-inset-bottom)); color: var(--dim); font-size: 12.5px; font-weight: 500; }
.foot p { margin: 6px 0; max-width: 58ch; }
.foot a { color: var(--muted); }

/* detail ------------------------------------------------------------------ */
.crumb { margin: 18px 0 26px; font-size: 13px; font-weight: 600; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--text); }
.detail { display: flex; flex-direction: column; gap: 10px; }
.sc.big { width: 96px; height: 92px; border-radius: 28px; font-size: 34px; box-shadow: 0 0 0 1px rgba(255,255,255,.28) inset, 0 1px 0 rgba(255,255,255,.5) inset, 0 24px 50px -20px var(--c), 0 0 60px -14px var(--c); margin-bottom: 10px; }
.detail-title { font-size: 26px; line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.detail-meta { margin: 2px 0 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.pill { font-size: 12px; font-weight: 700; color: var(--muted); border-radius: 999px; padding: 5px 11px; }
.pill.live { color: var(--text); }
.panel { border-radius: 22px; padding: 18px 20px; }
.detail-note { font-size: 16.5px; line-height: 1.6; margin: 0; max-width: 58ch; white-space: pre-line; font-weight: 500; }
.fi { margin: 10px 10px 0; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fi b { color: var(--ink-on-color); background: var(--c); border-radius: 9px; padding: 3px 8px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fi .arrow { color: var(--dim); }
.dim { color: var(--muted); }
.small { font-size: 13px; margin: 6px 10px; }
.ext { color: var(--muted); font-size: 13px; font-weight: 600; margin-left: 10px; }
.ext:hover { color: var(--text); }

/* admin ------------------------------------------------------------------ */
.admin { padding-top: 12px; }
.narrow { max-width: 480px; }
.h { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 16px; }
.admin-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-bar .h { flex: 1; }
.btn { font: inherit; font-weight: 800; background: var(--dock-on); color: var(--dock-on-ink); border: 0; border-radius: 999px; padding: 11px 18px; cursor: pointer; display: inline-block; }
.btn.ghost { background: var(--glass); color: var(--muted); border: 1px solid var(--glass-brd); }
.btn.danger { background: none; color: var(--danger); border: 1px solid var(--glass-brd); }
.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.stack input, .stack select, .stack textarea {
  font: inherit; font-weight: 500; color: var(--text); background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 14px; padding: 11px 14px; min-width: 0;
}
.stack input:focus, .stack select:focus, .stack textarea:focus { outline: none; border-color: var(--muted); }
.stack textarea { resize: vertical; }
.lang-block { border: 1px solid var(--glass-brd); background: var(--glass); border-radius: 20px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.lang-block legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.err { color: var(--danger); font-weight: 600; }
.ok { color: var(--ok); }
.danger-zone { margin-top: 32px; }
.lang-dot { flex: none; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--dim); }
.lang-dot.has { color: var(--text); }
.admin-list { margin-top: 10px; }
.admin .tools { margin-top: 10px; }

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