/* focusmusic — стили, направление D2 «Лампа».
   Идея: уютный рабочий стол вечером. Тёплый графит, мягкое пятно света от настольной лампы,
   лёгкое зерно бумаги, крупные скругления. Слова — Onest, заголовки и цифры таймера —
   Literata, служебные метки — JetBrains Mono. Работа светит тёплым янтарём, отдых — прохладным.
   Помодоро меняет «свет лампы»: в перерыв он остывает. */

/* ---------- шрифты (локально, кириллица + латиница, OFL) ---------- */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("assets/fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("assets/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("assets/fonts/literata-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("assets/fonts/literata-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 200 700; font-display: swap;
  src: url("assets/fonts/jetbrains-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 200 700; font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- токены ---------- */
:root {
  /* работа: тёплый графит и янтарь */
  --bg: #211F1C;
  --card: #2B2824;
  --card-2: #2E2A25;
  --raise: #3A352F;
  --line: #34302A;
  --line-2: #423C34;
  --line-3: #4A433A;
  --text: #F3EBDD;
  --muted: #ADA393;
  --dim: #7F7668;
  --accent: #E2A960;
  --accent-2: #B58750;
  --accent-3: #5E4E3A;
  --accent-text: #E9B877;
  --on-accent: #211F1C;
  --glow: rgba(232, 168, 92, .20);
  --glow-strong: rgba(236, 170, 90, .30);
  --danger: #E88B76;

  /* перерыв помодоро: свет остывает */
  --cool: #9FC0CB;
  --cool-glow: rgba(150, 190, 205, .20);

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --paper: url("assets/scenes/paper.svg");

  --r-card: 24px; --r-bar: 28px; --r-img: 16px; --r-sm: 12px;
  --gutter: 56px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
/* отдых: нейтральный графит, у каждого состояния свой прохладный акцент */
html[data-state="relax"], html[data-state="sleep"], html[data-state="meditate"] {
  --bg: #1F2021; --card: #2A2A29; --card-2: #2C2D2C; --raise: #3A3936;
  --line: #353533; --line-2: #403F3C; --line-3: #4A4946; --dim: #7A7A74;
}
html[data-state="relax"]    { --accent: #9FC0CB; --accent-2: #7FA3AF; --accent-3: #3F5258; --accent-text: #AFCBD4; --on-accent: #1F2021; --glow: rgba(150, 190, 205, .18); --glow-strong: rgba(150, 190, 205, .26); }
html[data-state="sleep"]    { --accent: #A9ABD8; --accent-2: #8486AE; --accent-3: #44455E; --accent-text: #BDBEE3; --on-accent: #1E1F24; --glow: rgba(140, 142, 205, .18); --glow-strong: rgba(140, 142, 205, .26); --bg: #1E1F23; --card: #29292F; --raise: #383843; --line: #33333B; }
html[data-state="meditate"] { --accent: #9CC3A8; --accent-2: #7E9A88; --accent-3: #3E5146; --accent-text: #AFCFB8; --on-accent: #1E2120; --glow: rgba(130, 180, 150, .16); --glow-strong: rgba(130, 180, 150, .24); --bg: #1E2120; --card: #292C2A; --raise: #373B38; --line: #333735; }

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .6s ease;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.eyebrow { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.show-sm { display: none !important; }

.ic { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.paper { background-color: var(--card); background-image: var(--paper); }

/* ---------- кнопки ---------- */
.btn-primary, .btn-soft {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 28px; border-radius: 999px; font-size: 16px; font-weight: 600; white-space: nowrap;
  transition: background-color .2s, transform .15s, filter .2s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active, .btn-soft:active { transform: scale(.98); }
.btn-primary .ic { width: 18px; height: 18px; }
.btn-soft { background: var(--raise); color: var(--text); font-weight: 500; }
.btn-soft:hover { background: color-mix(in srgb, var(--raise) 82%, var(--text)); }
.text-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); padding: 8px 4px; border-radius: 10px; white-space: nowrap; transition: color .2s; }
.text-btn:hover { color: var(--text); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 999px; display: inline-grid; place-items: center; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.icon-btn:hover { color: var(--text); background: color-mix(in srgb, var(--raise) 70%, transparent); }
.icon-btn .ic { width: 21px; height: 21px; }
.link-btn { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-3); font-size: 13px; }
.link-btn:hover { color: var(--text); }
.round-btn { width: 48px; height: 48px; border-radius: 999px; background: var(--raise); display: grid; place-items: center; color: var(--text); }
.ic-on { display: none; }
[aria-pressed="true"] > .ic-on, .active > .ic-on { display: block; }
[aria-pressed="true"] > .ic-off, .active > .ic-off { display: none; }

/* сегменты-переключатели */
.seg { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--card); white-space: nowrap; }
.seg > button, .seg > label {
  padding: 9px 20px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px; transition: background-color .25s, color .25s; cursor: pointer;
}
.seg > button:hover, .seg > label:hover { color: var(--text); }
.seg > .active, .seg > [aria-selected="true"], .seg > label:has(input:checked) { background: var(--raise); color: var(--text); }
.seg-sm > button, .seg-sm > label { padding: 7px 14px; font-size: 14px; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg-state > .active { background: var(--accent); color: var(--on-accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fav-subs { margin: 0 0 14px; }
.fav-subs:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--raise); color: var(--text); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.chip .ic { width: 16px; height: 16px; }
.chip:hover { background: color-mix(in srgb, var(--raise) 80%, var(--text)); }
.chip.active, .chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* полоски прогресса */
.bar { display: block; height: 6px; border-radius: 999px; background: var(--raise); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent-2); transition: width .6s ease; }

/* переключатель-тумблер */
.switch {
  appearance: none; -webkit-appearance: none; flex-shrink: 0; margin: 0;
  width: 46px; height: 28px; border-radius: 999px; background: var(--raise); position: relative; cursor: pointer;
  transition: background-color .25s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px;
  background: var(--muted); transition: transform .25s, background-color .25s;
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); background: var(--bg); }

/* ---------- полоса загрузки и тосты ---------- */
#loading-bar { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--accent); z-index: 90; opacity: 0; transition: opacity .3s; }
body.is-loading #loading-bar { opacity: 1; animation: load 1.2s ease-in-out infinite; }
@keyframes load { 0% { width: 0; left: 0; } 50% { width: 60%; left: 20%; } 100% { width: 0; left: 100%; } }
#toast-wrap { position: fixed; left: 50%; bottom: 28px; transition: bottom .3s; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
.toast {
  padding: 12px 18px; border-radius: 16px; background: #34302A; color: var(--text); font-size: 14px;
  box-shadow: var(--shadow); border: 1px solid var(--line-2); animation: toast-in .25s ease;
}
body:has(#player-screen:not(.hidden)) #toast-wrap { bottom: 148px; }
body:has(#mini-player:not(.hidden)) #toast-wrap { bottom: 116px; }
.toast.ok { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.toast.err { border-color: color-mix(in srgb, var(--danger) 55%, var(--line-2)); }
.toast-out { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.net-banner {
  position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 81;
  display: flex; flex-direction: column; gap: 2px; width: max-content; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 16px; font-size: 14px; line-height: 1.45; box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--line-2)); animation: toast-in .25s ease;
}
.net-banner span { color: var(--muted); }

/* ========================================================= ГЛАВНАЯ */
.view-page { position: relative; min-height: 100vh; min-height: 100dvh; }
#home { display: flex; flex-direction: column; padding-bottom: 120px; isolation: isolate; }
.lamp-light, #player-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--paper), radial-gradient(ellipse 1000px 680px at 22% -8%, var(--glow), transparent 72%);
}
html[data-state="relax"] .lamp-light, html[data-state="sleep"] .lamp-light, html[data-state="meditate"] .lamp-light {
  background-image: var(--paper), radial-gradient(ellipse 1000px 680px at 70% -10%, var(--glow), transparent 72%);
}

#topbar {
  height: 84px; flex-shrink: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--gutter); position: relative; z-index: 5;
}
.brand { font: 600 22px var(--serif); color: var(--text); justify-self: start; letter-spacing: -.01em; }
/* знак «Русло» перед названием — во всех шапках с .brand (главная, документы, журнал) */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand::before { content: ""; width: 30px; height: 30px; flex-shrink: 0; background: url("/assets/icons/logo.svg") center / contain no-repeat; }
.seg-nav { background: color-mix(in srgb, var(--card) 92%, transparent); }
.topbar-search { justify-self: end; font-size: 14px; }
.topbar-search .ic { width: 18px; height: 18px; }

#home-main { flex: 1; display: flex; flex-direction: column; }
.view { display: flex; flex-direction: column; gap: 28px; padding: 28px var(--gutter) 0; }
.view-head { display: flex; flex-direction: column; gap: 10px; }
.view-head-row { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.view-head h1, .pg-main h1 { font: 500 50px/1.1 var(--serif); letter-spacing: -.02em; }
.lead { font-size: 17px; color: var(--muted); }
/* таймеры Отдыха и Сна: плашка-предложение под циферблатом и время будильника в меню */
.timer-offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; max-width: 560px; margin: 4px auto 0; font-size: 14px; color: var(--muted); }
.timer-offer > span { width: 100%; text-align: center; margin-bottom: 2px; }
.menu-time { display: flex; gap: 8px; align-items: center; padding: 6px 10px; }
.menu-time input[type="time"] { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--raise); color: var(--text); font: inherit; color-scheme: dark; }
.menu-hint { max-width: 260px; padding: 4px 12px 8px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.view-head h1.head-task { font-size: 34px; max-width: 24ch; }
.section-title { font: 500 22px var(--serif); }

/* ---- рабочие режимы: выбранная карточка шире и с кнопкой «Начать» ---- */
.work-grid { display: flex; gap: 20px; align-items: flex-start; }
.mode-card {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 12px 12px 20px;
  border-radius: var(--r-card); border: 1px solid var(--line); background-color: var(--card); background-image: var(--paper);
  cursor: pointer; text-align: left; position: relative;
  transition: flex-grow .4s cubic-bezier(.2, .7, .2, 1), border-color .25s, box-shadow .3s, transform .2s;
}
.mode-card:hover { border-color: var(--line-3); }
.mode-card.is-selected {
  flex-grow: 1.65; border: 2px solid var(--accent); padding: 11px 11px 19px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 10%, transparent), 0 24px 60px rgba(0, 0, 0, .35);
  cursor: default;
}
.mode-card.is-loading { opacity: .7; }
.mc-scene { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-img); background: var(--raise); }
.mc-text { display: flex; flex-direction: column; gap: 6px; padding: 0 8px; }
.bento-title { font: 500 20px/1.2 var(--serif); letter-spacing: -.01em; transition: font-size .3s; }
.is-selected .bento-title { font-size: 28px; }
.mc-desc { font-size: 14px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
/* описание — всегда не меньше двух строк, чтобы карточки в ряду были одной высоты */
.mode-card .mc-desc, .rest-card .mc-desc { min-height: calc(2em * 1.45); }
.mc-count { font: 400 12px var(--mono); color: var(--dim); }
.mc-actions { display: none; gap: 10px; padding: 4px 8px 0; }
.is-selected .mc-actions { display: flex; animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.dur-btn {
  flex: 1; min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 6px; height: 52px; padding: 0 14px 0 18px;
  border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; white-space: nowrap; transition: border-color .2s;
}
.mc-actions .start-btn { padding: 0 24px; }
.dur-btn:hover { border-color: var(--line-3); }
.dur-btn .dur-label { overflow: hidden; text-overflow: ellipsis; }
.dur-btn .ic { color: var(--muted); width: 16px; height: 16px; }

/* ---- полоса «Отдых, сон и медитация» ---- */
.rest-strip {
  margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 14px 14px 24px; border-radius: var(--r-card); text-align: left;
  background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--line); transition: border-color .2s;
}
.rest-strip:hover { border-color: var(--line-3); }
.rs-text { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.rs-text b { font: 500 19px var(--serif); }
.rs-text small { font-size: 14px; color: var(--muted); }
.rs-thumbs { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.rs-thumbs img { width: 64px; height: 48px; border-radius: 10px; object-fit: cover; }
.rs-thumbs .round-btn { margin-left: 6px; }

/* ---- продолжить ---- */
#recent-section { display: flex; flex-direction: column; gap: 14px; }
#recent-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.recent-tile {
  display: flex; align-items: center; gap: 14px; padding: 8px 14px 8px 8px; border-radius: 20px; text-align: left;
  background-color: var(--card); background-image: var(--paper); border: 1px solid transparent; transition: border-color .2s;
}
.recent-tile:hover { border-color: var(--line-3); }
.recent-tile img { width: 72px; height: 54px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--raise); }
.rt-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rt-meta b { font: 500 17px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-meta small { font-size: 13px; color: var(--muted); }
.recent-tile .play-circle { width: 40px; height: 40px; }

.play-circle {
  width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--raise); color: var(--text); transition: background-color .2s, color .2s;
}
.play-circle .ic { width: 16px; height: 16px; }
.play-circle:hover { background: var(--accent); color: var(--on-accent); }

/* ---- отдых ---- */
.rest-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.rest-card {
  display: flex; flex-direction: column; gap: 14px; padding: 12px 12px 18px; border-radius: var(--r-card); text-align: left;
  background-color: var(--card); background-image: var(--paper); border: 1px solid var(--line); cursor: pointer;
  transition: border-color .25s, transform .2s;
}
.rest-card:hover { border-color: var(--line-3); }
.rest-card:hover .rc-start { background: var(--accent); color: var(--on-accent); }
.rest-card.is-loading { opacity: .7; }
.rest-card .mc-text .bento-title { font-size: 21px; }
.rc-start {
  align-self: flex-start; margin: auto 8px 0; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--raise);
  display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 500; transition: background-color .2s, color .2s;
}
.rc-start .ic { width: 12px; height: 12px; }
.rc-round { display: none; }

/* ---- профиль ---- */
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 24px; align-items: start; }
.pg-main { display: flex; flex-direction: column; gap: 24px; }
.pg-side { display: flex; flex-direction: column; gap: 16px; padding-top: 79px; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: var(--r-card); text-align: left; }
.stat span { font-size: 14px; color: var(--muted); }
.stat b { font: 500 36px/1.15 var(--serif); }
button.stat { transition: box-shadow .2s; }
button.stat:hover { box-shadow: inset 0 0 0 1px var(--line-3); }
.chart { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--r-card); }
.chart-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); gap: 12px; }
.week-chart { display: flex; flex-direction: column; gap: 12px; }
.wc-area { position: relative; height: 280px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 36px; align-items: end; padding: 0 12px; }
.wc-col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; z-index: 1; }
.wc-val { position: absolute; left: 50%; transform: translateX(-50%); font: 400 12px var(--mono); color: var(--muted); white-space: nowrap; }
.wc-bar { width: 100%; min-height: 6px; border-radius: 999px; background: var(--accent-3); transition: height .6s ease; }
.wc-col.hit .wc-bar { background: var(--accent-2); }
.wc-col.today .wc-bar { background: var(--accent); box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.wc-goal { position: absolute; left: 0; right: 0; border-top: 1.5px dashed #5A5146; z-index: 0; margin-bottom: 0; }
.week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 36px; padding: 0 12px; text-align: center; font-size: 13px; color: var(--muted); }
.week-days .today { color: var(--text); }
.card-head { display: flex; flex-direction: column; gap: 6px; }
.card-head h2 { font: 500 22px var(--serif); }
.card-head p { font-size: 14px; line-height: 1.45; color: var(--muted); }
.goal-card { display: flex; flex-direction: column; gap: 18px; padding: 24px; border-radius: var(--r-card); }
.goal-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.goal-chips button { padding: 11px 18px; border-radius: 999px; background: var(--raise); font-size: 15px; font-weight: 500; transition: background-color .2s, color .2s; }
.goal-chips button:hover { background: color-mix(in srgb, var(--raise) 80%, var(--text)); }
.goal-chips button.active { background: var(--accent); color: var(--on-accent); }
.goal-progress { display: flex; flex-direction: column; gap: 8px; }
.goal-progress .bar { height: 8px; }
.goal-progress .bar > i { background: var(--accent); }
.bar-caption { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.settings-card, .account-card { display: flex; flex-direction: column; padding: 6px 24px; border-radius: var(--r-card); }
.toggle-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; cursor: pointer;
  border-bottom: 1px solid var(--raise); font-size: 15px;
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-row > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.toggle-row small { font-size: 12px; color: var(--muted); }
.profile-head { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--raise); }
.avatar { width: 44px; height: 44px; border-radius: 999px; background: var(--raise); display: grid; place-items: center; font: 500 18px var(--serif); color: var(--accent-text); flex-shrink: 0; }
.profile-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.profile-who b { font-weight: 500; }
.profile-who small { font-size: 12px; color: var(--muted); }
.profile-row {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 0; text-align: left; font-size: 15px;
  border-bottom: 1px solid var(--raise); transition: color .2s;
}
.profile-row:last-child { border-bottom: 0; }
.profile-row > .ic { color: var(--muted); width: 19px; height: 19px; }
.profile-row span:nth-of-type(1) { flex: 1; }
.profile-row .chev { color: var(--dim); display: grid; }
.profile-row .chev .ic { width: 16px; height: 16px; }
.profile-row:hover > .ic { color: var(--accent-text); }
.profile-subpage { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.profile-subpage h2 { font: 500 36px var(--serif); margin: 6px 0 4px; }
.profile-subpage .link-btn { align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; font-size: 14px; }
.profile-subpage .link-btn .ic { width: 16px; height: 16px; }

.kv { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--raise); }
.kv > span:first-child { display: flex; flex-direction: column; }
.kv small { font-size: 12px; color: var(--muted); }
.deck-hint { font-size: 14px; color: var(--muted); line-height: 1.55; padding: 14px 16px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--raise) 45%, transparent); }
.deck-hint b { color: var(--text); font-weight: 500; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.plan-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.plan-best { border-color: var(--accent); }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-head b { font: 500 19px var(--serif); }
.plan-badge { font: 500 11px var(--mono); padding: 4px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); text-transform: uppercase; }
.plan-price { font: 500 28px var(--serif); display: flex; align-items: baseline; gap: 8px; }
.plan-price small { font: 400 13px var(--sans); color: var(--muted); }
.plan-sub, .plan-note { font-size: 13px; color: var(--muted); }
.plan-features { margin: 0; padding-left: 18px; font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.plan-cta { margin-top: auto; height: 44px; font-size: 15px; }

.refer-hero { display: grid; place-items: center; padding: 8px 0; }
.refer-title { font: 500 24px var(--serif); text-align: center; }
.refer-text { text-align: center; color: var(--muted); }
.refer-link { padding: 14px 16px; border-radius: var(--r-sm); background: var(--raise); font-size: 13px; overflow-wrap: anywhere; }
.refer-copy { align-self: center; }
.refer-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; }
.refer-stats b { display: block; font: 500 20px var(--serif); }
.refer-stats small { font-size: 12px; color: var(--muted); }

.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.home-foot { margin: 48px var(--gutter) 0; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--dim); }

/* ---- мини-плеер на главной ---- */
#mini-player {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 30;
  width: min(1328px, calc(100% - 2 * var(--gutter)));
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 24px; align-items: center;
  padding: 12px 22px 12px 12px; border-radius: var(--r-card); overflow: hidden;
  background-color: var(--card); background-image: var(--paper); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  animation: rise .3s ease;
}
#mini-progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); opacity: .8; }
.mini-open { display: flex; gap: 14px; align-items: center; min-width: 0; text-align: left; }
.mini-open img { width: 64px; height: 48px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--raise); }
.mini-meta { display: flex; flex-direction: column; min-width: 0; }
.mini-meta b { font: 500 17px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-meta small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-controls { display: flex; gap: 18px; align-items: center; }
.mini-controls .icon-btn { color: var(--text); }
#mini-play { width: 48px; height: 48px; border-radius: 999px; background: var(--text); color: var(--bg); display: grid; place-items: center; }
#mini-play .ic { width: 18px; height: 18px; }
#mini-play .ic-pause, #mini-play.is-playing .ic-play { display: none; }
#mini-play.is-playing .ic-pause { display: block; }
#mini-time { justify-self: end; font: 400 13px var(--mono); color: var(--muted); }

/* ---- нижняя навигация (телефон) ---- */
#mobile-nav { display: none; }

/* ========================================================= СЕССИЯ */
#player-screen {
  display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; isolation: isolate;
  transition: background-color 1.2s ease, color 1.2s ease;
}
#player-screen.hidden { display: none !important; }
#player-bg { background-image: none; }
#player-bg .glow { position: absolute; inset: 0; transition: opacity 1.4s ease; }
#player-bg .glow-work { background-image: var(--paper), radial-gradient(ellipse 900px 640px at 50% 30%, var(--glow), transparent 72%); }
#player-bg .glow-rest { opacity: 0; background-image: var(--paper), radial-gradient(ellipse 1000px 700px at 50% 34%, var(--cool-glow), transparent 72%); }
#player-screen.is-pomo #player-bg .glow-work { background-image: var(--paper), radial-gradient(ellipse 1100px 760px at 50% 36%, var(--glow-strong), transparent 72%); }
/* перерыв: лампа остывает (если в профиле не выключено) */
html.phase-light #player-screen[data-phase="rest"] {
  --bg: #1C1F21; --card: #272B2D; --card-2: #272B2D; --raise: #353A3C; --line: #30363A; --line-2: #3A4145; --line-3: #485055;
  --text: #EEF0EC; --muted: #A3ABAD; --accent: #9FC0CB; --accent-2: #7FA3AF; --accent-text: #AFCBD4; --on-accent: #1C1F21;
  background-color: #1C1F21;
}
html.phase-light #player-screen[data-phase="rest"] #player-bg .glow-work { opacity: 0; }
html.phase-light #player-screen[data-phase="rest"] #player-bg .glow-rest { opacity: 1; }
#player-screen { background-color: var(--bg); color: var(--text); }

#player-top {
  height: 84px; flex-shrink: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--gutter);
}
#player-back { justify-self: start; }
#player-back .ic { width: 18px; height: 18px; }
.activity-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 999px;
  background: var(--card); font-size: 15px; font-weight: 500; white-space: nowrap; transition: background-color .2s;
}
.activity-pill:hover, .activity-pill[aria-expanded="true"] { background: var(--raise); }
.activity-pill img { width: 36px; height: 27px; border-radius: 8px; object-fit: cover; background: var(--raise); }
.activity-pill img[src=""], .activity-pill img:not([src]) { display: none; }
.activity-pill .ic { width: 16px; height: 16px; color: var(--muted); }
.pt-right { justify-self: end; }

#stage { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr; align-items: center; justify-items: center; padding: 0 var(--gutter) 20px; }
.pomo-side { display: none; }
#timer-zone { display: flex; flex-direction: column; align-items: center; }
.dial { position: relative; display: grid; place-items: center; }
#pomo-ring { display: none; position: absolute; inset: 0; width: 100%; height: 100%; }
.dial-inner { display: flex; flex-direction: column; align-items: center; position: relative; }
.session-scene { width: 208px; height: 156px; border-radius: 20px; object-fit: cover; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); background: var(--raise); transition: width .5s, height .5s, border-radius .5s; }
.phase-chip {
  display: none; margin-top: 20px; gap: 8px; align-items: center; padding: 7px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.phase-chip .ic { width: 15px; height: 15px; }
.phase-chip .ph-rest { display: none; }
#player-screen[data-phase="rest"] .phase-chip .ph-rest { display: block; }
#player-screen[data-phase="rest"] .phase-chip .ph-work { display: none; }
#timer-display {
  margin-top: 36px; font: 400 96px/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  transition: font-size .4s, margin .4s;
}
#timer-display.is-quote { font-size: 44px; line-height: 1.15; letter-spacing: -.01em; text-align: center; max-width: 640px; text-wrap: balance; }
.timer-caption { margin-top: 12px; font-size: 15px; color: var(--muted); min-height: 0; text-align: center; }
.timer-caption:empty { display: none; }
.goal-line { margin-top: 16px; display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }
.goal-line .bar { width: 110px; }
.mode-pill {
  margin-top: 18px; display: inline-flex; gap: 8px; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; color: var(--muted); border: 1px solid transparent; transition: border-color .2s, color .2s;
}
.mode-pill:hover { color: var(--text); border-color: var(--line-2); }
.mode-pill .ic { width: 15px; height: 15px; }
.pomo-legend { display: none; margin-top: 10px; gap: 24px; font-size: 13px; color: var(--muted); white-space: nowrap; align-items: center; flex-wrap: wrap; justify-content: center; }
.pomo-legend > span { display: flex; gap: 8px; align-items: center; }
.pomo-legend i { display: block; border-radius: 2px; }
.lg-work { width: 16px; height: 4px; background: #E2A960; }
.lg-rest { width: 10px; height: 3px; background: #8FB2BE; }
.break-note { display: none; margin-top: 22px; font-size: 16px; line-height: 1.45; color: var(--muted); text-align: center; max-width: 300px; text-wrap: pretty; }

/* помодоро развёрнуто: круги слева, кольцо по центру, цель справа */
#player-screen.is-pomo #stage { grid-template-columns: 260px minmax(0, 1fr) 260px; }
#player-screen.is-pomo .pomo-side { display: flex; flex-direction: column; gap: 14px; justify-self: start; }
#player-screen.is-pomo .pomo-goal { justify-self: end; align-items: flex-end; text-align: right; gap: 10px; }
#player-screen.is-pomo .pomo-goal.is-empty { visibility: hidden; }
.pomo-goal b { font: 500 26px var(--serif); }
.pomo-goal .muted { font-size: 14px; }
.pomo-goal .bar { width: 140px; }
#player-screen.is-pomo .dial { width: min(480px, 58vh); height: min(480px, 58vh); }
#player-screen.is-pomo #pomo-ring { display: block; }
#player-screen.is-pomo .session-scene { width: 96px; height: 72px; border-radius: 14px; box-shadow: none; }
#player-screen.is-pomo .phase-chip { display: inline-flex; }
#player-screen.is-pomo #timer-display { margin-top: 10px; font-size: 112px; letter-spacing: -.03em; }
#player-screen.is-pomo .timer-caption { margin-top: 12px; }
#player-screen.is-pomo .goal-line, #player-screen.is-pomo .mode-pill { display: none; }
#player-screen.is-pomo .pomo-legend { display: flex; }
#player-screen.is-pomo[data-phase="rest"] .break-note { display: block; }
.round-row { display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--muted); white-space: nowrap; }
.round-dot { width: 28px; height: 28px; border-radius: 999px; border: 1.5px solid var(--line-3); display: grid; place-items: center; color: var(--on-accent); flex-shrink: 0; }
.round-dot .ic { width: 14px; height: 14px; }
.round-row.done .round-dot { background: var(--accent-2); border-color: var(--accent-2); }
.round-row.cur { color: var(--text); }
.round-row.cur .round-dot { background: var(--accent); border-color: var(--accent); }
.round-row.cur .round-dot .ic { width: 10px; height: 10px; }

/* ---- нижняя панель трека ---- */
#player-bar {
  margin: 0 auto 40px; width: min(880px, calc(100% - 2 * var(--gutter)));
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 24px; align-items: center;
  padding: 18px 22px; border-radius: var(--r-bar); border: 1px solid var(--line-2); flex-shrink: 0;
  transition: background-color 1.2s, border-color 1.2s;
}
.pb-track { display: flex; gap: 14px; align-items: center; min-width: 0; }
.pb-thumb { display: none; width: 52px; height: 39px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--raise); }
.pb-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
#track-title { font: 500 22px/1.25 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seek-row { display: flex; gap: 10px; align-items: center; font: 400 12px var(--mono); color: var(--muted); }
.seek-row .mono { min-width: 30px; }
#time-cur.is-buffering { animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
#seek { width: 150px; flex: 0 1 150px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; height: 5px; border-radius: 999px; cursor: pointer; margin: 0;
  background: linear-gradient(to right, var(--text) var(--p, 0%), var(--raise) var(--p, 0%));
}
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 999px; background: var(--text); opacity: 0; transition: opacity .2s; }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:focus-visible::-webkit-slider-thumb { opacity: 1; }
input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 999px; background: var(--text); }
.pb-controls { display: flex; gap: 26px; align-items: center; }
.pb-controls .icon-btn { color: var(--text); }
.pb-controls .icon-btn .ic { width: 22px; height: 22px; }
.play-btn { width: 60px; height: 60px; border-radius: 999px; background: var(--text); color: var(--bg); display: grid; place-items: center; transition: transform .15s, background-color 1.2s; }
.play-btn:active { transform: scale(.96); }
.play-btn .ic { width: 22px; height: 22px; }
.play-btn .ic-pause, .play-btn.is-playing .ic-play { display: none; }
.play-btn.is-playing .ic-pause { display: block; }
#player-screen.is-buffering .play-btn { animation: blink 1.2s ease-in-out infinite; }
.pb-actions { justify-self: end; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.pomo-btn {
  display: inline-flex; gap: 8px; align-items: center; height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--raise); font-size: 14px; transition: background-color .25s, color .25s;
}
.pomo-btn .ic { width: 18px; height: 18px; }
.pomo-btn .pomo-x { display: none; width: 13px; height: 13px; }
.pomo-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.pomo-btn[aria-pressed="true"] .pomo-x { display: block; }
.js-fav[aria-pressed="true"] { color: var(--accent-text); }
.sound-wrap { position: relative; }
.popover {
  position: absolute; right: -8px; bottom: calc(100% + 14px); z-index: 40; width: 320px;
  display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 22px; border: 1px solid var(--line-2); box-shadow: var(--shadow);
  white-space: normal; animation: rise .2s ease;
}
.pop-row { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.pop-row input { flex: 1; }
.pop-label { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: -6px; }
.intensity { align-self: flex-start; background: var(--raise); }
.intensity > .active { background: var(--accent); color: var(--on-accent); }
.toggle-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; padding: 4px 0; }
.toggle-line > span:first-child { display: flex; flex-direction: column; }
.toggle-line b { font-weight: 500; font-size: 15px; }
.toggle-line small { font-size: 12px; color: var(--muted); }
.switch-ui { width: 46px; height: 28px; border-radius: 999px; background: var(--raise); position: relative; flex-shrink: 0; transition: background-color .25s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: var(--muted); transition: transform .25s, background-color .25s; }
.toggle-line[aria-pressed="true"] .switch-ui { background: var(--accent); }
.toggle-line[aria-pressed="true"] .switch-ui::after { transform: translateX(18px); background: var(--bg); }
.pop-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pop-actions .chip { height: 36px; padding: 0 12px; font-size: 13px; }
#btn-dislike.is-danger { background: color-mix(in srgb, var(--danger) 30%, var(--raise)); }

/* ---- завершение сессии ---- */
.done-sheet {
  position: fixed; left: 50%; bottom: 132px; transform: translateX(-50%); z-index: 45; width: min(460px, calc(100% - 24px));
  display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: var(--r-bar); border: 1px solid var(--line-2);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .3), var(--shadow); animation: rise .35s ease;
}
.done-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.done-head b { font: 500 22px var(--serif); }
.done-head p { margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.done-head .icon-btn { margin: -6px -6px 0 0; }
.done-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.done-actions button { height: 52px; padding: 0 12px; font-size: 15px; }
.done-note { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.done-note .ic { width: 14px; height: 14px; }

/* ---- меню (длительность, смена режима) ---- */
.menu {
  position: fixed; z-index: 60; min-width: 220px; max-height: 70vh; overflow: auto; display: flex; flex-direction: column; padding: 6px;
  border-radius: 18px; border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: rise .18s ease;
}
.menu button { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: 15px; text-align: left; white-space: nowrap; transition: background-color .15s; }
.menu button:hover, .menu button:focus-visible { background: var(--raise); outline: none; }
.menu button.active { color: var(--accent-text); }
.menu button.active::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 999px; background: var(--accent); }
.menu .menu-more { color: var(--muted); border-top: 1px solid var(--raise); border-radius: 0 0 12px 12px; margin-top: 4px; }
.menu .ic { width: 17px; height: 17px; }
.menu img { width: 40px; height: 30px; border-radius: 8px; object-fit: cover; }
.menu-label { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 14px 4px; }

/* ========================================================= ВСЕ ТРЕКИ (лист по центру) */
#deck-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15, 13, 11, .6); backdrop-filter: blur(3px); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
#side-deck {
  position: fixed; z-index: 55; left: 50%; top: 50%; transform: translate(-50%, -48%) scale(.98); opacity: 0; pointer-events: none;
  width: min(880px, calc(100% - 32px)); height: min(820px, calc(100% - 64px)); display: flex; flex-direction: column;
  border-radius: var(--r-bar); border: 1px solid var(--line-2); box-shadow: var(--shadow); overflow: hidden;
  background-color: var(--card); background-image: var(--paper); transition: opacity .25s ease, transform .3s ease;
}
#side-deck.open { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.deck-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 18px 10px 22px; }
.deck-tabs { background: var(--bg); }
.deck-tabs .ic { width: 17px; height: 17px; }
.deck-page { flex: 1; overflow-y: auto; padding: 8px 22px 28px; display: flex; flex-direction: column; gap: 14px; }
.deck-page > * { flex-shrink: 0; }
.deck-subtabs { display: flex; gap: 18px; border-bottom: 1px solid var(--raise); }
.deck-subtabs button { padding: 10px 0; font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.deck-subtabs button.active { color: var(--text); border-color: var(--accent); }
.play-all { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 16px 16px 20px; border-radius: 20px; background-color: var(--bg); }
.play-all-text { display: flex; flex-direction: column; }
.play-all-text b { font: 500 18px var(--serif); }
.play-all-text small { font-size: 13px; color: var(--muted); }
.list-label { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.track-list { display: flex; flex-direction: column; gap: 4px; }
.track-item {
  display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 8px; border-radius: 16px; cursor: pointer; transition: background-color .15s;
}
.track-item:hover { background: color-mix(in srgb, var(--raise) 55%, transparent); }
.cover { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: linear-gradient(135deg, var(--accent-3), var(--raise)); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.is-missing img { display: none; }
.cover-md { width: 64px; height: 64px; }
.tr-main { flex: 1; min-width: 0; }
.tr-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 8px; align-items: center; }
.tr-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-actions { display: flex; gap: 2px; opacity: .55; transition: opacity .2s; }
.track-item:hover .tr-actions, .track-item:focus-within .tr-actions { opacity: 1; }
.tr-actions .icon-btn { width: 38px; height: 38px; }
.tr-actions .icon-btn .ic { width: 18px; height: 18px; }
.tr-actions [aria-pressed="true"] { color: var(--accent-text); }
.badge-new { font: 500 10px var(--mono); padding: 3px 7px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent-text); text-transform: uppercase; letter-spacing: .04em; }
.search-field { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 18px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line-2); }
.search-field .ic { color: var(--muted); width: 18px; height: 18px; }
.search-field input { flex: 1; border: 0; background: none; outline: none; font-size: 15px; min-width: 0; }
.search-field:focus-within { border-color: var(--accent); }
.mix-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 16px 16px 20px; border-radius: 20px; background: var(--bg); }
.mix-text { display: flex; flex-direction: column; }
.mix-text b { font: 500 18px var(--serif); }
.mix-text small { font-size: 13px; color: var(--muted); }
.view-more { align-self: center; height: 40px; padding: 0 18px; border-radius: 999px; background: var(--raise); font-size: 14px; }
.genre-tabs { align-self: flex-start; background: var(--bg); }
.skeleton { height: 64px; border-radius: 16px; background: linear-gradient(90deg, var(--raise) 0%, color-mix(in srgb, var(--raise) 70%, var(--text)) 50%, var(--raise) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; opacity: .5; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ========================================================= ОКНА */
#modal-wrap, #info-wrap, .streak-panel {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px;
  background: rgba(15, 13, 11, .6); backdrop-filter: blur(3px); animation: fade .2s ease;
}
#modal, #info-modal, .streak-card {
  width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 16px;
  padding: 24px; border-radius: var(--r-bar); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: rise .25s ease;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-title { font: 500 24px var(--serif); }
.mode-tabs { align-self: stretch; background: var(--bg); }
.mode-tabs > button { flex: 1; justify-content: center; padding: 10px 12px; font-size: 14px; }
.mode-tabs .ic { width: 17px; height: 17px; }
.mode-body { display: flex; flex-direction: column; gap: 14px; }
.mode-body h3 { font: 500 19px var(--serif); }
.mode-body > p { font-size: 14px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field-input { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-2); }
.field-input input { flex: 1; border: 0; background: none; outline: none; min-width: 0; font-size: 15px; }
.field-input:focus-within { border-color: var(--accent); }
.unit { font-size: 13px; color: var(--muted); }
.intervals-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.seg-col { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.seg-col button { height: 40px; border-radius: 12px; background: var(--bg); font-size: 14px; transition: background-color .2s, color .2s; }
.seg-col button.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.custom-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.modal-footer button { height: 48px; padding: 0 24px; font-size: 15px; }
#info-body { display: flex; flex-direction: column; gap: 12px; }
#info-body .chips .chip { height: 34px; }
.streak-card { position: relative; width: min(440px, 100%); }
.streak-close { position: absolute; right: 14px; top: 14px; }
.streak-head { display: flex; gap: 10px; align-items: center; color: var(--accent-text); font-weight: 500; }
.streak-big { display: flex; align-items: baseline; gap: 12px; }
.streak-big b { font: 500 64px/1 var(--serif); }
.streak-big span { color: var(--muted); }
.streak-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.streak-grid > div { padding: 14px 16px; border-radius: 16px; background: var(--bg); display: flex; flex-direction: column; gap: 4px; }
.streak-grid small { font-size: 12px; color: var(--muted); }
.streak-grid b { font: 500 20px var(--serif); }
.streak-week { display: flex; flex-direction: column; gap: 8px; }
.streak-week-top { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.streak-week-top b { color: var(--text); font-weight: 500; }
.streak-week .bar > i { background: var(--accent); }
.streak-note { font-size: 13px; color: var(--muted); line-height: 1.5; }

.sound-prompt {
  position: fixed; left: 50%; top: 24px; transform: translateX(-50%); z-index: 85; display: flex; align-items: center; gap: 14px;
  padding: 10px 18px 10px 10px; border-radius: 999px; border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14px; color: var(--muted);
}
.sound-prompt .btn-primary { height: 44px; padding: 0 20px; font-size: 15px; }

/* ========================================================= ВХОД, РЕГИСТРАЦИЯ, ПОДПИСКА
   Те же поверхности, что у остального сайта: бумажная карточка, поля на фоне --bg,
   янтарная главная кнопка. Галочки и поля крупные — формы заполняют с телефона. */
.sheet-wrap {
  position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: 16px;
  background: rgba(15, 13, 11, .62); backdrop-filter: blur(3px); animation: fade .2s ease; overflow-y: auto;
  grid-template-columns: minmax(0, 1fr);
}
.sheet .btn-block { white-space: normal; text-align: center; height: auto; min-height: 52px; padding: 13px 22px; line-height: 1.3; }
.sheet {
  position: relative; width: min(468px, 100%); display: flex; flex-direction: column; gap: 18px; margin: auto;
  padding: 28px; border-radius: var(--r-bar); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: rise .25s ease;
  background-color: var(--card); background-image: var(--paper), radial-gradient(ellipse 520px 280px at 50% -20%, var(--glow), transparent 70%);
}
.sheet-wide { width: min(540px, 100%); }
.sheet-close { position: absolute; right: 12px; top: 12px; }
.sheet-head { display: flex; flex-direction: column; gap: 6px; padding-right: 36px; }
.sheet-head h2 { font: 500 30px/1.15 var(--serif); }
.sheet-head p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.sheet-foot { font-size: 14px; color: var(--muted); text-align: center; }
.sheet-foot .link-btn { font-size: 14px; color: var(--accent-text); text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.sheet-actions button { height: 48px; padding: 0 22px; font-size: 15px; }

/* кнопки провайдеров */
.prov-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prov-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 16px; border-radius: 999px;
  background: var(--raise); color: var(--text); font-size: 15px; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent; transition: background-color .2s, border-color .2s, transform .15s;
}
.prov-btn:hover { background: color-mix(in srgb, var(--raise) 82%, var(--text)); }
.prov-btn:active { transform: scale(.98); }
.prov-btn.is-wide { grid-column: 1 / -1; }
.prov-btn.is-suggested { border-color: var(--accent); }
.prov-logo { width: 22px; height: 22px; flex-shrink: 0; display: block; }
.prov-note { grid-column: 1 / -1; font-size: 12px; color: var(--dim); text-align: center; margin-top: -2px; }
.or-line { display: flex; align-items: center; gap: 12px; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* поля формы */
.form { display: flex; flex-direction: column; gap: 14px; }
.form .field-input { height: 50px; }
.form .field-input > .ic { width: 18px; height: 18px; color: var(--dim); }
.form .field-input:focus-within > .ic { color: var(--accent-text); }
.field-input.is-bad { border-color: var(--danger); }
.field-input input::placeholder { color: var(--dim); }
.field-input input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 40px var(--bg) inset; caret-color: var(--text); }
.field-input input[readonly] { color: var(--muted); }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-row .link-btn { font-size: 13px; }
.field-msg { font-size: 13px; line-height: 1.45; color: var(--muted); }
.field-msg:empty { display: none; }
.field-msg.is-bad { color: var(--danger); }
.field-msg .link-btn { font-size: 13px; color: var(--accent-text); }
.pw-eye { width: 36px; height: 36px; margin-right: -8px; border-radius: 999px; display: grid; place-items: center; color: var(--dim); }
.pw-eye:hover { color: var(--text); }
.pw-eye .ic { width: 19px; height: 19px; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.pw-meter i { height: 4px; border-radius: 999px; background: var(--raise); transition: background-color .25s; }
.pw-meter[data-score="1"] i:nth-child(-n+1) { background: var(--danger); }
.pw-meter[data-score="2"] i:nth-child(-n+2) { background: var(--accent-2); }
.pw-meter[data-score="3"] i:nth-child(-n+3) { background: var(--accent); }
.pw-meter[data-score="4"] i { background: var(--accent); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* галочки согласия */
.check-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 14px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.check-row b { color: var(--text); font-weight: 500; }
.check-row a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.check-row.is-bad .check { border-color: var(--danger); }
.check {
  appearance: none; -webkit-appearance: none; margin: 0; width: 22px; height: 22px; border-radius: 7px; position: relative; cursor: pointer;
  background: var(--bg); border: 1.5px solid var(--line-3); transition: background-color .2s, border-color .2s; flex-shrink: 0;
}
.check:checked { background: var(--accent); border-color: var(--accent); }
.check:checked::after {
  content: ""; position: absolute; left: 6.5px; top: 2.5px; width: 6px; height: 11px;
  border: solid var(--on-accent); border-width: 0 2.2px 2.2px 0; transform: rotate(45deg);
}
.form-error { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; line-height: 1.45;
  color: var(--text); background: color-mix(in srgb, var(--danger) 14%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.form-error .ic { width: 18px; height: 18px; color: var(--danger); margin-top: 1px; }
.form-ok { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: color-mix(in srgb, var(--raise) 55%, transparent); font-size: 14px; line-height: 1.55; color: var(--muted); }
.form-ok .ic { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.form-ok b { color: var(--text); font-weight: 500; }
.btn-block { width: 100%; }
.btn-primary[disabled], .btn-soft[disabled] { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.btn-primary.is-busy, .btn-soft.is-busy { pointer-events: none; opacity: .75; }
.fine { font-size: 12px; line-height: 1.5; color: var(--dim); text-align: center; }
.fine a, .fine .link-btn { color: var(--muted); font-size: 12px; }

/* аккаунт в профиле */
.account-cta { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 18px; border-bottom: 1px solid var(--raise); }
.account-cta p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.account-cta .btn-primary { height: 46px; font-size: 15px; align-self: flex-start; padding: 0 22px; }
.verify-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--raise); font-size: 13px; line-height: 1.5; color: var(--muted); }
.verify-note .ic { width: 18px; height: 18px; color: var(--accent-text); margin-top: 1px; }
.verify-note .link-btn { color: var(--accent-text); font-size: 13px; }
.topbar-end { justify-self: end; display: flex; align-items: center; gap: 4px; }
.topbar-login { font-size: 14px; color: var(--text); }
.topbar-login .ic { width: 18px; height: 18px; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font: 500 11px var(--mono);
  letter-spacing: .04em; text-transform: uppercase; background: var(--raise); color: var(--muted); white-space: nowrap; }
.tag .ic { width: 14px; height: 14px; }
.tag-ok { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); }
.tag-warn { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.acct-block { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 20px; border: 1px solid var(--line); background-color: var(--card); background-image: var(--paper); }
.acct-block h3 { font: 500 19px var(--serif); }
.acct-block > p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.acct-block .btn-soft, .acct-block .btn-primary { height: 44px; font-size: 15px; padding: 0 20px; align-self: flex-start; }
.acct-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-primary.danger-btn { background: var(--danger); color: #211F1C; }
.kv-label { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 10px; }
.kv-label .ic { width: 20px; height: 20px; color: var(--muted); }
.danger-link { color: var(--danger) !important; text-decoration-color: color-mix(in srgb, var(--danger) 40%, transparent) !important; }

/* ---------- тарифы ---------- */
.profile-subpage.is-wide { max-width: 940px; }
.sub-hero { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.sub-hero h2 { font: 500 40px/1.1 var(--serif); margin: 0; max-width: 28ch; }
.sub-hero .lead { color: var(--muted); max-width: 62ch; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 26px; border-radius: var(--r-card);
  border: 1px solid var(--line-2); background-color: var(--card); background-image: var(--paper);
}
.plan.is-main { border-color: color-mix(in srgb, var(--accent) 70%, var(--line-2));
  background-image: var(--paper), radial-gradient(ellipse 420px 240px at 20% -10%, var(--glow), transparent 72%); }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.plan-name { font: 500 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.plan-flag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--accent); color: var(--on-accent); white-space: nowrap; }
.plan-flag.is-soft { background: var(--raise); color: var(--text); font-weight: 500; }
.plan-flag .ic { width: 15px; height: 15px; }
.plan-cost { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan-cost b { font: 500 52px/1 var(--serif); letter-spacing: -.02em; }
.plan-cost span { font-size: 15px; color: var(--muted); }
.plan-tagline { font-size: 15px; color: var(--text); margin-top: -6px; }
.plan-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--muted); }
.plan-points li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; line-height: 1.45; }
.plan-points .ic { width: 18px; height: 18px; color: var(--accent-text); margin-top: 1px; }
.plan .btn-primary, .plan .btn-soft { margin-top: auto; width: 100%; height: 54px; }
.plan-after { font-size: 12px; color: var(--dim); text-align: center; margin-top: -6px; }
.incl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.incl > div { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: color-mix(in srgb, var(--raise) 40%, transparent); font-size: 14px; line-height: 1.45; color: var(--muted); }
.incl .ic { width: 22px; height: 22px; color: var(--accent-text); }
.section-label { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: how; }
.how > div { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 18px 58px; border-radius: 18px; border: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--muted); }
.how > div::before { counter-increment: how; content: counter(how); position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 999px;
  display: grid; place-items: center; font: 500 15px var(--serif); background: var(--raise); color: var(--accent-text); }
.how b { color: var(--text); font-weight: 500; }
.promise { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.promise > div { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line-2); font-size: 13px; line-height: 1.5; color: var(--muted); }
.promise .ic { width: 20px; height: 20px; color: var(--accent-text); margin-top: 1px; }
.promise b { display: block; margin-bottom: 2px; font-size: 15px; font-weight: 500; color: var(--text); }
.try-first { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--muted); margin-top: -4px; }
.try-first .ic { width: 18px; height: 18px; color: var(--accent-text); margin-top: 1px; }
.bottom-note { font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 80ch; padding-top: 4px; }
.pay-safe { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 18px; background: color-mix(in srgb, var(--raise) 40%, transparent); font-size: 14px; line-height: 1.5; color: var(--muted); }
.pay-safe > .ic { width: 26px; height: 26px; color: var(--accent-text); }
.pay-safe b { color: var(--text); font-weight: 500; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.legal-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-3); }
.legal-links a:hover { color: var(--text); }
.faq { display: flex; flex-direction: column; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; padding: 16px 0; font-size: 15px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { width: 18px; height: 18px; color: var(--dim); transition: transform .2s; }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details p { padding: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 68ch; }

/* статус подписки */
.sub-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: var(--r-card); border: 1px solid var(--line-2);
  background-color: var(--card); background-image: var(--paper), radial-gradient(ellipse 480px 260px at 0% -20%, var(--glow), transparent 70%); }
.sub-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.sub-card-top h3 { font: 500 26px/1.2 var(--serif); }
.sub-card-top p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.sub-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sub-facts > div { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--bg); }
.sub-facts small { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.sub-facts b { font-weight: 500; font-size: 15px; }
.sub-card .acct-actions .btn-soft, .sub-card .acct-actions .btn-primary { height: 46px; font-size: 15px; padding: 0 22px; }
.sub-card .acct-actions .ic { width: 18px; height: 18px; }
.sub-note { font-size: 13px; line-height: 1.55; color: var(--muted); max-width: 72ch; }
.pay-list { display: flex; flex-direction: column; }
.pay-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pay-list span { color: var(--muted); }

/* оформление */
.co-summary { display: flex; flex-direction: column; padding: 4px 18px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); }
.co-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.co-row:last-child { border-bottom: 0; }
.co-row b { color: var(--text); font-weight: 500; text-align: right; }
.co-row.is-total b { font: 500 22px var(--serif); }
.co-plan { display: flex; align-items: center; gap: 12px; }
.co-plan .lamp-dot { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); flex-shrink: 0; }
.co-plan .lamp-dot .ic { width: 22px; height: 22px; }
.co-plan b { display: block; font: 500 20px var(--serif); text-align: left; }
.co-plan small { font-size: 13px; color: var(--muted); }
.co-checks { display: flex; flex-direction: column; gap: 14px; }
.co-methods { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.co-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.co-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); cursor: pointer;
  font-size: 13px; line-height: 1.4; color: var(--muted); transition: border-color .2s, background-color .2s; }
.co-opt b { display: block; color: var(--text); font-weight: 500; font-size: 14px; margin-bottom: 2px; }
.co-opt:has(.co-radio:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.co-radio { appearance: none; -webkit-appearance: none; margin: 2px 0 0; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  background: var(--bg); border: 1.5px solid var(--line-3); transition: border .2s; }
.co-radio:checked { border: 5.5px solid var(--accent); }
.co-radio:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 420px) { .co-pay { grid-template-columns: 1fr; } }
.co-methods span { height: 24px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line-2); font: 500 11px/22px var(--sans); color: var(--muted); }

@media (max-width: 760px) {
  .sheet-wrap { padding: 0; place-items: end center; }
  .sheet { width: 100%; padding: 24px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; margin: auto 0 0; }
  .sheet-head h2 { font-size: 26px; }
  .sub-hero h2 { font-size: 30px; }
  .plan-grid, .how, .promise { grid-template-columns: minmax(0, 1fr); }
  .incl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan { padding: 22px 18px; }
  .plan-cost b { font-size: 44px; }
  .sub-facts { grid-template-columns: minmax(0, 1fr); }
  .topbar-login span { display: none; }
  .topbar-login { width: 44px; height: 44px; justify-content: center; padding: 0; }
}

/* ========================================================= ПЛАНШЕТ */
@media (max-width: 1180px) {
  :root { --gutter: 32px; }
  .work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .mode-card.is-selected {
    grid-column: 1 / -1; order: -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr; column-gap: 24px; row-gap: 16px; align-items: start;
  }
  .mode-card.is-selected .mc-scene { grid-row: 1 / span 2; }
  .mode-card.is-selected .mc-text { padding-top: 12px; }
  .mode-card.is-selected .mc-actions { align-self: end; flex-wrap: wrap; }
  .rest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .pg-side { padding-top: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .pg-side .account-card { grid-column: 1 / -1; }
  .wc-area, .week-days { gap: 20px; }
  #recent-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #player-screen.is-pomo #stage { grid-template-columns: minmax(0, 1fr); }
  #player-screen.is-pomo .pomo-side { display: none; }
  .pb-actions .pomo-btn span { display: none; }
  #player-bar { grid-template-columns: minmax(0, 1fr) auto auto; }
}

/* ========================================================= ТЕЛЕФОН */
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 15px; }
  .hide-sm { display: none !important; }
  .show-sm { display: inline-grid !important; }

  #home { padding-bottom: 150px; }
  #topbar { height: 64px; grid-template-columns: 1fr auto; padding: 0 12px 0 20px; }
  #main-nav { display: none; }
  .topbar-search { width: 44px; height: 44px; justify-content: center; padding: 0; color: var(--text); }
  .topbar-search .ic { width: 21px; height: 21px; }
  .view { padding: 6px 16px 0; gap: 18px; }
  .view-head { padding: 0 4px; gap: 4px; }
  .view-head h1, .pg-main h1 { font-size: 32px; }
  .view-head h1.head-task { font-size: 24px; }
  .lead { font-size: 15px; }

  /* выбранный режим крупно, остальные — плитками 2×2 */
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mode-card { padding: 8px 8px 14px; gap: 10px; border-radius: 20px; }
  .mode-card .mc-scene { border-radius: 14px; }
  .mode-card .mc-text { padding: 0 4px; }
  .mode-card .bento-title { font-size: 16px; }
  .mode-card .mc-desc { min-height: 0; }
  .mode-card:not(.is-selected) .mc-desc, .mode-card:not(.is-selected) .mc-count { display: none; }
  .mode-card.is-selected { display: flex; padding: 9px 9px 15px; gap: 14px; border-radius: var(--r-card); }
  .mode-card.is-selected .mc-scene { height: 178px; aspect-ratio: auto; }
  .mode-card.is-selected .mc-text { padding: 0 6px; }
  .mode-card.is-selected .bento-title { font-size: 24px; }
  .mode-card.is-selected .mc-actions { padding: 0 6px; flex-wrap: nowrap; gap: 8px; }
  .dur-btn { padding: 0 16px; font-size: 14px; }
  .mc-actions .btn-primary { padding: 0 22px; }
  .rest-strip { padding: 14px; flex-direction: column; align-items: stretch; gap: 12px; }
  .rs-text { flex-direction: column; gap: 2px; }
  .rs-thumbs img { width: 56px; height: 42px; }
  .rs-thumbs .round-btn { margin-left: auto; width: 42px; height: 42px; }
  #recent-tiles { grid-template-columns: minmax(0, 1fr); }

  /* отдых: строки */
  .view-head-row { flex-direction: column; align-items: stretch; gap: 16px; }
  .seg-state { display: grid; grid-template-columns: 1.3fr .8fr 1fr; padding: 4px; }
  .seg-state > button { justify-content: center; padding: 11px 4px; font-size: 14px; }
  .rest-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .rest-card { flex-direction: row; align-items: center; gap: 14px; padding: 8px 14px 8px 8px; border-radius: 20px; }
  .rest-card .mc-scene { width: 88px; height: 66px; aspect-ratio: auto; border-radius: 14px; flex-shrink: 0; }
  .rest-card .mc-text { flex: 1; min-width: 0; padding: 0; gap: 2px; }
  .rest-card .mc-text .bento-title { font-size: 18px; }
  .rest-card .mc-desc { font-size: 13px; line-height: 1.35; min-height: 0; }
  .rest-card .mc-count { display: none; }
  .rc-start { display: none; }
  .rc-round { display: grid; width: 40px; height: 40px; }

  /* профиль */
  .stat-row { gap: 8px; }
  .stat { padding: 14px; border-radius: 20px; gap: 4px; }
  .stat span { font-size: 12px; }
  .stat b { font-size: 20px; }
  .chart { padding: 16px; border-radius: 20px; }
  .wc-area { height: 130px; gap: 14px; padding: 0; }
  .week-days { gap: 14px; padding: 0; font-size: 12px; }
  .wc-val { display: none; }
  .pg-side { display: flex; }
  .goal-card { padding: 16px; border-radius: 20px; gap: 14px; }
  .goal-chips { display: grid; grid-template-columns: repeat(4, 1fr) 1.6fr; gap: 6px; }
  .goal-chips button { padding: 0; height: 44px; font-size: 14px; }
  .settings-card, .account-card { padding: 4px 16px; border-radius: 20px; }
  .profile-subpage h2 { font-size: 28px; }

  .home-foot { margin: 36px 16px 0; }

  #mobile-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px 0 calc(14px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  }
  #mobile-nav button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; color: var(--muted); }
  #mobile-nav .ic { width: 22px; height: 22px; }
  #mobile-nav button.active { color: var(--text); }

  #mini-player {
    bottom: calc(76px + env(safe-area-inset-bottom)); width: calc(100% - 24px); grid-template-columns: minmax(0, 1fr) auto; gap: 8px;
    padding: 8px 10px 8px 8px; border-radius: 20px;
  }
  .mini-open img { width: 52px; height: 39px; border-radius: 10px; }
  .mini-meta b { font-size: 15px; }
  .mini-controls { gap: 2px; }
  #mini-prev, #mini-time { display: none; }
  #mini-play { width: 44px; height: 44px; }

  /* сессия на телефоне */
  #player-top { height: 60px; padding: 0 12px; grid-template-columns: 88px 1fr 88px; justify-items: center; }
  #player-back { justify-self: start; width: 44px; height: 44px; justify-content: center; padding: 0; }
  #player-back .ic { width: 22px; height: 22px; }
  .activity-pill { padding: 9px 16px; font-size: 14px; max-width: 100%; }
  .activity-pill img { display: none; }
  .activity-pill span { overflow: hidden; text-overflow: ellipsis; }
  #stage { padding: 0 20px; }
  .session-scene { width: 168px; height: 126px; border-radius: 18px; }
  #timer-display { margin-top: 32px; font-size: 80px; }
  #timer-display.is-quote { font-size: 32px; }
  .goal-line { margin-top: 14px; font-size: 13px; }
  .goal-line .bar { width: 70px; height: 5px; }
  .mode-pill { margin-top: 12px; }

  #player-bar {
    width: auto; margin: 0 12px calc(16px + env(safe-area-inset-bottom)); padding: 18px; gap: 14px;
    grid-template-columns: minmax(0, 1fr); border-radius: var(--r-bar);
  }
  #track-title { font-size: 20px; }
  #seek { flex: 1 1 auto; width: auto; }
  .seek-row { font-size: 11px; }
  .pb-controls { justify-content: space-between; gap: 0; padding: 0 4px; }
  .pb-controls .icon-btn { width: 44px; height: 44px; }
  .pb-controls .js-fav, .pb-controls .js-info { color: var(--muted); }
  .pb-controls .js-pomo { display: none !important; }
  .pb-actions { justify-self: stretch; }
  .pomo-btn { flex: 1; justify-content: center; height: 48px; }
  .pb-actions .pomo-btn span { display: inline; }
  .popover { position: fixed; left: 12px; right: 12px; bottom: 170px; width: auto; }

  /* помодоро на телефоне: кольцо, компактная панель */
  #player-screen.is-pomo .dial { width: min(310px, 80vw); height: min(310px, 80vw); }
  #player-screen.is-pomo .session-scene { display: none; }
  #player-screen.is-pomo .phase-chip { margin-top: 0; padding: 6px 12px; }
  #player-screen.is-pomo #timer-display { font-size: 80px; margin-top: 10px; }
  #player-screen.is-pomo .timer-caption { font-size: 14px; margin-top: 10px; }
  #player-screen.is-pomo .pomo-legend { display: none; }
  #player-screen.is-pomo #player-bar { padding: 16px 18px; gap: 12px; }
  #player-screen.is-pomo .pb-thumb { display: block; }
  #player-screen.is-pomo #track-title { font-size: 17px; }
  #player-screen.is-pomo #seek { display: none; }
  #player-screen.is-pomo .seek-row { gap: 4px; }
  #player-screen.is-pomo #time-cur::after { content: " /"; }
  #player-screen.is-pomo .pb-controls .js-info { display: none !important; }
  #player-screen.is-pomo .pb-controls .js-pomo { display: inline-grid !important; background: var(--accent); color: var(--on-accent); }
  #player-screen.is-pomo .pb-actions { display: none; }
  .play-btn { width: 60px; height: 60px; }
  #player-screen.is-pomo .play-btn { width: 56px; height: 56px; }

  #toast-wrap, body:has(#player-screen:not(.hidden)) #toast-wrap, body:has(#mini-player:not(.hidden)) #toast-wrap { bottom: auto; top: calc(12px + env(safe-area-inset-top)); }
  .done-sheet { bottom: 12px; }

  #side-deck { width: 100%; height: calc(100% - 24px); top: auto; bottom: 0; left: 0; transform: translateY(24px); border-radius: var(--r-bar) var(--r-bar) 0 0; }
  #side-deck.open { transform: none; }
  .deck-page { padding: 6px 16px 28px; }
  .deck-head { padding: 14px 12px 8px 16px; }
  .deck-tabs > button { padding: 9px 14px; }
  .tr-actions { opacity: 1; }
  .tr-actions [data-queue] { display: none; }

  .intervals-grid { grid-template-columns: 1fr 1fr; }
  .intervals-grid > div:last-child { grid-column: 1 / -1; }
  #long-presets { flex-direction: row; }
  #long-presets button { flex: 1; }
  .mode-tabs > button span { font-size: 13px; }
  #modal, #info-modal, .streak-card { padding: 20px; }
}

@media (max-width: 380px) {
  .mode-card.is-selected .mc-actions { flex-wrap: wrap; }
  .mode-card.is-selected .dur-btn { flex-basis: 100%; }
}

@media (max-height: 760px) and (min-width: 761px) {
  #player-screen.is-pomo #timer-display { font-size: 88px; }
  .session-scene { width: 168px; height: 126px; }
  #timer-display { margin-top: 24px; font-size: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ========================================================= ЗВУКИ (sounds.js) */
.pt-actions { display: flex; align-items: center; gap: 2px; }
.snd-pt { position: relative; }
.snd-badge {
  position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font: 600 11px/17px var(--sans); text-align: center;
}
.snd-dock { display: inline-flex; align-items: center; gap: 2px; margin-right: 6px; padding: 3px 12px 3px 3px; border-radius: 999px; background: var(--card); }
.snd-dock-play { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: var(--raise); color: var(--text); }
.snd-dock.is-playing .snd-dock-play { background: var(--accent); color: var(--on-accent); }
.snd-dock-play .ic { width: 16px; height: 16px; }
.snd-dock-open { font-size: 14px; color: var(--muted); padding: 6px 2px 6px 6px; white-space: nowrap; }
.snd-dock-open:hover { color: var(--text); }

#view-sounds-body { display: flex; flex-direction: column; gap: 22px; }
.snd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.snd-play { width: 52px; height: 52px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); transition: transform .15s, filter .2s; }
.snd-play:hover { filter: brightness(1.06); }
.snd-play:active { transform: scale(.96); }
.snd-play .ic { width: 22px; height: 22px; }
.snd-master { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); margin-right: 6px; }
.snd-master .ic { width: 20px; height: 20px; }
.snd-master input, .snd-vol { accent-color: var(--accent); }
.snd-master input { width: 130px; }
.snd-timer { flex-wrap: wrap; white-space: normal; align-self: flex-start; }
.snd-timer > .active { background: var(--raise); color: var(--text); }
.snd-left { align-self: center; padding: 0 10px; font: 500 13px var(--mono); color: var(--accent-text); }
.snd-left:empty { display: none; }
.snd-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.snd-presets .eyebrow { margin-right: 6px; }
.snd-mine { display: contents; }
.snd-ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.snd-x { display: inline-grid; place-items: center; margin-right: -6px; opacity: .55; }
.snd-x:hover { opacity: 1; }
.snd-x .ic { width: 14px; height: 14px; }
.snd-group { display: flex; flex-direction: column; gap: 12px; }
.snd-group h2 { font-weight: 500; }
.snd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 12px; }
.snd-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 136px;
  padding: 22px 14px 14px; border-radius: 22px; background-color: var(--card); background-image: var(--paper);
  border: 1px solid var(--line); cursor: pointer; user-select: none; text-align: center;
  transition: border-color .2s, background-color .2s, transform .12s;
}
.snd-tile:hover { border-color: var(--line-3); }
.snd-tile:active { transform: scale(.98); }
.snd-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.snd-ic { width: 38px; height: 38px; color: var(--dim); transition: color .2s; }
.snd-nm { font-size: 14px; color: var(--muted); line-height: 1.25; }
.snd-vol { width: 100%; margin-top: auto; visibility: hidden; }
.snd-tile.on { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background-color: color-mix(in srgb, var(--accent) 9%, var(--card)); }
.snd-tile.on .snd-ic { color: var(--accent); }
.snd-tile.on .snd-nm { color: var(--text); }
.snd-tile.on .snd-vol { visibility: visible; }
.snd-tile.loading .snd-ic { animation: snd-pulse 1s ease-in-out infinite; }
@keyframes snd-pulse { 50% { opacity: .35; } }
.snd-credits { font-size: 13px; color: var(--dim); max-width: 900px; padding-bottom: 8px; }
.snd-credits summary { cursor: pointer; color: var(--muted); }
.snd-credits a { color: var(--muted); }
.snd-credits ul { columns: 2; padding-left: 18px; }
.snd-compact { display: flex; flex-direction: column; gap: 14px; }
.snd-compact .snd-master input { width: 100px; }
.snd-grid-sm { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.snd-grid-sm .snd-tile { min-height: 104px; padding: 14px 8px 10px; border-radius: 16px; gap: 6px; }
.snd-grid-sm .snd-ic { width: 28px; height: 28px; }
.snd-grid-sm .snd-nm { font-size: 12.5px; }
@media (max-width: 760px) {
  .snd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .snd-tile { min-height: 116px; padding: 16px 8px 10px; border-radius: 18px; }
  .snd-ic { width: 30px; height: 30px; }
  .snd-nm { font-size: 13px; }
  .snd-master input { width: 96px; }
  .snd-credits ul { columns: 1; }
  .snd-dock { padding-right: 8px; margin-right: 2px; }
}
.snd-vol { background: linear-gradient(to right, var(--accent) var(--p, 50%), var(--raise) var(--p, 50%)); }
.snd-vol::-webkit-slider-thumb { opacity: 1 !important; background: var(--text); }
.snd-master input { background: linear-gradient(to right, var(--text) var(--p, 80%), var(--raise) var(--p, 80%)); }

/* готовые миксы: номер варианта и строка «Сейчас: …» */
.js-snd-preset.active { background: color-mix(in srgb, var(--accent) 22%, var(--card)); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.snd-pv { color: var(--accent-text); font-variant-numeric: tabular-nums; }
.snd-now { margin: -12px 0 0; font-size: 13.5px; color: var(--muted); min-height: 1em; }
.snd-now:empty { display: none; }
.snd-compact .snd-now { margin: -6px 0 0; }

/* мои миксы: папки-вкладки и карточки */
.snd-mine-sec { display: flex; flex-direction: column; gap: 12px; }
.snd-mine-head h2 { font-weight: 500; }
.snd-mine-head h2 span { color: var(--dim); margin-left: 4px; }
.snd-folders { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.snd-folders::-webkit-scrollbar { display: none; }
.snd-folders:empty { display: none; }
.snd-folder {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px;
  font-size: 14px; color: var(--muted); background: var(--card); border: 1px solid var(--line); white-space: nowrap;
}
.snd-folder:hover { color: var(--text); border-color: var(--line-3); }
.snd-folder small { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.snd-folder.active { background: var(--raise); color: var(--text); border-color: var(--line-3); }
.snd-folder.active small { color: var(--accent-text); }
.snd-folder .ic { width: 15px; height: 15px; }
.snd-folder-new, .snd-folder-edit { background: transparent; border-style: dashed; }
.snd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.snd-card {
  position: relative; display: grid; grid-template-rows: auto auto 1fr; gap: 4px; min-height: 104px;
  padding: 14px 44px 14px 16px; border-radius: 18px; background-color: var(--card); background-image: var(--paper);
  border: 1px solid var(--line); cursor: pointer; text-align: left; transition: border-color .2s, background-color .2s, transform .12s;
}
.snd-card:hover { border-color: var(--line-3); }
.snd-card:active { transform: scale(.99); }
.snd-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.snd-card.active { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background-color: color-mix(in srgb, var(--accent) 9%, var(--card)); }
.snd-card-icons { display: flex; align-items: center; gap: 6px; color: var(--dim); margin-bottom: 4px; }
.snd-card-icons .ic { width: 20px; height: 20px; }
.snd-card.active .snd-card-icons { color: var(--accent); }
.snd-card-more { font-size: 12px; color: var(--dim); }
/* цвет точки-иконок — по состоянию микса, чтобы папки «Сон» и «Работа» различались с одного взгляда */
.snd-card[data-state="relax"] .snd-card-icons { color: #9FC0CB; }
.snd-card[data-state="sleep"] .snd-card-icons { color: #A9ABD8; }
.snd-card[data-state="meditate"] .snd-card-icons { color: #9CC3A8; }
.snd-card[data-state="focus"] .snd-card-icons { color: #E2A960; }
.snd-card:not(.active) .snd-card-icons { opacity: .75; }
.snd-card-name { font-size: 15px; font-weight: 500; color: var(--text); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.snd-card-meta { font-size: 12.5px; color: var(--dim); align-self: end; }
.snd-card-menu { position: absolute; top: 8px; right: 6px; width: 34px; height: 34px; color: var(--dim); }
.snd-card-menu .ic { width: 20px; height: 20px; }
.snd-empty { margin: 0; font-size: 14px; color: var(--dim); max-width: 560px; grid-column: 1 / -1; }
.snd-more { align-self: flex-start; }
.snd-mine-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.snd-mine-strip:empty { display: none; }
.snd-mine-strip .eyebrow { margin-right: 4px; flex-shrink: 0; }
.snd-mine-strip .chip { flex-shrink: 0; }
.snd-mine-strip .chip.active { background: var(--raise); color: var(--text); }
.snd-edit-folders { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.snd-edit-folders .chip.active { background: var(--accent); color: var(--on-accent); }
.snd-edit-folders .chip .ic, .snd-ghost .ic { width: 15px; height: 15px; }
.snd-edit-actions { flex-wrap: wrap; }
.snd-danger { color: var(--danger); }
.snd-danger:hover { background: color-mix(in srgb, var(--danger) 14%, var(--raise)); }
@media (max-width: 760px) {
  .snd-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .snd-card { min-height: 96px; padding: 12px 36px 12px 12px; border-radius: 16px; }
  .snd-card-name { font-size: 14px; }
  .snd-card-menu { top: 4px; right: 2px; }
}

/* сессия только со звуками: в панели плеера нет трека — прячем перемотку и «следующий» */
.snd-add-music { display: none; }
#player-screen.is-sounds-only .snd-add-music { display: inline-block; align-self: flex-start; margin-top: 4px; color: var(--accent-text); text-decoration: none; font-size: 13.5px; }
#player-screen.is-sounds-only .seek-row,
#player-screen.is-sounds-only #btn-prev, #player-screen.is-sounds-only #btn-next,
#player-screen.is-sounds-only .js-fav, #player-screen.is-sounds-only .js-info { display: none; }

/* подсказки: data-tip у кнопок «Оживить», «Ссылка», таймер… — только там, где есть наведение */
@media (hover: hover) {
  :where([data-tip]) { position: relative; }       /* нулевая специфичность: absolute у кнопки меню карточки не перебиваем */
  [data-tip]::after {
    content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 60;
    width: max-content; max-width: 240px; padding: 7px 10px; border-radius: 10px;
    background: var(--text); color: var(--bg); font: 400 12.5px/1.35 var(--sans); text-align: left; white-space: normal;
    letter-spacing: 0; text-transform: none; pointer-events: none;
    opacity: 0; transform: translate(-50%, 4px); transition: opacity .15s, transform .15s; transition-delay: 0s;
  }
  [data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); transition-delay: .35s; }
  [data-tip-pos="start"]::after { left: 0; transform: translate(0, 4px); }
  [data-tip-pos="start"]:hover::after, [data-tip-pos="start"]:focus-visible::after { transform: translate(0, 0); }
  .snd-card-menu[data-tip]::after { left: auto; right: 0; transform: translate(0, 4px); }
  .snd-card-menu[data-tip]:hover::after { transform: translate(0, 0); }
}

/* ========================================================= ЗАДАЧИ НА ПОМОДОРО (tasks.js)
   Строка-чип под таймером (телефон, планшет и любая сессия «Работы» без помодоро), у широкого экрана с помодоро —
   строки задач у кругов в левой колонке, дуга-«печать» внутри кольца, лист со списком (Account.sheet).
   Цвета только из токенов: в перерыв --accent сам становится холодным (html.phase-light … [data-phase="rest"]). */

/* ---- галочка: круглая, 44 px для пальца; хранит состояние в aria-checked / .is-on ---- */
.task-check { position: relative; flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; color: var(--on-accent); }
.task-check::before {
  content: ""; width: 26px; height: 26px; border-radius: 999px; border: 1.5px solid var(--line-3); background: transparent;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.task-check .ic { position: absolute; width: 15px; height: 15px; opacity: 0; transform: scale(.4); transition: opacity .15s, transform .2s; }
.task-check:hover::before { border-color: var(--accent); }
.task-check:hover .ic { opacity: .45; transform: none; color: var(--accent-text); }
.task-check:active::before { transform: scale(.92); }
.task-check.is-on::before, .task-check[aria-checked="true"]::before { background: var(--accent); border-color: var(--accent); }
.task-check.is-on .ic, .task-check[aria-checked="true"] .ic { opacity: 1; transform: none; color: var(--on-accent); }
.task-check::after { content: ""; position: absolute; width: 26px; height: 26px; border-radius: 999px; border: 2px solid var(--accent); opacity: 0; pointer-events: none; }
.task-check.is-pop::after { animation: task-ripple .55s ease-out; }
.task-check.is-pop .ic { animation: task-pop .42s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes task-pop { from { opacity: 0; transform: scale(.35); } }
@keyframes task-ripple { from { opacity: .7; transform: scale(.9); } to { opacity: 0; transform: scale(2); } }

/* ---- чип под таймером ---- */
.task-chip { display: none; width: min(360px, calc(100vw - 32px)); margin-top: 16px; }
html[data-state="focus"] #player-screen .task-chip { display: block; }
.task-row {
  display: flex; align-items: center; gap: 2px; min-height: 52px; padding: 4px 14px 4px 4px; border-radius: 999px;
  background-color: var(--card); background-image: var(--paper); border: 1px solid var(--line-2);
  transition: border-color .2s, box-shadow .6s;
}
.task-row:hover { border-color: var(--line-3); }
.task-chip-ic { display: grid; place-items: center; width: 44px; height: 44px; color: var(--muted); flex: 0 0 auto; }
.task-chip-ic .ic { width: 20px; height: 20px; }
.task-chip[data-state="all-done"] .task-chip-ic { color: var(--accent-text); }
.task-chip-main { flex: 1; min-width: 0; display: flex; align-items: center; min-height: 44px; padding: 0 8px 0 2px; text-align: left; font-size: 15px; font-weight: 500; }
.task-chip-text { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-chip[data-state="empty"] .task-chip-text, .task-chip[data-state="all-done"] .task-chip-text { color: var(--muted); font-weight: 400; }
.task-chip[data-state="all-done"] .task-row { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.task-count { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; font: 500 13px var(--mono); color: var(--accent-text); }
.task-count:empty { display: none; }
.task-count .ic { width: 14px; height: 14px; }
.task-count.is-bump { animation: task-bump .4s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes task-bump { 40% { transform: scale(1.35); } }
.task-chip.is-swap .task-chip-text { animation: task-swap .3s ease; }
@keyframes task-swap { from { opacity: 0; transform: translateY(6px); } }
/* только что отмеченная: линия зачёркивания «прорисовывается», потом чип переходит к следующей задаче */
.task-chip.is-held .task-chip-text {
  color: var(--muted); background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 100% 1.5px;
  animation: task-strike .35s ease-out;
}
@keyframes task-strike { from { background-size: 0 1.5px; } }

/* ---- вопрос «…» — готово?» в перерыве: тот же чип разворачивается в карточку и заменяет подсказку #break-note ---- */
.task-ask { display: none; }
.task-chip[data-state="asking"] .task-row { display: none; }
.task-chip[data-state="asking"] .task-ask {
  display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 24px; animation: rise .3s ease;
  background-color: var(--card); background-image: var(--paper); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line-2));
}
.task-ask-text {
  margin: 0; font: 500 17px/1.3 var(--serif); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere;
}
.task-ask-sub { margin-top: -6px; font-size: 13px; color: var(--muted); }
.task-ask-actions { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.task-ask-actions button { height: 48px; padding: 0 14px; font-size: 15px; }
.task-chip[data-state="asking"] ~ #break-note { display: none !important; }

/* ---- левая колонка (широкий экран, помодоро): у круга своя строка с задачей ---- */
.task-col { display: none; }
.round-row.has-task { flex-wrap: wrap; row-gap: 2px; }
.round-tasks { flex: 0 0 100%; min-width: 0; display: flex; flex-direction: column; gap: 0; padding-left: 36px; margin-top: -2px; white-space: nowrap; }   /* min-width: 0 — иначе длинное название растягивает блок и налезает на кольцо */
.round-task { display: flex; align-items: center; gap: 2px; min-height: 36px; min-width: 0; max-width: 100%; border-radius: 12px; }
.round-task .task-check { width: 32px; height: 32px; margin-left: -4px; }
.round-task .task-check::before, .round-task .task-check::after { width: 22px; height: 22px; }
.round-task .task-check .ic { width: 12px; height: 12px; }
.round-task-text { flex: 0 1 auto; min-width: 0; padding: 6px 4px; text-align: left; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.round-task-text:hover { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.round-task.is-open .round-task-text { color: var(--muted); }   /* остальные задачи текущего круга; первая — «сейчас» */
.round-task.is-done .round-task-text { color: var(--dim); text-decoration: line-through; text-decoration-thickness: 1.5px; cursor: default; }
.round-task.is-asking { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); animation: task-ask-pulse 1.6s ease-out 1; }
@keyframes task-ask-pulse { 0%, 40% { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); } }
.round-task-more { align-self: flex-start; min-height: 28px; padding: 2px 6px; margin-left: -2px; border-radius: 8px; font-size: 12px; color: var(--muted); }
.round-task-more:hover { color: var(--text); }
.task-col-open { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 4px; border-radius: 10px; font-size: 14px; color: var(--muted); transition: color .2s; }
.task-col-open:hover { color: var(--text); }
.task-col-open .ic { width: 16px; height: 16px; }
.task-col-open span { display: grid; }
.task-col-count { font-size: 13px; color: var(--muted); padding-left: 4px; }
.task-col-count:empty { display: none; }
@media (min-width: 1181px) {
  #player-screen.is-pomo .pomo-rounds { width: 260px; }
  #player-screen.is-pomo .task-col { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin-top: -4px; }
  .task-col.hidden { display: none !important; }
  /* на широком экране вместо чипа — колонка слева; чип появляется только вопросом, одной строкой на месте #break-note */
  html[data-state="focus"] #player-screen.is-pomo .task-chip:not([data-state="asking"]) { display: none; }
}
/* вопрос одной строкой (52 px): широкий экран и низкий планшет / телефон в альбомной (600–1180 px шириной, до 820 высотой).
   Высокая карточка (137 px) там налезала бы на плеер */
@media (min-width: 1181px), (min-width: 600px) and (max-height: 820px) {
  .task-chip[data-state="asking"] { width: min(520px, 100%); margin-top: 14px; }
  .task-chip[data-state="asking"] .task-ask { flex-direction: row; align-items: center; gap: 10px; padding: 5px 5px 5px 20px; border-radius: 999px; }
  .task-ask-text { flex: 1; min-width: 0; -webkit-line-clamp: 1; font-size: 16px; }
  .task-ask-sub { display: none; }
  .task-ask-actions { display: flex; }
  .task-ask-actions button { height: 42px; padding: 0 18px; white-space: nowrap; }
}
/* пока висит вопрос, легенда «работа 25 мин / перерыв 5 мин» под кольцом не нужна — место отдаём карточке (она не должна налезать на плеер) */
#timer-zone:has(.task-chip[data-state="asking"]) .pomo-legend { display: none; }

/* очень низкое окно (ноутбук с панелями браузера): у кругов только «сейчас» и закрытые, остальное — в списке по «ещё» */
@media (min-width: 1181px) and (max-height: 620px) {
  .round-task.is-open { display: none; }
}

/* планшет в альбомной (≥1181px, pointer: coarse): цели касания в колонке — те же 44px */
@media (min-width: 1181px) and (pointer: coarse) {
  .round-task { min-height: 44px; }
  .round-task .task-check { width: 44px; height: 44px; margin-left: -8px; }
  .round-task .task-check::before, .round-task .task-check::after { width: 26px; height: 26px; }
  .round-task-text { min-height: 44px; }
  .task-col-open { min-height: 44px; }
}
@media (pointer: coarse) {
  .task-ask-actions button { height: 44px; }
}

/* ---- дуга-«печать» внутри кольца помодоро: круг, в котором закрыта задача ---- */
.task-ring { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#player-screen.is-pomo .task-ring { display: block; }
.task-arc { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; opacity: .95; }
.task-arc.is-new { stroke-dasharray: var(--len); animation: task-arc-draw .85s cubic-bezier(.3, .7, .2, 1) both, task-arc-glow 1.3s ease-out both; }
@keyframes task-arc-draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@keyframes task-arc-glow { 35% { filter: drop-shadow(0 0 7px var(--accent)); } }
.dial.task-flash::after {
  content: ""; position: absolute; inset: -3%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, transparent 66%, color-mix(in srgb, var(--accent) 38%, transparent) 72%, transparent 78%); animation: task-flash .9s ease-out both;
}
@keyframes task-flash { from { opacity: 0; transform: scale(.96); } 30% { opacity: 1; } to { opacity: 0; transform: scale(1.04); } }

/* ---- лист со списком (Account.sheet) ---- */
.task-sum { margin: -6px 0 0; font-size: 14px; color: var(--muted); }
.task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 42vh; overflow-y: auto; }
.task-item { display: flex; align-items: center; gap: 2px; min-height: 56px; flex-shrink: 0; border-bottom: 1px solid var(--raise); }   /* без flex-shrink: 0 строки сжимались, и длинное название налезало на соседние */
.task-item-text { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; padding: 6px 6px; text-align: left; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.task-item-text small { margin-left: 8px; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); white-space: nowrap; }
.task-item.is-cur .task-item-text { font-weight: 600; }
.task-item.is-done .task-item-text { color: var(--dim); text-decoration: line-through; text-decoration-thickness: 1.5px; cursor: default; }
.task-cur[aria-pressed="true"] { color: var(--accent-text); }
.task-del:hover { color: var(--danger); }
.task-edit { flex: 1; min-width: 0; height: 44px; margin: 6px 6px 6px 0; padding: 0 12px; border-radius: 12px; border: 1px solid var(--accent); background: var(--bg); font-size: 16px; outline: none; }
.task-empty { padding: 14px 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.task-sep { padding: 14px 0 4px; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.task-add { display: flex; gap: 10px; align-items: flex-end; }
.task-add .field { flex: 1; min-width: 0; }
.task-add .field-input input { font-size: 16px; }
.task-add .btn-primary { height: 48px; padding: 0 20px; }
.task-hint { margin: -6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--dim); }

/* ---- профиль: задачи в карточках «Сегодня» / «За неделю» и подписи под днями графика ---- */
.stat-tasks { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.stat-tasks.hidden { display: none; }
.stat-tasks .ic { width: 13px; height: 13px; color: var(--accent); }
.week-days span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wd-tasks { display: inline-flex; align-items: center; gap: 1px; font-style: normal; font-size: 11px; color: var(--muted); }
.wd-tasks .ic { width: 10px; height: 10px; color: var(--accent); }

@media (max-width: 760px) {
  .task-list { max-height: 34vh; }
  .task-add .btn-primary { padding: 0 16px; }
}
/* низкий экран (чип ближе к кольцу) и низкий телефон: карточка «готово?» компактнее — вопрос в одну строку, без подписи.
   Иначе она налезает на плеер (360x640: 143 px вместо 92) */
@media (max-width: 1180px) and (max-height: 760px) {
  .task-chip { margin-top: 10px; }
}
@media (max-width: 599px) and (max-height: 760px) {
  .task-chip[data-state="asking"] .task-ask { padding: 10px 12px; gap: 6px; border-radius: 20px; }
  .task-ask-text { -webkit-line-clamp: 1; font-size: 15px; }
  .task-ask-sub { display: none; }
  .task-ask-actions button { height: 44px; }
}
/* Низкий телефон: видимая высота в мобильном браузере меньше экрана (iPhone SE/14 в Safari с панелями ≈ 553–664 px,
   Android 360×640): чип и карточка «готово?» не должны уезжать под плеер. Кольцо отдаёт им место (шапка 60 + плеер
   ≈ 160 + чип ≈ 64 + запас), а подсказка перерыва, когда на экране чип, не показывается — то же сказано в подписи кольца. */
@media (max-width: 599px) and (max-height: 700px) {
  #player-screen.is-pomo .dial { width: max(200px, min(310px, 80vw, calc(100dvh - 300px))); height: max(200px, min(310px, 80vw, calc(100dvh - 300px))); }
  #player-screen.is-pomo #timer-display { font-size: clamp(56px, calc((100dvh - 300px) * .27), 80px); }
  html[data-state="focus"] #player-screen .task-chip:not(.hidden) ~ #break-note { display: none; }
}
@media (max-width: 599px) and (max-height: 640px) {
  html[data-state="focus"] #player-screen:not(.is-pomo) .session-scene { display: none; }    /* без помодоро картинка режима уступает место чипу */
  #player-screen:not(.is-pomo) #timer-display { margin-top: 10px; }
}
@media (max-width: 599px) and (max-height: 620px) {      /* совсем низко: вопрос «готово?» одной строкой, как на широком экране */
  .task-chip[data-state="asking"] .task-ask { flex-direction: row; align-items: center; gap: 8px; padding: 5px 5px 5px 16px; border-radius: 999px; }
  .task-ask-text { flex: 1; min-width: 0; }
  .task-ask-actions { display: flex; gap: 6px; }
  .task-ask-actions button { height: 42px; padding: 0 14px; white-space: nowrap; }
  .task-ask-actions .btn-primary .ic { display: none; }
}

/* ---------- отмена подписки: «Не отказывайтесь…» → «Причина отмены» → «Всё готово» → «Спасибо» (account.js, CancelFlow)
   Цвета и устройство — по снимкам Brain.fm (2026-10-22), нарочно не палитра сайта: тёмно-фиолетовый фон, красный знак, синяя плашка. */
.cx {
  --cx-ink: #fff; --cx-soft: #c6c3d1; --cx-dim: #8f8b9c; --cx-red: #ff4949; --cx-card: #433e52; --cx-sep: #2d273d;
  --cx-w: max(39vw, 520px);                                   /* ширина поля и кнопок на «Всё готово»: у Brain.fm 39 % окна */
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: rgba(9, 8, 14, .66); backdrop-filter: blur(3px); animation: fade .2s ease;
  font-family: var(--sans); color: var(--cx-ink);
}
.cx-card {
  position: relative; width: min(590px, 100%); margin: auto; overflow: hidden; border-radius: 22px;
  padding: 0 24px 40px; display: flex; flex-direction: column; align-items: center; text-align: center;
  background: linear-gradient(180deg, #332c45 0%, #282335 50%, #1d1926 100%); box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  animation: rise .25s ease;
}
.cx-x, .cx-back {
  position: absolute; top: 9px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: #fff; cursor: pointer;
}
.cx-x { right: 6px; } .cx-back { left: 6px; }
.cx-x .ic, .cx-back .ic { width: 24px; height: 24px; }
.cx-x:hover, .cx-back:hover { background: rgba(255, 255, 255, .08); }
/* четыре круга, как у Brain.fm: 314 / 219 / 150 / 92 px, центр в 91 px от верха; заливки складываются */
.cx-rings { position: relative; width: 100%; height: 150px; flex: none; --cy: 91px; }
.cx-rings i { position: absolute; left: 50%; top: var(--cy); border-radius: 50%; transform: translate(-50%, -50%); }
.cx-rings i:nth-child(1) { width: 314px; height: 314px; }
.cx-rings i:nth-child(2) { width: 219px; height: 219px; }
.cx-rings i:nth-child(3) { width: 150px; height: 150px; }
.cx-rings i:nth-child(4) { width: 92px; height: 92px; }
.cx-rings-red i:nth-child(1) { background: rgba(255, 73, 73, .012); border: 1px solid rgba(255, 73, 73, .05); }
.cx-rings-red i:nth-child(2) { background: rgba(255, 73, 73, .045); border: 1px solid rgba(255, 73, 73, .08); }
.cx-rings-red i:nth-child(3) { background: rgba(255, 73, 73, .035); border: 1px solid rgba(255, 73, 73, .13); }
.cx-rings-red i:nth-child(4) { background: rgba(255, 73, 73, .10); border: 1px solid rgba(255, 73, 73, .2); }
.cx-rings-grey { height: 130px; --cy: 82px; }
.cx-rings-grey i:nth-child(1) { border: 1px solid rgba(255, 255, 255, .035); }
.cx-rings-grey i:nth-child(2) { background: rgba(255, 255, 255, .025); border: 1px solid rgba(255, 255, 255, .05); }
.cx-rings-grey i:nth-child(3) { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.cx-rings-grey i:nth-child(4) { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); }
.cx-glyph { position: absolute; left: 50%; top: var(--cy); transform: translate(-50%, -50%); width: 46px; height: 46px; }
.cx-glyph svg { width: 100%; height: 100%; display: block; }
.cx-oct { fill: var(--cx-red); }
.cx-mark { stroke: #0d0c11; stroke-width: 2.6; stroke-linecap: round; fill: none; }
.cx-chat { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.cx-rings-grey .cx-glyph { width: 54px; height: 54px; }
.cx-card h2 { position: relative; margin: 14px 0 0; font-size: 22px; line-height: 1.3; font-weight: 800; letter-spacing: -.2px; }
.cx-sub { max-width: 410px; margin: 18px auto 0; color: var(--cx-soft); font-size: 15px; line-height: 1.6; }
.cx-gap { height: 40px; }
.cx-proof { max-width: 530px; margin: 0 auto; color: #e7e5ee; font-size: 17px; line-height: 1.6; }
.cx-proof b { color: #fff; font-weight: 800; }
.cx-q { margin: 26px 0 0; color: var(--cx-soft); font-size: 17px; }
.cx-btn {
  width: calc(100% - 10px); min-height: 54px; margin-top: 32px; border: 0; border-radius: 999px; background: #fff; color: #15131c;
  font: 800 13.5px/1.2 var(--sans); letter-spacing: .09em; text-transform: uppercase; cursor: pointer; padding: 0 20px;
}
.cx-btn:hover { background: #ecebf1; }
.cx-link {
  margin-top: 22px; padding: 12px 16px; border: 0; background: none; color: #fff; cursor: pointer;
  font: 800 13.5px/1.2 var(--sans); letter-spacing: .09em; text-transform: uppercase;
}
.cx-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.cx-link:disabled { opacity: .5; cursor: progress; }
.cx-btn:focus-visible, .cx-link:focus-visible, .cx-out:focus-visible, .cx-fill:focus-visible, .cx-x:focus-visible, .cx-back:focus-visible, .cx-opt:focus-within {
  outline: 2px solid #8fb3ff; outline-offset: 3px;
}
.cx-s2 h2 { margin-top: 0; }
.cx-list { width: 100%; margin-top: 18px; border-radius: 18px; background: var(--cx-card); overflow: hidden; text-align: left; }
.cx-opt { display: flex; align-items: center; gap: 16px; min-height: 66px; padding: 18px 16px 18px 19px; cursor: pointer; font-size: 17px; line-height: 1.6; }
.cx-opt + .cx-opt { border-top: 2px solid var(--cx-sep); }
.cx-opt span { flex: 1; min-width: 0; }
.cx-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cx-opt i { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #686575; border: 1px solid #8a8696; display: grid; place-items: center; }
.cx-opt input:checked + i { background: #fff; border-color: #fff; }
.cx-opt input:checked + i::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #2a2739; }
.cx-opt:hover { background: rgba(255, 255, 255, .03); }
.cx-note { margin: 16px 6px 0; color: var(--cx-soft); font-size: 13.5px; line-height: 1.45; }

/* «Всё готово» и «Спасибо» — на весь экран, слева текст, справа картинка */
/* размеры — доли ширины окна со снимка Brain.fm (2000 px): заголовок 3,2 %, текст 1,4 %, поле 39 × 10,5 %, кнопки 3,55 % */
.cx-full { padding: 0; background: linear-gradient(100deg, #0d0c11 0%, #111018 35%, #1b1d33 62%, #25274f 100%); backdrop-filter: none; place-items: stretch; }
.cx-page { position: relative; min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; }
.cx-col { padding: 48px 2vw 48px 10.8vw; }
.cx-page h1 { margin: 0; font-size: clamp(42px, 3.2vw, 66px); line-height: 1.1; font-weight: 800; letter-spacing: -1px; }
/* «готово» — маркерная полоса под нижней половиной слова, как у Brain.fm, а не плашка целиком */
.cx-page mark { position: relative; z-index: 0; display: inline-block; margin-left: -.15em; padding: 0 .17em 0 .22em; background: none; color: #fff; }
.cx-page mark::before {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: -.08em; height: .66em;
  background: linear-gradient(90deg, #2640d5 0%, #1f6fe6 55%, #179ff5 100%);
}
.cx-lead { margin: clamp(18px, 1.6vw, 34px) 0 0; color: #d6d3de; font-size: clamp(17px, 1.4vw, 28px); line-height: 1.6; max-width: var(--cx-w); }
.cx-lead-sm { margin-top: 14px; font-size: clamp(15px, 1.1vw, 22px); color: #b9b5c4; }
.cx-ask { display: block; margin: clamp(32px, 3.7vw, 76px) 0 clamp(14px, 1.25vw, 26px); font-size: clamp(17px, 1.2vw, 24px); font-weight: 800; }
.cx-page textarea {
  display: block; width: 100%; max-width: var(--cx-w); height: clamp(160px, 10.5vw, 210px); min-height: 120px; resize: vertical;
  padding: clamp(16px, 1.2vw, 24px); border-radius: clamp(14px, 1vw, 20px);
  border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .06); color: #fff;
  font: 400 clamp(16px, 1.1vw, 22px)/1.6 var(--sans); outline: none;
}
.cx-page textarea::placeholder { color: var(--cx-dim); }
.cx-page textarea:focus { border-color: rgba(143, 179, 255, .7); }
.cx-count { max-width: var(--cx-w); margin-top: clamp(8px, .8vw, 16px); text-align: right; color: #a6a2b2; font-size: clamp(14px, 1vw, 20px); }
.cx-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1vw, 20px); max-width: var(--cx-w); margin-top: clamp(24px, 2.2vw, 44px); }
.cx-pair-one { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cx-out, .cx-fill {
  min-height: clamp(54px, 3.55vw, 71px); border-radius: 999px; font: 800 clamp(13px, .85vw, 17px)/1.2 var(--sans); letter-spacing: .1em;
  text-transform: uppercase; cursor: pointer;
}
.cx-out { border: 1px solid rgba(255, 255, 255, .3); background: none; color: #fff; }
.cx-out:hover { background: rgba(255, 255, 255, .05); }
.cx-fill { border: 0; background: #fff; color: #15131c; }
.cx-fill:disabled { background: #49485b; color: #6f6e80; cursor: default; }
.cx-pair .cx-btn { width: 100%; margin-top: 0; min-height: clamp(54px, 3.55vw, 71px); font-size: clamp(13px, .85vw, 17px); }
.cx-art { align-self: stretch; display: grid; place-items: center; overflow: hidden; padding: 24px 4vw 24px 0; }
.cx-art-svg { width: min(100%, 680px); height: auto; overflow: visible; }
@media (max-width: 980px) {
  .cx-page { grid-template-columns: 1fr; align-items: start; }
  .cx-art { display: none; }
  .cx-col { padding: 64px 24px 40px; }
}
@media (max-width: 520px) {
  .cx:not(.cx-full) { padding: 0; place-items: stretch; }
  .cx-card { width: 100%; min-height: 100%; border-radius: 0; padding: 0 18px 28px; }
  .cx-s1 .cx-gap { flex: 1; min-height: 28px; }
  .cx-opt { font-size: 16px; padding: 16px 14px 16px 16px; min-height: 60px; }
  .cx-pair, .cx-pair-one { grid-template-columns: 1fr; gap: 12px; }
  .cx-col { padding: 56px 20px 32px; }
  .cx-page h1 { font-size: 42px; }
  .cx-page mark { margin-left: 0; }                          /* «за отзыв» переносится на свою строку — полоса не уезжает влево */
}
@media (prefers-reduced-motion: reduce) { .cx, .cx-card { animation: none; } }
