/* Оформление мини-приложения. Стиль задаётся атрибутом data-theme у <html>, день или ночь - атрибутом data-mode.
   --now - яркий цвет стиля, --now-text - он же для текста (днём темнее, чтобы читался на фоне). */

:root {
  --warn: #A8480F;
  --teach: #2457D6; --massage: #0A6B49; --study: #6B3FD0; --self: #9C4A05; --comp: #BE2039; --other: #4D5F74;
  --teach-soft: #DEE7FB; --massage-soft: #D6EFE5; --study-soft: #E8DFFA; --self-soft: #FAE8D2;
  --comp-soft: #FADCE1; --other-soft: #E1E9EE; --kids: #A8257A; --kids-soft: #FBE1F1;
  color-scheme: light;
}

/* ---------- день */
:root, [data-theme="ice"] {
  --bg: #EEF3F6; --surface: #FFFFFF; --surface-2: #E1E9EE; --ink: #0D1B2A; --muted: #52647A; --line: #C9D5DD;
  --accent: #0F4C75; --on-accent: #FFFFFF; --now: #D04919; --on-now: #FFFFFF; --now-text: #BF4317;
}
[data-theme="terra"] {
  --bg: #DFF0E8; --surface: #FBFEFC; --surface-2: #CBE4D8; --ink: #14302A; --muted: #456359; --line: #B4D3C5;
  --accent: #17463D; --on-accent: #FFFFFF; --now: #BF4F27; --on-now: #FFFFFF; --now-text: #B04924;
}
[data-theme="mint"] {
  --bg: #EAF4F0; --surface: #FFFFFF; --surface-2: #D7EAE2; --ink: #10261F; --muted: #476057; --line: #C0DACF;
  --accent: #0F766E; --on-accent: #FFFFFF; --now: #C94D1B; --on-now: #FFFFFF; --now-text: #BB4819;
}
[data-theme="lilac"] {
  --bg: #F1ECFA; --surface: #FFFFFF; --surface-2: #E4DAF6; --ink: #261B3D; --muted: #5E5275; --line: #D4C8EC;
  --accent: #6D3FD6; --on-accent: #FFFFFF; --now: #D23B72; --on-now: #FFFFFF; --now-text: #BD3567;
}
[data-theme="mustard"] {
  --bg: #EEEAF7; --surface: #FFFFFF; --surface-2: #DDD6EE; --ink: #231B3A; --muted: #5C5378; --line: #CFC6E6;
  --accent: #4A3A8E; --on-accent: #FFFFFF; --now: #E0A81C; --on-now: #231B3A; --now-text: #846311;
}
[data-theme="cherry"] {
  --bg: #F7EFE9; --surface: #FFFFFF; --surface-2: #EBDDD3; --ink: #2A1418; --muted: #6B5154; --line: #DCCABF;
  --accent: #7B1E2E; --on-accent: #FFFFFF; --now: #C4263E; --on-now: #FFFFFF; --now-text: #C4263E;
}
[data-theme="sand"] {
  --bg: #F2EADB; --surface: #FFFDF8; --surface-2: #E4D8C2; --ink: #14283B; --muted: #51606E; --line: #D5C7AD;
  --accent: #14405F; --on-accent: #FFFFFF; --now: #E27A2B; --on-now: #1B1206; --now-text: #9E551E;
}
[data-theme="blush"] {
  --bg: #F8EDED; --surface: #FFFFFF; --surface-2: #EEDADB; --ink: #2A2226; --muted: #6A5A60; --line: #E2CACD;
  --accent: #2A2226; --on-accent: #FFFFFF; --now: #C23A64; --on-now: #FFFFFF; --now-text: #BE3962;
}
[data-theme="paper"] {
  --bg: #F2F1EC; --surface: #FFFFFF; --surface-2: #E5E3DB; --ink: #171717; --muted: #5A5A54; --line: #CECCC2;
  --accent: #171717; --on-accent: #FFFFFF; --now: #C1121F; --on-now: #FFFFFF; --now-text: #C1121F;
}
[data-theme="lime"] {
  --bg: #F2F5EA; --surface: #FFFFFF; --surface-2: #E2E8D2; --ink: #13170D; --muted: #59624A; --line: #D0D8BC;
  --accent: #13170D; --on-accent: #FFFFFF; --now: #BDEB2B; --on-now: #13170D; --now-text: #5E7515;
}
[data-theme="sport"] {
  --bg: #F4F4EF; --surface: #FFFFFF; --surface-2: #E6E6DD; --ink: #141414; --muted: #5C5C55; --line: #D1D1C6;
  --accent: #141414; --on-accent: #FFFFFF; --now: #FFD60A; --on-now: #141414; --now-text: #7F6B05;
}
[data-theme="coral"] {
  --bg: #F6F2F0; --surface: #FFFFFF; --surface-2: #EBE2DE; --ink: #1C1D21; --muted: #62646E; --line: #DCD0CB;
  --accent: #1C1D21; --on-accent: #FFFFFF; --now: #FF6F5B; --on-now: #1C1D21; --now-text: #B24E40;
}
[data-theme="neon"] {
  --bg: #F1EEFB; --surface: #FFFFFF; --surface-2: #E0DAF3; --ink: #1A1432; --muted: #5C5580; --line: #CFC7EA;
  --accent: #5A2FE0; --on-accent: #FFFFFF; --now: #FF4D9E; --on-now: #1A1432; --now-text: #BA3873;
}
[data-theme="emerald"] {
  --bg: #EDF4EF; --surface: #FFFFFF; --surface-2: #DAE8DF; --ink: #0F2A22; --muted: #4A6359; --line: #C4D9CC;
  --accent: #0F5A45; --on-accent: #FFFFFF; --now: #D9A93C; --on-now: #0F2A22; --now-text: #876925;
}
[data-theme="cocoa"] {
  --bg: #F6EEE6; --surface: #FFFFFF; --surface-2: #EADCCE; --ink: #2A1D16; --muted: #6B574B; --line: #DBC8B6;
  --accent: #5A3A28; --on-accent: #FFFFFF; --now: #D98A45; --on-now: #2A1D16; --now-text: #945E2F;
}

/* ---------- ночь */
[data-mode="night"] {
  --teach: #86A8FF; --massage: #52D3A4; --study: #BBA1FF; --self: #FFB765; --comp: #FF8296; --other: #A9B6C6;
  --teach-soft: #1B2A4E; --massage-soft: #11362B; --study-soft: #2A2150; --self-soft: #3C2911;
  --comp-soft: #41171F; --other-soft: var(--surface-2); --warn: #FFB765; --kids: #FF9BD2; --kids-soft: #3F1832;
  color-scheme: dark;
}
[data-theme="ice"][data-mode="night"], :root[data-mode="night"]:not([data-theme]) {
  --bg: #0D1521; --surface: #162130; --surface-2: #1F2D40; --ink: #EEF2F6; --muted: #9DAEC2; --line: #2A394D;
  --accent: #F2A65A; --on-accent: #0D1521; --now: #FF7C4F; --on-now: #0D1521; --now-text: #FF7C4F;
}
[data-theme="terra"][data-mode="night"] {
  --bg: #0F1F1B; --surface: #172B26; --surface-2: #213A33; --ink: #EAF4EF; --muted: #9FB9AE; --line: #2B4A41;
  --accent: #F2A27E; --on-accent: #0F1F1B; --now: #F28B5E; --on-now: #0F1F1B; --now-text: #F28B5E;
}
[data-theme="mint"][data-mode="night"] {
  --bg: #0B1D1A; --surface: #122925; --surface-2: #1B3833; --ink: #E9F5F2; --muted: #98B8B0; --line: #25483F;
  --accent: #5FD9C6; --on-accent: #0B1D1A; --now: #FF9B66; --on-now: #0B1D1A; --now-text: #FF9B66;
}
[data-theme="lilac"][data-mode="night"] {
  --bg: #161126; --surface: #201936; --surface-2: #2D2449; --ink: #F0ECFA; --muted: #ACA3C9; --line: #3A2F5C;
  --accent: #B9A0FF; --on-accent: #161126; --now: #FF74A8; --on-now: #161126; --now-text: #FF74A8;
}
[data-theme="mustard"][data-mode="night"] {
  --bg: #15122A; --surface: #1F1B3B; --surface-2: #2B2650; --ink: #EFECFA; --muted: #A9A3C9; --line: #383263;
  --accent: #C2B4FF; --on-accent: #15122A; --now: #F2C13F; --on-now: #15122A; --now-text: #F2C13F;
}
[data-theme="cherry"][data-mode="night"] {
  --bg: #1C0F12; --surface: #29171B; --surface-2: #382126; --ink: #F8ECEE; --muted: #C2A3A8; --line: #4A2C32;
  --accent: #FF98A6; --on-accent: #1C0F12; --now: #FF6178; --on-now: #1C0F12; --now-text: #FF6178;
}
[data-theme="sand"][data-mode="night"] {
  --bg: #0D1B29; --surface: #152737; --surface-2: #1F3548; --ink: #EEF2F6; --muted: #9FB0C2; --line: #2A435A;
  --accent: #F0D9AA; --on-accent: #0D1B29; --now: #F39C4F; --on-now: #0D1B29; --now-text: #F39C4F;
}
[data-theme="blush"][data-mode="night"] {
  --bg: #1D1618; --surface: #292023; --surface-2: #372B2F; --ink: #F8EEF0; --muted: #BFA9AE; --line: #48393E;
  --accent: #F5D5DB; --on-accent: #1D1618; --now: #F2759D; --on-now: #1D1618; --now-text: #F2759D;
}
[data-theme="paper"][data-mode="night"] {
  --bg: #121212; --surface: #1D1D1D; --surface-2: #2A2A2A; --ink: #F4F4F0; --muted: #B4B4AC; --line: #3A3A3A;
  --accent: #F4F4F0; --on-accent: #121212; --now: #FF5A64; --on-now: #121212; --now-text: #FF5A64;
}
[data-theme="lime"][data-mode="night"] {
  --bg: #0B0D09; --surface: #161A12; --surface-2: #22281B; --ink: #F1F5EA; --muted: #A7B19A; --line: #2F3725;
  --accent: #C5F236; --on-accent: #0B0D09; --now: #C5F236; --on-now: #0B0D09; --now-text: #C5F236;
}
[data-theme="sport"][data-mode="night"] {
  --bg: #111111; --surface: #1D1D1D; --surface-2: #2A2A2A; --ink: #F5F5F2; --muted: #B6B6AF; --line: #3A3A3A;
  --accent: #FFD60A; --on-accent: #111111; --now: #FFD60A; --on-now: #111111; --now-text: #FFD60A;
}
[data-theme="coral"][data-mode="night"] {
  --bg: #15161A; --surface: #202228; --surface-2: #2C2F37; --ink: #F2F2F4; --muted: #A9ACB8; --line: #3A3D47;
  --accent: #FF7A66; --on-accent: #15161A; --now: #FF7A66; --on-now: #15161A; --now-text: #FF7A66;
}
[data-theme="neon"][data-mode="night"] {
  --bg: #120E1E; --surface: #1C1730; --surface-2: #2A2344; --ink: #F1EEFA; --muted: #ADA5C8; --line: #382F58;
  --accent: #72F0E0; --on-accent: #120E1E; --now: #FF5AA8; --on-now: #120E1E; --now-text: #FF5AA8;
}
[data-theme="emerald"][data-mode="night"] {
  --bg: #0A1D18; --surface: #112B24; --surface-2: #1A3A31; --ink: #EEF5F1; --muted: #9DB8AE; --line: #24493E;
  --accent: #E5B95C; --on-accent: #0A1D18; --now: #E5B95C; --on-now: #0A1D18; --now-text: #E5B95C;
}
[data-theme="cocoa"][data-mode="night"] {
  --bg: #1A1310; --surface: #271D18; --surface-2: #352822; --ink: #F6EDE4; --muted: #BBA797; --line: #46362E;
  --accent: #EBCDA4; --on-accent: #1A1310; --now: #E8955A; --on-now: #1A1310; --now-text: #E8955A;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.35; -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
:focus-visible { outline: 3px solid var(--now); outline-offset: 2px; }
.display { font-family: "Unbounded", "Golos Text", system-ui, sans-serif; letter-spacing: -0.03em; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* Всё приложение живёт в одной рамке: на телефоне она занимает весь экран,
   на компьютере становится окном размером с экран телефона (см. в конце файла). */
#app { position: relative; height: 100dvh; overflow: hidden; background: var(--bg); }
#view { height: 100%; overflow-y: auto; padding: 20px 18px calc(104px + env(safe-area-inset-bottom)); }
#view, .sheet { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 40%, transparent) transparent; }

/* ---------- нижняя панель */
#nav {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; align-items: center;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
}
.tab { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); border-radius: 12px; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: var(--ink); font-weight: 700; }
.fab { justify-self: center; width: 60px; height: 60px; margin-top: -26px; border-radius: 22px;
  background: var(--now); color: var(--on-now); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--now) 35%, transparent); }
.fab svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* ---------- общие части */
.topline { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); }
h1 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
h2 { margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.card { background: var(--surface); border-radius: 18px; padding: 16px; }
.btn { min-height: 48px; padding: 0 18px; border-radius: 14px; font-weight: 600; text-align: center;
  background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.quiet { background: var(--surface-2); color: var(--ink); }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.hot { background: var(--now); color: var(--on-now); }
.btn.danger { background: transparent; color: var(--comp); box-shadow: inset 0 0 0 1.5px var(--comp); }
.btn.wide { width: 100%; }
a.btn, a.link { text-decoration: none; }
a.link { display: inline-flex; align-items: center; text-decoration: underline; }
.btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.link { min-height: 44px; padding: 0 2px; font-weight: 600; color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; white-space: nowrap; }
.btn:disabled { opacity: .45; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); display: flex;
  align-items: center; justify-content: center; flex: none; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px;
  background: var(--surface-2); border-radius: 16px; }
.seg button { min-height: 40px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--muted); text-align: center; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }
.role-teach { --role: var(--teach); --role-soft: var(--teach-soft); }
.role-massage { --role: var(--massage); --role-soft: var(--massage-soft); }
.role-study { --role: var(--study); --role-soft: var(--study-soft); }
.role-self { --role: var(--self); --role-soft: var(--self-soft); }
.role-comp { --role: var(--comp); --role-soft: var(--comp-soft); }
.role-other { --role: var(--other); --role-soft: var(--other-soft); }
.role-kids { --role: var(--kids); --role-soft: var(--kids-soft); }
.empty { text-align: center; padding: 36px 12px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }

/* ---------- экран «Сейчас» */
.nowcard { padding: 4px 0 0; }
.nowcard .label { font-size: 14px; color: var(--muted); }
.nowcard .what { font-size: 20px; font-weight: 600; }
.hero { position: relative; background: var(--surface); border-radius: 26px; padding: 20px 20px 18px; overflow: hidden; }
.hero .label { font-size: 14px; color: var(--muted); }
.hero .time { font-size: 68px; line-height: 1; font-weight: 700; margin: 6px 0 10px -3px; }
.hero .what { font-size: 22px; font-weight: 700; line-height: 1.2; }
.hero .where { color: var(--muted); margin-top: 2px; }
.hero .leave { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 14px;
  border-radius: 14px; background: var(--now); color: var(--on-now); font-weight: 600; }
.hero .leave svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hero .edge { position: absolute; top: 0; bottom: 0; right: 0; width: 10px; background: var(--role); }
.summary { font-size: 14px; color: var(--muted); }

/* ---------- лента дня */
.ribbon { position: relative; display: flex; flex-direction: column; }
.ribbon::before { content: ""; position: absolute; left: 67px; top: 14px; bottom: 14px; width: 3px;
  border-radius: 2px; background: var(--line); }
.stop { position: relative; display: grid; grid-template-columns: 52px 32px 1fr auto; align-items: start;
  width: 100%; padding: 10px 8px 10px 0; border-radius: 14px; min-height: 52px; }
.stop .t { font-weight: 700; padding-top: 1px; }
.stop .node { justify-self: center; width: 15px; height: 15px; margin-top: 4px; border-radius: 50%;
  background: var(--bg); border: 4px solid var(--role); z-index: 1; }
.stop .title { display: block; font-weight: 600; }
.stop .meta { display: block; font-size: 14px; color: var(--muted); }
.stop .state { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 9px; align-self: center; white-space: nowrap; }
.stop.done { color: var(--muted); }
.stop.done .title { font-weight: 500; }
.stop.done .node { background: var(--role); border-color: var(--role); opacity: .45; }
.stop.now { background: var(--surface); box-shadow: inset 0 0 0 2px var(--now); padding-left: 8px;
  grid-template-columns: 44px 32px 1fr auto; }
.stop.now .node { background: var(--now); border-color: var(--now); }
.stop.now .state { background: var(--now); color: var(--on-now); }
/* дело идёт без неё: занятие ребёнка или дело, которое делает помощник */
.stop.away .title { font-weight: 500; }
.stop.away .t { font-weight: 500; color: var(--muted); }
.stop.away .node { background: var(--bg); border-style: dashed; }
.cashhead { background: var(--surface); border-radius: 18px; padding: 16px; border-left: 8px solid var(--massage); }
.cashhead.low { border-left-color: var(--warn); }
.cashhead.gap { border-left-color: var(--comp); }
.cashhead .sum { font-size: 32px; line-height: 1.15; font-weight: 700; }
.cashchart { position: relative; height: 150px; display: flex; gap: 1px; touch-action: pan-y; cursor: pointer; }
.cashchart .col { flex: 1; position: relative; border-radius: 3px; }
.cashchart .col.sel { background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); }
.cashchart .col i { position: absolute; left: 0; right: 0; min-height: 2px; border-radius: 2px; background: var(--massage); }
.cashchart .col.low i { background: var(--warn); }
.cashchart .col.neg i { background: var(--comp); }
.cashchart .zero, .cashchart .cushion { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px solid var(--ink); opacity: .55; pointer-events: none; }
.cashchart .cushion { border-top-style: dashed; opacity: .4; }
.cashticks { display: flex; font-size: 12px; color: var(--muted); }
.cashticks span { flex: 1; }
.weekrow { display: grid; grid-template-columns: 1fr 64px 64px 78px; gap: 8px; align-items: baseline; padding: 8px 0; font-size: 14px;
  border-top: 1px solid var(--line); text-align: right; }
.weekrow span:first-child { text-align: left; }
.weekrow.head { border-top: 0; padding-top: 0; color: var(--muted); font-size: 13px; }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rolepick { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px; background: var(--surface);
  color: var(--ink); font-size: 14px; font-weight: 600; text-align: left; box-shadow: inset 0 0 0 1.5px var(--line); }
.rolepick i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--role); }
.rolepick[aria-pressed="true"] { background: var(--role-soft); color: var(--role); box-shadow: inset 0 0 0 2px var(--role); }
.forces { display: flex; gap: 4px; height: 76px; align-items: stretch; }
.force { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); }
.force i { width: 100%; min-height: 3px; border-radius: 4px; background: var(--massage); }
.force.heavy i { background: var(--ink); }
.gauge { height: 8px; margin: 6px 0 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.gauge i { display: block; height: 100%; border-radius: 4px; background: var(--role); }
.gauge.over i { background: var(--comp); }
.themehead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 4px; }
.themehead h2 { margin: 0; white-space: nowrap; }
.themehead span { font-size: 13px; color: var(--muted); }
.pairseg { margin-top: -4px; }
.poster { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line), 0 10px 28px rgb(0 0 0 / .12); }
.who { display: inline-block; margin-top: 3px; padding: 2px 8px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: var(--role-soft); color: var(--role); }
.who.wait { background: var(--self-soft); color: var(--warn); }
.kid { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.kid h2 { margin: 0; flex: 1; }
.person { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 48px; padding: 6px 14px;
  border-radius: 14px; background: var(--surface); color: var(--ink); font-weight: 600; text-align: left; box-shadow: inset 0 0 0 1.5px var(--line); }
.person small { font-size: 12px; font-weight: 500; color: var(--muted); }
.leg { display: grid; grid-template-columns: 52px 32px 1fr; align-items: center; font-size: 13px; color: var(--muted);
  min-height: 30px; }
.leg i { justify-self: center; width: 3px; height: 30px; background: repeating-linear-gradient(var(--bg) 0 4px, transparent 4px 8px); z-index: 1; }
.leg.hot { color: var(--now-text); font-weight: 700; }
.nowline { display: grid; grid-template-columns: 52px 32px 1fr; align-items: center; min-height: 26px;
  font-size: 12px; font-weight: 700; color: var(--now-text); }
.nowline i { justify-self: center; width: 13px; height: 13px; border-radius: 50%; background: var(--now); z-index: 1;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--now) 22%, transparent); }
.nowline span:last-child { border-top: 2px solid var(--now); padding-top: 2px; }

/* ---------- календарь */
.calhead { display: flex; align-items: center; gap: 8px; }
.calhead h1 { flex: 1; font-size: 22px; }
.week { display: flex; flex-direction: column; gap: 12px; }
.wk-days, .lane-cells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wk-day { min-height: 48px; border-radius: 12px; text-align: center; font-size: 12px; color: var(--muted);
  display: flex; flex-direction: column; justify-content: center; }
.wk-day b { font-size: 16px; color: var(--ink); }
.wk-day.today { background: var(--ink); color: var(--bg); }
.wk-day.today b { color: var(--bg); }
.lane-name { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--role); margin-bottom: 5px; }
.lane-cells > div { min-height: 34px; border-radius: 9px; background: var(--role-soft); padding: 3px;
  display: flex; flex-direction: column; gap: 3px; }
.chip { min-height: 28px; border-radius: 7px; background: var(--role); color: var(--surface); font-size: 12px;
  font-weight: 700; text-align: center; letter-spacing: -0.02em; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.month-grid .wd { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding-bottom: 4px; }
.mday { min-height: 46px; border-radius: 13px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; font-weight: 600; }
.mday i { height: 4px; border-radius: 2px; background: var(--accent); opacity: .55; }
.mday.today { box-shadow: inset 0 0 0 2px var(--now); }
.mday[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.mday[aria-pressed="true"] i { background: var(--bg); opacity: 1; }
.list { display: flex; flex-direction: column; }
.item { display: grid; grid-template-columns: 12px 50px 1fr; gap: 10px; align-items: center; width: 100%;
  min-height: 48px; padding: 6px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--role); }
.item .t { font-weight: 700; }
.year-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ymonth { background: var(--surface); border-radius: 16px; padding: 12px 12px 10px; min-height: 104px;
  display: flex; flex-direction: column; gap: 7px; }
.ymonth.cur { box-shadow: inset 0 0 0 2px var(--now); }
.ymonth b { font-size: 15px; }
.ymonth .bar { height: 5px; border-radius: 3px; background: var(--surface-2); }
.ymonth .bar i { display: block; height: 5px; border-radius: 3px; background: var(--accent); }
.ymonth small { font-size: 12px; color: var(--muted); }
.ymonth .start { font-size: 12px; font-weight: 700; color: var(--comp); }
.banner { background: var(--ink); color: var(--bg); border-radius: 18px; padding: 14px 16px; display: flex;
  align-items: center; gap: 14px; }
.banner .big { font-size: 40px; line-height: 1; font-weight: 700; }

/* ---------- разделы и настройки */
.module { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; padding: 12px 0;
  border-top: 1px solid var(--line); }
.module:first-of-type { border-top: 0; }
.module b { font-weight: 600; }
.module small { grid-column: 1; font-size: 13px; color: var(--muted); }
.badge { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 12px; font-weight: 700; padding: 5px 10px;
  border-radius: 10px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--massage-soft); color: var(--massage); }
.chev { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--muted); display: flex; }
.chev svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.theme { border-radius: 16px; padding: 10px; min-height: 76px; display: flex; flex-direction: column;
  justify-content: space-between; font-size: 14px; font-weight: 600; background: var(--bg); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line); }
.theme[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--now); }
.theme .sw { display: flex; gap: 4px; }
.theme .sw i { width: 18px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.place { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; width: 100%;
  min-height: 52px; padding: 6px 0; border-top: 1px solid var(--line); }
.place:first-child { border-top: 0; }

/* ---------- разделы второй волны */
.row .input { flex: 1; min-width: 0; }
.shift { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.shift:first-of-type { border-top: 0; }
.shift b, .shift s, .shift .title, .shift .meta { display: block; }
.shift s { font-size: 12px; color: var(--muted); }
.shift .title { font-weight: 600; }
.shift .meta { font-size: 14px; color: var(--muted); }
.shift.moved b { color: var(--now-text); }
.shift.bad .meta { color: var(--comp); font-weight: 600; }
.msg { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); }
.msg p { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.msg .btn.send { background: var(--ink); color: var(--bg); }
.msg .btn { background: var(--surface); min-height: 44px; padding: 0 14px; }
.msg + .msg { margin-top: 8px; }
.slot { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 18px; background: var(--surface); }
.slot.best { box-shadow: inset 0 0 0 2px var(--massage); }
.slot .when { font-size: 26px; line-height: 1.15; font-weight: 700; }
.mark { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 9px; background: var(--massage-soft); color: var(--massage); }
.tick { display: flex; align-items: center; gap: 12px; min-height: 48px; border-top: 1px solid var(--line); }
.tick:first-of-type { border-top: 0; }
.tick.off .grow { color: var(--muted); text-decoration: line-through; }
button.tick { width: 100%; text-align: left; }
.stack > div:empty, .stack > [hidden] { display: none; }
.box { width: 28px; height: 28px; flex: none; border-radius: 9px; display: grid; place-items: center;
  box-shadow: inset 0 0 0 2px var(--muted); }
.box[aria-checked="true"] { background: var(--accent); box-shadow: none; }
/* галочка есть всегда, но спрятана: при отметке она мягко «встаёт» на место */
.box::after { content: ""; width: 12px; height: 6px; border-left: 2.5px solid var(--on-accent);
  border-bottom: 2.5px solid var(--on-accent); transform: translateY(-1px) rotate(-45deg) scale(.2); opacity: 0;
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), opacity .12s ease; }
.box[aria-checked="true"]::after { transform: translateY(-1px) rotate(-45deg); opacity: 1; }
.x { width: 40px; height: 40px; flex: none; border-radius: 12px; font-size: 22px; line-height: 1; text-align: center; color: var(--muted); }
.req { padding: 12px 0; border-top: 1px solid var(--line); }
.req:first-of-type { border-top: 0; padding-top: 0; }
.tag { padding: 6px 11px; border-radius: 10px; background: var(--surface-2); font-size: 14px; font-weight: 500; }
.meter { height: 8px; margin-top: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--massage); }
.warnline { font-size: 14px; font-weight: 600; color: var(--warn); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { padding: 12px; border-radius: 16px; background: var(--role-soft); color: var(--role); font-size: 14px; font-weight: 600; }
.tile .display { font-size: 34px; line-height: 1.1; font-weight: 700; }
.bars { display: flex; align-items: flex-end; gap: 6px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.bar b { min-height: 16px; color: var(--ink); }
.bar i { width: 100%; border-radius: 6px; background: var(--role-soft); }
.bar.cur i { background: var(--role); }
.entry { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; width: 100%; min-height: 52px;
  padding: 6px 0; border-top: 1px solid var(--line); text-align: left; }
.entry:first-child { border-top: 0; }
.entry .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--role); }
.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.phase { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 12px; background: var(--surface);
  font-size: 12px; color: var(--muted); }
.phase b { font-size: 14px; color: var(--ink); }
.phase.cur { background: var(--accent); color: var(--on-accent); }
.phase.cur b { color: var(--on-accent); }
.load { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 12px; }
.load i { height: 10px; border-radius: 5px; background: var(--surface-2); }
.load i.on { background: var(--now); }
.strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.sday { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-height: 100px;
  border-radius: 10px; font-size: 12px; color: var(--muted); }
.sday i { width: 68%; border-radius: 6px; background: var(--accent); opacity: .4; }
.sday i.hi { background: var(--now); opacity: 1; }
.sday b { font-size: 14px; color: var(--ink); }

/* ---------- нижний лист и форма */
.backdrop { position: absolute; inset: 0; z-index: 20; background: rgba(8, 14, 22, .5); display: flex; align-items: flex-end;
  opacity: 0; transition: opacity .18s ease; }
.backdrop.open { opacity: 1; }
.sheet { width: 100%; max-height: 92%; overflow-y: auto; background: var(--bg); border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); transform: translateY(24px); transition: transform .2s ease; }
.backdrop.open .sheet { transform: none; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet h1 { font-size: 22px; margin-bottom: 4px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 500; }
.input:focus { border-color: var(--accent); outline: none; }
textarea.input { min-height: 132px; padding: 12px 14px; line-height: 1.4; resize: vertical; font-family: inherit; }
textarea.input.dump { min-height: 48px; height: 48px; resize: none; overflow-y: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { min-height: 40px; padding: 0 13px; border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 14px;
  font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--line); }
.pick[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two .btn { padding: 0 8px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }   /* «Опаздываю», «Не забыть», «Найти окно» */
.three .btn { padding: 4px 6px; font-size: 14px; line-height: 1.15; white-space: normal; text-align: center; }
.note { font-size: 14px; border-radius: 14px; padding: 11px 14px; background: var(--self-soft); color: var(--warn); font-weight: 500; }
.preview { background: var(--surface); border-radius: 18px; padding: 14px 16px; border-right: 8px solid var(--role); }
.preview b { font-size: 18px; }
#toast { position: absolute; left: 50%; bottom: calc(112px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px);
  z-index: 30; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-weight: 600;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; width: max-content; max-width: 86%; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

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

/* ---------- на компьютере: окно размером с экран телефона */
@media (min-width: 560px) {
  body { display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, var(--ink)); }
  #app { width: 390px; height: min(844px, calc(100dvh - 44px)); border-radius: 44px;
    box-shadow: 0 0 0 11px #0A0E13, 0 0 0 12px rgba(255, 255, 255, .16), 0 44px 80px -24px rgba(8, 14, 22, .6); }
  #view { padding-top: 28px; }
}

/* кнопки-блоки занимают всю ширину и выравнивают текст слева */
button.hero, button.ymonth, button.module, button.place, button.item { display: block; width: 100%; text-align: left; }
button.hero { display: block; }
button.ymonth { display: flex; }
button.module { display: grid; }
button.place { display: grid; }
button.item { display: grid; }
.stop > span:nth-child(3) { text-align: left; min-width: 0; }

/* «Завтра готово»: последний экран вечернего разбора */
.ready { background: var(--self-soft); box-shadow: none; }
.ready h2 { color: var(--ink); }
.readyline { padding: 5px 0; font-size: 16px; line-height: 1.35; }
.readyend { margin-top: 14px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }

/* форма дела: свободно ли время и «Найти окно» */
.slotline { font-size: 14px; }
.freeline { font-size: 14px; font-weight: 600; color: var(--massage); }
.slotbox { padding: 12px; border-radius: 18px; background: var(--surface-2); }
.slotbox[hidden] { display: none; }
.btn:disabled { opacity: .55; }

/* свободное время на неделю, месяц, три месяца */
.freepick b { font-size: 14px; }
.freepick .seg { background: var(--surface); }
.freepick .seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.freebest { display: grid; gap: 6px; }
.bestrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 14px; background: var(--surface); min-height: 48px; }
.bestrow.top { box-shadow: inset 0 0 0 2px var(--massage); }
.bestrow .num { font-weight: 700; font-size: 15px; }
.bestrow small { grid-column: 1 / -1; font-size: 13px; color: var(--muted); line-height: 1.3; }
.freeweek { display: grid; gap: 10px; }
.freeday { display: grid; gap: 6px; }
.freeday .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.freeday.today .lbl { color: var(--ink); }
.freeday .lbl small { font-weight: 500; }
.freemonth { display: grid; gap: 6px; }
.freegrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.freegrid .wd { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 2px; }
.fd { aspect-ratio: 1; min-height: 40px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--muted);
  display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.fd.l1 { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--massage); }
.fd.l2 { color: var(--massage); background: var(--massage-soft); font-weight: 700; }
.fd.today { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.fd:disabled { opacity: .35; }
.fd[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.freedetail { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface); }

/* деньги на неделю: четыре числа */
.wmgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wm { display: grid; gap: 2px; align-content: start; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); min-width: 0; }
.wm .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.wm b { font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.wm small { font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.wm.in { background: var(--massage-soft); }
.wm.in b { color: var(--massage); }
.wm.out { background: var(--comp-soft); }
.wm.out b { color: var(--comp); }
.wm.bonus { background: var(--self-soft); }
.wm.bonus b { color: var(--warn); }
.note.good { background: var(--massage-soft); color: var(--massage); }

/* начало и конец дела, свободное время между делами */
.list.agenda .item { grid-template-columns: 12px 104px 1fr; }
.list.agenda .item .t { font-size: 15px; white-space: nowrap; }
.item.away { opacity: .75; }
.freerow { display: grid; grid-template-columns: 104px 1fr; gap: 10px; align-items: center; width: 100%; text-align: left; min-height: 40px;
  margin-left: 22px; width: calc(100% - 22px); padding: 6px 10px; border-radius: 12px; border: 1.5px dashed var(--line); color: var(--muted); font-size: 14px; }
.freerow .num { font-weight: 600; }
.list.agenda .freerow { margin-top: 6px; margin-bottom: 6px; }
.stop .t small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.leg.free { padding: 2px 0; }
.leg.free .freerow { margin-left: 0; width: 100%; }

/* страницы экрана «Сейчас»: точки, по которым видно, что можно листать */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 28px; }
.pdot { min-width: 10px; height: 10px; border-radius: 10px; background: var(--line); padding: 0; font-size: 12.5px; font-weight: 700; color: var(--bg); }
.pdot[aria-selected="true"] { height: 26px; padding: 0 12px; background: var(--ink); }
.pdot::after { content: ""; display: block; min-width: 24px; min-height: 24px; margin: -7px; }
.pdot[aria-selected="true"]::after { display: none; }
#view[data-slide="next"] > .stack { animation: slide-next .22s ease-out; }
#view[data-slide="prev"] > .stack { animation: slide-prev .22s ease-out; }
@keyframes slide-next { from { transform: translateX(28px); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes slide-prev { from { transform: translateX(-28px); opacity: .3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #view > .stack { animation: none !important; } }
.wmgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wmgrid.three .wm b { font-size: 19px; }
.hbar { display: grid; gap: 2px; font-size: 15px; }
.hbar small { font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.hbar .gauge i { background: var(--role, var(--accent)); }
.hbar.over .gauge i { background: var(--comp); }
.hbar.off { color: var(--muted); }
.insight { font-size: 15px; line-height: 1.4; padding-left: 12px; border-left: 3px solid var(--accent); }
.valrow { display: grid; gap: 2px; padding-left: 12px; border-left: 3px solid var(--role); }
.valrow small { font-size: 13px; color: var(--muted); line-height: 1.3; }
.cols { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; align-items: end; }
.cols .col { display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--muted); align-content: end; }
.cols .col b { font-size: 11px; color: var(--ink); min-height: 14px; }
.cols .col i { display: block; width: 100%; max-width: 16px; border-radius: 4px; background: var(--accent); }
.cols .col.today span { color: var(--ink); font-weight: 700; }

/* сумка: чья она - для работы, для меня, для детей */
.baghead { display: flex; align-items: center; gap: 8px; margin: 6px 2px -4px; font-size: 16px; }
.baghead i { width: 12px; height: 12px; border-radius: 4px; background: var(--bagc); }
.baghead .muted { font-size: 13px; margin-left: auto; }
.bagcard { box-shadow: inset 4px 0 0 var(--bagc); }
.bag-work { --bagc: var(--massage); }
.bag-me { --bagc: var(--self); }
.bag-kids { --bagc: var(--kids); }

/* расходы по категориям */
.cat-kids { --role: var(--kids); } .cat-car { --role: var(--teach); } .cat-home { --role: var(--study); }
.cat-food { --role: var(--self); } .cat-work { --role: var(--massage); } .cat-health { --role: var(--comp); } .cat-other { --role: var(--other); }

/* «Собрать неделю», цели и горизонт */
.planrow { display: flex; gap: 12px; align-items: flex-start; padding-top: 12px; border-top: 1px solid var(--line); }
.planrow:first-child { border-top: 0; padding-top: 0; }
.planrow .grow { display: grid; gap: 4px; min-width: 0; }
.planrow small { font-size: 13px; color: var(--muted); line-height: 1.3; }
.goal { border-top: 1px solid var(--line); }
.goal:first-of-type { border-top: 0; }
.aheadweek { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.aheadweek:first-of-type { border-top: 0; padding-top: 0; }
.aheadweek > b { font-size: 14px; }
.aheadrow { display: grid; grid-template-columns: 104px 1fr; gap: 10px; font-size: 15px; line-height: 1.35; }
.aheadrow .num { font-size: 13px; padding-top: 2px; }

/* сферы жизни */
.sphere { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.sphere:first-of-type { border-top: 0; padding-top: 0; }
.sphere small { font-size: 13px; line-height: 1.35; color: var(--muted); }
.pick.rate { min-width: 44px; justify-content: center; text-align: center; }

/* рисунки вещей */
.thingpic { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.thingpic .f { fill: var(--thing-fill, var(--surface-2)); }

/* сборка сумки с полок */
.packbar { position: sticky; top: -20px; z-index: 6; margin: 0 -18px; padding: 10px 18px 12px; background: var(--bg); display: grid; gap: 10px;
  box-shadow: 0 1px 0 var(--line); }
.bagtiles { display: flex; gap: 8px; overflow-x: auto; padding: 3px; margin: -3px; scrollbar-width: none; }
.bagtiles::-webkit-scrollbar { display: none; }
.bagtile { flex: 1 0 104px; min-width: 0; display: grid; gap: 1px; text-align: left; padding: 9px 11px; border-radius: 14px; background: var(--surface);
  box-shadow: inset 0 4px 0 var(--bagc); }
.bagtile small { font-size: 12px; color: var(--muted); font-weight: 500; padding-top: 3px; }
.bagtile b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bagtile span { font-size: 12px; color: var(--muted); }
.bagtile[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.bagtile[aria-pressed="true"] small, .bagtile[aria-pressed="true"] span { color: inherit; opacity: .8; }
.inbag { display: grid; gap: 8px; padding: 10px 12px 12px; border-radius: 16px; background: var(--surface); border: 2px dashed var(--bagc); }
.inbag .pick.once { min-height: 32px; font-size: 13px; padding: 0 10px; }
.inbaglist { display: flex; flex-wrap: wrap; gap: 6px; max-height: 118px; overflow-y: auto; }
.inbagitem { display: inline-flex; align-items: center; gap: 5px; padding: 0 2px 0 8px; min-height: 34px; border-radius: 10px; background: var(--surface-2);
  font-size: 13px; font-weight: 600; }
.inbagitem.once { box-shadow: inset 0 0 0 1.5px var(--line); background: transparent; }
.inbagitem .thingpic { width: 20px; height: 20px; }
.inbagitem .x { width: 30px; height: 32px; font-size: 18px; }
.shelf { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: 18px; padding: 4px 12px 10px; }
.shelfhead { display: flex; align-items: center; gap: 10px; min-height: 52px; width: 100%; text-align: left; font-size: 16px; }
.shelfhead .muted { font-size: 13px; }
.shelfhead .chev { display: flex; }
.shelfhead .chev svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .15s; }
.shelfhead[aria-expanded="true"] .chev svg { transform: rotate(90deg); }
/* вещи стоят на досках: под каждым рядом своя */
.planks { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 4px; row-gap: 16px; padding: 4px 0 8px;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 88px, var(--line) 88px, var(--line) 92px, transparent 92px, transparent 98px); }
.thing { position: relative; height: 82px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; padding: 4px 2px 5px;
  border-radius: 12px; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.thing .thingpic { width: 38px; height: 38px; }
.thing span { font-size: 11.5px; line-height: 13px; height: 26px; font-weight: 600; text-align: center; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.thing[aria-pressed="true"] .thingpic { opacity: .3; }
.thing[aria-pressed="true"] span { color: var(--muted); }
.thing[aria-pressed="true"]::after { content: ""; position: absolute; top: 6px; right: calc(50% - 26px); width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.7 2.7L13 6.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.thing.add .plus { width: 38px; height: 38px; border-radius: 12px; border: 2px dashed var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1; height: 38px; color: var(--muted); }
.thing.add span:last-child { color: var(--muted); }
.tint-0 { --thing-fill: var(--teach-soft); } .tint-1 { --thing-fill: var(--self-soft); } .tint-2 { --thing-fill: var(--massage-soft); }
.tint-3 { --thing-fill: var(--kids-soft); } .tint-4 { --thing-fill: var(--study-soft); } .tint-5 { --thing-fill: var(--comp-soft); }
.tint-6 { --thing-fill: var(--other-soft); }
.picgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-height: 236px; overflow-y: auto; padding: 2px; }
.pic { height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--surface); }
.pic .thingpic { width: 30px; height: 30px; }
.pic[aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--ink); }
/* перетаскивание */
.dragghost { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; margin: 0; background: var(--surface); border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28); opacity: .96; }
.dragging { opacity: .3; }
.dropover { outline: 3px solid var(--now); outline-offset: 2px; }
body.dragmode { cursor: grabbing; user-select: none; -webkit-user-select: none; }
body.dragmode * { cursor: grabbing !important; }

/* не успеваете */
.ontime { box-shadow: inset 5px 0 0 var(--now); }
.ontime.tight { box-shadow: inset 5px 0 0 var(--line); }
.ontime > b { font-size: 18px; }

/* кто за что отвечает: дорожки людей и дела, которые к ним перетаскивают */
.lane { display: grid; gap: 8px; padding: 10px 12px 12px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 4px 0 0 var(--lanec, var(--line)); }
.lane-me { --lanec: var(--self); } .lane-helper { --lanec: var(--teach); } .lane-kid { --lanec: var(--kids); } .lane-other { --lanec: var(--other); }
.lane.pool { background: transparent; box-shadow: none; border: 2px dashed var(--line); }
.zonechip { min-height: 40px; padding: 0 13px; border-radius: 12px; background: var(--surface); font-size: 14px; font-weight: 600; text-align: left;
  box-shadow: inset 0 0 0 1.5px var(--line); touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.zonechip.ghost { background: transparent; box-shadow: none; border: 1.5px dashed var(--line); color: var(--muted); font-weight: 500; }
.zonechip.dragghost { box-shadow: 0 12px 28px rgba(0, 0, 0, .28); }
.agenda-sec b { font-size: 15px; }
.agenda-sec ul { margin: 4px 0 0; padding-left: 20px; font-size: 14px; color: var(--ink); display: grid; gap: 3px; }

/* блюда, рецепты, меню на день */
.foodpic { --thing-fill: var(--self-soft); }
.dishpic { width: 52px; height: 52px; flex: none; border-radius: 14px; background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  overflow: hidden; }
.dishpic .thingpic { width: 34px; height: 34px; }
.dishpic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dishpic.big { width: 100%; height: 150px; border-radius: 18px; }
.dishpic.big .thingpic { width: 84px; height: 84px; stroke-width: 1.3; }
.dishrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 6px 0; text-align: left; border-top: 1px solid var(--line); }
.dishrow:first-of-type { border-top: 0; }
.dishrow b { display: block; font-size: 16px; }
.dishrow small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.dishrow .chev { display: flex; }
.dishrow .chev svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mealcard { display: grid; gap: 8px; }
.mealtime { font-size: 30px; line-height: 1; }
.meallabel { font-size: 16px; font-weight: 600; color: var(--muted); padding-left: 10px; }
.recipe h2 { font-size: 17px; margin: 0 0 6px; }
.recipe ul, .recipe ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 15px; line-height: 1.4; }
.recipe ol li::marker { font-weight: 700; }
.recipe summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
textarea.input { height: auto; padding-top: 12px; padding-bottom: 12px; line-height: 1.4; resize: vertical; font: inherit; }

/* таблетки и витамины */
.medcard { box-shadow: inset 5px 0 0 var(--massage); }
.medcard > b { font-size: 17px; }
.mealgrid { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 6px; align-items: center; font-size: 14px; }
.mealgrid .pick { padding: 0 6px; justify-content: center; text-align: center; }

/* сферы жизни: строка инструментов дня и список сфер */
.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 2px;
  border-radius: 14px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; text-align: center; }
.tool svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.module.sphere { grid-template-columns: auto 1fr auto; align-items: center; }
.module.sphere .sphico { grid-row: 1 / span 2; grid-column: 1; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 12px; background: var(--bg); color: var(--ink); }
.module.sphere .sphico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.module.sphere b, .module.sphere small { grid-column: 2; }
.module.sphere .chev { grid-column: 3; gap: 8px; align-items: center; }
.todaybadge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.pick[aria-pressed="true"] .muted { color: inherit; opacity: .8; }
.pick.add { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted); }
.pick[disabled] { opacity: .55; }
.tickbtn { display: flex; align-items: center; gap: 12px; flex: 1; min-height: 48px; text-align: left; }
.module small.bad { color: var(--warn); font-weight: 600; }
.module small.warn { color: var(--ink); font-weight: 600; }
.module .chev b { font-size: 14px; white-space: nowrap; }

/* цвета сфер: у новых сфер цвет собирается из цветов оформления, поэтому подходит к любому стилю, дневному и ночному */
.role-care { --role: color-mix(in srgb, var(--massage) 55%, var(--kids)); --role-soft: color-mix(in srgb, var(--massage-soft) 55%, var(--kids-soft)); }
.role-hobby { --role: var(--comp); --role-soft: var(--comp-soft); }
.role-health { --role: color-mix(in srgb, var(--study) 50%, var(--self)); --role-soft: color-mix(in srgb, var(--study-soft) 50%, var(--self-soft)); }
.role-family { --role: color-mix(in srgb, var(--kids) 55%, var(--teach)); --role-soft: color-mix(in srgb, var(--kids-soft) 55%, var(--teach-soft)); }
.role-food { --role: color-mix(in srgb, var(--self) 50%, var(--comp)); --role-soft: color-mix(in srgb, var(--self-soft) 50%, var(--comp-soft)); }
.role-home { --role: color-mix(in srgb, var(--other) 55%, var(--self)); --role-soft: color-mix(in srgb, var(--other-soft) 55%, var(--self-soft)); }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .pick { flex: none; }
.tonepick { display: inline-flex; align-items: center; gap: 7px; }
.tonepick i { width: 9px; height: 9px; border-radius: 50%; background: var(--role); }
.tonepick[aria-pressed="true"] i { background: var(--bg); }

/* ---------- режим «Готовлю»: шаг на экране, живой значок действия, таймер. Движение лёгкое и короткое. */
.cook { display: grid; gap: 14px; }
.cookhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cookhead b { font-size: 17px; }
.cookdots { display: flex; gap: 5px; }
.cookdots i { flex: 1; height: 4px; border-radius: 2px; background: var(--line, rgba(0,0,0,.12)); transition: background .2s ease; }
.cookdots i.done { background: var(--massage, #2f7d5b); opacity: .55; }
.cookdots i.now { background: var(--massage, #2f7d5b); }
.cookstep { display: grid; justify-items: center; gap: 14px; padding: 18px 14px 16px; border-radius: 18px;
  background: var(--card, #fff); border: 1px solid var(--line, rgba(0,0,0,.08)); min-height: 250px; align-content: center; }
.cookstep p { margin: 0; font-size: 18px; line-height: 1.45; text-align: center; max-width: 34ch; }
.cookstep.from-next { animation: cook-in-next .2s ease both; }
.cookstep.from-prev { animation: cook-in-prev .2s ease both; }
@keyframes cook-in-next { from { transform: translateX(18px); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes cook-in-prev { from { transform: translateX(-18px); opacity: .2; } to { transform: none; opacity: 1; } }
.cookpic { width: 96px; height: 96px; }
.cookpic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.cookpic .c-fill { fill: color-mix(in srgb, var(--massage, #2f7d5b) 14%, transparent); }
.cookpic .c-move { transform-box: fill-box; transform-origin: center; }
.cookpic .c-chop { animation: c-chop 1.1s ease-in-out infinite; transform-origin: 100% 0; }
.cookpic .c-rise { animation: c-rise 2.2s ease-in-out infinite; }
.cookpic .c-bubble { animation: c-bubble 1.8s ease-in-out infinite; }
.cookpic .c-glow { fill: color-mix(in srgb, #e9892b 55%, transparent); stroke: none; animation: c-glow 2.4s ease-in-out infinite; }
.cookpic .c-whisk { animation: c-whisk 1.6s ease-in-out infinite; transform-origin: 50% 0; }
.cookpic .c-roll { animation: c-roll 1.8s ease-in-out infinite; }
.cookpic .c-hand { animation: c-hand 4s linear infinite; transform-origin: 0 0; }
.cookpic .c-twinkle { animation: c-twinkle 2.4s ease-in-out infinite; }
@keyframes c-chop { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-9deg) translateY(-3px); } }
@keyframes c-rise { 0% { transform: translateY(3px); opacity: 0; } 40% { opacity: .9; } 100% { transform: translateY(-5px); opacity: 0; } }
@keyframes c-bubble { 0% { transform: translateY(4px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-6px); opacity: 0; } }
@keyframes c-glow { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
@keyframes c-whisk { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes c-roll { 0%, 100% { transform: translateX(-7px); } 50% { transform: translateX(7px); } }
@keyframes c-hand { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes c-twinkle { 0%, 100% { opacity: .25; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.05); } }
.cooktimer { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--massage, #2f7d5b) 12%, transparent); }
.cooktimer b { font-size: 20px; }
.cooktimer span { flex: 1; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .cookpic .c-move, .cookstep { animation: none !important; } }

/* важная дата в календаре: день рождения, срок, врач */
.datenote { display: block; width: 100%; text-align: left; }
.mday.dated { position: relative; }
.mday.dated::after { content: ""; position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--now); }
/* кнопка листа, которая остаётся внизу при прокрутке длинного списка */
.sheetbar { position: sticky; bottom: 0; z-index: 2; display: grid; gap: 8px; margin: 0 -18px calc(-22px - env(safe-area-inset-bottom));
  padding: 10px 18px calc(14px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: 0 -10px 14px -12px rgba(8, 14, 22, .35); }
/* меню на неделю таблицей: день и три приёма пищи */
.weekmenu { display: grid; grid-template-columns: 38px repeat(3, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.wmhead { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; padding-bottom: 2px; }
.wmday { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 12px; min-height: 64px; }
.wmday b { font-size: 17px; line-height: 1; }
.wmday small { font-size: 11px; color: var(--muted); font-weight: 600; }
.wmday.today { background: var(--ink); color: var(--bg); }
.wmday.today small { color: var(--bg); opacity: .8; }
.wmcell { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; min-height: 64px; padding: 5px 3px;
  border-radius: 12px; background: var(--surface-2); text-align: center; min-width: 0; }
.wmcell .dishpic { width: 40px; height: 34px; border-radius: 10px; }
.wmcell .dishpic .thingpic { width: 24px; height: 24px; }
.wmname { font-size: 11px; line-height: 13px; font-weight: 600; max-height: 26px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow-wrap: anywhere; width: 100%; }
.wmcell.empty { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); justify-content: center; }
.wmplus { font-size: 20px; line-height: 1; color: var(--muted); }
/* шаги экрана «Питание»: номер, название, сколько уже сделано */
.stephead { display: flex; align-items: center; gap: 10px; }
.stephead small { font-size: 13px; font-weight: 600; white-space: nowrap; }
.stepn { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700;
  background: var(--surface-2); color: var(--ink); }
.stepn.now { background: var(--now); color: var(--on-now); }
/* цена у покупки: своя из прошлых чеков; «цена» - вписать */
.price { min-height: 36px; padding: 0 10px; border-radius: 10px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); background: var(--surface-2); white-space: nowrap; }
.price.none { font-weight: 600; color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
/* свой абонемент в карточке дела: нажимается, открывает абонемент */
.passnote { display: block; width: 100%; text-align: left; }
.passnote span { font-weight: 500; font-size: 13px; margin-top: 2px; }
/* «Назад» внизу экрана и «Закрыть» внизу длинного листа */
.backbottom { margin-top: 8px; }
.pagerow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }   /* страницы «Сейчас»: «Назад» и «Далее» */
.pagerow.one { grid-template-columns: 1fr; }
.loginpage { padding-top: 8px; }                         /* вход без Telegram */
.loginhead { display: grid; justify-items: center; text-align: center; gap: 6px; margin: 6px 0 4px; }
.loginhead img { border-radius: 18px; }
.loginhead h1 { margin: 4px 0 0; }
.loginlinks { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; font-size: 14px; }
.loginlinks a { color: var(--muted); }
.moveto { display: flex; gap: 10px; align-items: center; justify-content: space-between; }   /* «Перенести»: новое время и «Другое время» */
.moveto .btn { flex: 0 0 auto; padding: 0 14px; min-height: 38px; font-size: 14px; }
.sheetclose { margin-top: 16px; }
.barrow { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }      /* «Назад» рядом с «Готово» */
.sheetbar .sheetclose { margin-top: 0; }
/* своё число рядом с готовыми вариантами */
.chips .owncount { width: 92px; min-height: 40px; padding: 0 12px; font-size: 14px; font-weight: 600; flex: none; }


/* микрофон пишет: кнопка красная и мягко пульсирует, пока идёт запись */
.icon-btn.mic.rec { background: var(--comp); color: #fff; animation: mic-pulse 1.4s ease-in-out infinite; }
@keyframes mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--comp) 45%, transparent); } 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--comp) 0%, transparent); } }
@media (prefers-reduced-motion: reduce) { .icon-btn.mic.rec { animation: none; } }

/* ---------- лёгкое движение: всё короткое (до четверти секунды) и выключается вместе с анимацией в телефоне */
#view > .stack.enter { animation: screen-in .2s cubic-bezier(.2, .8, .2, 1) both; }           /* новый экран мягко проявляется */
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sheet { transition: transform .26s cubic-bezier(.22, 1, .36, 1); }                             /* лист выезжает плавно */
.backdrop:not(.open) .sheet { transition-duration: .16s; transition-timing-function: ease-in; }  /* и уходит быстрее */
:is(.pick, .rolepick, .box, .seg button, .pdot) { transition: background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .12s ease; }
:is(.btn, .pick, .rolepick, .icon-btn, .tool, .tab, .fab, .thing, .person):active:not(:disabled) { transform: scale(.97); }
:is(.module, .btn.wide):active:not(:disabled) { transform: scale(.985); }                    /* широкое нажимается едва заметно */
:is(.btn, .icon-btn, .tool, .tab, .fab, .thing, .person, .module) { transition: transform .12s ease; }
.tick:active .box { transform: scale(.9); }
@media (prefers-reduced-motion: reduce) {
  #view > .stack.enter { animation: none !important; }
  :is(.btn, .pick, .rolepick, .icon-btn, .tool, .tab, .fab, .thing, .person, .module, .box):active, .tick:active .box { transform: none; }
}

/* ========== ПЛАСТИЛИН: материал поверх любого цветового стиля, днём и ночью. Включается атрибутом data-skin="clay" у <html>,
   выключается в настройках («Оформление», «Гладкое»). Свет падает сверху слева: у детали светлый верхний край, мягкая тень
   снизу внутри и тень под ней. Углы чуть неровные, как у вылепленного руками. Нажатая деталь вдавливается.
   Всё сделано тенями box-shadow и градиентами, без фильтров на списках: при прокрутке не тормозит. */
[data-skin="clay"] {
  --c-hi: rgba(255, 255, 255, .92);                              /* свет на светлой детали */
  --c-lo: color-mix(in srgb, var(--ink) 13%, transparent);       /* тень внутри, снизу справа */
  --c-drop: color-mix(in srgb, var(--ink) 24%, transparent);     /* тень под деталью */
  --c-rim: color-mix(in srgb, var(--ink) 8%, transparent);
  --ch-hi: rgba(255, 255, 255, .42);                             /* то же на цветной детали */
  --ch-lo: rgba(0, 0, 0, .2);
  --clay-up: inset 2px 3px 4px var(--c-hi), inset -3px -5px 9px var(--c-lo), 0 9px 14px -9px var(--c-drop), 0 1px 2px var(--c-rim);
  --clay-up-s: inset 1px 2px 2px var(--c-hi), inset -2px -3px 5px var(--c-lo), 0 5px 7px -5px var(--c-drop), 0 1px 1px var(--c-rim);
  --clay-col: inset 2px 3px 4px var(--ch-hi), inset -3px -5px 8px var(--ch-lo), 0 9px 14px -8px var(--c-drop);
  --clay-col-s: inset 1px 2px 2px var(--ch-hi), inset -2px -3px 4px var(--ch-lo), 0 5px 7px -5px var(--c-drop);
  --clay-in: inset 2px 3px 5px color-mix(in srgb, var(--ink) 16%, transparent), inset -1px -2px 1px var(--c-hi);
  --clay-sheen: radial-gradient(130% 110% at 20% -15%, rgba(255, 255, 255, .26), transparent 56%);
  --r-card: 27px 22px 28px 23px / 23px 28px 22px 27px;
  --r-btn: 19px 16px 20px 16px / 16px 20px 16px 19px;
  --r-chip: 14px 12px 15px 12px / 12px 15px 12px 14px;
}
[data-skin="clay"][data-mode="night"] {
  --c-hi: rgba(255, 255, 255, .1); --c-lo: rgba(0, 0, 0, .3); --c-drop: rgba(0, 0, 0, .6); --c-rim: rgba(0, 0, 0, .35);
  --ch-hi: rgba(255, 255, 255, .45); --ch-lo: rgba(0, 0, 0, .24);
  --clay-in: inset 2px 3px 5px rgba(0, 0, 0, .5), inset -1px -2px 1px rgba(255, 255, 255, .07);
  --clay-sheen: radial-gradient(130% 110% at 20% -15%, rgba(255, 255, 255, .3), transparent 56%);
}

/* --- пластины: карточки и большие блоки */
[data-skin="clay"] :is(.card, .hero, .slot, .shelf, .ymonth, .cashhead, .preview, .cookstep, .freedetail, .bestrow, .inbag, .poster) {
  border-radius: var(--r-card); box-shadow: var(--clay-up); }
[data-skin="clay"] :is(.card, .slot, .shelf):nth-child(even) { border-radius: 23px 27px 22px 28px / 27px 22px 28px 23px; }
[data-skin="clay"] .cookstep { border: 0; }
[data-skin="clay"] .inbag { border: 0; box-shadow: inset 0 0 0 2.5px var(--bagc), var(--clay-up); }
[data-skin="clay"] .bagcard { box-shadow: inset 6px 0 0 var(--bagc), var(--clay-up); }
[data-skin="clay"] .ontime { box-shadow: inset 6px 0 0 var(--now), var(--clay-up); }
[data-skin="clay"] .ontime.tight { box-shadow: inset 6px 0 0 var(--line), var(--clay-up); }
[data-skin="clay"] .medcard { box-shadow: inset 6px 0 0 var(--massage), var(--clay-up); }
[data-skin="clay"] :is(.slot.best, .bestrow.top) { box-shadow: inset 0 0 0 2.5px var(--massage), var(--clay-up); }
[data-skin="clay"] .ymonth.cur { box-shadow: inset 0 0 0 2.5px var(--now), var(--clay-up); }
[data-skin="clay"] .hero .edge { width: 12px; box-shadow: inset 3px 0 3px rgba(255, 255, 255, .45), inset -3px 0 4px rgba(0, 0, 0, .22); }
[data-skin="clay"] .banner { border-radius: var(--r-card); box-shadow: var(--clay-col); background-image: var(--clay-sheen); }

/* --- мягкие цветные кусочки: заметки, плитки, сообщения */
[data-skin="clay"] :is(.note, .wm, .tile, .msg, .slotbox, .lane, .cooktimer, .ready) { border-radius: var(--r-btn); box-shadow: var(--clay-up-s); }
[data-skin="clay"] .lane { box-shadow: inset 5px 0 0 var(--lanec, var(--line)), var(--clay-up-s); }
[data-skin="clay"] .lane.pool { box-shadow: var(--clay-in); border: 0; }
[data-skin="clay"] .freerow { border: 0; border-radius: var(--r-chip); box-shadow: var(--clay-in); }

/* --- кнопки: цветной кусок пластилина, при нажатии вдавливается */
[data-skin="clay"] .btn { border-radius: var(--r-btn); box-shadow: var(--clay-col); background-image: var(--clay-sheen);
  transition: transform .12s ease, box-shadow .12s ease; }
[data-skin="clay"] :is(.btn.quiet, .msg .btn) { box-shadow: var(--clay-up-s); background-image: none; }
[data-skin="clay"] .btn.line { background: var(--surface); box-shadow: var(--clay-up-s); background-image: none; }
[data-skin="clay"] .btn.danger { background: var(--comp-soft); box-shadow: var(--clay-up-s); background-image: none; }
[data-skin="clay"] .msg .btn.send { box-shadow: var(--clay-col-s); background-image: var(--clay-sheen); }
[data-skin="clay"] .btn:active:not(:disabled) { transform: translateY(1.5px) scale(.985);
  box-shadow: inset 2px 3px 5px rgba(0, 0, 0, .22), inset -1px -2px 2px rgba(255, 255, 255, .22); }
[data-skin="clay"] .icon-btn { border-radius: var(--r-chip); box-shadow: var(--clay-up-s); transition: transform .12s ease; }
[data-skin="clay"] .icon-btn:active { transform: translateY(1px) scale(.96); box-shadow: var(--clay-in); }
[data-skin="clay"] .hero .leave { border-radius: var(--r-chip); box-shadow: var(--clay-col-s); background-image: var(--clay-sheen); }

/* --- выбор: кусочки поменьше. Выбранный цветной и выпуклый */
[data-skin="clay"] :is(.pick, .rolepick, .zonechip, .person, .tool, .pic, .bagtile, .phase, .tag, .inbagitem, .wk-day, .fd.l2) {
  border-radius: var(--r-chip); box-shadow: var(--clay-up-s); }
[data-skin="clay"] :is(.pick, .rolepick, .tool, .bagtile, .person, .fd, .mday, .theme) { transition: transform .12s ease; }
[data-skin="clay"] :is(.pick, .rolepick, .tool, .bagtile, .person, .fd, .mday, .theme):active { transform: scale(.96); }
[data-skin="clay"] :is(.pick[aria-pressed="true"], .bagtile[aria-pressed="true"], .fd[aria-pressed="true"], .mday[aria-pressed="true"], .phase.cur, .wk-day.today,
  .freepick .seg button[aria-pressed="true"], .todaybadge) { box-shadow: var(--clay-col-s); background-image: var(--clay-sheen); }
[data-skin="clay"] :is(.pick.add, .zonechip.ghost, .thing.add .plus) { background: transparent; border: 0; box-shadow: var(--clay-in); }
[data-skin="clay"] .rolepick[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--role), var(--clay-up-s); }
[data-skin="clay"] .rolepick i, [data-skin="clay"] .item .dot, [data-skin="clay"] .entry .dot, [data-skin="clay"] .tonepick i {
  background-image: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .6), transparent 55%); box-shadow: inset -1px -1px 2px rgba(0, 0, 0, .22); }
[data-skin="clay"] .bagtile { box-shadow: inset 0 5px 0 var(--bagc), var(--clay-up-s); }
[data-skin="clay"] .pic[aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--ink), var(--clay-up-s); }
[data-skin="clay"] .inbagitem.once { box-shadow: inset 0 0 0 1.5px var(--line), var(--clay-up-s); }
[data-skin="clay"] .fd.l1 { border-radius: var(--r-chip); box-shadow: inset 0 0 0 1.5px var(--massage); }
[data-skin="clay"] .mday { border-radius: var(--r-chip); }
[data-skin="clay"] .mday.today { box-shadow: inset 0 0 0 2px var(--now); }
[data-skin="clay"] .mday.today[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--now), var(--clay-col-s); }
[data-skin="clay"] :is(.badge, .mark, .who, .chip, .stop .state) { box-shadow: inset 1px 1px 1px var(--ch-hi), inset -1px -2px 2px color-mix(in srgb, var(--ink) 12%, transparent); }
[data-skin="clay"] .theme { border-radius: var(--r-btn); box-shadow: inset 0 0 0 1.5px var(--line), var(--clay-up-s); }
[data-skin="clay"] .theme[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--now), var(--clay-up-s); }
[data-skin="clay"] .theme .sw i { border-radius: 50%; box-shadow: inset 1px 2px 2px rgba(255, 255, 255, .5), inset -1px -2px 2px rgba(0, 0, 0, .22), 0 1px 2px rgba(0, 0, 0, .2); }

/* --- углубления: поля, переключатели, шкалы вдавлены в пластилин */
[data-skin="clay"] .input { border: 0; border-radius: var(--r-btn); box-shadow: var(--clay-in);
  background: color-mix(in srgb, var(--surface) 72%, var(--bg)); padding-left: 15px; padding-right: 15px; }
[data-skin="clay"] .input:focus { box-shadow: var(--clay-in), 0 0 0 2.5px var(--accent); }
[data-skin="clay"] .seg { border-radius: 19px 17px 20px 17px / 17px 20px 17px 19px; box-shadow: var(--clay-in); }
[data-skin="clay"] .seg button { border-radius: var(--r-chip); transition: transform .12s ease; }
[data-skin="clay"] .seg button[aria-pressed="true"] { box-shadow: var(--clay-up-s); }
[data-skin="clay"] .freepick .seg button[aria-pressed="true"] { box-shadow: var(--clay-col-s); }
[data-skin="clay"] :is(.gauge, .meter, .ymonth .bar) { box-shadow: inset 1px 2px 2px color-mix(in srgb, var(--ink) 18%, transparent); height: 9px; border-radius: 5px; }
[data-skin="clay"] :is(.gauge i, .meter i, .ymonth .bar i, .cashchart .col i, .cols .col i, .bar i, .sday i, .load i.on, .force i, .mday i, .cookdots i.done, .cookdots i.now) {
  box-shadow: inset 0 1px 1px var(--ch-hi), inset 0 -1px 1px var(--ch-lo); }
[data-skin="clay"] :is(.gauge i, .meter i, .ymonth .bar i) { border-radius: 5px; }
[data-skin="clay"] :is(.load i, .cookdots i) { box-shadow: inset 1px 1px 2px color-mix(in srgb, var(--ink) 20%, transparent); }
[data-skin="clay"] .box { border-radius: 10px 9px 11px 9px / 9px 11px 9px 10px; background: var(--surface-2);
  box-shadow: inset 2px 3px 4px color-mix(in srgb, var(--ink) 24%, transparent), inset -1px -2px 1px var(--c-hi);
  transition: transform .12s ease; }
[data-skin="clay"] .box[aria-checked="true"] { background: var(--accent); background-image: var(--clay-sheen); box-shadow: var(--clay-col-s); }
[data-skin="clay"] .tick:active .box { transform: scale(.9); }
[data-skin="clay"] .pdot { box-shadow: inset 1px 1px 2px color-mix(in srgb, var(--ink) 22%, transparent); }
[data-skin="clay"] .pdot[aria-selected="true"] { box-shadow: var(--clay-col-s); background-image: var(--clay-sheen); }

/* --- лента дня: жгутик и шарики */
[data-skin="clay"] .ribbon::before { width: 5px; left: 66px; border-radius: 3px; background: var(--surface-2);
  box-shadow: inset 1px 0 1px var(--c-hi), inset -1px 0 1px color-mix(in srgb, var(--ink) 18%, transparent); }
[data-skin="clay"] .stop .node { width: 17px; height: 17px; margin-top: 3px; border: 0; background: var(--role);
  background-image: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .62), transparent 52%);
  box-shadow: inset -2px -2px 3px rgba(0, 0, 0, .22), 0 2px 3px -1px var(--c-drop); }
[data-skin="clay"] .stop.done .node { opacity: .5; background-image: none; box-shadow: inset 1px 1px 2px rgba(0, 0, 0, .25); }
[data-skin="clay"] .stop.now { border-radius: var(--r-btn); box-shadow: inset 0 0 0 2.5px var(--now), var(--clay-up); }
[data-skin="clay"] .stop.now .node { background-color: var(--now); }
[data-skin="clay"] .stop.away .node { background: var(--bg); border: 3px dashed var(--role); box-shadow: none; width: 15px; height: 15px; margin-top: 4px; }
[data-skin="clay"] .nowline i { background-image: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .6), transparent 55%); }

/* --- нижняя панель: пластина, текущая вкладка вдавлена, кнопка «плюс» как шарик */
[data-skin="clay"] #nav { border-top: 0; border-radius: 26px 24px 0 0 / 24px 26px 0 0;
  box-shadow: inset 0 3px 3px var(--c-hi), 0 -8px 16px -10px var(--c-drop), 0 -1px 2px var(--c-rim); }
[data-skin="clay"] .tab { border-radius: var(--r-chip); transition: transform .12s ease; }
[data-skin="clay"] .tab svg { stroke-width: 2.6; filter: url(#clayline); }      /* значки вылеплены колбасками */
[data-skin="clay"] .tab[aria-current="page"] svg { color: var(--accent); }
[data-skin="clay"] .tab[aria-current="page"] { background: color-mix(in srgb, var(--surface) 55%, var(--bg)); box-shadow: var(--clay-in); }
[data-skin="clay"] .tab:active { transform: scale(.95); }
[data-skin="clay"] .fab { border-radius: 50% 47% 52% 48% / 48% 52% 47% 50%; background-image: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .5), transparent 46%);
  box-shadow: inset 3px 4px 6px rgba(255, 255, 255, .42), inset -4px -6px 9px rgba(0, 0, 0, .24), 0 10px 16px -6px color-mix(in srgb, var(--now) 60%, var(--c-drop));
  transition: transform .14s ease; }
[data-skin="clay"] .fab:active { transform: translateY(2px) scale(.94); }

/* --- лист снизу и подсказка */
[data-skin="clay"] .sheet { border-radius: 32px 28px 0 0 / 28px 32px 0 0; box-shadow: inset 0 3px 4px var(--c-hi), 0 -12px 28px -12px rgba(0, 0, 0, .4); }
[data-skin="clay"] .sheet .grab { height: 6px; box-shadow: inset 1px 1px 2px color-mix(in srgb, var(--ink) 25%, transparent); }
[data-skin="clay"] #toast { border-radius: var(--r-btn); box-shadow: var(--clay-col); background-image: var(--clay-sheen); }
[data-skin="clay"] .packbar { box-shadow: 0 6px 10px -8px var(--c-drop); }
[data-skin="clay"] .sheetbar { border-radius: 24px 22px 0 0 / 22px 24px 0 0; box-shadow: inset 0 3px 3px var(--c-hi), 0 -8px 14px -10px var(--c-drop); }
[data-skin="clay"] .note.datenote { text-align: left; }
[data-skin="clay"] .mday.dated::after { background-image: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .6), transparent 55%); box-shadow: inset -1px -1px 2px rgba(0, 0, 0, .2); }

/* --- значки: линия толще, как скатанный жгутик, под ней тень. Фильтр только на маленьких значках, не на списках целиком */
[data-skin="clay"] :is(.tool svg, .module.sphere .sphico svg, .icon-btn svg) { stroke-width: 2.1; }
[data-skin="clay"] .module.sphere .sphico { width: 42px; height: 42px; border-radius: 50% 46% 52% 47% / 47% 52% 46% 50%; background: var(--role, var(--accent));
  background-image: var(--clay-sheen); color: var(--surface); box-shadow: var(--clay-col-s); }
[data-skin="clay"] .module.sphere .sphico svg { stroke-width: 2.5; filter: url(#clayline); }
[data-skin="clay"] .tool svg { color: var(--accent); }
[data-skin="clay"] .thingpic { stroke-width: 1.9; stroke: color-mix(in srgb, var(--ink) 82%, var(--surface)); }
[data-skin="clay"] .thingpic .f { fill: color-mix(in srgb, var(--thing-fill, var(--surface-2)) 82%, var(--ink) 4%); }
[data-skin="clay"] :is(.thing, .pic, .dishpic, .inbagitem) .thingpic { filter: drop-shadow(0 2px 1.2px color-mix(in srgb, var(--ink) 30%, transparent)); }
[data-skin="clay"] img.thingpic { object-fit: contain; vertical-align: middle; filter: none; }      /* вылепленные вещи: тень уже в картинке */
[data-skin="clay"] .thing img.thingpic { width: 42px; height: 42px; }
[data-skin="clay"] .planks { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 87px,
  color-mix(in srgb, var(--line) 60%, var(--surface)) 87px, var(--line) 89px, color-mix(in srgb, var(--line) 80%, var(--ink)) 93px, transparent 93px, transparent 98px); }
[data-skin="clay"] .thing[aria-pressed="true"]::after { box-shadow: var(--clay-col-s); }
[data-skin="clay"] .dragghost, [data-skin="clay"] .zonechip.dragghost { box-shadow: var(--clay-up), 0 14px 26px -8px rgba(0, 0, 0, .35); }

/* --- блюда: готовая пластилиновая картинка лежит без рамки */
[data-skin="clay"] .dishpic { border-radius: var(--r-chip); background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); box-shadow: var(--clay-in); }
[data-skin="clay"] .dishpic.clay { background: none; box-shadow: none; overflow: visible; width: 60px; height: 52px; }
[data-skin="clay"] .dishpic.big { border-radius: var(--r-card); }
[data-skin="clay"] .dishpic.big.clay { width: 100%; height: 170px; background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); box-shadow: var(--clay-in); overflow: hidden; }
[data-skin="clay"] .dishpic.clay img { object-fit: contain; }
[data-skin="clay"] .dishpic.big.clay img { width: auto; height: 150px; margin: auto; }

/* --- режим «Готовлю»: значок шага вылеплен из цветного пластилина */
[data-skin="clay"] .cookpic { width: 112px; height: 112px; }
[data-skin="clay"] .cookpic svg { stroke: color-mix(in srgb, var(--accent) 80%, var(--ink)); stroke-width: 3.2;
  filter: drop-shadow(0 3px 1.5px color-mix(in srgb, var(--ink) 30%, transparent)); }
[data-skin="clay"] .cookpic .c-fill { fill: color-mix(in srgb, var(--now) 55%, var(--surface)); }
[data-skin="clay"] .cookpic .c-move { stroke: color-mix(in srgb, var(--massage) 75%, var(--ink)); }

@media (prefers-reduced-motion: reduce) { [data-skin="clay"] :is(.btn, .icon-btn, .fab, .tab, .pick, .tool, .box):active { transform: none; } }
[data-skin="clay"] .wmcell { border-radius: var(--r-chip); background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); box-shadow: var(--clay-up-s); transition: transform .12s ease; }
[data-skin="clay"] .wmcell:active { transform: scale(.96); }
[data-skin="clay"] .wmcell.empty { background: transparent; box-shadow: var(--clay-in); }
[data-skin="clay"] .wmcell .dishpic.clay { width: 44px; height: 36px; }
[data-skin="clay"] .wmday { border-radius: var(--r-chip); }
[data-skin="clay"] .wmday.today { box-shadow: var(--clay-col-s); background-image: var(--clay-sheen); }
[data-skin="clay"] .stepn { box-shadow: var(--clay-up-s); border-radius: 50% 46% 52% 47% / 47% 52% 46% 50%; }
[data-skin="clay"] .stepn.now { box-shadow: var(--clay-col-s); background-image: var(--clay-sheen); }
[data-skin="clay"] .price { border-radius: var(--r-chip); box-shadow: var(--clay-up-s); }
[data-skin="clay"] .price.none { box-shadow: var(--clay-in); }
/* в пластилине выбранный кусочек тоже меняет цвет плавно, а не рывком */
[data-skin="clay"] :is(.pick, .rolepick, .box, .seg button, .zonechip) { transition: transform .12s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease; }
