:root {
  --bg: #f6f4ef; --surface: #ffffff; --surface2: #f0ede6; --surface3: #e8e4da; --line: #e3dfd4;
  --text: #17161b; --muted: #6d6a75; --faint: #a19ea8;
  --gold: #b07f22; --gold2: #d9a640; --gold-soft: rgba(176, 127, 34, .12);
  --danger: #d64545; --ok: #1f9d68; --warn: #c27a12; --info: #4a63e0;
  --shadow: 0 1px 2px rgba(20, 18, 10, .06), 0 8px 24px rgba(20, 18, 10, .07);
  --radius: 16px; --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0f; --surface: #131319; --surface2: #1a1a22; --surface3: #23232d; --line: #262630;
    --text: #f3f1ea; --muted: #9d9aa8; --faint: #66636f;
    --gold: #e2b65a; --gold2: #f5d58a; --gold-soft: rgba(226, 182, 90, .13);
    --danger: #ff6b6b; --ok: #3ddc97; --warn: #f0a33a; --info: #8095ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0f; --surface: #131319; --surface2: #1a1a22; --surface3: #23232d; --line: #262630;
  --text: #f3f1ea; --muted: #9d9aa8; --faint: #66636f;
  --gold: #e2b65a; --gold2: #f5d58a; --gold-soft: rgba(226, 182, 90, .13);
  --danger: #ff6b6b; --ok: #3ddc97; --warn: #f0a33a; --info: #8095ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.boot { display: grid; place-items: center; height: 100vh; }
.boot-mark, .mark { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font: 800 22px/1 var(--display); color: #120e05; background: linear-gradient(135deg, var(--gold2), var(--gold)); box-shadow: 0 6px 20px var(--gold-soft); }

/* ---------- вход ---------- */
.club { position: fixed; inset: 0; display: grid; place-items: end center; background: #08070b url(/img/club-entrance.svg) center 30% / cover no-repeat; overflow: auto; }
.club::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 7, 11, .15) 0%, rgba(8, 7, 11, .25) 45%, rgba(8, 7, 11, .9) 100%); pointer-events: none; }
.club-card { position: relative; z-index: 1; width: min(420px, calc(100% - 32px)); margin: 0 16px calc(28px + var(--safe-b)); padding: 26px 24px 22px; border-radius: 22px; color: #f3f1ea;
  background: rgba(16, 14, 20, .72); border: 1px solid rgba(226, 182, 90, .35); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.club-card h1 { margin: 0 0 4px; font: 700 24px/1.15 var(--display); letter-spacing: .02em; }
.club-card .rope { display: flex; align-items: center; gap: 10px; color: #e2b65a; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 14px; }
.club-card .rope::before, .club-card .rope::after { content: ""; flex: 1; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #6d0e16, #b3202b, #6d0e16); }
.club-card p.sub { margin: 0 0 18px; color: #b9b5c4; }
.club-card label { display: block; font-size: 13px; color: #b9b5c4; margin: 12px 0 6px; }
.club-card input { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #fff; font-size: 16px; }
.club-card input:focus { border-color: #e2b65a; outline: none; box-shadow: 0 0 0 3px rgba(226, 182, 90, .2); }
.club-card .err { color: #ff8a8a; min-height: 20px; margin: 10px 0 0; font-size: 14px; }
.club-card .shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.btn-gold { width: 100%; padding: 14px; border: 0; border-radius: 13px; font-weight: 700; font-size: 16px; color: #140f05; background: linear-gradient(135deg, #f5d58a, #d9a640); box-shadow: 0 8px 24px rgba(226, 182, 90, .25); }
.btn-gold:active { transform: translateY(1px); }
.btn-ghost-light { width: 100%; padding: 13px; margin-top: 10px; border-radius: 13px; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: #f3f1ea; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
.faceid { width: 22px; height: 22px; }

/* ---------- каркас ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.shell.with-detail { grid-template-columns: 248px minmax(0, 1fr) 420px; }
.side { position: sticky; top: 0; height: 100vh; padding: 18px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand b { font: 700 17px/1 var(--display); letter-spacing: .01em; }
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none; border: 0; background: none; width: 100%; text-align: left; }
.nav:hover { background: var(--surface2); }
.nav[aria-current="page"] { background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav .count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav .count.hot { color: var(--danger); font-weight: 700; }
.side h6 { margin: 18px 10px 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.side .foot { margin-top: auto; padding-top: 12px; }
.kbd { font: 600 11px/1 var(--font); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }

main { min-width: 0; padding: 26px clamp(16px, 4vw, 44px) 120px; max-width: 1080px; width: 100%; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.head h1 { margin: 0; font: 750 30px/1.1 var(--display); letter-spacing: -.01em; }
.head .kicker { color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.head .meta { color: var(--muted); font-size: 14px; }

/* быстрый ввод */
.quick { position: relative; margin: 0 0 22px; }
.quick input { width: 100%; padding: 15px 16px 15px 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 16px; box-shadow: var(--shadow); }
.quick input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft), var(--shadow); }
.quick .plus { position: absolute; left: 14px; top: 13px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); font-weight: 700; }
.quick .hint { position: absolute; right: 14px; top: 15px; color: var(--faint); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 26px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; background: var(--surface2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip.gold { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.chip.red { color: var(--danger); }
button.chip:hover { border-color: var(--gold); color: var(--text); }

/* пульс проектов */
.pulse { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 12px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 18px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pulse::-webkit-scrollbar { display: none; }
.pcard { scroll-snap-align: start; position: relative; padding: 14px 14px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; min-height: 132px; display: flex; flex-direction: column; }
.pcard::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--pc); }
.pcard .t { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.pcard .t a { margin-left: auto; font-size: 12px; text-decoration: none; padding: 3px 8px; border-radius: 8px; background: var(--surface2); color: var(--muted); }
.pcard .t a:hover { color: var(--gold); }
.pcard .nums { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.pcard .num b { display: block; font: 700 22px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.pcard .num span { font-size: 11.5px; color: var(--muted); }
.pcard .site { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.pcard .site i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.pcard .site.down { color: var(--danger); } .pcard .site.down i { background: var(--danger); }
.pcard .foot { margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--muted); display: flex; gap: 10px; }
.pcard .foot .warn { color: var(--danger); }

/* ритуал */
.ritual { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin-bottom: 18px; border-radius: var(--radius); background: linear-gradient(120deg, var(--gold-soft), transparent 70%), var(--surface); border: 1px solid var(--line); }
.ritual .ico { font-size: 26px; }
.ritual b { display: block; }
.ritual span { color: var(--muted); font-size: 14px; }
.ritual .go { margin-left: auto; flex: none; }

/* загрузка дня */
.meter { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.meter .bar { width: 140px; height: 8px; border-radius: 8px; background: var(--surface3); overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--ok), var(--gold)); }
.meter .bar i.over { background: linear-gradient(90deg, var(--warn), var(--danger)); }
.ring { --p: 0; width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--surface3) 0); display: grid; place-items: center; }
.ring span { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font: 700 12px/1 var(--font); color: var(--text); }

/* списки задач */
section.group { margin-bottom: 22px; }
section.group > h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
section.group > h2 .n { color: var(--faint); font-weight: 500; }
section.group.top > h2 { color: var(--gold); }
.list { display: flex; flex-direction: column; gap: 6px; }
.task { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 11px 12px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); transition: transform .15s, opacity .25s, background .15s; cursor: pointer; }
.task:hover { border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.task.sel { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.task.done { opacity: .55; }
.task.done .title { text-decoration: line-through; }
.task.leaving { opacity: 0; transform: translateX(16px); }
.check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--faint); background: transparent; display: grid; place-items: center; padding: 0; margin-top: 1px; transition: all .15s; }
.check:hover { border-color: var(--ok); }
.check.p3 { border-color: var(--danger); } .check.p2 { border-color: var(--warn); }
.check.on { background: var(--ok); border-color: var(--ok); }
.check.on::after { content: ""; width: 10px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.event-ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--surface2); color: var(--info); font-size: 13px; }
.title { font-weight: 550; overflow-wrap: anywhere; }
.sub { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 4px; font-size: 12.5px; color: var(--muted); align-items: center; }
.sub .p { display: inline-flex; align-items: center; gap: 5px; }
.sub .late { color: var(--danger); }
.sub .ai { color: var(--gold); }
.time { font: 600 13px/1.6 var(--font); font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.star { border: 0; background: none; color: var(--faint); font-size: 17px; padding: 0 2px; line-height: 1; }
.star.on { color: var(--gold); }
.empty { padding: 22px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty b { display: block; color: var(--text); margin-bottom: 4px; font-size: 16px; }
.tri { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* кнопки */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; color: var(--text); text-decoration: none; }
.btn:hover { border-color: var(--gold); }
.btn.primary { background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #140f05; border-color: transparent; }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* карточка задачи */
.detail { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-left: 1px solid var(--line); background: var(--surface); padding: 18px 18px 120px; }
.detail .bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.detail .bar .x { margin-left: auto; }
.detail textarea.t { width: 100%; border: 0; background: transparent; font: 700 21px/1.3 var(--display); resize: none; padding: 4px 0; }
.detail textarea.t:focus { outline: none; }
.fields { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 10px; align-items: center; margin: 12px 0 16px; font-size: 14px; }
.fields > span { color: var(--muted); }
.fields input, .fields select, .notes { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface2); width: 100%; min-width: 0; }
.notes { min-height: 90px; resize: vertical; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--surface2); padding: 7px 10px; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--gold-soft); color: var(--gold); font-weight: 650; }
.brief { margin-top: 18px; }
.brief h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
.brief h3 .n { margin-left: auto; font-weight: 500; color: var(--faint); letter-spacing: 0; text-transform: none; }
.item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.item .cb { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--faint); background: none; padding: 0; display: grid; place-items: center; }
.item .cb.on { background: var(--ok); border-color: var(--ok); }
.item .cb.on::after { content: ""; width: 8px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.item.done .txt { color: var(--muted); text-decoration: line-through; }
.item .mk { width: 20px; text-align: center; }
.item small { display: block; color: var(--muted); margin-top: 2px; }
.sev3 { color: var(--danger); } .sev2 { color: var(--warn); } .sev1 { color: var(--muted); }
.ai-card { margin-top: 14px; padding: 12px 14px; border-radius: 13px; background: var(--gold-soft); color: var(--text); font-size: 14px; display: flex; gap: 10px; align-items: center; }
.ai-card .btn { margin-left: auto; flex: none; }
.hist { margin-top: 20px; font-size: 12.5px; color: var(--muted); }
.hist div { padding: 4px 0; }

/* календарь */
.cal-head { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.cal { display: grid; grid-template-columns: 52px repeat(var(--days), minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cal .dh { position: sticky; top: 0; z-index: 2; padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface); font-size: 12px; color: var(--muted); }
.cal .dh b { display: block; font: 700 18px/1.2 var(--display); color: var(--text); }
.cal .dh.today b { color: var(--gold); }
.cal .allday { border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; min-height: 34px; display: flex; flex-direction: column; gap: 3px; }
.cal .corner { border-bottom: 1px solid var(--line); font-size: 10px; color: var(--faint); padding: 6px 4px; }
.cal .hours { position: relative; }
.cal .hl { height: 48px; font-size: 10.5px; color: var(--faint); text-align: right; padding: 0 6px; transform: translateY(-7px); }
.cal .col { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(var(--line) 0 1px, transparent 1px 48px); }
.cal .col.today { background-color: color-mix(in srgb, var(--gold) 4%, transparent); }
.cal .now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; }
.cal .now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.blk { position: absolute; left: 3px; right: 3px; padding: 4px 6px; border-radius: 8px; font-size: 12px; line-height: 1.25; overflow: hidden; background: color-mix(in srgb, var(--pc) 18%, var(--surface)); border-left: 3px solid var(--pc); cursor: grab; touch-action: none; }
.blk.done { opacity: .5; text-decoration: line-through; }
.blk b { font-weight: 650; display: block; }
.blk.drag { opacity: .85; box-shadow: var(--shadow); z-index: 5; cursor: grabbing; }
.adc { font-size: 11.5px; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--pc) 16%, var(--surface)); border-left: 3px solid var(--pc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }

/* пульс, настройки */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.card { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; }
.kv span { color: var(--muted); }
.kv b { font-variant-numeric: tabular-nums; }
.code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px; border-radius: 10px; background: var(--surface2); overflow-wrap: anywhere; user-select: all; }
.input { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t td, table.t th { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.t th { color: var(--muted); font-weight: 600; }

/* закрытие дня */
.close-list .task { cursor: default; }

/* моб. */
.tabbar, .fab { display: none; }
#toasts { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 13px; background: #18171d; color: #f3f1ea; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); font-size: 14px; animation: up .2s; }
.toast button { border: 0; background: none; color: #f5d58a; font-weight: 700; }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 50; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: var(--surface); border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + var(--safe-b)); max-height: 92vh; overflow-y: auto; animation: rise .22s cubic-bezier(.2, .9, .3, 1); }
@keyframes rise { from { transform: translateY(100%); } }
.sheet .grab { width: 40px; height: 5px; border-radius: 5px; background: var(--surface3); margin: -4px auto 12px; }
.palette { position: fixed; top: 12vh; left: 50%; transform: translateX(-50%); width: min(620px, calc(100% - 32px)); z-index: 51; background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); border: 1px solid var(--line); }

@media (max-width: 1180px) { .shell.with-detail { grid-template-columns: 248px minmax(0, 1fr); } .shell.with-detail .detail { position: fixed; right: 0; top: 0; width: min(440px, 100%); z-index: 40; box-shadow: var(--shadow); } }
@media (max-width: 820px) {
  .shell, .shell.with-detail { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  main { padding: calc(14px + var(--safe-t)) 16px calc(110px + var(--safe-b)); }
  .head h1 { font-size: 26px; }
  .quick { display: none; }
  .detail { position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important; z-index: 45; padding-top: calc(14px + var(--safe-t)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 6px 6px calc(6px + var(--safe-b)); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 10.5px; color: var(--muted); text-decoration: none; border: 0; background: none; }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar [aria-current="page"] { color: var(--gold); }
  .tabbar .add { margin-top: -22px; }
  .tabbar .add span { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; font-weight: 400; color: #140f05; background: linear-gradient(135deg, var(--gold2), var(--gold)); box-shadow: 0 10px 26px var(--gold-soft), 0 4px 12px rgba(0, 0, 0, .25); }
  .cal { --days: 1 !important; }
  .task { padding: 12px; }
  .pulse { grid-auto-columns: 72%; }
  .pcard { min-height: 0; }
  .head .row { width: 100%; justify-content: space-between; }
  .fields { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* анкета /drop */
.drop { max-width: 640px; margin: 0 auto; padding: 24px 16px 80px; }
.drop-fields { display: flex; flex-direction: column; gap: 6px; }
.drop-fields label { font-size: 14px; margin-top: 10px; }
.drop-fields label.inline { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 4px; }
.drop-fields label.inline input { width: auto; }
.drop-fields input:not([type=checkbox]), .drop-fields select, .drop-fields textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); font-size: 16px; }
.drop-fields .muted { color: var(--muted); font-weight: 400; }
.drop-fields .status { margin: 0; font-size: 13px; color: var(--muted); min-height: 18px; }
.drop-fields .three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.drop-fields details summary { cursor: pointer; font-weight: 650; margin: 14px 0 4px; }
.drop-fields details label { display: block; }
.btn.wide { width: 100%; justify-content: center; padding: 13px; margin-top: 14px; }
#result { margin: 12px 0 0; min-height: 22px; font-weight: 600; }
