/* Onest is served from this server so the board never waits on a third-party CDN. */
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Deliberately single-theme: a dark workspace, as the owner asked. */
:root {
  --ground: #131316;
  --bar: #17171b;
  --surface: #1b1b20;
  --card: #232329;
  --card-hover: #2a2a31;
  --line: #2d2d35;
  --line-2: #3b3b45;
  --text: #ededf1;
  --muted: #8b8b97;
  --faint: #5f5f6b;
  --accent: #6cc04a;
  --blue: #5aa9ff;
  --ink: #17171a;
  --danger: #ff7a70;
  --s-dev: #f4a7da;
  --s-fam: #8ad6f7;
  --s-biz: #cdee3a;
  --s-hob: #ffc529;
  --s-work: #e4e4e8;
  color-scheme: dark;
}
html, body { height: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 14px/1.42 "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.spacer { flex: 1; }
.app { height: 100%; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--accent); color: #0f2208; }
.mark svg { width: 16px; height: 16px; }

/* ---------- login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; box-sizing: border-box; }
.login-card {
  width: min(360px, 100%); box-sizing: border-box; display: grid; gap: 14px; padding: 26px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.login-card h1 { margin: 0 0 4px; font-size: 20px; }
.big-mark { width: 40px; height: 40px; border-radius: 11px; }
.big-mark svg { width: 22px; height: 22px; }
.login-card input {
  width: 100%; box-sizing: border-box; padding: 9px 11px; border-radius: 9px;
  border: 1px solid var(--line-2); background: var(--ground); outline: none;
}
.login-card input:focus { border-color: var(--accent); }
.login-err { margin: 0; color: var(--danger); font-size: 13px; }

/* ---------- sidebar ---------- */
.side {
  background: var(--bar); border-right: 1px solid var(--line); min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px; padding: 14px 10px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 4px; font-weight: 700; font-size: 15px; }
.sec { display: grid; gap: 2px; }
.sec-title { color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; }
.nav-row { position: relative; }
.nav {
  display: flex; align-items: center; gap: 9px; width: 100%; box-sizing: border-box; text-align: left;
  padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 500;
}
.nav:hover { background: var(--card); color: var(--text); }
.nav[aria-current="page"] { background: var(--card); color: var(--text); }
.nav svg { width: 16px; height: 16px; flex: none; }
.nav .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; margin: 0 3px; background: var(--pc, var(--faint)); }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.nav-more {
  position: absolute; right: 4px; top: 4px; width: 26px; height: 26px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer; display: none; place-items: center;
}
.nav-row:hover .nav-more, .nav-more[aria-expanded="true"], .nav-row.active .nav-more { display: grid; }
.nav-row:hover .nav-count, .nav-row.active .nav-count { visibility: hidden; }
.nav-more:hover { background: var(--card-hover); color: var(--text); }
.nav-more svg { width: 14px; height: 14px; }
.nav-add { color: var(--faint); }
.side form { padding: 4px 4px 6px; display: grid; gap: 8px; }
.side input[type="text"], .side input:not([type]) {
  width: 100%; box-sizing: border-box; padding: 6px 8px; border-radius: 7px;
  border: 1px solid var(--line-2); background: var(--ground); outline: none;
}
.side input:focus { border-color: var(--accent); }
.side .check-line { padding: 0; font-size: 12.5px; color: var(--muted); }
.side .menu { top: 34px; right: 4px; left: auto; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 8px 6px 2px; border-top: 1px solid var(--line); }
.avatar { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--card-hover); font-size: 12px; font-weight: 700; }
.me-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.link-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; font-size: 12.5px; }
.link-btn:hover { color: var(--text); background: var(--card); }

/* ---------- main column ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; background: var(--ground); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
#cal-controls { gap: 8px; }
.view-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.view-badge { font-size: 11.5px; font-weight: 600; color: var(--s-fam); background: rgba(138, 214, 247, .12); padding: 2px 8px; border-radius: 999px; letter-spacing: 0; }
.search {
  display: flex; align-items: center; gap: 7px; width: 220px; max-width: 100%;
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
}
.search:focus-within { border-color: var(--line-2); }
.search svg { width: 14px; height: 14px; color: var(--faint); flex: none; }
.search input { border: 0; outline: none; background: transparent; width: 100%; padding: 0; }
.search input::placeholder { color: var(--faint); }
.ghost-btn {
  border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
  padding: 6px 11px; border-radius: 8px; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.ghost-btn:hover { background: var(--card); border-color: var(--line-2); }
.ghost-btn.icon { padding: 6px 9px; }
.ghost-btn svg { width: 14px; height: 14px; }
.ghost-btn.on { color: var(--accent); border-color: rgba(108, 192, 74, .35); }
.ghost-btn.warn { color: var(--muted); }
.filter-label { color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text);
  border-radius: 999px; padding: 3px 10px 3px 8px; font-size: 12.5px; font-weight: 500;
}
.chip:hover { border-color: var(--line-2); background: var(--card); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
.chip[aria-pressed="true"] { background: var(--sc); border-color: var(--sc); color: var(--ink); }
.chip[aria-pressed="true"] .dot { background: var(--ink); }
.stats { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.stats b { color: var(--text); font-weight: 600; }
.view { flex: 1; min-height: 0; display: flex; }

/* ---------- board ---------- */
.board {
  flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px;
  overflow-x: auto; padding: 16px; scrollbar-color: #3d3d47 transparent;
}
.col {
  --c: #9a9aa6;
  flex: 0 0 284px; max-height: 100%; display: flex; flex-direction: column; position: relative;
  background: var(--surface); background: color-mix(in srgb, var(--c) 6%, var(--surface));
  border: 1px solid var(--line); border-color: color-mix(in srgb, var(--c) 14%, var(--line));
  border-radius: 12px;
}
.col-head { display: flex; align-items: center; gap: 8px; padding: 10px 8px 6px 10px; }
.col-drag { flex: 1; min-width: 0; cursor: grab; display: flex; align-items: center; gap: 6px; touch-action: none; }
.grip { flex: none; display: grid; place-items: center; width: 12px; color: var(--faint); opacity: .5; transition: opacity .12s; }
.grip svg { width: 10px; height: 14px; }
.col-head:hover .grip { opacity: 1; }
.pill {
  display: inline-flex; align-items: flex-start; gap: 6px; min-width: 0;
  padding: 3px 9px 3px 7px; border-radius: 7px; font-weight: 600; font-size: 13px; line-height: 1.35;
  color: var(--c); color: color-mix(in srgb, var(--c) 72%, #fff);
  background: rgba(255, 255, 255, .06); background: color-mix(in srgb, var(--c) 16%, transparent);
}
.pill svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--c); }
.pill-text { text-wrap: balance; }
.count { color: var(--muted); font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.icon-btn {
  margin-left: auto; flex: none; width: 28px; height: 28px; border-radius: 7px; border: 0; cursor: pointer;
  background: transparent; color: var(--muted); display: grid; place-items: center;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--card-hover); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }
.rename { flex: 1; min-width: 0; }
.rename input {
  width: 100%; box-sizing: border-box; padding: 4px 8px; border-radius: 7px;
  border: 1px solid var(--c); background: var(--ground); font-weight: 600; font-size: 13px; outline: none;
}
.add-row {
  margin: 0 8px 4px; padding: 6px 8px; border: 0; border-radius: 8px; cursor: pointer; text-align: left;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 500;
}
.add-row:hover { background: var(--card); color: var(--text); }
.composer { margin: 0 8px 6px; padding: 8px; border-radius: 10px; background: var(--card); border: 1px solid var(--line-2); }
.composer textarea { width: 100%; box-sizing: border-box; border: 0; outline: none; resize: none; background: transparent; padding: 2px; }
.composer textarea::placeholder { color: var(--faint); }
.composer-actions { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.hint { color: var(--faint); font-size: 11.5px; margin-left: auto; }
.list {
  flex: 1; min-height: 56px; overflow-y: auto; padding: 2px 8px 10px; display: flex; flex-direction: column; gap: 6px;
  scrollbar-color: #3d3d47 transparent;
}
.list:empty::before {
  content: "Перетащи сюда карточку"; display: grid; place-items: center; height: 56px;
  border: 1px dashed var(--line-2); border-radius: 10px; color: var(--faint); font-size: 12.5px;
}
.more { margin: 0 8px 10px; padding: 7px; border: 0; border-radius: 8px; cursor: pointer; background: transparent; color: var(--muted); font-size: 12.5px; }
.more:hover { background: var(--card); color: var(--text); }
.col-float { opacity: .96 !important; transform: rotate(1.5deg); box-shadow: 0 24px 50px rgba(0, 0, 0, .55); }
.col.col-ghost { opacity: .35; }

.menu {
  position: absolute; top: 42px; right: 8px; z-index: 8; width: 224px; padding: 6px;
  background: #26262d; border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}
.menu-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer;
  padding: 7px 9px; border-radius: 7px; font-size: 13px; color: var(--text);
}
.menu-item:hover:not(:disabled) { background: var(--card-hover); }
.menu-item.danger { color: var(--danger); }
.menu-item:disabled { cursor: default; color: var(--faint); }
.menu-item small { display: block; color: var(--faint); font-size: 11.5px; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 3px; }
.menu-label { color: var(--faint); font-size: 11.5px; padding: 4px 9px 2px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 9px 6px; }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 0; cursor: pointer; background: var(--sw); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #26262d, 0 0 0 4px var(--sw); }

.add-col { flex: 0 0 284px; }
.add-col-btn {
  width: 100%; padding: 11px 12px; border-radius: 12px; cursor: pointer; text-align: left;
  border: 1px dashed var(--line-2); background: transparent; color: var(--muted); font-weight: 600;
}
.add-col-btn:hover { color: var(--text); border-color: var(--faint); background: var(--surface); }
.add-col form { padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); display: grid; gap: 8px; }
.add-col input { width: 100%; box-sizing: border-box; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--ground); outline: none; }
.add-col input:focus { border-color: var(--accent); }

.card {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 5px 9px; align-items: start;
  padding: 9px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line);
  cursor: grab; user-select: none; -webkit-user-select: none; transition: border-color .12s, background-color .12s;
}
.card:hover { background: var(--card-hover); border-color: var(--line-2); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cb {
  width: 17px; height: 17px; margin-top: 1px; padding: 0; cursor: pointer; border-radius: 50%;
  border: 1.5px solid var(--faint); background: transparent; display: grid; place-items: center;
}
.cb:hover { border-color: var(--accent); }
.cb svg { width: 10px; height: 10px; opacity: 0; }
.is-done > .cb { background: var(--accent); border-color: var(--accent); }
.is-done > .cb svg { opacity: 1; }
.cb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.title { font-size: 13.5px; line-height: 1.42; overflow-wrap: anywhere; }
.card.is-done .title { color: var(--muted); }
.meta { grid-column: 2; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.meta:empty { display: none; }
.tag { font-size: 11.5px; font-weight: 600; line-height: 1.5; padding: 0 7px; border-radius: 5px; color: var(--ink); background: var(--sc); }
.tag.me { color: var(--blue); background: rgba(90, 169, 255, .15); }
.card.is-done .tag { opacity: .7; }
.mini { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.mini svg { width: 12px; height: 12px; }
.mini.late { color: var(--danger); }
.card.dim { opacity: .14; }
.card.ghost { opacity: .3; }
.card.dragging { transform: rotate(2deg); box-shadow: 0 14px 30px rgba(0, 0, 0, .5); }
body.is-dragging, body.is-dragging .card { cursor: grabbing; }
.note { margin: 40px auto; max-width: 440px; padding: 18px 20px; text-align: center; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }

/* ---------- calendar ---------- */
.cal { flex: 1; min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; padding: 16px; overflow: auto; }
.cal-main { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.cal-wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.cal-wd span { padding: 8px 10px; color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.cal-grid { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(96px, 1fr); }
.day {
  min-width: 0; padding: 6px 6px 8px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 3px; cursor: pointer; background: transparent; text-align: left; color: inherit;
}
.day:nth-child(7n) { border-right: 0; }
.day:hover { background: rgba(255, 255, 255, .025); }
.day.out { background: rgba(0, 0, 0, .18); }
.day.out .num { color: var(--faint); }
.day.sel { box-shadow: inset 0 0 0 2px var(--line-2); }
.day:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.num { align-self: flex-start; font-size: 12.5px; font-weight: 600; padding: 1px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.day.today .num { background: var(--accent); color: #0f2208; }
.ev {
  display: block; min-width: 0; font-size: 11.5px; line-height: 1.45; padding: 1px 6px; border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 2px solid var(--sc); color: var(--text);
  background: rgba(255, 255, 255, .06); background: color-mix(in srgb, var(--sc) 18%, transparent);
}
.ev b { font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 4px; }
.ev.shared { box-shadow: inset 0 0 0 1px rgba(138, 214, 247, .35); }
.ev-more { font-size: 11px; color: var(--faint); padding-left: 6px; }
.agenda { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.agenda-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; }
.agenda-date { font-size: 16px; font-weight: 700; }
.agenda-sub { color: var(--muted); font-size: 12.5px; margin-top: -8px; }
.agenda-list { display: grid; gap: 8px; }
.item {
  display: grid; grid-template-columns: 4px minmax(0, 1fr); gap: 10px; padding: 9px 10px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line); cursor: pointer; text-align: left; color: inherit; width: 100%;
}
.item:hover { border-color: var(--line-2); background: var(--card-hover); }
.item .bar { border-radius: 4px; background: var(--sc); }
.item-time { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.item-title { font-size: 13.5px; overflow-wrap: anywhere; }
.item-note { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; white-space: pre-line; }
.empty { color: var(--faint); font-size: 13px; padding: 4px 2px; }

/* ---------- buttons & dialogs ---------- */
.btn { border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.primary { background: var(--accent); color: #0f2208; }
.btn.primary:disabled { opacity: .6; cursor: default; }
.btn.plain { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn.danger { background: transparent; color: var(--danger); padding-left: 0; }
dialog {
  width: min(540px, calc(100vw - 32px)); box-sizing: border-box; padding: 0;
  border: 1px solid var(--line-2); border-radius: 14px; background: #1f1f25; color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
dialog::backdrop { background: rgba(5, 5, 8, .6); }
.ed { display: grid; gap: 16px; padding: 20px; }
.ed-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.ed-top .pill { font-size: 12px; }
.ed textarea.big { width: 100%; box-sizing: border-box; border: 0; outline: none; resize: vertical; background: transparent; font-size: 17px; font-weight: 600; line-height: 1.4; padding: 0; }
.ed textarea.big::placeholder { color: var(--faint); }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span, .ed legend { font-size: 12px; color: var(--muted); font-weight: 500; }
.ed fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ed legend { padding: 0; margin-bottom: 7px; }
.ed textarea.notes, .ed select, .ed input[type="date"], .ed input[type="time"] {
  width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--line-2); background: var(--ground); color: var(--text); resize: vertical;
}
.ed textarea.notes:focus, .ed select:focus, .ed input:focus { outline: none; border-color: var(--accent); }
.form-hint { margin: -6px 0 0; color: var(--muted); font-size: 12.5px; }
.sph { display: flex; flex-wrap: wrap; gap: 6px; }
.sph label { cursor: pointer; }
.sph input { position: absolute; opacity: 0; pointer-events: none; }
.sph span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; }
.sph span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
.sph input:checked + span { background: var(--sc); border-color: var(--sc); color: var(--ink); }
.sph input:checked + span::before { background: var(--ink); }
.sph input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; }
.grid3 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding-bottom: 8px; cursor: pointer; }
.check-line input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.ed-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- mission drawer ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); box-sizing: border-box;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 22px calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--bar); border-left: 1px solid var(--line); overflow-y: auto; z-index: 9;
  box-shadow: -20px 0 50px rgba(0, 0, 0, .45);
}
.drawer-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.drawer-head h2 { margin: 0; font-size: 17px; }
.drawer h3 { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin: 22px 0 8px; }
.drawer p { margin: 0 0 8px; white-space: pre-line; }
.drawer blockquote { margin: 0 0 10px; padding-left: 11px; border-left: 2px solid var(--blue); color: #a9cdf5; }
.drawer blockquote.warm { border-color: #f0a040; color: #f3c58a; }
.drawer .big { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sec-edit { display: grid; gap: 8px; padding: 12px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sec-edit .line { display: flex; gap: 8px; }
.sec-edit input, .sec-edit select, .sec-edit textarea {
  width: 100%; box-sizing: border-box; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--ground); color: var(--text); outline: none; resize: vertical;
}
.sec-edit select { width: auto; }
.sec-edit input:focus, .sec-edit textarea:focus, .sec-edit select:focus { border-color: var(--accent); }
.drawer-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: #33333b; color: var(--text); padding: 9px 14px; border-radius: 9px; z-index: 20;
  border: 1px solid var(--line-2); box-shadow: 0 10px 28px rgba(0, 0, 0, .45); max-width: calc(100vw - 32px);
}

@media (max-width: 900px) {
  .cal { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .side {
    flex-direction: row; align-items: center; overflow-x: auto; overflow-y: visible; border-right: 0; border-bottom: 1px solid var(--line);
    padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); gap: 6px;
  }
  .brand span:last-child, .sec-title, .nav-count, .nav-more, .me-name { display: none !important; }
  .brand { padding: 0; }
  .sec { display: flex; gap: 4px; }
  .nav { white-space: nowrap; width: auto; padding: 6px 10px; }
  .nav-label { overflow: visible; }
  .side form { min-width: 200px; }
  .side-foot { margin: 0; border: 0; padding: 0 0 0 6px; }
  .search { width: 100%; order: 5; }
  .col, .add-col { flex-basis: 86vw; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .grid3 .field:first-child { grid-column: 1 / -1; }
  .grid2 { grid-template-columns: 1fr; }
  .cal-grid { grid-auto-rows: minmax(64px, 1fr); }
  .ev { font-size: 10.5px; padding: 0 4px; }
  .ev b { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .chip, .grip { transition: none; }
  .card.dragging, .col-float { transform: none; }
}
