@font-face {
  font-family: Inter;
  src: url("./inter.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Bodoni Moda";
  src: url("./bodoni-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #0b0a10;
  --panel: #111017;
  --raised: #18151f;
  --text: #f7f4fb;
  --muted: #aaa4b7;
  --subtle: #918a9f;
  --line: rgba(231, 214, 255, 0.13);
  --violet: #c793ff;
  --violet-strong: #ad65f1;
  --danger: #ffc0bb;
  --positive: #a2e9c9;
  --display: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --editorial: "Bodoni Moda", "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --width: 1184px;
  --gutter: clamp(14px, 4vw, 30px);
  font-family: var(--display);
  font-synthesis: none;
  background: var(--canvas);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100dvh; }
button, input, select { font: inherit; }
button { color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.4; }
a { color: inherit; text-decoration: none; }
button { border: 0; }
button, a { -webkit-touch-callout: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}
button, input, select, a { transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 50; padding: 12px; border-radius: 8px; background: #fff; color: #17111c; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon-sm { width: 17px; height: 17px; }
.money { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.negative { color: var(--danger); }

.topbar {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: #0d0b12;
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  min-height: 62px;
  width: min(100%, calc(var(--width) + 2 * var(--gutter)));
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; gap: 9px; align-items: center; font-size: 1.19rem; font-weight: 700; letter-spacing: -0.065em; white-space: nowrap; min-height: 44px; }
.brand-peso { color: #e1bbff; }
.brand-mark {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #160d23;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0;
  background: linear-gradient(145deg, #efe0ff 0%, #c68afc 61%, #9c64e0 100%);
  box-shadow: inset 0 0 0 1px #f7e6ff80, 0 3px 17px #ae65f12b;
}
.desktop-nav { display: none; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.desktop-log { display: none !important; }

.shell {
  width: min(100%, calc(var(--width) + 2 * var(--gutter)));
  margin-inline: auto;
  padding: 14px var(--gutter) calc(102px + env(safe-area-inset-bottom));
  outline: none;
}
.sample-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2px 12px;
  padding: 1px 10px 1px 13px;
  margin-bottom: 13px;
  min-height: 44px;
  border: 1px solid #c595ff28;
  border-radius: 11px;
  background: linear-gradient(90deg, #2b1d39 0%, #1c1527 100%);
  color: #e8d4f7;
}
.sample-label { display: inline-flex; gap: 8px; align-items: center; font-size: 0.8125rem; font-weight: 550; }
.sample-label .icon { color: #d2a6fb; }
.sample-strip .text-button { color: #f2deff; }
.notice { padding: 14px; border: 1px solid #e7ad8554; color: #ffe0ca; background: #281912; border-radius: 12px; margin-bottom: 14px; line-height: 1.55; }

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff0b;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}
.btn:hover { background: #ffffff15; border-color: #dcb7ff54; }
.btn-primary {
  background: linear-gradient(130deg, #e7c6ff, #c086f7 70%, #ae76e5);
  color: #180d22;
  border-color: #f5dbff99;
  box-shadow: inset 0 1px 0 #ffffff43, 0 5px 23px #b27af02d;
}
.btn-primary:hover { background: linear-gradient(130deg, #f0dcff, #cf9bff 70%, #ba7df6); }
.btn-danger { color: var(--danger); border-color: #f5a99849; background: #f5a9980b; }
.btn-danger:hover { background: #f5a9981b; border-color: #f5a99880; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #ffffff08; border: 1px solid var(--line); color: #e9dff3; padding: 0; }
.icon-btn:hover:not(:disabled) { background: #cfa4ff18; border-color: #dcb7ff54; }
.text-button { min-height: 44px; padding: 5px 4px; display: inline-flex; gap: 7px; align-items: center; justify-content: center; border: 0; color: #d9b2ff; font-size: 0.8125rem; font-weight: 600; background: transparent; text-align: center; }
.text-button:hover { color: #f4ddff; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(165deg, #140d21e8 1%, #1d1532aa 52%, #100c1be6 100%),
    radial-gradient(ellipse at 70% 48%, #5d34a3 0%, #2a1e54 36%, #0d0a14 82%);
  border: 1px solid #d3a8fc35;
  border-top-color: #e6bcff61;
  border-radius: 22px;
  box-shadow: inset 0 1px 0 #e9d0ff0c, 0 16px 66px #05030986;
  display: grid;
  gap: 22px;
  padding: clamp(16px, 4.9vw, 25px);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image: url("./violet-horizon.webp");
  background-size: cover;
  background-position: 58% 54%;
  opacity: 0.76;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, #0b07155e 0%, #0b07150c 34%, #100a1eaa 100%);
  pointer-events: none;
}
.hero-main { align-self: center; min-width: 0; }
.hero-title {
  color: #fbf7ff;
  font-weight: 500;
  font-size: clamp(2.34rem, 8.45vw, 3.4rem);
  letter-spacing: -0.078em;
  line-height: 0.97;
  margin: 14px 0 0;
}
.hero-title em {
  display: inline-block;
  font-family: var(--editorial);
  font-style: italic;
  font-weight: 400;
  color: #f1d6ff;
  letter-spacing: -0.059em;
  line-height: 1.055;
}
.period {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  border: 1px solid #f0d9ff38;
  border-radius: 999px;
  background: #130e2070;
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.period .icon-btn {
  width: 44px;
  height: 42px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #f2dfff;
}
.period .icon-btn:not(:disabled):hover { background: #edc3ff26; }
.period-name {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0 5px;
  font-size: 0.875rem;
  font-weight: 550;
  white-space: nowrap;
}
.period-name .icon { color: #dcb6fd; }
.period .icon-btn:focus-visible { outline-offset: -4px; }

.balance-ticket {
  position: relative;
  min-width: 0;
  overflow: hidden;
  align-self: center;
  border-radius: 18px;
  border: 1px solid #dfc6fc48;
  border-top-color: #f7dfff9c;
  background: linear-gradient(145deg, #2b1e3bd9 0%, #20152edb 60%, #281535ec 100%);
  backdrop-filter: blur(18px);
  padding: 16px 17px 14px;
  box-shadow: 0 12px 54px #0d071f82, inset 0 1px 0 #ffffff15;
}
.balance-ticket::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  pointer-events: none;
  left: 75%;
  top: -64px;
  border-radius: 50%;
  border: 1px solid #ffe6ff1c;
  box-shadow: 0 0 0 12px #f4c6ff0b, 0 0 0 24px #f4c6ff08, 0 0 0 36px #f4c6ff05;
}
.ticket-header { display: flex; justify-content: space-between; align-items: center; min-height: 22px; gap: 8px; color: #f0d6ff; font-size: 0.875rem; font-weight: 500; }
.ticket-header .icon { color: #eac6ff; }
.balance-value { display: block; font-size: clamp(2.42rem, 10vw, 3.6rem); font-weight: 650; letter-spacing: -0.078em; line-height: 1.07; margin: 4px 0 16px; overflow-wrap: anywhere; }
.balance-value.is-wide { font-size: clamp(1.6rem, 7vw, 2.9rem); }
.balance-value.negative { color: #ffd2c6; }
.meter { display: block; height: 5px; width: 100%; border-radius: 999px; background: #f1d6ff18; overflow: hidden; }
.meter span { display: block; width: var(--progress, 0%); height: 100%; border-radius: inherit; background: var(--meter-fill, #c59af5); transition: width 220ms ease; }
.ticket-meter { height: 6px; --meter-fill: linear-gradient(90deg, #bd86ff, #f7c7f8); }
.ticket-meter.over { --meter-fill: linear-gradient(90deg, #b875e9, #ffac9d); }
.ticket-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #f1d7ff36;
}
.ticket-stats div { min-width: 0; }
.ticket-stats div + div { padding-left: 12px; border-left: 1px solid #f1d7ff29; }
.ticket-stats span { color: #d1bfdc; font-size: 0.8125rem; display: block; margin-bottom: 4px; }
.ticket-stats strong { color: #fff2ff; font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }

.dashboard-grid { display: grid; gap: 14px; margin-top: 15px; }
.panel { background: linear-gradient(146deg, #16131e, #100e16 58%); border: 1px solid var(--line); border-top-color: #e7c7ff28; border-radius: 18px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 16px 5px; }
.panel-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.panel-title > .icon { color: #c391fb; }
.panel-head h2 { font-size: 1.04rem; letter-spacing: -0.036em; }
.panel-list { padding: 0 16px 5px; }
.category-row, .expense-row { display: flex; align-items: center; gap: 11px; min-width: 0; width: 100%; }
.category-row { padding: 12px 0; }
.expense-row { padding: 10px 0; min-height: 58px; }
.category-row + .category-row, .expense-row + .expense-row { border-top: 1px solid var(--line); }
button.expense-row { text-align: left; background: transparent; }
button.expense-row:hover .expense-title { color: #e4bdff; }
.tone-violet { --tone: #cca3fa; --tone-bg: #cca3fa20; }
.tone-blue { --tone: #9fb8ff; --tone-bg: #9fb8ff20; }
.tone-rose { --tone: #f4abc9; --tone-bg: #f4abc91d; }
.tone-amber { --tone: #f6bd91; --tone-bg: #f6bd911d; }
.tone-mint { --tone: #9bdbbf; --tone-bg: #9bdbbf1d; }
.category-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; color: var(--tone, #dac4ef); background: var(--tone-bg, #d4bcf426); border: 1px solid color-mix(in srgb, var(--tone, #dac4ef) 12%, transparent); }
.category-icon .icon { width: 18px; height: 18px; }
.category-info, .expense-info { min-width: 0; flex: 1; }
.category-info .meter { margin-top: 8px; --meter-fill: var(--tone); }
.category-info .meter.over { --meter-fill: #f2ad9e; }
.category-line { display: flex; justify-content: space-between; gap: 6px 11px; align-items: baseline; flex-wrap: wrap; }
.category-name, .expense-title { font-size: 0.9375rem; font-weight: 600; overflow-wrap: anywhere; letter-spacing: -0.025em; }
.category-total { font-size: 0.8125rem; color: var(--muted); }
.category-total b { color: var(--text); font-weight: 550; }
.category-note { color: var(--muted); font-size: 0.8125rem; }
.expense-title { display: block; }
.expense-detail { display: block; font-size: 0.8125rem; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.expense-amount { font-size: 0.875rem; font-weight: 650; color: #f6edf9; align-self: center; text-align: right; max-width: 45%; overflow-wrap: anywhere; }
.empty { padding: 20px 0 24px; text-align: center; color: var(--muted); }
.empty .icon { margin: 0 auto 9px; color: #b88fdb; width: 23px; height: 23px; }
.empty p { font-size: 0.9375rem; line-height: 1.55; }
.empty .btn { margin-top: 12px; }
.footer-note { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--subtle); font-size: 0.8125rem; padding: 18px 2px 0; text-align: center; }

.mobile-nav {
  position: fixed;
  inset: auto 0 0;
  z-index: 9;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(62px, 0.91fr);
  gap: 4px;
  padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border-top: 1px solid #e9caff2e;
  background: #15111ceF;
  backdrop-filter: blur(22px);
  box-shadow: 0 -10px 34px #0503089C;
}
.nav-item { color: var(--muted); min-width: 0; min-height: 48px; display: flex; flex-direction: column; justify-content: center; gap: 4px; align-items: center; border: 1px solid transparent; border-radius: 11px; font-size: 0.75rem; font-weight: 550; }
.nav-item .icon { width: 20px; height: 20px; }
.nav-item[aria-current="page"] { color: #eed5ff; background: #b080e420; border-color: #c58cf924; }
.mobile-log { min-height: 48px; flex-direction: column; gap: 2px; padding: 6px; border-radius: 12px; font-size: 0.75rem; }
.mobile-log .icon { width: 19px; height: 19px; stroke-width: 2.1; }

.page-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 20px; padding: 12px 0 19px; }
.page-heading h1 { font-size: clamp(2.5rem, 8vw, 4.05rem); line-height: 1.02; font-weight: 500; letter-spacing: -0.075em; }
.page-heading .period { background: #181221; }
.page-heading .page-desc { color: var(--muted); font-size: 0.9375rem; line-height: 1.5; margin-top: 8px; }
.activity-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.activity-tools .search-wrap { flex: 1 0 100%; }
.activity-tools .select-wrap { flex: 1; min-width: 125px; }
.activity-tools .btn { flex-shrink: 0; }
.search-wrap, .select-wrap { position: relative; }
.search-wrap .icon, .select-wrap .icon { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.search-wrap .icon { left: 12px; }
.select-wrap .icon { right: 12px; }
.search-wrap input { padding-left: 38px; }
.select-wrap select { padding-right: 38px; appearance: none; }
.field {
  display: block;
  color: var(--text);
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 10px 12px;
  background: #0c0a13;
  border: 1px solid #c4a9da32;
  border-radius: 11px;
  font-size: 1rem;
  line-height: 1.25;
}
.field::placeholder { color: #9b92a8; }
.field:focus { border-color: #d3a2ff; }
.activity-content { padding: 0 15px 6px; min-height: 162px; }
.activity-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 15px 0 8px; color: var(--muted); font-size: 0.875rem; }
.activity-total strong { color: var(--text); font-size: 1.125rem; }
.day-heading { font-size: 0.8125rem; color: var(--muted); font-weight: 600; padding: 11px 0 3px; }
.activity-day + .activity-day { border-top: 1px solid var(--line); margin-top: 6px; }

.plan-panel { overflow: hidden; }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 14px; padding: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.plan-head h2 { font-size: 1.05rem; margin-bottom: 5px; letter-spacing: -0.035em; }
.plan-head strong { font-size: 1.35rem; letter-spacing: -0.04em; }
.plan-rows { padding: 0 15px; }
.plan-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(93px, 0.58fr); gap: 12px; align-items: center; padding: 12px 0; }
.plan-row + .plan-row { border-top: 1px solid var(--line); }
.plan-row .category-note { display: block; margin-top: 4px; }
.category-edit { display: flex; align-items: center; width: max-content; max-width: 100%; min-height: 44px; gap: 9px; padding: 0; background: transparent; text-align: left; }
.category-edit:hover .category-name { color: var(--violet); }
.peso-field { position: relative; display: block; min-width: 0; }
.peso-field .field { padding-left: 26px; }
.peso-field > span { position: absolute; z-index: 1; left: 12px; top: 50%; transform: translateY(-50%); color: var(--violet); pointer-events: none; }
.plan-footer { display: flex; justify-content: flex-end; padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.plan-footer .btn { min-width: 122px; }
.archived-list { margin-top: 14px; padding: 16px; }
.archived-list summary { cursor: pointer; color: var(--muted); font-size: 0.9375rem; }
.archived-list .category-edit { margin-top: 9px; }

.sheet {
  position: fixed;
  inset: auto 0 0;
  max-height: min(88dvh, 700px);
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0 0 env(safe-area-inset-bottom);
  border: 1px solid #e2c6ff47;
  border-bottom: 0;
  border-radius: 23px 23px 0 0;
  background: linear-gradient(155deg, #241a30, #17111f 64%);
  color: var(--text);
  box-shadow: 0 -22px 80px #07050bc9;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet::backdrop { background: #050309ad; backdrop-filter: blur(5px); }
.sheet[open] { animation: reveal-sheet 180ms ease-out both; }
@keyframes reveal-sheet { from { transform: translateY(14px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
body:has(.sheet[open]) { overflow: hidden; }
.sheet-content { padding: 16px 17px 19px; }
.sheet-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-title-row h2 { font-size: 1.45rem; letter-spacing: -0.049em; }
.sheet-title-row .icon-btn { flex-shrink: 0; }
.form-stack { display: grid; gap: 15px; }
.form-stack label > span:not(.category-icon), .form-label, .category-choices legend { display: block; margin-bottom: 7px; font-weight: 550; font-size: 0.875rem; }
.form-stack .peso-field { margin: 0; }
.form-stack .peso-field .field { min-height: 64px; font-size: 1.85rem; font-weight: 600; letter-spacing: -0.05em; padding-left: 40px; }
.form-stack .peso-field > span { font-size: 1.55rem; top: 50%; margin: 0; }
.category-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(93px, 1fr)); gap: 7px; min-width: 0; padding: 0; border: 0; margin: 0; }
.category-choices legend { padding: 0; }
.category-choice { position: relative; display: flex; gap: 6px; flex-direction: column; align-items: center; justify-content: center; min-height: 68px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: #ffffff05; cursor: pointer; text-align: center; overflow-wrap: anywhere; }
.category-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.category-choice:has(input:checked) { background: #c08aef23; border-color: #d4a5f29b; }
.category-choice:has(input:focus-visible) { outline: 2px solid var(--violet); outline-offset: 2px; }
.category-choice > .choice-name { font-size: 0.8125rem !important; margin: 0 !important; }
.category-choice .icon { color: var(--tone, var(--violet)); }
.details-fields summary { cursor: pointer; padding: 8px 0; min-height: 42px; color: #e2c0ff; font-size: 0.875rem; font-weight: 550; }
.details-fields label { display: block; margin-top: 8px; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.sheet-actions .btn-primary { flex: 1; }
.form-error { color: #ffd0c7; font-size: 0.875rem; line-height: 1.45; }
.settings-items { display: grid; gap: 12px; }
.settings-card { border: 1px solid var(--line); border-radius: 13px; padding: 13px; background: #100b1852; }
.settings-card h3 { font-size: 1rem; margin-bottom: 6px; }
.settings-card p, .settings-card li { font-size: 0.875rem; line-height: 1.55; color: var(--muted); }
.settings-card ol { padding-left: 19px; margin: 8px 0 0; }
.settings-card .sheet-actions { justify-content: flex-start; margin-top: 10px; }
.settings-card .btn { font-size: 0.8125rem; }
.settings-card details { margin-top: 8px; }
.settings-card summary { padding: 4px 0; cursor: pointer; color: #e0bbfc; font-weight: 550; font-size: 0.875rem; }
.toast { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: calc(87px + env(safe-area-inset-bottom)); z-index: 20; max-width: min(340px, calc(100% - 28px)); border: 1px solid #e1b6ff56; border-radius: 12px; background: #2d1e3a; color: #fff0ff; font-size: 0.875rem; line-height: 1.45; font-weight: 550; padding: 12px 15px; box-shadow: 0 8px 30px #060409aa; }
.toast.is-error { border-color: #f2a79075; background: #3b2022; color: #ffded8; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (min-width: 660px) {
  .hero { padding: 26px; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); }
  .hero-title { font-size: clamp(3.15rem, 7vw, 5.55rem); }
  .hero-title em { display: block; }
  .activity-tools .search-wrap { flex: 1 1 240px; }
  .activity-tools .select-wrap { flex: 0 1 180px; }
  .sheet { inset: 0; max-height: min(91dvh, 760px); width: min(520px, calc(100% - 2rem)); margin: auto; padding: 0; border: 1px solid #e2c6ff47; border-radius: 22px; box-shadow: 0 24px 90px #050309b3; }
  .sheet-content { padding: 20px; }
}

@media (min-width: 880px) {
  .topbar-inner { min-height: 68px; }
  .desktop-nav { display: flex; justify-content: center; align-items: center; gap: 4px; }
  .desktop-nav .nav-item { flex-direction: row; gap: 7px; min-height: 42px; padding: 0 13px; font-size: 0.875rem; }
  .desktop-nav .nav-item .icon { width: 16px; height: 16px; }
  .desktop-log { display: inline-flex !important; }
  .mobile-nav { display: none; }
  .shell { padding-top: 23px; padding-bottom: 32px; }
  .sample-strip { margin-bottom: 16px; }
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); min-height: 322px; gap: 45px; padding: 28px 37px; }
  .hero::before { background-position: 50% 54%; opacity: .88; }
  .hero::after { background: linear-gradient(90deg, #0b0815ad 0%, #130c2761 46%, #130c334a 100%), linear-gradient(0deg, #10091c9c, transparent 54%); }
  .hero-title { margin-top: 18px; }
  .balance-ticket { padding: 21px 24px 19px; border-radius: 20px; }
  .balance-value { font-size: 3.95rem; margin-bottom: 20px; }
  .balance-value.is-wide { font-size: 2.8rem; }
  .ticket-stats { margin-top: 15px; padding-top: 14px; gap: 18px; }
  .ticket-stats div + div { padding-left: 18px; }
  .ticket-stats strong { font-size: 1.135rem; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); margin-top: 18px; gap: 17px; }
  .panel-head { padding: 13px 18px 4px; }
  .panel-head h2 { font-size: 1.075rem; }
  .panel-list { padding-inline: 18px; }
  .page-heading { padding-top: 16px; padding-bottom: 23px; }
  .activity-content, .activity-tools, .plan-rows { padding-inline: 20px; }
  .plan-head, .plan-footer { padding-inline: 20px; }
  .plan-row { grid-template-columns: minmax(0, 1fr) minmax(160px, 230px); }
  .toast { bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
