/* Épicerie — один шрифт (Golos Text, есть латиница и кириллица), белый фон,
   один тёплый акцент цвета корочки хлеба. Разделение блоков — фоном, не рамками. */

@font-face { font-family: 'Golos'; font-weight: 400; font-display: swap; src: url(fonts/golos-text-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Golos'; font-weight: 500; font-display: swap; src: url(fonts/golos-text-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Golos'; font-weight: 600; font-display: swap; src: url(fonts/golos-text-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Golos'; font-weight: 700; font-display: swap; src: url(fonts/golos-text-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Golos'; font-weight: 400; font-display: swap; src: url(fonts/golos-text-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos'; font-weight: 500; font-display: swap; src: url(fonts/golos-text-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos'; font-weight: 600; font-display: swap; src: url(fonts/golos-text-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos'; font-weight: 700; font-display: swap; src: url(fonts/golos-text-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --bg: #ffffff;
  --surface: #f6f3ef;
  --surface-2: #ede7e0;
  --text: #1e1a16;
  --text-2: #5f574f;
  --text-3: #7a7168;
  --accent: #b24a17;
  --accent-press: #963c10;
  --on-accent: #ffffff;
  --accent-ink: #8e3a10;
  --accent-soft: #fbece2;
  --ok: #2e6b4e;
  --ok-soft: #e3f1e8;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --danger-soft-2: #f9d7d2;
  --read: #2b8ae0;
  --scrim: rgba(24, 18, 12, .42);
  --shadow: 0 1px 2px rgba(40, 28, 16, .06), 0 8px 24px rgba(40, 28, 16, .08);
  --radius: 16px;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px));
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #15120f;
  --surface: #211c18;
  --surface-2: #2c2620;
  --text: #f3ede6;
  --text-2: #c2b8ad;
  --text-3: #a39888;
  --accent: #e28b58;
  --accent-press: #f0a274;
  --on-accent: #1b120c;
  --accent-ink: #f2b08a;
  --accent-soft: #3a2519;
  --ok: #74c29a;
  --ok-soft: #1c3327;
  --danger: #f1897f;
  --danger-soft: #3c1f1c;
  --danger-soft-2: #4d2723;
  --read: #6cb6ff;
  --scrim: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: 'Golos', 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
svg.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- каркас */
#app { min-height: 100vh; }
.shell { display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  padding: calc(var(--safe-top) + 8px) 16px 8px;
  display: flex; align-items: center; gap: 8px; min-height: 56px;
}
.topbar h1 { font-size: 22px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); position: relative;
}
.iconbtn:active { background: var(--surface); }
.badge-dot {
  position: absolute; top: 8px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: var(--on-accent);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.content { flex: 1; padding: 0 16px calc(96px + var(--safe-bottom)); }
.content.nonav { padding-bottom: calc(32px + var(--safe-bottom)); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--bg);
  box-shadow: 0 -1px 0 var(--surface-2);
  display: flex; padding: 6px 4px calc(6px + var(--safe-bottom));
}
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0; color: var(--text-3); font-size: 12px; font-weight: 500;
}
.tabbar button.on { color: var(--accent); }
.tabbar button.on svg { stroke-width: 2.1; }

/* ---------------------------------------------------------------- кнопки и поля */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 12px;
  font-weight: 600; font-size: 16px;
  background: var(--accent); color: var(--on-accent);
  transition: transform .12s ease-out, background-color .12s ease-out;
}
.btn:active { transform: scale(.98); background: var(--accent-press); }
.btn:disabled { opacity: .5; }
.btn.block { width: 100%; }
.btn.soft { background: var(--surface); color: var(--text); }
.btn.soft:active { background: var(--surface-2); }
.btn.ghost { background: none; color: var(--accent); padding: 0 8px; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.ok { background: var(--ok); color: #fff; }
:root[data-theme="dark"] .btn.ok { color: #0f1f16; }
.btn.danger:active { background: var(--danger-soft-2); }
@media (hover: hover) {
  .btn:hover { background: var(--accent-press); }
  .btn.soft:hover { background: var(--surface-2); }
  .btn.ghost:hover { background: var(--surface); }
  .btn.danger:hover { background: var(--danger-soft-2); }
  .btn.gbtn:hover { background: var(--surface); }
  .btn.ok:hover { filter: brightness(1.06); }
}
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-row { display: flex; gap: 8px; }
.btn-row > * { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 8px; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.field small { display: block; font-size: 13px; color: var(--text-3); margin-top: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 48px; padding: 0 14px;
  border-radius: 12px; border: 2px solid transparent;
  background: var(--surface); outline: none;
  transition: border-color .12s ease-out, background-color .12s ease-out;
}
textarea.input { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); background: var(--bg); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237a7168' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-wrap .iconbtn { position: absolute; right: 2px; top: 2px; color: var(--text-3); }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; font-size: 14px; color: var(--text-2); line-height: 1.45; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--accent); }
.error { color: var(--danger); font-size: 14px; margin: -4px 0 12px; min-height: 0; }
.error:empty { display: none; }

/* переключатели-«таблетки» */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 18px;
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.chip.on { background: var(--accent); color: var(--on-accent); }
.chip.static { background: var(--surface); }
.daypick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.daypick .chip { padding: 0; justify-content: center; }

.seg { display: inline-flex; background: var(--surface); border-radius: 12px; padding: 3px; }
.seg button { height: 34px; padding: 0 14px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.seg button.on { background: var(--bg); color: var(--text); box-shadow: var(--shadow); }
.seg.full { display: flex; }
.seg.full button { flex: 1; }

.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 14px; background: var(--surface-2); transition: background-color .15s ease-out; }
.switch span::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,.25); transition: transform .15s ease-out; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ---------------------------------------------------------------- аватарки */
.av {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px; color: #fff; overflow: hidden;
  background: var(--av, #8c6a52);
}
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.s28 { width: 28px; height: 28px; font-size: 11px; }
.av.s44 { width: 44px; height: 44px; }
.av.s56 { width: 56px; height: 56px; font-size: 19px; }
.av.s96 { width: 96px; height: 96px; font-size: 32px; }
.avstack { display: flex; align-items: center; }
.avstack .av { box-shadow: 0 0 0 2px var(--rowbg, var(--bg)); }
.avstack .av + .av { margin-left: -6px; }
.count { font-weight: 700; font-size: 16px; margin-left: 8px; }
.count.zero { color: var(--text-3); font-weight: 500; font-size: 14px; margin-left: 0; }

/* ---------------------------------------------------------------- планирование */
.plan-head { display: flex; align-items: center; gap: 4px; margin: 12px 0 8px; }
.plan-head .label { flex: 1; font-weight: 600; font-size: 17px; text-align: center; }
.plan-tools { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 8px; }
.linkbtn { color: var(--accent); font-weight: 600; font-size: 14px; height: 36px; padding: 0 4px; }

.days { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.day {
  --rowbg: var(--surface);
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 8px; min-height: 76px;
  border-radius: var(--radius); background: var(--rowbg);
  text-align: left; width: 100%;
  transition: transform .12s ease-out;
}
.day:active { transform: scale(.99); }
.day.today { --rowbg: var(--accent-soft); }
.day.past { opacity: .55; }
.day.closed { --rowbg: transparent; box-shadow: inset 0 0 0 1.5px var(--surface-2); }
.day .date { width: 52px; flex: none; text-align: center; }
.day .date .wd { font-size: 13px; color: var(--text-2); font-weight: 500; }
.day .date .dn { font-size: 26px; font-weight: 700; line-height: 1.1; }
.day.today .date .dn, .day.today .date .wd { color: var(--accent-ink); }
.day .mid { flex: 1; min-width: 0; }
.day .mid .who { display: flex; align-items: center; min-height: 28px; }
.day .mid .split { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.day .me {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  height: 32px; padding: 0 10px; border-radius: 16px;
  background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 600;
}
.day .add {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--accent);
}
.day.today .add { background: var(--bg); }

.month { margin-top: 8px; }
.month .wdh { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: var(--text-3); font-weight: 500; margin-bottom: 6px; }
.month .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mcell {
  aspect-ratio: 1 / 1.15; border-radius: 12px; background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 6px 2px 5px; position: relative;
}
.mcell .dn { font-size: 15px; font-weight: 600; }
.mcell .n { font-size: 12px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 2px; }
.mcell .n svg { width: 12px; height: 12px; }
.mcell.other { background: transparent; }
.mcell.other .dn { color: var(--text-3); font-weight: 400; }
.mcell.closed { background: transparent; box-shadow: inset 0 0 0 1.5px var(--surface-2); }
.mcell.closed .n { color: var(--text-3); }
.mcell.past { opacity: .5; }
.mcell.today { background: var(--accent-soft); }
.mcell.today .dn { color: var(--accent-ink); }
.mcell.mine { box-shadow: inset 0 0 0 2px var(--ok); }
.mcell.mine .n { color: var(--ok); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); margin-top: 12px; align-items: center; flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }

/* ---------------------------------------------------------------- списки-строки */
.section-title { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 24px 0 8px; }
.section-title:first-child { margin-top: 12px; }
.rows { display: flex; flex-direction: column; gap: 2px; }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 56px;
  padding: 8px 12px; background: var(--surface); width: 100%; text-align: left;
}
.rows > .row:first-child { border-radius: var(--radius) var(--radius) 4px 4px; }
.rows > .row:last-child { border-radius: 4px 4px var(--radius) var(--radius); }
.rows > .row:only-child { border-radius: var(--radius); }
button.row:active { background: var(--surface-2); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { font-size: 14px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .chev { color: var(--text-3); }
.row .datebox { width: 44px; text-align: center; flex: none; }
.row .datebox .wd { font-size: 12px; color: var(--text-2); }
.row .datebox .dn { font-size: 20px; font-weight: 700; line-height: 1.1; }
.row.plain { background: none; padding-left: 0; padding-right: 0; }

.card { background: var(--surface); border-radius: var(--radius); padding: 16px; }
.empty { text-align: center; padding: 40px 16px; color: var(--text-2); }
.empty .btn { margin-top: 16px; }

/* часы */
.hours { padding: 20px 16px; border-radius: 20px; background: var(--accent-soft); margin-top: 12px; }
.hours .big { font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--accent-ink); }
.hours .line { margin-top: 4px; color: var(--text); }
.hours .parts { display: flex; gap: 24px; margin-top: 14px; font-size: 14px; color: var(--text-2); }
.hours .parts b { display: block; font-size: 17px; color: var(--text); }

/* профиль */
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 4px; }
.profile-head .av { margin-bottom: 12px; }
.profile-head h2 { font-size: 24px; font-weight: 700; }
.profile-head .muted { margin-top: 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--surface); font-size: 13px; font-weight: 600; margin-top: 8px; }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.weekdots { display: flex; gap: 6px; }
.weekdots span { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; background: var(--surface); color: var(--text-3); }
.weekdots span.on { background: var(--ok-soft); color: var(--ok); }
.lang-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px;
  padding: 4px 4px 12px 14px; background: var(--surface); border-radius: 14px; margin-bottom: 8px;
}
.lang-row .name { font-weight: 600; }
.lang-row .seg { grid-column: 1 / -1; display: flex; background: var(--bg); margin-right: 10px; }
.lang-row .seg button { flex: 1; padding: 0 6px; white-space: nowrap; font-size: 13px; }
.lang-row .seg button.on { background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }
.card .chip:not(.on), .act-admin .chip:not(.on) { background: var(--bg); }
.filters .input { font-size: 14px; height: 44px; padding-left: 12px; }
.avatar-pick { display: flex; align-items: center; gap: 16px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 12px; background: var(--surface); }
.setting .grow { flex: 1; }

/* ---------------------------------------------------------------- вход */
.auth { max-width: 460px; margin: 0 auto; padding: calc(var(--safe-top) + 24px) 20px calc(32px + var(--safe-bottom)); }
.brand { display: flex; align-items: center; gap: 12px; margin: 16px 0 28px; }
.brand .mark { width: 52px; height: 52px; border-radius: 14px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }
.brand .mark svg { width: 34px; height: 34px; stroke-width: 1.6; }
.brand h1 { font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.brand p { margin: 0; color: var(--text-2); font-size: 14px; }
.auth-top { display: flex; justify-content: flex-end; }
.auth h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.steps { height: 4px; background: var(--surface); border-radius: 2px; margin: 8px 0 20px; overflow: hidden; }
.steps i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .25s ease-out; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 14px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--surface-2); }
.gbtn { background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--surface-2); }

/* ---------------------------------------------------------------- нижняя шторка и диалоги */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; opacity: 0; transition: opacity .2s ease-out; }
.scrim.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-height: 90vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 24px 24px 0 0;
  padding: 8px 16px calc(24px + var(--safe-bottom));
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.sheet.show { transform: none; }
.sheet .grip { width: 40px; height: 4px; border-radius: 2px; background: var(--surface-2); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.sheet-head h2 { flex: 1; font-size: 20px; font-weight: 700; }
.sheet-head .sub { font-size: 14px; color: var(--text-2); font-weight: 500; margin-top: 2px; }

.shifts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
.shift {
  border-radius: 14px; background: var(--surface); padding: 12px; text-align: left;
  box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .12s ease-out, background-color .12s ease-out;
}
.shift b { display: block; font-size: 15px; }
.shift span { font-size: 13px; color: var(--text-2); }
.shift.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.shift.on b { color: var(--accent-ink); }
.custom-hours { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.custom-hours select { flex: 1; }
.mine-box { border-radius: 16px; background: var(--ok-soft); padding: 14px 16px; display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; }
.mine-box .t { font-weight: 700; color: var(--ok); }
.mine-box .s { font-size: 14px; color: var(--text-2); }
.person-line { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.person-line .grow { flex: 1; min-width: 0; }
.person-line .name { font-weight: 600; }
.person-line .hrs { font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }

.dialog { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
/* затемнение внутри окна — ПОД рамкой: раньше оно ложилось поверх, окно было серым,
   а любой клик попадал в затемнение и просто закрывал окно (кнопки «не работали») */
.dialog .scrim { z-index: 0; }
.dialog .box { background: var(--bg); border-radius: 20px; padding: 20px; width: 100%; max-width: 380px; box-shadow: var(--shadow); }
.dialog .box h3 { font-size: 18px; margin-bottom: 8px; }
.dialog .box p { margin: 0 0 16px; color: var(--text-2); }
.dialog .box .stack { margin-top: 8px; }
.secret { font-size: 26px; font-weight: 700; letter-spacing: .06em; text-align: center; padding: 12px; background: var(--surface); border-radius: 12px; margin-bottom: 12px; user-select: all; }

.toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-bottom)); z-index: 70;
  transform: translate(-50%, 16px); opacity: 0;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px;
  font-size: 15px; font-weight: 500; max-width: calc(100vw - 32px); text-align: center;
  transition: opacity .2s ease-out, transform .2s ease-out; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.banner { display: flex; align-items: center; gap: 12px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 14px; padding: 12px 14px; margin: 8px 0; font-size: 14px; font-weight: 500; }
.banner .grow { flex: 1; }

.ann { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 8px; }
.ann h3 { font-size: 17px; }
.ann .body { white-space: pre-wrap; margin: 6px 0 8px; overflow-wrap: anywhere; }
.ann .meta { font-size: 13px; color: var(--text-3); display: flex; align-items: center; justify-content: space-between; }
.ann.unread { background: var(--accent-soft); }

.act-admin { background: var(--surface); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; }
.act-admin .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-weight: 600; }

.skeleton { background: var(--surface); border-radius: var(--radius); height: 76px; margin-bottom: 8px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media (min-width: 720px) {
  .content, .topbar { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }
  .tabbar { justify-content: center; }
  .tabbar button { max-width: 120px; }
  .sheet { max-width: 560px; margin: 0 auto; }
}
