/* Night-violet theme, 60-30-10:
   60  background  #140F22  deep night violet (and its glass/tint surfaces)
   30  text        #ECE8F6  lavender white (secondary text: the same at lower opacity)
   10  accent      #8E6FE6  Pantone 18-3838 Ultra Violet, lightened for a dark screen: buttons, chips, progress */
:root {
  --bg: #140F22;
  --bg-2: #1C162D;
  --bg-3: #261F3A;
  --glass: rgba(30, 23, 48, .62);
  --glass-line: rgba(196, 178, 255, .14);
  --line: rgba(236, 232, 246, .08);
  --fg: #ECE8F6;
  --fg-2: rgba(236, 232, 246, .7);
  --fg-3: rgba(236, 232, 246, .46);
  --accent: #8E6FE6;
  --accent-hi: #B9A2FF;
  --accent-soft: rgba(142, 111, 230, .2);
  --accent-ink: #fff;
  --radius: 16px;
  --gutter: 16px;
  --tab-h: 54px;
  --safe-top: max(env(safe-area-inset-top), calc(var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px)));
  --safe-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 500 14px/1.45 var(--font); }
body { min-height: 100vh; overscroll-behavior-y: contain; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

.page { position: relative; max-width: 760px; margin: 0 auto; padding: calc(var(--safe-top) + 12px) var(--gutter) calc(var(--safe-bottom) + 28px); }
.page.tabbed { padding-bottom: calc(var(--safe-bottom) + var(--tab-h) + 28px); }

/* ---------- glass + icon buttons */
.glass { background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); }
.icon-btn { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--fg); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:active, .card:active, .row:active { transform: scale(.97); }
.icon-btn.on { color: var(--accent-hi); border-color: rgba(185, 162, 255, .45); }
.go { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(20, 15, 34, .55); border: 1px solid var(--glass-line); color: var(--fg); }

/* ---------- home */
.hero-art { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--safe-top) + 412px); background: center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%); pointer-events: none; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(20,15,34,.6), rgba(20,15,34,0) 18%); }
.top { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; }
.top .ava { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(185, 162, 255, .5); flex: none; }
.top .who { flex: 1; min-width: 0; }
.top .who b { display: block; font: 600 16px/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .who span { font-size: 11.5px; color: var(--fg-2); }
.hero-gap { height: 165px; }
.continue-card { position: relative; z-index: 2; display: flex; gap: 12px; align-items: center; padding: 9px; border-radius: var(--radius); margin-bottom: 18px; }
.continue-card img { width: 62px; height: 80px; border-radius: 12px; object-fit: cover; flex: none; background: var(--bg-3); }
.continue-card .k { font-size: 11.5px; color: var(--fg-2); }
.continue-card .t { margin-top: 1px; font: 600 15px/1.25 var(--serif); -webkit-line-clamp: 1 !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-hi); font-size: 12px; font-weight: 700; }
.prog { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--fg-2); }
.bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(236, 232, 246, .12); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); }

.sec { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.sec h2 { margin: 0; display: flex; align-items: center; gap: 8px; font: 600 18px/1.2 var(--serif); }
.sec h2 svg { width: 18px; height: 18px; }
.sec h2 svg { color: var(--accent-hi); }
.sec a { color: var(--fg-2); font-size: 13px; display: flex; align-items: center; gap: 2px; }
.rail { position: relative; z-index: 2; display: flex; gap: 10px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 18px; padding: 0 var(--gutter) 4px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* poster cards: cover full-bleed, text over a dark gradient */
.card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); border: 1px solid var(--glass-line); aspect-ratio: 1 / 1.24; transition: transform .15s ease; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 30%, rgba(14, 10, 25, .7) 58%, rgba(14, 10, 25, .97) 88%); }
.card .meta { position: absolute; z-index: 1; left: 10px; right: 10px; bottom: 9px; }
.card .t { font-size: 14px; font-weight: 700; hyphens: manual; overflow-wrap: break-word; text-shadow: 0 1px 8px rgba(0,0,0,.6); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .c { margin-top: 2px; color: var(--accent-hi); font-size: 12.5px; font-weight: 600; }
.card .d { margin-top: 3px; display: flex; align-items: center; gap: 5px; padding-right: 38px; color: var(--fg-2); font-size: 11px; white-space: nowrap; overflow: hidden; }
.card .go { position: absolute; z-index: 1; right: 8px; bottom: 7px; width: 26px; height: 26px; }
.badge { position: absolute; z-index: 1; top: 8px; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
.badge.l { left: 8px; }
.badge.r { right: 8px; background: rgba(20, 15, 34, .72); border: 1px solid var(--glass-line); color: var(--fg); backdrop-filter: blur(8px); }
.rail .card { flex: 0 0 min(230px, 46%); aspect-ratio: 1 / 1.1; }
.rail .mini { flex: 0 0 min(110px, 24%); aspect-ratio: 1 / 1.05; border-radius: 14px; }
.rail .mini::after { display: none; }

/* ---------- catalog */
.bar-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.bar-top .ttl { flex: 1; text-align: center; min-width: 0; }
.bar-top .ttl b { display: block; font: 600 20px/1.2 var(--serif); }
.bar-top .ttl span { font-size: 13px; color: var(--fg-2); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 16px; padding: 0 var(--gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; height: 34px; padding: 0 15px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--glass-line); color: var(--fg-2); font-weight: 600; font-size: 13px; }
.chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.search { width: 100%; height: 46px; padding: 0 16px; margin-bottom: 14px; border-radius: 14px; border: 1px solid var(--glass-line); background: var(--bg-2); color: var(--fg); font: inherit; font-size: 16px; outline: none; }  /* under 16px iOS zooms the page on focus */
.search::placeholder { color: var(--fg-3); }
.search:focus { border-color: rgba(185, 162, 255, .5); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.grid .card { aspect-ratio: 1 / 1.3; }
.empty { padding: 56px 12px; text-align: center; color: var(--fg-3); }
.empty b { display: block; margin-bottom: 6px; color: var(--fg-2); font: 600 18px/1.3 var(--serif); }

/* ---------- title */
.t-hero { position: relative; margin: calc(-1 * (var(--safe-top) + 12px)) calc(-1 * var(--gutter)) 0; padding: calc(var(--safe-top) + 12px) var(--gutter) 20px; overflow: hidden; }
.t-hero .bg { position: absolute; inset: -40px; background: center / cover; filter: blur(30px) saturate(1.1); opacity: .5; transform: scale(1.1); }
.t-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(20, 15, 34, .2), var(--bg) 94%); }
.t-hero > * { position: relative; z-index: 1; }
.t-head { display: flex; justify-content: space-between; margin-bottom: 18px; }
.t-head .r { display: flex; gap: 10px; }
.t-main { display: flex; gap: 16px; align-items: flex-end; }
.t-main img { width: 104px; aspect-ratio: 1 / 1.42; object-fit: cover; border-radius: 14px; border: 1px solid var(--glass-line); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); background: var(--bg-2); }
.t-main h1 { margin: 0 0 4px; font: 600 20px/1.2 var(--serif); }
.t-main .en { font-size: 13px; color: var(--fg-3); }
.t-main .chip { margin-top: 10px; }
.desc { margin: 16px 0 0; color: var(--fg-2); font-size: 14.5px; }
.actions { display: flex; gap: 10px; margin: 18px 0 8px; }
.btn { flex: 1; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; }
.btn-main { background: linear-gradient(135deg, var(--accent), #7656D8); color: #fff; box-shadow: 0 8px 22px rgba(142, 111, 230, .35); }
.btn-ghost { background: var(--bg-2); border: 1px solid var(--glass-line); color: var(--fg); }
.btn:active { opacity: .86; }
.notify { display: flex; align-items: center; gap: 12px; width: 100%; margin: 10px 0 24px; padding: 12px 14px; border-radius: 15px; text-align: left; }
.notify .tx { flex: 1; }
.notify .tx b { display: block; font-size: 14.5px; }
.notify .tx span { font-size: 12.5px; color: var(--fg-3); }
.switch { width: 46px; height: 28px; flex: none; border-radius: 14px; background: var(--bg-3); position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(18px); }
.list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.list-head h2 { margin: 0; font: 600 19px/1.2 var(--serif); }
.sort { color: var(--fg-3); font-size: 13px; font-weight: 600; padding: 8px 0; }
.chapters { list-style: none; margin: 0; padding: 0; }
.ch { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 0 2px; border-bottom: 1px solid var(--line); }
.ch .n { font-weight: 700; }
.ch .d { color: var(--fg-3); font-size: 13px; display: flex; align-items: center; gap: 10px; }
.ch.read .n { color: var(--fg-3); font-weight: 600; }
.ch .new { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 10px var(--accent); }
.ch .cur { color: var(--accent-hi); font-size: 12px; font-weight: 700; }

/* ---------- my chapters / settings */
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px; margin-bottom: 8px; border-radius: var(--radius); text-align: left; transition: transform .15s; }
.row img { width: 54px; height: 70px; border-radius: 10px; object-fit: cover; flex: none; background: var(--bg-3); }
.row .tx { flex: 1; min-width: 0; }
.row .tx b { display: block; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .tx span { font-size: 13px; color: var(--fg-2); }
.set { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.set:last-child { border-bottom: 0; }
.set .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); flex: none; }
.set .tx { flex: 1; }
.set .tx b { display: block; font-size: 15px; }
.set .tx span { font-size: 12.5px; color: var(--fg-3); }
.panel { border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.page-title { margin: 4px 0 14px; font: 600 22px/1.2 var(--serif); }

/* ---------- tab bar */
.tabbar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 2px 8px calc(var(--safe-bottom) + 2px);
  background: rgba(18, 13, 31, .86); border-top: 1px solid var(--glass-line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.tabbar a { flex: 1; max-width: 120px; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--fg-3); position: relative; }
.tabbar a.on { color: var(--accent-hi); }
.tabbar svg { width: 22px; height: 22px; }
.tabbar a.on::after { content: ""; position: absolute; bottom: 2px; width: 46px; height: 3px; border-radius: 2px; background: var(--accent-hi); }

/* ---------- reader */
.reader { background: #0E0A18; min-height: 100vh; }
.pages { max-width: 800px; margin: 0 auto; }
.pages img { width: 100%; height: auto; background: var(--bg-2); }
.topbar { position: fixed; z-index: 10; left: 0; right: 0; top: 0; padding: calc(var(--safe-top) + 8px) 12px 10px; display: flex; align-items: center; gap: 10px;
  background: rgba(20, 15, 34, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--glass-line); transition: transform .25s ease; }
.topbar.hide { transform: translateY(-110%); }
.topbar .icon-btn { width: 40px; height: 40px; background: var(--bg-3); }
.topbar .meta { min-width: 0; flex: 1; }
.topbar .meta b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .meta span { font-size: 12.5px; color: var(--accent-hi); font-weight: 600; }
.progress { position: fixed; z-index: 11; left: 0; right: 0; bottom: 0; height: 3px; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); transition: width .15s linear; }
.end { max-width: 520px; margin: 0 auto; padding: 36px var(--gutter) calc(var(--safe-bottom) + 48px); text-align: center; }
.end p { margin: 0 0 18px; color: var(--fg-2); }
.end .btn { width: 100%; margin-bottom: 10px; flex: none; }
.loading { display: grid; place-items: center; min-height: 60vh; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--bg-3); border-top-color: var(--accent-hi); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--safe-bottom) + var(--tab-h) + 20px); transform: translateX(-50%); padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: 90vw; text-align: center; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 2s !important; } }

/* «⋯» menu outside Telegram (inside Telegram the native popup is used) */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; background: rgba(8, 5, 16, .55); display: flex; align-items: flex-end; justify-content: center; padding: 0 12px calc(var(--safe-bottom) + 12px); }
.sheet { width: 100%; max-width: 420px; border-radius: 18px; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.sheet button { height: 50px; border: 0; border-radius: 12px; background: none; color: var(--fg); font: 600 16px var(--font); cursor: pointer; }
.sheet button:active { background: rgba(255, 255, 255, .06); }
.sheet .cancel { color: var(--fg-2); margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }

/* ---------- home: «Новые главы» by day */
.seg { position: relative; z-index: 2; display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 4px; padding: 0 var(--gutter); scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; height: 34px; padding: 0 15px; border-radius: 17px; border: 1px solid var(--glass-line); background: rgba(20, 15, 34, .62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--fg-2); font: 600 13px var(--font); }
.seg button.on { background: var(--accent-soft); border-color: rgba(185, 162, 255, .4); color: var(--fg); }
#feed { position: relative; z-index: 2; margin-bottom: 22px; }
.fday { display: flex; align-items: center; gap: 9px; margin: 16px 0 9px; font-size: 13px; font-weight: 700; color: var(--fg-2); }
.fday i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 0 4px rgba(185, 162, 255, .16); flex: none; }
.fday::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.flist { border-radius: 18px; overflow: hidden; }
.frow { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); }
.frow:first-child { border-top: 0; }
.fcov img { display: block; width: 52px; height: 70px; border-radius: 10px; object-fit: cover; background: var(--bg-3); }
.fmid { min-width: 0; color: inherit; text-decoration: none; }
.ft { font-weight: 700; font-size: 14.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fm { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 12.5px; color: var(--fg-2); white-space: nowrap; }
.fm b { color: var(--fg); font-weight: 700; }
.nb { height: 20px; padding: 0 7px; border-radius: 6px; display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); }
.nb.tl { background: rgba(142, 111, 230, .28); color: var(--accent-hi); }
.fread { height: 36px; padding: 0 15px; border-radius: 12px; display: inline-flex; align-items: center; font-weight: 700; font-size: 13.5px; color: var(--fg); text-decoration: none;
  background: var(--accent-soft); border: 1px solid rgba(185, 162, 255, .32); }
.fread.dim { background: none; border-color: var(--line); color: var(--fg-3); }
.fempty { padding: 18px 16px; margin-top: 10px; border-radius: 16px; border: 1px dashed var(--glass-line); color: var(--fg-3); font-size: 13.5px; text-align: center; }
.fmore { display: block; width: 100%; margin-top: 10px; height: 42px; border-radius: 14px; border: 1px solid var(--glass-line); background: none; color: var(--accent-hi); font: 600 14px var(--font); }

/* ---------- home: «Все тайтлы» shelf */
.shelf { gap: 12px; }
.shelf-card { flex: 0 0 108px; color: inherit; text-decoration: none; }
.shelf-card img { display: block; width: 108px; height: 150px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); background: var(--bg-3); }
.shelf-card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 7px; font-size: 12.5px; line-height: 1.25; font-weight: 700; }
.shelf-card small { color: var(--fg-3); font-size: 11.5px; }

/* ---------- catalog tab */
.cat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cat-head .page-title { margin-bottom: 2px; }
.cat-n { display: block; color: var(--fg-3); font-size: 12.5px; margin-bottom: 14px; }
.search-wrap { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; margin-bottom: 14px; border-radius: 14px; color: var(--fg-3); }
.search-wrap:focus-within { border-color: rgba(185, 162, 255, .5); }
.search-wrap .search { height: 100%; margin: 0; padding: 0; border: 0; background: none; border-radius: 0; }
.rate { color: #ffc94d; font-weight: 700; white-space: nowrap; }
.card .meta .rate { margin-left: 6px; }
.fm { flex-wrap: wrap; row-gap: 3px; min-width: 0; }  /* time goes to the next line instead of under the button */
.fm span { white-space: nowrap; }
.fread { flex: none; }

/* ---------- 2026-11 layout: home without a header, updates, release schedule, collections */
.top.bare { justify-content: space-between; min-height: 38px; }
.hero-art.low { height: calc(var(--safe-top) + 210px); opacity: .9; }
.page.home .hero-gap { height: 150px; }
.continue-card .go { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }

.today { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.today a { display: block; aspect-ratio: 1 / 1.12; border-radius: 14px; overflow: hidden; border: 1px solid var(--glass-line); background: var(--bg-2); }
.today img { width: 100%; height: 100%; object-fit: cover; }
.today .more { display: grid; place-items: center; font: 700 17px/1 var(--font); color: var(--fg); }

.sched-link { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); margin-bottom: 22px; }
.sched-link .ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); }
.sched-link .tx { flex: 1; min-width: 0; }
.sched-link .tx b { display: block; font-size: 15px; font-weight: 700; }
.sched-link .tx span { display: block; margin-top: 1px; color: var(--fg-2); font-size: 12px; line-height: 1.35; }
.sched-link .go { color: var(--fg-2); }
.sched-link.follow { margin-top: 14px; margin-bottom: 8px; }

.rail.cols { gap: 12px; }
.col-card { position: relative; flex: 0 0 min(300px, 78%); height: 132px; border-radius: 18px; overflow: hidden; border: 1px solid var(--glass-line);
  background: var(--bg-2) center 22% / cover no-repeat; display: flex; align-items: flex-end; }
.col-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(14, 10, 25, .94) 4%, rgba(14, 10, 25, .45) 46%, rgba(14, 10, 25, .08) 82%); }
.col-card .tx { position: relative; z-index: 1; flex: 1; min-width: 0; padding: 12px 14px; }
.col-card .tx b { display: block; font: 600 18px/1.2 var(--serif); text-shadow: 0 1px 10px rgba(0, 0, 0, .7); }
.col-card .tx span { color: var(--fg-2); font-size: 12px; }
.col-card .go { position: relative; z-index: 1; width: 30px; height: 30px; margin: 0 12px 12px 0; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--glass-line); }

.uday { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-size: 15px; }
.uday i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.uday b { font: 600 16px/1.2 var(--serif); }
.uday span { color: var(--fg-2); font-size: 13px; }
.uday em { margin-left: auto; min-width: 26px; height: 22px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; background: var(--bg-3); color: var(--fg-2); font: 700 12px/1 var(--font); }
.urow { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ulist .urow:last-child { border-bottom: 0; }
.urow img { width: 52px; height: 58px; flex: none; border-radius: 12px; object-fit: cover; background: var(--bg-3); }
.urow .tx { flex: 1; min-width: 0; }
.urow .tx b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 700; line-height: 1.25; }
.urow .tx span { display: block; margin-top: 2px; color: var(--fg-2); font-size: 12.5px; }
.urow .tx small { display: block; color: var(--fg-3); font-size: 11.5px; }
.urow .go { color: var(--fg-3); flex: none; }
.nb.plus { background: #B7F36B; color: #1B2A0A; }
.urow .nb { flex: none; background: #B7F36B; color: #1B2A0A; }

.page.sched { padding-bottom: calc(var(--safe-bottom) + var(--tab-h) + 28px); }
.week { position: relative; z-index: 2; display: flex; align-items: center; gap: 5px; margin-bottom: 14px; }
.week > .icon-btn { width: 30px; height: 30px; }
.week > .icon-btn svg { width: 15px; height: 15px; }
.week > button:not(.icon-btn) { flex: 1; min-width: 0; height: 62px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--glass-line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--fg-2); }
.week small { font-size: 11px; }
.week b { font: 600 17px/1.1 var(--font); color: var(--fg); }
.week i { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.week i.has { background: var(--fg-3); }
.week > button.now { border-color: rgba(185, 162, 255, .5); }
.week > button.on { background: var(--accent); border-color: var(--accent-hi); color: #fff; box-shadow: 0 6px 22px rgba(142, 111, 230, .4); }
.week > button.on i.has { background: #fff; }
.sbox { position: relative; z-index: 2; border-radius: 20px; padding: 4px 14px 12px; }
.shead { display: flex; align-items: center; gap: 10px; padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.shead .ic { color: var(--accent-hi); }
.shead b { flex: 1; font: 600 17px/1.2 var(--serif); }
.shead em { height: 24px; padding: 0 10px; border-radius: 999px; display: grid; place-items: center; background: var(--bg-3); color: var(--fg-2); font: 600 12px/1 var(--font); white-space: nowrap; }
.srow { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.srow img { width: 58px; height: 66px; flex: none; border-radius: 12px; object-fit: cover; background: var(--bg-3); }
.srow .tx { flex: 1; min-width: 0; }
.srow .tx b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; font-weight: 700; line-height: 1.22; }
.srow .tx span { display: block; margin-top: 2px; color: var(--fg-2); font-size: 12.5px; }
.tags { display: flex; gap: 6px; margin-top: 5px; overflow: hidden; }
.tags i { flex: none; height: 20px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; background: var(--bg-3); color: var(--fg-2); font: 600 11px/1 var(--font); }
.srow .st { flex: none; text-align: center; }
.srow .st small { display: block; margin-top: 4px; color: var(--fg-2); font-size: 11.5px; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font: 700 11px/1 var(--font); white-space: nowrap; background: var(--bg-3); color: var(--fg-2); }
.pill.today { background: #B7F36B; color: #1B2A0A; }
.pill.out { background: var(--accent-soft); color: var(--accent-hi); }
.srow .go { color: var(--fg-3); flex: none; }
.fmore.in { margin-top: 12px; }
.snote { margin: 10px 4px 0; color: var(--fg-3); font-size: 11.5px; text-align: center; }

.t-genres { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 2px; }
.t-genres a { height: 26px; padding: 0 11px; border-radius: 999px; display: inline-flex; align-items: center; background: var(--bg-2); border: 1px solid var(--glass-line); color: var(--fg-2); font: 600 12px/1 var(--font); }
.t-due { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; padding: 10px 12px; border-radius: 14px; font-size: 13px; color: var(--fg-2); }
.t-due > svg:first-child { width: 20px; height: 20px; color: var(--accent-hi); flex: none; }
.t-due span { flex: 1; }
.empty.small { padding: 22px 12px; }
.page.tabbed > .sec { margin-top: 18px; }
.page.home > .sec { margin-top: 0; }
.page.home ~ .x, .hero-art { background-position: center top; }
.hero-art.low { background-position: center 16%; }
.hero-art.low::after { background: linear-gradient(to bottom, rgba(20,15,34,.35), rgba(20,15,34,.2) 40%, var(--bg) 100%); }

/* schedule row: one genre, shortened if long */
.srow .tags i { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 20px; }

/* ---------- suggest a title */
@font-face { font-family: "Exo 2"; src: url("exo2-latin.woff2") format("woff2"); font-style: normal; font-weight: 400 800; font-display: swap; unicode-range: U+0000-024F, U+1E00-1EFF; }
@font-face { font-family: "Exo 2"; src: url("exo2-cyrillic.woff2") format("woff2"); font-style: normal; font-weight: 400 800; font-display: swap; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
.suggest-page { min-height: 100vh; padding-bottom: calc(var(--safe-bottom) + 24px); }
.suggest { --font: "Exo 2", sans-serif; --serif: "Exo 2", sans-serif; position: relative; max-width: 500px; min-height: calc(100vh - var(--safe-top) - 36px); margin: 0 auto; padding-top: clamp(36px, 9vh, 78px); }
.suggest-orbit { position: absolute; top: 16px; right: 16px; width: 82px; height: 82px; border: 1px solid var(--glass-line); border-radius: 50%; color: var(--accent-hi); display: grid; place-items: center; opacity: .72; }
.suggest-orbit::before { content: ""; position: absolute; inset: 9px; border: 1px dashed var(--glass-line); border-radius: inherit; }
.suggest-orbit span { font-size: 28px; text-shadow: 0 0 22px var(--accent); animation: suggest-float 3s ease-in-out infinite; }
.suggest-orbit i, .suggest-orbit b { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 12px var(--accent); }
.suggest-orbit i { top: 9px; right: 15px; }
.suggest-orbit b { bottom: 13px; left: 10px; width: 4px; height: 4px; }
.suggest-head { position: relative; z-index: 1; max-width: 360px; margin-bottom: 30px; animation: suggest-in .4s ease both; }
.suggest-kicker { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border: 1px solid rgba(185, 162, 255, .26); border-radius: 999px; background: var(--accent-soft); color: var(--accent-hi); font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.suggest-head h1 { max-width: 320px; margin: 16px 0 9px; font: 600 clamp(29px, 8vw, 38px)/1.08 var(--serif); letter-spacing: -.025em; }
.suggest-head p { max-width: 320px; margin: 0; color: var(--fg-2); font-size: 14px; line-height: 1.55; }
.suggest-form { position: relative; display: flex; flex-direction: column; }
.suggest-form label { margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.suggest-form textarea { width: 100%; min-height: 142px; max-height: 38vh; resize: vertical; padding: 15px 16px; border: 1px solid var(--glass-line); border-radius: 16px; outline: none; background: var(--bg-2); color: var(--fg); font: 500 16px/1.5 var(--font); transition: border-color .18s, box-shadow .18s, background .18s; }
.suggest-form textarea::placeholder { color: var(--fg-3); }
.suggest-form textarea:focus { border-color: var(--accent-hi); box-shadow: 0 0 0 4px var(--accent-soft), 0 12px 32px rgba(142, 111, 230, .12); }
.suggest-meta { display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px 14px; color: var(--fg-3); font-size: 11.5px; }
.suggest-submit { position: sticky; bottom: max(12px, var(--safe-bottom)); z-index: 4; width: 100%; min-height: 52px; flex: none; margin: 1px 0 8px; border-radius: 16px; font-size: 15px; }
.suggest-submit:disabled { cursor: default; opacity: .48; box-shadow: none; }
.suggest-submit .spinner { width: 19px; height: 19px; border-width: 2px; border-color: rgba(255,255,255,.28); border-top-color: #fff; }
.suggest-hint { margin: 13px 4px 0; color: var(--fg-3); font-size: 12px; line-height: 1.45; text-align: center; }
.suggest-success { padding-top: clamp(84px, 18vh, 150px); text-align: center; animation: suggest-in .45s ease both; }
.suggest-check { width: 84px; height: 84px; margin: 0 auto 23px; border: 1px solid rgba(185, 162, 255, .34); border-radius: 28px; display: grid; place-items: center; background: radial-gradient(circle at 35% 25%, rgba(185,162,255,.35), var(--accent-soft) 65%); box-shadow: 0 12px 44px rgba(142, 111, 230, .18); animation: suggest-pop .55s cubic-bezier(.2,1.5,.5,1) both; }
.suggest-check svg { width: 44px; height: 44px; fill: none; stroke: var(--accent-hi); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: suggest-draw .5s .18s ease forwards; }
.suggest-success h1 { max-width: 390px; margin: 0 auto 10px; font: 600 27px/1.16 var(--serif); }
.suggest-success p { max-width: 320px; margin: 0 auto 27px; color: var(--fg-2); font-size: 14px; }
.suggest-success .btn { width: 100%; margin-bottom: 10px; }
@keyframes suggest-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes suggest-pop { from { opacity: 0; transform: scale(.76) rotate(-8deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes suggest-draw { to { stroke-dashoffset: 0; } }
@keyframes suggest-float { 50% { transform: translateY(-4px) rotate(8deg); } }
html.suggest-light { color-scheme: light; --bg: #F7F4FC; --bg-2: #FFFFFF; --bg-3: #EEE9F6; --glass: rgba(255,255,255,.84); --glass-line: rgba(71,52,101,.14); --line: rgba(44,31,66,.09); --fg: #241B35; --fg-2: rgba(36,27,53,.7); --fg-3: rgba(36,27,53,.48); --accent: #7956D6; --accent-hi: #6843C2; --accent-soft: rgba(121,86,214,.12); --accent-ink: #fff; }
html.suggest-light body { background: var(--bg); color: var(--fg); }
@media (max-width: 360px) { .suggest-orbit { width: 64px; height: 64px; top: 12px; right: 10px; } .suggest-head { max-width: 280px; } .suggest-head h1 { max-width: 260px; } }
@media (max-height: 620px) { .suggest { padding-top: 30px; } .suggest-head { margin-bottom: 20px; } .suggest-success { padding-top: 38px; } }
@media (prefers-reduced-motion: reduce) { .suggest-orbit span { animation: none; } }
