/* ============ Тема и токены ============ */
:root {
  --bg: #f7f1ea;
  --bg-grad: radial-gradient(900px 500px at 100% -8%, #f6dfe4 0%, rgba(246,223,228,0) 55%),
             radial-gradient(800px 460px at -5% 2%, #e7def3 0%, rgba(231,222,243,0) 52%),
             radial-gradient(700px 500px at 50% 110%, #fbeadb 0%, rgba(251,234,219,0) 55%);
  --card: #fffdfb;
  --card-2: #f0e7dd;
  --text: #3a2f2a;
  --muted: #9c8b7d;
  --line: rgba(80,58,45,0.10);
  --accent: #c56d92;
  --accent-2: #8873b0;
  --grad: linear-gradient(135deg, #d0899b 0%, #9079b6 100%);
  --shadow: 0 14px 34px rgba(90,60,55,0.12);
  --shadow-sm: 0 6px 18px rgba(90,60,55,0.09);
  --danger: #cf5f6a;
  --radius: 24px;
  --radius-sm: 18px;
  --serif: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1512;
    --bg-grad: radial-gradient(900px 500px at 100% -8%, rgba(197,109,146,0.18) 0%, rgba(197,109,146,0) 55%),
               radial-gradient(800px 460px at -5% 2%, rgba(136,115,176,0.20) 0%, rgba(136,115,176,0) 52%),
               radial-gradient(700px 500px at 50% 112%, rgba(198,138,94,0.14) 0%, rgba(198,138,94,0) 55%);
    --card: #262019;
    --card-2: #322a22;
    --text: #f1e7dc;
    --muted: #ab9c8c;
    --line: rgba(255,244,232,0.10);
    --shadow: 0 16px 40px rgba(0,0,0,0.46);
    --shadow-sm: 0 6px 20px rgba(0,0,0,0.36);
  }
}
html[data-theme="light"] {
  --bg: #f7f1ea;
  --bg-grad: radial-gradient(900px 500px at 100% -8%, #f6dfe4 0%, rgba(246,223,228,0) 55%),
             radial-gradient(800px 460px at -5% 2%, #e7def3 0%, rgba(231,222,243,0) 52%),
             radial-gradient(700px 500px at 50% 110%, #fbeadb 0%, rgba(251,234,219,0) 55%);
  --card: #fffdfb; --card-2: #f0e7dd; --text: #3a2f2a; --muted: #9c8b7d;
  --line: rgba(80,58,45,0.10); --shadow: 0 14px 34px rgba(90,60,55,0.12); --shadow-sm: 0 6px 18px rgba(90,60,55,0.09);
}
html[data-theme="dark"] {
  --bg: #1b1512;
  --bg-grad: radial-gradient(900px 500px at 100% -8%, rgba(197,109,146,0.18) 0%, rgba(197,109,146,0) 55%),
             radial-gradient(800px 460px at -5% 2%, rgba(136,115,176,0.20) 0%, rgba(136,115,176,0) 52%),
             radial-gradient(700px 500px at 50% 112%, rgba(198,138,94,0.14) 0%, rgba(198,138,94,0) 55%);
  --card: #262019; --card-2: #322a22; --text: #f1e7dc; --muted: #ab9c8c;
  --line: rgba(255,244,232,0.10); --shadow: 0 16px 40px rgba(0,0,0,0.46); --shadow-sm: 0 6px 20px rgba(0,0,0,0.36);
}

/* Цвета разделов (акцент иконки; фон кружка — тот же цвет с прозрачностью) */
[data-sec="dashboard"]{ --sc:#b3826a } [data-sec="events"]{ --sc:#c98a5e }
[data-sec="plans"]{ --sc:#79a487 } [data-sec="wishes"]{ --sc:#c56d92 }
[data-sec="places"]{ --sc:#8873b0 } [data-sec="docs"]{ --sc:#b0894e }
[data-sec="tracker"]{ --sc:#c96a6f } [data-sec="settings"]{ --sc:#94847a }

/* ============ База ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select, button { font-size: 16px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; }
svg { display: block; }
.ico { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ico.fill { fill: currentColor; stroke: none; }

/* Кружок с иконкой раздела */
.chip { width: 46px; height: 46px; border-radius: 15px; flex: none; display: grid; place-items: center;
  color: var(--text); background: var(--card-2); }
.chip[data-sec] { color: var(--sc); background: color-mix(in srgb, var(--sc) 15%, transparent); }
.chip .ico { width: 23px; height: 23px; }

/* ============ Экраны блокировки / онбординга ============ */
.screen {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--sat) + 24px) 24px calc(var(--sab) + 24px);
  background: var(--bg); background-image: var(--bg-grad);
}
.lock-inner, .onboard-inner { width: 100%; max-width: 370px; text-align: center; }
.lock-logo { width: 66px; height: 66px; border-radius: 22px; margin: 0 auto 16px; display: grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.lock-logo .ico { width: 34px; height: 34px; }
.lock-title { font-family: var(--serif); font-size: 24px; font-weight: 600; margin-bottom: 24px; }
.lock-hint { min-height: 20px; margin-top: 14px; color: var(--danger); font-size: 14px; font-weight: 600; }
.dots { display: flex; gap: 16px; justify-content: center; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); transition: transform .1s; }
.dot.on { background: var(--grad); border-color: transparent; }
.shake { animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-9px)} 40%{transform:translateX(9px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(6px)} }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.pad button {
  aspect-ratio: 1; max-width: 82px; margin: 0 auto; width: 100%; border: none; border-radius: 50%;
  background: var(--card); color: var(--text); box-shadow: var(--shadow-sm);
  font-size: 27px; font-weight: 500; transition: transform .08s, background .15s;
}
.pad button:active { transform: scale(0.92); background: var(--card-2); }
.pad .pad-blank { background: transparent; box-shadow: none; pointer-events: none; }
.pad .pad-action { background: transparent; box-shadow: none; color: var(--muted); }
.pad .pad-action .ico { width: 26px; height: 26px; margin: 0 auto; }

.onboard-inner { max-width: 410px; text-align: left; }
.onboard-top { text-align: center; margin-bottom: 22px; }
.onboard-h1 { font-size: 30px; margin: 4px 0 4px; }
.onboard-sub { color: var(--muted); margin: 0; }

/* ============ Каркас ============ */
#app { min-height: 100dvh; }
.sidebar { display: none; }
#main { min-height: 100dvh; padding-bottom: calc(88px + var(--sab)); }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: calc(var(--sat) + 20px) 20px 14px;
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
}
.topbar-title { font-family: var(--serif); font-size: 32px; font-weight: 600; letter-spacing: -0.03em; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.icon-btn .ico { width: 22px; height: 22px; stroke-width: 2.1; }
.icon-btn:active { transform: scale(0.92); }

.views { padding: 12px 18px 28px; max-width: 820px; margin: 0 auto; }
.view { display: none; animation: fade .28s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============ Таб-бар ============ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  padding: 10px 6px calc(10px + var(--sab));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(22px); -webkit-backdrop-filter: saturate(160%) blur(22px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1; border: none; background: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600; padding: 2px; border-radius: 12px;
}
.tab .ico { width: 24px; height: 24px; transition: transform .12s; }
.tab.active { color: var(--accent); }
.tab.active .ico { transform: translateY(-1px); stroke-width: 2.1; }

/* ============ Общие блоки ============ */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; margin-bottom: 14px; }
.section-label { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--text); margin: 24px 4px 12px; letter-spacing: -0.02em; }
.section-label:first-child { margin-top: 6px; }

.hero {
  position: relative; overflow: hidden;
  background: var(--grad); color: #fff; border-radius: 28px; padding: 26px 24px 28px;
  box-shadow: var(--shadow); margin-bottom: 18px;
}
.hero h2 { font-family: -apple-system, sans-serif; margin: 0 0 6px; font-size: 14px; font-weight: 600; opacity: .9; letter-spacing: .02em; text-transform: uppercase; }
.hero .big { font-family: var(--serif); font-size: 46px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.0; }
.hero .sub { margin-top: 10px; font-size: 14px; opacity: .94; }
.hero .deco { position: absolute; right: -18px; bottom: -26px; color: #fff; opacity: .16; }
.hero .deco .ico { width: 150px; height: 150px; stroke-width: 1.2; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 8px; }
.stat { background: var(--card); border-radius: var(--radius-sm); padding: 16px 10px; text-align: center; box-shadow: var(--shadow-sm); }
.stat .n { font-family: var(--serif); font-size: 27px; font-weight: 600; }
.stat .l { font-size: 11.5px; color: var(--muted); margin-top: 3px; font-weight: 600; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tile {
  background: var(--card); border: none; border-radius: var(--radius); padding: 18px;
  text-align: left; box-shadow: var(--shadow-sm); color: var(--text);
  display: flex; flex-direction: column; gap: 12px; min-height: 118px; transition: transform .12s;
}
.tile:active { transform: scale(0.97); }
.tile .t-name { font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.tile .t-sub { font-size: 12.5px; color: var(--muted); margin-top: -6px; }

/* ============ Списки ============ */
.item {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
  text-align: left; width: 100%; border: none; color: var(--text); transition: transform .1s;
}
.item:active { transform: scale(0.99); }
.item .emoji { font-size: 22px; }
.item .chip.emoji-chip { font-size: 22px; }
.item .grow { flex: 1; min-width: 0; }
.item .title { font-weight: 650; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.item .right { text-align: right; flex: none; color: var(--muted); font-size: 13px; font-weight: 650; }
.item .right .ico { width: 20px; height: 20px; color: var(--muted); }
.item.done .title { text-decoration: line-through; color: var(--muted); }

.check {
  width: 27px; height: 27px; border-radius: 50%; border: 2px solid var(--line);
  flex: none; display: grid; place-items: center; color: #fff; background: transparent; transition: .15s;
}
.check .ico { width: 15px; height: 15px; stroke-width: 3; opacity: 0; }
.check.on { background: var(--grad); border-color: transparent; }
.check.on .ico { opacity: 1; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--card-2); color: var(--muted); }
.badge.me { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.badge.her { background: color-mix(in srgb, var(--accent-2) 18%, transparent); color: var(--accent-2); }
.badge.both { background: color-mix(in srgb, #b3826a 16%, transparent); color: #b3826a; }

.stars { color: #e0a341; display: inline-flex; gap: 1px; }
.stars .ico { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.stars .off { opacity: .26; }

.empty { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty .e-ico { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--sc, var(--accent)) 14%, transparent); color: var(--sc, var(--accent)); }
.empty .e-ico .ico { width: 30px; height: 30px; }
.empty .e-title { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.empty .e-sub { font-size: 14px; }

/* ============ Места (мозаика в стиле Pinterest) ============ */
.masonry { column-count: 2; column-gap: 14px; }
.place-card { break-inside: avoid; margin-bottom: 14px; width: 100%; background: var(--card);
  border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-sm); border: none; text-align: left; color: var(--text); display: block; padding: 0; transition: transform .12s; }
.place-card:active { transform: scale(0.98); }
.place-card img { width: 100%; display: block; }
.place-card .pc-nophoto { aspect-ratio: 4/5; display: grid; place-items: center;
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 30%, var(--card)), color-mix(in srgb, var(--accent-2) 34%, var(--card))); color: #fff; }
.place-card .pc-nophoto .ico { width: 40px; height: 40px; opacity: .8; }
.place-card .pc-body { padding: 13px 15px 15px; }
.place-card .pc-title { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.place-card .pc-meta { margin-top: 6px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.place-card .pc-note { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.4; }

/* ============ Копилки (цели) ============ */
.goal-card { background: var(--card); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.goal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.goal-head .grow { flex: 1; min-width: 0; }
.goal-head .title { font-weight: 650; font-size: 16px; }
.goal-head .meta { margin-top: 3px; }
.progress { height: 10px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--grad); transition: width .5s cubic-bezier(.2,.9,.3,1); }
.goal-nums { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; font-size: 13px; gap: 10px; }
.goal-nums .saved { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--text); white-space: nowrap; }
.goal-nums .left { color: var(--muted); text-align: right; white-space: nowrap; }
.goal-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.goal-actions { margin-top: 14px; }
.goal-actions .btn { padding: 11px; font-size: 14px; }
.contrib-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 12px; padding: 11px 14px; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.contrib-row .ico { width: 15px; height: 15px; color: var(--muted); }

/* ============ Свадьба ============ */
.w-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.w-stat { background: var(--card); border-radius: var(--radius-sm); padding: 14px 8px; text-align: center; box-shadow: var(--shadow-sm); }
.w-stat .n { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.w-stat .l { font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 600; }
.money-row { display: flex; justify-content: space-between; padding: 7px 2px; font-size: 15px; }
.money-row .m-val { font-weight: 700; }
.badge.yes { background: color-mix(in srgb, #4fae7d 20%, transparent); color: #3f9d6d; }
.badge.no { background: color-mix(in srgb, #cf5f6a 16%, transparent); color: #cf5f6a; }
.badge.maybe { background: color-mix(in srgb, #d3a24e 22%, transparent); color: #b98a3c; }
.badge.invited { background: var(--card-2); color: var(--muted); }

/* Сегмент */
.segment { display: flex; background: var(--card-2); border-radius: 14px; padding: 4px; margin-bottom: 16px; gap: 4px; }
.segment button { flex: 1; border: none; background: none; color: var(--muted); font-weight: 650; padding: 9px 6px; border-radius: 10px; font-size: 13px; transition: .15s; white-space: nowrap; }
.segment button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }

/* ============ Sheet ============ */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(30,20,16,.5); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; backdrop-filter: blur(3px); }
.sheet { width: 100%; max-width: 560px; background: var(--card); border-radius: 28px 28px 0 0; padding: 8px 20px calc(20px + var(--sab)); max-height: 92dvh; overflow-y: auto; box-shadow: 0 -12px 44px rgba(0,0,0,.32); animation: slideup .3s cubic-bezier(.2,.9,.3,1); }
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-title { font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: -0.02em; }
.sheet-close { border: none; background: var(--card-2); color: var(--muted); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.sheet-close .ico { width: 18px; height: 18px; }
.sheet-foot { display: flex; gap: 12px; padding-top: 16px; }

.menu-item { display: flex; align-items: center; gap: 15px; padding: 14px 4px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 16px; }
.menu-item:last-child { border-bottom: none; }
.menu-item .chip { width: 40px; height: 40px; border-radius: 13px; }
.menu-item .chip .ico { width: 20px; height: 20px; }

/* ============ Формы ============ */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.field input[type=text], .field input[type=number], .field input[type=date], .field input[type=time],
.field input[type=url], .field input[type=password], .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, var(--card)); color: var(--text);
  border-radius: 13px; padding: 13px 15px; outline: none; transition: border-color .15s;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.rating-input { display: flex; gap: 8px; }
.rating-input span { color: #e0a341; opacity: .26; transition: .1s; cursor: pointer; }
.rating-input span .ico { width: 32px; height: 32px; fill: currentColor; stroke: none; }
.rating-input span.on { opacity: 1; }

.emoji-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-pick button { border: 1.5px solid var(--line); background: var(--bg); border-radius: 13px; width: 48px; height: 48px; font-size: 24px; }
.emoji-pick button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

.filebox { border: 1.5px dashed var(--line); border-radius: 13px; padding: 18px; text-align: center; color: var(--muted); font-size: 14px; display: block; }
.filebox input { display: none; }
.filebox .fb-ico { width: 26px; height: 26px; margin: 0 auto 6px; color: var(--muted); }
.filebox .picked { color: var(--text); font-weight: 600; margin-top: 6px; word-break: break-all; }

.btn { flex: 1; border: none; border-radius: 15px; padding: 15px; font-size: 16px; font-weight: 700; transition: transform .1s; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-sm); }
.btn-ghost { background: var(--card-2); color: var(--text); }
.btn-danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .5; }
.btn-full { width: 100%; }

.link-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 2px; border-bottom: 1px solid var(--line); }
.link-row:last-child { border-bottom: none; }
.link-row .lr-label { font-weight: 600; }
.link-row .lr-val { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 4px; }
.link-row .lr-val .ico { width: 16px; height: 16px; }
.switch-note { font-size: 13px; color: var(--muted); padding: 8px 2px 0; line-height: 1.5; }

/* Тумблер */
.switch { position: relative; display: inline-block; width: 50px; height: 29px; flex: none; }
.switch input { display: none; }
.switch .slider { position: absolute; inset: 0; background: var(--card-2); border-radius: 999px; transition: .2s; }
.switch .slider::before { content: ''; position: absolute; width: 23px; height: 23px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(21px); }
.trust-check { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 22px; font-size: 14px; color: var(--muted); cursor: pointer; }
.trust-check input { width: 19px; height: 19px; accent-color: var(--accent); }
.note-lock { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.note-lock .ico { width: 16px; height: 16px; flex: none; }

.toast { position: fixed; left: 50%; bottom: calc(100px + var(--sab)); transform: translateX(-50%); background: #2a221c; color: #fff; padding: 13px 20px; border-radius: 15px; font-size: 14px; font-weight: 600; z-index: 80; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: fade .2s ease; max-width: 90%; }

/* ============ Десктоп ============ */
@media (min-width: 860px) {
  #app { display: grid; grid-template-columns: 264px 1fr; }
  .sidebar { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; padding: 30px 16px; border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 66%, transparent); backdrop-filter: blur(10px); }
  .side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; }
  .side-brand img { width: 38px; height: 38px; border-radius: 12px; box-shadow: var(--shadow-sm); }
  .side-brand span { font-family: var(--serif); font-weight: 600; font-size: 23px; letter-spacing: -0.02em; }
  .side-link { display: flex; align-items: center; gap: 13px; padding: 11px 12px; border-radius: 14px; border: none; background: none; color: var(--muted); font-weight: 600; font-size: 15px; text-align: left; width: 100%; transition: .12s; }
  .side-link .chip { width: 36px; height: 36px; border-radius: 11px; }
  .side-link .chip .ico { width: 19px; height: 19px; }
  .side-link.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
  .side-link:hover:not(.active) { background: color-mix(in srgb, var(--card) 60%, transparent); color: var(--text); }
  .tabbar { display: none; }
  #main { padding-bottom: 30px; }
  .views { padding: 6px 30px 40px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .masonry { column-count: 3; }
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 28px; max-height: 86dvh; }
}
