/* ═══════════════════ Звонок ═══════════════════
   Те же правила, что у mqttGrid (бумага и чернила, курсивные засечки,
   моноширинные цифры, зерно, стекло, вылет снизу вверх), но теплее и
   ярче: у каждого предмета свой цвет, карточки тонированы, всё круглее. */

:root {
  --paper: #f7f2e8;
  --ink: #1a1611;
  --radius: 22px;
  --c-tomato: #ff6b57; --c-tangerine: #ff9a3c; --c-sun: #f5bf2a; --c-lime: #8cc63f;
  --c-mint: #2fcf98; --c-teal: #1db1a8; --c-sky: #44b4f2; --c-ocean: #3f7cf0;
  --c-iris: #7a68f4; --c-plum: #b05de6; --c-rose: #f25c9b; --c-sand: #d4a066;
  --accent: var(--c-tangerine);
  --c: var(--accent);
}
:root[data-theme="light"] { --bg: var(--paper); --fg: var(--ink); }
:root[data-theme="dark"] { --bg: #110f0c; --fg: #f4efe4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --bg: #110f0c; --fg: #f4efe4; } }

/* Тонировка карточки цветом предмета (--c задаётся из JS через CSSOM). */
.tint { background: color-mix(in oklab, var(--c) 13%, var(--bg)); border-color: color-mix(in oklab, var(--c) 30%, var(--bg)) !important; }
.dot-c { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }

body::after {
  /* тёплое цветное свечение по краям — «дружелюбная» атмосфера */
  content: '';
  position: fixed; inset: -20vmax; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40vmax 30vmax at 12% 8%, color-mix(in oklab, var(--c-tangerine) 16%, transparent), transparent 70%),
    radial-gradient(38vmax 28vmax at 92% 18%, color-mix(in oklab, var(--c-iris) 13%, transparent), transparent 70%),
    radial-gradient(44vmax 30vmax at 70% 100%, color-mix(in oklab, var(--c-mint) 12%, transparent), transparent 70%);
  animation: aurora 26s ease-in-out infinite alternate;
}
@keyframes aurora { to { transform: translate3d(3vmax, -2vmax, 0) scale(1.05); } }

/* ─────────── бренд: колокольчик качается ─────────── */

.brand { font-family: var(--serif); font-style: italic; font-size: 22px; letter-spacing: -.01em; gap: 9px; }
.bell {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transform-origin: 50% 10%;
}
.bell.ring { animation: bell-ring 1.2s var(--ease) both; }
@keyframes bell-ring {
  10% { transform: rotate(18deg); } 25% { transform: rotate(-15deg); } 40% { transform: rotate(10deg); }
  55% { transform: rotate(-6deg); } 70% { transform: rotate(3deg); } 100% { transform: none; }
}
.stage-meta .brand { font-size: 26px; }

/* ─────────── шапка ─────────── */

.now-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; white-space: nowrap;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.now-pill .dot-c { width: 8px; height: 8px; box-shadow: 0 0 0 0 color-mix(in oklab, var(--c) 60%, transparent); animation: pill-ping 2s var(--ease) infinite; }
.now-pill b { font-family: var(--mono); font-weight: 500; }
@keyframes pill-ping { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--c) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 8px transparent; } }

.view { max-width: 1280px; }
.view.enter .rise { animation: rise .95s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(26px); filter: blur(4px); } }

.view-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 30px; }
.view-title { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(40px, 5.2vw, 72px); line-height: 1; letter-spacing: -.015em; }
.view-sub { margin: 8px 0 0; color: var(--muted); }
.kicker { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
  transition: background .3s var(--ease), color .3s var(--ease), transform .25s var(--ease), border-color .3s var(--ease);
}
.icon-btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.ghost { border-color: transparent; }
.icon-btn .ico { width: 18px; height: 18px; }
.line-btn.sm, .solid-btn.sm { padding: 9px 16px; font-size: 13px; }
.line-btn.with-ico, .solid-btn.with-ico { gap: 8px; }
.line-btn .ico, .solid-btn .ico { width: 16px; height: 16px; }
.solid-btn.accent { background: var(--accent); border-color: var(--accent); color: #1a1611; }

.input, .select, .time {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 14px;
  font-size: 15px;
  background: color-mix(in oklab, var(--fg) 3%, var(--bg));
  color: var(--fg);
  outline: none;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
  min-width: 0;
}
.input:focus, .select:focus, .time:focus { border-color: var(--fg); box-shadow: 0 0 0 4px color-mix(in oklab, var(--fg) 7%, transparent); }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.select option { background: var(--bg); color: var(--fg); }
.time { font-family: var(--mono); font-size: 16px; color-scheme: light dark; padding: 9px 12px; }
.muted-note { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
.empty-note { color: var(--muted); padding: 22px 0; text-align: center; font-size: 14.5px; }
.empty-note b { display: block; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 26px; color: var(--fg); margin-bottom: 4px; }

/* ═══════════════════ Сейчас ═══════════════════ */

.now-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.hero {
  padding: clamp(24px, 4vw, 44px);
  overflow: hidden;
  transition: background 1s var(--ease), border-color 1s var(--ease);
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(70% 90% at 100% 0%, color-mix(in oklab, var(--c) 30%, transparent), transparent 70%);
  opacity: .9; transition: background 1s var(--ease);
}
.hero > * { position: relative; }
.hero-kicker { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.hero-emoji {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; border-radius: 20px;
  font-size: 34px; line-height: 1;
  background: color-mix(in oklab, var(--c) 22%, var(--bg));
  border: 1px solid color-mix(in oklab, var(--c) 40%, var(--bg));
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-6px) rotate(-3deg); } }
.hero-title {
  margin: 18px 0 0;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(42px, 6vw, 88px); line-height: .98; letter-spacing: -.02em;
}
.hero-title i { color: color-mix(in oklab, var(--c) 78%, var(--fg)); }
.hero-count {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px;
  margin-top: clamp(18px, 3vw, 30px);
}
.count {
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(64px, 11vw, 150px); line-height: 1; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.count-cap { font-size: 16px; color: var(--muted); }
.bar {
  position: relative; height: 12px; margin-top: 26px;
  border-radius: 999px; overflow: hidden;
  background: color-mix(in oklab, var(--fg) 8%, var(--bg));
}
.bar-fill {
  position: absolute; inset: 0; transform-origin: left center;
  background: linear-gradient(90deg, color-mix(in oklab, var(--c) 70%, var(--bg)), var(--c));
  border-radius: inherit;
  transition: transform 1s linear, background 1s var(--ease);
}
.bar-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 2.6s linear infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.bar-meta { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.next-card {
  display: flex; align-items: center; gap: 14px;
  margin-top: 26px; padding: 14px 16px;
  border-radius: 18px;
  background: color-mix(in oklab, var(--c) 12%, var(--bg));
  border: 1px solid color-mix(in oklab, var(--c) 28%, var(--bg));
}
.next-card .em { font-size: 26px; }
.next-card p { margin: 0; }
.next-card .t { font-weight: 600; font-size: 16px; }
.next-card .s { color: var(--muted); font-size: 13.5px; }

/* Цифры отсчёта: меняется только та, что изменилась, — старая уезжает вверх. */
.fl-cell { position: relative; display: inline-block; overflow: hidden; vertical-align: bottom; line-height: 1.05; }
.fl-cur, .fl-old { display: inline-block; }
.fl-old { position: absolute; left: 0; top: 0; animation: fl-up .55s var(--ease) forwards; }
.fl-in { animation: fl-down .55s var(--ease); }
@keyframes fl-up { to { transform: translateY(-100%); opacity: 0; filter: blur(2px); } }
@keyframes fl-down { from { transform: translateY(100%); opacity: 0; filter: blur(2px); } }

.side { display: grid; gap: 22px; }
.today { padding: 22px 22px 10px; }
.side-title { margin: 0 0 14px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 28px; line-height: 1.1; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.side-title small { font-family: var(--mono); font-style: normal; font-size: 12px; color: var(--muted); }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li {
  position: relative;
  display: grid; grid-template-columns: 54px 26px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  transition: opacity .5s var(--ease);
}
.tl li:first-child { border-top: 0; }
.tl .t { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.tl .e { font-size: 18px; text-align: center; }
.tl .n { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl .n small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.tl .num { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tl li.past { opacity: .42; }
.tl li.brk { grid-template-columns: 54px 26px minmax(0, 1fr); padding: 4px 0; border-top: 0; color: var(--muted); font-size: 12.5px; }
.tl li.brk .e { font-size: 12px; }
.tl li.off .n { text-decoration: line-through; color: var(--muted); }
.tl li.cur {
  margin: 4px -12px; padding: 12px 12px; border-radius: 16px;
  background: color-mix(in oklab, var(--c) 15%, var(--bg));
  border-top-color: transparent;
}
.tl li.cur + li { border-top-color: transparent; }
.tl li.cur::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 3px; border-radius: 3px;
  background: var(--c); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 1s linear;
}
.tl .badge { font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tl li.cur .badge { border-color: var(--c); color: var(--fg); }

.hw-mini { padding: 22px; }

/* ═══════════════════ Неделя ═══════════════════ */

.week-nav { display: flex; align-items: center; gap: 10px; }
.week-range { font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 150px; text-align: center; }
.week { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.day {
  padding: 16px 16px 12px; cursor: pointer;
  transition: transform .45s var(--ease), border-color .35s var(--ease), box-shadow .45s var(--ease);
}
.day:hover { transform: translateY(-3px); border-color: var(--soft); box-shadow: 0 24px 50px -34px rgba(0, 0, 0, .5); }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.day-name { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 25px; }
.day-date { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.day-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 8px; }
.flag { font-family: var(--mono); font-size: 11px; padding: 3px 9px; border-radius: 999px; background: color-mix(in oklab, var(--accent) 18%, var(--bg)); color: color-mix(in oklab, var(--accent) 70%, var(--fg)); }
.flag.off { background: color-mix(in oklab, var(--c-tomato) 16%, var(--bg)); color: color-mix(in oklab, var(--c-tomato) 75%, var(--fg)); }
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.lesson {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center;
  padding: 7px 10px; border-radius: 12px;
  background: color-mix(in oklab, var(--c) 14%, var(--bg));
  font-size: 14px;
  transition: opacity .4s var(--ease), background .4s var(--ease);
}
.lesson .num { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.lesson .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson .tm { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.lesson.off { background: transparent; border: 1px dashed var(--line); opacity: .6; }
.lesson.off .nm { text-decoration: line-through; }
.lesson.win { background: transparent; color: var(--muted); font-style: italic; }
.lesson.extra { background: transparent; border: 1px solid color-mix(in oklab, var(--c) 45%, var(--bg)); }
.day-empty { color: var(--muted); font-size: 13.5px; padding: 6px 2px 10px; }

/* ═══════════════════ Лист (редактор дня, формы) ═══════════════════ */

.sheet-veil {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: end center;
  background: color-mix(in oklab, #000 34%, transparent);
  opacity: 0; transition: opacity .45s var(--ease);
}
.sheet-veil.in { opacity: 1; }
.sheet {
  width: min(680px, 100%);
  max-height: min(88dvh, 900px);
  overflow: auto; overscroll-behavior: contain;
  margin-bottom: clamp(0px, 3vh, 28px);
  padding: 26px clamp(18px, 3vw, 30px) 22px;
  border-radius: 28px;
  transform: translateY(40px) scale(.98);
  transition: transform .7s var(--ease);
}
.sheet-veil.in .sheet { transform: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.sheet-title { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 36px; line-height: 1.02; }
.sheet-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.sheet-foot .spacer { flex: 1; }
.block { margin-top: 18px; }
.block-title { margin: 0 0 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.edit-list { display: grid; gap: 8px; }
.edit-row {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 8px 10px 8px 12px; border-radius: 16px;
  background: color-mix(in oklab, var(--c) 12%, var(--bg));
  transition: opacity .35s var(--ease), background .35s var(--ease);
}
.edit-row.off { opacity: .55; background: transparent; outline: 1px dashed var(--line); }
.edit-row .num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.edit-row .tm { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.edit-row .select { padding: 8px 32px 8px 10px; font-size: 14px; background-color: color-mix(in oklab, var(--bg) 70%, transparent); }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; }
.switch-row p { margin: 0; }
.switch-row .sub { color: var(--muted); font-size: 13px; }

.days-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.day-chip {
  width: 44px; height: 42px; border-radius: 13px;
  border: 1px solid var(--line); background: none; color: var(--muted);
  font-size: 13px; font-weight: 500;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .2s var(--ease);
}
.day-chip:active { transform: scale(.9); }
.day-chip.on { background: var(--c); border-color: var(--c); color: #1a1611; }

.palette { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid transparent; background: var(--c);
  box-shadow: inset 0 0 0 3px var(--bg);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.swatch:hover { transform: scale(1.12); }
.swatch.on { border-color: var(--fg); transform: scale(1.12); }

/* ═══════════════════ Домашка ═══════════════════ */

.hw-add { padding: 18px; display: grid; gap: 12px; margin-bottom: 26px; }
.hw-add-row { display: flex; gap: 10px; }
.hw-add-row .input { flex: 1; font-size: 16px; }
.subj-pick { display: flex; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.subj-pick::-webkit-scrollbar { display: none; }
.subj-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 7px 13px 7px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: none;
  font-size: 13.5px; color: var(--muted);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .2s var(--ease);
}
.subj-chip:active { transform: scale(.94); }
.subj-chip.on { background: color-mix(in oklab, var(--c) 22%, var(--bg)); border-color: var(--c); color: var(--fg); }
.due-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13.5px; color: var(--muted); }
.due-line .time { padding: 6px 10px; font-size: 14px; }
.hw-group { margin-bottom: 26px; }
.hw-group-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 26px; }
.hw-group-title small { font-family: var(--mono); font-style: normal; font-size: 12px; color: var(--muted); }
.hw-group.g-late .hw-group-title { color: var(--c-tomato); }
.hw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hw {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 14px 14px 14px 16px; border-radius: 18px;
  background: color-mix(in oklab, var(--c) 9%, var(--bg));
  border: 1px solid color-mix(in oklab, var(--c) 22%, var(--bg));
  transition: opacity .45s var(--ease), transform .55s var(--ease), background .45s var(--ease);
}
.hw.leaving { opacity: 0; transform: translateX(24px) scale(.98); }
.hw-text { margin: 0; font-size: 15.5px; line-height: 1.45; overflow-wrap: anywhere; position: relative; }
.hw-meta { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.hw-meta .s { color: color-mix(in oklab, var(--c) 70%, var(--fg)); font-weight: 500; }
.hw.done { background: transparent; border-color: var(--line); }
.hw.done .hw-text { color: var(--muted); }
.hw.done .hw-text::after {
  content: ''; position: absolute; left: 0; right: 0; top: .78em; height: 1.5px; background: var(--muted);
  transform-origin: left; animation: strike .45s var(--ease) both;
}
@keyframes strike { from { transform: scaleX(0); } }
.check {
  position: relative; width: 28px; height: 28px; margin-top: -1px;
  border-radius: 50%; border: 2px solid color-mix(in oklab, var(--c) 70%, var(--fg));
  background: none; padding: 0;
  transition: background .3s var(--ease), transform .25s var(--ease);
}
.check:hover { transform: scale(1.08); }
.check:active { transform: scale(.88); }
.check svg { position: absolute; inset: 3px; width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .35s var(--ease) .05s; }
.check.on { background: color-mix(in oklab, var(--c) 85%, var(--fg)); }
.check.on svg { stroke-dashoffset: 0; }
.check.burst::after {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid var(--c); animation: burst .6s var(--ease) forwards;
}
@keyframes burst { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.row-del { opacity: 0; transition: opacity .3s var(--ease); }
.hw:hover .row-del, .task:hover .row-del, .hw:focus-within .row-del { opacity: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }

/* ═══════════════════ Кружки ═══════════════════ */

.section-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin: 34px 0 16px; }
.section-title h2 { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 34px; }
.section-title p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.clubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.club { padding: 20px; overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.club:hover { transform: translateY(-3px); box-shadow: 0 28px 60px -40px rgba(0, 0, 0, .5); }
.club::before {
  content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--c) 40%, transparent), transparent);
  pointer-events: none;
}
.club-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.club-em { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; font-size: 26px; background: color-mix(in oklab, var(--c) 22%, var(--bg)); }
.club-title { margin: 0; font-weight: 600; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.club-when { margin: 3px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.club-place { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.club-place .ico { width: 14px; height: 14px; }
.tasks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; }
.task .check { width: 22px; height: 22px; }
.task .check svg { inset: 2px; width: 14px; height: 14px; }
.task-text { margin: 0; font-size: 14.5px; position: relative; overflow-wrap: anywhere; }
.task.done .task-text { color: var(--muted); }
.task.done .task-text::after { content: ''; position: absolute; left: 0; right: 0; top: .72em; height: 1.5px; background: var(--muted); transform-origin: left; animation: strike .45s var(--ease) both; }
.task-add { display: flex; gap: 8px; margin-top: 10px; }
.task-add .input { flex: 1; padding: 9px 12px; font-size: 14px; border-radius: 12px; }

/* ═══════════════════ Настройки ═══════════════════ */

.settings { display: grid; gap: 22px; max-width: 820px; }
.set-card { padding: 24px; }
.set-card .set-title { margin: 0 0 4px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 32px; }
.bells-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.bell-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 14px; background: color-mix(in oklab, var(--fg) 4%, var(--bg)); font-family: var(--mono); font-size: 13px; }
.bell-row b { font-weight: 500; }
.brk-input { width: 58px; padding: 6px 8px; font-size: 13px; text-align: center; border-radius: 10px; }
.subj-edit { display: grid; gap: 8px; margin-top: 12px; }
.subj-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 8px; border-radius: 16px; background: color-mix(in oklab, var(--c) 12%, var(--bg));
}
.subj-row .input { padding: 9px 12px; background: color-mix(in oklab, var(--bg) 70%, transparent); }
.subj-row .em-input { text-align: center; font-size: 20px; padding: 6px; }
.subj-color { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--bg); background: var(--c); box-shadow: 0 0 0 1px var(--line); }

/* ═══════════════════ телефон ═══════════════════ */

@media (max-width: 980px) {
  .now-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app .topbar { grid-template-columns: 1fr auto; }
  .now-pill { display: none; }
  .hero-emoji { width: 52px; height: 52px; font-size: 28px; border-radius: 16px; }
  .sheet { border-radius: 26px 26px 0 0; margin-bottom: 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); max-height: 92dvh; }
  .edit-row { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .edit-row .tm { display: none; }
  .subj-row { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .subj-row .subj-color { display: none; }
  .row-del { opacity: 1; }
  .view-head { margin-bottom: 20px; }
  body.has-dock .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* ═══════════ иконки: у каждой вкладки своё движение ═══════════ */

.ico path { transform-box: fill-box; transform-origin: center; }
.ico-now.tap path:nth-child(2) { animation: ico-hand .9s var(--ease-io); transform-origin: 0 100%; }
.ico-now.tap path:nth-child(3), .ico-now.tap path:nth-child(4) { animation: ico-hop .5s var(--ease) both; }
@keyframes ico-hand { to { transform: rotate(360deg); } }
.ico-week.tap path:nth-child(n+3) { animation: ico-hop .55s var(--ease) both; }
.ico-week.tap path:nth-child(4) { animation-delay: .08s; }
@keyframes ico-hop { 40% { transform: translateY(-3px); } 70% { transform: translateY(.5px); } }
.ico-homework.tap path:nth-child(2) { stroke-dasharray: 14; animation: ico-draw .6s var(--ease) both; }
@keyframes ico-draw { from { stroke-dashoffset: 14; } to { stroke-dashoffset: 0; } }
.ico-clubs.tap { animation: ico-star .8s var(--ease); }
@keyframes ico-star { 40% { transform: rotate(-24deg) scale(1.2); } 70% { transform: rotate(8deg) scale(.95); } }
.ico-settings.tap path:nth-child(2) { animation: ico-knob-l .8s var(--ease) both; }
.ico-settings.tap path:nth-child(4) { animation: ico-knob-r .8s var(--ease) both .05s; }
@keyframes ico-knob-l { 50% { transform: translateX(-8px); } }
@keyframes ico-knob-r { 50% { transform: translateX(7px); } }
.tabs.dock .tab.active { background: var(--accent); color: #1a1611; }
.tab-thumb { background: var(--accent); height: 2px; }

.toast { display: inline-flex; align-items: center; gap: 14px; white-space: nowrap; max-width: calc(100vw - 24px); }
.toast-undo { border: 0; background: none; padding: 0; font-weight: 600; color: var(--accent); }
.min0 { min-width: 0; }
.em-big { width: 72px; flex: none; text-align: center; font-size: 22px; padding: 8px; }
.week { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.sheet .block > .input { width: 100%; }
@media (max-width: 760px) {
  .hw-add-row { flex-wrap: wrap; }
  .hw-add-row .input { flex-basis: 100%; }
  .hw-add-row .solid-btn { width: 100%; justify-content: center; }
  .due-line .time { flex: 1; }
}
.lesson .nm { white-space: normal; line-height: 1.2; overflow-wrap: anywhere; }
@media (max-width: 760px) { .due-line .time { flex: 1 1 150px; } }
