/* Алена Система — планировщик работы. Палитра Pantone 2026 Cloud Dancer. */

:root {
  --page: #F4F1EB;
  /* жидкое стекло: слоистая заливка, блик сверху, свечение внутри и мягкая тень */
  --card: linear-gradient(150deg, rgba(255, 255, 255, .58) 0%, rgba(255, 255, 255, .24) 44%, rgba(255, 255, 255, .42) 100%), rgba(255, 252, 246, .28);
  --glass: blur(30px) saturate(1.7) brightness(1.18);
  --glass-soft: blur(18px) saturate(1.5) brightness(1.14);
  --glass-2: linear-gradient(150deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .38)), rgba(255, 252, 246, .3);
  --glass-field: linear-gradient(150deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .55)), rgba(255, 255, 255, .3);
  --glass-line: transparent;
  --glass-inset:
    inset 0 1px 1px rgba(255, 255, 255, .95),
    inset 0 -1px 1px rgba(255, 255, 255, .45),
    inset 0 0 24px rgba(255, 255, 255, .22),
    0 6px 18px rgba(122, 104, 74, .10),
    0 1px 3px rgba(122, 104, 74, .06);
  --glass-inset-soft:
    inset 0 1px 1px rgba(255, 255, 255, .9),
    inset 0 0 14px rgba(255, 255, 255, .18),
    0 2px 8px rgba(122, 104, 74, .08);
  --line: #E6DDCE;
  --line-soft: rgba(120, 105, 80, .16);
  --ink: #262320;
  --ink-2: #5E5447;
  --ink-3: #6F6552;
  --gold: #C4A46A;
  --gold-deep: #8A6B33;
  --sand: #DDD0BF;
  --wheat: #E9DCC4;
  --c-clients: #6F8577;
  --c-content: #B2803F;
  --c-ads: #A06A55;
  --c-study: #77839A;
  --c-personal: #9C8AA5;
  --tab-h: 68px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

/* светящийся кант по контуру стекла */
.block, .tile, .project, .more-item, .sidebar, .sheet-card, .chip, .btn-line, .btn-danger,
.round-btn, .seg, .dictate, .field, textarea, select, .idea-form input, .norm, .tick {
  position: relative;
}
.block::before, .tile::before, .project::before, .more-item::before, .sidebar::before,
.chip::before, .btn-line::before, .btn-danger::before, .round-btn::before,
.seg::before, .dictate::before, .norm::before, .gate-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .3) 42%, rgba(255, 255, 255, .75));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

html { background-color: #F3EFE7; }

/* ----------------------------------------------------------- подложка-фотография */

.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-position: center 18%;
  background-size: cover;
  background-repeat: no-repeat;
}
/* лёгкая дымка: плотнее вверху, где лежат заголовки, и почти прозрачная ниже */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(246, 243, 237, .88) 0%,
    rgba(246, 243, 237, .66) 12%,
    rgba(246, 243, 237, .30) 26%,
    rgba(246, 243, 237, .16) 46%,
    rgba(246, 243, 237, .22) 100%);
}
/* второе число — какая часть снимка попадает в кадр: чем больше, тем ниже смотрим */
.bg[data-screen="today"],
.bg[data-screen="custom"] { background-image: url(img/bg-today.jpg); background-position: 22% 42%; }
.bg[data-screen="calendar"] { background-image: url(img/bg-calendar.jpg); background-position: center 34%; }
.bg[data-screen="content"] { background-image: url(img/bg-content.jpg); background-position: center 40%; }
.bg[data-screen="clients"] { background-image: url(img/bg-clients.jpg); background-position: center 40%; }
.bg[data-screen="ads"] { background-image: url(img/bg-ads.jpg); background-position: center 46%; }
.bg[data-screen="ideas"] { background-image: url(img/bg-ideas.jpg); background-position: center 64%; }
.bg[data-screen="week"] { background-image: url(img/bg-week.jpg); background-position: center 40%; }
.bg[data-screen="settings"] { background-image: url(img/bg-settings.jpg); background-position: center 42%; }

/* заголовки лежат прямо на фотографии — мягкое белое свечение вместо плашки */
.head-brand, .head-hi, .head h1, .head-date {
  text-shadow: 0 0 10px rgba(255, 253, 249, .95), 0 0 22px rgba(255, 253, 249, .9), 0 1px 0 rgba(255, 253, 249, .85);
}

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, p, ul, li, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.sprite { display: none; }

.ic { width: 20px; height: 20px; flex: none; }
.ic.sm { width: 16px; height: 16px; }

/* ----------------------------------------------------------- каркас */

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px calc(var(--tab-h) + 20px + env(safe-area-inset-bottom));
}

.sidebar { display: none; }
.screen { display: none; }
.screen.is-active { display: block; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ----------------------------------------------------------- шапка */

.head { padding: 14px 2px 10px; }
.head.sub { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.head-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
}

.head-hi, .head h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.15;
}

.head-date { color: #5E564A; font-size: 13px; margin-top: 4px; }

/* ----------------------------------------------------------- кнопка диктовки */

.dictate {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  border: 1px solid rgba(221, 208, 191, .8);
  border-radius: 14px;
  background: rgba(233, 220, 196, .72);
  -webkit-backdrop-filter: var(--glass-soft);
  backdrop-filter: var(--glass-soft);
  box-shadow: var(--glass-inset); color: #4A3E27;
  font-weight: 500;
  margin-bottom: 12px;
}
.dictate:active { background: #E3D4B8; }

/* ----------------------------------------------------------- плитки */

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-bottom: 12px; }
.tiles.two { grid-template-columns: 1fr 1fr; }

.tile {
  background: var(--card);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-inset);
  border-radius: 12px;
  padding: 8px 9px;
  min-width: 0;
}
.tile p { margin: 0; }
.tile-label { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-value { font-family: "Playfair Display", Georgia, serif; font-size: 17px; line-height: 1.25; margin-top: 1px; white-space: nowrap; }
.tile-note { font-size: 11px; color: var(--ink-2); display: none; }
.t-long { display: none; }

@media (min-width: 620px) {
  .tiles { gap: 10px; }
  .tile { padding: 11px 13px; border-radius: 14px; }
  .tile-value { font-size: 21px; }
  .tile-note { display: block; }
  .t-long { display: inline; }
  .t-short { display: none; }
}

/* ----------------------------------------------------------- блоки и списки */

.block {
  background: var(--card);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-inset);
  border-radius: 16px;
  padding: 12px 15px;
  margin-bottom: 12px;
}

.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.block-head h2, details.block > summary h2 { font-family: "Playfair Display", Georgia, serif; font-size: 18px; font-weight: 500; }

details.block > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
details.block > summary::-webkit-details-marker { display: none; }
details.block > summary::after {
  content: "";
  width: 8px; height: 8px; flex: none; margin: 0 4px 4px 0;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg);
}
details.block[open] > summary { margin-bottom: 8px; }
details.block[open] > summary::after { transform: rotate(-135deg); margin-bottom: 0; }

.link-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; padding: 4px 0;
  color: var(--gold-deep); font-size: 13px;
}

.hint { font-size: 13px; color: var(--ink-2); margin: 2px 0 10px; }

.row { display: flex; align-items: flex-start; gap: 11px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.list > li:first-child .row, .list > .row:first-child { border-top: none; }
.more-line { border-top: 1px solid var(--line-soft); padding-top: 4px; }

.tick {
  width: 22px; height: 22px; flex: none; margin-top: 1px;
  border: 1.5px solid var(--sand); border-radius: 50%;
  background: var(--glass-2); display: flex; align-items: center; justify-content: center;
  color: transparent;
}
.tick svg { width: 13px; height: 13px; }
.row.is-done .tick { background: var(--gold); border-color: var(--gold); color: #fff; }
.row.is-done .row-title { color: var(--ink-3); text-decoration: line-through; }

.row-body { flex: 1; min-width: 0; }
.row-title { font-size: 15px; word-wrap: break-word; }
.row-meta { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.row-time { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; padding-top: 1px; }
.row-go { background: none; border: none; color: var(--ink-3); padding: 2px; }

.empty { font-size: 13px; color: var(--ink-3); padding: 10px 0; }

/* ----------------------------------------------------------- календарь */

.seg {
  display: inline-flex; border: 1px solid var(--glass-line); border-radius: 999px;
  background: var(--card); padding: 2px; box-shadow: var(--glass-inset-soft);
  -webkit-backdrop-filter: var(--glass-soft);
  backdrop-filter: var(--glass-soft);
}
.seg button { border: none; background: none; border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--ink-2); }
.seg button.is-active { background: var(--wheat); color: #4A3E27; }

.cal-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-title { font-family: "Playfair Display", Georgia, serif; font-size: 18px; }

.round-btn {
  width: 34px; height: 34px; flex: none;
  border: 1px solid var(--glass-line); border-radius: 50%;
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--glass-soft);
  backdrop-filter: var(--glass-soft);
  box-shadow: var(--glass-inset-soft); display: flex; align-items: center; justify-content: center; color: var(--ink-2);
}

.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.cal-dow span { text-align: center; font-size: 11px; color: var(--ink-3); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-cell {
  aspect-ratio: 1 / 1; border: none; background: none; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 13px; color: var(--ink); padding: 0;
}
.cal-cell.is-out { color: #C9C2B6; }
.cal-cell.is-today { border: 1px solid var(--gold); }
.cal-cell.is-sel { background: var(--wheat); }
.cal-dots { display: flex; gap: 3px; height: 5px; }
.cal-dots .dot { width: 5px; height: 5px; }

.weekly .wk-day { border-top: 1px solid var(--line-soft); padding: 10px 0 6px; }
.weekly .wk-day:first-child { border-top: none; }
.wk-name { font-family: "Playfair Display", Georgia, serif; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); }
.wk-name span { font-family: Inter, sans-serif; letter-spacing: 0; text-transform: none; color: var(--ink-3); font-size: 12px; margin-left: 6px; }
.wk-line { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line-soft); padding: 7px 0 6px; font-size: 14px; }
.wk-line.is-empty { color: #CFC7B9; }
.wk-line.is-done span { color: var(--ink-3); text-decoration: line-through; }

/* ----------------------------------------------------------- нормы и полосы */

.norms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.norm { background: var(--glass-2); border: 1px solid var(--glass-line); border-radius: 12px; box-shadow: var(--glass-inset-soft); padding: 10px 12px; }
.norm-name { font-size: 12px; color: var(--ink-3); }
.norm-val { font-family: "Playfair Display", Georgia, serif; font-size: 20px; }
.bar { height: 4px; border-radius: 4px; background: var(--line-soft); margin-top: 7px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--gold); }

.sec-row2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.sec-row2 .field { height: 40px; font-size: 15px; }
.add-btn { height: 38px; font-size: 14px; margin: 2px 0 10px; }

.sec-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.sec-row .field { flex: 1 1 150px; }
.sec-row .field { height: 40px; font-size: 15px; }
.sec-row .chip { white-space: nowrap; padding: 7px 10px; }
.round-btn[disabled] { opacity: .4; }
.rot-up { transform: rotate(-90deg); }
.rot-down { transform: rotate(90deg); }

.norm-set { display: grid; gap: 10px; }
.norm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.norm-row label { font-size: 14px; }
.norm-row input { width: 76px; height: 40px; text-align: center; }

.wbar { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; }
.wbar .bar { flex: 1; margin: 0; }
.wbar b { font-weight: 500; font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; }

/* ----------------------------------------------------------- чипы, поля */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.chip {
  border: 1px solid var(--glass-line); background: var(--glass-2);
  -webkit-backdrop-filter: var(--glass-soft);
  backdrop-filter: var(--glass-soft);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; color: var(--ink-2);
}
.chip.is-on { background: var(--wheat); border-color: var(--sand); color: #4A3E27; }

.lbl { display: block; font-size: 12px; color: var(--ink-3); margin: 12px 0 5px; }

.field, textarea, select {
  width: 100%; border: 1px solid var(--glass-line); border-radius: 12px;
  background: var(--glass-field);
  -webkit-backdrop-filter: var(--glass-soft);
  backdrop-filter: var(--glass-soft);
  font-family: inherit; font-size: 16px; color: var(--ink); padding: 11px 12px;
}
.field { height: 46px; padding: 0 12px; }
textarea { resize: vertical; line-height: 1.45; }
select { height: 46px; padding: 0 10px; appearance: none; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn-gold {
  background: var(--gold-deep); color: #fff; border: none; border-radius: 12px;
  height: 46px; padding: 0 20px; font-weight: 500;
}
.btn-gold.wide { width: 100%; margin-top: 12px; }
.btn-gold:active { background: #795E2C; }
.btn-line {
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--glass-soft);
  backdrop-filter: var(--glass-soft);
  border: 1px solid var(--glass-line); box-shadow: var(--glass-inset-soft); border-radius: 12px; height: 46px; padding: 0 18px;
}
.btn-danger {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 12px; height: 44px;
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--glass-soft);
  backdrop-filter: var(--glass-soft);
  color: #9A4B3C; border: 1px solid rgba(230, 214, 207, .8); border-radius: 12px; font-size: 14px;
}

.idea-form { display: flex; gap: 8px; margin-bottom: 4px; }
.idea-form input {
  flex: 1; height: 46px; border: 1px solid var(--glass-line); border-radius: 12px;
  background: var(--glass-field); padding: 0 12px; font-size: 16px; font-family: inherit;
}

/* ----------------------------------------------------------- проекты */

.project {
  background: var(--card);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-inset);
  border-radius: 16px; padding: 14px 16px; margin-bottom: 12px;
}
.project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project-name { font-family: "Playfair Display", Georgia, serif; font-size: 18px; font-weight: 500; }
.project-client { font-size: 13px; color: var(--ink-2); }
.stage-line { display: flex; gap: 4px; margin: 12px 0 8px; }
.stage-line i { flex: 1; height: 3px; border-radius: 3px; background: var(--line-soft); }
.stage-line i.is-on { background: var(--gold); }
.stage-now { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 10px; }

/* ----------------------------------------------------------- шторки */

.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(47, 43, 38, .38); }
.sheet-card {
  position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  background: rgba(247, 244, 238, .82);
  -webkit-backdrop-filter: blur(30px) saturate(1.6) brightness(1.08);
  backdrop-filter: blur(30px) saturate(1.6) brightness(1.08);
  border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  animation: up .2s ease-out;
}
@keyframes up { from { transform: translateY(16px); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sheet-head h2 { font-family: "Playfair Display", Georgia, serif; font-size: 20px; font-weight: 500; }

/* в шторке всё плотнее, чтобы помещалось без прокрутки */
.sheet-card .lbl { margin: 10px 0 4px; }
.sheet-card .field { height: 42px; }
.sheet-card select { height: 42px; }
.sheet-card textarea { padding: 8px 12px; }
.sheet-card .chips { gap: 6px; margin: 0 0 2px; }
.sheet-card .chips.scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.sheet-card .chips.scroll::-webkit-scrollbar { display: none; }
.sheet-card .chips.scroll .chip { flex: none; }
.sheet-card .row-btns { margin-top: 12px; }
.sheet-card .btn-gold, .sheet-card .btn-line { height: 42px; }
.sheet-card .btn-danger { height: 40px; margin-top: 8px; }

.parsed-count { font-size: 13px; color: var(--ink-2); margin: 16px 0 2px; }
.parsed { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.parsed-title { font-size: 15px; }
.parsed-edit { display: grid; grid-template-columns: 1fr 96px 34px; gap: 8px; margin-top: 8px; align-items: center; }
.parsed-edit input { height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; font-size: 15px; font-family: inherit; background: #fff; }
.parsed-drop { background: none; border: none; color: var(--ink-3); display: flex; align-items: center; justify-content: center; }

.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.more-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--glass-soft);
  backdrop-filter: var(--glass-soft);
  border: 1px solid var(--glass-line); box-shadow: var(--glass-inset); border-radius: 14px; padding: 14px; font-size: 14px;
}

/* ----------------------------------------------------------- нижняя панель */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: flex-start; justify-content: space-around;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding: 8px 4px env(safe-area-inset-bottom);
  background: rgba(250, 247, 242, .62);
  -webkit-backdrop-filter: blur(26px) saturate(1.6) brightness(1.1);
  backdrop-filter: blur(26px) saturate(1.6) brightness(1.1);
  border-top: 1px solid var(--glass-line);
}
.tab {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: var(--ink-3); font-size: 10px; padding: 2px 0;
}
.tab span { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab.is-active { color: var(--gold-deep); }
.tab-mic { margin-top: -18px; }
.mic-circle {
  width: 48px; height: 48px; border-radius: 50%; background: var(--gold-deep); color: #fff;
  display: flex; align-items: center; justify-content: center; border: 3px solid var(--page);
}

/* ----------------------------------------------------------- вход по приглашению */

.gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(244, 241, 235, .5);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
}
.gate-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  text-align: center;
  background: var(--card);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-inset);
  border-radius: 20px;
  padding: 26px 22px 22px;
}
.gate-title { font-family: "Playfair Display", Georgia, serif; font-size: 24px; font-weight: 500; margin-bottom: 8px; }
.gate-text { font-size: 14px; color: var(--ink-2); margin-bottom: 18px; }
.gate-form { display: grid; gap: 10px; text-align: left; }
.gate-form .field { text-align: center; }
.gate-error { font-size: 13px; color: #9A4B3C; text-align: center; }
.gate-link { display: flex; align-items: center; justify-content: center; margin-top: 12px; text-decoration: none; color: var(--ink); }

/* ----------------------------------------------------------- тост */

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); z-index: 60;
  background: #3A342C; color: #FFFDF9; font-size: 14px;
  padding: 10px 16px; border-radius: 12px; max-width: 88%;
}

/* ----------------------------------------------------------- широкий экран */

@media (min-width: 900px) {
  .app {
    display: grid; grid-template-columns: 216px minmax(0, 1fr);
    gap: 32px; max-width: 1060px; padding: 24px 24px 40px;
  }
  .sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 24px;
    height: auto;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: var(--card);
    -webkit-backdrop-filter: var(--glass);
    backdrop-filter: var(--glass);
    border: 1px solid var(--glass-line);
    box-shadow: var(--glass-inset);
    border-radius: 18px;
    padding: 18px 10px 14px;
  }
  .tabbar { display: none; }
  .brand {
    font-family: "Playfair Display", Georgia, serif; font-size: 21px; line-height: 1.1;
    padding: 2px 10px 18px;
  }
  .brand span { display: block; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep); margin-top: 4px; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-link {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: none; border: none; border-radius: 10px; padding: 9px 10px;
    color: var(--ink-2); font-size: 14px; text-align: left;
  }
  .side-link:hover { background: #F2EDE4; }
  .side-link.is-active { background: var(--wheat); color: #4A3E27; }
  .side-last { margin-top: 2px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .norms { grid-template-columns: repeat(4, 1fr); }
  .head { padding-top: 4px; }

  /* на широком экране вертикальный снимок обрезался бы по высоте,
     поэтому здесь свои кадры — горизонтальные, с человеком целиком */
  .bg { background-position: center !important; }
  .bg[data-screen="today"],
  .bg[data-screen="custom"] { background-image: url(img/bg-today-wide.jpg); }
  .bg[data-screen="calendar"] { background-image: url(img/bg-calendar-wide.jpg); }
  .bg[data-screen="content"] { background-image: url(img/bg-content-wide.jpg); }
  .bg[data-screen="clients"] { background-image: url(img/bg-clients-wide.jpg); }
  .bg[data-screen="ads"] { background-image: url(img/bg-ads-wide.jpg); }
  .bg[data-screen="ideas"] { background-image: url(img/bg-ideas-wide.jpg); }
  .bg[data-screen="week"] { background-image: url(img/bg-week-wide.jpg); }
  .bg[data-screen="settings"] { background-image: url(img/bg-settings-wide.jpg); }

  /* календарь: месяц и день друг под другом, сетка компактная */
  #cal-month-wrap, #cal-day-wrap, #cal-week-wrap { max-width: 540px; }
  .cal-cell { aspect-ratio: 1.3 / 1; font-size: 14px; }
  .sheet { align-items: center; }
  .sheet-card { border-radius: 18px; max-width: 520px; max-height: 86vh; }
  .toast { bottom: 24px; }
}
