@charset "UTF-8";

:root {
  font-family: "Trebuchet MS", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
  --bg: #fffaf1;
  --surface: #fffefd;
  --ink: #1d2122;
  --muted: #667385;
  --green: #086343;
  --green-bright: #269c5a;
  --tint: #eaf7e9;
  --border: #e4d0ae;
  --shadow: 0 8px 24px rgba(96, 63, 29, .075);
  --warm: #faf9ef;
  --accent: #f89a32;
  --bg-deep: #e6d3b3;
  --frame: #4bb16c;
  --berry: #a1283f;
  --check-off: #7c9284;
  /* Галочка выбранного: скруглённые концы, тёплый кремовый на зелёном; один рисунок для всех отметок сайта (сетка 16 × 16, по центру). */
  --check-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fffaf1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.6 8.3l3 3 5.9-6.3'/%3E%3C/svg%3E");
}

html[data-theme="rose"] {
  --bg-deep: #ebd0c8;
  --frame: var(--green-bright);
  --bg: #fff7f5;
  --surface: #fffefe;
  --ink: #302429;
  --muted: #766971;
  --green: #914d68;
  --green-bright: #c57892;
  --tint: #fae8ef;
  --border: #ead2cf;
  --shadow: 0 8px 24px rgba(98, 48, 66, .085);
  --warm: #fff2ec;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 280px;
  background: radial-gradient(circle at 50% 0, #fffefd 0, var(--bg) 48%, var(--bg) 100%);
  color: var(--ink);
  font-size: calc(16px * var(--fs, 1));
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
h1, h2, p { margin-top: 0; }
:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 3px; }
.ui-icon { display: block; width: 1em; height: 1em; fill: none; flex: none; }

.page-wrap { max-width: 1220px; margin: 0 auto; padding: 18px 30px 142px; overflow-x: clip; }
.sport-shell { position:relative; isolation:isolate; }
.sport-shell::before { content:"";position:absolute;z-index:-1;top:0;right:0;width:100%;height:420px;background:url('/assets/fitness-hero-v1.png') no-repeat right top -120px / 100% auto;-webkit-mask-image:linear-gradient(#000 0%,#000 65%,transparent 100%);mask-image:linear-gradient(#000 0%,#000 65%,transparent 100%);pointer-events:none; }
.site-header { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; min-height: 105px; }
.site-header-home { grid-template-columns: minmax(0, 1fr) auto auto; }
.brand { position: relative; flex: none; display: block; width: 300px; height: 105px; overflow: hidden; }
.brand-wordmark,.brand-emblem { position:absolute;inset:0;display:block;overflow:hidden;pointer-events:none; }
.brand-wordmark { clip-path:inset(0 0 0 26%); }
.brand-emblem { clip-path:inset(0 74% 0 0); }
.brand-wordmark img,.brand-emblem img { position:absolute;top:-10px;left:-2px;display:block;width:300px;max-width:none;height:auto; }
.header-note { display: block; width: 145px; height: auto; }
.profile-link { flex: none; display: flex; align-items: center; gap: 7px; padding: 4px 7px 4px 4px; border: 1.5px solid var(--border); border-radius: 99px; box-shadow: var(--shadow); background: var(--surface); color: var(--ink); text-decoration: none; }
.profile-avatar { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(140deg, #e9f6e3, #d6ebce); color: var(--green); font-size: calc(25px * var(--fs, 1)); font-weight: 800; }
.profile-chevron { width: 19px; height: 19px; }
.main-content { position: relative; }

.home-hero { position: relative; display: flex; align-items: flex-end; isolation: isolate; min-height: 110px; margin: -4px 0 17px; }
.hero-illustration { position: absolute; z-index: -1; top: -76px; right: 15px; width: min(64%, 650px); max-width: none; height: auto; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; padding: 0 0 9px 15px; }
.hero-copy h1 { margin-bottom: 2px; font-size: calc(clamp(30px, 3.45vw, 44px) * var(--fs, 1)); font-weight: 750; line-height: 1.13; letter-spacing: -.025em; }
.hero-copy p { margin-bottom: 0; color: var(--muted); font-size: calc(clamp(16px, 1.95vw, 22px) * var(--fs, 1)); }
.greeting-heart { display: inline-block; width: 24px; height: 23px; vertical-align: -4px; }

.dashboard-grid { display: grid; grid-template-columns: 1.07fr .93fr; gap: 15px; }
.dashboard-side { display: grid; gap: 15px; }
.card { position: relative; min-width: 0; overflow: hidden; padding: 22px; border: 1.5px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.card-heading, .card h2 { display: flex; align-items: center; gap: 14px; }
.card-heading { position: relative; z-index: 1; }
.card-heading h2, .card > h2 { margin: 0; font-size: calc(clamp(19px, 2vw, 25px) * var(--fs, 1)); font-weight: 800; line-height: 1.2; letter-spacing: -.025em; }
.card-icon { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 17px; background: var(--tint); color: var(--green); font-size: calc(31px * var(--fs, 1)); }
.card-icon-amber { background: #fff4df; color: #ed9b22; }
.dashboard-grid .card-heading .card-icon { width: 37px; height: 43px; margin-left: -5px; border-radius: 0; background: transparent; font-size: calc(34px * var(--fs, 1)); }
.dashboard-grid .card-heading .card-icon-amber { color: #ed9b22; }
.dashboard-grid .card-heading h2 { min-width: 0; }
.card-arrow { display: grid; place-items: center; margin-left: auto; color: var(--muted); font-size: calc(24px * var(--fs, 1)); }
.reminder-count { display: grid; place-items: center; flex: none; min-width: 31px; height: 31px; margin-left: auto; padding: 0 5px; border-radius: 50%; background: #ec5946; color: #fff; font-size: calc(16px * var(--fs, 1)); font-weight: 800; }
.empty-state { max-width: 37ch; margin: 17px 0 0; color: var(--muted); font-size: calc(15px * var(--fs, 1)); }
.plan-card { min-height: 360px; display: flex; flex-direction: column; }
.plan-empty { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; flex: 1; padding: 17px 7px 15px; }
.plan-empty p { margin: 0 0 4px; font-size: calc(19px * var(--fs, 1)); font-weight: 700; }
.plan-empty small { max-width: 42ch; color: var(--muted); font-size: calc(14px * var(--fs, 1)); }
.card-footer { display: flex; align-items: center; gap: 13px; padding: 13px 17px; border: 1px solid #ece8d8; border-radius: 17px; background: var(--warm); color: var(--green); font-size: calc(15px * var(--fs, 1)); font-weight: 700; }
.card-footer .ui-icon { width: 26px; height: 26px; }
.event-card { min-height: 191px; }
.event-card .empty-state { padding-right: 68px; }
.event-decoration { position: absolute; right: 17px; bottom: -14px; color: var(--green-bright); font-size: calc(106px * var(--fs, 1)); opacity: .13; }
.reminder-card { min-height: 154px; }
.reminder-card .empty-state { margin-top: 10px; }
.summary-card { min-height: 192px; }
.summary-card .empty-state { position: relative; z-index: 1; margin-top: 20px; padding-right: 84px; font-size: calc(16px * var(--fs, 1)); }
.summary-decoration { position: absolute; right: 19px; bottom: -21px; display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%; background: var(--tint); color: var(--green); font-size: calc(74px * var(--fs, 1)); opacity: .38; }
.shopping-illustration { position: absolute; right: -14px; bottom: -12px; width: min(43%, 240px); height: auto; pointer-events: none; }
.shopping-card .empty-state { max-width: 62%; padding-right: 0; }

.quick-access { margin-top: 26px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 0 10px 10px; }
.section-heading h2 { margin-bottom: 0; font-size: calc(clamp(25px, 2.8vw, 32px) * var(--fs, 1)); font-weight: 800; letter-spacing: -.035em; }
.section-heading span { color: var(--muted); font-size: calc(14px * var(--fs, 1)); }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 900px; margin: 0 auto; }
.quick-card { display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 132px; overflow: hidden; padding: 12px 7px 10px; border: 1.5px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); text-align: center; text-decoration: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; transition: transform .15s ease, border-color .15s ease, background-color .15s ease; }
.quick-card:hover { border-color: var(--green-bright); transform: translateY(-2px); }
.quick-card:focus-visible { outline: none; border-color: var(--green-bright); box-shadow: var(--shadow), 0 0 0 3px var(--green-bright); }
.quick-card:focus:not(:focus-visible) { outline: none; }
.quick-card * { -webkit-tap-highlight-color: transparent; }
.quick-card:active { border-color: var(--green-bright); transform: scale(.985); }
.quick-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; background: none; }
.quick-icon img { display: block; width: 100%; height: 100%; }

.quick-card strong { font-size: calc(18px * var(--fs, 1)); font-weight: 800; line-height: 1.18; }
.quick-card small { max-width: 15ch; margin-top: 3px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); line-height: 1.2; }
.quick-soon { display: none; margin-top: auto; padding-top: 8px; color: var(--green); font-size: calc(11px * var(--fs, 1)); font-weight: 750; }

.bottom-nav { position: fixed; z-index: 10; right: 18px; bottom: max(10px, env(safe-area-inset-bottom)); left: 18px; max-width: 1120px; margin: auto; border: 1.5px solid var(--border); border-radius: 26px; background: var(--surface); box-shadow: 0 8px 25px rgba(76, 55, 32, .15); }
.nav-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 84px minmax(0, 1fr) minmax(0, 1fr); gap: 2px; padding: 6px; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; min-height: 62px; padding: 6px 2px; border-radius: 20px; color: var(--muted); font-size: calc(12px * var(--fs, 1)); text-align: center; text-decoration: none; }
.bottom-nav a:hover, .bottom-nav a[aria-current="page"] { color: var(--green); font-weight: 750; }
.nav-icon { display:grid;place-items:center;width:40px;height:40px;font-size:calc(29px * var(--fs, 1));line-height:1; }
.nav-label { white-space: nowrap; }

.eyebrow { color: var(--green); font-size: calc(13px * var(--fs, 1)); font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.section-page { max-width: 940px; margin: 22px auto; }
.section-page h1 { margin: 10px 0 4px; font-size: calc(clamp(30px, 4vw, 44px) * var(--fs, 1)); }
.section-page > p { color: var(--muted); }
.section-page .card { margin: 22px 0; }
.text-link { color: var(--green); font-weight: 700; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-grid .card { margin-bottom: 0; }
.logout-form { margin: 24px 0; }
form label { display: block; margin: 16px 0 7px; font-weight: 650; }
input, select { display: block; width: 100%; margin-top: 7px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--ink); }
input:focus, input:focus-visible, select:focus, select:focus-visible { outline: none; box-shadow: none; border-color: var(--border); }
textarea { display: block; width: 100%; margin-top: 7px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--ink); resize: vertical; }
textarea:focus, textarea:focus-visible { outline: none; box-shadow: none; border-color: var(--border); }
.fitness-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.fitness-actions form { margin: 0; }
.fitness-actions .button { display: inline-block; text-decoration: none; }
.fitness-search { margin: 18px 0; }
.fitness-search .fitness-actions { align-items: flex-end; }
.fitness-search input { flex: 1 1 240px; margin-top: 0; }
.fitness-toolbar { justify-content: space-between; margin: 18px 0; }
.fitness-list { display: grid; gap: 10px; margin: 18px 0; }
.fitness-list .card { margin: 0; }
.fitness-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fitness-item a strong { font-size: calc(19px * var(--fs, 1)); }
.fitness-item small { display: block; margin-top: 4px; color: var(--muted); }
.fitness-form, .fitness-detail { max-width: 720px; }
.fitness-form .fitness-actions { margin-top: 22px; }
.fitness-detail p { max-width: 70ch; overflow-wrap: anywhere; }
.button { padding: 12px 22px; border: 0; border-radius: 12px; background: var(--green); color: #fff; font-weight: 700; }
.button-quiet { background: var(--tint); color: var(--green); }
.form-error, .form-success { padding: 12px 15px; border-radius: 12px; }
.form-error { background: #fff0ea; color: #9d3329; }
.form-success { background: var(--tint); color: var(--green); }
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth-card { width: min(100%, 440px); padding: 28px 32px 32px; border: 1.5px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.auth-card > img { display: block; width: min(100%, 330px); height: auto; margin: -21px auto -32px; }
.auth-card h1 { margin: 15px 0 18px; font-size: calc(25px * var(--fs, 1)); }
.auth-card .button { width: 100%; margin-top: 15px; }

@media (max-width: 860px) {
  .page-wrap { padding: 14px 18px 126px; }
  .sport-shell::before { height:330px;background-position:right top -75px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-illustration { width: min(75%, 650px); }
}
@media (max-width: 600px) {
  .page-wrap { padding: 8px 12px 122px; }
  .sport-shell::before { height:250px;background-size:145% auto;background-position:right -20vw top -42px;-webkit-mask-image:linear-gradient(#000 0%,#000 72%,transparent 100%);mask-image:linear-gradient(#000 0%,#000 72%,transparent 100%); }
  .site-header { min-height: 78px; column-gap: clamp(2px, .7vw, 7px); }
  .brand { width: clamp(145px, 44vw, 170px); height: 78px; }
  .brand-wordmark img,.brand-emblem img { top:-5px;left:-5px;width:100%; }
  .header-note { width: clamp(47px, 14vw, 60px); }
  .profile-link { align-self: start; gap: 2px; margin-top: 12px; margin-right: -2px; padding: 2px 3px 2px 2px; }
  .profile-avatar { width: clamp(31px, 8.5vw, 35px); height: clamp(31px, 8.5vw, 35px); font-size: calc(19px * var(--fs, 1)); }
  .profile-chevron { width: 10px; height: 10px; }
  .home-hero { min-height: clamp(48px, 12vw, 60px); margin: -9px 0 13px; }
  .hero-illustration { top: -49px; right: -15px; width: 60vw; opacity: .96; -webkit-mask-image: none; mask-image: none; }
  .hero-copy { padding: 26px 0 3px 3px; } /* было 0: отступ от логотипа до приветствия вдвое больше, картинка остаётся на месте (она привязана к верху блока) */
  .hero-copy h1 { font-size: calc(clamp(24px, 6.15vw, 31px) * var(--fs, 1)); letter-spacing: -.028em; transform: scaleX(.92); transform-origin: left bottom; }
  .hero-copy p { font-size: calc(clamp(11.5px, 3vw, 13px) * var(--fs, 1)); letter-spacing: -.02em; }
  .greeting-heart { width: 14px; height: 14px; vertical-align: -3px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.07fr) minmax(0, .93fr); gap: 8px; }
  .dashboard-side { grid-template-rows: 1fr 1fr; gap: 8px; }
  .card { padding: 11px; border-radius: 17px; }
  .card-heading, .card h2 { gap: 7px; }
  .card-heading h2, .card > h2 { font-size: calc(clamp(13px, 3.7vw, 16px) * var(--fs, 1)); }
  .card-icon { width: 34px; height: 34px; border-radius: 11px; font-size: calc(20px * var(--fs, 1)); }
  .dashboard-grid .card-heading { gap: 4px; }
  .dashboard-grid .card-heading .card-icon { width: 23px; height: 28px; margin-left: -4px; font-size: calc(23px * var(--fs, 1)); }
  .dashboard-grid .card-heading h2 { font-size: calc(clamp(12px, 3.4vw, 16px) * var(--fs, 1)); line-height: 1.15; }
  .plan-card .card-heading h2 { font-size: calc(clamp(14px, 3.9vw, 17px) * var(--fs, 1)); }
  .card-arrow { font-size: calc(16px * var(--fs, 1)); }
  .reminder-count { min-width: 22px; height: 22px; padding: 0 3px; font-size: calc(12px * var(--fs, 1)); }
  .plan-card { min-height: 253px; }
  .plan-empty { padding: 8px 1px; }
  .plan-empty p { font-size: calc(14px * var(--fs, 1)); line-height: 1.25; }
  .plan-empty small { font-size: calc(11.5px * var(--fs, 1)); line-height: 1.3; }
  .card-footer { gap: 5px; padding: 8px 6px; border-radius: 11px; font-size: calc(11px * var(--fs, 1)); line-height: 1.2; }
  .card-footer .ui-icon { width: 18px; height: 18px; }
  .empty-state { margin-top: 9px; font-size: calc(11.5px * var(--fs, 1)); line-height: 1.35; }
  .event-card { min-height: 133px; }
  .event-card .empty-state { padding-right: 0; }
  .event-decoration { right: 3px; bottom: -5px; font-size: calc(48px * var(--fs, 1)); opacity: .09; }
  .reminder-card { min-height: 111px; }
  .reminder-card .empty-state { margin-top: 8px; }
  .summary-card { min-height: 127px; }
  .summary-card .empty-state { margin-top: 10px; padding-right: 16px; font-size: calc(11.5px * var(--fs, 1)); }
  .summary-decoration { right: -9px; bottom: -9px; width: 68px; height: 68px; font-size: calc(42px * var(--fs, 1)); opacity: .22; }
  .shopping-card .empty-state { max-width: 61%; padding-right: 0; }
  .shopping-illustration { right: -12px; bottom: -9px; width: 58%; }
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .quick-card { min-height: 108px; padding: 9px 4px 8px; border-radius: 16px; }
  .quick-icon { width: 50px; height: 50px; margin-bottom: 4px; }
  .quick-card strong { font-size: calc(clamp(12px, 3.5vw, 16px) * var(--fs, 1)); }
  .quick-card small { max-width: 14ch; font-size: calc(10.5px * var(--fs, 1)); }

  .section-heading { margin: 0 2px 10px; }
  .section-heading span { display: none; }
  .bottom-nav { right: 6px; bottom: max(6px, env(safe-area-inset-bottom)); left: 6px; border-radius: 22px; }
  .nav-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 72px minmax(0, 1fr) minmax(0, 1fr); gap: 0; padding: 4px; }
  .bottom-nav a { min-height: 61px; padding: 6px 0; border-radius: 18px; font-size: calc(10px * var(--fs, 1)); }
  .nav-icon { width:36px;height:36px;font-size:calc(27px * var(--fs, 1)); }
  .profile-grid { grid-template-columns: 1fr; }
  .fitness-item { flex-wrap: wrap; }
}
@media (max-width: 360px) {
  .brand { height: 73px; }
  .brand-wordmark img,.brand-main .brand-emblem img { top:-4px; }
  .bottom-nav a { font-size: calc(9px * var(--fs, 1)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .quick-card { transition: none; }
}

/* Fitness screens share the site header and bottom navigation from private/view.php. */
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.fitness-page,.fitness-hub,.health-section,.fin-page { max-width:890px;margin-top:16px; }
.fitness-page .eyebrow,.fitness-hub .eyebrow,.health-section .eyebrow,.fin-page .eyebrow { display:block;margin:0 0 10px;color:var(--green);font-size:calc(clamp(13px,2.8vw,18px) * var(--fs, 1));font-weight:750;letter-spacing:.055em;text-transform:uppercase; }
.fitness-page h1,.fitness-hub h1,.health-section h1,.fin-page h1 { margin:0 0 10px;font-size:calc(clamp(32px,5vw,42px) * var(--fs, 1));line-height:1.14;letter-spacing:-.03em;color:#182129; }
.feature-cards { display:grid;gap:12px; }
.fitness-hub-card.card { display:grid;grid-template-columns:minmax(0,50%) minmax(0,50%);grid-template-rows:auto 1fr auto;align-items:start;min-width:0;overflow:hidden;min-height:170px;margin:0;padding:20px 22px;border-radius:20px;text-decoration:none;box-shadow:var(--shadow); }
a.fitness-hub-card { color:inherit; }
a.fitness-hub-card:hover { border-color:var(--green-bright); }
.fitness-hub-card.fitness-hub-library { min-height:225px; }
.fitness-hub-card.fitness-hub-plans { min-height:166px; }
.fitness-hub-heading { display:grid;grid-template-columns:46px minmax(0,1fr) 20px;align-items:start;gap:10px;grid-column:1/-1;position:relative;z-index:1;min-width:0; }
.fitness-hub-heading strong { display:block;min-width:0;font-size:calc(clamp(20px,3vw,27px) * var(--fs, 1));line-height:1.18;letter-spacing:-.03em; }
.fitness-hub-icon { display:grid;place-items:center;width:42px;height:42px;background:transparent;color:var(--green);font-size:calc(34px * var(--fs, 1)); }
.fitness-hub-icon img { display:block;width:100%;height:100%;object-fit:contain;filter:saturate(.62) brightness(.86); }
.fitness-hub-chevron { color:var(--muted);font-size:calc(30px * var(--fs, 1));line-height:1;justify-self:end; }
.fitness-hub-description { grid-column:1;grid-row:2;position:relative;z-index:1;min-width:0;margin:8px 12px 12px 0;color:var(--muted);font-size:calc(clamp(14px,2vw,18px) * var(--fs, 1));line-height:1.35;overflow-wrap:anywhere; }
.fitness-hub-art { grid-column:2;grid-row:2/4;align-self:end;justify-self:end;display:block;width:100%;max-height:210px;height:auto;object-fit:contain;object-position:right bottom;pointer-events:none; }
.fitness-hub-art-plans { max-height:145px; }
.fitness-open { grid-column:1;grid-row:3;align-self:end;z-index:1;display:inline-flex;align-items:center;justify-content:center;gap:9px;width:max-content;min-height:43px;padding:5px 20px;border:1px solid #7bc482;border-radius:40px;background:var(--tint);color:var(--green);font-size:calc(19px * var(--fs, 1));font-weight:800;box-shadow:0 4px 17px #3c9f6620; }
.section-back { display:inline-flex;align-items:center;gap:5px;margin:18px 3px 0;padding-bottom:2px;border-bottom:2px dotted currentColor;color:var(--green);font-size:calc(clamp(19px,2.5vw,24px) * var(--fs, 1));font-weight:800;text-decoration:none;line-height:1.25; }
.section-back svg { display:block;flex:none;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round; }
.health-cards .health-card { min-height:190px; }
.health-card-art { max-height:190px; }
.health-card .fitness-hub-icon .ui-icon { width:90%;height:90%;color:#d99531; }
.fitness-search { display:flex;align-items:center;gap:13px;min-height:57px;margin:0 0 13px;padding:6px 16px;border:1px solid var(--border);border-radius:16px;background:#fff;box-shadow:var(--shadow); }
.fitness-search svg { width:23px;height:23px;flex:none;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round; }
.fitness-search input { flex:1;min-width:0;width:auto;margin:0;padding:8px 0;border:0;background:transparent;font-size:calc(17px * var(--fs, 1)); }
.fitness-search input:focus,.fitness-search input:focus-visible { border:0;outline:0;box-shadow:none; }
.fitness-add { display:flex;align-items:center;justify-content:center;gap:12px;min-height:57px;padding:9px 16px;border:1px solid #7dce81;border-radius:18px;background:linear-gradient(110deg,#f5fff4,#e8f9e9);color:var(--green);text-decoration:none;font-size:calc(clamp(17px,3vw,22px) * var(--fs, 1));font-weight:800; }
.fitness-add span { display:grid;place-items:center;width:32px;height:32px;flex:none;border-radius:50%;background:linear-gradient(145deg,#7ec973,#087c4d);color:#fff;font-size:calc(27px * var(--fs, 1));line-height:1; }
.fitness-library-tools { position:relative;z-index:4;display:flex;justify-content:flex-end;min-height:35px;margin:9px 0 0; }
.fitness-library-tools > summary { display:flex;align-items:center;gap:6px;min-height:34px;padding:5px 10px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--green);cursor:pointer;list-style:none;font-size:calc(13px * var(--fs, 1));font-weight:700;line-height:1.2; }
.fitness-library-tools > summary svg { width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round; }
.fitness-library-tools > summary::-webkit-details-marker { display:none; }
.fitness-library-tools nav { position:absolute;right:0;top:39px;display:grid;min-width:180px;padding:8px;border:1px solid var(--border);border-radius:13px;background:var(--surface);box-shadow:var(--shadow); }
.fitness-library-tools nav a { padding:9px;text-decoration:none;border-radius:8px;font-size:calc(14px * var(--fs, 1)); }
.fitness-library-tools nav a[aria-current] { background:var(--tint);color:var(--green);font-weight:750; }
.fitness-results { min-width:0; }
.fitness-list { display:grid;gap:10px;margin:12px 0 10px; }
.fitness-page .fitness-results + .section-back { margin-top:8px; }
.fitness-item.card { display:flex;align-items:center;gap:12px;min-width:0;min-height:105px;margin:0;padding:9px 11px;border-radius:19px;overflow:visible; }
.fitness-item.card:has(.fitness-menu[open]) { z-index:8; }
.fitness-item-link { display:flex;align-items:center;gap:13px;min-width:0;flex:1;text-decoration:none; }
.fitness-thumbnail { display:block;flex:none;width:92px;height:88px;overflow:hidden;border-radius:14px;background:#fbf3e7; }
.fitness-thumbnail img { display:block;width:100%;height:100%;object-fit:cover; }
.fitness-item-body { position:relative;min-width:0;flex:1;overflow-wrap:anywhere; }
.fitness-item-body:has(.fitness-star) { padding-right:34px; }
.fitness-item-body strong { display:block;font-size:calc(clamp(16px,2.5vw,22px) * var(--fs, 1));line-height:1.25;letter-spacing:-.02em; }
.fitness-star { position:absolute;top:-2px;right:0;display:grid;place-items:center;width:30px;height:30px;color:#ffb900; }
.fitness-star svg { display:block;width:27px;height:27px;fill:currentColor;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round; }
.fitness-badges { display:flex;flex-wrap:wrap;gap:5px;margin-top:7px; }
.fitness-badges span { padding:3px 7px;border-radius:8px;background:#eaf2ff;color:#426b9d;font-size:calc(11px * var(--fs, 1)); }
.fitness-badges .fitness-badge-secondary { background:#f1f4fa;color:#71849e; }
.fitness-menu { position:relative;z-index:3;flex:none;align-self:center; }
.fitness-menu > summary { display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:12px;background:transparent;color:var(--muted);cursor:pointer;list-style:none; }
.fitness-menu > summary::-webkit-details-marker { display:none; }
.fitness-menu > summary span { font-size:calc(27px * var(--fs, 1));line-height:1; }
.fitness-menu-labeled > summary { width:auto;min-width:105px;padding:0 11px;color:var(--green); }
.fitness-menu-labeled > summary span { font-size:calc(14px * var(--fs, 1));font-weight:700; }
.fitness-menu-labeled .fitness-menu-panel { top:auto;bottom:calc(100% + 6px); }
.fitness-menu[open] { z-index:6; }
.fitness-menu-panel { position:absolute;right:0;top:calc(100% + 6px);min-width:204px;padding:8px;border:1px solid var(--border);border-radius:15px;background:var(--surface);box-shadow:0 12px 30px #3e3b2925; }
.fitness-menu-panel > a,.fitness-menu-panel > form button,.fitness-delete > summary,.fitness-delete form button { display:block;width:100%;padding:9px 10px;border:0;border-radius:8px;background:transparent;color:var(--ink);text-align:left;text-decoration:none;font-size:calc(14px * var(--fs, 1));cursor:pointer; }
.fitness-menu-panel > a:hover,.fitness-menu-panel button:hover,.fitness-delete > summary:hover { background:var(--tint); }
.fitness-delete > summary { color:#aa4f44;list-style:none; }
.fitness-delete > summary::-webkit-details-marker { display:none; }
.fitness-delete p { margin:4px 7px;color:var(--muted);font-size:calc(12px * var(--fs, 1));line-height:1.3; }
.fitness-delete form button { color:#a12727;font-weight:750; }
.fitness-empty { padding:18px; }
.fitness-pagination { display:flex;justify-content:center;gap:20px;flex-wrap:wrap;margin:14px 0;font-size:calc(14px * var(--fs, 1)); }
.fitness-pagination a { color:var(--green); }
.fitness-form,.fitness-detail { max-width:720px; }
.fitness-detail-title { position:relative;z-index:5;max-width:720px;min-height:44px;margin-bottom:25px;padding-right:52px; }
.fitness-detail-title h1 { min-width:0;margin:0;overflow-wrap:anywhere; }
.fitness-favorite-form { position:absolute;top:0;right:0;margin:0; }
.fitness-favorite-form input { display:none; }
.fitness-favorite-button { display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:12px;background:transparent;color:var(--muted); }
.fitness-favorite-button svg { display:block;width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round; }
.fitness-favorite-button.is-active { color:#ffb900; }
.fitness-favorite-button.is-active svg { fill:currentColor;stroke:currentColor; }
.fitness-page .fitness-detail.card { overflow:visible;margin-top:0;margin-bottom:12px; }
.fitness-page .fitness-detail + .section-back { margin-top:0; }
.fitness-detail-overview { display:grid;grid-template-columns:minmax(155px,205px) minmax(0,1fr);gap:22px;align-items:start; }
.fitness-detail-image { display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;border-radius:17px;background:var(--warm); }
.fitness-detail-fields { min-width:0; }
.fitness-detail-load { display:inline-block;margin:0 0 13px;padding:5px 12px;border-radius:99px;background:var(--tint);color:var(--green);font-size:calc(13px * var(--fs, 1));font-weight:750; }
.fitness-detail-field { margin-bottom:14px; }
.fitness-detail .fitness-detail-field h2,.fitness-detail .fitness-detail-technique h2 { display:block;margin:0 0 7px;color:var(--muted);font-size:calc(13px * var(--fs, 1));font-weight:750;letter-spacing:.02em; }
.fitness-detail-chips { display:flex;flex-wrap:wrap;gap:6px; }
.fitness-detail-chips span { display:inline-block;padding:5px 10px;border:1px solid #cfe5d2;border-radius:10px;background:#f3faf1;color:var(--green);font-size:calc(14px * var(--fs, 1));font-weight:700; }
.fitness-detail-chips.fitness-detail-equipment span { border-color:#dfdbe9;background:#f7f5fc;color:#625d79; }
.fitness-detail-chips .fitness-detail-missing { border:0;background:transparent;color:var(--muted);font-weight:400;padding-left:0; }
.fitness-detail-technique { margin-top:13px;padding:17px 18px;border-radius:15px;background:var(--warm); }
.fitness-detail-technique p { margin:0;line-height:1.6;white-space:pre-wrap;tab-size:4; }
.fitness-detail-footer { display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:20px; }
.fitness-form.card { margin:18px 0;padding:20px; }
.fitness-form label { display:block; }
.fitness-form textarea[name="instructions"] { font-weight:400;line-height:1.55;white-space:pre-wrap;tab-size:4; }
.fitness-form small { display:block;margin-top:5px;color:var(--muted);font-size:calc(12px * var(--fs, 1)); }
.fitness-form .fitness-actions { margin-top:22px; }
.fitness-tag-field { margin:16px 0; }
.fitness-tag-field > label { margin-bottom:6px;font-weight:650; }
.fitness-tag-widget[hidden],.fitness-tag-field [data-tags-source][hidden] { display:none!important; }
.fitness-tag-widget { padding:9px;border:1px solid var(--border);border-radius:12px;background:var(--warm); }
.fitness-tag-entry { display:flex;align-items:stretch;gap:7px; }
.fitness-tag-entry input { flex:1;min-width:0;min-height:39px;margin:0;padding:8px 12px;border-radius:12px;background:#fff;font-size:calc(14px * var(--fs, 1)); }
.fitness-tag-entry > button { display:inline-flex;align-items:center;gap:7px;flex:none;padding:4px 10px;border:0;border-radius:12px;background:var(--tint);color:var(--green);font-size:calc(14px * var(--fs, 1));font-weight:750;white-space:nowrap; }
.fitness-tag-plus { display:grid;place-items:center;width:20px;height:20px;flex:none;border-radius:50%;background:var(--green);color:#fff;font-size:calc(17px * var(--fs, 1));font-weight:600;line-height:1; }
.fitness-tag-suggestions { display:flex;flex-wrap:wrap;gap:5px;margin-top:8px; }
.fitness-tag-chip { max-width:100%;min-height:29px;padding:4px 11px;border:1px solid #d6e1cb;border-radius:999px;background:#f4f8ee;color:#273c44;font-size:calc(12px * var(--fs, 1));line-height:1.25;overflow-wrap:anywhere; }
.fitness-tag-chip.is-selected { border-color:#6fb586;background:#e4f4e6;color:var(--green);font-weight:750; }
@media(max-width:350px) { .fitness-tag-entry > button { gap:5px;padding:4px 7px;font-size:calc(12px * var(--fs, 1)); } }
.fitness-illustrations { min-width:0;margin:19px 0;padding:10px;border:1px solid var(--border);border-radius:12px; }
.fitness-illustrations legend { font-weight:700; }
.fitness-icon-chooser > summary { display:flex;align-items:center;gap:12px;min-height:68px;padding:6px 10px;border:1px solid var(--border);border-radius:13px;background:var(--surface);list-style:none;cursor:pointer; }
.fitness-icon-chooser > summary::-webkit-details-marker { display:none; }
.fitness-icon-chooser > summary img { width:52px;height:52px;flex:none;object-fit:contain;border-radius:8px; }
.fitness-icon-chooser > summary span { min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700; }
.fitness-icon-chooser > summary strong { flex:none;color:var(--green);font-size:calc(13px * var(--fs, 1)); }
.fitness-icon-options { display:grid;grid-template-columns:repeat(auto-fill,minmax(95px,1fr));gap:7px;max-height:240px;overflow-y:auto;overscroll-behavior:contain;margin-top:8px;padding:3px; }
.fitness-icon-option { position:relative;display:grid;justify-items:center;align-content:start;gap:4px;min-width:0;min-height:98px;margin:0;padding:7px 3px;border:1.5px solid var(--border);border-radius:12px;background:#fff;font-size:calc(11px * var(--fs, 1));text-align:center;cursor:pointer; }
.fitness-icon-option:has(input:checked) { border-color:var(--green); }
.fitness-icon-option input { position:absolute;top:5px;left:5px;width:14px;height:14px;margin:0;padding:0;accent-color:var(--green); }
.fitness-icon-option img { display:block;width:56px;height:56px;object-fit:contain;border-radius:8px; }
.fitness-my-icons { margin-top:13px;padding-top:13px;border-top:1px solid var(--border); }
.fitness-my-icons h3 { margin:0 0 8px;font-size:calc(15px * var(--fs, 1)); }
.fitness-my-icons input[type="search"] { width:100%;min-height:42px;margin:0 0 8px;padding:9px 12px;background:#fff;font-size:calc(15px * var(--fs, 1)); }
.fitness-my-icon-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(95px,1fr));gap:7px; }
.fitness-library-option { width:100%;font-family:inherit;color:inherit; }
.fitness-library-option[aria-pressed="true"] { border-color:var(--green); }
.fitness-library-option span { max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.fitness-my-icon-status { margin:9px 1px;color:var(--muted);font-size:calc(13px * var(--fs, 1)); }
.fitness-my-icon-pages { display:flex;align-items:center;justify-content:space-between;gap:6px;margin:9px 0 2px;font-size:calc(12px * var(--fs, 1)); }
.fitness-my-icon-pages[hidden] { display:none; }
.fitness-my-icon-pages button { padding:7px 9px;border:1px solid var(--border);border-radius:10px;background:#fff;color:var(--green);font-size:calc(12px * var(--fs, 1)); }
.fitness-my-icon-pages button:disabled { opacity:.4;cursor:default; }
.fitness-checkbox { display:flex!important;align-items:center;gap:10px; }
.fitness-checkbox input { width:19px;margin:0;accent-color:var(--green); }
.fitness-detail p { max-width:70ch;overflow-wrap:anywhere; }
@media(max-width:600px) {
 .fitness-page,.fitness-hub,.health-section,.fin-page { margin-top:13px; }
 .fitness-page h1,.fitness-hub h1,.health-section h1,.fin-page h1 { font-size:calc(clamp(25px,6.3vw,30px) * var(--fs, 1)); }
 .fitness-hub-card.card { grid-template-columns:minmax(0,50%) minmax(0,50%);padding:14px;border-radius:18px; }
 .fitness-hub-card.fitness-hub-library { min-height:205px; }
 .fitness-hub-card.fitness-hub-plans { min-height:165px; }
 .fitness-hub-heading { grid-template-columns:37px minmax(0,1fr) 15px;gap:7px; }
 .fitness-hub-icon { width:35px;height:35px;font-size:calc(29px * var(--fs, 1)); }
 .fitness-hub-heading strong { font-size:calc(clamp(17px,4.1vw,21px) * var(--fs, 1)); }
 .fitness-hub-description { margin:7px 6px 9px 0;font-size:calc(clamp(12px,3.15vw,16px) * var(--fs, 1));line-height:1.32; }
 .fitness-hub-chevron { font-size:calc(26px * var(--fs, 1)); }
 .fitness-hub-art { max-height:175px; }
 .fitness-hub-art-plans { max-height:125px; }
 .fitness-open { min-height:36px;padding:3px 15px;font-size:calc(16px * var(--fs, 1)); }
 .section-back { margin-top:16px;font-size:calc(19px * var(--fs, 1)); }
 .section-back svg { width:18px;height:18px; }
 .health-cards .health-card { min-height:190px; }
 .health-card-art { max-height:165px; }
 .fitness-search { min-height:49px;padding:6px 12px; }
 .fitness-search input { font-size:calc(16px * var(--fs, 1)); }
 .fitness-add { min-height:49px;font-size:calc(17px * var(--fs, 1)); }
 .fitness-item.card { min-height:94px;padding:7px;gap:7px; }
 .fitness-item-link { gap:10px; }
 .fitness-thumbnail { width:82px;height:80px; }
 .fitness-item-body strong { font-size:calc(clamp(14px,3.7vw,17px) * var(--fs, 1)); }
 .fitness-menu > summary { width:32px;height:34px; }
 .fitness-menu > summary span { font-size:calc(23px * var(--fs, 1)); }
 .fitness-menu-labeled > summary span { font-size:calc(14px * var(--fs, 1)); }
 .fitness-form.card { padding:15px; }
 .fitness-detail-overview { grid-template-columns:1fr;gap:15px; }
 .fitness-detail-image { width:min(100%,210px);margin:0 auto; }
 .fitness-detail-field { margin-bottom:12px; }
 .fitness-detail-technique { padding:13px; }
}
@media(max-width:350px) { .fitness-thumbnail { width:64px;height:75px; } .fitness-hub-description { font-size:calc(12px * var(--fs, 1)); } .fitness-hub-heading strong { font-size:calc(16px * var(--fs, 1)); } .fitness-open { gap:5px;padding:3px 10px;font-size:calc(14px * var(--fs, 1)); } }

/* Shared Fitness and Health card layout. Illustration stays outside text flow. */
:is(.fitness-hub, .health-section) .fitness-hub-card.card { display:block;height:240px;min-height:0;padding:20px;border-radius:22px; }
:is(.fitness-hub, .health-section) .fitness-hub-heading { display:grid;grid-template-columns:54px minmax(0,1fr) 22px;align-items:start;gap:12px;width:100%; }
:is(.fitness-hub, .health-section) .fitness-hub-heading strong { padding-top:4px;font-size:calc(clamp(20px,2.9vw,27px) * var(--fs, 1));line-height:1.2;color:#182129; }
:is(.fitness-hub, .health-section) .fitness-hub-icon { width:52px;height:52px;border-radius:0;background:transparent;font-size:calc(43px * var(--fs, 1)); }
:is(.fitness-hub, .health-section) .fitness-hub-icon img { width:90%;height:90%;filter:saturate(.8) brightness(.92); }
:is(.fitness-hub, .health-section) .fitness-hub-description { display:block;position:relative;z-index:2;max-width:65%;margin:-17px 0 0 66px;color:#6a83a7;font-size:calc(clamp(15px,2vw,18px) * var(--fs, 1));line-height:1.35; }
:is(.fitness-hub, .health-section) .fitness-hub-plans .fitness-hub-description { max-width:54%; }
:is(.fitness-hub, .health-section) .fitness-open { position:absolute;left:20px;bottom:18px; }
:is(.fitness-hub, .health-section) .fitness-hub-art { position:absolute;z-index:1;right:0;bottom:-8px;width:min(69%,450px);max-height:none;height:auto;object-fit:contain;pointer-events:none; }
:is(.fitness-hub, .health-section) .fitness-hub-art-plans { width:min(43%,290px); }
.fitness-hub .fitness-hub-programs .fitness-hub-art-programs { right:-3px;bottom:-8px;width:min(46%,300px); }
.fitness-hub .fitness-hub-programs .fitness-hub-icon img { width:100%;height:100%;filter:none; }
.fitness-hub .fitness-hub-card.card { border-color:var(--frame); }
.fitness-hub a.fitness-hub-card.card:is(:hover, :focus-visible) { border-color:var(--green); }
.fitness-hub a.fitness-hub-card.card:active { border-color:var(--green);background:color-mix(in srgb, var(--tint) 45%, var(--surface)); }
.health-section .health-nutrition-card .health-card-art { right:-15px;bottom:-9px;width:min(55%,370px); }
.health-section .health-card .fitness-hub-description { max-width:54%; }
.health-section .health-nutrition-card .fitness-hub-icon { color:#e9a232; }
.health-section .health-nutrition-card .fitness-hub-icon .ui-icon { width:.84em;height:.84em;color:#eda133; }
@media(max-width:600px) {
 :is(.fitness-hub, .health-section) .fitness-hub-card.card { height:180px;padding:12px;border-radius:20px; }
 :is(.fitness-hub, .health-section) .fitness-hub-heading { grid-template-columns:49px minmax(0,1fr) 16px;gap:9px; }
 :is(.fitness-hub, .health-section) .fitness-hub-heading strong { padding-top:4px;font-size:calc(clamp(17px,4.55vw,20px) * var(--fs, 1)); }
 :is(.fitness-hub, .health-section) .fitness-hub-icon { width:48px;height:48px;font-size:calc(40px * var(--fs, 1)); }
 :is(.fitness-hub, .health-section) .fitness-hub-description { max-width:calc(100% - 68px);margin:-20px 0 0 58px;font-size:calc(clamp(12px,3.45vw,14px) * var(--fs, 1));line-height:1.28; }
 :is(.fitness-hub, .health-section) .fitness-hub-plans .fitness-hub-description { max-width:48%; }
 :is(.fitness-hub, .health-section) .fitness-open { left:12px;bottom:12px; }
 :is(.fitness-hub, .health-section) .fitness-hub-art { right:0;bottom:-8px;width:70%; }
 :is(.fitness-hub, .health-section) .fitness-hub-art-plans { width:43%; }
 .fitness-hub .fitness-hub-programs .fitness-hub-art-programs { width:47%; }
 .health-section .health-card .fitness-hub-description { max-width:53%;margin:-20px 0 0 58px;font-size:calc(clamp(12px,3.3vw,14px) * var(--fs, 1));line-height:1.23; }
 .health-section .health-nutrition-card .health-card-art { right:-16px;bottom:-8px;width:54%; }
}
@media(max-width:350px) {
 :is(.fitness-hub, .health-section) .fitness-hub-card.card { height:200px; }
 :is(.fitness-hub, .health-section) .fitness-hub-art { width:65%; }
 :is(.fitness-hub, .health-section) .fitness-hub-art-plans { width:40%; }
 .fitness-hub .fitness-hub-programs .fitness-hub-art-programs { width:46%; }
 .health-section .health-card .fitness-hub-description { max-width:54%;font-size:calc(12px * var(--fs, 1)); }
 .health-section .health-nutrition-card .health-card-art { width:54%; }
}

/* Personal workout plans use the shared OurLife shell and card palette. */
.fitness-plans-page .card { margin:0; }
.fitness-plans-page .fitness-add { margin:0 0 12px; }
.plan-tabs { display:flex;flex-wrap:nowrap;gap:7px;max-width:100%;margin:14px 0;overflow-x:auto; }
.plan-tabs a { flex:none;padding:8px 12px;border:1px solid var(--border);border-radius:99px;background:var(--surface);color:var(--muted);font-weight:700;text-decoration:none;font-size:calc(14px * var(--fs, 1));white-space:nowrap; }
.plan-tabs a[aria-current] { border-color:var(--green-bright);background:var(--tint);color:var(--green); }
/* Apply .tap-pill to new rounded tabs/buttons: no rectangular touch flash, visible shaped keyboard focus. */
:is(.tap-pill, .plan-tabs a, .fitness-library-tools nav a, .fitness-library-tools > summary, .bottom-nav a) { -webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;transition:transform .14s ease,background-color .14s ease,border-color .14s ease; }
:is(.tap-pill, .plan-tabs a, .fitness-library-tools nav a, .fitness-library-tools > summary, .bottom-nav a):active { transform:scale(.97);background-color:var(--tint); }
:is(.tap-pill, .plan-tabs a, .fitness-library-tools nav a, .fitness-library-tools > summary, .bottom-nav a):focus:not(:focus-visible) { outline:none; }
:is(.tap-pill, .plan-tabs a, .fitness-library-tools nav a, .fitness-library-tools > summary, .bottom-nav a):focus-visible { outline:none;box-shadow:0 0 0 3px var(--green-bright); }
@media (prefers-reduced-motion: reduce) {
  :is(.tap-pill, .plan-tabs a, .fitness-library-tools nav a, .fitness-library-tools > summary, .bottom-nav a) { transition: none; }
}
.plan-empty-card { padding:18px;color:var(--muted); }
.plan-empty-illustrated { display:grid;justify-items:center;gap:6px;min-height:195px;text-align:center; }
.plan-empty-card img { display:block;width:min(70%,230px);height:auto;aspect-ratio:3/2;object-fit:contain; }
.plan-empty-card p { max-width:34ch;margin:0;font-size:calc(clamp(15px,2.4vw,18px) * var(--fs, 1));line-height:1.4; }
.plan-list,.plan-form-exercises { display:grid;gap:12px; }
.plan-list-card { padding:8px;border-color:#efd5b5;border-radius:22px;overflow:visible; }
.plan-list-card:has(.plan-card-menu[open]) { z-index:8; }
.plan-list-card:hover { border-color:var(--green-bright); }
.plan-card-link { display:grid;grid-template-columns:184px minmax(0,1fr);gap:15px;min-width:0;min-height:184px;border-radius:16px;color:inherit;text-decoration:none; }
.plan-card-thumbnail { position:relative;display:block;width:184px;aspect-ratio:1;overflow:hidden;border-radius:16px;background:#f3f3df;align-self:center; }
.plan-card-thumbnail img { position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain; }
.plan-card-body { display:flex;flex-direction:column;gap:6px;min-width:0;padding:6px 7px 5px 0; }
.plan-card-heading { position:relative;display:block;min-width:0;min-height:27px;padding-right:82px; }
.plan-card-heading strong { display:block;min-width:0;font-size:calc(clamp(18px,3.2vw,27px) * var(--fs, 1));line-height:1.2;overflow-wrap:anywhere; }
.plan-card-muscles { display:block;max-width:100%;color:#557297;font-size:calc(clamp(12px,2vw,16px) * var(--fs, 1));line-height:1.3;overflow-wrap:anywhere; }
.plan-card-metrics { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:auto;padding-top:4px; }
.plan-card-metric { display:flex;flex-direction:column;align-items:center;min-width:0;padding:0 3px;text-align:center; }
.plan-card-metric + .plan-card-metric { border-left:1px solid #eee8e0; }
.plan-metric-icon { display:grid;place-items:center;width:36px;height:36px;margin-bottom:3px;color:var(--green); }
.icon-plain { border:0;background:transparent;box-shadow:none; }
.plan-metric-icon svg { display:block;width:28px;height:28px;fill:none;stroke:currentColor; }
.plan-metric-icon img { display:block;width:36px;height:36px;max-width:none;object-fit:contain; }
.plan-card-metric b { font-size:calc(clamp(14px,2.2vw,18px) * var(--fs, 1));line-height:1.18;white-space:nowrap; }
.plan-card-metric small { color:#6a83a7;font-size:calc(clamp(10px,1.5vw,13px) * var(--fs, 1));line-height:1.15;white-space:nowrap; }
.plan-card-description { display:-webkit-box;max-width:100%;margin-top:4px;color:#4d5864;font-size:calc(clamp(13px,1.9vw,15px) * var(--fs, 1));line-height:1.4;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;white-space:pre-line; }
.plan-card-favorite { position:absolute;top:13px;right:13px;z-index:2;margin:0; }
.plan-card-menu { position:absolute;top:11px;right:50px;z-index:4; }
.plan-card-menu > summary { display:grid;place-items:center;min-width:36px;min-height:36px;padding:0 4px;border:0;border-radius:12px;background:transparent;color:#657b86;cursor:pointer;list-style:none; }
.plan-card-menu > summary::-webkit-details-marker,.plan-delete-confirm > summary::-webkit-details-marker { display:none; }
.plan-card-menu > summary span { font-size:calc(25px * var(--fs, 1));line-height:1; }
.plan-card-menu > summary:hover,.plan-card-menu[open] > summary { background:transparent;color:var(--green); }
.plan-card-menu > summary:focus:not(:focus-visible),.plan-delete-confirm > summary:focus:not(:focus-visible) { outline:none; }
.plan-card-menu > summary:focus-visible,.plan-delete-confirm > summary:focus-visible { outline:2px solid var(--green);outline-offset:2px; }
.plan-menu-panel { position:absolute;top:calc(100% + 4px);right:-37px;min-width:215px;max-width:min(280px,calc(100vw - 32px));padding:8px;border:1px solid var(--border);border-radius:15px;background:var(--surface);box-shadow:0 12px 30px #3e3b2925; }
.plan-menu-panel > a,.plan-menu-panel > form button,.plan-delete-confirm > summary,.plan-delete-confirm form button { display:block;width:100%;padding:9px 10px;border:0;border-radius:8px;background:transparent;color:var(--ink);text-align:left;text-decoration:none;font-size:calc(14px * var(--fs, 1));cursor:pointer; }
.plan-menu-panel > a:hover,.plan-menu-panel button:hover,.plan-delete-confirm > summary:hover { background:var(--tint); }
.plan-menu-panel form { margin:0; }
.plan-delete-confirm > summary,.plan-delete-confirm form button { color:#a5463a; }
.plan-delete-confirm form button { font-weight:750; }
.plan-delete-confirm p { margin:4px 8px;color:var(--muted);font-size:calc(12px * var(--fs, 1));line-height:1.35; }
.plan-card-menu-labeled { position:static;align-self:center; }
.plan-card-menu-labeled > summary { min-width:44px;min-height:44px;padding:0;border:1px solid var(--border);color:var(--green); }
.plan-card-menu-labeled > summary span { font-size:calc(25px * var(--fs, 1));line-height:1; }
.plan-card-menu-labeled .plan-menu-panel { top:auto;bottom:calc(100% + 7px);right:0;max-height:min(65vh,340px);overflow:auto;z-index:15; }
.plan-star-button { display:grid;place-items:center;width:32px;height:32px;padding:2px;border:0;border-radius:50%;background:transparent;color:#77879c;cursor:pointer; }
.plan-star-button svg { width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round; }
.plan-star-button.is-active { color:#ffb900; }
.plan-star-button.is-active svg { fill:currentColor;stroke:currentColor; }
.plan-star-button:focus:not(:focus-visible) { outline:none; }
.plan-star-button:focus-visible { outline:none;box-shadow:0 0 0 3px var(--green-bright); }
.plan-favorite { color:#f5bb13;font-size:calc(25px * var(--fs, 1));line-height:1; }
.plan-detail { padding:22px; }
.plan-detail-title { display:flex;align-items:center;gap:12px; }
.plan-detail-title h2 { margin:0;font-size:calc(clamp(20px,4vw,26px) * var(--fs, 1)); }
.plan-detail > p { margin:12px 0;white-space:normal;overflow-wrap:anywhere; }
.plan-detail-muscles { display:grid;gap:12px;margin:14px 0; }
.plan-detail-muscle-row h3 { margin:0 0 7px;font-size:calc(14px * var(--fs, 1));color:var(--ink); }
.plan-detail-muscle-row p { margin:0;color:var(--muted);font-size:calc(13px * var(--fs, 1)); }
.plan-detail-muscle-tags { display:flex;flex-wrap:wrap;gap:6px; }
.plan-muscle-tag { display:inline-flex;align-items:center;gap:7px;min-height:31px;padding:5px 9px;border:1px solid #dce7db;border-radius:10px;background:#f4faf4;color:#476951;font:inherit;font-size:calc(13px * var(--fs, 1));line-height:1.3; }
.plan-muscle-tag-form { margin:0; }
.plan-muscle-tag-form button,.plan-muscle-editor .plan-muscle-tag { cursor:pointer; }
.plan-muscle-tag span { color:#648b71;font-size:calc(18px * var(--fs, 1));line-height:12px; }
.plan-muscle-tag-form button:hover,.plan-muscle-editor .plan-muscle-tag:hover { border-color:var(--green);background:#e9f3e9; }
.plan-muscle-tag-form button:focus-visible,.plan-muscle-editor .plan-muscle-tag:focus-visible { outline:2px solid var(--green);outline-offset:2px; }
.plan-muscle-add { display:flex;align-items:center;gap:7px;margin:9px 0 0; }
.plan-muscle-add select { min-width:0;width:auto;max-width:220px;min-height:36px;padding:6px 9px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit;font-size:calc(13px * var(--fs, 1)); }
.plan-muscle-add button { min-height:36px;padding:6px 11px;border:1px solid #b9d8c2;border-radius:10px;background:#f4faf4;color:var(--green);font:inherit;font-size:calc(13px * var(--fs, 1));font-weight:700;cursor:pointer; }
.plan-muscle-add button:disabled { opacity:.5;cursor:default; }
.plan-muscle-add button:focus-visible,.plan-muscle-add select:focus-visible { outline:2px solid var(--green);outline-offset:2px; }
.plan-duration { color:var(--green);font-weight:750; }
.plan-detail-exercises { display:grid;gap:12px;margin:19px 0 0;padding-left:22px; }
.plan-detail-exercises > li { padding-left:3px; }
.plan-detail-exercises strong { font-size:calc(18px * var(--fs, 1)); }
.plan-detail-exercises small { display:block;color:var(--muted); }
.plan-detail-exercises ul { margin:7px 0 0;padding-left:20px;color:var(--muted); }
.plan-actions { position:relative;display:flex;flex-wrap:wrap;gap:9px;margin-top:15px; }
.plan-actions form { margin:0; }
.plan-actions .button { display:inline-flex;align-items:center;min-height:44px;padding:9px 15px;border:1px solid var(--border);text-decoration:none;font-size:calc(14px * var(--fs, 1)); }
.plan-actions .plan-edit-link { border-color:var(--green); }
.plan-form { display:grid;gap:14px; }
.plan-muscle-editor { display:grid;gap:15px;padding:18px; }
.plan-muscle-editor h2 { margin:0;font-size:calc(18px * var(--fs, 1)); }
.plan-muscle-editor > p { margin:-7px 0 0;color:var(--muted);font-size:calc(13px * var(--fs, 1)); }
.plan-muscle-editor-row h3 { margin:0 0 8px;font-size:calc(14px * var(--fs, 1)); }
.plan-muscle-editor-row .plan-detail-muscle-tags small { color:var(--muted);font-size:calc(13px * var(--fs, 1)); }
.plan-basics { padding:18px; }
.plan-basics label { display:block;margin:0 0 16px;font-weight:750; }
.plan-basics label:last-child { margin-bottom:0; }
.plan-basics input,.plan-basics textarea { border-radius:14px;font-weight:400; }
.plan-basics input::placeholder,.plan-basics textarea::placeholder { font-weight:400; }
.plan-basics textarea { width:100%; }
.plan-image-field { display:flex;align-items:center;gap:13px;min-width:0;padding-top:13px;border-top:1px solid var(--border); }
.plan-image-field > img { display:block;flex:none;width:88px;height:88px;border-radius:14px;background:var(--warm);object-fit:contain; }
.plan-image-field > div { min-width:0;flex:1; }
.plan-image-field label { margin:0 0 5px; }
.plan-image-field input { width:100%;max-width:100%;padding:5px;font-size:calc(13px * var(--fs, 1)); }
.plan-image-field small { display:block;color:var(--muted);font-size:calc(12px * var(--fs, 1)); }
.plan-basics .plan-remove-image { display:flex;align-items:center;gap:7px;margin:10px 0 0;font-size:calc(13px * var(--fs, 1));font-weight:500; }
.plan-remove-image input { width:auto;margin:0; }
.plan-section-heading { display:grid;gap:12px; }
.plan-section-heading h2 { margin:0;font-size:calc(clamp(19px,4vw,23px) * var(--fs, 1)); }
.plan-library-link { display:inline-flex;align-items:center;justify-self:start;gap:8px;min-height:28px;color:var(--green);font-size:calc(clamp(16px,3.5vw,19px) * var(--fs, 1));font-weight:500;text-decoration:none; }
.plan-library-text { text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px; }
.plan-library-icon,.plan-library-chevron { display:block;flex:none;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.plan-library-chevron { width:19px;height:19px;stroke-width:2.5; }
.plan-exercise-row { padding:17px; }
.plan-row-heading { align-items:flex-start;flex-wrap:wrap; }
.plan-row-heading h3 { display:flex;align-items:center;gap:7px;min-height:38px; }
.plan-position { display:grid;place-items:center;flex:none;width:27px;height:27px;border-radius:9px;background:#e7eee4;color:#466951;font-size:calc(13px * var(--fs, 1)); }
.plan-row-actions { display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end; }
.plan-row-actions button { min-height:38px;padding:6px 10px;border:1px solid #e0e5dc;border-radius:11px;background:#f8faf5;color:#4f6854;font-size:calc(13px * var(--fs, 1));font-weight:700;cursor:pointer; }
.plan-row-actions button:disabled { opacity:.35;cursor:default; }
.plan-move-buttons { display:flex;gap:3px;padding:2px;border:1px solid #dce5d9;border-radius:12px;background:#f4f8f1; }
.plan-row-actions .plan-move-buttons button { display:grid;place-items:center;width:34px;min-width:34px;min-height:32px;padding:3px;border:0;background:transparent; }
.plan-row-actions svg { display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.plan-row-actions .plan-toggle { display:inline-flex;align-items:center;gap:3px; }
.plan-row-actions .plan-toggle svg { transition:transform .18s; }
.plan-exercise-row.is-collapsed .plan-toggle svg { transform:rotate(-90deg); }
.plan-row-actions .plan-remove { border-color:transparent;background:transparent;color:#876d63; }
.plan-exercise-row.plan-just-moved { animation:planMoved 1.4s ease-out; }
@keyframes planMoved { 0%,55% { box-shadow:0 0 0 3px #87b48c; background:#f2f9f0; } 100% { box-shadow:none; } }
.plan-save-message { margin:10px 0;color:#4f6854;font-size:calc(14px * var(--fs, 1));font-weight:650; }
.plan-save-message[hidden] { display:none; }
.plan-save-error { margin:10px 0; }
.plan-exercise-row.is-collapsed .plan-exercise-content,.plan-exercise-row.is-collapsed .plan-row-subtitle,.plan-exercise-row.is-collapsed .plan-missing-exercise { display:none; }
.plan-collapsed-title { margin:9px 0 0;font-weight:650;overflow-wrap:anywhere; }
.fitness-item-actions { display:flex;flex:none;flex-direction:column;align-items:center;justify-content:center;align-self:stretch; }
.fitness-item-actions form { margin:0; }
.fitness-item-actions .fitness-favorite-button { width:38px;height:38px;color:#c99720;cursor:pointer; }
.fitness-item-actions .fitness-menu { align-self:center; }
.plan-missing-exercise { margin:8px 0;color:#905b37;font-size:calc(14px * var(--fs, 1)); }
.plan-row-heading { display:flex;justify-content:space-between;align-items:center;gap:8px; }
.plan-row-heading h3 { margin:0;font-size:calc(clamp(18px,3vw,22px) * var(--fs, 1)); }
.plan-row-subtitle { margin:1px 0 12px;font-weight:650; }
.plan-exercise-picker { display:flex;align-items:center;gap:12px;min-width:0;min-height:82px;margin-bottom:15px;padding:8px;border:1px solid var(--border);border-radius:15px;background:#fff; }
.plan-picker-image { display:block;flex:none;width:64px;height:64px;object-fit:cover;border-radius:12px;background:var(--warm); }
.plan-picker-copy { min-width:0;flex:1; }
.plan-exercise-picker select { min-width:0;width:100%;margin:0;padding:4px 10px 4px 0;border:0;background:transparent;color:var(--ink);font-size:calc(clamp(14px,3vw,18px) * var(--fs, 1));font-weight:750; }
.plan-exercise-picker select:focus { border:0; }
.plan-picker-meta { display:block;min-height:17px;margin-top:2px;color:var(--muted);font-size:calc(12px * var(--fs, 1));overflow-wrap:anywhere; }
.plan-sets { display:grid;gap:10px; }
.plan-set-row { padding:16px;border:1px solid #e9e4d7;border-radius:17px;background:#fff; }
.plan-set-heading { display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px; }
.plan-set-heading strong { font-size:calc(16px * var(--fs, 1)); }
.plan-set-fields { display:grid;grid-template-columns:minmax(78px,1.2fr) minmax(42px,.6fr) minmax(42px,.6fr) minmax(68px,1fr);align-items:end;gap:8px; }
.plan-set-fields label { display:block;min-width:0;margin:0;color:var(--muted);font-size:calc(12px * var(--fs, 1));font-weight:700; }
.plan-set-fields [hidden] { display:none; }
.plan-set-fields input,.plan-set-fields select { min-width:0;width:100%;margin-top:4px;padding:8px 7px;border-radius:11px;background:#fff;font-size:calc(14px * var(--fs, 1)); }
.plan-field-disabled { opacity:.5; }
.plan-add-exercise { width:100%; }
.plan-set-footer { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:12px;margin-top:15px;padding-top:12px;border-top:1px solid #eee8e0; }
.plan-rest-field { display:block;min-width:0;color:var(--muted);font-size:calc(12px * var(--fs, 1));font-weight:700; }
.plan-rest-field input { display:block;width:min(100%,128px);margin-top:4px;padding:8px 7px;border-radius:11px;background:#fff;font-size:calc(14px * var(--fs, 1)); }
.plan-add-set { display:flex;align-items:center;justify-content:center;gap:9px;min-height:52px;padding:1px 0 1px 10px;border:0;border-left:1px solid #eee8e0;background:transparent;color:var(--green);font-size:calc(14px * var(--fs, 1));font-weight:650;line-height:1.15;text-align:left;cursor:pointer;transition:transform .14s ease,color .14s ease; }
.plan-add-set-symbol { display:grid;place-items:center;flex:none;width:37px;height:37px;border:1px solid #b7ddc5;border-radius:50%;background:#f6fdf8;font-size:calc(27px * var(--fs, 1));font-weight:400;line-height:1; }
.plan-add-set:hover,.plan-add-set:active { color:#08613a; }
.plan-add-set:active { transform:scale(.97); }
.plan-add-set:focus:not(:focus-visible),.plan-remove-set:focus:not(:focus-visible) { outline:none; }
.plan-add-set:focus-visible,.plan-remove-set:focus-visible { outline:2px solid var(--green);outline-offset:2px;border-radius:8px; }
@media (prefers-reduced-motion: reduce) { .plan-add-set { transition:none; } }
.plan-remove { border:0;background:transparent;color:#935e4e;font-weight:750; }
.plan-remove-set { display:inline-flex;align-items:center;gap:6px;min-height:42px;padding:0;border:0;background:transparent;color:#9a5744;font-size:calc(14px * var(--fs, 1));font-weight:650;cursor:pointer; }
.plan-trash-icon { display:grid;place-items:center;width:37px;height:37px;border:1px solid #eee8e0;border-radius:50%;background:transparent; }
.plan-trash-icon svg { display:block;width:19px;height:19px; }
.plan-save { justify-self:stretch;width:100%;min-height:54px;margin-top:2px;border-radius:15px;font-size:calc(18px * var(--fs, 1)); }
@media(max-width:600px) {
 .plan-card-link { grid-template-columns:minmax(99px,34%) minmax(0,1fr);gap:10px; }
 .plan-card-link { min-height:184px; }
 .plan-card-thumbnail { width:100%; }
 .plan-card-body { gap:4px;padding:3px 3px 3px 0; }
 .plan-card-heading { padding-right:78px; }
 .plan-card-heading strong { font-size:calc(clamp(15px,4.35vw,20px) * var(--fs, 1)); }
 .plan-card-muscles { font-size:calc(12px * var(--fs, 1)); }
 .plan-card-metrics { margin-top:auto;padding-top:2px; }
 .plan-card-metric { padding:0 1px; }
 .plan-metric-icon { width:31px;height:31px;margin-bottom:2px; }
 .plan-metric-icon svg { width:26px;height:26px; }
 .plan-metric-icon img { width:33px;height:33px; }
 .plan-card-metric b { font-size:calc(clamp(12px,3.6vw,15px) * var(--fs, 1)); }
 .plan-card-metric small { font-size:calc(clamp(9px,2.5vw,11px) * var(--fs, 1)); }
 .plan-card-favorite { top:10px;right:10px; }
 .plan-star-button { width:29px;height:29px; }
 .plan-star-button svg { width:25px;height:25px; }
 .fitness-star svg,.fitness-favorite-button svg { width:25px;height:25px; }
 .plan-card-description { margin-top:2px;font-size:calc(13px * var(--fs, 1));line-height:1.3; }
 .plan-card-menu { top:8px;right:45px; }
 .plan-card-menu-labeled { top:auto;right:auto; }
 .plan-basics,.plan-exercise-row { padding:13px; }
 .plan-set-fields { grid-template-columns:minmax(72px,1.15fr) minmax(38px,.55fr) minmax(38px,.55fr) minmax(60px,.95fr);gap:6px; }
 .plan-set-fields input,.plan-set-fields select { padding:8px 5px; }
 .plan-set-row { padding:12px; }
 .plan-set-footer { gap:7px; }
 .plan-add-set { gap:6px;padding-left:7px;font-size:calc(12px * var(--fs, 1)); }
 .plan-add-set-symbol { width:32px;height:32px;font-size:calc(24px * var(--fs, 1)); }
}
@media(max-width:350px) {
 .plan-tabs a { padding:7px 9px;font-size:calc(13px * var(--fs, 1)); }
 .plan-card-link { grid-template-columns:91px minmax(0,1fr);gap:7px; }
 .plan-card-heading { padding-right:68px; }
 .plan-card-menu { right:42px; }
 .plan-card-menu-labeled { right:auto; }
 .plan-card-metric small { font-size:calc(9px * var(--fs, 1));letter-spacing:-.02em; }
 .plan-image-field > img { width:65px;height:65px; }
 .plan-set-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .plan-set-fields label:first-child { grid-column:1/-1; }
}

/* The session screen uses the same shell and cards as the personal workout programs. */
.plan-history-link { display:inline-flex;align-items:center;gap:8px;margin:17px 3px 0;color:var(--green);font-size:calc(17px * var(--fs, 1));font-weight:750;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:5px; }
.workout-resume.card { display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px;padding:12px 16px;background:#f5fcf6;color:var(--green);font-weight:750;text-decoration:none; }
.workout-start-button { display:inline-flex;align-items:center;justify-content:center;min-height:44px; }
.workout-page .card { margin:0; }
.workout-page .workout-summary { padding:18px 20px; }
.workout-summary h2 { margin:0 0 7px;font-size:calc(clamp(21px,4vw,27px) * var(--fs, 1)); }
.workout-summary p { margin:4px 0;color:var(--muted); }
.workout-progress strong { color:var(--green); }
.workout-summary .button { display:inline-block;margin-top:13px;text-decoration:none; }
.workout-elapsed strong { color:var(--green);font-variant-numeric:tabular-nums; }
.workout-summary .workout-elapsed { display:inline-flex;align-items:center;gap:8px;margin-top:12px;padding:8px 11px;border:1px solid #dce7d7;border-radius:12px;background:#f6f9f3;color:#58705b;font-size:calc(13px * var(--fs, 1));font-weight:700; }
.workout-elapsed strong { margin-left:6px;color:#315b40;font-size:calc(17px * var(--fs, 1));letter-spacing:.025em; }
.workout-clock-icon { display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#e4efe1;color:#47704e;font-size:calc(18px * var(--fs, 1));line-height:1; }
.workout-pause { margin:10px 0 16px; }
.workout-pause button { min-height:40px;padding:8px 14px; }
.workout-page.has-rest { padding-bottom:90px; }
.workout-rest { position:fixed;z-index:11;right:14px;bottom:calc(87px + env(safe-area-inset-bottom));left:14px;display:flex;align-items:center;justify-content:space-between;gap:14px;width:calc(100% - 28px);max-width:660px;margin:auto;padding:12px 17px;border:1px solid #b9d9bd;border-radius:18px;background:#f4fbf3;box-shadow:0 8px 25px rgba(55,74,53,.15); }
.workout-rest > div { display:grid;gap:2px; }
.workout-rest small { color:#486b50;font-size:calc(13px * var(--fs, 1));font-weight:700; }
.workout-rest strong { color:var(--green);font-size:calc(23px * var(--fs, 1));font-variant-numeric:tabular-nums;line-height:1.1; }
.workout-rest form { flex:none;margin:0; }
.workout-rest button,.workout-set-timer button { min-height:38px;padding:5px 10px;border:1px solid #b9d9bd;border-radius:10px;background:#fff;color:var(--green);font-size:calc(13px * var(--fs, 1));font-weight:750;cursor:pointer; }
.workout-rest.is-finished { border-color:#98cda3;background:#eaf8ec; }
.workout-rest button:focus-visible,.workout-set-timer button:focus-visible { outline:2px solid var(--green);outline-offset:2px; }
.workout-rest button:focus:not(:focus-visible),.workout-set-timer button:focus:not(:focus-visible) { outline:none; }
.workout-rest button:active,.workout-set-timer button:active { transform:scale(.97); }
.workout-exercises,.workout-sets,.workout-history-list { display:grid;gap:12px; }
.workout-exercises { margin-top:14px; }
.workout-exercise,.workout-order { scroll-margin-top:18px; }
.workout-exercise[open] { border-color:#a9d2b3; }
.workout-exercise > summary,.workout-order > summary { list-style:none;cursor:pointer; }
.workout-exercise > summary::-webkit-details-marker,.workout-order > summary::-webkit-details-marker { display:none; }
.workout-exercise-summary { display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:49px; }
.workout-exercise-summary:focus:not(:focus-visible),.workout-order > summary:focus:not(:focus-visible) { outline:none; }
.workout-exercise-summary:focus-visible,.workout-order > summary:focus-visible { outline:2px solid var(--green);outline-offset:3px;border-radius:8px; }
.workout-exercise-label { display:grid;gap:3px;min-width:0; }
.workout-exercise-label strong { font-size:calc(clamp(17px,3.3vw,23px) * var(--fs, 1));line-height:1.2;overflow-wrap:anywhere; }
.workout-exercise-label small { font-size:calc(15px * var(--fs, 1));font-weight:750;line-height:1.35; }
.workout-status-done { color:#277c42; }
.workout-status-pending { color:#986408; }
.workout-status-current { display:inline-flex;align-items:center;gap:6px;color:#205d91;font-weight:850; }
.workout-status-current::before { content:"";width:8px;height:8px;flex:none;border-radius:50%;background:#337cbc; }
.workout-status-missed { color:#b0493e; }
.workout-chevron { display:block;flex:none;width:11px;height:11px;margin:0 5px 5px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;color:var(--green);transform:rotate(45deg);transition:transform .15s ease; }
.workout-exercise[open] > summary .workout-chevron,.workout-order[open] > summary .workout-chevron { transform:rotate(225deg); }
.workout-exercise .workout-sets { margin-top:13px; }
.workout-order.card { margin-top:12px;padding:12px 17px; }
.workout-order > summary { display:flex;justify-content:space-between;align-items:center;min-height:32px;color:var(--green);font-size:calc(14px * var(--fs, 1));font-weight:750; }
.workout-order ol { display:grid;gap:0;margin:11px 0 0;padding:0;list-style:none; }
.workout-order li { display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;padding:5px 0;border-top:1px solid var(--border);font-size:calc(14px * var(--fs, 1)); }
.workout-order li > span { min-width:0;overflow-wrap:anywhere; }
.workout-order-buttons { display:flex;gap:4px;flex:none; }
.workout-order-buttons form { margin:0; }
.workout-order-buttons button { display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--green);cursor:pointer; }
.workout-order-buttons button svg { width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.workout-order-buttons button:disabled { opacity:.35;cursor:default; }
.workout-order-buttons button:active:not(:disabled) { transform:scale(.96); }
.workout-set { padding:13px;border:1px solid #e9e4d7;border-radius:16px;background:#fff; }
.workout-set.is-done { border-color:#9dd3aa; }
.workout-set.is-current { border:2px solid #438bc2;border-left-width:6px;background:#eaf4ff;box-shadow:0 0 0 3px rgba(67,139,194,.14);animation:workoutCurrentGlow 2.6s ease-in-out infinite;scroll-margin-top:16px; }
@keyframes workoutCurrentGlow { 50% { box-shadow:0 0 0 7px rgba(67,139,194,.06); } }
@media(prefers-reduced-motion:reduce) { .workout-set.is-current { animation:none; } }
.workout-set-heading { display:flex;align-items:baseline;justify-content:space-between;gap:10px; }
.workout-set-heading strong { font-size:calc(16px * var(--fs, 1)); }
.workout-set-heading span { font-size:calc(13px * var(--fs, 1));font-weight:750;text-align:right; }
.workout-planned { margin:7px 0 10px;color:var(--muted);font-size:calc(13px * var(--fs, 1)); }
.workout-previous { margin:0 0 10px;color:#53729a;font-size:calc(13px * var(--fs, 1));line-height:1.35; }
.workout-previous strong { font-weight:700; }
.workout-set-timer { display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin:8px 0 12px;padding:10px 12px;border:1px solid #dbe9d9;border-radius:13px;background:#f7fbf6;color:var(--green);font-size:calc(14px * var(--fs, 1));font-weight:700; }
.workout-set-timer strong { font-size:calc(21px * var(--fs, 1));font-variant-numeric:tabular-nums; }
.workout-set-timer small { color:#54735b;font-size:calc(12px * var(--fs, 1));font-weight:650; }
.workout-set-timer.is-finished { border-color:#a6d3aa;background:#edf9ef; }
.workout-set-timer form { margin:0 0 0 auto; }
.workout-timer-start label { display:flex;align-items:center;gap:8px;color:var(--muted);font-size:calc(13px * var(--fs, 1)); }
.workout-timer-start input { width:78px;min-height:38px;padding:7px;border:1px solid var(--border);border-radius:9px;background:#fff;font-size:calc(16px * var(--fs, 1)); }
.workout-set-form { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:10px; }
.workout-set-form label { min-width:0;margin:0;color:var(--muted);font-size:calc(13px * var(--fs, 1));font-weight:700; }
.workout-set-form input { min-width:0;width:100%;margin-top:4px;padding:9px 8px;background:#fff;font-size:calc(16px * var(--fs, 1)); }
.workout-set-form .button { grid-column:1/-1;justify-self:start;min-height:43px;padding:8px 12px;white-space:nowrap; }
.workout-rpe-field small { display:block;margin-top:4px;color:var(--muted);font-size:calc(11px * var(--fs, 1));font-weight:400; }
.workout-bodyweight { display:flex;align-items:center;min-height:43px;color:var(--muted);font-size:calc(13px * var(--fs, 1)); }
.workout-undo { margin:8px 0 0;text-align:right; }
.workout-undo button { padding:4px;border:0;background:transparent;color:#945a48;text-decoration:underline; }
.workout-actual { margin:6px 0 0;color:var(--green);font-weight:750; }
.workout-finish { margin:17px 0 0; }
.workout-finish .button { width:100%;min-height:52px;font-size:calc(17px * var(--fs, 1)); }
.workout-finish .button:disabled { opacity:.5;cursor:not-allowed; }
.workout-cancel { margin:16px 3px;color:#965748; }
.workout-cancel summary { width:max-content;cursor:pointer;text-decoration:underline;text-underline-offset:4px; }
.workout-cancel p { max-width:42ch;margin:11px 0;color:var(--muted); }
.workout-cancel .button { margin:0;border:1px solid #d6b4aa;color:#8e4c3c; }
.workout-history-list { margin-top:12px; }
.workout-history-card.card { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px 11px 20px; }
.workout-history-card > a { display:flex;flex:1;min-width:0;align-items:center;justify-content:space-between;gap:10px;padding:5px 0;color:var(--ink);text-decoration:none; }
.workout-history-card strong { min-width:0;overflow-wrap:anywhere; }
.workout-history-card > a span { flex:none;color:var(--muted);font-size:calc(13px * var(--fs, 1)); }
.workout-history-card > a:hover strong { color:var(--green); }
.history-delete { position:relative;flex:none; }
.history-delete > summary { display:flex;align-items:center;justify-content:center;gap:6px;min-width:40px;min-height:40px;padding:4px;border-radius:10px;color:#926b65;cursor:pointer;list-style:none; }
.history-delete > summary::-webkit-details-marker { display:none; }
.history-delete > summary:hover,.history-delete[open] > summary { background:#f9f0ed;color:#a5463a; }
.history-delete > summary:focus-visible,.history-delete-panel button:focus-visible { outline:2px solid #a5463a;outline-offset:2px; }
.history-delete svg { width:20px;height:20px;flex:none; }
.history-delete-panel { position:absolute;z-index:10;top:calc(100% + 5px);right:0;width:min(275px,calc(100vw - 42px));padding:13px;border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:0 12px 30px #3e3b2925; }
.history-delete-panel p { margin:0 0 10px;color:var(--muted);font-size:calc(13px * var(--fs, 1));line-height:1.4; }
.history-delete-panel button { width:100%;min-height:38px;padding:7px 9px;border:1px solid #d9b7ae;border-radius:9px;background:#fbf3f1;color:#a5463a;font:inherit;font-size:calc(13px * var(--fs, 1));font-weight:750;cursor:pointer; }
.history-clear { margin:9px 0 0 auto;width:max-content;max-width:100%; }
.history-clear > summary { padding:5px 9px;font-size:calc(13px * var(--fs, 1)); }
.workout-pagination { display:flex;justify-content:center;gap:16px;flex-wrap:wrap;margin-top:17px;color:var(--muted); }
.workout-pagination a { color:var(--green); }
@media(max-width:600px) {
 .workout-page .workout-summary,.workout-exercise { padding:15px; }
 .workout-exercise-label strong { font-size:calc(17px * var(--fs, 1)); }
 .workout-exercise-label small { font-size:calc(14px * var(--fs, 1)); }
 .workout-set { padding:11px; }
 .workout-rest { right:8px;bottom:calc(78px + env(safe-area-inset-bottom));left:8px;width:calc(100% - 16px);padding:10px 12px; }
 .workout-rest strong { font-size:calc(20px * var(--fs, 1)); }
 .workout-set-timer { gap:8px; }
 .workout-set-timer form { margin-left:0; }
 .workout-set-form { grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
 .workout-set-form .button { grid-column:1/-1;justify-self:stretch;width:100%;white-space:normal; }
 .workout-history-card.card { align-items:flex-start;gap:5px;padding:11px; }
 .workout-history-card > a { align-items:flex-start;flex-direction:column;gap:3px; }
 .history-delete-one .history-delete-panel { position:fixed;top:auto;right:12px;bottom:calc(78px + env(safe-area-inset-bottom));left:12px;width:auto;z-index:90; }
 .plan-actions { display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:stretch; }
 .plan-actions > form:first-child,.plan-actions > a:first-child { grid-column:1/-1; }
 .plan-actions > form .button,.plan-actions > a.button { width:100%;justify-content:center; }
 .plan-actions .plan-card-menu-labeled { grid-column:2; }
}

/* Нижнее меню: кнопка «+» и панель быстрого добавления */
.nav-icon img { display: block; width: 100%; height: 100%; }
html[data-theme="rose"] .nav-tint { filter: hue-rotate(190deg); }
.bottom-nav a.nav-add { align-self: start; justify-self: center; width: 68px; height: 68px; min-height: 68px; margin-top: -14px; padding: 0; border-radius: 50%; }
.bottom-nav a.nav-add, .bottom-nav a.nav-add:hover, .bottom-nav a.nav-add:active, .bottom-nav a.nav-add[aria-current="page"] { background: none; }
.bottom-nav a.nav-add img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 5px 6px rgba(20, 129, 76, .28)); }
html[data-theme="rose"] .bottom-nav a.nav-add img { filter: hue-rotate(190deg) drop-shadow(0 5px 6px rgba(145, 77, 104, .28)); }
.bottom-nav a.nav-add:focus-visible { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--green-bright); }
dialog.add-sheet { position: fixed; inset: auto 0 0; width: 100%; max-width: 560px; max-height: 88vh; margin: 0 auto; padding: 0; border: 0; overflow: visible; background: transparent; color: var(--ink); }
dialog.add-sheet::backdrop { background: rgba(29, 33, 34, .42); }
.add-sheet-panel { max-height: 88vh; overflow-y: auto; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); border: 1.5px solid var(--border); border-bottom: 0; border-radius: 26px 26px 0 0; background: var(--surface); }
.add-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.add-sheet-head h2 { margin: 0; font-size: calc(22px * var(--fs, 1)); }
.add-sheet-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: calc(30px * var(--fs, 1)); line-height: 1; cursor: pointer; }
.add-sheet-close:focus-visible, .add-action:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--green-bright); }
.add-actions { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.add-action { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 8px 10px; border-radius: 16px; color: var(--ink); text-decoration: none; }
a.add-action:hover, a.add-action:active { background: var(--tint); }
.add-action-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; color: var(--green); font-size: calc(30px * var(--fs, 1)); }
.add-action-text { display: grid; min-width: 0; }
.add-action-text small { overflow: hidden; color: var(--muted); font-size: calc(13px * var(--fs, 1)); text-overflow: ellipsis; white-space: nowrap; }
.add-action-chevron { margin-left: auto; color: var(--muted); font-size: calc(22px * var(--fs, 1)); }
.add-action.is-soon { opacity: .55; }
body:has(dialog.add-sheet[open]) { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  dialog.add-sheet[open] .add-sheet-panel { animation: add-sheet-in .2s ease-out; }
  @keyframes add-sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}
.bottom-nav .nav-inner a:active { background-color: transparent; }

/* Планирование: дела, задачи, напоминания */
input[type="checkbox"], input[type="radio"] { display: inline-block; flex: none; width: 20px; height: 20px; margin: 0; padding: 0; accent-color: var(--green); }
a.button { display: inline-block; text-align: center; text-decoration: none; }
.task-daynav { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px; margin: 14px 0 6px; }
.task-daynav-step { display: grid; place-items: center; width: 48px; height: 48px; border: 1.5px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--green); font-size: calc(24px * var(--fs, 1)); text-decoration: none; }
.task-daynav-prev .ui-icon { transform: scaleX(-1); }
.task-daynav-title { display: grid; text-align: center; }
.task-daynav-title strong { font-size: calc(24px * var(--fs, 1)); line-height: 1.2; }
.task-daynav-title span { color: var(--muted); font-size: calc(15px * var(--fs, 1)); }
.task-today-link { margin: 10px 0 0; text-align: center; }
.today-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px 0 14px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--green); font-size: calc(16px * var(--fs, 1)); font-weight: 750; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: transform .14s ease, background-color .14s ease; }
.today-pill .ui-icon { width: 22px; height: 22px; }
.today-pill:active { transform: scale(.97); background-color: var(--tint); }
.today-pill:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .today-pill { transition: none; } }
.plan-page .fitness-add { margin: 14px 0; }
.task-card h2, .task-form-card h2 { display: flex; align-items: center; gap: 14px; }
.task-count, .card-count { margin-left: auto; color: var(--muted); font-size: calc(15px * var(--fs, 1)); font-weight: 700; }
.card-badge { display: grid; place-items: center; min-width: 26px; height: 26px; margin-left: auto; padding: 0 7px; border-radius: 13px; background: #f26a3d; color: #fff; font-size: calc(14px * var(--fs, 1)); font-weight: 800; }
.task-list { display: grid; gap: 0; margin: 12px 0 0; padding: 0; list-style: none; }
.task-row { display: flex; align-items: center; gap: 4px; min-height: 56px; border-bottom: 1px solid #efe4cf; }
.task-row:last-child { border-bottom: 0; }
.task-toggle { flex: none; margin: 0; }
.task-check { position: relative; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; -webkit-tap-highlight-color: transparent; }
.task-check::before { content: ""; position: absolute; inset: 9px; border: 2px solid var(--check-off); border-radius: 50%; background: var(--surface) center / 100% no-repeat; transition: background-color .14s ease, border-color .14s ease; }
.task-check[aria-pressed="true"]::before { border-color: var(--green); background-color: var(--green); background-image: var(--check-img); }
.task-check:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--green-bright); }
.task-body { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; padding: 8px 0; color: inherit; text-decoration: none; }
.task-time { flex: none; width: 46px; color: var(--muted); font-size: calc(14px * var(--fs, 1)); font-variant-numeric: tabular-nums; }
.task-text { display: grid; min-width: 0; }
.task-text strong { font-size: calc(17px * var(--fs, 1)); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.task-text small { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.task-text small:empty { display: none; }
.task-bell { display: inline-flex; align-items: center; gap: 3px; color: #d98a1c; }
.task-bell .ui-icon { width: 14px; height: 14px; }
.task-late { color: #c0392b; font-weight: 700; }
.task-row.is-done strong { color: var(--muted); text-decoration: line-through; }
.task-row.is-done .task-time { opacity: .6; }
.task-more { margin: 2px 0 10px 50px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.plan-card .task-list-home { flex: 1; margin: 8px 0 12px; align-content: start; }
.card-footer { text-decoration: none; }
.card-footer-arrow { margin-left: auto; }
.task-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.task-option { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; font-weight: 600; }
.task-hint { display: block; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.task-scope { margin: 16px 0 0; padding: 0; border: 0; }
.task-scope legend { padding: 0; font-weight: 650; }
.task-form-actions { display: flex; gap: 10px; margin-top: 20px; }
.task-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.task-form-head h2 { min-width: 0; margin: 0; }
.task-trash { margin-right: -8px; }
.task-trash > summary:hover, .task-trash[open] > summary { background: transparent; }
.task-trash svg { width: 24px; height: 24px; }
@media (max-width: 600px) {
  .task-list-home .task-row { min-height: 40px; gap: 0; }
  .task-list-home .task-check { width: 32px; height: 36px; }
  .task-list-home .task-check::before { inset: auto; left: 4px; top: 6px; width: 24px; height: 24px; }
  .task-list-home .task-body { gap: 4px; padding: 5px 0; }
  .task-list-home .task-time { width: 32px; font-size: calc(11px * var(--fs, 1)); }
  .task-list-home .task-text strong { font-size: calc(13px * var(--fs, 1)); }
  .task-list-home .task-text small { font-size: calc(10px * var(--fs, 1)); }
  .task-more { margin-left: 32px; }
  .task-daynav-title strong { font-size: calc(21px * var(--fs, 1)); }
  .card-badge { min-width: 22px; height: 22px; font-size: calc(12px * var(--fs, 1)); }
}
/* Главная: компактные строки дел (вариант А) */
.task-mini-list { margin: 6px 0 8px; padding: 0; list-style: none; }
.plan-card .task-mini-list { flex: 1; }
.task-mini { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid #efe4cf; }
.task-mini:last-child { border-bottom: 0; }
.task-mini .task-check { width: 34px; height: 40px; }
.task-mini .task-check::before { inset: auto; left: 4px; top: 8px; width: 24px; height: 24px; }
.task-mini-square .task-check::before { border-radius: 7px; }
.task-mini-body { display: grid; flex: 1; min-width: 0; padding: 4px 0; color: inherit; text-decoration: none; }
.task-mini-title { overflow: hidden; font-size: calc(15px * var(--fs, 1)); font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.task-mini-meta { display: flex; align-items: center; gap: 5px; overflow: hidden; color: var(--muted); font-size: calc(12px * var(--fs, 1)); line-height: 1.25; white-space: nowrap; }
.task-mini-meta:empty { display: none; }
.task-mini-meta .ui-icon { width: 12px; height: 12px; }
.task-mini-meta .task-mini-bell { color: #d98a1c; }
.task-mini.is-done .task-mini-title { color: var(--muted); text-decoration: line-through; }
a.task-more { display: block; margin: 0 0 8px 34px; color: var(--green); font-size: calc(13px * var(--fs, 1)); font-weight: 700; text-decoration: none; }
.card-count { flex: none; white-space: nowrap; }
@media (max-width: 600px) {
  .task-mini { min-height: 42px; }
  .task-mini-title { font-size: calc(13px * var(--fs, 1)); }
  .task-mini-meta { font-size: calc(11px * var(--fs, 1)); }
  .card-count { font-size: calc(12px * var(--fs, 1)); }
  .reminder-card .task-mini:nth-child(n+3) { display: none; }
}

/* Блокнот «Дела на день»: верх + повторяемая середина + низ. Шаг линии = 62/958 ширины, строка дела = 3 линии,
   высота середины кратна двум линиям (период колец), поэтому линии и кольца всегда стыкуются. */
.notebook-wrap { container-type: inline-size; max-width: 560px; margin: 14px auto 22px; }
.notebook { --nbl: 22px; --nbl: calc(100cqw * 62 / 958); position: relative; margin: 0; color: var(--ink); }
.notebook-top, .notebook-body, .notebook-bottom { background-repeat: no-repeat; background-size: 100% auto; }
.notebook-top { display: flex; align-items: center; gap: 10px; aspect-ratio: 958 / 184; padding: calc(100cqw * 46 / 958) 21% 0 12%; margin-bottom: -1px; background-image: url("/assets/notebook/notebook-top.png?v=2"); background-position: top; }
.notebook-top h2 { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; font-size: calc(clamp(19px, 5.6cqw, 27px) * var(--fs, 1)); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; white-space: nowrap; }
.notebook-top .card-icon { width: 1.2em; height: 1.2em; margin-left: 0; border-radius: 0; background: transparent; font-size: 1.15em; }
.notebook-top .task-count { margin-left: auto; font-size: calc(clamp(14px, 4.2cqw, 18px) * var(--fs, 1)); white-space: nowrap; }
.notebook-body { min-height: calc(var(--nbl) * 2); padding: 0 6% 0 12%; margin-bottom: -1px; background-image: url("/assets/notebook/notebook-mid.png?v=2"); background-repeat: repeat-y; background-position: top; }
.notebook-bottom { aspect-ratio: 958 / 355; background-image: url("/assets/notebook/notebook-bottom.png?v=2"); background-position: bottom; }
.notebook .task-list { margin: 0; }
.notebook .task-list > li:last-child:nth-child(odd) { margin-bottom: var(--nbl); }
.notebook .task-row { align-items: center; gap: 0; min-height: calc(var(--nbl) * 3); border-bottom: 0; }
.notebook .task-check { margin-left: -6px; }
.notebook .task-body { gap: 2%; padding: 0; }
.notebook .task-time { width: 3.4em; font-size: calc(clamp(14px, 4.6cqw, 18px) * var(--fs, 1)); }
.notebook .task-text { position: relative; padding: 2px 0 2px 3.2%; }
.notebook .task-text::before { content: ""; position: absolute; left: 0; top: 8%; bottom: 8%; width: 1.5px; background: #e4d0ae; }
.notebook .task-text strong { display: -webkit-box; overflow: hidden; font-size: calc(clamp(16px, 5.3cqw, 21px) * var(--fs, 1)); line-height: 1.2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notebook .task-text small { font-size: calc(clamp(13px, 4.2cqw, 16px) * var(--fs, 1)); line-height: 1.3; }
.notebook-empty { display: flex; align-items: center; min-height: calc(var(--nbl) * 2); margin: 0; color: var(--muted); font-size: calc(clamp(14px, 4.2cqw, 17px) * var(--fs, 1)); }
.task-card .card-icon { width: 1.3em; height: 1.3em; border-radius: 0; background: transparent; font-size: 1.15em; }

/* Кнопка с листочками: PNG растягивается по ширине (края фиксированы, середина тянется), надпись — обычный текст. */
.leaf-button { --lb-h: 58px; display: flex; align-items: center; justify-content: center; gap: 12px; box-sizing: border-box; width: 100%; height: var(--lb-h); margin: 14px 0; padding: 0 0 2px; border: solid transparent; border-width: 0 calc(var(--lb-h) * 1.2) 0 calc(var(--lb-h) * .5); border-radius: 999px; border-image: url("/assets/leaf-button.png?v=1") 0 240 0 100 fill / 0 calc(var(--lb-h) * 1.2) 0 calc(var(--lb-h) * .5) stretch; color: #fff; font-size: calc(clamp(18px, 5.4vw, 22px) * var(--fs, 1)); font-weight: 800; line-height: 1; text-decoration: none; text-shadow: 0 1px 2px rgba(0, 70, 40, .35); -webkit-tap-highlight-color: transparent; cursor: pointer; filter: drop-shadow(0 4px 6px rgba(8, 99, 67, .25)); transition: transform .14s ease, filter .14s ease; }
.leaf-button:active { transform: scale(.98); filter: brightness(.95) drop-shadow(0 2px 4px rgba(8, 99, 67, .25)); }
.leaf-button:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 3px; }
.leaf-button-plus { position: relative; flex: none; width: calc(var(--lb-h) * .54); height: calc(var(--lb-h) * .54); border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 50%; background: linear-gradient(#fff, #fff) center / 46% 9% no-repeat, linear-gradient(#fff, #fff) center / 9% 46% no-repeat, rgba(255, 255, 255, .16); }
.leaf-button-label { min-width: 0; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .leaf-button { transition: none; } }

/* Главная: блоки по референсу (событие, план на день, напоминания + финансы, покупки). */
.home-blocks { display: grid; gap: 14px; margin-bottom: 26px; }
.home-card { padding: 22px 16px 16px; }
.home-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; }
.home-head h2 { min-width: 0; margin: 0; font-size: calc(clamp(19px, 5.6vw, 24px) * var(--fs, 1)); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.home-head .card-icon { flex: none; width: 34px; height: 34px; margin-left: -3px; border-radius: 0; background: transparent; font-size: calc(32px * var(--fs, 1)); }
.home-head .card-count { margin-left: auto; font-size: calc(16px * var(--fs, 1)); }
.home-muted { position: relative; z-index: 1; margin: 16px 0 0; color: var(--muted); font-size: calc(15px * var(--fs, 1)); line-height: 1.4; }
.home-event-art { position: absolute; right: -10px; bottom: -6px; width: 46%; height: auto; pointer-events: none; }
.home-link { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; min-height: 48px; color: var(--green); font-size: calc(17px * var(--fs, 1)); font-weight: 800; line-height: 1.2; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.home-link .ui-icon { flex: none; width: 20px; height: 20px; margin-left: auto; }
.home-link:active { opacity: .65; }
.home-link:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; border-radius: 8px; }
.home-shopping { min-height: 168px; }
.home-shopping .home-muted { max-width: 50%; }
.home-shop-link { width: max-content; margin-top: 8px; white-space: nowrap; }
.home-shopping-art { position: absolute; right: -8px; bottom: -6px; width: 44%; height: auto; pointer-events: none; }

/* Календарь: сетка месяца, список выбранного дня, форма события, «Следующее событие» с данными. Каркас без картинок и новых иконок. */
.cal-month { padding: 14px 8px 12px; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-week { margin: 0 0 4px; padding: 0 0 8px; border-bottom: 1px solid #efe4cf; color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 800; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.cal-week span:nth-child(n+6) { color: #a1283f; }
.cal-grid { row-gap: 2px; }
.cal-day { display: grid; justify-items: center; align-content: start; gap: 5px; min-height: 60px; padding: 5px 0 4px; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.cal-day:is(:nth-child(7n), :nth-child(7n-1)) { color: #a1283f; }
.cal-num { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: calc(16px * var(--fs, 1)); font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-day.is-out { opacity: .42; }
.cal-day.is-today .cal-num { background: var(--green); color: #fff; }
.cal-day.is-selected .cal-num::after { content: ""; position: absolute; inset: -4px; border: 2px solid var(--green-bright); border-radius: 50%; }
.cal-day:not(.is-today):active .cal-num { background: var(--tint); }
.cal-day:focus-visible { outline: none; }
.cal-day:focus-visible .cal-num { box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px var(--green-bright); }
.cal-dots { display: flex; justify-content: center; gap: 3px; height: 7px; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-bright); }
.cal-dot.is-private { background: var(--accent); }
.cal-dot.is-task { border-radius: 2px; background: #b9ae98; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 6px 0; padding-top: 10px; border-top: 1px solid #efe4cf; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-day-card { margin-top: 14px; }
.cal-list { margin: 14px 0 6px; padding: 0; list-style: none; }
.cal-item { display: flex; align-items: center; gap: 8px; min-height: 62px; border-bottom: 1px solid #efe4cf; }
.cal-item:last-child { border-bottom: 0; }
.cal-lead { flex: none; width: 3.6em; }
.cal-time { display: block; color: var(--green); font-size: calc(16px * var(--fs, 1)); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.cal-time.is-allday { font-size: calc(11px * var(--fs, 1)); letter-spacing: .05em; text-transform: uppercase; }
.cal-item .task-toggle { margin-left: -6px; }
.cal-body { display: grid; flex: 1; min-width: 0; padding: 8px 0; color: inherit; text-decoration: none; }
.cal-title { font-size: calc(16px * var(--fs, 1)); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cal-meta { color: var(--muted); font-size: calc(13px * var(--fs, 1)); line-height: 1.35; }
.cal-item.is-done .cal-title { color: var(--muted); text-decoration: line-through; }
.cal-empty { margin: 14px 0 6px; color: var(--muted); font-size: calc(15px * var(--fs, 1)); }
.cal-add { margin: 12px 0 0; }
.task-form input:disabled { background: #f6f1e6; color: var(--muted); }
.home-next { position: relative; z-index: 1; margin-top: 3px; }
.home-next-when { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 2px 12px 2px 2px; border: 1.5px solid var(--green); border-radius: 999px; background: var(--tint); color: var(--green); font-size: calc(12px * var(--fs, 1)); font-weight: 800; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.home-next-when.is-today { padding: 4px 12px; }
.home-next-when.is-today::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.home-next-when.is-soon { border-color: #a1283f; background: #fbf1ef; color: #a1283f; }
.home-next-when.is-soon .home-next-days, .home-next-when.is-soon.is-today::before { background: #a1283f; }
.home-next-days { display: grid; place-items: center; min-width: 25px; height: 25px; border-radius: 50%; background: var(--green); color: #fff; font-size: calc(14px * var(--fs, 1)); letter-spacing: 0; }
.home-next-title { margin: 8px 0 0; overflow: hidden; color: var(--ink); font-size: calc(clamp(18px, 5.6vw, 22px) * var(--fs, 1)); font-weight: 800; line-height: 1.25; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.home-next-date { margin: 2px 0 0; color: var(--muted); font-size: calc(12px * var(--fs, 1)); line-height: 1.3; }
.home-next-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.home-next-more { margin: 0; }

/* Покупки: быстрое добавление, список по категориям, «Куплено», история, карточка на главной. Каркас без новых картинок и иконок. */
.shop-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.shop-add input { margin-top: 0; }
.shop-add .button { min-height: 46px; padding: 0 18px; }
.shop-extra { margin-top: 6px; }
.shop-extra > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--green); font-size: calc(14px * var(--fs, 1)); font-weight: 700; cursor: pointer; list-style: none; }
.shop-extra > summary::-webkit-details-marker { display: none; }
.shop-extra > summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform .14s ease; }
.shop-extra[open] > summary::after { transform: rotate(-135deg); }
.shop-extra > summary:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; border-radius: 8px; }
.shop-extra .task-form-actions { margin-top: 16px; }
.shop-keep { margin: 14px 0 0; }
.shop-card { position: relative; margin-top: 14px; }
.shop-card::before, .shop-card::after { content: ""; position: absolute; top: -4px; width: 48px; height: 76px; background: no-repeat center top / contain; pointer-events: none; }
.shop-card::before { left: -6px; background-image: url("/assets/market/shop-leaves-left.png?v=1"); }
.shop-card::after { right: -6px; background-image: url("/assets/market/shop-leaves-right.png?v=1"); }
.shop-group { margin-top: 14px; padding: 8px 8px 10px; border-radius: 24px; background: var(--warm); background: color-mix(in srgb, var(--border) 16%, var(--warm)); }
.home-head + .shop-group { margin-top: 16px; }
.shop-group-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 6px 4px 8px 10px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.shop-group-title span:last-child { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: color-mix(in srgb, var(--border) 45%, var(--surface)); font-size: calc(14px * var(--fs, 1)); letter-spacing: 0; }
.shop-card .home-head { gap: 8px; padding: 0 20px 0 24px; }
.shop-card .home-head h2 { font-size: calc(clamp(19px, 5.6vw, 22px) * var(--fs, 1)); }
.shop-card .home-head .card-count { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border: 2px solid var(--green); border-radius: 19px; background: var(--surface); color: var(--green); font-size: calc(17px * var(--fs, 1)); font-weight: 800; }
.shop-list { margin: 0; padding: 0; list-style: none; }
.shop-item { display: flex; align-items: center; gap: 6px; min-height: 60px; margin-top: 8px; padding: 0 16px 0 8px; border-radius: 18px; background: var(--surface); box-shadow: 0 1px 2px rgba(96, 63, 29, .06), 0 5px 14px rgba(96, 63, 29, .05); }
.shop-item:first-child { margin-top: 0; }
.shop-item .task-toggle { flex: none; }
.shop-body { display: grid; flex: 1; min-width: 0; padding: 8px 0; color: inherit; text-decoration: none; }
.shop-title { font-size: calc(17px * var(--fs, 1)); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.shop-meta { color: var(--muted); font-size: calc(13px * var(--fs, 1)); line-height: 1.35; overflow-wrap: anywhere; }
.shop-who { flex: none; color: var(--muted); font-size: calc(14px * var(--fs, 1)); }
.shop-item.is-done .shop-title { color: var(--muted); text-decoration: line-through; }
.shop-empty { margin: 14px 0 4px; color: var(--muted); font-size: calc(15px * var(--fs, 1)); }
.shop-bought { position: relative; margin-top: 18px; padding: 8px 8px 14px; border: 1px solid color-mix(in srgb, var(--green) 14%, var(--tint)); border-radius: 24px; overflow: hidden; background: var(--tint); }
.shop-bought::after { content: ""; position: absolute; z-index: 0; right: -4px; bottom: -6px; width: 40px; height: 64px; background: url("/assets/market/shop-leaves-right.png?v=1") no-repeat right bottom / contain; pointer-events: none; }
.shop-bought > * { position: relative; z-index: 1; }
.shop-bought > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 12px 0 10px; color: var(--green); font-size: calc(20px * var(--fs, 1)); font-weight: 800; cursor: pointer; list-style: none; }
.shop-bought > summary::-webkit-details-marker { display: none; }
.shop-bought > summary::after { content: ""; width: 9px; height: 9px; margin-right: 6px; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); transition: transform .14s ease; }
.shop-bought[open] > summary::after { transform: rotate(-135deg); }
.shop-bought > summary:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; border-radius: 12px; }
.shop-history-link { position: relative; display: flex; align-items: center; gap: 6px; min-height: 76px; margin-top: 16px; padding: 0 96px 0 36px; overflow: hidden; border: 1px solid #efe4cf; border-radius: 24px; background: var(--surface); background: linear-gradient(90deg, var(--surface), var(--warm)); color: var(--ink); font-size: calc(16px * var(--fs, 1)); font-weight: 800; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.shop-history-link::before { content: ""; position: absolute; left: -4px; bottom: -10px; width: 34px; height: 54px; background: url("/assets/market/shop-leaves-left.png?v=1") no-repeat center bottom / contain; pointer-events: none; }
.shop-history-clock { flex: none; width: 36px; height: auto; }
.shop-history-art { position: absolute; right: 6px; bottom: -3px; height: 50px; width: auto; pointer-events: none; }
.shop-history-link:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.shop-swipe { position: relative; padding: 0; overflow: hidden; }
.shop-swipe-row { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; width: 100%; min-height: 60px; padding: 0 16px 0 14px; border-radius: 18px; background: var(--surface); touch-action: pan-y; transition: transform .2s ease; }
.shop-swipe-delete { position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: 96px; margin: 0; }
.shop-swipe-delete button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0 18px 18px 0; background: #a5463a; color: #fff; font: inherit; font-size: calc(12px * var(--fs, 1)); font-weight: 800; cursor: pointer; }
.shop-swipe-delete svg { width: 22px; height: 22px; }
.shop-swipe-delete button:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.shop-swipe.is-dragging .shop-swipe-row { transition: none; }
.shop-swipe.is-open .shop-swipe-row, .shop-swipe:has(.shop-swipe-delete button:focus-visible) .shop-swipe-row { transform: translateX(-96px); }
@media (prefers-reduced-motion: reduce) { .shop-swipe-row { transition: none; } }
.shop-again { flex: none; min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--green); font: inherit; font-size: calc(14px * var(--fs, 1)); font-weight: 800; cursor: pointer; }
.shop-again:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; border-radius: 8px; }
.shop-card .home-link { margin-top: 12px; border-top: 1px solid #efe4cf; }
.home-shopping .home-more { margin: 2px 0 0; }
.home-shopping .home-next-when { margin-top: 14px; }
/* Фон страниц с блоками: от светлого сверху до ровного тёплого тона (на главной это цвет между «Следующим событием» и «Сегодня в плане», ~344 px) и дальше без затемнения. Подключается классом body.page-tone (page_start(..., $tone = true)). */
body.page-home, body.page-tone { --page-tone: #faf2e4; --page-tone: color-mix(in srgb, var(--bg) 79%, var(--bg-deep)); background-color: var(--page-tone); background-image: linear-gradient(180deg, #fffefd 0, var(--bg) 140px, var(--page-tone) 344px); background-repeat: no-repeat; }
/* Рамки блоков главной и страниц с фоном-градиентом — одна аккуратная зелёная (--frame, как у карточек фитнеса), без чередования с коричневыми (решение владельца 30.09.2026). Тени остаются тёплыми. */
body.page-home .home-card, body.page-home .quick-card, body.page-tone .card { border-color: var(--frame); box-shadow: 0 10px 26px rgba(96, 63, 29, .14); }
html[data-theme="rose"] body.page-home .home-card, html[data-theme="rose"] body.page-home .quick-card, html[data-theme="rose"] body.page-tone .card { box-shadow: 0 10px 26px rgba(98, 48, 66, .15); }

/* Быстрый доступ на главной: лист с тонкой зелёной рамкой; баннер владельца стоит внутри него, чуть уже листа и вплотную к плиткам. */
.quick-stack { max-width: 900px; margin: 0 auto; }
.quick-sheet { display: grid; gap: 10px; }
/* Плашка стоит вровень с плитками: её левый край = левому краю «Фитнеса», правый = правому краю «Календаря»; PNG обрезан по самой плашке, рамка — та же зелёная (--frame), радиус скругления считан с картинки (56 из 1080 × 267 px). */
.quick-banner { display: block; width: 100%; height: auto; margin: 0; border: 1.5px solid var(--frame); border-radius: 5.2% / 21%; box-shadow: 0 10px 26px rgba(96, 63, 29, .14); pointer-events: none; }
.quick-sheet .quick-grid { width: 100%; max-width: none; margin: 0; }

/* «План»: ссылка «На главную» ближе к блокноту (было ~40 px, стало ~20 px). */
.plan-page .plan-day > :last-child { margin-bottom: 0; }
.plan-page .section-back { margin-top: 20px; }

/* Всплывающее уведомление («Дело сохранено» и т.п.): появляется сверху, само гаснет через ~4,5 с; крестик добавляет app.js. */
.flash { position: fixed; z-index: 60; top: calc(env(safe-area-inset-top, 0px) + 12px); left: 50%; display: flex; align-items: center; gap: 12px; width: min(calc(100% - 28px), 420px); padding: 12px 10px 12px 16px; border: 1.5px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: 0 10px 28px rgba(96, 63, 29, .18); color: var(--green); transform: translateX(-50%); animation: flash-life 4.6s ease both; }
.flash-mark { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green); }
.flash-mark::after { content: ""; position: absolute; left: 9px; top: 5px; width: 6px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; border-radius: 1px; transform: rotate(40deg); }
.flash-text { flex: 1; min-width: 0; font-size: calc(17px * var(--fs, 1)); font-weight: 800; line-height: 1.25; }
.flash-close { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font: inherit; font-size: calc(26px * var(--fs, 1)); line-height: 1; cursor: pointer; }
@keyframes flash-life {
  0% { opacity: 0; transform: translate(-50%, -18px); visibility: visible; }
  7%, 86% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); visibility: hidden; }
}
@keyframes flash-life-still {
  0%, 86% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .flash { animation-name: flash-life-still; } }

/* Шапка финансов как у фитнеса: картинка владельца за логотипом и заголовком (у фитнеса это .sport-shell::before), плавно уходит в фон страницы. Первый блок стоит на том же расстоянии от заголовка, что и у фитнеса (у карточек фитнеса margin 0). */
.fin-shell { position: relative; isolation: isolate; }
.fin-shell::before { content: ""; position: absolute; z-index: -1; top: 0; right: 0; width: 100%; height: min(56.3vw, 687px); background: url("/assets/finance/finance-hero.jpg?v=1") no-repeat right top / cover; -webkit-mask-image: linear-gradient(#000 0%, #000 68%, transparent 100%); mask-image: linear-gradient(#000 0%, #000 68%, transparent 100%); pointer-events: none; }
.fin-page > .card { margin-top: 0; }
/* Ссылка внизу («На главную», «К финансам») — на том же расстоянии от последнего блока, что и у фитнеса (18 px): у карточки убираем нижний margin от .section-page .card. */
.fin-page > .card:has(+ .section-back) { margin-bottom: 0; }
.fin-page .section-back { margin-top: 18px; }
/* Финансы: карточки по референсу владельца. Зелёной «мазни» под заголовком здесь нет: она только на главной. Янтарь (--fin-*) только для расходов, как на референсе. */
.fin-card { --fin-amber-soft: #fbf0df; --fin-amber-line: #f0dcb6; --fin-amber-ink: #b5741a; --fin-track: #f4dfb6; --fin-line: color-mix(in srgb, var(--green) 15%, var(--surface)); --fin-empty: color-mix(in srgb, var(--muted) 16%, var(--surface)); padding: 18px 14px 14px; }
/* Белые блоки финансов — в тёмно-зелёной обводке; кремово-коричневых подложек внутри нет: конверты и операции идут строками одного белого поля, между строками тонкие линии (решение владельца 30.09.2026). */
body .fin-card.card { border-color: var(--green); }
.fin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fin-head h2 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: calc(clamp(19px, 5.5vw, 24px) * var(--fs, 1)); font-weight: 800; letter-spacing: -.025em; line-height: 1.12; }
.fin-month { display: inline-flex; align-items: center; flex: none; gap: 7px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); font-weight: 700; text-decoration: none; white-space: nowrap; }
a.fin-month:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 3px; border-radius: 10px; }
.fin-month-icon { display: grid; place-items: center; width: 30px; height: 30px; color: color-mix(in srgb, var(--ink) 70%, var(--surface)); }
.fin-month-icon svg { width: 17px; height: 17px; }
.fin-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-top: 14px; padding: 3px; border: 1.5px solid var(--green); border-radius: 999px; background: var(--surface); }
.fin-switch a { display: grid; place-items: center; min-height: 38px; border-radius: 999px; color: color-mix(in srgb, var(--ink) 62%, var(--surface)); font-size: calc(16px * var(--fs, 1)); font-weight: 800; text-decoration: none; }
.fin-switch a:active, .fin-seg a:active { background-color: transparent; }
.fin-switch a[aria-current] { background: linear-gradient(135deg, color-mix(in srgb, var(--green) 75%, var(--green-bright)), var(--green)); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--green) 28%, transparent); }
.fin-switch a[aria-current]:focus-visible { box-shadow: 0 0 0 3px var(--green-bright); }
.fin-hint { margin: 10px 4px 0; color: var(--muted); font-size: calc(13px * var(--fs, 1)); line-height: 1.4; }
.fin-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; background: color-mix(in srgb, #fff 55%, var(--tint)); color: var(--green); font-size: calc(12.5px * var(--fs, 1)); font-weight: 800; line-height: 1.25; }
.fin-badge i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--green-bright); }
/* mint card with the month's balance */
.fin-balance, .fin-total, .nut-summary { position: relative; overflow: hidden; border: 1px solid color-mix(in srgb, var(--green) 12%, var(--tint)); border-radius: 22px; background: var(--tint); background: linear-gradient(135deg, color-mix(in srgb, #fff 55%, var(--tint)), var(--tint) 55%, color-mix(in srgb, var(--green-bright) 10%, var(--tint))); }
.fin-balance::before, .fin-total::before, .nut-summary::before { content: ""; position: absolute; top: -34px; right: -14px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--green-bright) 13%, transparent), transparent 70%); pointer-events: none; }
.fin-balance > *, .fin-total > *, .nut-summary > * { position: relative; }
.fin-balance { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 43%); column-gap: 12px; margin-top: 12px; padding: 14px 12px 12px; }
.fin-balance-main { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; padding-right: 10px; border-right: 1px solid color-mix(in srgb, var(--green) 14%, transparent); }
.fin-balance-sum { display: block; margin-top: 10px; color: var(--green); font-size: calc(clamp(27px, 8.8vw, 36px) * var(--fs, 1)); font-weight: 800; letter-spacing: -.03em; line-height: 1.02; white-space: nowrap; }
.fin-balance-sum.is-long { font-size: calc(clamp(22px, 7.2vw, 29px) * var(--fs, 1)); }
.fin-balance-sum.is-xl { font-size: calc(clamp(19px, 6.4vw, 25px) * var(--fs, 1)); }
.fin-balance.is-over .fin-balance-sum, .fin-total.is-over strong { color: #a1283f; }
.fin-balance-line { display: block; margin-top: 4px; color: var(--muted); font-size: calc(11.5px * var(--fs, 1)); line-height: 1.3; }
.fin-balance-line:first-of-type { margin-top: 9px; }
.fin-balance-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fin-mini { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 7px 8px; border-radius: 14px; }
.fin-mini.is-in { border: 1px solid color-mix(in srgb, var(--green-bright) 24%, transparent); background: color-mix(in srgb, #fff 50%, var(--tint)); }
.fin-mini.is-out { border: 1px solid var(--fin-amber-line); background: var(--fin-amber-soft); }
.fin-mini-ico { flex: none; display: grid; place-items: center; width: 20px; height: 20px; }
.fin-mini.is-in .fin-mini-ico { color: var(--green); }
.fin-mini.is-out .fin-mini-ico { color: var(--fin-amber-ink); }
.fin-mini-ico svg { width: 19px; height: 19px; }
.fin-mini-text { min-width: 0; }
.fin-mini-text small { display: block; color: var(--muted); font-size: calc(11px * var(--fs, 1)); font-weight: 700; line-height: 1.2; }
.fin-mini-text b { display: block; color: var(--ink); font-size: calc(14.5px * var(--fs, 1)); font-weight: 800; line-height: 1.25; white-space: nowrap; }
.fin-mini-text b.is-long { font-size: calc(12px * var(--fs, 1)); }
.fin-meter { grid-column: 1 / -1; margin-top: 12px; }
.fin-meter-track { display: block; height: 13px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--green) 32%, var(--tint)); border-radius: 7px; background: var(--fin-empty); }
.fin-meter-track i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--green-bright), var(--green)); }
.fin-meter-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: calc(13.5px * var(--fs, 1)); }
.fin-meter-labels b:first-child { color: var(--green); }
.fin-meter-labels b:last-child { color: var(--fin-amber-ink); }
/* the owner's picture buttons and the light buttons under them */
.fin-cta { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 10px; margin-top: 12px; }
.fin-imgbtn { display: block; border-radius: 30px; -webkit-tap-highlight-color: transparent; transition: transform .14s ease; }
.fin-imgbtn img { display: block; width: 100%; height: auto; }
.fin-imgbtn:active { transform: scale(.97); }
.fin-imgbtn:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.fin-pillbtn, .fin-wide, .fin-more { display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid #7bc482; border: 1px solid color-mix(in srgb, var(--green-bright) 70%, var(--tint)); background: var(--tint); box-shadow: 0 4px 17px rgba(60, 159, 102, .13); color: var(--green); font-size: calc(17px * var(--fs, 1)); font-weight: 800; text-decoration: none; }
.fin-pillbtn { align-self: stretch; min-height: 50px; border-radius: 999px; }
.fin-wide { min-height: 46px; margin-top: 10px; padding: 0 14px; border-radius: 16px; }
.fin-wide svg { flex: none; width: 22px; height: 22px; }
.fin-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-top: 10px; padding: 3px; border: 1.5px solid var(--green); border-radius: 999px; background: var(--surface); }
.fin-seg a { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 38px; border: 1px solid transparent; border-radius: 999px; color: color-mix(in srgb, var(--ink) 62%, var(--surface)); font-size: calc(16px * var(--fs, 1)); font-weight: 800; text-decoration: none; }
.fin-seg a.is-on, .fin-seg a.is-on:active { border-color: #7bc482; border-color: color-mix(in srgb, var(--green-bright) 70%, var(--tint)); background-color: var(--tint); color: var(--green); }
.fin-seg svg { flex: none; width: 20px; height: 20px; }
/* envelope rows: icon, name with a thin bar, amount, chevron */
.fin-env { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 16px; align-items: center; column-gap: 10px; padding: 10px 2px; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.fin-env:focus-visible, a.fin-op:focus-visible, .fin-more:focus-visible, .fin-wide:focus-visible, .fin-pillbtn:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.fin-env-logo { display: grid; place-items: center; width: 34px; height: 34px; }
.fin-logo { display: block; width: 32px; height: 32px; object-fit: contain; }
.fin-logo-plain { display: grid; place-items: center; color: var(--green); }
.fin-logo-plain svg { width: 26px; height: 26px; }
.fin-env-body { display: flex; flex-direction: column; min-width: 0; }
.fin-env-name { font-size: calc(15.5px * var(--fs, 1)); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.fin-env-meta { margin-top: 4px; color: var(--muted); font-size: calc(11.5px * var(--fs, 1)); line-height: 1.3; }
.fin-env-sum { align-self: start; padding-top: 1px; font-size: calc(15.5px * var(--fs, 1)); font-weight: 800; text-align: right; white-space: nowrap; }
.fin-env-sum.is-long { font-size: calc(13px * var(--fs, 1)); }
.fin-env.is-over .fin-env-sum { color: #a1283f; }
.fin-env-go { width: 16px; height: 16px; color: color-mix(in srgb, var(--muted) 60%, var(--surface)); }
.fin-bar { display: block; height: 5px; margin-top: 5px; overflow: hidden; border-radius: 3px; background: var(--fin-empty); }
.fin-bar i { display: block; height: 100%; border-radius: 3px; background: var(--green-bright); }
.fin-env.is-over .fin-bar i { background: #a1283f; }
.fin-more { justify-content: flex-start; min-height: 46px; margin-top: 14px; padding: 0 14px; border-radius: 16px; font-size: calc(16px * var(--fs, 1)); -webkit-tap-highlight-color: transparent; }
.fin-more span { flex: 1; }
.fin-more svg:first-child { flex: none; width: 20px; height: 20px; }
.fin-more svg:last-child { flex: none; width: 17px; height: 17px; }
/* operations */
.fin-op { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 9px 2px; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.fin-op-date { flex: none; width: 42px; color: var(--muted); font-size: calc(12.5px * var(--fs, 1)); font-weight: 800; line-height: 1.2; }
.fin-op-text { flex: 1; min-width: 0; }
.fin-op-text b { display: block; font-size: calc(15px * var(--fs, 1)); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.fin-op-text small { display: block; color: var(--muted); font-size: calc(12px * var(--fs, 1)); line-height: 1.35; overflow-wrap: anywhere; }
.fin-op-sum { flex: none; font-size: calc(15px * var(--fs, 1)); font-weight: 800; white-space: nowrap; }
.fin-op-sum.is-in { color: var(--green); }
.fin-op-sum.is-out { color: #a1283f; }
.fin-op-sum.is-move { color: var(--muted); }
/* totals and forms on the other finance screens */
.fin-total { margin-top: 14px; padding: 12px 14px 14px; }
.fin-total strong { display: block; margin-top: 8px; color: var(--green); font-size: calc(clamp(30px, 9.4vw, 38px) * var(--fs, 1)); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.fin-total-line { display: block; margin-top: 6px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); line-height: 1.4; }
.fin-total-logo { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); }
.fin-field { display: block; margin-top: 16px; }
.fin-field > span { display: block; color: var(--muted); font-size: calc(14px * var(--fs, 1)); font-weight: 700; }
.fin-amount { position: relative; display: block; }
.fin-amount input { padding: 14px 48px 14px 16px; font-size: calc(30px * var(--fs, 1)); font-weight: 800; }
.fin-amount b { position: absolute; top: 50%; right: 16px; transform: translateY(-40%); color: var(--muted); font-size: calc(24px * var(--fs, 1)); font-weight: 800; pointer-events: none; }
.fin-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fin-chip { position: relative; display: block; padding: 8px 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--ink); font-size: calc(15px * var(--fs, 1)); font-weight: 800; line-height: 1.25; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fin-chip input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.fin-chip small { display: block; color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 700; }
.fin-chip:has(input:checked) { border-color: var(--green-bright); background: var(--tint); color: var(--green); }
.fin-chip:has(input:focus-visible) { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.fin-chip.is-over small { color: #a1283f; }
.fin-note { margin: 12px 2px 0; color: var(--muted); font-size: calc(14px * var(--fs, 1)); line-height: 1.4; }
.fin-note[hidden] { display: none; }
.fin-note a { color: var(--green); font-weight: 800; }
.fin-note.is-over { color: #a1283f; }
.fin-split { display: flex; align-items: center; gap: 8px; padding: 8px 2px; }
.fin-split-logo { display: grid; place-items: center; flex: none; width: 26px; height: 26px; }
.fin-split-logo .fin-logo { width: 26px; height: 26px; }
.fin-split-name { flex: 1; min-width: 0; font-size: calc(16px * var(--fs, 1)); font-weight: 800; }
.fin-split-name small { display: block; color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 700; }
.fin-split input { flex: none; width: 88px; margin: 0; padding: 9px 9px; text-align: right; font-size: calc(15px * var(--fs, 1)); font-weight: 800; }
.fin-split input.fin-name { flex: 1; width: auto; min-width: 0; text-align: left; font-size: calc(14.5px * var(--fs, 1)); }
.fin-split.is-free { padding-right: 8px; padding-left: 8px; border-radius: 14px; background: var(--tint); }
.fin-split.is-free em { flex: none; padding-right: 8px; color: var(--green); font-size: calc(17px * var(--fs, 1)); font-style: normal; font-weight: 800; }
.fin-sum-row { display: flex; justify-content: space-between; gap: 10px; margin: 12px 4px 0; color: var(--muted); font-size: calc(14px * var(--fs, 1)); }
.fin-sum-row b { color: var(--ink); text-align: right; }
.fin-sum-row.is-over b, .fin-split.is-over em { color: #a1283f; }
.fin-breakdown { margin-top: 14px; padding: 2px 2px; }
.fin-breakdown div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--fin-line); font-size: calc(15px * var(--fs, 1)); }
.fin-breakdown div:first-child { border-top: 0; }
.fin-breakdown span { color: var(--muted); }
.fin-breakdown b { white-space: nowrap; }
.fin-monthnav { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: var(--green); font-size: calc(16px * var(--fs, 1)); font-weight: 800; }
.fin-monthnav a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 20px; color: var(--green); font-size: calc(22px * var(--fs, 1)); text-decoration: none; }
.fin-monthnav a:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.fin-monthnav-gap { width: 40px; height: 40px; }
.fin-subtitle { margin: 22px 0 8px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.fin-logoform { margin-top: 0; }
.fin-logoform input[type="file"], .fin-newenv input[type="file"] { padding: 10px 12px; font-size: calc(14px * var(--fs, 1)); }
.fin-archive { margin-top: 18px; }
.fin-archive > summary { justify-content: flex-start; padding: 4px 10px; font-size: calc(15px * var(--fs, 1)); font-weight: 800; color: #a5463a; }
.fin-archive .history-delete-panel { position: static; width: auto; margin-top: 6px; box-shadow: none; }
/* the home page card keeps its own small numbers */
/* Группы внутри белого поля финансов: без кремовой подложки, заголовок-разделитель (название и тонкая линия), строки через линии. */
.fin-card .shop-group { margin-top: 18px; padding: 0; border-radius: 0; background: none; }
.fin-card .home-head + .shop-group, .fin-card .fin-head + .shop-group { margin-top: 14px; }
.fin-card .shop-group-title { justify-content: flex-start; gap: 12px; padding: 0 2px 4px; color: var(--green); font-size: calc(16px * var(--fs, 1)); letter-spacing: .06em; }
.fin-card .shop-group + .shop-group.fin-recent { margin-top: 30px; padding-top: 24px; border-top: 1.5px solid var(--fin-line); }
.fin-card .shop-group-title span:last-child { display: block; min-width: 0; height: auto; padding: 0; border-radius: 0; background: none; font-size: inherit; letter-spacing: inherit; }
.fin-card .shop-group-title::after { content: ""; flex: 1; height: 1px; background: var(--fin-line); }
.fin-card .shop-group > :is(.fin-env, .fin-op, .fin-split) + :is(.fin-env, .fin-op, .fin-split) { border-top: 1px solid var(--fin-line); }
@media (max-width: 340px) {
  .fin-balance { grid-template-columns: 1fr; }
  .fin-balance-main { padding-right: 0; padding-bottom: 10px; border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--green) 14%, transparent); }
  .fin-balance-side { margin-top: 10px; }
}
/* Ширина полосок шагами по 5% (политика безопасности запрещает inline-стили). */
.fin-w0 { width: 0; } .fin-w5 { width: 5%; } .fin-w10 { width: 10%; } .fin-w15 { width: 15%; } .fin-w20 { width: 20%; } .fin-w25 { width: 25%; } .fin-w30 { width: 30%; } .fin-w35 { width: 35%; } .fin-w40 { width: 40%; } .fin-w45 { width: 45%; } .fin-w50 { width: 50%; } .fin-w55 { width: 55%; } .fin-w60 { width: 60%; } .fin-w65 { width: 65%; } .fin-w70 { width: 70%; } .fin-w75 { width: 75%; } .fin-w80 { width: 80%; } .fin-w85 { width: 85%; } .fin-w90 { width: 90%; } .fin-w95 { width: 95%; } .fin-w100 { width: 100%; }
/* Карточка «Покупки» на главной — по референсу владельца 30.09.2026: корзина и заголовок, мятная таблетка «N позиций в списке», белый список с отметками и стрелками, тёмно-зелёная кнопка «Открыть список», справа картинка с банками (обрезается краем карточки). */
.home-shopping { min-height: 0; padding: 18px 14px 14px; }
.home-shop-main { position: relative; z-index: 1; }
.home-shop-head { display: flex; align-items: center; gap: 14px; padding-left: 4px; }
.home-shop-cart { flex: none; display: block; width: 34px; height: 34px; font-size: calc(34px * var(--fs, 1)); line-height: 0; color: var(--green); }
.home-shop-head h2 { display: block; margin: 0; font-size: calc(24px * var(--fs, 1)); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.home-shop-list { width: 70%; margin: 12px 0 0; padding: 0; list-style: none; border-radius: 14px; background: var(--surface); box-shadow: 0 5px 16px rgba(96, 63, 29, .10), 0 1px 2px rgba(96, 63, 29, .06); }
.home-shop-row { display: flex; align-items: center; padding-left: 2px; }
.home-shop-row + .home-shop-row { border-top: 1px solid color-mix(in srgb, var(--border) 55%, var(--surface)); }
.home-shop-row .task-check { width: 36px; height: 44px; }
.home-shop-row .task-check::before { inset: auto; left: 8px; top: 12px; width: 20px; height: 20px; }
.home-shop-body { display: flex; align-items: center; flex: 1; min-width: 0; min-height: 44px; padding: 0 10px 0 4px; color: inherit; text-decoration: none; }
.home-shop-text { display: grid; flex: 1; min-width: 0; }
.home-shop-title { overflow: hidden; font-size: calc(14.5px * var(--fs, 1)); font-weight: 800; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.home-shop-qty { color: var(--muted); font-size: calc(12.5px * var(--fs, 1)); line-height: 1.2; }
.home-shop-go { flex: none; width: 14px; height: 14px; color: var(--green); }
.home-shop-open { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; margin-top: 12px; padding: 0 16px 0 20px; border-radius: 999px; background: var(--green); color: #fff; font-size: calc(14.5px * var(--fs, 1)); font-weight: 800; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.home-shop-open svg { flex: none; width: 14px; height: 14px; }
.home-shop-open:focus-visible, .home-shop-body:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.home-shop-art { position: absolute; z-index: 0; right: -18px; bottom: -8px; width: auto; max-width: 62%; height: 108%; object-fit: contain; object-position: right bottom; pointer-events: none; }
.home-shopping .home-more { margin: 6px 0 0 6px; }

/* Окно «Учесть в финансах?» при «Очистить купленное» (вместо плоской плашки): затемнение и карточка по центру, три понятных действия. */
.shop-modal { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; padding: 20px; }
.shop-modal-back { position: absolute; inset: 0; background: rgba(38, 30, 18, .45); animation: shop-modal-fade .18s ease both; }
.shop-modal-card { position: relative; display: grid; gap: 12px; width: min(100%, 380px); padding: 22px 20px 16px; border: 1.5px solid var(--frame); border-radius: 26px; background: var(--surface); box-shadow: 0 24px 60px rgba(38, 30, 18, .28); text-align: center; animation: shop-modal-pop .22s ease both; }
.shop-modal-ico { justify-self: center; display: block; width: 44px; height: 44px; font-size: calc(44px * var(--fs, 1)); line-height: 0; color: var(--green); }
.shop-modal-card h2 { display: block; margin: 0; font-size: calc(22px * var(--fs, 1)); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.shop-modal-card p { margin: 0; color: var(--muted); font-size: calc(15px * var(--fs, 1)); line-height: 1.4; }
.shop-modal-cancel { justify-self: center; min-height: 44px; padding: 10px 18px; color: var(--muted); font-size: calc(15px * var(--fs, 1)); font-weight: 750; text-decoration: none; }
@keyframes shop-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes shop-modal-pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .shop-modal-back, .shop-modal-card { animation: none; } }

/* «Учесть в финансах» в покупках: мятная кнопка в стиле финансов (была сплошная зелёная «Записать расход за покупки»). */
.shop-accounted { display: flex; align-items: center; gap: 8px; margin: 12px 18px 0; color: var(--green); font-size: calc(15px * var(--fs, 1)); font-weight: 800; }
.shop-accounted svg { flex: none; width: 20px; height: 20px; }
.shop-accounted a { margin-left: auto; color: var(--green); font-weight: 750; }
.shop-ask { display: grid; gap: 10px; margin: 14px 0 0; padding: 14px; border: 1.5px solid var(--frame); border-radius: 20px; background: var(--tint); }
.shop-ask strong { color: var(--green); font-size: calc(18px * var(--fs, 1)); }
.shop-ask > span { color: var(--muted); font-size: calc(14px * var(--fs, 1)); }
.shop-skip { width: 100%; min-height: 48px; border: 1.5px solid var(--green); border-radius: 999px; background: var(--surface); color: var(--green); font: inherit; font-size: calc(16px * var(--fs, 1)); font-weight: 800; cursor: pointer; }
.shop-ask-cancel { justify-self: center; padding: 6px 12px; color: var(--muted); font-weight: 750; }

/* Финансы 0.24.5: фильтры истории, «Показать ещё», корректировки, форма «Учесть в финансах», поля в стиле раздела. */
.fin-card { --fin-line-strong: color-mix(in srgb, var(--green) 30%, var(--surface)); }
.fin-card :is(input[type="text"], input[type="file"], select, textarea) { border-color: var(--fin-line-strong); }
.fin-balance-main.is-link { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.fin-balance-main.is-link:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 3px; border-radius: 14px; }
.fin-balance-main.is-link .fin-badge { white-space: nowrap; }
.fin-balance-main.is-link .fin-badge i { display: none; }
.fin-badge-go { width: 13px; height: 13px; margin-left: 2px; }
.fin-op-sum.is-adjust { color: var(--fin-amber-ink); }   /* 0.27.0: у «Ручного изменения баланса» только сумма оранжевая; название чёрное, фон белый, как у дохода и расхода */
.fin-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.fin-filters .fin-monthnav { margin-top: 0; }
.fin-loadmore { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; margin-top: 14px; border: 1px solid #7bc482; border: 1px solid color-mix(in srgb, var(--green-bright) 70%, var(--tint)); border-radius: 16px; background: var(--tint); box-shadow: 0 4px 17px rgba(60, 159, 102, .13); color: var(--green); font-size: calc(16px * var(--fs, 1)); font-weight: 800; text-decoration: none; }
.fin-loadmore small { color: var(--muted); font-size: calc(13px * var(--fs, 1)); font-weight: 700; }
.fin-cap { text-align: center; }
[data-fin-adjust] .fin-split input { width: 118px; }
.fin-svg { display: block; flex: none; width: 22px; height: 22px; }
/* Поля форм финансов по референсу владельца: значок слева, текст, справа стрелка (списки) или ₸ (сумма) */
.fin-fld { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; padding: 0 12px; border: 1.5px solid var(--fin-line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); }
.fin-fld:focus-within { border-color: var(--green-bright); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green-bright) 22%, transparent); }
.fin-fld-ico { display: grid; place-items: center; flex: none; width: 24px; color: var(--green); }
.fin-fld-ico .fin-svg { width: 21px; height: 21px; }
.fin-fld input, .fin-fld select { flex: 1; min-width: 0; height: 41px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ink); font: inherit; font-size: calc(16px * var(--fs, 1)); font-weight: 650; outline: none; }
.fin-fld input::placeholder { color: var(--muted); font-weight: 500; }
.fin-fld-suf { flex: none; align-self: stretch; display: grid; place-items: center; padding-left: 12px; border-left: 1.5px solid var(--fin-line); color: var(--ink); font-size: calc(18px * var(--fs, 1)); font-weight: 800; }
.fin-fld-select select { appearance: none; -webkit-appearance: none; padding-right: 24px; text-overflow: ellipsis; cursor: pointer; }
.fin-fld-select::after, .fin-fld-date::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.fin-fld-date input { position: static; }
.fin-fld-date input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.fin-newcat { margin-top: 8px; }
/* Кнопки под формами: основная (тёмно-зелёная с галочкой) и мягкая (мятная с крестиком) */
.fin-actions { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 10px; margin-top: 18px; }
.fin-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 10px; border: 0; border-radius: 14px; font: inherit; font-size: calc(15.5px * var(--fs, 1)); font-weight: 800; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fin-btn { white-space: nowrap; }
.fin-btn .fin-svg { width: 20px; height: 20px; }
.fin-btn-main { background: var(--green); color: #fff; }
.fin-btn-soft { background: color-mix(in srgb, var(--green-bright) 12%, var(--tint)); color: var(--green); }
.fin-btn:active { transform: scale(.98); }
.fin-btn:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.fin-btn-wide { width: 100%; margin-top: 12px; }
/* «Учесть в финансах» */
.fin-shop-h { display: block; margin: 18px 0 8px; color: var(--ink); font-size: calc(16px * var(--fs, 1)); font-weight: 800; line-height: 1.25; }
.fin-shop-l { display: block; margin: 14px 0 6px; color: var(--muted); font-size: calc(14px * var(--fs, 1)); font-weight: 700; }
.fin-shopform > .fin-shop-h:first-child { margin-top: 14px; }
.fin-partbox { padding: 12px; border: 1.5px solid var(--fin-line); border-radius: 16px; }
.fin-part { display: grid; gap: 8px; }
.fin-splitcheck { margin-top: 10px; }
.fin-splitcheck > .fin-part { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--fin-line-strong); }
.fin-splitcheck > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 8px; border: 1.5px dashed var(--fin-line-strong); border-radius: 12px; background: color-mix(in srgb, var(--green-bright) 8%, var(--tint)); color: var(--green); font-size: calc(13.5px * var(--fs, 1)); font-weight: 800; cursor: pointer; list-style: none; }
.fin-splitcheck > summary::-webkit-details-marker { display: none; }
.fin-splitcheck-plus { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--green-bright) 22%, var(--tint)); }
.fin-splitcheck-plus .fin-svg { width: 15px; height: 15px; }
.fin-splitcheck[open] .fin-splitcheck-plus { transform: rotate(45deg); }
.fin-buyers { display: flex; flex-wrap: wrap; gap: 10px; }
.fin-buyer { position: relative; }
.fin-buyer input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.fin-buyer-in { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--fin-line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.fin-buyer-in .fin-svg { width: 20px; height: 20px; color: var(--green); }
.fin-buyer-in b { font-size: calc(16px * var(--fs, 1)); font-weight: 800; }
.fin-buyer-ok { display: none; place-items: center; width: 22px; height: 22px; margin-left: 4px; border-radius: 50%; background: var(--green); color: #fff; }
.fin-buyer-ok .fin-svg { width: 14px; height: 14px; color: #fff; }
.fin-buyer input:checked + .fin-buyer-in { border-color: #7bc482; border-color: color-mix(in srgb, var(--green-bright) 70%, var(--tint)); background: var(--tint); }
.fin-buyer input:checked + .fin-buyer-in .fin-buyer-ok { display: grid; }
.fin-buyer input:focus-visible + .fin-buyer-in { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.fin-switch.has-icons a { display: flex; align-items: center; justify-content: center; gap: 9px; }
.fin-switch.has-icons a .fin-svg { width: 21px; height: 21px; }
.fin-filterrow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.fin-filterrow.has-cat { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fin-filterrow .fin-fld { min-height: 44px; padding: 0 12px; }
.fin-filterrow select { font-size: calc(15px * var(--fs, 1)); font-weight: 750; }.fin-shop-summary { color: var(--ink); }
.fin-addbtn { width: 100%; margin-top: 12px; font-family: inherit; cursor: pointer; }
.fin-addbtn-plus { font-size: calc(24px * var(--fs, 1)); font-weight: 700; line-height: 1; }

/* Главная 0.24.6: «Следующее событие» — заголовок и иконка выше, плашка «Сегодня / Через N дней» выше, клякса ниже, заголовок события на месте; в строке даты — календарь и часы размером с текст. */
.ui-inline-icon { display: inline-block; flex: none; width: 1.1em; height: 1.1em; margin-right: 4px; vertical-align: -.17em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-next-date { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; font-size: calc(12.5px * var(--fs, 1)); }
.home-next-item { display: inline-flex; align-items: center; }

/* 0.24.7: общая галочка (--check-img) у кругов дел и покупок и у отметок в формах; «Отмена» и «Очистить» бордовые; «Кто совершил покупку»; «Добавить» с листочками; окно очистки; карточка «Финансы» на главной. */
input[type="checkbox"] { -webkit-appearance: none; appearance: none; flex: none; width: 24px; height: 24px; border: 2px solid var(--check-off); border-radius: 8px; background: var(--surface) center / 100% no-repeat; box-shadow: none; cursor: pointer; transition: background-color .14s ease, border-color .14s ease; }
input[type="checkbox"]:checked { border-color: var(--green); background-color: var(--green); background-image: var(--check-img); }
input[type="checkbox"]:focus-visible { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-bright); }
@media (prefers-reduced-motion: reduce) { input[type="checkbox"], .task-check::before, .fin-buyer-in, .fin-buyer-ok { transition: none; } }

/* Кнопки под формами финансов: одинаковой ширины, «Отмена» — розово-бордовая, подпись переносится, а не выходит за край. */
.fin-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fin-btn { border: 1.5px solid transparent; white-space: normal; text-align: center; line-height: 1.15; }
.fin-btn-main { border-color: var(--green); }
.fin-btn-berry { border-color: color-mix(in srgb, var(--berry) 30%, var(--surface)); background: color-mix(in srgb, var(--berry) 9%, var(--surface)); color: var(--berry); }
.fin-btn-berry:active { background: color-mix(in srgb, var(--berry) 16%, var(--surface)); }
.fin-btn-berry:focus-visible { outline-color: var(--berry); }
.fin-btn-small { justify-self: center; width: auto; min-height: 40px; padding: 0 16px; font-size: calc(14px * var(--fs, 1)); }
.fin-btn-small .fin-svg { width: 18px; height: 18px; }

/* «Кто совершил покупку»: две одинаковые кнопки, кружок всегда на месте (пустое кольцо → зелёный с галочкой), размер не меняется. */
.fin-buyers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.fin-buyer { min-width: 0; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
.fin-buyer-in { justify-content: flex-start; gap: 7px; min-height: 48px; padding: 0 12px; -webkit-tap-highlight-color: transparent; transition: background-color .14s ease, border-color .14s ease; }
.fin-buyer-in b { flex: 1; min-width: 0; overflow: hidden; font-size: calc(clamp(12.5px, 3.9vw, 16px) * var(--fs, 1)); text-overflow: ellipsis; white-space: nowrap; }
.fin-buyer-in .fin-svg { flex: none; }
.fin-buyer-in:active { background-color: var(--tint); }
.fin-buyer-ok, .fin-buyer input:checked + .fin-buyer-in .fin-buyer-ok { display: block; flex: none; width: 24px; height: 24px; margin: 0; border: 2px solid var(--check-off); border-radius: 50%; background: var(--surface) center / 100% no-repeat; transition: background-color .14s ease, border-color .14s ease; }
.fin-buyer input:checked + .fin-buyer-in .fin-buyer-ok { border-color: var(--green); background-color: var(--green); background-image: var(--check-img); }

/* Покупки: «Добавить» — кнопка с листочками под полем, кнопки блока «Куплено» — пара финансов (зелёная и бордовая). */
.shop-add { display: block; }
button.leaf-button { appearance: none; -webkit-appearance: none; background-color: transparent; font-family: inherit; }
.shop-add-btn { --lb-h: 52px; margin: 12px 0 0; }
.shop-bought .shop-bought-btn { width: calc(100% - 36px); margin-top: 12px; }
.shop-bought form { margin: 0; }

/* Окно «Учесть покупки в финансах?»: карточка с веточками, основная зелёная кнопка, небольшая бордовая «Очистить без записи». */
.shop-modal-card { overflow: hidden; padding: 24px 20px 14px; }
.shop-modal-card::before, .shop-modal-card::after { content: ""; position: absolute; top: -4px; width: 48px; height: 76px; background: no-repeat center top / contain; pointer-events: none; }
.shop-modal-card::before { left: -6px; background-image: url("/assets/market/shop-leaves-left.png?v=1"); }
.shop-modal-card::after { right: -6px; background-image: url("/assets/market/shop-leaves-right.png?v=1"); }
.shop-modal-card > * { position: relative; z-index: 1; }
.shop-modal-card .shop-modal-main { width: 100%; margin-top: 4px; }
.shop-modal-card form { display: grid; margin: 0; }
.shop-modal-cancel { margin-top: -4px; }

/* Главная: карточка «Финансы» по референсу владельца (30.09.2026). Размеры — доли ширины карточки (cqw), поэтому пропорции держатся на любой ширине колонки. */


/* 0.24.8–0.24.9: блоки главной по референсам владельца (30.09.2026): «Следующее событие», «Дела на сегодня», «Напоминания», «Финансы» и шапка «Покупок». Размеры и отступы — доли ширины карточки (cqw: каждая карточка — контейнер), композиция держится на любой ширине. Зелёных мазков под заголовками больше нет. Рамки блоков главной — тёмно-зелёные (--green, как выбранная отметка). Пустая отметка — серо-зелёная --check-off. */
:root { --sage: #e5ede5; --home-rule: #ded7c9; --home-sep: #d6d0c1; --home-green: color-mix(in srgb, var(--green) 75%, #000); --slate: #465266; }
body.page-home { --frame: var(--green); }
.home-card.hb { padding: 0; container-type: inline-size; }
.hb-head { display: flex; align-items: center; margin: 0; padding: var(--pt, 0) var(--rule-in) var(--pb, 0); background: var(--sage); }
.hb-ico { position: relative; flex: none; display: block; width: var(--ico-w); height: var(--ico-h); margin-left: var(--ico-x); color: var(--home-green); }
.hb-ico > .ui-icon, .hb-ico > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.hb-sep { flex: none; width: 1px; height: var(--sep-h); margin: 0 var(--sep-r) 0 var(--sep-l); background: var(--home-sep); }
.hb .hb-title { min-width: 0; margin: 0; color: var(--ink); font-size: calc(var(--title-f) * var(--fs, 1)); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; }
.hb-title a { color: inherit; text-decoration: none; }
.hb-title a:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 3px; border-radius: 6px; }
.hb-count { flex: none; margin-left: auto; color: #3e4b60; font-size: calc(6cqw * var(--fs, 1)); font-weight: 800; white-space: nowrap; }
.home-event.hb { --rule-in: 3.4cqw; --ico-x: 1.8cqw; --ico-w: 8.3cqw; --ico-h: 9cqw; --sep-l: 4.3cqw; --sep-r: 3.8cqw; --sep-h: 9.2cqw; --title-f: 6.8cqw; --pt: 2.4cqw; --pb: 2.6cqw; }
.home-plan.hb { --rule-in: 5.05cqw; --ico-x: 0cqw; --ico-w: 8.7cqw; --ico-h: 9cqw; --sep-l: 3.2cqw; --sep-r: 4cqw; --sep-h: 9.4cqw; --title-f: 6.4cqw; --pt: 3cqw; --pb: 3.2cqw; --ck: 8.6cqw; }
.home-plan .task-check::before { inset: 0; margin: auto; width: var(--ck); height: var(--ck); }

/* Следующее событие */
.home-card.home-event.hb { min-height: 42cqw; }
.home-event .hb-body { position: relative; z-index: 1; padding: 3.6cqw 5.2cqw 4.6cqw; }
.home-event .home-muted { max-width: 52%; margin: 3cqw 0; font-size: calc(max(13px, 4.3cqw) * var(--fs, 1)); }
.home-next { margin: 0; }
.home-next-top { gap: 2cqw 3cqw; }
.home-event .home-next-when { height: 9cqw; padding: 0 4.6cqw 0 4.2cqw; gap: 2.8cqw; border-width: max(1.5px, .3cqw); background: #fdf4f3; font-size: calc(4cqw * var(--fs, 1)); letter-spacing: .05em; }
.home-event .home-next-when.is-today::before { width: 2.8cqw; height: 2.8cqw; }
.home-event .home-next-when:not(.is-today) { padding-left: 1.4cqw; }
.home-event .home-next-days { min-width: 6.2cqw; height: 6.2cqw; font-size: calc(4cqw * var(--fs, 1)); }
.home-event .home-next-title { margin: 2.6cqw 0 0; font-size: calc(6.8cqw * var(--fs, 1)); line-height: 1.2; }
.home-event .home-next-date { margin: .3cqw 0 0; color: #5b6070; font-size: calc(4.3cqw * var(--fs, 1)); line-height: 1.3; gap: 0 1.2cqw; }
.home-event .home-next-more { margin: 0; font-size: calc(4cqw * var(--fs, 1)); }
.home-event .home-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 3cqw; width: auto; min-width: 51cqw; min-height: 0; height: 13cqw; margin: 3.6cqw 0 0; padding: 0 5.4cqw 0 5cqw; border-radius: 999px; background: linear-gradient(135deg, color-mix(in srgb, var(--green) 70%, #6cc59c), color-mix(in srgb, var(--green) 90%, #6cc59c)); box-shadow: 0 1.6cqw 3.6cqw rgba(8, 99, 67, .24); color: #fff; font-size: calc(4.7cqw * var(--fs, 1)); font-weight: 800; }
.home-event .home-link .ui-icon { width: 3.9cqw; height: 3.9cqw; margin: 0; }
.home-event .home-link:focus-visible { outline-offset: 3px; }
.home-event-art { z-index: 0; }
.home-event-art.is-small { right: 1.5cqw; bottom: 1.5cqw; width: 34.7cqw; height: auto; }

/* Дела на сегодня (значки общий/приватный/напоминание общие для календаря: 22 px; на главной — доли ширины) */
.home-task-icon { flex: none; width: 22px; height: 22px; }
.home-task-icon img { display: block; width: 22px; height: 22px; }
.home-task-icon-tall img { width: 18px; height: 18px; margin: 2px; }
.home-plan .home-task-icon { display: block; height: auto; }
.home-plan .home-task-icon img { width: 100%; height: auto; margin: 0; }
.home-plan .home-task-who { width: 6.9cqw; }
.home-plan .home-task-remind { width: 5.3cqw; }
.home-plan .plan-empty { padding: 5cqw 5.05cqw; }
.home-task-list { margin: 0 5.05cqw; padding: 0; list-style: none; }
.home-task { display: flex; align-items: center; border-top: 1px solid var(--home-rule); }
.home-task:first-child { border-top: 0; }
.home-task .task-toggle { flex: none; margin: 0 calc(2.6cqw + (var(--ck) - 44px) / 2) 2cqw calc(.75cqw + (var(--ck) - 44px) / 2); }
.home-task-body { display: flex; flex: 1; align-items: center; gap: 3.5cqw; min-width: 0; padding-right: 1.05cqw; color: inherit; text-decoration: none; }
.home-task-text { display: grid; flex: 1; min-width: 0; gap: .9cqw; padding: 2.8cqw 0 3.6cqw; }
.home-task-title { display: -webkit-box; overflow: hidden; color: var(--ink); font-size: calc(5.4cqw * var(--fs, 1)); font-weight: 800; line-height: 1.17; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.home-task-time { display: inline-flex; align-items: center; color: var(--slate); font-size: calc(4.7cqw * var(--fs, 1)); font-variant-numeric: tabular-nums; line-height: 1.2; }
.home-task-time .ui-inline-icon { width: 4.2cqw; height: 4.2cqw; margin-right: 1.8cqw; vertical-align: 0; }
.home-more { display: block; margin: 1cqw 5.05cqw 2cqw 17cqw; color: var(--green); font-size: calc(4.2cqw * var(--fs, 1)); font-weight: 700; text-decoration: none; }
.home-plan .home-link { min-height: 0; margin: 0 5.05cqw; padding: 4.1cqw 0 7.6cqw; border-top: 1px solid var(--home-rule); color: var(--home-green); font-size: calc(6.2cqw * var(--fs, 1)); font-weight: 800; line-height: 1.2; }
.home-plan .home-link .ui-icon { width: 4.7cqw; height: 4.7cqw; margin: 0 1.85cqw 0 auto; }

/* Напоминания */
/* Шапки «Напоминаний» и «Покупок» — ссылки целиком (значок, бирка, название, вся полоса). */
a.hb-head, a.home-shop-head { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a.hb-head:focus-visible, a.home-shop-head:focus-visible { outline: 3px solid var(--green-bright); outline-offset: -3px; }
a.hb-head:active, a.home-shop-head:active { opacity: .8; }

/* 0.33.0: колокольчик «Уведомления» в приветствии (вместо блока «Напоминания»), оформление колокольчика прежнее: значок с зелёной обводкой и оранжевая бирка со счётчиком. */
.home-hero .hero-copy { padding-right: 60px; }
.home-notify { position: absolute; z-index: 2; right: 8px; bottom: 0; display: grid; justify-items: center; padding: 2px 4px; color: var(--green); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.home-notify:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; border-radius: 12px; }
.home-notify:active { opacity: .8; }
.home-notify-bell { position: relative; display: block; width: 26px; height: 26px; }
.home-notify-bell > img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(1.2px 0 0 var(--green)) drop-shadow(-1.2px 0 0 var(--green)) drop-shadow(0 1.2px 0 var(--green)) drop-shadow(0 -1.2px 0 var(--green)); }
.home-notify .card-badge { position: absolute; top: -6px; right: -9px; min-width: 16px; height: 16px; margin: 0; padding: 0 3px; border-radius: 999px; background: #fd4e1a; color: #fafafa; font-size: calc(10px * var(--fs, 1)); line-height: 1; }
.home-notify-label { color: var(--muted); font-size: calc(9.5px * var(--fs, 1)); font-weight: 700; line-height: 1.2; }

/* 0.33.0: «Финансы» на всю ширину. Заголовок как у «Следующего события», суммы двумя колонками, замечания списком, внизу «Открыть». Размеры — доли ширины карточки. */
.home-finance.hb { --rule-in: 3.4cqw; --ico-x: 1.8cqw; --ico-w: 9.2cqw; --ico-h: 8.3cqw; --sep-l: 4.3cqw; --sep-r: 3.8cqw; --sep-h: 9.2cqw; --title-f: 6.8cqw; --pt: 2.4cqw; --pb: 2.6cqw; }
.home-finance .hb-body { padding: 4.6cqw 5.2cqw 0; }
.fin-home-money { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 4cqw; }
.fin-home-lbl { display: block; color: var(--muted); font-size: calc(max(12px, 4.3cqw) * var(--fs, 1)); line-height: 1.2; }
.fin-home-total { display: block; margin-top: 1.4cqw; color: var(--green); font-size: calc(9cqw * var(--fs, 1)); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.fin-home-total.is-long { font-size: calc(7.4cqw * var(--fs, 1)); }
.fin-home-total.is-xl { font-size: calc(5.8cqw * var(--fs, 1)); }
.fin-home-total.is-over, .fin-home-spent { color: var(--berry); }
.fin-home-spent { display: block; margin-top: 1.4cqw; font-size: calc(6.4cqw * var(--fs, 1)); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; white-space: nowrap; }
.fin-home-spent.is-long { font-size: calc(5.4cqw * var(--fs, 1)); }
.fin-home-notes { display: grid; gap: 1.4cqw; margin: 3.4cqw 0 0; padding: 0; list-style: none; }
.fin-home-warn { color: var(--berry); font-size: calc(max(12px, 4.3cqw) * var(--fs, 1)); font-weight: 800; line-height: 1.25; }
.fin-home-pay { color: var(--slate); font-size: calc(max(12px, 4.3cqw) * var(--fs, 1)); line-height: 1.25; overflow-wrap: anywhere; }
.fin-home-pay.is-late { color: var(--berry); font-weight: 800; }
.fin-home-empty { margin: 0 0 4.6cqw; color: var(--muted); font-size: calc(max(13px, 4.3cqw) * var(--fs, 1)); line-height: 1.4; }
.fin-home-open { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4cqw 5.2cqw 0; padding: 3.8cqw 0 4.6cqw; border-top: 1px solid var(--home-rule); color: var(--home-green); font-size: calc(max(14px, 5cqw) * var(--fs, 1)); font-weight: 800; line-height: 1.2; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.fin-home-open .ui-icon { flex: none; width: max(13px, 4cqw); height: max(13px, 4cqw); }
.fin-home-open:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; border-radius: 8px; }
.fin-home-open:active { opacity: .65; }

/* 0.33.0: центр уведомлений (/notifications.php): блоки «Новое», «Напоминания», «События на неделю», «Раньше». Строка — карточка поручения (приоритет, срок, статус) или текст. */
.ntf-note { margin: 10px 0 0; color: var(--muted); font-size: calc(14px * var(--fs, 1)); line-height: 1.45; }
.ntf-card { margin-top: 14px; padding: 6px 16px 4px; }
.ntf-card > .ntf-h { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; font-size: calc(17px * var(--fs, 1)); font-weight: 800; }
.ntf-h > span { padding: 1px 9px; border-radius: 999px; background: var(--tint); color: var(--green); font-size: calc(13px * var(--fs, 1)); font-weight: 800; }
.ntf-list { margin: 0; padding: 0; list-style: none; }
.ntf-item { display: flex; align-items: center; border-top: 1px solid var(--home-rule, #ded7c9); }
.ntf-item:first-child { border-top: 0; }
.ntf-main { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; min-height: 64px; padding: 10px 0; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.ntf-main:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; border-radius: 10px; }
.ntf-body { display: grid; flex: 1; gap: 2px; min-width: 0; }
.ntf-kind { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: calc(12.5px * var(--fs, 1)); font-weight: 700; }
.ntf-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #fd4e1a; }
.ntf-title { font-size: calc(16.5px * var(--fs, 1)); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.ntf-item.is-new .ntf-title { font-weight: 800; }
.ntf-earlier .ntf-title { color: var(--muted); }
.ntf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.ntf-meta .is-late { color: var(--berry); font-weight: 700; }
.ntf-go { flex: none; width: 18px; height: 18px; color: var(--green); }
.ntf-ico { display: grid; place-items: center; flex: none; width: 30px; height: 30px; color: var(--green); }
.ntf-ico .gl { width: 24px; height: 24px; }
.ntf-remind .task-toggle { flex: none; margin-right: 2px; }

/* Покупки: шапка в том же стиле (корзинка с зелёной биркой-количеством, вертикальная линия, название, линия под ним); размеры текста прежние. */
.home-shopping { padding: 0; }
.home-shopping .home-shop-head { position: relative; z-index: 1; gap: 0; padding: 8px 14px 9px 18px; background: var(--sage); }
.home-shopping .home-shop-main { padding: 2px 14px 14px; }
.home-shop-cart { position: relative; }
.home-shop-cart > span:first-child { display: block; }
.home-shop-badge { position: absolute; top: -30%; left: 64%; display: grid; place-items: center; min-width: 65%; aspect-ratio: 1; padding: 0 4px; border-radius: 999px; background: var(--green); color: #fff; font-size: calc(14px * var(--fs, 1)); font-weight: 800; line-height: 1; }
.home-shop-sep { flex: none; width: 1px; height: 40px; margin: 0 14px 0 24px; background: var(--home-sep); }
.home-shopping .home-shop-list { margin-top: 14px; }
.home-shopping .home-muted { margin-top: 14px; }

/* 0.33.0: «Покупки», вариант B (выбор владельца 09.11.2026): лента в шапке (малые банки справа растворяются в серо-зелёной полосе), под ней список на всю ширину до 6 строк, поле «Добавить продукт» и тихая ссылка. Поле и «+» без капсул: радиус 14 px, обводка зелёная, без рыжей. */
.home-shopping .home-shop-main { padding: 0; }
.home-shopping .home-shop-head { overflow: hidden; padding: 8px 14px 8px 18px; }
.home-shopping .home-shop-sep { height: 32px; }
.home-shop-cart, .home-shop-sep { position: relative; z-index: 1; }
.home-shop-titlebox { position: relative; z-index: 1; display: grid; gap: 3px; min-width: 0; }
.home-shop-art { top: 0; right: 0; bottom: 0; width: 44%; max-width: none; height: 100%; object-fit: cover; object-position: 100% 38%; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 62%); mask-image: linear-gradient(to right, transparent 0, #000 62%); }
.home-shopping .home-shop-list { width: auto; margin: 4px 0 0; border-radius: 0; background: none; box-shadow: none; }
.home-shopping .home-shop-body { padding-right: 14px; }
.home-shopping .home-muted { margin: 14px 14px 0; }
.home-shop-add { display: flex; align-items: center; gap: 4px; height: 44px; margin: 10px 14px 0; padding: 0 4px 0 14px; border: 1.5px solid color-mix(in srgb, var(--green) 30%, var(--surface)); border-radius: 14px; background: var(--surface); }
.home-shop-add:focus-within { border-color: var(--green); }
.home-shop-add input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: calc(14.5px * var(--fs, 1)); }
.home-shop-add input::placeholder { color: var(--muted); opacity: 1; }
.home-shop-add button { flex: none; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--green); -webkit-tap-highlight-color: transparent; }
.home-shop-add button:active { background: var(--tint); }
.home-shop-add button:focus-visible { outline: 3px solid var(--green-bright); outline-offset: -3px; }
.home-shop-add .gl { width: 22px; height: 22px; stroke-width: 2.2; }
/* 0.66.0: «Покупки» через ChatGPT — микрофон ведёт в «Помощник» (там запись голосом) */
.home-shop-ai { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--green); -webkit-tap-highlight-color: transparent; }
.home-shop-ai:active { background: var(--tint); }
.home-shop-ai:focus-visible { outline: 3px solid var(--green-bright); outline-offset: -3px; }
.home-shop-add.is-ai .gl { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-shop-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px 4px 18px; }
.home-shopping .home-shop-foot .home-more { margin: 0; font-size: calc(13px * var(--fs, 1)); font-weight: 800; }
.home-shopping .home-shop-open { min-height: 36px; margin: 0; padding: 0; background: none; color: var(--green); }
/* 0.33.1: плашка «Нет связи» над нижним меню: отметки покупок ждут отправки, пока нет интернета. */
.offline-note { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); max-width: 420px; margin: 0 auto; padding: 10px 14px; border: 1.5px solid var(--green); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font-size: calc(14px * var(--fs, 1)); font-weight: 700; line-height: 1.35; }
.offline-note[hidden] { display: none; }

/* 0.25: регулярные платежи. Строка платежа устроена как строка операции (дата, название, сумма), под текстом маленькая кнопка «Оплачен». */
.fin-seg.has-3 { grid-template-columns: repeat(3, 1fr); }
.fin-seg.has-3 a { gap: 5px; padding: 0 4px; font-size: calc(14.5px * var(--fs, 1)); }
.fin-seg.has-3 svg { width: 16px; height: 16px; }
.fin-pay { display: flex; flex-wrap: wrap; align-items: flex-start; }
.fin-pay > .fin-op { flex: 1 1 100%; }
.fin-pay-undo { flex: 1 1 100%; margin: -4px 0 6px 54px; }
.fin-pay-undo > summary { justify-content: flex-start; padding-left: 0; }
.fin-pay-when { font-weight: 700; }
.fin-pay.is-late .fin-op-date, .fin-pay.is-late .fin-pay-when { color: var(--berry); font-weight: 800; }
.fin-card .shop-group > .fin-pay + .fin-pay { border-top: 1px solid var(--fin-line); }
.fin-pay-title b { color: var(--ink); font-size: calc(16px * var(--fs, 1)); }
.fin-pay-late { color: var(--berry); font-weight: 800; }
.fin-done { margin-top: 14px; }
.fin-done > summary { display: flex; align-items: center; min-height: 44px; padding: 0 2px; color: var(--green); font-size: calc(15px * var(--fs, 1)); font-weight: 800; cursor: pointer; list-style: none; }
.fin-done > summary::-webkit-details-marker { display: none; }
.fin-payform:has(input[name="mode"][value="fixed"]:checked) .fin-mode-schedule { display: none; }
.fin-payform:has(input[name="mode"][value="schedule"]:checked) .fin-mode-fixed { display: none; }
.fin-fill { margin: 2px 0 8px; }
.fin-terms-more { margin-top: 8px; }

/* 0.26: цели-копилки. Строка цели — строка конверта (значок-копилка, название с полосой, накоплено, стрелка); четыре вкладки без значков. */
.fin-seg.has-4 { grid-template-columns: repeat(4, 1fr); }
.fin-seg.has-4 a { gap: 0; padding: 0 2px; font-size: calc(13.5px * var(--fs, 1)); }
.fin-seg.has-4 svg { display: none; }
.fin-goal-bar { margin: 12px 2px 0; }
.fin-goal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.fin-goal-actions .is-wide { grid-column: 1 / -1; }
.fin-goal.is-done .fin-env-sum { color: var(--green); }

/* 0.27.0: вкладки финансов сверху (только надписи, зелёная черта под текущей), свайп-удаление операций, меню «три точки» у платежей, корзинка в шапке, окно подтверждения. */
.fin-tabs { display: flex; align-items: stretch; justify-content: space-between; gap: 4px; margin: 12px 0 0; border-bottom: 1px solid var(--fin-line); overflow-x: auto; scrollbar-width: none; }
.fin-tabs::-webkit-scrollbar { display: none; }
.fin-tabs.is-few { justify-content: flex-start; gap: 24px; }
.fin-tabs a { position: relative; flex: 0 0 auto; padding: 10px 2px 11px; border-radius: 10px 10px 0 0; color: color-mix(in srgb, var(--ink) 62%, var(--surface)); font-size: calc(14.5px * var(--fs, 1)); font-weight: 800; text-decoration: none; white-space: nowrap; }
.fin-tabs a[aria-current="page"] { color: var(--green); }
.fin-tabs a[aria-current="page"]::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--green); }
.fin-tabs + .fin-switch { margin-top: 12px; }
.fin-tabs + :is(.fin-balance, .fin-total, .fin-monthnav, .fin-hint, .fin-note, .form-error, .shop-group, form) { margin-top: 14px; }

.fin-card .shop-group > :is(.fin-env, .fin-op, .fin-split, .fin-swipe) + :is(.fin-env, .fin-op, .fin-split, .fin-swipe) { border-top: 1px solid var(--fin-line); }
.fin-swipe { position: relative; overflow: hidden; }
.fin-swipe > .fin-op { position: relative; z-index: 1; background: var(--surface); transform: translateX(var(--fin-sx, 0px)); transition: transform .2s ease; touch-action: pan-y; }
.fin-swipe.is-dragging > .fin-op { transition: none; }
.fin-swipe > a.fin-op:focus-visible { outline-offset: -3px; }
.fin-swipe-del { position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: 76px; margin: 0; }
.fin-swipe-btn { display: grid; place-items: center; width: 100%; height: 100%; padding: 0; border: 0; background: var(--berry); color: #fff; cursor: pointer; visibility: hidden; transition: visibility 0s linear .2s; -webkit-tap-highlight-color: transparent; }
.fin-swipe.is-open .fin-swipe-btn, .fin-swipe.is-dragging .fin-swipe-btn { visibility: visible; transition-delay: 0s; }
.fin-swipe-btn svg { width: 24px; height: 24px; }
.fin-swipe > .fin-op { -webkit-user-select: none; user-select: none; }
.fin-card.is-loading { opacity: .6; transition: opacity .15s; }

.fin-head-trash { flex: none; margin: 0; }
.fin-head:has(.fin-head-trash) h2 { overflow: visible; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.fin-head:has(.fin-head-trash) .fin-month { margin-left: auto; }
.fin-trash { display: grid; place-items: center; width: 40px; height: 40px; margin: -6px -6px -6px 0; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--berry); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fin-trash svg { width: 22px; height: 22px; }
.fin-trash:active { background: color-mix(in srgb, var(--berry) 12%, var(--surface)); }
.fin-trash:focus-visible { outline: 3px solid var(--berry); outline-offset: 1px; }

.fin-pay.fin-pay-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 0; }
.fin-pay-row > .fin-op { flex: 1 1 auto; min-width: 0; gap: 10px; }
.fin-pay-act, .fin-dots { display: grid; place-items: center; flex: none; width: 38px; height: 44px; padding: 0; border: 0; background: none; color: var(--green); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fin-dots { width: 30px; color: var(--muted); }
.fin-pay-act svg, .fin-dots svg { width: 22px; height: 22px; }
.fin-pay-act.is-gap, .fin-dots.is-gap { pointer-events: none; cursor: default; }
.fin-pay-act:not(.is-gap):active, .fin-dots:not(.is-gap):active { color: var(--green-bright); }
.fin-pay-act:focus-visible, .fin-dots:focus-visible { outline: 3px solid var(--green-bright); outline-offset: -3px; border-radius: 12px; }
.fin-pay.is-late .fin-op-text b { color: var(--berry); }
.fin-pay-when { display: flex; align-items: center; margin-top: 1px; font-size: calc(12.5px * var(--fs, 1)); }
.fin-pay-when .ui-inline-icon { width: 13px; height: 13px; margin: 0 3px 0 0; vertical-align: 0; }
.fin-pay-menu { position: relative; flex: none; }
.fin-menu { position: fixed; z-index: 40; min-width: 190px; padding: 6px; border: 1.5px solid var(--green); border-radius: 16px; background: var(--surface); box-shadow: 0 10px 28px rgba(29, 33, 34, .18); }
.fin-menu[hidden] { display: none; }
.fin-menu form { margin: 0; }
.fin-menu :is(a, button) { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-size: calc(15.5px * var(--fs, 1)); font-weight: 800; text-align: left; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fin-menu :is(a, button) svg { flex: none; width: 20px; height: 20px; color: var(--green); }
.fin-menu :is(a, button):active { background: var(--tint); }
.fin-menu :is(a, button):focus-visible { outline: 3px solid var(--green-bright); outline-offset: -3px; }
.fin-menu .is-danger, .fin-menu .is-danger svg { color: var(--berry); }
.fin-info b { min-width: 0; white-space: normal; text-align: right; }
.fin-total-line .fin-pay-late { font-weight: 800; }

.fin-confirm { width: min(88vw, 340px); padding: 22px 18px 18px; border: 1.5px solid var(--green); border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 50px rgba(29, 33, 34, .25); }
.fin-confirm::backdrop { background: rgba(29, 33, 34, .42); }
.fin-confirm h3 { margin: 0; font-size: calc(19px * var(--fs, 1)); font-weight: 800; letter-spacing: -.01em; }
.fin-confirm p { margin: 8px 0 0; color: var(--muted); font-size: calc(14.5px * var(--fs, 1)); line-height: 1.4; }
.fin-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
body:has(dialog.fin-confirm[open]) { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .fin-swipe > .fin-op { transition: none; } }

/* 0.28.0: питание. Карточки, вкладки, поля и строки — компоненты финансов (.fin-card, .fin-tabs, .fin-fld, .fin-op, .fin-swipe); своё здесь — кольца дня, приёмы пищи, поиск по списку. */
.nut-daynav { margin-top: 10px; }
.nut-daynav > span { text-align: center; }
.nut-today { display: block; width: max-content; margin: 2px auto 0; color: var(--green); font-size: calc(14px * var(--fs, 1)); font-weight: 800; }
.nut-op .fin-op-sum { color: var(--ink); }
.nut-search { margin: 14px 0 0; }
.nut-search input[type="search"] { -webkit-appearance: none; appearance: none; }
.fin-card .shop-group.nut-list { margin-top: 10px; }
[data-nut-name][hidden], [data-nut-none][hidden] { display: none; }
.nut-calc { color: var(--green); font-weight: 700; }
.nut-items { display: grid; gap: 8px; margin-top: 10px; }
.nut-item { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 8px; }
.nut-item .fin-fld { padding: 0 10px; }
.nut-item .fin-fld-select select { font-size: calc(15px * var(--fs, 1)); }
.nut-item .fin-fld-select::after { right: 12px; }
.nut-item .fin-fld-suf { padding-left: 8px; font-size: calc(15px * var(--fs, 1)); }
.nut-addrow { margin-top: 10px; }
.nut-card textarea { min-height: 120px; margin-top: 6px; border-color: var(--fin-line-strong); line-height: 1.45; }
.nut-steps { margin: 4px 2px 0; color: var(--ink); font-size: calc(15px * var(--fs, 1)); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }

/* 0.27.1: правки по проверке 0.27.0 на телефоне (01.10.2026). Шапка страницы: чёрного h1 нет, зелёная надпись-раздел крупнее в 1,5 раза стоит на его месте (карточка остаётся там же);
   тумблер «Общие | Личные»; карточки платежей и целей по референсу 3q (форма и расположение, цвета сайта); выбор значка цели; срок цели — месяц и год. */
.fin-page .eyebrow { --fe: clamp(13px, 2.8vw, 18px); --fh: clamp(32px, 5vw, 42px); --pm: 16px; font-size: calc(calc(var(--fe) * 1.15) * var(--fs, 1)); line-height: 1.14; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: calc(var(--pm) + 10px + 1.14 * var(--fh) + .14 * var(--fe)) 0 10px; }
/* Телефон: у финансов за шапкой рисунок высотой 56,3vw, его цветная часть кончается на ~77% (монеты, кошелёк); надпись стоит на 12 px ниже, под шапкой сайта (78 px), и на картинку не заходит. У страниц без рисунка (питание) прежнее место. */
@media (max-width: 600px) {
  .fin-page .eyebrow { --fh: clamp(25px, 6.3vw, 30px); --pm: 13px; }
  .fin-shell .fin-page .eyebrow { margin-top: calc(43.35vw - 74px); }
}

.fin-toggle { position: relative; display: block; width: 58px; height: 32px; margin-top: 12px; }
.fin-toggle a { position: absolute; inset: 0; display: block; border: 1.5px solid color-mix(in srgb, var(--green) 32%, var(--surface)); border-radius: 999px; background: color-mix(in srgb, var(--green-bright) 10%, var(--tint)); -webkit-tap-highlight-color: transparent; transition: background-color .18s ease; }
.fin-toggle.is-personal a { background: color-mix(in srgb, var(--green-bright) 18%, var(--tint)); }
.fin-toggle a::after { content: ""; position: absolute; inset: -6px -5px; }
.fin-toggle a:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 3px; }
.fin-toggle-knob { position: absolute; top: -1.5px; left: -1.5px; display: grid; place-items: center; box-sizing: border-box; width: 32px; height: 32px; border: 2px solid var(--green); border-radius: 50%; background: var(--surface); transition: transform .18s ease; }
.fin-toggle.is-personal .fin-toggle-knob { transform: translateX(26px); }
.fin-toggle-knob img { grid-area: 1 / 1; width: 19px; height: 19px; transition: opacity .18s ease; }
.fin-toggle-personal { opacity: 0; }
.fin-toggle.is-personal .fin-toggle-family { opacity: 0; }
.fin-toggle.is-personal .fin-toggle-personal { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .fin-toggle a, .fin-toggle-knob, .fin-toggle-knob img { transition: none; } }

/* Касание поля или списка не закрашивает его синим (на Android подсветка держалась несколько секунд). */
.fin-card :is(label, select, input, textarea, summary, details) { -webkit-tap-highlight-color: transparent; }
.fin-fld select:has(option[value=""]:checked) { color: var(--muted); font-weight: 500; }
/* «Период» и «Все категории»: второе поле шире, подпись не обрезается. */
.fin-filterrow.has-cat { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.fin-filterrow .fin-fld { padding: 0 10px; }
.fin-filterrow select { padding-right: 22px; font-size: calc(14.5px * var(--fs, 1)); }
.fin-filterrow .fin-fld-select::after { right: 13px; }

/* Окно «Удалить?» / «Отменить оплату?»: «Отмена» с зелёной обводкой, как у красной кнопки рядом. */
.fin-confirm .fin-btn-soft { border-color: color-mix(in srgb, var(--green) 38%, var(--surface)); }
.fin-confirm .fin-btn-soft:active { background: color-mix(in srgb, var(--green-bright) 20%, var(--tint)); }

/* Платежи: итог месяца без мятной подложки, заголовки групп со счётчиком-кружком, карточки. */
.fin-paysum { margin-top: 16px; }
.fin-paysum-label { display: block; color: var(--muted); font-size: calc(15px * var(--fs, 1)); font-weight: 700; }
.fin-paysum-label b { color: var(--ink); font-weight: 800; }
.fin-paysum-left { display: block; margin-top: 4px; color: var(--green); font-size: calc(clamp(34px, 11vw, 46px) * var(--fs, 1)); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; white-space: nowrap; }
.fin-paysum-left.is-debt { color: var(--berry); }
.fin-paysum-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 14px; border-top: 1px solid var(--fin-line); }
.fin-paysum-cols > div { padding: 12px 0; }
.fin-paysum-cols > div + div { padding-left: 16px; border-left: 1px solid var(--fin-line); }
.fin-paysum-cols span { display: block; color: var(--muted); font-size: calc(13.5px * var(--fs, 1)); font-weight: 700; }
.fin-paysum-cols b { display: block; margin-top: 3px; font-size: calc(18px * var(--fs, 1)); font-weight: 800; white-space: nowrap; }
.fin-paysum-person { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--fin-line); font-size: calc(15.5px * var(--fs, 1)); }
.fin-paysum-person span { color: var(--muted); font-weight: 700; }
.fin-paysum-person b { font-weight: 800; white-space: nowrap; }
.fin-card .shop-group.fin-paygroup { margin-top: 22px; }
.fin-card .fin-paygroup > .shop-group-title { gap: 6px; padding: 0 0 12px; font-size: calc(20px * var(--fs, 1)); font-weight: 800; letter-spacing: -.01em; text-transform: none; }
.fin-card .fin-paygroup > .shop-group-title span:last-child { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px; border: 1.5px solid var(--green); border-radius: 13px; background: none; color: var(--green); font-size: calc(14px * var(--fs, 1)); line-height: 1; letter-spacing: 0; }
.fin-card .fin-paygroup > .shop-group-title::after { margin-left: 4px; }
.fin-card .fin-paygroup + .fin-paygroup { margin-top: 26px; padding-top: 22px; border-top: 1.5px solid var(--fin-line); }
.fin-paycard { border: 1.5px solid var(--fin-line-strong); border-radius: 18px; background: var(--surface); }
.fin-paycard + .fin-paycard { margin-top: 12px; }
.fin-paycard-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 12px 14px; border-radius: 16px 16px 0 0; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.fin-paycard-main:focus-visible { outline: 3px solid var(--green-bright); outline-offset: -3px; }
.fin-paycard-date { grid-column: 1; color: var(--muted); font-size: calc(13.5px * var(--fs, 1)); font-weight: 700; line-height: 1.3; }
.fin-paycard-sum { grid-column: 2; grid-row: 1; align-self: start; font-size: calc(17px * var(--fs, 1)); font-weight: 800; line-height: 1.2; text-align: right; white-space: nowrap; }
.fin-paycard-sum.is-out { color: var(--berry); }
.fin-paycard-name { grid-column: 1 / -1; margin-top: 3px; font-size: calc(17.5px * var(--fs, 1)); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.fin-paycard-main > small { grid-column: 1 / -1; margin-top: 3px; color: var(--muted); font-size: calc(12.5px * var(--fs, 1)); line-height: 1.3; }
.fin-paycard.is-late .fin-paycard-date, .fin-paycard.is-late .fin-paycard-name, .fin-paycard.is-late .fin-pay-when { color: var(--berry); }
.fin-paycard.is-late .fin-paycard-date { font-weight: 800; }
.fin-paycard-foot { display: flex; align-items: stretch; margin: 0 14px; border-top: 1px solid var(--fin-line); }
.fin-paycard-pay { display: flex; flex: 1; align-items: center; gap: 10px; min-height: 46px; color: var(--green); font-size: calc(15px * var(--fs, 1)); font-weight: 800; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.fin-paycard-pay svg { flex: none; width: 22px; height: 22px; }
.fin-paycard-pay.is-gap { pointer-events: none; }
.fin-paycard-pay:focus-visible { outline: 3px solid var(--green-bright); outline-offset: -2px; border-radius: 10px; }
.fin-paycard-foot .fin-pay-menu { display: flex; border-left: 1px solid var(--fin-line); }
.fin-paycard-foot .fin-dots { width: 46px; height: 46px; }
.fin-paycard.is-paid { padding-bottom: 10px; }
.fin-paycard-state { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0 14px 4px; color: var(--muted); font-size: calc(14px * var(--fs, 1)); font-weight: 600; line-height: 1.35; }
.fin-paycard-ok { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green) var(--check-img) center / 100% no-repeat; }
.fin-paycard-undoform { margin: 0; padding: 0 14px; }
.fin-paycard-undo { display: block; padding: 6px 0; border: 0; background: none; color: var(--berry); font: inherit; font-size: calc(15.5px * var(--fs, 1)); font-weight: 700; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fin-paycard-undo:active { opacity: .6; }
.fin-paycard-undo:focus-visible { outline: 3px solid var(--berry); outline-offset: 2px; border-radius: 6px; }

/* Цели (референс 4q): карточка — ссылка: значок, название, стрелка; «Накоплено | Цель»; полоса; плашка «≈ N ₸ в месяц». Страница цели: карандаш и корзинка в шапке, строки через линии. */
.fin-goalcard { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; padding: 14px; border: 1.5px solid var(--fin-line-strong); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.fin-goalcard + .fin-goalcard { margin-top: 12px; }
.fin-goalcard:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.fin-goalcard-ico { grid-column: 1; display: grid; place-items: center; width: 40px; height: 40px; }
.fin-goalcard-ico .fin-logo { width: 40px; height: 40px; }
.fin-goalcard-name { grid-column: 2; min-width: 0; font-size: calc(17.5px * var(--fs, 1)); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.fin-goalcard-go { grid-column: 3; width: 16px; height: 16px; color: color-mix(in srgb, var(--muted) 70%, var(--surface)); }
.fin-goalcard-stats { grid-column: 2 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 8px; }
.fin-goalcard-stats > span { min-width: 0; }
.fin-goalcard-stats > span + span { padding-left: 14px; border-left: 1px solid var(--fin-line); }
.fin-goalcard-stats small { display: block; color: var(--muted); font-size: calc(13px * var(--fs, 1)); font-weight: 700; }
.fin-goalcard-stats b { display: block; margin-top: 2px; font-size: calc(clamp(15px, 4.6vw, 18px) * var(--fs, 1)); font-weight: 800; white-space: nowrap; }
.fin-goalcard .fin-bar { grid-column: 1 / -1; height: 10px; margin-top: 12px; border-radius: 5px; }
.fin-goalcard .fin-bar i { border-radius: 5px; }
.fin-goalcard-chip { grid-column: 1 / -1; justify-self: start; margin-top: 10px; padding: 4px 12px; border-radius: 10px; background: var(--tint); color: var(--green); font-size: calc(14px * var(--fs, 1)); font-weight: 700; line-height: 1.3; }
.fin-goalcard-chip.is-late { background: color-mix(in srgb, var(--berry) 9%, var(--surface)); color: var(--berry); }
.fin-goalcard.is-done .fin-goalcard-stats > span:first-child b { color: var(--green); }
.fin-head-tools { display: flex; flex: none; align-items: center; margin-right: -6px; }
.fin-head-tool { display: grid; place-items: center; width: 40px; height: 40px; margin: -6px 0; border-radius: 12px; color: var(--green); -webkit-tap-highlight-color: transparent; }
.fin-head-tool svg { width: 22px; height: 22px; }
.fin-head-tool:active { background: var(--tint); }
.fin-head-tool:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 1px; }
.fin-head-tools .fin-trash { margin: -6px 0; }
.fin-head:has(.fin-head-tools) h2 { overflow: visible; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.fin-head-sub { margin: 2px 0 0; color: var(--muted); font-size: calc(14px * var(--fs, 1)); font-weight: 600; }
.fin-paysum .fin-goal-bar { height: 10px; margin: 14px 0 0; border-radius: 5px; }
.fin-paysum .fin-goal-bar i { border-radius: 5px; }
.fin-goal-rows { margin-top: 14px; border-top: 1px solid var(--fin-line); }
.fin-goal-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 12px 0; border-top: 1px solid var(--fin-line); font-size: calc(15.5px * var(--fs, 1)); }
.fin-goal-rows > div:first-child { border-top: 0; }
.fin-goal-rows span { color: var(--muted); font-weight: 600; }
.fin-goal-rows b { min-width: 0; text-align: right; font-weight: 800; }
.fin-wide + .fin-goal-actions { margin-top: 10px; }
.fin-termrow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.fin-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 10px 8px; }
.fin-icon { position: relative; display: block; min-width: 0; margin: 0; font-weight: inherit; -webkit-tap-highlight-color: transparent; }
.fin-icon input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.fin-icon-in { position: relative; display: grid; place-items: center; aspect-ratio: 1; border: 1.5px solid var(--fin-line-strong); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .14s ease; }
.fin-icon-in img { display: block; width: 68%; height: 68%; object-fit: contain; }
.fin-icon input:checked + .fin-icon-in { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.fin-icon-ok { display: none; position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border: 2px solid var(--surface); border-radius: 50%; background: var(--green) var(--check-img) center / 100% no-repeat; }
.fin-icon input:checked + .fin-icon-in .fin-icon-ok { display: block; }
.fin-icon input:focus-visible + .fin-icon-in { outline: 3px solid var(--green-bright); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .fin-icon-in { transition: none; } }

/* Выбор из двух вариантов строками (форма платежа «Как платится»): круг-отметка как на всём сайте, название и короткое пояснение; выбранная строка — зелёная рамка. */
.fin-choices { display: grid; gap: 8px; }
.fin-choice { position: relative; display: block; margin: 0; font-weight: inherit; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
.fin-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.fin-choice-in { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border: 1.5px solid var(--fin-line-strong); border-radius: 14px; background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .14s ease; }
.fin-choice-ok { flex: none; width: 24px; height: 24px; border: 2px solid var(--check-off); border-radius: 50%; background: var(--surface) center / 100% no-repeat; transition: background-color .14s ease, border-color .14s ease; }
.fin-choice-text { min-width: 0; }
.fin-choice-text b { display: block; font-size: calc(16px * var(--fs, 1)); font-weight: 800; line-height: 1.25; }
.fin-choice-text small { display: block; margin-top: 2px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); line-height: 1.3; }
.fin-choice input:checked + .fin-choice-in { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.fin-choice input:checked + .fin-choice-in .fin-choice-ok { border-color: var(--green); background-color: var(--green); background-image: var(--check-img); }
.fin-choice input:focus-visible + .fin-choice-in { outline: 3px solid var(--green-bright); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .fin-choice-in, .fin-choice-ok { transition: none; } }

/* 0.28.3: правки по проверке 0.28.1 (01.10.2026, пункты s01–s12). «Баланс месяца» без подложки, «Оплачено» зелёным, обводка у всех полос; шаблон, конверт, остатки, перевод, «на личное», доход — по референсам 5q–10q (форма и расположение, цвета и шрифты сайта). */
.fin-card { --fin-bar-line: color-mix(in srgb, var(--muted) 36%, var(--surface)); }
.fin-balance .fin-badge { padding: 0; background: none; }
.fin-paysum-cols > .is-paid b { color: var(--green); }
.fin-paysum-person { font-size: calc(13.2px * var(--fs, 1)); }
.fin-bar { height: 7px; border: 1px solid var(--fin-bar-line); border-radius: 4px; }
.fin-bar i { border-radius: 3px; }
.fin-goalcard .fin-bar, .fin-paysum .fin-goal-bar { height: 12px; border-radius: 6px; }
.fin-goalcard .fin-bar i, .fin-paysum .fin-goal-bar i { border-radius: 5px; }
.fin-meter-track { border-color: var(--fin-bar-line); }

/* Шапка с значком (конверт) */
.fin-head-main { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; }
.fin-head-main h2 { flex: 1; }
.fin-head-logo { display: grid; place-items: center; flex: none; width: 34px; height: 34px; }
.fin-head-logo .fin-logo { width: 34px; height: 34px; }
.fin-head-logo .fin-logo-plain svg { width: 30px; height: 30px; }

/* Конверт (6q): остаток крупно без мятной карточки, строки через линии, две мятные кнопки, история на линии времени, карточка значка */
.fin-big { margin-top: 12px; }
.fin-big > span { display: block; color: var(--muted); font-size: calc(16px * var(--fs, 1)); font-weight: 700; }
.fin-big strong { display: block; margin-top: 4px; color: var(--green); font-size: calc(clamp(34px, 11vw, 46px) * var(--fs, 1)); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; white-space: nowrap; }
.fin-big.is-over strong { color: #a1283f; }
.fin-breakdown.is-ruled { margin-top: 12px; padding: 0 2px; border-top: 1px solid var(--fin-line); }
.fin-duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 14px; }
.fin-duo .fin-btn-soft, .fin-foot .fin-btn-soft { border-color: color-mix(in srgb, var(--green) 38%, var(--surface)); }
.fin-duo .fin-btn-soft:active, .fin-foot .fin-btn-soft:active { background: color-mix(in srgb, var(--green-bright) 20%, var(--tint)); }
.fin-card .shop-group.fin-hist { margin-top: 22px; }
.fin-card .fin-hist > .shop-group-title { padding: 0 0 6px; color: var(--ink); font-size: calc(18px * var(--fs, 1)); font-weight: 800; letter-spacing: -.01em; text-transform: none; }
.fin-tl-cap { margin: 6px 2px 2px; color: var(--muted); font-size: calc(14.5px * var(--fs, 1)); font-weight: 600; }
.fin-tl-day + .fin-tl-day { margin-top: 10px; }
.fin-tl .fin-op { position: relative; align-items: flex-start; gap: 10px; min-height: 0; padding: 9px 2px 9px 34px; }
.fin-tl .fin-op-date { display: none; }
.fin-tl .fin-op::before { content: ""; position: absolute; top: 0; bottom: 0; left: 14px; width: 2px; background: var(--fin-line-strong); }
.fin-tl .fin-op::after { content: ""; position: absolute; top: 14px; left: 8px; box-sizing: border-box; width: 14px; height: 14px; border: 2.5px solid var(--green); border-radius: 50%; background: var(--surface); }
.fin-tl-cap + .fin-op::before, .fin-tl-cap + .fin-swipe > .fin-op::before { top: 21px; }
.fin-tl .fin-swipe > .fin-op { background: var(--surface); }
/* Строки «значок — название — поле» (шаблон 5q, остатки 7q, раскладка дохода 10q) */
.fin-erows { margin-top: 12px; }
.fin-erows.is-split { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--fin-line); }
.fin-erows-head { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 12px 2px 6px; color: var(--muted); font-size: calc(14px * var(--fs, 1)); font-weight: 700; }
.fin-erow { display: flex; align-items: center; gap: 10px; padding: 9px 2px; }
.fin-erows-head + .fin-erow { padding-top: 6px; }
.fin-erow + .fin-erow { border-top: 1px solid var(--fin-line); }
.fin-erows.is-edit > .fin-erow + .fin-erow { border-top: 0; }
.fin-erow-logo { display: grid; place-items: center; flex: none; width: 30px; height: 30px; }
.fin-erow-logo .fin-logo { width: 30px; height: 30px; }
.fin-erow-logo .fin-logo-plain svg { width: 26px; height: 26px; }
.fin-erow-name { flex: 1; min-width: 0; margin: 0; overflow: hidden; font-size: calc(16px * var(--fs, 1)); font-weight: 800; line-height: 1.2; overflow-wrap: normal; word-break: normal; hyphens: none; }
.fin-erow-name small { display: block; margin-top: 2px; color: var(--muted); font-size: calc(12.5px * var(--fs, 1)); font-weight: 700; }
.fin-erow input { flex: none; width: 96px; height: 46px; margin: 0; padding: 0 10px; border-radius: 12px; text-align: right; font-size: calc(16px * var(--fs, 1)); font-weight: 800; }
.fin-erow input::placeholder { color: var(--muted); font-weight: 500; }
.fin-erow input:focus { border-color: var(--green-bright); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green-bright) 22%, transparent); }
.fin-erow input.fin-name { flex: 1; width: auto; min-width: 0; padding: 0 9px; text-align: left; font-size: calc(14.5px * var(--fs, 1)); font-weight: 700; }
.fin-erows.is-adjust .fin-erow input { width: 128px; }
.fin-erow.is-neg input::placeholder { color: #a1283f; font-weight: 800; opacity: 1; }
.fin-erow.is-free { margin-top: 4px; padding-top: 12px; padding-bottom: 12px; border-top: 1px solid var(--fin-line); }
.fin-erow.is-free em { flex: none; padding-right: 4px; color: var(--green); font-size: calc(17px * var(--fs, 1)); font-style: normal; font-weight: 800; }
.fin-erow.is-free.is-over em { color: #a1283f; }
.fin-erow.is-kept .fin-erow-name { color: var(--muted); }
.fin-erow.is-kept b { flex: none; padding-right: 4px; font-size: calc(16px * var(--fs, 1)); font-weight: 800; white-space: nowrap; }
.fin-addrow { position: relative; display: grid; place-items: center; width: 30px; height: 30px; margin: 8px 2px 0; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--green); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fin-addrow::after { content: ""; position: absolute; inset: -9px; }
.fin-addrow svg { width: 30px; height: 30px; stroke-width: 2.4; }
.fin-addrow:active { color: var(--green-bright); }
.fin-addrow:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.fin-sum-big { align-items: baseline; margin: 14px 2px 0; padding-top: 14px; border-top: 1px solid var(--fin-line); font-size: calc(17px * var(--fs, 1)); }
.fin-sum-big b { font-size: calc(20px * var(--fs, 1)); font-weight: 800; }
.fin-bigrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 0 2px 14px; border-bottom: 1px solid var(--fin-line); }
.fin-bigrow > span { color: var(--muted); font-size: calc(17px * var(--fs, 1)); font-weight: 700; }
.fin-bigrow strong { color: var(--green); font-size: calc(clamp(24px, 7.6vw, 30px) * var(--fs, 1)); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.fin-bigrow.is-over strong { color: #a1283f; }
.fin-actions.is-single { grid-template-columns: minmax(0, 1fr); }
.fin-actions.is-wide-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.fin-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--fin-line); }
.fin-foot .fin-btn-wide { margin-top: 0; }
.fin-rule { margin: 18px 0 0; border: 0; border-top: 1px solid var(--fin-line); }

/* Перевод между конвертами (8q): два списка рядом со стрелкой; на лице списка значок, название и остаток под ним */
.fin-pair { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); align-items: stretch; }
.fin-pair-l1 { grid-column: 1; }
.fin-pair-l2 { grid-column: 3; }
.fin-pair-arrow { display: grid; place-items: center; align-self: center; color: color-mix(in srgb, var(--green) 55%, var(--surface)); }
.fin-pair-arrow svg { width: 24px; height: 24px; }
.fin-pick { position: relative; display: flex; align-items: center; gap: 7px; min-height: 58px; padding: 6px 26px 6px 9px; border: 1.5px solid var(--fin-line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); }
.fin-pick:focus-within { border-color: var(--green-bright); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green-bright) 22%, transparent); }
.fin-pick::after { content: ""; position: absolute; right: 10px; top: 50%; width: 8px; height: 8px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.fin-pick-ico { display: grid; place-items: center; flex: none; width: 24px; color: var(--green); }
.fin-pick-ico svg { width: 22px; height: 22px; }
.fin-pick-text { flex: 1; min-width: 0; line-height: 1.2; }
.fin-pick-text b { display: -webkit-box; overflow: hidden; font-size: calc(14.5px * var(--fs, 1)); font-weight: 800; line-height: 1.15; overflow-wrap: normal; word-break: normal; hyphens: none; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fin-pick-text small { display: block; margin-top: 2px; color: var(--muted); font-size: calc(13.5px * var(--fs, 1)); font-weight: 400; white-space: nowrap; }
.fin-pick-text small.is-neg { color: #a1283f; }
.fin-pick select { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 12px; opacity: 0; font-size: calc(16px * var(--fs, 1)); cursor: pointer; -webkit-appearance: none; appearance: none; }
@media (max-width: 359px) { .fin-pick-ico { display: none; } .fin-pick { padding-left: 11px; } .fin-erows.is-adjust .fin-erow input { width: 108px; } }

/* «Взять на личное» (9q): пояснение, мятная плашка «Доступно», два шага с номерами на линии */
.fin-lead { margin: 10px 2px 0; color: var(--muted); font-size: calc(15.5px * var(--fs, 1)); line-height: 1.4; }
.fin-avail { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 16px 18px; border: 0; border-radius: 20px; background: var(--tint); }
.fin-avail span { min-width: 0; color: var(--green); font-size: calc(15px * var(--fs, 1)); font-weight: 400; }
.fin-avail strong { flex: none; color: var(--green); font-size: calc(clamp(22px, 7.2vw, 30px) * var(--fs, 1)); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.fin-steps { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: fin-step; }
.fin-step { position: relative; padding: 0 0 20px 52px; counter-increment: fin-step; }
.fin-step::before { content: counter(fin-step); position: absolute; top: 0; left: 0; display: grid; place-items: center; box-sizing: border-box; width: 36px; height: 36px; border: 2px solid var(--green); border-radius: 50%; background: var(--surface); color: var(--green); font-size: calc(17px * var(--fs, 1)); font-weight: 800; }
.fin-step::after { content: ""; position: absolute; top: 38px; bottom: 0; left: 17px; width: 2px; background: var(--fin-line-strong); }
.fin-step:last-child { padding-bottom: 8px; }
.fin-step-t { display: block; min-height: 36px; margin: 0 0 8px; color: var(--ink); font-size: calc(17px * var(--fs, 1)); font-weight: 800; line-height: 36px; }

/* 0.28.5 begin */
/* 0.28.5: правки по замечаниям владельца к 0.28.4 (чек-лист, 01.10.2026, вечер): фильтр по типу операции и ссылки «Доход / Расход», платежи (пустой экран, завершённый платёж, форма по 14q), цели (кнопки по 16q, сетка значков 5 × 3), редактирование конверта и общее поле загрузки значка (6q icon), «Взять на личное» точно по 9q, «Несколько категорий» по q21, мелкие правки. */

/* Фильтры «Операций»: «Период | Тип» в строке, «Категория» под ней */
.fin-filterform { display: grid; gap: 8px; margin: 0; }
.fin-filterrow.has-two { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.fin-filterrow.has-two .fin-fld { padding: 0 10px; }

/* «Доход» и «Расход» обзора — ссылки на операции с фильтром */
a.fin-mini { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a.fin-mini:active { filter: brightness(.96); }
a.fin-mini:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }

/* «Останется в конверте …»: сумма с валютой жирным (замечание к №15) */
.fin-note b { color: var(--ink); font-weight: 800; }
.fin-note.is-over b { color: #a1283f; }

/* Платежи: пустой экран (3q «при отсутствии платежей»), завершённый платёж одним полем, форма по 14q */
.fin-empty { display: grid; justify-items: center; gap: 14px; padding: 34px 0 26px; }
.fin-empty-ico { display: grid; place-items: center; color: var(--green); }
.fin-empty-ico svg { width: 64px; height: 64px; stroke-width: 1.5; }
.fin-empty-t { margin: 0; color: var(--ink); font-size: calc(22px * var(--fs, 1)); font-weight: 800; letter-spacing: -.01em; }
.fin-empty-btn { margin-top: 0; border-color: color-mix(in srgb, var(--green) 55%, var(--surface)); }
.fin-paycard.is-done { position: relative; }
.fin-paycard.is-done .fin-paycard-main { display: block; padding: 12px 52px 12px 14px; border-radius: 16px; }
.fin-paycard-fin { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--green); font-size: calc(15px * var(--fs, 1)); font-weight: 800; }
.fin-paycard-fin .fin-paycard-ok { width: 22px; height: 22px; }
.fin-paycard.is-done .fin-paycard-main > small { display: block; margin-top: 4px; }
.fin-paycard.is-done .fin-pay-menu { position: absolute; top: 4px; right: 4px; }
.fin-paycard.is-done .fin-dots { width: 44px; height: 44px; }
.fin-form-h { margin: 22px 0 10px; color: var(--ink); font-size: calc(20px * var(--fs, 1)); font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.fin-sched-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 10px; color: var(--muted); font-size: calc(14.5px * var(--fs, 1)); font-weight: 600; }
.fin-sched-bar span { white-space: nowrap; }
.fin-sched-bar .fin-btn { flex: none; padding: 0 12px; border-color: color-mix(in srgb, var(--green) 38%, var(--surface)); }
/* Цели: «Пополнить» и «Вернуть» контуром под широкой «Потратить» (16q), значки целей — пять в ряд (три ряда по пять) */
.fin-btn-line { border-color: color-mix(in srgb, var(--green) 45%, var(--surface)); background: var(--surface); color: var(--green); }
.fin-btn-line:active { background: var(--tint); }
.fin-icons { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 8px; }

/* «Взять на личное» (9q точно): «Перевести себе» мятной кнопкой с зелёной рамкой, «Отмена» — просто слово рядом */
.fin-actions.is-ref { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: center; gap: 8px; }
.fin-btn-ref { border-width: 2px; border-color: var(--green); background: var(--tint); color: var(--ink); }
.fin-btn-ref .fin-svg { color: var(--green); }
.fin-btn-ref:active { background: color-mix(in srgb, var(--green-bright) 20%, var(--tint)); }
.fin-cancel-text { display: grid; place-items: center; min-height: 48px; color: var(--muted); font-size: calc(16px * var(--fs, 1)); font-weight: 800; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.fin-cancel-text:active { color: var(--ink); }
.fin-cancel-text:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; border-radius: 12px; }

/* Поле загрузки значка (6q «icon»; одно на все места, где грузится значок): круглая отметка, «Выбрать файл», «Файл не выбран» */
.fin-upload { margin-top: 20px; padding: 16px 14px 14px; border: 1.5px solid var(--fin-line); border-radius: 18px; background: var(--surface); }
.fin-upload-t { margin: 0; color: var(--ink); font-size: calc(20px * var(--fs, 1)); font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.fin-upload-s { margin: 4px 0 0; color: var(--muted); font-size: calc(15px * var(--fs, 1)); line-height: 1.35; }
.fin-upload-zone { display: grid; justify-items: center; gap: 12px; margin: 14px 0 0; padding: 20px 12px 18px; border: 1.5px solid var(--fin-line); border-radius: 16px; background: var(--surface); text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fin-upload-zone:focus-within { border-color: var(--green-bright); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green-bright) 22%, transparent); }
.fin-upload-ico { display: grid; place-items: center; box-sizing: border-box; width: 62px; height: 62px; border: 2px solid var(--green); border-radius: 50%; background: var(--tint); color: var(--green); }
.fin-upload-ico svg { width: 32px; height: 32px; stroke-width: 2.2; }
.fin-upload-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: 1.5px solid var(--green); border-radius: 12px; background: var(--surface); color: var(--green); font-size: calc(16px * var(--fs, 1)); font-weight: 800; }
.fin-upload-zone:active .fin-upload-btn { background: var(--tint); }
.fin-upload-name { max-width: 100%; overflow: hidden; color: var(--muted); font-size: calc(15px * var(--fs, 1)); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.fin-upload.has-file .fin-upload-name { color: var(--ink); font-weight: 700; }
.fin-option { margin-top: 16px; }

/* «Несколько категорий» (q21): строка-переключатель в рамке чека; со включённым переключателем под ней ещё три суммы */
.fin-multi { min-height: 52px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fin-multi-t { flex: 1; min-width: 0; color: var(--ink); font-size: calc(16px * var(--fs, 1)); font-weight: 800; }
.fin-multi input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.fin-multi-track { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; background: color-mix(in srgb, var(--green) 24%, var(--fin-line)); transition: background-color .16s ease; }
.fin-multi-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .28); transition: transform .16s ease; }
.fin-multi input:checked ~ .fin-multi-track { background: var(--green); }
.fin-multi input:checked ~ .fin-multi-track::after { transform: translateX(18px); }
.fin-multi input:focus-visible ~ .fin-multi-track { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.fin-partbox > .fin-part + .fin-multi { margin-top: 8px; }
.fin-parts-more { display: none; }
.fin-partbox:has(.fin-multi input:checked) .fin-parts-more { display: grid; gap: 10px; margin-top: 10px; }
.fin-parts-more > .fin-part { padding-top: 10px; border-top: 1px dashed var(--fin-line-strong); }
@media (prefers-reduced-motion: reduce) { .fin-multi-track, .fin-multi-track::after { transition: none; } }
/* 0.28.5 end */

/* 0.29.0: шапка раздела «Здоровье», дневник и страницы питания по референсам владельца (02.10.2026; расположение с референсов, цвета и шрифты сайта).
   Одна картинка шапки на весь раздел (категория «Здоровье», фитнес, питание), как у финансов: за логотипом, плавно уходит вниз; зелёная надпись-путь под ней. */
.health-shell { position: relative; isolation: isolate; }
.health-shell::before { content: ""; position: absolute; z-index: -1; top: 0; right: 0; width: 100%; height: min(56.3vw, 687px); background: url("/assets/health/health-hero.jpg?v=1") no-repeat right top / cover; -webkit-mask-image: linear-gradient(#000 0%, #000 68%, transparent 100%); mask-image: linear-gradient(#000 0%, #000 68%, transparent 100%); pointer-events: none; }
@media (max-width: 600px) {
  .health-shell .fin-page .eyebrow { margin-top: calc(43.35vw - 74px); }
}
/* «Здоровье»: две ссылки-карточки с круглой картинкой, названием, подписью и стрелкой. */
.health-links { display: grid; gap: 12px; }
.health-link { display: grid; grid-template-columns: 84px minmax(0, 1fr) 22px; align-items: center; gap: 16px; min-height: 108px; padding: 12px 16px 12px 14px; border: 1.5px solid color-mix(in srgb, var(--green) 24%, var(--surface)); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.health-link:active { background: color-mix(in srgb, var(--tint) 45%, var(--surface)); }
.health-link:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.health-link-pic { display: block; width: 84px; height: 84px; overflow: hidden; border-radius: 50%; }
.health-link-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.health-link-text { display: grid; gap: 4px; min-width: 0; }
.health-link-text strong { color: var(--ink); font-size: calc(clamp(21px, 6vw, 26px) * var(--fs, 1)); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.health-link-text small { color: var(--muted); font-size: calc(clamp(13px, 3.6vw, 16px) * var(--fs, 1)); line-height: 1.3; }
.health-link-go { color: var(--green); }
.health-link-go .ui-icon { width: 20px; height: 20px; }
/* Шапка карточки питания: название (корзинка стоит сразу за ним), «Личное» / «Общие» со значком, при нужде круглый «+». */
.nut-head { align-items: flex-start; }
.nut-head-title { display: flex; flex: 1 1 auto; align-items: center; gap: 6px; min-width: 0; }
.nut-head .nut-head-title h2 { overflow: visible; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.nut-head-title .fin-head-trash { flex: none; margin: 0; }
.nut-head-title .fin-trash { margin: 0; }
.nut-head-kind { display: inline-flex; align-items: center; flex: none; gap: 7px; padding-top: 3px; color: var(--muted); font-size: calc(14px * var(--fs, 1)); font-weight: 700; white-space: nowrap; }
.nut-head-kind .ui-icon { width: 21px; height: 21px; }
.nut-head-plus { display: grid; place-items: center; flex: none; width: 42px; height: 42px; margin: -3px 0 -3px 2px; border: 2px solid var(--green); border-radius: 50%; color: var(--green); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.nut-head-plus .fin-svg { width: 22px; height: 22px; stroke-width: 2.3; }
.nut-head-plus:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
/* Плитка продукта или рецепта: фото или нейтральная плитка со значком. */
.nut-thumb { display: block; flex: none; width: 46px; height: 46px; overflow: hidden; border-radius: 14px; background: var(--surface); }
.nut-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nut-thumb.is-empty { display: grid; place-items: center; background: var(--fin-empty); color: color-mix(in srgb, var(--muted) 70%, var(--surface)); }
.nut-thumb.is-empty .fin-svg { width: 55%; height: 55%; }
.nut-thumb.is-pick { width: 76px; height: 76px; border-radius: 18px; }
.nut-thumb.is-card { width: 92px; height: 92px; border-radius: 18px; }
/* Верх дневника: крупное кольцо калорий слева (около половины ширины), справа «Осталось» и ссылка «Цели». Серое кольцо с тонкой обводкой, как у остальных полос проекта. */
.nut-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; margin-top: 14px; padding: 14px 12px; border: 1px solid var(--fin-line-strong); border-radius: 18px; background: var(--surface); }
.nut-summary::before { content: none; }
.nut-bigring { --nut-c: var(--green); position: relative; width: min(100%, 176px); aspect-ratio: 1; justify-self: center; }
.nut-bigring.is-over { --nut-c: var(--berry); }
.nut-bigring svg { display: block; width: 100%; height: 100%; }
.nut-ring-edge { fill: none; stroke: var(--fin-bar-line); stroke-width: .5; }
.nut-ring-track { fill: none; stroke: var(--fin-empty); stroke-width: 4.8; }
.nut-ring-bar { fill: none; stroke: var(--nut-c); stroke-width: 3.8; stroke-linecap: round; }
.nut-bigring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 17%; text-align: center; line-height: 1.1; }
.nut-bigring-in b { color: var(--ink); font-size: calc(clamp(25px, 7.6vw, 34px) * var(--fs, 1)); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.nut-bigring-in small { margin-top: 3px; color: var(--muted); font-size: calc(clamp(12px, 3.3vw, 14px) * var(--fs, 1)); font-weight: 700; }
.nut-left { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; min-width: 0; padding: 6px 0 6px 14px; border-left: 1px solid var(--fin-line); }
.nut-left-cap { color: var(--muted); font-size: calc(15px * var(--fs, 1)); font-weight: 700; }
.nut-left strong { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 5px; color: var(--green); font-size: calc(clamp(29px, 9vw, 40px) * var(--fs, 1)); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.nut-left strong small { font-size: calc(clamp(14px, 3.9vw, 17px) * var(--fs, 1)); letter-spacing: 0; }
.nut-left strong.is-over { color: var(--berry); }
.nut-goals { display: inline-flex; align-items: center; gap: 2px; margin-top: 4px; padding: 6px 0; color: var(--green); font-size: calc(15px * var(--fs, 1)); font-weight: 800; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.nut-goals .ui-icon { width: 15px; height: 15px; }
.nut-goals:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; border-radius: 6px; }
/* Белки, жиры, углеводы: полосы своего цвета с обводкой, как у остальных полос проекта (`.fin-bar`). */
.nut-mac { display: grid; margin-top: 12px; padding: 2px 14px; border: 1px solid var(--fin-line-strong); border-radius: 18px; background: var(--surface); }
.nut-mac-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 36px auto; align-items: center; gap: 8px; min-height: 46px; }
.nut-mac-row + .nut-mac-row { border-top: 1px solid var(--fin-line); }
.nut-mac-name { color: var(--ink); font-size: calc(15px * var(--fs, 1)); font-weight: 700; }
.nut-mac .fin-bar { margin: 0; }
.nut-mac-row.is-protein .fin-bar i { background: var(--green-bright); }
.nut-mac-row.is-fat .fin-bar i { background: var(--fin-amber-ink); }
.nut-mac-row.is-carbs .fin-bar i { background: var(--accent); }
.nut-mac-row.is-over .fin-bar i { background: var(--berry); }
.nut-mac-pct { color: var(--muted); font-size: calc(13.5px * var(--fs, 1)); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.nut-mac-val { color: var(--muted); font-size: calc(14px * var(--fs, 1)); font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nut-mac-val b { color: var(--ink); font-weight: 800; }
/* Колонки общие для трёх строк, чтобы полосы были одной длины. */
@supports (grid-template-columns: subgrid) {
  .nut-mac { grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: 8px; }
  .nut-mac-row { grid-column: 1 / -1; grid-template-columns: subgrid; }
}
@media (max-width: 340px) {
  .nut-mac-row { grid-template-columns: 66px minmax(0, 1fr) auto; }
  .nut-mac-pct { display: none; }
}
@supports (grid-template-columns: subgrid) {
  @media (max-width: 340px) {
    .nut-mac { grid-template-columns: auto minmax(0, 1fr) auto; }
    .nut-mac-row { grid-template-columns: subgrid; }
  }
}
/* Приёмы пищи цепочкой: круглый значок на линии дня, название, калории, круглая «+» (меню из двух круглых значков: тарелка = еда, кружка = перекус); записи — под названием, на той же линии. */
.nut-chain { margin-top: 16px; }
.nut-meal { position: relative; }
.nut-meal::before { content: ""; position: absolute; left: 22px; top: 0; bottom: 0; width: 2px; background: var(--fin-line-strong); }
.nut-chain > .nut-meal:first-child::before { top: 32px; }
.nut-meal-head { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 40px; align-items: center; gap: 10px; min-height: 60px; padding: 7px 0; }
.nut-meal-ico { position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; border: 1.5px solid var(--fin-line-strong); border-radius: 50%; background: var(--surface); color: var(--green); }
.nut-meal.is-snack .nut-meal-ico { justify-self: center; width: 40px; height: 40px; }
.nut-meal-ico .fin-svg { width: 24px; height: 24px; }
.nut-meal-img { display: block; width: 28px; height: 28px; object-fit: contain; }
.nut-meal-name { min-width: 0; margin: 0; color: var(--green); font-size: calc(17px * var(--fs, 1)); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.nut-meal.is-snack .nut-meal-name { font-size: calc(15.5px * var(--fs, 1)); }
.nut-meal-kcal { color: var(--ink); font-size: calc(15.5px * var(--fs, 1)); font-weight: 800; white-space: nowrap; }
.nut-rows .fin-swipe { position: relative; }
.nut-rows .fin-swipe::before { content: ""; position: absolute; z-index: 2; left: 22px; top: 0; bottom: 0; width: 2px; background: var(--fin-line-strong); pointer-events: none; }
.nut-rows .fin-swipe::after { content: ""; position: absolute; z-index: 3; left: 17px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--green-bright); box-shadow: 0 0 0 3px var(--surface); pointer-events: none; }
.nut-rows .fin-swipe > .fin-op { align-items: center; gap: 12px; min-height: 62px; padding-left: 58px; }
.nut-rows .fin-swipe + .fin-swipe > .fin-op { background-color: var(--surface); background-image: linear-gradient(var(--fin-line), var(--fin-line)); background-repeat: no-repeat; background-position: right top; background-size: calc(100% - 58px) 1px; }
.nut-op .fin-op-text { min-width: 0; margin-right: auto; }
.nut-plus { position: relative; justify-self: end; }
.nut-plus-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--green); border-radius: 50%; background: var(--surface); color: var(--green); list-style: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nut-plus-btn::-webkit-details-marker { display: none; }
.nut-plus-btn .fin-svg { width: 22px; height: 22px; stroke-width: 2.3; }
.nut-plus[open] .nut-plus-btn { background: var(--green); color: var(--surface); }
.nut-plus-btn:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.nut-plus-menu { position: absolute; z-index: 30; top: calc(100% + 10px); right: -3px; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 1px solid var(--fin-line-strong); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.nut-plus-menu::before { content: ""; position: absolute; top: -6px; right: 17px; width: 10px; height: 10px; border: solid var(--fin-line-strong); border-width: 1px 0 0 1px; background: var(--surface); transform: rotate(45deg); }
.nut-chain > .nut-meal:last-child .nut-plus-menu { top: auto; bottom: calc(100% + 10px); }
.nut-chain > .nut-meal:last-child .nut-plus-menu::before { content: none; }
.nut-plus-act { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: color-mix(in srgb, var(--tint) 70%, var(--surface)); -webkit-tap-highlight-color: transparent; }
.nut-plus-act + .nut-plus-act::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: -6px; width: 1px; background: var(--fin-line-strong); }
.nut-plus-act img { display: block; width: 30px; height: 30px; }
.nut-plus-act:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
/* «Добавить еду»: переключатель с значками (цельный, без внешней рамки), выбор приёма пищи, поиск с «+», продукты с фото. */
.nut-seg { display: grid; grid-template-columns: 1fr 1fr; margin-top: 12px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 10%, var(--surface)); }
.nut-seg a { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; border-radius: 999px; color: color-mix(in srgb, var(--ink) 70%, var(--surface)); font-size: calc(16px * var(--fs, 1)); font-weight: 800; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.nut-seg a .fin-svg { width: 22px; height: 22px; }
.nut-seg a[aria-current] { background: var(--green); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--green) 28%, transparent); }
.nut-seg a[aria-current] .fin-svg { fill: currentColor; }
.nut-seg a:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.nut-mealpick { margin-top: 14px; }
.nut-mealpick-cap { display: flex; justify-content: space-between; gap: 10px; margin: 0 2px 8px; color: var(--muted); font-size: calc(14px * var(--fs, 1)); font-weight: 700; }
.nut-pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.nut-pills a { display: grid; place-items: center; min-height: 42px; padding: 0 4px; border: 1.5px solid var(--fin-line-strong); border-radius: 999px; background: var(--surface); color: color-mix(in srgb, var(--ink) 72%, var(--surface)); font-size: calc(clamp(13px, 3.8vw, 15px) * var(--fs, 1)); font-weight: 800; text-align: center; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.nut-pills a[aria-current] { border-color: var(--green); background: var(--green); color: #fff; }
.nut-pills a:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.nut-pills.is-sub { display: flex; flex-wrap: wrap; margin-top: 8px; }
.nut-pills.is-sub a { min-height: 38px; padding: 0 12px; font-size: calc(14px * var(--fs, 1)); }
.nut-searchrow { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.nut-searchrow .nut-search { flex: 1 1 auto; min-width: 0; margin: 0; }
.nut-search-plus { display: grid; place-items: center; flex: none; align-self: stretch; aspect-ratio: 1; min-height: 47px; border: 1.5px solid var(--green); border-radius: 12px; background: var(--surface); color: var(--green); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.nut-search-plus .fin-svg { width: 24px; height: 24px; stroke-width: 2.3; }
.nut-search-plus:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.nut-picklist { margin-top: 10px; }
.nut-pick { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 2px; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.nut-pick[hidden] { display: none; }
.nut-pick + .nut-pick { border-top: 1px solid var(--fin-line); }
.nut-pick-text { display: grid; gap: 3px; min-width: 0; }
.nut-pick-text b { color: var(--ink); font-size: calc(18px * var(--fs, 1)); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.nut-pick-text small { color: var(--muted); font-size: calc(14px * var(--fs, 1)); line-height: 1.3; }
.nut-pick-sum { display: grid; justify-items: end; gap: 3px; text-align: right; }
.nut-pick-sum b { color: var(--ink); font-size: calc(17px * var(--fs, 1)); font-weight: 800; white-space: nowrap; }
.nut-pick-sum small { color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.nut-pick[aria-current] .nut-pick-text b { color: var(--green); }
.nut-pick:focus-visible { outline: 3px solid var(--green-bright); outline-offset: -2px; border-radius: 12px; }
.nut-chosen { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--green) 12%, var(--tint)); border-radius: 16px; background: var(--tint); }
.nut-chosen-text { display: grid; gap: 3px; min-width: 0; }
.nut-chosen-text b { color: var(--ink); font-size: calc(17px * var(--fs, 1)); font-weight: 800; }
.nut-chosen-text small { color: var(--muted); font-size: calc(13px * var(--fs, 1)); line-height: 1.35; }
.nut-addform { scroll-margin-top: 12px; }
@media (max-width: 360px) {
  .nut-pick { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; }
  .nut-thumb.is-pick { width: 64px; height: 64px; }
}
/* Список продуктов (референс 7): фото с калориями под ним, вертикальная линия, название и три строки Б/Ж/У. */
.nut-foodlist { margin-top: 12px; }
.nut-food { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px 0; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.nut-food[hidden] { display: none; }
.nut-food + .nut-food { border-top: 1px solid var(--fin-line); }
.nut-food-pic { display: grid; justify-items: center; gap: 6px; }
.nut-food-pic b { color: var(--green); font-size: calc(15px * var(--fs, 1)); font-weight: 800; white-space: nowrap; }
.nut-food-info { display: grid; min-width: 0; padding-left: 14px; border-left: 1px solid var(--fin-line-strong); }
.nut-food-name { margin-bottom: 4px; color: var(--ink); font-size: calc(18px * var(--fs, 1)); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.nut-food-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--fin-line); color: var(--muted); font-size: calc(15px * var(--fs, 1)); }
.nut-food-row b { color: color-mix(in srgb, var(--ink) 75%, var(--surface)); font-weight: 800; }
.nut-food:focus-visible { outline: 3px solid var(--green-bright); outline-offset: -2px; border-radius: 12px; }
/* Формы продукта и целей: Б/Ж/У строками со значком и полем «г», калории с кнопкой пересчёта, фото. */
.nut-mrow { display: grid; grid-template-columns: minmax(0, 1fr) 138px; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 8px 8px 14px; border: 1px solid var(--fin-line); border-radius: 18px; background: linear-gradient(90deg, color-mix(in srgb, var(--tint) 75%, var(--surface)), var(--surface)); }
.nut-mrow-label { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: calc(16px * var(--fs, 1)); font-weight: 700; }
.nut-mrow-ico { display: grid; place-items: center; flex: none; width: 34px; height: 34px; color: var(--green); }
.nut-mrow-ico .fin-svg { width: 30px; height: 30px; }
.nut-mrow.is-colored.is-protein .nut-mrow-ico, .nut-trio-cell.is-protein .nut-trio-ico { color: var(--green-bright); }
.nut-mrow.is-colored.is-fat .nut-mrow-ico, .nut-trio-cell.is-fat .nut-trio-ico { color: var(--fin-amber-ink); }
.nut-mrow.is-colored.is-carbs .nut-mrow-ico, .nut-trio-cell.is-carbs .nut-trio-ico { color: var(--accent); }
.nut-mrow-fld { margin: 0; min-height: 48px; background: var(--surface); }
.nut-kcalfld { padding-right: 0; }
.nut-kcalfld .fin-fld-suf { padding-left: 0; border-left: 0; }
.nut-refresh { display: grid; place-items: center; flex: none; align-self: stretch; width: 54px; padding: 0; border: 0; border-left: 1.5px solid var(--fin-line); background: none; color: var(--green); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nut-refresh .fin-svg { width: 24px; height: 24px; }
.nut-refresh:focus-visible { outline: 3px solid var(--green-bright); outline-offset: -3px; border-radius: 0 12px 12px 0; }
.nut-upload { margin-top: 18px; }
.nut-upload-now { display: flex; align-items: center; gap: 14px; margin: 10px 0 12px; }
.nut-upload-remove { display: inline-flex; align-items: center; gap: 9px; color: var(--berry); font-size: calc(14.5px * var(--fs, 1)); font-weight: 700; }
/* Запись дневника (референс 5): приём пищи и день, крупные калории на вес, Б/Ж/У тремя столбцами. Цели (референс 6): с какого дня и итог. */
.nut-when { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 11px 16px; border-radius: 999px; background: color-mix(in srgb, var(--tint) 75%, var(--surface)); color: var(--green); font-size: calc(16px * var(--fs, 1)); font-weight: 800; }
.nut-when i { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--green-bright); }
.nut-when-ico { display: grid; place-items: center; flex: none; width: 22px; height: 22px; }
.nut-when-ico .ui-icon { width: 22px; height: 22px; }
.nut-big { margin-top: 12px; padding: 14px 16px 16px; border: 1.5px solid var(--green); border-radius: 22px; background: var(--surface); text-align: center; }
.nut-big-cap { display: block; color: var(--muted); font-size: calc(15px * var(--fs, 1)); font-weight: 700; }
.nut-big strong { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 2px; color: var(--green); font-size: calc(clamp(44px, 14vw, 58px) * var(--fs, 1)); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.nut-big strong small { font-size: calc(clamp(22px, 6.6vw, 28px) * var(--fs, 1)); letter-spacing: 0; }
.nut-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; padding: 12px 4px; border: 1px solid var(--fin-line); border-radius: 18px; background: color-mix(in srgb, var(--tint) 60%, var(--surface)); }
.nut-trio-cell { display: grid; justify-items: center; gap: 2px; padding: 0 4px; }
.nut-trio-cell + .nut-trio-cell { border-left: 1px solid var(--fin-line-strong); }
.nut-trio-ico { display: grid; place-items: center; width: 34px; height: 34px; }
.nut-trio-ico .fin-svg { width: 30px; height: 30px; }
.nut-trio-l { margin-top: 4px; color: var(--ink); font-size: calc(16px * var(--fs, 1)); font-weight: 700; }
.nut-trio-cell b { color: var(--ink); font-size: calc(20px * var(--fs, 1)); font-weight: 800; font-variant-numeric: tabular-nums; }
.nut-goalsum { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--fin-line); border-radius: 18px; background: color-mix(in srgb, var(--tint) 75%, var(--surface)); }
.nut-goalsum-ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; color: var(--green); }
.nut-goalsum-ico .fin-svg { width: 30px; height: 30px; }
.nut-goalsum strong { display: flex; align-items: baseline; gap: 6px; color: var(--green); font-size: calc(clamp(26px, 8vw, 32px) * var(--fs, 1)); font-weight: 800; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nut-goalsum strong small { font-size: .55em; letter-spacing: 0; }
.nut-goalsum-m { min-width: 0; margin-left: auto; padding-left: 12px; border-left: 1px solid var(--fin-line-strong); color: var(--muted); font-size: calc(14px * var(--fs, 1)); font-weight: 600; text-align: right; }
/* ===== 0.30.0: события и дела — вкладки с подчёркиванием, строки со свайпом, лист дня, «Дела» на главной ===== */
:root { --blue: #6fa5d6; --blue-tint: #e8f1fa; --u-lead: .2s; --u-trail: .44s; --u-delay: .05s; --u-ease: cubic-bezier(.3, .7, .2, 1); --u-strike: 100% 1.5px; --u-done-op: 1; }
html[data-anim="2"] { --u-lead: .5s; --u-trail: .5s; --u-delay: 0s; --u-ease: cubic-bezier(.34, 1.56, .64, 1); }
html[data-done="2"] { --u-strike: 0% 1.5px; --u-done-op: .5; }
.gl { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.u-enter { animation: u-slide .32s ease; }
@keyframes u-slide { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* вкладки: тонкая линия под выбранной, левый и правый край едут по отдельности (ui.js ставит --il и --ir) */
.u-tabs { position: relative; flex-shrink: 0; display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--home-rule, #ded7c9); }
.u-tabs::-webkit-scrollbar { display: none; }
.u-tabs::after { content: ""; position: absolute; left: var(--il, 0px); right: var(--ir, 100%); bottom: 0; height: 2.5px; border-radius: 2px 2px 0 0; background: var(--green); pointer-events: none; }
.u-tabs.is-ready::after, .u-tabs.is-ready[data-dir="r"]::after { transition: right var(--u-lead) var(--u-ease), left var(--u-trail) var(--u-ease) var(--u-delay); }
.u-tabs.is-ready[data-dir="l"]::after { transition: left var(--u-lead) var(--u-ease), right var(--u-trail) var(--u-ease) var(--u-delay); }
.u-tab { position: relative; z-index: 1; flex: none; min-height: 44px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: calc(15px * var(--fs, 1)); font-weight: 800; white-space: nowrap; cursor: pointer; transition: color .25s, transform .15s; -webkit-tap-highlight-color: transparent; }
.u-tab[aria-selected="true"] { color: var(--green); }
.u-tab:active { transform: scale(.96); }
.u-tab:focus-visible { outline: 3px solid var(--green-bright); outline-offset: -3px; border-radius: 6px; }
.u-tab em { margin-left: 6px; font-size: calc(12px * var(--fs, 1)); font-style: normal; opacity: .75; }
.u-fill .u-tab { flex: 1; }

/* галочка: круг с пружинкой и мягким свечением */
.task-check[aria-pressed="true"]::before { box-shadow: 0 0 0 4px var(--tint); }
.task-check.is-pop[aria-pressed="true"]::before { animation: u-pop .36s; }
@keyframes u-pop { 0% { transform: scale(.82); } 55% { transform: scale(1.16); } 100% { transform: scale(1); } }
/* выполненное: линия прорисовывается по названию (настройка «Росчерк») или строка гаснет («Растворение») */
.ttl { background: linear-gradient(currentColor, currentColor) no-repeat 0 58% / 0 1.5px; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size .4s ease .08s, color .3s; }
.is-done .ttl { background-size: var(--u-strike); color: var(--muted); }
.tl-body, .hp-title { transition: opacity .3s; }
.is-done .tl-body, .is-done .hp-title { opacity: var(--u-done-op); }

/* строки со свайпом: значки справа проявляются по мере движения */
.sw { --p: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; transition: height .34s ease .1s, opacity .26s ease; }
.sw::-webkit-scrollbar { display: none; }
.sw-main { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; cursor: pointer; -webkit-user-select: none; user-select: none; transition: transform .3s ease; }
.sw-act { flex: none; display: flex; scroll-snap-align: end; }
.sw-btn { display: grid; place-items: center; width: 54px; border: 0; background: none; color: var(--green); text-decoration: none; opacity: var(--p); transform: scale(calc(.5 + .5 * var(--p))); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sw-btn.is-skip { color: var(--slate); }
.sw-btn.is-del { color: var(--berry); }
.sw-btn .gl { width: 23px; height: 23px; stroke-width: 1.6; }
.sw-btn.is-tap .gl { animation: u-bump .45s ease; }
@keyframes u-bump { 0% { transform: scale(1); } 35% { transform: scale(1.5) rotate(-10deg); } 100% { transform: scale(1); } }
.sw.is-flash .sw-main { animation: u-flash .85s ease; }
@keyframes u-flash { 0%, 30% { background: var(--tint); } 100% { background: transparent; } }
.sw.is-out { height: 0 !important; opacity: 0; overflow: hidden; }
.sw.is-out .sw-main { transform: translateX(-26px); }

/* линия времени: кружки на вертикальной линии, у дел вместо кружка галочка */
.tl-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 11px 6px 11px 54px; }
.tl-row::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: var(--home-rule, #ded7c9); }
.tl-row.is-first::before { top: 50%; }
.tl-row.is-last::before { bottom: 50%; }
.tl-row.is-first.is-last::before { display: none; }
.tl-dot { position: absolute; left: 15px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--green-bright); }
.tl-dot.is-private { background: var(--accent); }
.tl-row .task-toggle { position: absolute; left: 0; top: 50%; margin-top: -22px; }
.tl-body { display: grid; flex: 1; gap: 1px; min-width: 0; }
.tl-title { margin: 0; font-size: calc(17px * var(--fs, 1)); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.tl-who { display: inline-flex; align-items: center; gap: 4px; }
.tl-who .gl { width: 14px; height: 14px; }
.tl-time { color: var(--green); font-weight: 800; font-variant-numeric: tabular-nums; }
.cal-dayhead { display: flex; align-items: center; gap: 12px; margin: 0; padding: 20px 2px 8px; }
.cal-group:first-child .cal-dayhead { padding-top: 6px; }
.cal-dn { min-width: 40px; font-size: calc(32px * var(--fs, 1)); font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.cal-dw { display: grid; line-height: 1.2; }
.cal-dw b { font-size: calc(15px * var(--fs, 1)); }
.cal-dw small { color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.cal-rel { margin-left: auto; color: var(--berry); font-size: calc(12px * var(--fs, 1)); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cal-rel.is-today { color: var(--green); }
.cal-group.is-empty { display: none; }

/* страница календаря */
.cal-page [hidden] { display: none !important; }
.cal-top { display: grid; gap: 2px; margin: 12px 0 10px; }
.cal-modes { display: flex; justify-content: flex-end; gap: 2px; }
.cal-mode { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: calc(14px * var(--fs, 1)); font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.cal-mode[aria-pressed="true"] { background: var(--tint); color: var(--green); }
.cal-mode .gl { width: 18px; height: 18px; }
.cal-per { margin: 0 0 6px; }
.cal-hint { margin: 10px 4px 0; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.cal-dot.is-task { border-radius: 50%; background: var(--blue); }
.cal-page[data-tab="ev"] .cal-dot.is-task, .cal-page[data-tab="tk"] .cal-dot:not(.is-task) { display: none; }
.cal-page[data-tab="ev"] .cal-legend .for-tk, .cal-page[data-tab="tk"] .cal-legend .for-ev { display: none; }
.cal-page .cal-empty { margin: 18px 2px; }

/* лист дня: выезжает снизу, внутри добавление и правка */
.day-sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 560px; max-height: 90dvh; margin: 0 auto; padding: 8px 18px max(22px, env(safe-area-inset-bottom)); border: 0; border-radius: 26px 26px 0 0; background: var(--surface); color: var(--ink); box-shadow: 0 -14px 34px rgba(60, 40, 10, .22); overflow-y: auto; overscroll-behavior: contain; }
.day-sheet[open] { animation: u-sheet-up .4s cubic-bezier(.2, .8, .2, 1); }
.day-sheet.is-closing { animation: u-sheet-down .26s ease forwards; }
.day-sheet::backdrop { background: rgba(29, 33, 34, .38); animation: u-fade .3s ease; }
.day-sheet.is-closing::backdrop { animation: u-fade .26s ease reverse forwards; }
@keyframes u-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes u-sheet-down { to { transform: translateY(100%); } }
@keyframes u-fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-grab { width: 42px; height: 5px; margin: 0 auto 10px; border-radius: 3px; background: var(--border); }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; font-size: calc(20px * var(--fs, 1)); line-height: 1.25; }
.sheet-x { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--warm); color: var(--muted); font: inherit; font-size: calc(24px * var(--fs, 1)); line-height: 1; cursor: pointer; }
.sheet-step { display: flex; flex-direction: column; gap: 12px; animation: u-slide .28s ease; }
.sheet-none { margin: 4px 0; color: var(--muted); }
.sheet-hint { margin: 0; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.sheet-label { margin: 6px 0 0; color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.sheet-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-card { display: grid; justify-items: start; gap: 3px; padding: 14px; border: 0; border-radius: 14px; background: var(--warm); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background .2s, transform .15s; }
.sheet-card:active { background: var(--tint); transform: scale(.98); }
.sheet-card .gl { width: 26px; height: 26px; margin-bottom: 4px; color: var(--green); }
.sheet-card strong { font-size: calc(17px * var(--fs, 1)); }
.sheet-card small { color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.sheet-back { display: inline-flex; align-items: center; justify-self: start; gap: 4px; padding: 0; border: 0; background: none; color: var(--green); font: inherit; font-size: calc(16px * var(--fs, 1)); font-weight: 800; cursor: pointer; }
.sheet-back .gl { width: 20px; height: 20px; }
.sheet-form { margin: 0; }
.sheet-field { display: grid; gap: 4px; margin-top: 14px; }
.sheet-del { display: inline-flex; align-items: center; justify-self: start; gap: 8px; margin-top: 4px; padding: 8px 0; border: 0; background: none; color: var(--berry); font: inherit; font-size: calc(15px * var(--fs, 1)); font-weight: 800; cursor: pointer; }
.sheet-del .gl { width: 20px; height: 20px; }
.tl-list { margin: 0; }
.u-confirm .u-confirm-hint { font-size: calc(13px * var(--fs, 1)); }
.u-toast { position: fixed; left: 12px; right: 12px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 520px; margin: 0 auto; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: calc(15px * var(--fs, 1)); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s; }
.u-toast.is-on { opacity: 1; transform: none; pointer-events: auto; }
.u-toast button { padding: 6px 4px; border: 0; background: none; color: #9be0b8; font: inherit; font-weight: 800; cursor: pointer; }

/* главная: «Дела» по дням, от пяти строк, без дневника */
.home-plan.hb { --ck: 6.8cqw; }
.home-plan .hp-tabs { padding: 0 3.4cqw; }
.home-plan .u-tabs { box-shadow: inset 0 -1px 0 var(--home-rule); }
.home-plan .u-tab { min-height: 12cqw; padding: 0 2cqw; font-size: calc(4.5cqw * var(--fs, 1)); }
.home-plan .u-tab em { font-size: calc(3.4cqw * var(--fs, 1)); }
.hp-list { margin: 0; padding: 0 3.4cqw; list-style: none; }
.hp-item + .hp-item { border-top: 1px solid var(--home-rule); }
.hp-row { display: flex; align-items: center; gap: .6cqw; min-height: 13.4cqw; }
.hp-row .task-toggle { flex: none; margin: 0 0 0 -2.2cqw; }
.home-plan .hp-row .task-check { width: 12cqw; height: 12cqw; }
.hp-title { flex: 1; min-width: 0; margin: 0; overflow: hidden; font-size: calc(4.7cqw * var(--fs, 1)); font-weight: 700; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.hp-meta { display: inline-flex; align-items: center; gap: 1.2cqw; margin-right: 1cqw; color: var(--slate); font-size: calc(3.9cqw * var(--fs, 1)); font-variant-numeric: tabular-nums; }
.hp-meta .gl { width: 4cqw; height: 4cqw; }
.hp-item .sw-btn { width: 11cqw; }
.hp-item .sw-btn .gl { width: 5.8cqw; height: 5.8cqw; }
.hp-empty { padding: 4cqw 5cqw 2cqw; color: var(--muted); font-size: calc(4.4cqw * var(--fs, 1)); }
.hp-empty p { margin: 0; }
.hp-go { margin-top: 2cqw; padding: 0; border: 0; background: none; color: var(--home-green); font: inherit; font-size: calc(4.6cqw * var(--fs, 1)); font-weight: 800; cursor: pointer; }
.hp-go::after { content: " ›"; }
.hp-foot { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; padding: 1cqw 5cqw 2.4cqw; }
.hp-foot a { display: inline-flex; align-items: center; gap: 1.6cqw; min-height: 11cqw; color: var(--home-green); font-size: calc(4.7cqw * var(--fs, 1)); font-weight: 800; text-decoration: none; }
.hp-foot .gl { width: 4.6cqw; height: 4.6cqw; }
.home-plan .home-more { margin: 0 5cqw 1cqw; }
.home-plan [hidden] { display: none !important; }
/* «Весь календарь» поменьше: рядом с картинкой в правом нижнем углу */
.home-event .home-link { min-width: 40cqw; height: 10.6cqw; margin-top: 3cqw; padding: 0 4.4cqw 0 4.6cqw; font-size: calc(4.1cqw * var(--fs, 1)); }
.home-event .home-link .ui-icon { width: 3.4cqw; height: 3.4cqw; }

/* профиль: настройки вида */
.profile-note { margin: 0 0 10px; color: var(--muted); font-size: calc(14px * var(--fs, 1)); }
.profile-label { margin: 14px 0 6px; color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.u-prefs { margin: 0; }
.u-demo-row { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 8px 0; border: 0; background: none; color: inherit; font: inherit; font-size: calc(17px * var(--fs, 1)); font-weight: 700; text-align: left; cursor: pointer; }
.u-demo-ck { flex: none; width: 26px; height: 26px; border: 2px solid var(--check-off); border-radius: 50%; background: var(--surface) center / 100% no-repeat; transition: background-color .14s ease, border-color .14s ease, box-shadow .2s; }
.u-demo-row.is-done .u-demo-ck { border-color: var(--green); background-color: var(--green); background-image: var(--check-img); box-shadow: 0 0 0 4px var(--tint); animation: u-pop .36s; }

/* «План»: без дневника и без зелёной кнопки с листочками */
.notebook-wrap { max-width: none; margin: 14px 0 22px; }
.notebook { --nbl: 12px; border: 1.5px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.notebook-top, .notebook-body, .notebook-bottom { aspect-ratio: auto; margin: 0; background-image: none; }
.notebook-top { padding: 16px 18px 6px; }
.notebook-body { min-height: 0; padding: 0 18px 8px; }
.notebook-bottom { display: none; }
.notebook .task-list > li:last-child:nth-child(odd) { margin-bottom: 0; }
.leaf-button { --lb-h: 46px; display: inline-flex; width: auto; margin: 12px 0; padding: 0 20px 0 14px; border: 1.5px solid var(--green); border-image: none; border-radius: 12px; background: var(--tint); box-shadow: none; filter: none; color: var(--green); font-size: calc(16px * var(--fs, 1)); text-shadow: none; }
.leaf-button:active { transform: scale(.98); filter: none; background: color-mix(in srgb, var(--green-bright) 20%, var(--tint)); }
.leaf-button-plus { width: 22px; height: 22px; border: 0; background: linear-gradient(var(--green), var(--green)) center / 52% 10% no-repeat, linear-gradient(var(--green), var(--green)) center / 10% 52% no-repeat; box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  .u-tabs::after, .day-sheet, .day-sheet::backdrop, .sw, .sw-main, .u-toast { transition: none !important; animation: none !important; }
  .u-enter, .sheet-step, .sw-btn.is-tap .gl, .sw.is-flash .sw-main, .task-check.is-pop::before, .u-demo-row.is-done .u-demo-ck { animation: none !important; }
}
/* 0.30.1: календарь как на макете (плоский кремовый фон), зелёная надпись-путь; удаление дела на «Плане» */
.cal-page > .eyebrow { display: block; margin: 16px 0 0; font-size: calc(13px * var(--fs, 1)); line-height: 1.2; }
.task-trash-form { flex: none; margin: 0 -8px 0 0; }
.task-trash-btn { display: flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 4px; border: 0; border-radius: 10px; background: none; color: #926b65; cursor: pointer; }
.task-trash-btn:hover, .task-trash-btn:active { color: #a5463a; }
.task-trash-btn svg { width: 24px; height: 24px; }

/* ===== 0.31.0: размер и вид шрифта (личные настройки профиля: html[data-fs] = процент, html[data-font] = гарнитура) ===== */
html[data-fs="80"] { --fs: 0.8; }
html[data-fs="81"] { --fs: 0.81; }
html[data-fs="82"] { --fs: 0.82; }
html[data-fs="83"] { --fs: 0.83; }
html[data-fs="84"] { --fs: 0.84; }
html[data-fs="85"] { --fs: 0.85; }
html[data-fs="86"] { --fs: 0.86; }
html[data-fs="87"] { --fs: 0.87; }
html[data-fs="88"] { --fs: 0.88; }
html[data-fs="89"] { --fs: 0.89; }
html[data-fs="90"] { --fs: 0.9; }
html[data-fs="91"] { --fs: 0.91; }
html[data-fs="92"] { --fs: 0.92; }
html[data-fs="93"] { --fs: 0.93; }
html[data-fs="94"] { --fs: 0.94; }
html[data-fs="95"] { --fs: 0.95; }
html[data-fs="96"] { --fs: 0.96; }
html[data-fs="97"] { --fs: 0.97; }
html[data-fs="98"] { --fs: 0.98; }
html[data-fs="99"] { --fs: 0.99; }
html[data-fs="101"] { --fs: 1.01; }
html[data-fs="102"] { --fs: 1.02; }
html[data-fs="103"] { --fs: 1.03; }
html[data-fs="104"] { --fs: 1.04; }
html[data-fs="105"] { --fs: 1.05; }
html[data-fs="106"] { --fs: 1.06; }
html[data-fs="107"] { --fs: 1.07; }
html[data-fs="108"] { --fs: 1.08; }
html[data-fs="109"] { --fs: 1.09; }
html[data-fs="110"] { --fs: 1.1; }
html[data-fs="111"] { --fs: 1.11; }
html[data-fs="112"] { --fs: 1.12; }
html[data-fs="113"] { --fs: 1.13; }
html[data-fs="114"] { --fs: 1.14; }
html[data-fs="115"] { --fs: 1.15; }
html[data-fs="116"] { --fs: 1.16; }
html[data-fs="117"] { --fs: 1.17; }
html[data-fs="118"] { --fs: 1.18; }
html[data-fs="119"] { --fs: 1.19; }
html[data-fs="120"] { --fs: 1.2; }
html:is([data-fs^="8"], [data-fs^="9"]) :is(input, select, textarea) { font-size: 16px !important; }   /* на телефоне поля меньше 16 px приближают страницу при вводе */
html[data-font="2"] { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
html[data-font="3"] { font-family: Verdana, "DejaVu Sans", Geneva, Tahoma, sans-serif; }
html[data-font="4"] { font-family: Georgia, "Times New Roman", "Noto Serif", serif; }
html:is([data-font="2"], [data-font="3"], [data-font="4"]) :is(button, input, select, textarea) { font-family: inherit; }
.font-form { display: grid; gap: 4px; }
.font-scale { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px 52px; align-items: center; gap: 6px; }
.font-scale button { display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--green); font: inherit; font-size: 22px; font-weight: 800; cursor: pointer; }
.font-scale input[type="range"] { width: 100%; accent-color: var(--green); }
.font-scale output { color: var(--green); font-size: 15px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.font-list { display: grid; gap: 8px; }
.font-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; }
.font-opt:has(input:checked) { border-color: var(--green); background: var(--tint); }
.font-opt input { flex: none; accent-color: var(--green); }
.font-opt span { font-size: 17px; }
.font-opt .f-2 { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.font-opt .f-3 { font-family: Verdana, "DejaVu Sans", Geneva, Tahoma, sans-serif; }
.font-opt .f-4 { font-family: Georgia, "Times New Roman", "Noto Serif", serif; }
/* ===== 0.31.0: поручения, плитки главной, уведомления, строка питания ===== */
:root { --violet: #9a8bd6; --violet-tint: #f0edfb; --p1: #a1283f; --p2: #f89a32; --p3: #269c5a; --p4: #6fa5d6; --p5: #9aa5b1; }

/* поручения */
.asg-page [hidden] { display: none !important; }
.asg-page .u-tabs { margin: 4px 0 8px; }
.asg-list { display: grid; gap: 0; }
.asg-list .sw { border-bottom: 1px solid var(--home-rule, #ded7c9); }
.asg-main { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 10px 4px; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.asg-pr { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--p3); color: #fff; font-size: calc(15px * var(--fs, 1)); font-weight: 800; }
.asg-pr.is-p1, .asg-chip.is-p1 span { background: var(--p1); }
.asg-pr.is-p2, .asg-chip.is-p2 span { background: var(--p2); }
.asg-pr.is-p3, .asg-chip.is-p3 span { background: var(--p3); }
.asg-pr.is-p4, .asg-chip.is-p4 span { background: var(--p4); }
.asg-pr.is-p5, .asg-chip.is-p5 span { background: var(--p5); }
.asg-body { display: grid; flex: 1; gap: 2px; min-width: 0; }
.asg-title { font-size: calc(17px * var(--fs, 1)); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.asg-meta { display: flex; flex-wrap: wrap; gap: 0 8px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.asg-meta .is-late, .asg-facts .is-late { color: var(--berry); font-weight: 700; }
.asg-st { flex: none; padding: 3px 9px; border-radius: 8px; background: var(--tint); color: var(--green); font-size: calc(12px * var(--fs, 1)); font-weight: 800; letter-spacing: .02em; }
.asg-st.is-new { background: var(--violet-tint); color: #6b5cb3; }
.asg-st.is-doing { background: var(--blue-tint); color: #3d78ae; }
.asg-st.is-done { background: var(--tint); color: var(--green); }
.asg-done { margin-top: 14px; }
.asg-done > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-weight: 800; cursor: pointer; }
.asg-done > summary span { padding: 1px 8px; border-radius: 999px; background: var(--tint); color: var(--green); font-size: calc(13px * var(--fs, 1)); }
.asg-done .asg-title { color: var(--muted); }
.asg-fieldset { margin: 16px 0 0; padding: 0; border: 0; }
.asg-fieldset legend { padding: 0; margin-bottom: 6px; font-weight: 700; }
.asg-chips { display: flex; gap: 8px; }
.asg-chip { position: relative; cursor: pointer; }
.asg-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.asg-chip span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; color: #fff; font-size: calc(18px * var(--fs, 1)); font-weight: 800; opacity: .45; transition: opacity .2s, transform .2s, box-shadow .2s; }
.asg-chip input:checked + span { opacity: 1; transform: scale(1.08); box-shadow: 0 4px 12px rgba(40, 30, 10, .22); }
.asg-chip input:focus-visible + span { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.asg-kinds { display: flex; gap: 8px; }
.asg-kind { flex: 1; position: relative; cursor: pointer; }
.asg-kind input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.asg-kind span { display: grid; place-items: center; min-height: 44px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); font-weight: 700; transition: background .2s, border-color .2s, color .2s; }
.asg-kind input:checked + span { border-color: var(--green); background: var(--tint); color: var(--green); }
.asg-kind input:focus-visible + span { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.asg-detail-head { display: flex; align-items: center; gap: 12px; }
.asg-detail-head h2 { margin: 0; min-width: 0; font-size: calc(21px * var(--fs, 1)); overflow-wrap: anywhere; }
.asg-chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.asg-tag { padding: 3px 9px; border-radius: 8px; background: var(--warm); color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 700; }
.asg-details { margin: 14px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.asg-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 0; }
.asg-facts dt { color: var(--muted); }
.asg-facts dd { margin: 0; font-weight: 700; }
.asg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.asg-actions form { margin: 0; }
.asg-del { background: var(--berry) !important; border-color: var(--berry) !important; color: #fff !important; }

/* календарь: третья вкладка «Поручения» */
.cal-dot.is-as { border-radius: 3px; background: var(--violet); }
.cal-page[data-tab="as"] .cal-dot:not(.is-as) { display: none; }
.cal-page[data-tab="ev"] .cal-dot.is-as, .cal-page[data-tab="tk"] .cal-dot.is-as { display: none; }
.cal-page[data-tab="as"] .cal-legend .for-ev, .cal-page[data-tab="as"] .cal-legend .for-tk { display: none; }
.cal-page .cal-legend .for-as { display: none; }
.cal-page[data-tab="as"] .cal-legend .for-as { display: inline-flex; }
.tl-row.is-link { color: inherit; text-decoration: none; }
a.tl-row { display: flex; }
.tl-dot.is-p1 { background: var(--p1); }
.tl-dot.is-p2 { background: var(--p2); }
.tl-dot.is-p3 { background: var(--p3); }
.tl-dot.is-p4 { background: var(--p4); }
.tl-dot.is-p5 { background: var(--p5); }
.sheet-choice.is-three { grid-template-columns: 1fr 1fr 1fr; }
.sheet-choice.is-three .sheet-card { padding: 12px 10px; }
.sheet-choice.is-three .sheet-card small { display: none; }

/* плитки главной: страница настройки */
.tiles-page [hidden] { display: none !important; }
.tiles-note { margin: 0 0 12px; color: var(--muted); }
.tile-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tile-item { border: 1.5px solid var(--border); border-radius: 18px; background: var(--surface); overflow: hidden; }
.tile-item.is-off { opacity: .72; }
.tile-head { display: grid; grid-template-columns: 26px 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; }
.tile-head img { width: 52px; height: 52px; object-fit: contain; }
.tile-head strong { display: block; font-size: calc(17px * var(--fs, 1)); line-height: 1.2; }
.tile-head small { color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.tile-move { display: flex; gap: 4px; }
.tile-move button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--warm); color: var(--green); font: inherit; font-size: calc(18px * var(--fs, 1)); font-weight: 800; cursor: pointer; }
.tile-move button:disabled { opacity: .3; cursor: default; }
.tile-more > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 14px; border-top: 1px solid var(--home-rule, #ded7c9); color: var(--green); font-weight: 800; cursor: pointer; list-style: none; }
.tile-more > summary::-webkit-details-marker { display: none; }
.tile-more > summary::after { content: "›"; font-size: calc(22px * var(--fs, 1)); transition: transform .2s; }
.tile-more[open] > summary::after { transform: rotate(90deg); }
.tile-edit { display: grid; gap: 4px; padding: 4px 14px 16px; }
.tile-icons { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 4px 0 8px; }
.tile-ico { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: var(--warm); cursor: pointer; }
.tile-ico input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tile-ico img { width: 70%; height: 70%; object-fit: contain; }
.tile-ico:has(input:checked) { box-shadow: inset 0 0 0 2px var(--green); background: var(--tint); }
.tile-ico.is-std { font-size: calc(12px * var(--fs, 1)); font-weight: 800; color: var(--muted); text-align: center; line-height: 1.1; }
.tile-ico input:focus-visible + img, .tile-ico input:focus-visible + span { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.tile-file { display: grid; gap: 4px; margin-top: 4px; }
.tile-file small { color: var(--muted); }
.tiles-actions { position: sticky; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding: 12px; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.tiles-reset { margin: 10px 0 0; }

/* профиль: уведомления и ссылка на плитки */
.push-box { display: grid; gap: 10px; }
.push-status { margin: 0; color: var(--muted); font-size: calc(14px * var(--fs, 1)); }
.push-status.is-on { color: var(--green); font-weight: 700; }
.push-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-link { display: flex; align-items: center; justify-content: space-between; min-height: 48px; color: var(--green); font-weight: 800; text-decoration: none; }

/* главная: пустая быстрая панель */
.quick-empty { margin: 12px 18px; color: var(--muted); }
/* ширина полосы шагами по 5% (инлайн-стили запрещены политикой страниц) */
.asg-link { display: flex; align-items: center; gap: 12px; padding: 16px 18px; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.asg-link-text { display: grid; flex: 1; min-width: 0; gap: 2px; }
.asg-link-text strong { font-size: calc(19px * var(--fs, 1)); }
.asg-link-text small { color: var(--muted); font-size: calc(14px * var(--fs, 1)); }
.asg-link .ui-icon { width: 22px; height: 22px; color: var(--green); }
.nut-shopform { margin: 0; display: contents; }
.nut-shopform .fin-btn .ui-icon { width: 20px; height: 20px; }
.asg-page > .eyebrow, .tiles-page > .eyebrow, .ntf-page > .eyebrow { display: block; margin: 16px 0 0; font-size: calc(13px * var(--fs, 1)); line-height: 1.2; }

/* ===== 0.32.0: питание — вкладки-подчёркивание, неделя, приёмы с значками-сворачивалками, избранное, плитки рецептов, карточка, режим готовки, импорт ===== */
.nut-tabrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin: -4px 0 12px; border-bottom: 1px solid var(--fin-line, var(--border)); }
.nut-tabrow .u-tabs { min-width: 0; margin-bottom: -1px; box-shadow: none; }
.nut-tabs .u-tab, .nut-filter .u-tab { display: inline-flex; align-items: center; text-decoration: none; padding: 0 10px; }
.nut-tabs .u-tab:first-child, .nut-filter .u-tab:first-child { padding-left: 2px; }
.nut-kind { display: inline-flex; flex: none; align-items: center; gap: 5px; padding-bottom: 12px; color: var(--muted); font-size: calc(12.5px * var(--fs, 1)); font-weight: 800; white-space: nowrap; }
.nut-kind .ui-icon { width: 17px; height: 17px; }
.nut-filter { margin: 0 0 6px; }
.nut-filter .u-tab { min-height: 40px; padding: 0 9px; font-size: calc(14px * var(--fs, 1)); font-weight: 700; }
.nut-filter .u-tab .fin-svg { width: 19px; height: 19px; }
.nut-body { transition: opacity .2s; }
.nut-body.is-loading { opacity: .55; }
.nut-mealtabs { margin-top: 8px; }
.nut-mealtabs .u-tab { flex: 1; padding: 0 4px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.nut-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 0 0 4px; }
.nut-wd { display: grid; justify-items: center; gap: 3px; padding: 2px 0 6px; border-bottom: 2.5px solid transparent; color: var(--muted); text-decoration: none; transition: border-color .25s; -webkit-tap-highlight-color: transparent; }
.nut-wd-name { font-size: calc(12px * var(--fs, 1)); font-weight: 700; }
.nut-wd svg { width: 36px; height: 36px; }
.nut-wd-t { fill: none; stroke: var(--fin-empty); stroke-width: 3.5; }
.nut-wd-a { fill: none; stroke: var(--green); stroke-width: 3.5; stroke-linecap: round; }
.nut-wd.is-over .nut-wd-a { stroke: var(--berry); }
.nut-wd text { fill: var(--ink); font-size: 12px; font-weight: 800; text-anchor: middle; }
.nut-wd.is-on { border-color: var(--green); color: var(--green); }
.nut-wd.is-today .nut-wd-name { color: var(--green); }
.nut-wd:active svg { transform: scale(.92); }
.nut-wd:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; border-radius: 8px; }
.nut-kc { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 12px; }
.nut-kc-n b { font-size: calc(34px * var(--fs, 1)); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.nut-kc-n small { color: var(--muted); font-size: calc(14px * var(--fs, 1)); }
.nut-kc-left { color: var(--green); font-size: calc(15px * var(--fs, 1)); font-weight: 800; }
.nut-kc-n b.is-over, .nut-kc-left.is-over { color: var(--berry); }
.nut-kbar { height: 10px; margin: 9px 0 14px; }
.nut-kbar i { background: var(--green); }
.nut-kbar.is-over i { background: var(--berry); }
.nut-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.nut-col { display: grid; gap: 2px; min-width: 0; }
.nut-col-n { color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.nut-col b { font-size: calc(14px * var(--fs, 1)); font-weight: 800; white-space: nowrap; }
.nut-col .fin-bar { margin-top: 5px; }
.nut-col.is-protein .fin-bar i { background: var(--green-bright); }
.nut-col.is-fat .fin-bar i { background: var(--fin-amber-ink); }
.nut-col.is-carbs .fin-bar i { background: var(--accent); }
.nut-col.is-over .fin-bar i { background: var(--berry); }
.nut-goals-line { display: flex; width: max-content; margin: 6px 0 0 auto; }
.nut-chain { position: relative; margin-top: 8px; }
.nut-chain::before { content: ""; position: absolute; left: 17px; top: 26px; bottom: 26px; width: 2px; background: var(--fin-line-strong, var(--border)); }
.nut-grp { position: relative; }
.nut-grp-head { display: flex; align-items: center; gap: 8px; min-height: 50px; }
.nut-ico { position: relative; z-index: 1; display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1.5px solid var(--fin-line-strong, var(--border)); border-radius: 50%; background: var(--surface); color: var(--green); cursor: pointer; transition: transform .15s; -webkit-tap-highlight-color: transparent; }
.nut-ico:active { transform: scale(.9); }
.nut-ico img { display: block; width: 22px; height: 22px; object-fit: contain; }
.nut-ico .fin-svg { width: 19px; height: 19px; }
.nut-ico.is-small { width: 28px; height: 28px; margin-left: 4px; cursor: default; }
.nut-ico.is-small .fin-svg { width: 15px; height: 15px; }
.nut-ico:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.nut-grp-name { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--green); font-size: calc(15px * var(--fs, 1)); font-weight: 800; letter-spacing: .07em; line-height: 1.2; text-transform: uppercase; }
.nut-grp-name small { display: block; margin-top: 2px; color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 600; letter-spacing: 0; text-transform: none; }
.nut-grp-kcal { font-size: calc(15px * var(--fs, 1)); font-weight: 800; white-space: nowrap; }
.nut-ibtn { display: grid; place-items: center; width: 34px; height: 36px; padding: 0; border: 0; background: none; color: var(--green); list-style: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nut-ibtn::-webkit-details-marker { display: none; }
.nut-ibtn .fin-svg { width: 22px; height: 22px; stroke-width: 2.1; }
.nut-ibtn:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 0; border-radius: 8px; }
.nut-plus-plain[open] .nut-ibtn .fin-svg { transform: rotate(45deg); }
.nut-ibtn .fin-svg { transition: transform .2s; }
.nut-repeat { display: contents; margin: 0; }
.nut-grp-body { display: grid; grid-template-rows: 1fr; margin-left: 46px; transition: grid-template-rows .3s ease, opacity .25s ease; }
.nut-grp-inner { min-height: 0; overflow: hidden; }
.nut-grp.is-folded .nut-grp-body { grid-template-rows: 0fr; opacity: 0; pointer-events: none; }
.nut-snack { margin-top: 6px; }
.nut-snack-head { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.nut-snack-head h4 { flex: 1; min-width: 0; margin: 0; color: var(--fin-amber-ink); font-size: calc(14px * var(--fs, 1)); font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.nut-bottom { display: flex; gap: 10px; margin-top: 14px; }
.nut-bottom > * { flex: 1 1 0; }
.nut-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border: 1px solid var(--fin-line-strong, var(--border)); border-radius: 14px; background: color-mix(in srgb, var(--warm) 80%, var(--surface)); color: var(--green); font: inherit; font-size: calc(15px * var(--fs, 1)); font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .15s, background .2s; -webkit-tap-highlight-color: transparent; }
.nut-btn:active { transform: scale(.97); }
.nut-btn .fin-svg { width: 20px; height: 20px; }
.nut-btn small { font-size: .9em; font-weight: 600; opacity: .85; }
.nut-btn.is-main { border-color: var(--green); background: var(--green); color: var(--surface); }
.nut-btn.is-wide { display: flex; width: 100%; }
.nut-btn.is-del { color: var(--berry); }
.nut-btn[disabled] { opacity: .45; cursor: default; }
.nut-btn:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.nut-foodwrap { position: relative; }
.nut-foodwrap .nut-food-name { padding-right: 32px; }
.nut-fav { position: absolute; top: 8px; right: 0; margin: 0; }
.nut-star { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--check-off, var(--muted)); cursor: pointer; transition: transform .2s, color .2s; -webkit-tap-highlight-color: transparent; }
.nut-star .fin-svg { width: 22px; height: 22px; }
.nut-star.is-on { color: var(--fin-amber-ink); }
.nut-star.is-on .fin-svg { fill: currentColor; }
.nut-star.is-pop { animation: nutPop .4s cubic-bezier(.34, 1.56, .64, 1); }
.nut-star:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 0; }
.nut-add { position: relative; flex: none; }
.nut-addplain { display: grid; place-items: center; flex: none; width: 40px; height: 46px; padding: 0; border: 0; background: none; color: var(--green); text-decoration: none; list-style: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nut-addplain::-webkit-details-marker { display: none; }
.nut-addplain .fin-svg { width: 28px; height: 28px; stroke-width: 2.2; transition: transform .2s; }
.nut-add[open] .nut-addplain .fin-svg { transform: rotate(45deg); }
.nut-addplain:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 0; border-radius: 10px; }
.nut-pop { position: absolute; z-index: 40; top: calc(100% + 4px); right: 0; min-width: 232px; overflow: hidden; border: 1px solid var(--fin-line-strong, var(--border)); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.nut-pop > * + * { border-top: 1px solid var(--fin-line, var(--border)); }
.nut-pop a, .nut-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 14px; border: 0; background: none; color: var(--ink); font: inherit; font-size: calc(15px * var(--fs, 1)); font-weight: 700; text-align: left; text-decoration: none; cursor: pointer; }
.nut-pop .fin-svg, .nut-pop .ui-icon { flex: none; width: 20px; height: 20px; color: var(--green); }
.nut-pop form { margin: 0; }
.nut-menu-item.is-del, .nut-menu-item.is-del .fin-svg { color: var(--berry); }
.nut-more { position: relative; }
.nut-more > summary { list-style: none; }
.nut-more > summary::-webkit-details-marker { display: none; }
.nut-round { display: grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0; border: 1.5px solid var(--fin-line-strong, var(--border)); border-radius: 50%; background: var(--surface); color: var(--green); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nut-round .fin-svg { width: 21px; height: 21px; }
.nut-round .fin-svg.is-x { transform: rotate(45deg); }
.nut-round:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.nut-rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.nut-rtile { position: relative; overflow: hidden; border: 1px solid var(--fin-line-strong, var(--border)); border-radius: 16px; background: var(--surface); }
.nut-rtile-link { display: grid; gap: 3px; padding-bottom: 11px; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.nut-rtile-link:active { background: color-mix(in srgb, var(--tint) 40%, var(--surface)); }
.nut-rtile-pic { display: block; }
.nut-thumb.is-tile { width: 100%; height: auto; aspect-ratio: 1; border-radius: 0; }
.nut-rtile-name, .nut-rtile-kcal, .nut-rtile small { padding: 0 10px; }
.nut-rtile-name { margin-top: 8px; font-size: calc(15px * var(--fs, 1)); line-height: 1.25; overflow-wrap: anywhere; }
.nut-rtile-kcal { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.nut-rtile-kcal b { color: var(--green); font-size: calc(14px * var(--fs, 1)); }
.nut-rtile small { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.nut-rtile .nut-fav { top: 6px; right: 6px; }
.nut-rtile .nut-star { background: color-mix(in srgb, var(--surface) 88%, transparent); width: 34px; height: 34px; }
.nut-recipecard { padding: 0; }
.nut-hero { position: relative; }
.nut-hero img, .nut-hero-ph { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px 20px 0 0; }
.nut-hero-ph { display: grid; place-items: center; background: var(--fin-empty); color: color-mix(in srgb, var(--muted) 70%, var(--surface)); }
.nut-hero-ph .fin-svg { width: 72px; height: 72px; }
.nut-hero .nut-round.is-back { position: absolute; top: 12px; left: 12px; }
.nut-hero-act { position: absolute; top: 12px; right: 12px; display: flex; align-items: flex-start; gap: 8px; }
.nut-hero-act .nut-fav { position: static; }
.nut-hero .nut-star, .nut-hero .nut-round { border: 1.5px solid var(--fin-line-strong, var(--border)); background: color-mix(in srgb, var(--surface) 92%, transparent); }
.nut-hero .nut-star { width: 38px; height: 38px; }
.nut-recipe-body { padding: 16px 16px 18px; }
.nut-kind-line { margin: 0 0 4px; color: var(--green); font-size: calc(13px * var(--fs, 1)); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.nut-recipe-title { margin: 0; font-size: calc(26px * var(--fs, 1)); line-height: 1.15; overflow-wrap: anywhere; }
.nut-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.nut-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 1px solid var(--fin-line-strong, var(--border)); border-radius: 10px; background: color-mix(in srgb, var(--warm) 80%, var(--surface)); font-size: calc(13px * var(--fs, 1)); font-weight: 700; }
.nut-chip .fin-svg { width: 16px; height: 16px; }
.nut-lead { margin: 12px 0 0; line-height: 1.5; }
.nut-n100 { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--fin-line); color: var(--muted); font-size: calc(14px * var(--fs, 1)); }
.nut-n100 b { color: var(--ink); }
.nut-n100-l { font-weight: 800; }
.nut-n100-l.is-protein { color: var(--green-bright); }
.nut-n100-l.is-fat { color: var(--fin-amber-ink); }
.nut-n100-l.is-carbs { color: var(--accent); }
.nut-h3 { margin: 22px 0 6px; font-size: calc(18px * var(--fs, 1)); }
.nut-ing { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 0; }
.nut-ing + .nut-ing { border-top: 1px solid var(--fin-line); }
.nut-ing-text { min-width: 0; }
.nut-ing-text b, .nut-ing-amount b { display: block; font-weight: 800; }
.nut-ing-text small, .nut-ing-amount small { display: block; color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.nut-ing-amount { text-align: right; white-space: nowrap; }
.nut-how { margin: 0; line-height: 1.55; }
.nut-recipe-body .nut-btn.is-wide { margin-top: 22px; }
.nut-cookcard { padding-bottom: 16px; }
.nut-cook-top { display: flex; align-items: center; gap: 10px; }
.nut-cook-top h2 { flex: 1; min-width: 0; margin: 0; font-size: calc(16px * var(--fs, 1)); line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.nut-cook-pos { flex: none; min-width: 44px; color: var(--muted); font-size: calc(14px * var(--fs, 1)); font-weight: 800; text-align: right; }
.nut-cook-bar { display: flex; gap: 5px; margin: 12px 0 14px; }
.nut-cook-bar i { flex: 1; height: 5px; border-radius: 99px; background: var(--fin-empty); transition: background .3s; }
.nut-cook-bar i.is-done { background: var(--green); }
.nut-cook-bar i.is-cur { background: var(--green-bright); }
.nut-cook-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.nut-step { min-width: 0; border: 1.5px solid transparent; border-radius: 16px; transition: background .3s, border-color .3s, opacity .3s; }
.nut-step-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nut-step-mark { position: relative; display: grid; place-items: center; flex: none; width: 28px; height: 28px; border: 1.5px solid var(--fin-line-strong, var(--border)); border-radius: 50%; color: var(--muted); font-size: calc(13px * var(--fs, 1)); font-weight: 800; transition: background .3s, border-color .3s, color .3s, transform .3s; }
.nut-step-mark .fin-svg { position: absolute; width: 15px; height: 15px; stroke-width: 2.6; opacity: 0; transition: opacity .2s; }
.nut-step-line { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.nut-step-tag { flex: none; color: var(--fin-amber-ink); font-size: calc(12px * var(--fs, 1)); font-weight: 800; }
.nut-step-body { display: grid; grid-template-rows: 1fr; }
.nut-step-inner { min-height: 0; overflow: hidden; padding: 0 14px; }
.nut-step-text { margin: 4px 0 0; font-size: calc(19px * var(--fs, 1)); line-height: 1.4; }
.nut-step-heat { margin: 6px 0 0; color: var(--fin-amber-ink); font-size: calc(14px * var(--fs, 1)); font-weight: 800; }
.nut-cook.is-js .nut-step-body { grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.nut-cook.is-js .nut-step.is-cur .nut-step-body { grid-template-rows: 1fr; }
.nut-cook.is-js .nut-step.is-cur .nut-step-inner { padding-bottom: 14px; }
.nut-step.is-cur { border-color: var(--green); background: color-mix(in srgb, var(--tint) 80%, var(--surface)); }
.nut-step.is-cur .nut-step-line, .nut-step.is-cur .nut-step-tag { display: none; }
.nut-step.is-cur .nut-step-head::after { content: attr(data-label); color: var(--green); font-weight: 800; }
.nut-step.is-cur .nut-step-mark { border-color: var(--green); background: var(--green); color: var(--surface); }
.nut-step.is-done .nut-step-mark { border-color: var(--green); background: var(--green); color: var(--surface); }
.nut-step.is-done .nut-step-num { opacity: 0; }
.nut-step.is-done .nut-step-mark .fin-svg { opacity: 1; stroke: var(--surface); }
.nut-step.is-done .nut-step-line { text-decoration: line-through; text-decoration-color: var(--green); text-decoration-thickness: 2px; }
.nut-step.is-next { opacity: .8; }
.nut-timer { margin-top: 12px; }
.nut-timer-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.nut-timer-top b { font-size: calc(26px * var(--fs, 1)); line-height: 1; font-variant-numeric: tabular-nums; }
.nut-timer-top span { color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.nut-tbar { display: block; height: 10px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: var(--fin-empty); }
.nut-tbar i { display: block; width: 0; height: 100%; border-radius: 99px; background: var(--green); transition: width .5s linear; }
.nut-timer.is-end .nut-tbar i { background: var(--berry); }
.nut-timer-btns { display: flex; gap: 8px; margin-top: 10px; }
.nut-timer-btns .nut-btn { flex: 1; min-height: 40px; }
.nut-cook-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.nut-link { display: inline-flex; align-items: center; gap: 4px; padding: 10px 2px; border: 0; background: none; color: var(--muted); font: inherit; font-size: calc(16px * var(--fs, 1)); font-weight: 800; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nut-link.is-go { margin-left: auto; color: var(--green); }
.nut-link .fin-svg { width: 20px; height: 20px; }
.nut-link[hidden] { display: none; }
.nut-imp { display: grid; gap: 14px; margin: 6px 0 0; padding: 0; list-style: none; }
.nut-imp > li { display: flex; gap: 12px; padding-top: 14px; border-top: 1px solid var(--fin-line); }
.nut-imp > li:first-child { padding-top: 0; border-top: 0; }
.nut-imp > li > div { flex: 1; min-width: 0; }
.nut-imp-n { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: var(--green); font-size: calc(14px * var(--fs, 1)); font-weight: 800; }
.nut-imp h3 { margin: 2px 0 4px; font-size: calc(17px * var(--fs, 1)); }
.nut-imp-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.nut-imp-sum { margin: 4px 0 2px; color: var(--muted); font-size: calc(15px * var(--fs, 1)); }
.nut-imp-sum b { color: var(--ink); }
.nut-imp-sum b.is-bad { color: var(--berry); }
.nut-imp-list { margin-top: 6px; }
.nut-imp-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--fin-line); }
.nut-imp-row.is-error { background: color-mix(in srgb, var(--berry) 6%, var(--surface)); }
.nut-imp-row[data-action="skip"]:not(.is-error) .nut-imp-text > b, .nut-imp-row[data-action="skip"]:not(.is-error) .nut-imp-kcal { opacity: .55; }
.nut-imp-pic { position: relative; display: grid; place-items: center; width: 52px; height: 52px; overflow: hidden; border: 1.5px dashed var(--fin-line-strong, var(--border)); border-radius: 14px; color: var(--green); cursor: pointer; }
.nut-imp-pic.has-photo { border-style: solid; }
.nut-imp-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nut-imp-pic .fin-svg { width: 24px; height: 24px; }
.nut-imp-pic:focus-within { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.nut-imp-pic.is-busy { opacity: .5; }
.nut-imp-text { display: grid; gap: 2px; min-width: 0; }
.nut-imp-text b { overflow-wrap: anywhere; }
.nut-imp-text small { color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.nut-imp-msg { color: var(--fin-amber-ink); font-size: calc(12px * var(--fs, 1)); font-weight: 800; }
.nut-imp-row.is-error .nut-imp-msg { color: var(--berry); }
.nut-imp-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.nut-opt { padding: 4px 10px; border: 1px solid var(--fin-line-strong, var(--border)); border-radius: 10px; background: var(--surface); color: var(--muted); font: inherit; font-size: calc(12px * var(--fs, 1)); font-weight: 700; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.nut-opt.is-on { border-color: var(--green); background: var(--tint); color: var(--green); }
.nut-imp-kcal { text-align: right; }
.nut-imp-kcal b { display: block; font-size: calc(18px * var(--fs, 1)); }
.nut-imp-kcal small { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.nut-imp-go { margin-top: 14px; }
.nut-imp-cancel { margin-top: 8px; }
.nut-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nut-meals { margin: 12px 0 0; padding: 0; border: 0; }
.nut-meals legend { padding: 0; font-size: calc(15px * var(--fs, 1)); font-weight: 800; }
.nut-check { display: inline-flex; align-items: center; gap: 8px; margin: 8px 14px 4px 0; font-weight: 700; cursor: pointer; }
.nut-check input { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin: 0; border: 2px solid var(--check-off); border-radius: 50%; background: var(--surface); transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .2s, border-color .2s; }
.nut-check input:checked { border-color: var(--green); background: var(--green) var(--check-img) center / 70% no-repeat; transform: scale(1.08); }
.nut-check input:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.nut-steprow { display: flex; gap: 10px; margin: 10px 0; }
.nut-steprow-n { display: grid; place-items: center; flex: none; width: 28px; height: 28px; margin-top: 6px; border-radius: 50%; background: var(--tint); color: var(--green); font-size: calc(13px * var(--fs, 1)); font-weight: 800; }
.nut-steprow-f { display: grid; flex: 1; gap: 8px; min-width: 0; }
.nut-steprow-f textarea { width: 100%; }
.nut-steprow-t { max-width: 160px; }
.nut-more-fields { margin-top: 14px; }
.nut-more-fields > summary { padding: 8px 0; color: var(--green); font-weight: 800; cursor: pointer; }
.nut-seg, .nut-seg a { border-radius: 12px; }
.nut-seg a[aria-current] { animation: nutPop .35s cubic-bezier(.34, 1.56, .64, 1); }
.nut-pills a { border-radius: 10px; }
@keyframes nutPop { from { transform: scale(.9); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nut-grp-body, .nut-cook.is-js .nut-step-body, .nut-star.is-pop, .nut-seg a[aria-current], .nut-tbar i { transition: none; animation: none; } }

.nut-cook:not(.is-js) .nut-cook-nav { display: none; }
.nut-cook-nav .nut-link span:empty { display: none; }

.nut-grp-name small[hidden] { display: none; }
.nut-grp .nut-rows .fin-swipe::before, .nut-grp .nut-rows .fin-swipe::after { content: none; }
.nut-grp .nut-rows .fin-swipe > .fin-op { padding-left: 0; }
.nut-grp .nut-rows .fin-swipe + .fin-swipe > .fin-op { background-size: 100% 1px; }

/* правило владельца 09.11.2026: никаких круглых капсульных форм на кнопках, полях и формах ввода — квадратнее, со скруглёнными углами */
.nut-ico { border-radius: 12px; }
.nut-ico.is-small { border-radius: 9px; }
.nut-round { border-radius: 12px; }
.nut-star { border-radius: 10px; }
.nut-plus-act { border-radius: 14px; }
.nut-plus-menu { border-radius: 16px; }

.nut-search-plus { width: 40px; min-height: 46px; aspect-ratio: auto; border: 0; border-radius: 10px; background: none; }
.nut-search-plus .fin-svg { width: 28px; height: 28px; }

/* 0.67.0: на широких телефонах (iPhone Plus/Pro Max) блоки главной, размеченные в долях ширины карточки (cqw), выходили крупнее «Покупок» (там пиксели).
   Теперь 1cqw не больше 3,45 px — как на карточке шириной ~345 px: шрифты и отступы как на Android и в «Покупках». Компьютер (от 700 px) — в ui2.css, не трогаем. */
@media (max-width: 699px) {
  .hb-count { font-size: calc(min(6cqw, 20.7px) * var(--fs, 1)); }
  .home-event.hb { --rule-in: min(3.4cqw, 11.73px); --ico-x: min(1.8cqw, 6.21px); --ico-w: min(8.3cqw, 28.64px); --ico-h: min(9cqw, 31.05px); --sep-l: min(4.3cqw, 14.84px); --sep-r: min(3.8cqw, 13.11px); --sep-h: min(9.2cqw, 31.74px); --title-f: min(6.8cqw, 23.46px); --pt: min(2.4cqw, 8.28px); --pb: min(2.6cqw, 8.97px); }
  .home-plan.hb { --rule-in: min(5.05cqw, 17.42px); --ico-x: min(0cqw, 0px); --ico-w: min(8.7cqw, 30.02px); --ico-h: min(9cqw, 31.05px); --sep-l: min(3.2cqw, 11.04px); --sep-r: min(4cqw, 13.8px); --sep-h: min(9.4cqw, 32.43px); --title-f: min(6.4cqw, 22.08px); --pt: min(3cqw, 10.35px); --pb: min(3.2cqw, 11.04px); --ck: min(8.6cqw, 29.67px); }
  .home-card.home-event.hb { min-height: min(42cqw, 144.9px); }
  .home-event .hb-body { padding: min(3.6cqw, 12.42px) min(5.2cqw, 17.94px) min(4.6cqw, 15.87px); }
  .home-event .home-muted { margin: min(3cqw, 10.35px) 0; font-size: calc(max(13px, min(4.3cqw, 14.84px)) * var(--fs, 1)); }
  .home-next-top { gap: min(2cqw, 6.9px) min(3cqw, 10.35px); }
  .home-event .home-next-when { height: min(9cqw, 31.05px); padding: 0 min(4.6cqw, 15.87px) 0 min(4.2cqw, 14.49px); gap: min(2.8cqw, 9.66px); border-width: max(1.5px, min(.3cqw, 1.03px)); font-size: calc(min(4cqw, 13.8px) * var(--fs, 1)); }
  .home-event .home-next-when.is-today::before { width: min(2.8cqw, 9.66px); height: min(2.8cqw, 9.66px); }
  .home-event .home-next-when:not(.is-today) { padding-left: min(1.4cqw, 4.83px); }
  .home-event .home-next-days { min-width: min(6.2cqw, 21.39px); height: min(6.2cqw, 21.39px); font-size: calc(min(4cqw, 13.8px) * var(--fs, 1)); }
  .home-event .home-next-title { margin: min(2.6cqw, 8.97px) 0 0; font-size: calc(min(6.8cqw, 23.46px) * var(--fs, 1)); }
  .home-event .home-next-date { margin: min(.3cqw, 1.03px) 0 0; font-size: calc(min(4.3cqw, 14.84px) * var(--fs, 1)); gap: 0 min(1.2cqw, 4.14px); }
  .home-event .home-next-more { font-size: calc(min(4cqw, 13.8px) * var(--fs, 1)); }
  .home-event .home-link { gap: min(3cqw, 10.35px); min-width: min(51cqw, 175.95px); height: min(13cqw, 44.85px); margin: min(3.6cqw, 12.42px) 0 0; padding: 0 min(5.4cqw, 18.63px) 0 min(5cqw, 17.25px); box-shadow: 0 min(1.6cqw, 5.52px) min(3.6cqw, 12.42px) rgba(8, 99, 67, .24); font-size: calc(min(4.7cqw, 16.21px) * var(--fs, 1)); }
  .home-event .home-link .ui-icon { width: min(3.9cqw, 13.46px); height: min(3.9cqw, 13.46px); }
  .home-event-art.is-small { right: min(1.5cqw, 5.18px); bottom: min(1.5cqw, 5.18px); width: min(34.7cqw, 119.72px); }
  .home-plan .home-task-who { width: min(6.9cqw, 23.81px); }
  .home-plan .home-task-remind { width: min(5.3cqw, 18.29px); }
  .home-plan .plan-empty { padding: min(5cqw, 17.25px) min(5.05cqw, 17.42px); }
  .home-task-list { margin: 0 min(5.05cqw, 17.42px); }
  .home-task .task-toggle { margin: 0 calc(min(2.6cqw, 8.97px) + (var(--ck) - 44px) / 2) min(2cqw, 6.9px) calc(min(.75cqw, 2.59px) + (var(--ck) - 44px) / 2); }
  .home-task-body { gap: min(3.5cqw, 12.08px); padding-right: min(1.05cqw, 3.62px); }
  .home-task-text { gap: min(.9cqw, 3.11px); padding: min(2.8cqw, 9.66px) 0 min(3.6cqw, 12.42px); }
  .home-task-title { font-size: calc(min(5.4cqw, 18.63px) * var(--fs, 1)); }
  .home-task-time { font-size: calc(min(4.7cqw, 16.21px) * var(--fs, 1)); }
  .home-task-time .ui-inline-icon { width: min(4.2cqw, 14.49px); height: min(4.2cqw, 14.49px); margin-right: min(1.8cqw, 6.21px); }
  .home-more { margin: min(1cqw, 3.45px) min(5.05cqw, 17.42px) min(2cqw, 6.9px) min(17cqw, 58.65px); font-size: calc(min(4.2cqw, 14.49px) * var(--fs, 1)); }
  .home-plan .home-link { margin: 0 min(5.05cqw, 17.42px); padding: min(4.1cqw, 14.14px) 0 min(7.6cqw, 26.22px); font-size: calc(min(6.2cqw, 21.39px) * var(--fs, 1)); }
  .home-plan .home-link .ui-icon { width: min(4.7cqw, 16.21px); height: min(4.7cqw, 16.21px); margin: 0 min(1.85cqw, 6.38px) 0 auto; }
  .home-finance.hb { --rule-in: min(3.4cqw, 11.73px); --ico-x: min(1.8cqw, 6.21px); --ico-w: min(9.2cqw, 31.74px); --ico-h: min(8.3cqw, 28.64px); --sep-l: min(4.3cqw, 14.84px); --sep-r: min(3.8cqw, 13.11px); --sep-h: min(9.2cqw, 31.74px); --title-f: min(6.8cqw, 23.46px); --pt: min(2.4cqw, 8.28px); --pb: min(2.6cqw, 8.97px); }
  .home-finance .hb-body { padding: min(4.6cqw, 15.87px) min(5.2cqw, 17.94px) 0; }
  .fin-home-money { gap: min(4cqw, 13.8px); }
  .fin-home-lbl { font-size: calc(max(12px, min(4.3cqw, 14.84px)) * var(--fs, 1)); }
  .fin-home-total { margin-top: min(1.4cqw, 4.83px); font-size: calc(min(9cqw, 31.05px) * var(--fs, 1)); }
  .fin-home-total.is-long { font-size: calc(min(7.4cqw, 25.53px) * var(--fs, 1)); }
  .fin-home-total.is-xl { font-size: calc(min(5.8cqw, 20.01px) * var(--fs, 1)); }
  .fin-home-spent { margin-top: min(1.4cqw, 4.83px); font-size: calc(min(6.4cqw, 22.08px) * var(--fs, 1)); }
  .fin-home-spent.is-long { font-size: calc(min(5.4cqw, 18.63px) * var(--fs, 1)); }
  .fin-home-notes { gap: min(1.4cqw, 4.83px); margin: min(3.4cqw, 11.73px) 0 0; }
  .fin-home-warn { font-size: calc(max(12px, min(4.3cqw, 14.84px)) * var(--fs, 1)); }
  .fin-home-pay { font-size: calc(max(12px, min(4.3cqw, 14.84px)) * var(--fs, 1)); }
  .fin-home-empty { margin: 0 0 min(4.6cqw, 15.87px); font-size: calc(max(13px, min(4.3cqw, 14.84px)) * var(--fs, 1)); }
  .fin-home-open { margin: min(4cqw, 13.8px) min(5.2cqw, 17.94px) 0; padding: min(3.8cqw, 13.11px) 0 min(4.6cqw, 15.87px); font-size: calc(max(14px, min(5cqw, 17.25px)) * var(--fs, 1)); }
  .fin-home-open .ui-icon { width: max(13px, min(4cqw, 13.8px)); height: max(13px, min(4cqw, 13.8px)); }
  .home-plan.hb { --ck: min(6.8cqw, 23.46px); }
  .home-plan .hp-tabs { padding: 0 min(3.4cqw, 11.73px); }
  .home-plan .u-tab { min-height: min(12cqw, 41.4px); padding: 0 min(2cqw, 6.9px); font-size: calc(min(4.5cqw, 15.53px) * var(--fs, 1)); }
  .home-plan .u-tab em { font-size: calc(min(3.4cqw, 11.73px) * var(--fs, 1)); }
  .hp-list { padding: 0 min(3.4cqw, 11.73px); }
  .hp-row { gap: min(.6cqw, 2.07px); min-height: min(13.4cqw, 46.23px); }
  .hp-row .task-toggle { margin: 0 0 0 -2.2cqw; }
  .home-plan .hp-row .task-check { width: min(12cqw, 41.4px); height: min(12cqw, 41.4px); }
  .hp-title { font-size: calc(min(4.7cqw, 16.21px) * var(--fs, 1)); }
  .hp-meta { gap: min(1.2cqw, 4.14px); margin-right: min(1cqw, 3.45px); font-size: calc(min(3.9cqw, 13.46px) * var(--fs, 1)); }
  .hp-meta .gl { width: min(4cqw, 13.8px); height: min(4cqw, 13.8px); }
  .hp-item .sw-btn { width: min(11cqw, 37.95px); }
  .hp-item .sw-btn .gl { width: min(5.8cqw, 20.01px); height: min(5.8cqw, 20.01px); }
  .hp-empty { padding: min(4cqw, 13.8px) min(5cqw, 17.25px) min(2cqw, 6.9px); font-size: calc(min(4.4cqw, 15.18px) * var(--fs, 1)); }
  .hp-go { margin-top: min(2cqw, 6.9px); font-size: calc(min(4.6cqw, 15.87px) * var(--fs, 1)); }
  .hp-foot { gap: min(3cqw, 10.35px); padding: min(1cqw, 3.45px) min(5cqw, 17.25px) min(2.4cqw, 8.28px); }
  .hp-foot a { gap: min(1.6cqw, 5.52px); min-height: min(11cqw, 37.95px); font-size: calc(min(4.7cqw, 16.21px) * var(--fs, 1)); }
  .hp-foot .gl { width: min(4.6cqw, 15.87px); height: min(4.6cqw, 15.87px); }
  .home-plan .home-more { margin: 0 min(5cqw, 17.25px) min(1cqw, 3.45px); }
  .home-event .home-link { min-width: min(40cqw, 138px); height: min(10.6cqw, 36.57px); margin-top: min(3cqw, 10.35px); padding: 0 min(4.4cqw, 15.18px) 0 min(4.6cqw, 15.87px); font-size: calc(min(4.1cqw, 14.14px) * var(--fs, 1)); }
  .home-event .home-link .ui-icon { width: min(3.4cqw, 11.73px); height: min(3.4cqw, 11.73px); }
}
/* 0.68.0: профиль — все настройки одной формой: выбор чипами, «Сохранить» одной полосой внизу, пока есть изменения (profile.js, без перезагрузки) */
.prof-form { margin: 0; }
.prof-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.prof-chip { position: relative; display: inline-flex; margin: 0; font-weight: inherit; }
.prof-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: calc(14.5px * var(--fs, 1)); font-weight: 700; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.prof-chip input:checked + span { border-color: var(--green); background: var(--tint); color: var(--green); }
.prof-chip input:focus-visible + span { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.prof-tiles { display: inline-flex; margin-top: 12px; padding: 8px 12px; border-radius: 12px; box-shadow: none; }
.prof-bar { position: sticky; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 30; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 12px; border: 1.5px solid var(--green); border-radius: 16px; background: var(--surface); box-shadow: 0 10px 26px rgba(29, 33, 34, .16); }
.prof-bar[hidden] { display: none; }
.prof-bar-t { grid-column: 1 / -1; min-width: 0; color: var(--ink); font-size: calc(14px * var(--fs, 1)); font-weight: 800; }
.prof-bar .button { margin: 0; width: 100%; }
@media (min-width: 700px) { .prof-bar { grid-template-columns: 1fr auto auto; } .prof-bar-t { grid-column: auto; } .prof-bar .button { width: auto; } }
.prof-rest { margin-top: 16px; }
/* 0.68.3: «Покупки» на главной с ChatGPT — всплывающее окно (макет владельца 16.11) */
.hsa-note { margin: 8px 16px 0; color: var(--berry); font-size: calc(14px * var(--fs, 1)); font-weight: 700; }
.hsa-note[hidden] { display: none; }
.home-shop-list .sw.is-new { background: var(--tint); }
html.hsd-lock { overflow: hidden; }
.hsd { position: fixed; inset: auto 0 0; width: 100%; max-width: 560px; max-height: calc(100dvh - 40px); margin: auto auto 0; padding: 0; border: 0; border-radius: 26px 26px 0 0; background: var(--surface); color: var(--ink); box-shadow: 0 -10px 30px rgba(29, 33, 34, .18); overflow: hidden; }
.hsd[open] { display: flex; flex-direction: column; animation: hsd-up .22s ease-out; }
.hsd::backdrop { background: rgba(29, 33, 34, .42); }
@keyframes hsd-up { from { transform: translateY(40px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .hsd[open] { animation: none; } }
@media (min-width: 700px) { .hsd { inset: 0; margin: auto; max-height: min(760px, calc(100dvh - 60px)); border-radius: 26px; } .hsd-handle { display: none; } }
.hsd-head { flex: none; display: grid; gap: 8px; padding: 10px 18px 12px; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.hsd-handle { justify-self: center; width: 44px; height: 5px; border-radius: 3px; background: var(--border); }
.hsd-hrow { display: flex; align-items: center; gap: 10px; }
.hsd-htext { flex: 1; min-width: 0; display: grid; gap: 2px; }
.hsd-htext h3 { margin: 0; font-size: calc(20px * var(--fs, 1)); }
.hsd-sub { color: var(--muted); font-size: calc(13.5px * var(--fs, 1)); }
.hsd-sub:empty { display: none; }
.hsd-x, .hsd-more { flex: none; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--green) 7%, var(--surface)); color: var(--muted); -webkit-tap-highlight-color: transparent; }
.hsd .gl { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.hsd-x:focus-visible, .hsd-more:focus-visible, .hsd-btn:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.hsd-rec, .hsd-wait, .hsd-body, .hsd-foot { display: none; }
.hsd[data-state="rec"] .hsd-rec, .hsd[data-state="wait"] .hsd-wait { display: grid; }
.hsd[data-state="list"] .hsd-body { display: grid; }
.hsd[data-state="list"] .hsd-foot { display: flex; }
.hsd-rec { gap: 14px; padding: 14px 16px calc(24px + env(safe-area-inset-bottom)); }
.hsd-card { display: grid; gap: 14px; padding: 18px; border-radius: 22px; background: linear-gradient(150deg, color-mix(in srgb, var(--green) 82%, #fff) 0%, var(--green) 55%, color-mix(in srgb, var(--green) 72%, #000) 100%); color: #fff; }
.hsd-crow { display: flex; align-items: center; gap: 12px; }
.hsd-cmic { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, .16); }
.hsd-cmic .gl { width: 28px; height: 28px; stroke-width: 2; }
.hsd-ctitle { flex: 1; display: flex; align-items: center; gap: 8px; font-size: calc(19px * var(--fs, 1)); }
.hsd-time { font-size: calc(22px * var(--fs, 1)); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.hsd-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: hsd-blink 1.2s ease-in-out infinite; }
@keyframes hsd-blink { 50% { opacity: .3; } }
.hsd-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 64px; }
.hsd-wave i { flex: none; width: 4px; height: 60px; border-radius: 2px; background: rgba(255, 255, 255, .92); transform: scaleY(.08); transition: transform .09s linear; }
.hsd-wave:not(.is-live) i { animation: hsd-breath 1.6s ease-in-out infinite; }
.hsd-wave:not(.is-live) i:nth-child(3n) { animation-delay: -.4s; }
.hsd-wave:not(.is-live) i:nth-child(3n+1) { animation-delay: -.9s; }
@keyframes hsd-breath { 50% { transform: scaleY(.28); } }
@media (prefers-reduced-motion: reduce) { .hsd-dot, .hsd-wave i { animation: none; } }
.hsd-rec > .hsd-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; border-radius: 18px; font-size: calc(17px * var(--fs, 1)); }
.hsd-btn { min-height: 52px; padding: 0 18px; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--ink); font: inherit; font-size: calc(16px * var(--fs, 1)); font-weight: 800; -webkit-tap-highlight-color: transparent; }
.hsd-btn.is-main { border-color: var(--green); background: var(--green); color: #fff; }
.hsd-btn:disabled { opacity: .5; }
.hsd-btn .gl { width: 20px; height: 20px; stroke-width: 2.4; }
.hsd-wait { justify-items: center; gap: 12px; padding: 44px 20px calc(54px + env(safe-area-inset-bottom)); }
.hsd-wait p { margin: 0; font-size: calc(16px * var(--fs, 1)); font-weight: 800; }
.hsd-spin { width: 34px; height: 34px; border: 3.5px solid var(--tint); border-top-color: var(--green); border-radius: 50%; animation: hsd-spin .8s linear infinite; }
@keyframes hsd-spin { to { transform: rotate(360deg); } }
.hsd-body { flex: 1; min-height: 0; align-content: start; gap: 10px; padding: 12px 14px; overflow-y: auto; overscroll-behavior: contain; }
.hsd-err { margin: 0; color: var(--berry); font-size: calc(14px * var(--fs, 1)); font-weight: 700; }
.hsd-err[hidden] { display: none; }
.hsd-foot { flex: none; gap: 10px; padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.hsd-foot .is-main { flex: 1; }
.hsd-more { width: 52px; height: 52px; border: 1.5px solid color-mix(in srgb, var(--green) 25%, var(--surface)); border-radius: 16px; background: var(--tint); color: var(--green); }
.hsd-more[hidden] { display: none; }

/* 0.68.3: строка разобранного списка покупок (окно на главной и чат «Помощника») */
.asr-list { display: grid; gap: 10px; margin: 0; }
.asr { display: grid; gap: 8px; padding: 10px 12px; border: 1.5px solid color-mix(in srgb, var(--green) 14%, var(--surface)); border-radius: 18px; background: var(--surface); box-shadow: 0 2px 8px rgba(29, 33, 34, .05); }
.asr.is-off { box-shadow: none; }
.asr.is-off .asr-title, .asr.is-off .asr-qty { color: var(--muted); }
.asr-top { display: flex; align-items: flex-start; gap: 10px; }
.asr-top .asr-tick { margin-top: 7px; }
.asr-tick { flex: none; margin: 0; cursor: pointer; }
.asr-box { display: grid; place-items: center; width: 26px; height: 26px; box-sizing: border-box; border: 2px solid color-mix(in srgb, var(--green) 30%, var(--surface)); border-radius: 8px; background: var(--surface); }
.asr-box svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.asr-tick input:checked + .asr-box { border-color: var(--green); background: var(--green); }
.asr-tick input:checked + .asr-box svg { opacity: 1; }
.asr-tick input:focus-visible + .asr-box { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.asr-in { min-width: 0; height: 40px; box-sizing: border-box; margin: 0; padding: 0 10px; border: 1.5px solid color-mix(in srgb, var(--green) 16%, var(--surface)); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: calc(15px * var(--fs, 1)); }
.asr-in:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 14%, transparent); }
.asr-in::placeholder { color: var(--muted); opacity: .8; }
.asr-title { flex: 1; min-height: 40px; padding: 9px 10px; overflow: hidden; resize: none; font-size: calc(15.5px * var(--fs, 1)); font-weight: 800; line-height: 1.25; }
.asr-qty { flex: none; width: 96px; padding: 0 6px; text-align: center; font-size: calc(14px * var(--fs, 1)); font-weight: 700; }
.ai-check .asr-bottom { padding-left: 0; }
.ai-check .asr { padding: 10px; }
.asr-ask { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--berry) 8%, var(--surface)); font-size: calc(13.5px * var(--fs, 1)); line-height: 1.35; }
.asr-ask svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: var(--berry); stroke-width: 2; stroke-linejoin: round; }
.asr-ask b { color: var(--berry); }
.asr-bottom { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; padding-left: 36px; }
.asr-bottom .asr-in { height: 36px; font-size: calc(14px * var(--fs, 1)); }
.asr-cat[open] { grid-column: 1 / -1; }
.asr-cat > summary { display: inline-flex; align-items: center; gap: 6px; height: 36px; box-sizing: border-box; padding: 0 8px; border: 1.5px solid color-mix(in srgb, var(--green) 25%, var(--surface)); border-radius: 10px; background: var(--tint); color: var(--green); font-size: calc(13.5px * var(--fs, 1)); font-weight: 800; white-space: nowrap; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.asr-cat > summary::-webkit-details-marker { display: none; }
.asr-cat > summary.is-empty { border-color: color-mix(in srgb, var(--green) 16%, var(--surface)); background: var(--surface); color: var(--muted); }
.asr-cat > summary:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.asr-ic { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.asr-chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.asr-cat[open] .asr-chev { transform: rotate(180deg); }
.asr-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; padding: 8px; border-radius: 14px; background: color-mix(in srgb, var(--green) 5%, var(--surface)); }
.asr-c { margin: 0; cursor: pointer; }
.asr-c span { display: flex; align-items: center; gap: 8px; min-height: 44px; box-sizing: border-box; padding: 4px 10px; border: 1.5px solid color-mix(in srgb, var(--green) 14%, var(--surface)); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: calc(13.5px * var(--fs, 1)); font-weight: 700; line-height: 1.2; }
.asr-c span .asr-ic { color: var(--green); }
.asr-c input:checked + span { border-color: var(--green); background: var(--tint); color: var(--green); }
.asr-c input:focus-visible + span { outline: 3px solid var(--green-bright); outline-offset: 2px; }
@media (max-width: 359px) { .asr-bottom { padding-left: 0; } .asr-qty { width: 88px; } .asr-cats { grid-template-columns: 1fr; } }

/* 0.70.1: «Не доготовлено» на главной */
.home-cookopen { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 10px 10px 12px; border: 1.5px solid color-mix(in srgb, var(--accent) 45%, var(--surface)); border-radius: 18px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.home-cookopen-main { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.home-cookopen-main img, .home-cookopen-ico { flex: none; width: 46px; height: 46px; border-radius: 14px; object-fit: cover; }
.home-cookopen-ico { display: grid; place-items: center; background: var(--surface); color: var(--muted); }
.home-cookopen-ico .gl { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-cookopen-main span { display: grid; gap: 2px; min-width: 0; }
.home-cookopen-main small { color: color-mix(in srgb, var(--accent) 70%, #5a3a10); font-size: calc(12.5px * var(--fs, 1)); font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.home-cookopen-main b { color: var(--ink); font-size: calc(16px * var(--fs, 1)); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.home-cookopen-done { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border-radius: 14px; background: var(--green); color: var(--surface); font-size: calc(15px * var(--fs, 1)); font-weight: 800; text-decoration: none; }
@media (max-width: 359px) { .home-cookopen { grid-template-columns: 1fr; } .home-cookopen-done { justify-content: center; } }
/* 0.79.0 (owner): the plates of the home page stand over the hero picture (it covered «Готовить» on a wide screen); «Готовка» has «Приготовили» and «×», «Не доготовлено» has «×» (the products come back); «Готовое дома» */
.home-cookopen { position: relative; z-index: 1; }
.home-cookopen-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.home-cookopen-acts form { display: flex; margin: 0; }
.home-cookopen-done, .home-cookopen-btn { min-height: 38px; padding: 0 13px; border-radius: 12px; font-size: calc(14px * var(--fs, 1)); cursor: pointer; }
.home-cookopen-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1.5px solid color-mix(in srgb, var(--green) 40%, var(--surface)); background: var(--surface); color: var(--green); font-family: inherit; font-weight: 800; line-height: 1; }
.home-cookopen-btn.is-x { width: 38px; padding: 0; border-color: color-mix(in srgb, var(--ink) 14%, var(--surface)); color: var(--muted); }
.home-cookopen-btn .gl { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.home-cookopen-btn:hover, .home-cookopen-btn:focus-visible { background: color-mix(in srgb, var(--green) 8%, var(--surface)); }
.home-cookopen-btn.is-x:hover, .home-cookopen-btn.is-x:focus-visible { background: color-mix(in srgb, var(--ink) 6%, var(--surface)); color: var(--ink); }
.home-cookopen.is-ready { border-color: color-mix(in srgb, var(--green) 38%, var(--surface)); background: color-mix(in srgb, var(--green) 6%, var(--surface)); }
.home-cookopen.is-ready .home-cookopen-main small { color: var(--green); }
@media (max-width: 559px) { .home-cookopen { grid-template-columns: 1fr; gap: 8px; } }
@media (max-width: 359px) { .home-cookopen-done { justify-content: center; } .home-cookopen-done, .home-cookopen-btn { padding: 0 10px; } .home-cookopen-btn.is-x { padding: 0; } }
