:root {
  color-scheme: dark;
  --bg: #0e1015;
  --bg-soft: #141720;
  --panel: #181b24;
  --panel-raised: #1e222d;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #f4f0ea;
  --muted: #a9a3af;
  --faint: #77727f;
  --accent: #ff916f;
  --accent-strong: #ff704e;
  --accent-soft: rgba(255, 145, 111, .14);
  --plum: #a98bff;
  --gold: #ffd28a;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(255, 112, 78, .13), transparent 55%),
    radial-gradient(1000px 650px at -5% 15%, rgba(169, 139, 255, .08), transparent 60%),
    var(--bg);
  overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
::selection { background: var(--accent); color: #22140f; }

.ambient {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
}
.ambient-one { width: 460px; height: 460px; right: -180px; top: 20%; background: rgba(255, 112, 78, .18); }
.ambient-two { width: 380px; height: 380px; left: -160px; top: 55%; background: rgba(169, 139, 255, .12); }

/* ---------- header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
  background: linear-gradient(180deg, rgba(14, 16, 21, .92), rgba(14, 16, 21, .55));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -.04em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--accent), var(--plum));
  color: #22140f;
  font-size: 14px;
  box-shadow: 0 8px 22px rgba(255, 112, 78, .25);
  overflow: hidden;
}
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.topnav { display: flex; align-items: center; gap: 6px; }
.topnav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.topnav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.topnav a[aria-current="page"] { color: var(--text); background: rgba(255, 145, 111, .12); }
.profile-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.profile-chip:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- layout ---------- */
main {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  min-height: calc(100vh - 210px);
  padding: 34px 0 70px;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 12px;
  font-size: clamp(40px, 6vw, 78px);
  line-height: .98;
  letter-spacing: -.06em;
}
h2 { margin-bottom: 10px; font-size: clamp(26px, 3.2vw, 42px); line-height: 1.06; letter-spacing: -.045em; }
.muted, .hint { color: var(--muted); }
.hint { max-width: 760px; margin: 8px 0 16px; font-size: 14px; }
.status { min-height: 24px; margin: 10px 0 18px; color: var(--muted); font-size: 14px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin: 6px 0 24px; }
.section-head > p { max-width: 410px; margin: 0 0 6px; color: var(--muted); font-size: 14px; text-align: right; }
.catalog-head { margin-top: 54px; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  gap: 36px;
  align-items: center;
  min-height: 440px;
  padding: 44px 0 22px;
}
.hero h1 { max-width: 760px; margin: 0 0 22px; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--gold) 55%, var(--plum));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead { max-width: 590px; margin-bottom: 26px; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-cta, .account-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #25140e;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 12px 34px rgba(255, 112, 78, .26);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.hero-cta:hover, .account-open:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(255, 112, 78, .34); }
.hero-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 15px; }
.hero-link span { transition: transform .2s var(--ease); }
.hero-link:hover { color: var(--text); }
.hero-link:hover span { transform: translateX(4px); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero-tags span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255, 255, 255, .025);
}

.hero-art { position: relative; min-height: 380px; }
.hero-glow {
  position: absolute;
  inset: 12% 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(255, 145, 111, .32), rgba(169, 139, 255, .13) 42%, transparent 70%);
  filter: blur(38px);
}
.hero-orbit { position: absolute; border: 1px solid rgba(255, 255, 255, .09); border-radius: 50%; }
.orbit-one { inset: 6% 0 0 6%; }
.orbit-two { inset: 18% 12% 12% 18%; border-style: dashed; opacity: .7; }
.hero-tile {
  position: absolute;
  width: min(230px, 70%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(34, 38, 50, .88), rgba(20, 23, 31, .76));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.hero-tile span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.hero-tile b { display: block; margin-bottom: 4px; font-size: 15px; }
.hero-tile small { color: var(--muted); font-size: 12px; }
.tile-one { right: 4%; top: 10%; transform: rotate(4deg); }
.tile-two { left: 0; bottom: 10%; transform: rotate(-5deg); border-color: rgba(169, 139, 255, .2); }
.tile-two span { background: rgba(169, 139, 255, .13); color: var(--plum); }

/* ---------- search ---------- */
.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(760px, 100%);
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(24, 27, 36, .82);
  box-shadow: 0 14px 46px rgba(0, 0, 0, .22);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.searchbar:focus-within { border-color: rgba(255, 145, 111, .65); box-shadow: 0 18px 55px rgba(255, 112, 78, .12); }
.search-icon { width: 34px; padding-left: 8px; color: var(--faint); font-size: 22px; line-height: 1; }
.searchbar input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 10px 2px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 15px;
}
.searchbar input::placeholder { color: var(--faint); }
.searchbar button {
  min-height: 44px;
  padding: 10px 22px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #25140e;
  font-weight: 800;
}
.searchbar.compact { width: min(620px, 100%); }
.searchbar.compact button { padding-inline: 18px; }

/* ---------- cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 28px 18px;
}
.feature {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  min-height: 330px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #1b1e27;
  box-shadow: var(--shadow);
}
.feature img { position: absolute; inset: 0 0 0 auto; width: 58%; height: 100%; object-fit: cover; object-position: 50% 28%; z-index: -2; transform: scale(1.02); }
.feature::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #191c25 20%, rgba(25, 28, 37, .92) 43%, rgba(25, 28, 37, .2) 78%, transparent); }
.feature-copy { max-width: 62%; padding: clamp(24px, 4.5vw, 52px); }
.feature-copy small { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.feature-copy h2 { max-width: 600px; margin: 12px 0 10px; font-size: clamp(32px, 4.6vw, 62px); }
.feature-copy p { max-width: 520px; margin-bottom: 20px; color: var(--muted); }
.feature button { margin-right: 8px; }
.shelf-title { grid-column: 1 / -1; margin: 8px 0 -6px; font-size: 22px; letter-spacing: -.03em; }

.card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  gap: 8px;
  padding: 8px 8px 12px;
  border: 1px solid transparent;
  border-radius: 20px;
  transition: background .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
}
.card:hover { background: rgba(255, 255, 255, .035); border-color: var(--line); transform: translateY(-3px); }
.poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 15px;
  object-fit: cover;
  background: linear-gradient(150deg, #272b37, #171a22);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .3);
}
.card strong { padding: 3px 4px 0; font-size: 14px; line-height: 1.3; }
.card small { padding: 0 4px; color: var(--muted); font-size: 12px; }
.card button { margin: 4px 4px 0; }
.card .add { background: rgba(255, 145, 111, .12); color: var(--accent); border-color: rgba(255, 145, 111, .25); }

button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-weight: 650;
  font-size: 14px;
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
button:hover { border-color: rgba(255, 145, 111, .5); background: rgba(255, 145, 111, .09); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: default; }
button.add, form > button:last-child { border-color: transparent; background: linear-gradient(120deg, var(--accent), var(--accent-strong)); color: #25140e; }
.btn.ghost { background: rgba(255, 255, 255, .04); color: var(--text); }
.btn { display: inline-flex; align-items: center; justify-content: center; }

/* ---------- library ---------- */
.library-list { display: grid; gap: 12px; }
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(30, 34, 45, .86), rgba(23, 26, 35, .7));
}
.row h2 { max-width: 50%; margin: 0; font-size: 17px; line-height: 1.25; letter-spacing: -.02em; }
.controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.controls span { min-width: 74px; color: var(--muted); font-size: 13px; text-align: center; }
.controls select { min-height: 42px; }
select, input[type="file"] {
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--panel-raised);
  color: var(--text);
}
select { padding: 9px 12px; }
.empty-state, .row.empty { color: var(--muted); }

/* ---------- player ---------- */
.sources { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-size: 14px;
}
.source b { color: var(--faint); font-size: 13px; }
.source:hover { color: var(--text); border-color: var(--line-strong); }
.source.active { border-color: transparent; background: var(--accent); color: #25140e; font-weight: 800; }
.source.active b { color: #25140e; }
.player-stage {
  position: relative;
  max-width: 1040px;
  min-height: 200px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px;
  background: #07080b;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 145, 111, .04);
}
.player-stage video { display: block; width: 100%; max-height: 66vh; background: #000; }
.artplayer-shell { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.artplayer-shell .art-video-player { width: 100%; height: 100%; }
.artplayer-shell .art-bottom { padding-bottom: 8px; }
.artplayer-shell .art-control { font-size: 14px; }
.artplayer-shell .art-progress { height: 4px; }
#kodik-host iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.player-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  margin: 12px 0 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(24, 27, 36, .7);
  width: fit-content;
}
.player-tools select { min-height: 40px; }
.source-panel { max-width: 1000px; margin-top: 12px; }
.release-list, .episode-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.release-list .release {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  max-width: 100%;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
  color: inherit;
  text-align: left;
}
.release-list .release strong { font-size: 14px; }
.release-list .release small { color: var(--muted); font-size: 12px; }
.release-list .release:hover { border-color: rgba(255, 145, 111, .55); }
.episode-list .episode { min-width: 92px; min-height: 42px; }
.episode-list .episode:hover { border-color: var(--accent); }
.fallback { max-width: 760px; margin: 14px 0 4px; }
.fallback-card {
  padding: 18px;
  border: 1px solid rgba(255, 145, 111, .25);
  border-radius: 16px;
  background: rgba(255, 145, 111, .06);
}
.fallback-card strong { display: block; margin-bottom: 6px; font-size: 15px; }
.fallback-card .hint { margin-bottom: 12px; }
.fallback-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fallback-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--accent);
  color: #25140e;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.fallback-button.ghost { border-color: var(--line-strong); background: transparent; color: var(--text); }
.fallback-button:hover { filter: brightness(1.08); }

/* ---------- account ---------- */
.auth-hint { max-width: 560px; margin: 0 0 16px; padding: 12px 15px; border: 1px solid rgba(255, 145, 111, .25); border-radius: 13px; color: #ffc3ae; background: var(--accent-soft); font-size: 14px; }
.account-panel {
  width: min(760px, 100%);
  padding: 24px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(36, 40, 53, .95), rgba(22, 25, 34, .92));
  box-shadow: var(--shadow);
}
.account-head { display: flex; align-items: center; gap: 14px; }
.avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--accent), var(--plum));
  color: #25140e;
  font-size: 22px;
  box-shadow: 0 10px 30px rgba(255, 112, 78, .25);
  overflow: hidden;
}
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.account-who { flex: 1; min-width: 0; }
.account-who .eyebrow { margin-bottom: 3px; }
.account-who p { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.03em; overflow-wrap: anywhere; }
.account-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0 18px; }
.account-stats div { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .025); }
.account-stats b { display: block; font-size: 25px; line-height: 1.1; letter-spacing: -.04em; }
.account-stats span { color: var(--muted); font-size: 12px; }
.account-open { margin-top: 2px; }
.auth-panel {
  width: min(480px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  margin-bottom: 22px;
}
.tsuzuki-auth { display: grid; gap: 14px; }
.tsuzuki-auth label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.tsuzuki-auth input {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel-raised);
  outline: none;
  color: var(--text);
}
.tsuzuki-auth input:focus { border-color: var(--accent); }
.tsuzuki-auth small { color: var(--faint); font-size: 12px; line-height: 1.4; }
.tsuzuki-auth button[type="submit"] { border: 0; background: linear-gradient(120deg, var(--accent), var(--accent-strong)); color: #25140e; font-weight: 800; }
.tsuzuki-auth button[type="button"] { justify-self: start; border-color: transparent; background: transparent; color: var(--muted); padding-left: 0; }
.tsuzuki-auth button[type="button"]:hover { color: var(--text); }
.account-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: min(900px, 100%); margin-top: 26px; }
.account-benefits > div { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .02); }
.account-benefits span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.account-benefits b { display: block; margin: 8px 0 6px; font-size: 15px; }
.account-benefits p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- forms and misc ---------- */
.panel, #stream { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); padding: 18px; }
.file { display: inline-flex; align-items: center; gap: 12px; margin: 4px 0 12px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); }
.file input { max-width: 280px; }
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12px;
}
.brand-mini { color: var(--muted); font-weight: 700; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 82px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(460px, calc(100% - 32px));
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(28, 32, 42, .95);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  text-align: center;
  backdrop-filter: blur(14px);
}
.toast:empty { display: none; }

/* video.js cleanup */
.video-js { width: 100% !important; max-width: 100%; height: auto !important; border-radius: 0; background: #000; }
#player-stage .video-js, #player-stage .video-js.vjs-fluid { width: 100% !important; height: auto !important; padding-top: 0 !important; }
#player-stage .video-js video.vjs-tech { position: relative !important; width: 100% !important; height: auto !important; }
.vjs-control-bar { border-radius: 0 0 22px 22px; }

/* ---------- nav mobile / desktop ---------- */
.bottomnav {
  position: fixed;
  z-index: 50;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  display: none;
  align-items: center;
  justify-content: space-around;
  gap: 2px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
  background: rgba(22, 25, 34, .9);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.bottomnav a { display: grid; place-items: center; gap: 3px; min-width: 64px; padding: 6px; border-radius: 13px; color: var(--faint); font-size: 10px; }
.bottomnav i { font-style: normal; font-size: 18px; line-height: 1; }
.bottomnav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

@media (max-width: 960px) {
  .topnav { display: none; }
  .bottomnav { display: flex; }
  .profile-chip { margin-left: auto; }
  main { padding-bottom: 112px; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 24px; }
  .hero-art { display: none; }
  .hero h1 { font-size: clamp(42px, 9vw, 72px); }
  .section-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .section-head > p { max-width: 640px; text-align: left; }
  .feature-copy { max-width: 78%; }
  .feature img { width: 70%; opacity: .82; }
  .feature::after { background: linear-gradient(90deg, #191c25 24%, rgba(25, 28, 37, .92) 58%, rgba(25, 28, 37, .4)); }
  .account-benefits { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar, main, .footer { width: calc(100% - 28px); }
  .topbar { padding: 14px 0; gap: 12px; }
  .brand { font-size: 20px; }
  .brand-mark { width: 29px; height: 29px; }
  .profile-chip { min-height: 36px; padding: 7px 13px; font-size: 13px; }
  main { padding-top: 20px; }
  h1 { font-size: clamp(38px, 12vw, 56px); }
  .hero { padding-top: 14px; }
  .hero-lead { font-size: 15px; }
  .hero-tags span { font-size: 11px; }
  .catalog-head { margin-top: 34px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; }
  .card { padding: 5px 5px 9px; }
  .card strong { font-size: 13px; }
  .card button { min-height: 38px; padding: 8px 10px; font-size: 12px; }
  .feature { min-height: 280px; border-radius: 20px; }
  .feature img { width: 100%; opacity: .55; }
  .feature::after { background: linear-gradient(0deg, #181b24 15%, rgba(24, 27, 36, .75) 60%, rgba(24, 27, 36, .2)); }
  .feature-copy { max-width: 100%; padding: 22px 18px; }
  .feature-copy h2 { font-size: 34px; }
  .searchbar { border-radius: 15px; padding: 4px; }
  .searchbar button { padding: 8px 15px; }
  .searchbar input { font-size: 14px; }
  .row { align-items: flex-start; flex-direction: column; padding: 15px; }
  .row h2 { max-width: 100%; }
  .controls { justify-content: flex-start; }
  .controls span { min-width: 58px; }
  .account-panel { padding: 18px; }
  .account-head { align-items: flex-start; flex-wrap: wrap; }
  .account-head .btn { margin-left: 68px; }
  .account-stats { gap: 6px; }
  .account-stats div { padding: 11px; }
  .account-stats b { font-size: 21px; }
  .player-tools { width: 100%; }
  .footer { flex-direction: column; gap: 6px; }
  .toast { bottom: 86px; }
}

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

/* Kodik: результаты поиска на сайте (1.9.11) */
.kodik-results { display: grid; gap: 8px; margin: 10px 0 4px; max-height: 320px; overflow: auto; }
.kodik-result {
  display: flex; flex-direction: column; gap: 3px; width: 100%;
  padding: 10px 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--line, #333); border-radius: 12px;
  background: var(--panel-2, #1b1b24); color: var(--text, #f2f2f5);
  transition: border-color .15s, background .15s;
}
.kodik-result:hover { border-color: var(--accent, #ff6b5f); background: var(--panel-3, #242430); }
.kodik-result-title { font-weight: 700; font-size: 13px; }
.kodik-result-meta { color: var(--text-2, #9a9aa6); font-size: 11px; }
.kodik-result-row { display: flex; gap: 8px; align-items: stretch; }
.kodik-result-row .kodik-result { flex: 1; }
.kodik-result-open {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; flex: 0 0 42px; text-decoration: none;
  border: 1px solid var(--line, #333); border-radius: 12px;
  background: var(--panel-2, #1b1b24); color: var(--text-2, #9a9aa6);
  font-size: 16px;
}
.kodik-result-open:hover { border-color: var(--accent, #ff6b5f); color: var(--text, #fff); }
#panel-kodik .fallback { margin-top: 10px; }
.kodik-help {
  margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line, #333);
  border-radius: 14px; background: var(--panel-2, #1b1b24);
}
.kodik-help strong { display: block; margin-bottom: 4px; }
.kodik-help p { margin: 4px 0 10px; color: var(--text-2, #9a9aa6); font-size: 12px; line-height: 1.5; }
.kodik-help code { font-size: 11px; color: var(--text, #f2f2f5); }
.kodik-help .fallback-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kodik-open-external { display: inline-block; margin-top: 8px; color: var(--accent, #ff6b5f); font-size: 12px; text-decoration: none; }
.kodik-open-external:hover { text-decoration: underline; }
#kodik-host { position: relative; }
#kodik-host iframe { width: 100%; min-height: 360px; border: 0; border-radius: 14px; background: #000; }
/* Плеер: экран до выбора серии */
.player-idle {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; width: 100%; height: 100%; min-height: 260px; padding: 28px; text-align: center;
  background: radial-gradient(circle at 50% 15%, rgba(255, 107, 95, .13), transparent 55%), #08090d;
  color: var(--text, #f2f2f5);
}
.player-idle-mark {
  width: 46px; height: 46px; margin: 4px 0 8px;
  border: 5px solid var(--accent, #ff6b5f); border-radius: 4px;
  transform: rotate(45deg); box-shadow: 0 0 34px rgba(255, 107, 95, .25);
}
.player-idle strong { font-size: 22px; letter-spacing: .01em; }
.player-idle p { max-width: 440px; margin: 0; color: var(--text-2, #9a9aa6); font-size: 13px; line-height: 1.55; }
.player-idle button {
  margin-top: 6px; padding: 10px 18px; border: 0; border-radius: 999px;
  background: var(--accent, #ff6b5f); color: #25140e; font: inherit; font-weight: 800; cursor: pointer;
}
.player-idle button:hover { filter: brightness(1.08); }