@import url(/fonts/fonts.css);
/* Пятёрка: одна колонка, шапка → экран → нижнее меню. Пять направлений: свой цвет и иконка. */
:root {
  --bg: #F2F3F7; --surface: #FFFFFF; --surface2: #EEEFF3; --line: #E4E5EB; --line2: #DCDEE6;
  --fg: #15161C; --fg2: #3E414D; --muted: #5B5E6B;
  --ink: #15161C; --on-ink: #FFFFFF;
  --hero: #15161C; --hero-fg: #FFFFFF; --hero-muted: #B8BBC8; --hero-track: #2C2E38;
  --star: #F5B400; --star-fg: #7A5200; --star-bg: #FFF3D1;
  --ok: #0F7049; --on-ok: #FFFFFF; --ok-bg: #E3F4EC; --ok-fg: #0F5A3B;
  --bad-bg: #F9E3EE; --bad-fg: #7A1F4B;
  --link: #2F45C9; --dot: #C9530E; --shadow: 0 8px 24px rgba(21,22,28,.22);
  --c-health: #0F7049; --t-health: #E3F4EC;
  --c-mind: #2F45C9;   --t-mind: #E6EAFD;
  --c-sport: #A8460C;  --t-sport: #FCEBDD;
  --c-home: #096A6D;   --t-home: #DDF1F1;
  --c-art: #9C2860;    --t-art: #F9E3EE;
  --c-all: #15161C;    --t-all: #E4E5EB;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #0E0F13; --surface: #1A1C23; --surface2: #23252E; --line: #2E313B; --line2: #3A3D48;
  --fg: #F2F3F7; --fg2: #C9CCD6; --muted: #A3A7B5;
  --ink: #F2F3F7; --on-ink: #0E0F13;
  --hero: #1A1C23; --hero-fg: #F2F3F7; --hero-muted: #A3A7B5; --hero-track: #2E313B;
  --star: #F5C84C; --star-fg: #F5C84C; --star-bg: #3A2E0E;
  --ok: #4CC38A; --on-ok: #0E0F13; --ok-bg: #12291F; --ok-fg: #7FDDB0;
  --bad-bg: #33162A; --bad-fg: #F7A8CE;
  --link: #8B9CFF; --dot: #FF9A5A; --shadow: 0 8px 24px rgba(0,0,0,.5);
  --c-health: #4CC38A; --t-health: #12291F;
  --c-mind: #8B9CFF;   --t-mind: #1C2142;
  --c-sport: #FF9A5A;  --t-sport: #33200F;
  --c-home: #3FC1C4;   --t-home: #0F2A2B;
  --c-art: #F07DB5;    --t-art: #33162A;
  --c-all: #F2F3F7;    --t-all: #2E313B;
  color-scheme: dark;
} }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
img { max-width: 100%; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--link); }
.app { max-width: 480px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; gap: 16px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(110px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.app.noNav { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.h1 { font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.h2 { font-size: 15px; font-weight: 800; }
.sub { font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.45; }
.small { font-size: 12px; font-weight: 600; color: var(--muted); }
.card { background: var(--surface); border-radius: 18px; padding: 14px; }
.list { background: var(--surface); border-radius: 18px; padding: 4px 14px; display: flex; flex-direction: column; }
.list > * + * { border-top: 1px solid var(--line); }
.hero { background: var(--hero); color: var(--hero-fg); border-radius: 24px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--line); }
.hero .lbl { font-size: 13px; font-weight: 600; color: var(--hero-muted); }
.big { font-family: var(--display); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.big small { font-size: 17px; color: var(--hero-muted); }
.track { height: 8px; border-radius: 999px; background: var(--hero-track); overflow: hidden; }
.track > span { display: block; height: 100%; border-radius: 999px; background: var(--star); }
.mini { display: block; height: 4px; width: 80%; border-radius: 999px; background: var(--surface2); overflow: hidden; }
.mini > span { display: block; height: 100%; background: var(--c); border-radius: 999px; }
.bar8 { display: block; height: 8px; border-radius: 999px; background: var(--surface2); overflow: hidden; }
.bar8 > span { display: block; height: 100%; border-radius: 999px; background: var(--c); }
.btn { min-height: 52px; border: 0; border-radius: 16px; background: var(--ink); color: var(--on-ink); font-size: 15px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; text-decoration: none; }
.btn.wide { width: 100%; }
.btn.ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--line2); font-weight: 700; }
.btn.ok { background: var(--ok); color: var(--on-ok); }
.btn.danger { background: var(--bad-bg); color: var(--bad-fg); }
.btn.sm { min-height: 44px; font-size: 14px; border-radius: 14px; padding: 0 14px; }
.btn[disabled] { background: var(--surface2); color: var(--muted); cursor: default; border-color: transparent; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--fg); flex-shrink: 0; }
.link { border: 0; background: none; color: var(--link); font-weight: 700; font-size: 14px; min-height: 44px; padding: 0 4px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.lg { padding: 8px 12px; font-size: 13px; }
.st-todo { background: var(--surface2); color: var(--fg2); }
.st-review { background: var(--star-bg); color: var(--star-fg); }
.st-done { background: var(--ok-bg); color: var(--ok-fg); }
.st-returned, .st-late { background: var(--bad-bg); color: var(--bad-fg); }
.st-new { background: var(--link); color: var(--on-ink); }
.pts { color: var(--star-fg); font-weight: 700; }
.ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--t); color: var(--c); }
svg { display: block; flex-shrink: 0; }
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.tile { min-width: 0; background: var(--surface); border: 2px solid var(--surface); border-radius: 16px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tile .ti { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--t); color: var(--c); }
.tile .tl { font-size: 9px; font-weight: 700; letter-spacing: -0.01em; color: var(--fg2); white-space: nowrap; }
.tile[aria-pressed="true"] { border-color: var(--c); }
.tile[aria-pressed="true"] .ti { background: var(--c); color: var(--surface); }
.task { width: 100%; text-align: left; border: 2px solid var(--surface); background: var(--surface); border-radius: 18px; padding: 12px 12px 12px 14px; display: flex; align-items: center; gap: 12px; color: var(--fg); }
.task.fresh { border-color: var(--link); }
.task .tt { font-size: 15px; font-weight: 700; line-height: 1.25; }
.task.isdone .tt { color: var(--muted); text-decoration: line-through; }
.meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 600; color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface); color: var(--fg2); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip.tpl { border: 0; background: var(--t); color: var(--c); min-height: 36px; font-size: 12px; }
.cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cat { min-height: 72px; padding: 8px 2px; border-radius: 16px; border: 2px solid var(--surface); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--c); }
.cat span { font-size: 10px; font-weight: 800; color: var(--fg2); }
.cat[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: var(--surface); }
.cat[aria-pressed="true"] span { color: var(--surface); }
.lbl { font-size: 13px; font-weight: 800; color: var(--fg2); }
.input { width: 100%; min-height: 52px; border: 1px solid var(--line2); border-radius: 16px; padding: 0 16px; font-size: 16px; font-weight: 600; background: var(--surface); color: var(--fg); }
textarea.input { padding: 12px 16px; min-height: 84px; resize: vertical; line-height: 1.4; }
.input.code { text-align: center; font-family: var(--display); font-size: 28px; letter-spacing: .3em; text-transform: uppercase; min-height: 72px; }
.toggle-row { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle-row input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--ink); flex-shrink: 0; margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--fg2); }
.check input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--ink); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface); font-size: 20px; font-weight: 700; }
.stepper output { min-width: 60px; text-align: center; font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--star-fg); font-variant-numeric: tabular-nums; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ph { position: relative; aspect-ratio: 1; max-width: 100%; border-radius: 14px; overflow: hidden; background: var(--surface2); }
.ph > button.open { width: 100%; height: 100%; border: 0; padding: 0; background: none; display: block; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 999px; border: 0; background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; }
.addph { aspect-ratio: 1; max-width: 100%; border-radius: 14px; border: 2px dashed var(--line2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--fg2); font-size: 12px; font-weight: 700; cursor: pointer; position: relative; text-align: center; }
.addph input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line);
  padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.nav .in { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.nav button { min-height: 50px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); position: relative; }
.nav button[aria-current="page"] { color: var(--fg); font-weight: 800; }
.nav .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--dot); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.fab { position: fixed; z-index: 21; right: max(20px, calc((100vw - 480px) / 2 + 16px)); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); min-height: 56px; padding: 0 20px; border-radius: 18px; border: 0; background: var(--ink); color: var(--on-ink); font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow); }
.toast { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top, 0px)); width: min(440px, calc(100% - 32px)); padding: 12px 16px; border-radius: 16px; background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 700; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; }
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; padding: calc(56px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.overlay img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.overlay .icon-btn { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); background: rgba(255,255,255,.15); color: #fff; }
.avatar { width: 32px; height: 32px; border-radius: 999px; background: #8FA0FF; color: #15161C; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.notice { border-radius: 14px; padding: 12px 14px; font-size: 13px; font-weight: 600; line-height: 1.45; }
.notice.bad { background: var(--bad-bg); color: var(--bad-fg); }
.notice.warn { background: var(--star-bg); color: var(--star-fg); }
.notice.good { background: var(--ok-bg); color: var(--ok-fg); }
.empty { padding: 18px 16px; border-radius: 18px; background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.45; }
.role { width: 100%; min-height: 84px; border-radius: 20px; border: 2px solid var(--line2); background: var(--surface); padding: 14px 16px; display: flex; align-items: center; gap: 14px; text-align: left; color: var(--fg); }
.logo { display: grid; grid-template-columns: repeat(5, 36px); gap: 8px; }
.logo span { height: 36px; border-radius: 11px; }
.logo span:nth-child(even) { margin-top: 12px; }
.plan { width: 100%; text-align: left; border-radius: 18px; border: 2px solid var(--line2); background: var(--surface); padding: 14px 16px; display: flex; align-items: center; gap: 12px; color: var(--fg); }
.plan[aria-pressed="true"] { border-color: var(--ink); }
.plan .pr { font-family: var(--display); font-size: 18px; font-weight: 600; white-space: nowrap; }
.kidchips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.kidchip { flex-shrink: 0; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 6px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface); color: var(--fg2); font-size: 14px; font-weight: 700; }
.kidchip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.codebox { font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: .14em; text-align: center; }
details summary { cursor: pointer; list-style: none; min-height: 44px; display: flex; align-items: center; font-weight: 800; font-size: 15px; }
details summary::-webkit-details-marker { display: none; }
.foot { text-align: center; font-size: 12px; color: var(--muted); line-height: 1.6; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: tin .2s ease-out; } @keyframes tin { from { opacity: 0; transform: translate(-50%, -8px); } } }
