:root {
  --canvas: #f6f6f1;
  --surface: #ffffff;
  --surface-soft: #eeefe9;
  --ink: #1d1e20;
  --muted: #777a7c;
  --muted-2: #a8aaa5;
  --line: #e2e3dd;
  --line-strong: #cdd0c8;
  --rail: #222326;
  --rail-muted: #a2a5a8;
  --pink: #ff7185;
  --pink-soft: #ffd4dc;
  --blue: #aebdff;
  --blue-soft: #e3e8ff;
  --lime: #dff78b;
  --yellow: #ffd77c;
  --teal: #9be3d3;
  --metric-ink: #202123;
  --metric-muted: rgba(29,30,32,.64);
  --tile-ink: #202123;
  --tile-muted: rgba(29,30,32,.64);
  --goal-accent-1: #ff7185;
  --goal-accent-2: #8fa8f2;
  --goal-accent-3: #a9c95f;
  --goal-accent-4: #75c8b9;
  --shadow: 0 20px 60px rgba(35, 37, 35, 0.08);
  --shadow-soft: 0 8px 24px rgba(35, 37, 35, 0.06);
  --radius: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --motion-fast: 150ms;
  --motion-standard: 360ms;
  --motion-slow: 520ms;
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-in-expo: cubic-bezier(.7, 0, .84, 0);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

[data-theme="dark"] {
  --canvas: #171819;
  --surface: #232527;
  --surface-soft: #2c2f31;
  --ink: #f4f3ef;
  --muted: #a8aba8;
  --muted-2: #747876;
  --line: #3a3d3e;
  --line-strong: #4c4f50;
  --rail: #0d0e0f;
  --pink: #ff8798;
  --pink-soft: #54343e;
  --blue: #7089c4;
  --blue-soft: #303a56;
  --lime: #66813d;
  --yellow: #8b6e39;
  --teal: #438c83;
  --metric-ink: #f4f3ef;
  --metric-muted: rgba(244,243,239,.72);
  --tile-ink: #f4f3ef;
  --tile-muted: rgba(244,243,239,.72);
  --goal-accent-1: #ff8798;
  --goal-accent-2: #9fb6ea;
  --goal-accent-3: #b8d86d;
  --goal-accent-4: #82d1c3;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.2);
}

[data-theme="duna"] {
  --canvas: #f1e8dc;
  --surface: #fffaf4;
  --surface-soft: #eadbca;
  --ink: #352c28;
  --muted: #88776e;
  --muted-2: #b4a295;
  --line: #dfcdbc;
  --line-strong: #c9ae99;
  --rail: #3a2f2a;
  --rail-muted: #c4b1a3;
  --metric-ink: #352c28;
  --metric-muted: rgba(53,44,40,.68);
  --tile-ink: #352c28;
  --tile-muted: rgba(53,44,40,.68);
  --pink: #e8875d;
  --pink-soft: #f5c2a9;
  --blue: #b9c8b4;
  --blue-soft: #e0eadb;
  --lime: #cfe38f;
  --yellow: #f2d19b;
  --teal: #9fd7cf;
  --goal-accent-1: #d97b58;
  --goal-accent-2: #98ad88;
  --goal-accent-3: #d0a274;
  --goal-accent-4: #70b7ad;
}

[data-theme="greptile"] {
  --canvas: #101512;
  --surface: #18211b;
  --surface-soft: #202d24;
  --ink: #eff7e9;
  --muted: #9dac9c;
  --muted-2: #637367;
  --line: #304034;
  --line-strong: #526957;
  --rail: #080c09;
  --rail-muted: #93a295;
  --metric-ink: #eff7e9;
  --metric-muted: rgba(239,247,233,.72);
  --tile-ink: #eff7e9;
  --tile-muted: rgba(239,247,233,.72);
  --pink: #d1ff55;
  --pink-soft: #3b4a27;
  --blue: #9dd7c1;
  --blue-soft: #263c33;
  --lime: #b7ff4a;
  --yellow: #f0d34b;
  --teal: #79d7ca;
  --goal-accent-1: #b7ff4a;
  --goal-accent-2: #79d7ca;
  --goal-accent-3: #f0d34b;
  --goal-accent-4: #9dd7c1;
  --shadow: 0 20px 60px rgba(0, 0, 0, .28);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, .2);
}

[data-theme="hosier"] {
  --canvas: #302421;
  --surface: #43332e;
  --surface-soft: #59433a;
  --ink: #f9eee2;
  --muted: #cfb7a7;
  --muted-2: #997b6d;
  --line: #654a3f;
  --line-strong: #806052;
  --rail: #211817;
  --rail-muted: #b79d8e;
  --metric-ink: #f9eee2;
  --metric-muted: rgba(249,238,226,.72);
  --tile-ink: #f9eee2;
  --tile-muted: rgba(249,238,226,.72);
  --pink: #e8a0a7;
  --pink-soft: #6a4348;
  --blue: #a8bdc9;
  --blue-soft: #40545c;
  --lime: #b9d68d;
  --yellow: #e7c27d;
  --teal: #9bc9c0;
  --goal-accent-1: #e8a0a7;
  --goal-accent-2: #a8bdc9;
  --goal-accent-3: #b9d68d;
  --goal-accent-4: #9bc9c0;
  --shadow: 0 20px 60px rgba(0, 0, 0, .22);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, .16);
}

[data-theme="liquid-glass"] {
  --goal-accent-1: #ff7185;
  --goal-accent-2: #a8a0f2;
  --goal-accent-3: #71c8c0;
  --goal-accent-4: #e9b66d;
  --metric-ink: #263342;
  --metric-muted: rgba(38,51,66,.7);
  --tile-ink: #263342;
  --tile-muted: rgba(38,51,66,.7);
}

[data-theme="greptile"] .prompt-tag { color: #dff4d2; background: #2d4938; }
[data-theme="greptile"] .prompt-tag.primary { color: #152116; background: #b7ff4a; }
[data-theme="greptile"] .prompt-agent { color: #b8cbb7; }
[data-theme="greptile"] .chart-month b, [data-theme="greptile"] .detail-line strong { color: #f2f8ed; }
[data-theme="greptile"] .settings-section, [data-theme="greptile"] .panel, [data-theme="greptile"] .vault-list, [data-theme="greptile"] .card-library { border-color: #3b5141; }
[data-theme="dark"] .prompt-tag { color: #edf4ff; background: #3a4d63; }
[data-theme="dark"] .prompt-tag.primary { color: #182234; background: #9fb6ea; }
[data-theme="hosier"] .prompt-tag { color: #f9eee2; background: #654a3f; }
[data-theme="hosier"] .prompt-tag.primary { color: #302421; background: #a8bdc9; }

* { box-sizing: border-box; }
html, body, #root { width: 100%; height: 100%; min-height: 100%; margin: 0; }
body { min-width: 320px; overflow-x: hidden; background: var(--canvas); }
html, body, #root, * { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform var(--motion-fast) var(--ease-out-expo); }
button:active:not(:disabled) { transform: translateY(1px) scale(.975); filter: brightness(.985); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(120, 143, 255, .55); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }

.app-shell { width: 100%; height: 100%; min-height: 0; display: flex; overflow: hidden; background: var(--canvas); }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 248px; height: 100vh; flex: 0 0 248px; min-height: 0; padding: 28px 16px 18px; display: flex; flex-direction: column; overflow: hidden; background: var(--rail); color: #f8f7f3; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 12px 42px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 39px; border-radius: 11px; color: var(--ink); background: var(--pink); font-size: 18px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 13px; letter-spacing: .14em; font-weight: 700; }
.brand-copy span { color: var(--rail-muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.nav-label { padding: 0 12px 12px; color: #717578; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.nav-list { display: grid; gap: 4px; }
.nav-item { min-height: 46px; width: 100%; display: flex; align-items: center; gap: 13px; padding: 0 12px; border-radius: 12px; color: var(--rail-muted); background: transparent; text-align: left; transition: color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease); }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(2px); }
.nav-item.is-active { color: #202123; background: var(--pink); box-shadow: 0 10px 20px rgba(255,113,133,.16); }
.nav-item .icon { width: 20px; height: 20px; flex: 0 0 20px; }
.nav-item-label { font-size: 14px; font-weight: 650; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 12px; }
.sync-mini { display: grid; gap: 8px; padding: 15px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(255,255,255,.05); }
.sync-mini-top { display: flex; align-items: center; justify-content: space-between; color: #f5f4ef; font-size: 12px; font-weight: 650; }
.sync-mini small { color: var(--rail-muted); font-size: 11px; line-height: 1.5; }
.sync-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(223,247,139,.12); }
.profile-mini { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid transparent; border-radius: 12px; color: inherit; background: transparent; text-align: left; transition: color .25s var(--ease), background .25s var(--ease), border-color .25s ease, transform .25s var(--ease); }
.profile-mini:hover { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.07); transform: translateY(-2px); }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #25262a; background: var(--yellow); font-size: 12px; font-weight: 800; }
.profile-mini strong { display: block; color: #f8f7f3; font-size: 12px; }
.profile-mini span { display: block; margin-top: 2px; color: var(--rail-muted); font-size: 10px; }

.main-content { min-width: 0; min-height: 0; height: 100vh; margin-left: 248px; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { position: relative; z-index: 12; min-height: 104px; flex: 0 0 104px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px clamp(24px, 4vw, 60px) 20px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--canvas) 92%, transparent); }
.topbar-heading { display: grid; gap: 6px; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: clamp(23px, 2vw, 30px); line-height: 1.05; letter-spacing: -.04em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.search-field { width: min(260px, 24vw); height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--surface); transition: border-color .2s ease, box-shadow .2s ease, width .35s var(--ease); }
.search-field:focus-within { width: min(320px, 30vw); border-color: var(--line-strong); box-shadow: 0 0 0 4px rgba(174,189,255,.22); }
.search-field input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search-field input::placeholder { color: var(--muted-2); }
.icon-button { width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); transition: transform .25s var(--ease), background .2s ease, border-color .2s ease; }
.icon-button:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--surface-soft); }
.topbar .avatar { width: 38px; height: 38px; }
.sync-avatar { position: relative; isolation: isolate; }
.sync-avatar::after { content: ''; position: absolute; z-index: 2; inset: -4px; border-radius: inherit; padding: 2px; background: linear-gradient(135deg, #8ddf63, #3d9b58 58%, #d8ff8e); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.sync-avatar.sync-error::after { background: linear-gradient(135deg, #ff8c8c, #bd3c54 58%, #ffb15e); }
.sync-avatar.sync-idle::after { background: var(--line-strong); }
.sync-avatar.sync-syncing::after { background: linear-gradient(135deg, #ffd77c, #e8875d 58%, #fff0a5); }
.mobile-menu-button { display: none; }
.page-scroll { width: 100%; min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; max-width: 1480px; margin: 0 auto; padding: 38px clamp(24px, 4vw, 60px) 60px; }
.page-enter { animation: page-in .45s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-header-copy { display: grid; gap: 8px; }
.page-kicker { color: var(--muted); font-size: 12px; }
.page-title { margin: 0; font-size: clamp(30px, 4vw, 52px); line-height: .95; letter-spacing: -.065em; }
.page-description { max-width: 540px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid transparent; border-radius: 12px; font-size: 13px; font-weight: 700; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.button:active { transform: translateY(1px) scale(.98); }
.button-primary { color: #202123; background: var(--pink); }
.button-secondary { color: var(--ink); border-color: var(--line); background: var(--surface); }
.button-dark { color: #fff; background: var(--rail); }
.button-small { min-height: 34px; padding: 0 11px; border-radius: 9px; font-size: 12px; }
.button-quiet { min-height: 34px; padding: 0 8px; color: var(--muted); background: transparent; }
.button-quiet:hover { color: var(--ink); background: var(--surface-soft); box-shadow: none; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(220px, .72fr) minmax(220px, .72fr); gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.hero-balance { min-height: 245px; display: flex; flex-direction: column; justify-content: space-between; padding: 25px; color: #fff; background: var(--rail); overflow: hidden; position: relative; }
.hero-balance::after { content: ''; position: absolute; width: 220px; height: 220px; right: -65px; top: -78px; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; box-shadow: 0 0 0 26px rgba(255,255,255,.04), 0 0 0 54px rgba(255,255,255,.03); }
.hero-balance-top, .metric-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.label { color: var(--muted); font-size: 12px; font-weight: 650; }
.hero-balance .label { color: #aeb1b3; }
.hero-balance .icon-button { color: #fff; border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.06); }
.hero-balance .icon-button:hover { background: rgba(255,255,255,.13); }
.balance-value { position: relative; z-index: 1; margin: 24px 0 0; font-size: clamp(42px, 5vw, 70px); line-height: .86; letter-spacing: -.08em; font-variant-numeric: tabular-nums; }
.balance-note { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; color: #dff78b; font-size: 12px; }
.balance-note .icon { width: 14px; height: 14px; }
.metric-card { min-height: 245px; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; overflow: hidden; }
.metric-card.spending { background: var(--pink-soft); }
.metric-card.available { background: var(--blue); }
[data-theme="dark"] .metric-card.spending { color: #2c1f22; }
.metric-card .metric-top .label { color: rgba(29,30,32,.62); }
.metric-number { margin-top: 20px; font-size: 32px; line-height: .95; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.metric-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: rgba(29,30,32,.64); font-size: 11px; }
.metric-foot strong { color: var(--ink); font-weight: 750; }
.progress-line { height: 5px; margin-top: 10px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.45); }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: var(--rail); transform-origin: left; animation: grow-line .8s var(--ease) both; }
@keyframes grow-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.dashboard-lower { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 14px; margin-top: 14px; }
.chart-panel, .recent-panel { padding: 22px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.panel-title { margin: 0; font-size: 16px; letter-spacing: -.03em; }
.panel-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.select-compact { height: 33px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); font-size: 11px; outline: 0; }
.bar-chart { height: 205px; display: flex; align-items: flex-end; gap: clamp(7px, 1.4vw, 18px); padding-top: 12px; border-bottom: 1px solid var(--line); }
.bar-column { height: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 9px; }
.bar-column span { width: min(30px, 100%); min-height: 8px; display: block; border-radius: 6px 6px 0 0; background: var(--blue); transform-origin: bottom; animation: grow-bar .7s var(--ease) both; transition: background .2s ease, transform .25s var(--ease); }
.bar-column:nth-child(4n) span { background: var(--pink); }
.bar-column:nth-child(3n) span { background: var(--lime); }
.bar-column:hover span { transform: scaleY(1.07); background: var(--yellow); }
.bar-column small { color: var(--muted-2); font-size: 10px; }
@keyframes grow-bar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart-area { position: relative; min-height: 205px; }
.chart-line { position: absolute; z-index: 2; inset: 12px 0 25px; width: 100%; height: calc(100% - 37px); overflow: visible; pointer-events: none; }
.chart-line polyline { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw-line 1.2s var(--ease) both; }
.chart-line polyline + polyline { animation-delay: .35s; }
.chart-point { position: absolute; z-index: 3; width: 8px; height: 8px; border: 2px solid var(--surface); border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px rgba(255,215,124,.22); transform: translate(-50%, 50%) scale(0); animation: point-in .45s var(--ease) forwards; }
@keyframes draw-line { from { stroke-dashoffset: 1000; opacity: .25; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes line-segment-in { from { opacity: .25; } to { opacity: 1; } }
@keyframes point-in { to { transform: translate(-50%, 50%) scale(1); } }
.chart-legend { display: flex; align-items: center; gap: 16px; margin-top: 17px; color: var(--muted); font-size: 11px; }
.legend-dot { width: 8px; height: 8px; display: inline-block; margin-right: 5px; border-radius: 3px; background: var(--blue); }
.legend-dot.pink { background: var(--yellow); }
.ledger-chart-panel { margin-bottom: 14px; }
.chart-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; color: var(--muted); font-size: 10px; }
.dual-chart { min-width: 0; height: 218px; display: flex; gap: 9px; overflow: hidden; padding-top: 2px; }
.dual-chart-scale { width: 35px; flex: 0 0 35px; display: flex; flex-direction: column; justify-content: space-between; padding: 5px 0 30px; color: var(--muted-2); font-size: 9px; }
.dual-chart-line { width: 100%; height: 190px; min-width: 0; overflow: visible; }
.dual-chart-line line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }
.dual-chart-line .income-segment { fill: none; stroke: var(--month-color, #78a8d6); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; stroke-dasharray: none; animation: line-segment-in 1.25s var(--ease) both; }
.dual-chart-line .expense-bar { fill: var(--month-color, var(--pink)); opacity: .84; transform-box: fill-box; transform-origin: center bottom; animation: chart-bar-in .72s var(--ease) both; }
.dual-chart-line .expense-bar:nth-child(2n) { opacity: .68; }
.dual-chart-line circle { stroke: var(--surface); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: svg-point-in .45s var(--ease) both; }
.dual-chart-line .income-point { fill: var(--month-color, #78a8d6); animation-delay: .22s; }
@keyframes chart-bar-in { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: .84; } }
@keyframes svg-point-in { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
.chart-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0; overflow: hidden; margin: -17px 0 0 44px; padding-bottom: 2px; scrollbar-width: none; }
.chart-months::-webkit-scrollbar { display: none; }
.chart-month { min-width: 0; display: grid; gap: 3px; color: var(--muted-2); text-align: center; font-size: 9px; }
.chart-month b, .chart-month small { color: var(--month-color, var(--ink)); }
.chart-month b { font-size: 9px; font-weight: 700; }
.chart-month small { font-size: 8px; }
.chart-legend small { margin-left: auto; color: var(--muted-2); }
.category-breakdown { min-width: 0; margin-bottom: 14px; padding: 22px; overflow: hidden; }
.category-breakdown .panel-heading { align-items: center; margin-bottom: 17px; }
.category-breakdown .panel-heading > div:first-child { min-width: 0; }
.category-breakdown-controls { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.category-breakdown-list { display: grid; min-width: 0; }
.category-breakdown-head, .category-breakdown-row { display: grid; grid-template-columns: minmax(0, 1fr) 75px 75px; gap: 12px; align-items: center; }
.category-breakdown-head { min-width: 0; padding: 0 0 9px; color: var(--muted-2); font-size: 10px; }
.category-breakdown-head span:not(:first-child), .category-breakdown-row > span:not(:first-child) { text-align: right; }
.category-breakdown-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); background: transparent; font-size: 11px; }
.category-breakdown-summary strong { color: var(--ink); font-size: 19px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.category-breakdown-row { min-width: 0; min-height: 55px; padding: 0; border-bottom: 1px solid var(--line); background: transparent; transition: padding .25s var(--ease), border-color .2s ease, background .2s ease; }
.category-breakdown-row:last-child { border-bottom: 0; }
.category-breakdown-row:hover { padding: 0 10px; border-radius: 9px; background: var(--surface-soft); }
.category-breakdown-category { min-width: 0; display: flex; align-items: center; gap: 8px; }
.category-breakdown-category i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 3px; background: var(--category-color); }
.category-breakdown-category strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.category-breakdown-row > span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.category-breakdown-row > span strong { color: var(--ink); font-size: 12px; }
.category-breakdown-empty { padding: 28px 12px; color: var(--muted); text-align: center; font-size: 12px; }
.recent-list { display: grid; gap: 3px; }
.recent-row { min-height: 54px; display: flex; align-items: center; gap: 11px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.recent-row:last-child { border-bottom: 0; }
.transaction-icon { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; color: var(--ink); background: var(--surface-soft); }
.transaction-icon.expense { background: var(--pink-soft); }
.transaction-icon.income { background: var(--lime); }
.recent-meta { min-width: 0; flex: 1; }
.recent-meta strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.recent-meta span { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.recent-amount { font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.recent-amount.income { color: #6a9c31; }
.recent-amount.expense { color: var(--ink); }

.module-rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.module-card { min-height: 126px; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; border-radius: var(--radius); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.module-card:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: var(--shadow); }
.module-card.prompt { background: var(--yellow); }
.module-card.vault { background: var(--teal); }
.module-card.bookmarks { background: var(--blue); }
.module-card-top { display: flex; align-items: center; justify-content: space-between; }
.module-card .icon { color: rgba(29,30,32,.72); }
.module-card h3 { margin: 14px 0 0; font-size: 17px; letter-spacing: -.04em; }
.module-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 13px; color: rgba(29,30,32,.64); font-size: 11px; }

.saving-goal-section { margin-top: 24px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.saving-goal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.saving-goal-card { --goal-ink: #fff; --goal-muted: rgba(255,255,255,.82); --goal-label: rgba(255,255,255,.68); --goal-icon-bg: rgba(255,255,255,.08); --goal-icon-border: rgba(255,255,255,.16); --goal-track: rgba(255,255,255,.24); position: relative; min-height: 164px; height: 164px; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; overflow: hidden; border-color: color-mix(in srgb, var(--goal-accent) 38%, var(--line)); color: var(--goal-ink); background: var(--rail); box-shadow: 0 20px 60px color-mix(in srgb, var(--goal-accent) 12%, transparent); transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .42s ease, border-color .42s ease; }
.saving-goal-card::before { position: absolute; z-index: 0; inset: 0; content: ''; background: linear-gradient(135deg, var(--goal-accent), transparent 68%); opacity: .2; pointer-events: none; }
.saving-goal-card::after { position: absolute; z-index: 0; width: 220px; height: 220px; right: -65px; top: -78px; content: ''; border: 1px solid color-mix(in srgb, var(--goal-accent) 42%, rgba(255,255,255,.18)); border-radius: 50%; box-shadow: 0 0 0 26px color-mix(in srgb, var(--goal-accent) 11%, transparent), 0 0 0 54px color-mix(in srgb, var(--goal-accent) 7%, transparent); pointer-events: none; }
.saving-goal-card.goal-style-1::after { width: 180%; height: 54px; right: -42%; top: 42%; border: 0; border-top: 1px solid color-mix(in srgb, var(--goal-accent) 58%, rgba(255,255,255,.24)); border-bottom: 1px solid color-mix(in srgb, var(--goal-accent) 28%, transparent); border-radius: 999px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--goal-accent) 22%, transparent), transparent); transform: rotate(-18deg); box-shadow: 0 0 28px color-mix(in srgb, var(--goal-accent) 18%, transparent); }
.saving-goal-card.goal-style-2::after { inset: 0; width: auto; height: auto; right: 0; top: 0; border: 0; border-radius: inherit; background: repeating-linear-gradient(0deg, transparent 0 17px, color-mix(in srgb, var(--goal-accent) 14%, transparent) 18px, transparent 19px), repeating-linear-gradient(90deg, transparent 0 17px, color-mix(in srgb, var(--goal-accent) 12%, transparent) 18px, transparent 19px); opacity: .62; }
.saving-goal-card.goal-style-3::after { inset: 17px; width: auto; height: auto; right: 17px; top: 17px; border: 1px solid color-mix(in srgb, var(--goal-accent) 54%, rgba(255,255,255,.24)); border-radius: 11px; box-shadow: inset 0 0 0 7px color-mix(in srgb, var(--goal-accent) 7%, transparent); }
.saving-goal-card.goal-style-4::after { width: 190px; height: 190px; right: -54px; top: 14px; border: 0; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--goal-accent) 34%, transparent), transparent 68%); filter: blur(2px); }
.saving-goal-card.goal-style-5::after { width: 270px; height: 132px; right: -38px; top: 46px; border: 1px solid color-mix(in srgb, var(--goal-accent) 28%, transparent); border-radius: 50%; background: repeating-radial-gradient(ellipse at center, transparent 0 15px, color-mix(in srgb, var(--goal-accent) 23%, transparent) 16px 17px, transparent 18px 30px); transform: rotate(-7deg); }
.saving-goal-card:hover { transform: translateY(-4px) rotate(-.25deg); border-color: color-mix(in srgb, var(--goal-accent) 64%, rgba(255,255,255,.46)); box-shadow: 0 24px 64px color-mix(in srgb, var(--goal-accent) 20%, transparent); }
.saving-goal-card.goal-tone-0 { --goal-accent: var(--goal-accent-1); }
.saving-goal-card.goal-tone-1 { --goal-accent: var(--goal-accent-2); }
.saving-goal-card.goal-tone-2 { --goal-accent: var(--goal-accent-3); }
.saving-goal-card.goal-tone-3 { --goal-accent: var(--goal-accent-4); }
.saving-goal-top, .saving-goal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.saving-goal-top { position: relative; z-index: 1; font-size: 12px; font-weight: 700; }
.saving-goal-top .label { color: var(--goal-label); }
.saving-goal-icon { position: relative; z-index: 1; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--goal-icon-border); border-radius: 9px; color: var(--goal-ink); background: var(--goal-icon-bg); }
.saving-goal-value { position: relative; z-index: 1; margin: 12px 0 0; color: var(--goal-ink); font-size: clamp(34px, 4vw, 48px); line-height: .86; letter-spacing: -.08em; font-variant-numeric: tabular-nums; text-shadow: 0 1px 12px rgba(0,0,0,.16); }
.saving-goal-foot { position: relative; z-index: 1; color: var(--goal-muted); font-size: 11px; text-shadow: 0 1px 8px rgba(0,0,0,.12); }
.saving-goal-progress { position: relative; z-index: 1; height: 5px; margin-top: 8px; overflow: hidden; border-radius: 5px; background: var(--goal-track); }
.saving-goal-progress span { display: block; height: 100%; border-radius: inherit; background: var(--goal-accent); transform-origin: left; animation: grow-line .8s var(--ease) both; }
.saving-goal-card small { position: relative; z-index: 1; margin-top: 8px; color: var(--goal-label); font-size: 9px; text-shadow: 0 1px 8px rgba(0,0,0,.12); }
[data-theme="liquid-glass"] .saving-goal-card {
  --goal-ink: #1f3045;
  --goal-muted: rgba(31,48,69,.76);
  --goal-label: rgba(31,48,69,.68);
  --goal-icon-bg: rgba(255,255,255,.42);
  --goal-icon-border: rgba(255,255,255,.82);
  --goal-track: rgba(31,48,69,.14);
  background: linear-gradient(145deg, rgba(255,232,237,.86), rgba(224,233,255,.78));
  border-color: color-mix(in srgb, var(--goal-accent) 48%, rgba(255,255,255,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 20px 50px color-mix(in srgb, var(--goal-accent) 17%, transparent);
  color: var(--goal-ink);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}
[data-theme="liquid-glass"] .saving-goal-card .saving-goal-value { text-shadow: 0 2px 14px rgba(255,255,255,.7); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.stat-card { padding: 17px 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.stat-card p { margin: 0 0 9px; color: var(--muted); font-size: 11px; }
.stat-card strong { font-size: 23px; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px 14px 0 0; background: var(--surface); }
.segmented { display: inline-flex; gap: 3px; padding: 3px; border-radius: 9px; background: var(--surface-soft); }
.segment { min-height: 31px; padding: 0 11px; border-radius: 7px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 650; transition: color .3s ease, background .36s var(--ease-out-expo), box-shadow .36s var(--ease-out-expo), transform .18s var(--ease-out-expo); }
.segment:hover { color: var(--ink); }
.segment.is-active { color: var(--ink); background: var(--surface); box-shadow: 0 2px 7px rgba(0,0,0,.07); animation: tab-settle .36s var(--ease-out-expo) both; }
.filter-actions { display: flex; gap: 7px; }
.filter-select { height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); font-size: 11px; outline: 0; }
.dropdown { position: relative; min-width: 112px; }
.dropdown-trigger { width: 100%; min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface); font-size: 11px; text-align: left; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.dropdown-trigger:hover, .dropdown.is-open .dropdown-trigger { border-color: var(--line-strong); background: var(--surface-soft); }
.dropdown.is-open .dropdown-trigger { box-shadow: 0 0 0 4px rgba(174,189,255,.18); }
.dropdown-trigger .icon { flex: 0 0 auto; transition: transform .25s var(--ease); }
.dropdown.is-open .dropdown-trigger .icon { transform: rotate(180deg); }
.dropdown-menu { position: absolute; z-index: 16; top: calc(100% + 7px); left: 0; min-width: 100%; display: grid; gap: 3px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 16px 34px rgba(28,30,29,.14); animation: dropdown-in .22s var(--ease) both; }
.dropdown-menu button { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px; border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; text-align: left; white-space: nowrap; }
.dropdown-menu button:hover, .dropdown-menu button.is-selected { color: var(--ink); background: var(--surface-soft); }
.dropdown-menu button.is-selected { font-weight: 700; }
.dropdown-add-form { display: flex; align-items: center; gap: 4px; padding: 4px; border-top: 1px solid var(--line); }
.dropdown-add-form input { min-width: 0; min-height: 30px; flex: 1; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--surface-soft); outline: 0; font-size: 11px; }
.dropdown-add-form input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(174,189,255,.18); }
.dropdown-add-form button { width: 30px; min-height: 30px !important; justify-content: center !important; padding: 0 !important; color: var(--ink) !important; background: var(--yellow) !important; }
.dropdown-add-option { color: var(--ink) !important; background: var(--surface-soft) !important; }
@keyframes dropdown-in { from { opacity: 0; transform: translateY(-5px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.tag-picker { position: relative; min-width: 0; }
.tag-picker-trigger { width: 100%; min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface); font-size: 13px; text-align: left; }
.tag-picker-trigger > span { min-width: 0; overflow-wrap: anywhere; line-height: 1.45; }
.tag-picker.is-open .tag-picker-trigger { border-color: var(--line-strong); box-shadow: 0 0 0 4px rgba(174,189,255,.2); }
.tag-picker-menu { position: absolute; z-index: 18; top: calc(100% + 7px); left: 0; right: 0; display: grid; gap: 3px; max-height: 190px; overflow-y: auto; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 16px 34px rgba(28,30,29,.14); animation: dropdown-in .22s var(--ease) both; }
.tag-picker-menu button { min-height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 9px; border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; text-align: left; }
.tag-picker-menu button:hover, .tag-picker-menu button.is-selected { color: var(--ink); background: var(--surface-soft); }
.tag-picker-menu button.is-selected { font-weight: 700; }
.transaction-table { overflow: hidden; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; background: var(--surface); }
.transaction-table-head, .transaction-table-row { display: grid; grid-template-columns: minmax(190px, 1.5fr) .8fr .95fr .7fr; gap: 16px; align-items: center; padding: 0 18px; }
.transaction-table-head { min-height: 38px; color: var(--muted-2); border-bottom: 1px solid var(--line); font-size: 10px; }
.transaction-table-row { min-height: 76px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .2s ease, padding .25s var(--ease); }
.transaction-table-row:last-child { border-bottom: 0; }
.transaction-table-row:hover { padding-left: 22px; background: var(--surface-soft); }
.transaction-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.transaction-main-text { min-width: 0; }
.transaction-main-text strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.transaction-main-text span { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.table-cell { color: var(--muted); font-size: 11px; }
.table-amount { text-align: right; font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; }
.table-amount.income { color: #6a9c31; }
.table-empty { padding: 50px 20px; color: var(--muted); text-align: center; font-size: 13px; }

.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.library-search { width: min(340px, 100%); }
.library-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; }
.category-list { display: grid; align-content: start; gap: 4px; }
.category-button { min-height: 39px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-radius: 10px; color: var(--muted); background: transparent; text-align: left; font-size: 12px; transition: color .3s ease, background .36s var(--ease-out-expo), box-shadow .36s var(--ease-out-expo), transform .25s var(--ease); }
.category-button:hover { color: var(--ink); background: var(--surface-soft); transform: translateX(3px); }
.category-button.is-active { color: var(--ink); background: var(--yellow); font-weight: 700; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent); animation: tab-settle .36s var(--ease-out-expo) both; }
.category-count { color: var(--muted-2); font-size: 10px; }
.prompt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.prompt-card { min-height: 205px; display: flex; flex-direction: column; padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s ease; }
.prompt-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.prompt-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.prompt-tag { display: inline-flex; align-items: center; min-height: 25px; padding: 0 8px; border-radius: 7px; color: #33363b; background: var(--blue-soft); font-size: 10px; font-weight: 700; }
.prompt-card h3 { margin: 20px 0 0; font-size: 17px; letter-spacing: -.04em; }
.prompt-card p { flex: 1; margin: 8px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.prompt-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prompt-card-foot code { max-width: 62%; overflow: hidden; color: var(--muted-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.prompt-category-row { display: flex; gap: 7px; overflow-x: auto; margin: 3px 0 18px; padding: 5px 0 7px; scrollbar-width: none; }
.prompt-category-row::-webkit-scrollbar { display: none; }
.prompt-category-row .category-button { min-width: 112px; border: 1px solid var(--line); background: var(--surface); }
.prompt-category-row .category-button:nth-child(4n + 1).is-active { border-color: transparent; background: var(--yellow); }
.prompt-category-row .category-button:nth-child(4n + 2).is-active { border-color: transparent; background: var(--pink-soft); }
.prompt-category-row .category-button:nth-child(4n + 3).is-active { border-color: transparent; background: var(--blue-soft); }
.prompt-category-row .category-button:nth-child(4n).is-active { border-color: transparent; background: var(--lime); }
.prompt-grid-stacked { grid-template-columns: 1fr; gap: 15px; }
.prompt-card { position: relative; min-height: 0; display: grid; grid-template-columns: minmax(190px, .7fr) minmax(0, 1.3fr); padding: 0; overflow: hidden; }
.prompt-card::after { content: ''; position: absolute; inset: 0; border: 1px solid transparent; border-radius: inherit; pointer-events: none; transition: border-color .35s ease; }
.prompt-card:hover::after { border-color: var(--yellow); }
.prompt-card:hover { transform: translateY(-5px) scale(1.005); }
.prompt-visual { position: relative; min-height: 214px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; overflow: hidden; padding: 18px; color: rgba(29,30,32,.66); background: var(--blue-soft); text-align: center; }
.prompt-visual::before { content: ''; position: absolute; width: 130px; height: 130px; border: 1px solid rgba(29,30,32,.12); border-radius: 50%; box-shadow: 0 0 0 20px rgba(255,255,255,.18), 0 0 0 42px rgba(255,255,255,.12); transition: transform .6s var(--ease); }
.prompt-card:hover .prompt-visual::before { transform: scale(1.22) rotate(18deg); }
.prompt-visual.has-image { padding: 0; }
.prompt-visual img { width: 100%; height: 100%; min-height: 214px; display: block; object-fit: cover; transition: transform .65s var(--ease), filter .35s ease; }
.prompt-card:hover .prompt-visual img { transform: scale(1.06); filter: saturate(1.08); }
.prompt-visual strong, .prompt-visual > span { position: relative; z-index: 1; }
.prompt-visual strong { font-size: 14px; }
.prompt-visual > span { font-size: 10px; }
.prompt-visual input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.prompt-upload { position: absolute; z-index: 2; right: 12px; bottom: 12px; min-height: 31px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid rgba(29,30,32,.1); border-radius: 9px; color: var(--ink); background: rgba(255,255,255,.8); backdrop-filter: blur(8px); font-size: 10px; font-weight: 700; opacity: .78; transform: translateY(4px); transition: opacity .25s ease, transform .3s var(--ease), background .2s ease; }
.prompt-card:hover .prompt-upload, .prompt-upload:focus-visible { opacity: 1; transform: translateY(0); }
.prompt-upload:hover { background: #fff; }
.prompt-card-body { min-width: 0; display: flex; flex-direction: column; padding: 20px 22px; }
.prompt-tags { min-width: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.prompt-tag.primary { color: #3e4e91; background: var(--blue-soft); }
.prompt-card-body .prompt-card-top { align-items: flex-start; }
.prompt-card-body h3 { margin-top: 20px; }
.prompt-grid-stacked { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-items: start; }
.prompt-grid-stacked .prompt-card { aspect-ratio: 9 / 16; display: flex; grid-template-columns: none; min-height: 0; background: var(--surface); }
.prompt-grid-stacked .prompt-card.text-only { display: flex; }
.prompt-grid-stacked .prompt-card.has-prompt-image { display: flex; flex-direction: column; }
.prompt-grid-stacked .prompt-visual { min-height: 0; height: 40%; flex: 0 0 40%; }
.prompt-grid-stacked .prompt-visual img { min-height: 0; height: 100%; }
.prompt-grid-stacked .prompt-card-body { min-height: 0; height: 100%; padding: 17px; }
.prompt-grid-stacked .text-only .prompt-card-body { padding-top: 19px; }
.prompt-grid-stacked .prompt-card:hover { background: color-mix(in srgb, var(--blue-soft) 58%, var(--surface)); }
.prompt-grid-stacked .prompt-card:nth-child(3n + 1):hover { background: color-mix(in srgb, var(--pink-soft) 52%, var(--surface)); }
.prompt-grid-stacked .prompt-card:nth-child(3n + 2):hover { background: color-mix(in srgb, var(--lime) 42%, var(--surface)); }
.prompt-grid-stacked .prompt-card:nth-child(3n):hover { background: color-mix(in srgb, var(--yellow) 50%, var(--surface)); }
.prompt-agent { display: inline-flex; align-items: center; gap: 5px; width: fit-content; margin-top: 7px; color: var(--muted); font-size: 10px; }
.prompt-agent .icon { color: var(--pink); }
.prompt-grid-stacked .prompt-card p { min-height: 0; overflow: hidden; margin-bottom: 13px; }
.prompt-grid-stacked .prompt-card-foot { margin-top: auto; }
.prompt-grid-stacked .prompt-card-foot code { max-width: 52%; }
.prompt-card[role="button"] { cursor: pointer; }
.prompt-card[role="button"]:focus-visible { outline: 3px solid rgba(120, 143, 255, .55); outline-offset: 3px; }
.prompt-detail-card { display: grid; gap: 13px; }
.prompt-detail-visual { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 13px; background: var(--blue-soft); }
.prompt-detail-visual img { width: 100%; height: 100%; display: block; object-fit: cover; }
.prompt-detail-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.prompt-detail-description { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.prompt-detail-content { gap: 13px; }
.prompt-content-block { display: grid; gap: 8px; }
.prompt-content-block > span { color: var(--muted); font-size: 11px; }
.prompt-content-block code { display: block; overflow-wrap: anywhere; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.6; white-space: pre-wrap; }

.image-upload-field { position: relative; min-height: 100px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 15px; border: 1px dashed var(--line-strong); border-radius: 11px; color: var(--muted); background: var(--surface-soft); font-size: 11px; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .25s var(--ease); }
.image-upload-field:hover { border-color: var(--pink); background: var(--blue-soft); transform: translateY(-2px); }
.image-upload-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.image-upload-field img { width: 100%; height: 125px; object-fit: cover; border-radius: 8px; }
.image-upload-field.has-image { padding: 7px; }
.image-upload-field.has-image span { position: absolute; z-index: 1; right: 10px; bottom: 9px; padding: 5px 7px; border-radius: 6px; color: var(--ink); background: rgba(255,255,255,.8); font-size: 9px; }
.image-upload-actions { display: flex; align-items: stretch; gap: 8px; }
.image-upload-actions .image-upload-field { flex: 1; }
.image-upload-note { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }

.security-banner { --security-bg: color-mix(in srgb, var(--teal) 58%, var(--surface)); --security-ink: var(--ink); --security-muted: color-mix(in srgb, var(--ink) 62%, transparent); --security-icon-bg: color-mix(in srgb, var(--teal) 42%, var(--surface)); --security-icon-border: color-mix(in srgb, var(--teal) 48%, var(--line)); --security-button-bg: var(--rail); --security-button-ink: #fff; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 23px; margin-bottom: 15px; border: 1px solid color-mix(in srgb, var(--teal) 42%, var(--line)); border-radius: var(--radius); color: var(--security-ink); background: var(--security-bg); box-shadow: var(--shadow-soft); transition: color .35s ease, background .42s ease, border-color .35s ease, box-shadow .42s ease; }
.security-banner-copy { display: flex; align-items: center; gap: 13px; }
.security-banner-copy .icon { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 46px; padding: 10px; border: 1px solid var(--security-icon-border); border-radius: 14px; color: var(--security-ink); background: var(--security-icon-bg); box-shadow: inset 0 1px 0 rgba(255,255,255,.42); }
.security-banner h3 { margin: 0; color: var(--security-ink); font-size: 16px; letter-spacing: -.03em; }
.security-banner p { margin: 5px 0 0; color: var(--security-muted); font-size: 11px; }
.security-banner .button-dark { color: var(--security-button-ink); border: 1px solid color-mix(in srgb, var(--security-button-ink) 18%, transparent); background: var(--security-button-bg); box-shadow: 0 8px 18px color-mix(in srgb, var(--security-button-bg) 18%, transparent); }
.security-banner .button-dark:hover { box-shadow: 0 12px 24px color-mix(in srgb, var(--security-button-bg) 24%, transparent); }
.vault-list { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.vault-row { min-height: 79px; display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); transition: background .2s ease, padding .25s var(--ease); }
.vault-row:last-child { border-bottom: 0; }
.vault-row:hover { padding-left: 22px; background: var(--surface-soft); }
.vault-logo { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: #26272a; background: var(--blue); font-weight: 800; }
.vault-meta { min-width: 0; flex: 1; }
.vault-meta strong { display: block; font-size: 13px; }
.vault-meta span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.vault-password { width: 180px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; letter-spacing: .06em; }
.vault-actions { display: flex; gap: 5px; }
.card-library { margin-bottom: 15px; padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.card-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.bank-card-stacks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.bank-stack { min-width: 0; overflow: hidden; padding: 10px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); transition: border-color .3s ease, box-shadow .35s var(--ease), background .3s ease; }
.bank-stack.is-expanded { border-color: var(--line-strong); background: var(--surface); box-shadow: var(--shadow-soft); }
.bank-stack-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 4px 9px; color: var(--ink); background: transparent; text-align: left; }
.bank-stack-heading { display: grid; gap: 3px; }
.bank-stack-heading strong { font-size: 13px; }
.bank-stack-heading small { color: var(--muted); font-size: 10px; }
.bank-stack-action { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 10px; }
.bank-stack-action .icon { transition: transform .35s var(--ease); }
.bank-stack.is-expanded .bank-stack-action .icon { transform: rotate(0); }
.bank-stack-cards { position: relative; min-height: 176px; padding: 5px 2px 2px; }
.bank-stack:not(.is-expanded) .bank-stack-cards { height: 181px; }
.bank-stack:not(.is-expanded) .bank-card { position: absolute; inset: 5px 2px auto; z-index: calc(var(--stack-index) + 1); transform: translateY(calc(var(--stack-index) * 9px)) rotate(calc((var(--stack-index) - 1) * .9deg)); }
.bank-stack:not(.is-expanded) .bank-card:not(:last-child) { pointer-events: none; }
.bank-stack.is-expanded .bank-stack-cards { display: grid; gap: 9px; min-height: 0; }
.bank-stack.is-expanded .bank-card { transform: none; }
.bank-stack-empty { min-height: 155px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); font-size: 11px; }
.bank-card { position: relative; min-height: 155px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 17px; border-radius: 15px; color: #202123; background: var(--card-color, var(--pink)); box-shadow: 0 9px 20px color-mix(in srgb, var(--card-color, var(--pink)) 28%, transparent); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.bank-card::after { content: ''; position: absolute; width: 145px; height: 145px; right: -52px; top: -52px; border: 1px solid rgba(255,255,255,.46); border-radius: 50%; box-shadow: 0 0 0 18px rgba(255,255,255,.12), 0 0 0 38px rgba(255,255,255,.08); }
.bank-card:hover { transform: translateY(-5px) rotate(-1deg); box-shadow: 0 17px 28px color-mix(in srgb, var(--card-color, var(--pink)) 38%, transparent); }
.bank-card-top, .bank-card-bottom { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bank-card-top { font-size: 11px; font-weight: 750; }
.bank-card-name { position: relative; z-index: 1; overflow: hidden; margin: 20px 0 7px; font-size: 16px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.bank-card-number { position: relative; z-index: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; letter-spacing: .08em; }
.bank-card-bottom { color: rgba(29,30,32,.66); font-size: 10px; }
.bank-card-action { position: relative; z-index: 1; padding: 4px 0; color: inherit; background: transparent; font-weight: 700; }
.card-form-preview { min-height: 74px; display: flex; align-items: center; gap: 12px; margin-bottom: 17px; padding: 0 17px; border-radius: 13px; color: #202123; background: var(--card-color, var(--pink)); font-size: 13px; font-weight: 750; transition: background .25s ease; }
.color-option { display: inline-flex; align-items: center; gap: 7px; }
.color-option i { width: 13px; height: 13px; display: inline-block; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(29,30,32,.12); }

.card-detail-hero { min-height: 172px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; margin-bottom: 14px; padding: 19px; border-radius: 15px; color: #202123; background: var(--card-color, var(--pink)); box-shadow: 0 12px 25px color-mix(in srgb, var(--card-color, var(--pink)) 28%, transparent); }
.card-detail-hero strong { font-size: 24px; letter-spacing: -.05em; }
.card-detail-number { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; letter-spacing: .08em; }
.card-detail-grid { gap: 0; }
.card-detail-grid .detail-line { min-height: 42px; align-items: center; border-bottom: 1px solid var(--line); }
.card-detail-grid .detail-line:last-child { border-bottom: 0; }
.detail-secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.vault-detail-card { gap: 0; }
.detail-secret-head { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.detail-secret-head > div:last-child { display: grid; gap: 4px; }
.detail-secret-head strong { font-size: 13px; }
.detail-secret-head span { color: var(--muted); font-size: 10px; }
.bookmark-detail-card { display: flex; align-items: flex-start; gap: 13px; padding: 16px; border-radius: 13px; background: var(--surface-soft); }
.bookmark-detail-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: #292a2c; font-weight: 800; }
.bookmark-detail-card > div:last-child { min-width: 0; }
.detail-kicker { color: var(--muted-2); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.bookmark-detail-card h3 { margin: 6px 0 6px; font-size: 15px; }
.bookmark-detail-card p { margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; line-height: 1.55; }

.bookmark-top { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; margin-bottom: 16px; }
.bookmark-hero,
.bookmark-count-card { position: relative; overflow: hidden; border: 1px solid color-mix(in srgb, var(--bookmark-accent) 42%, var(--line)); color: var(--ink); box-shadow: var(--shadow-soft); }
.bookmark-hero { --bookmark-accent: var(--blue); min-height: 152px; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; border-radius: var(--radius); background: linear-gradient(135deg, color-mix(in srgb, var(--bookmark-accent) 42%, var(--surface)), color-mix(in srgb, var(--bookmark-accent) 16%, var(--surface))); }
.bookmark-hero::after,
.bookmark-count-card::after { content: ''; position: absolute; width: 180px; height: 180px; right: -82px; bottom: -102px; border: 1px solid color-mix(in srgb, var(--bookmark-accent) 32%, transparent); border-radius: 50%; box-shadow: 0 0 0 19px color-mix(in srgb, var(--bookmark-accent) 12%, transparent), 0 0 0 42px color-mix(in srgb, var(--bookmark-accent) 7%, transparent); pointer-events: none; }
.bookmark-hero h2 { position: relative; z-index: 1; max-width: 360px; margin: 0; font-size: 26px; line-height: 1; letter-spacing: -.06em; }
.bookmark-hero p { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: 12px; }
.bookmark-count-card { --bookmark-accent: var(--yellow); display: flex; flex-direction: column; justify-content: space-between; padding: 22px; border-radius: var(--radius); background: linear-gradient(145deg, color-mix(in srgb, var(--bookmark-accent) 46%, var(--surface)), color-mix(in srgb, var(--bookmark-accent) 18%, var(--surface))); }
.bookmark-count-card strong,
.bookmark-count-card span { position: relative; z-index: 1; }
.bookmark-count-card strong { color: var(--ink); font-size: 50px; line-height: .8; letter-spacing: -.08em; }
.bookmark-count-card span { color: var(--muted); font-size: 12px; }
.bookmark-grid { display: grid; align-content: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.bookmark-card { min-height: 88px; display: flex; flex-direction: column; justify-content: center; padding: 11px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.bookmark-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.bookmark-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.favicon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #2a2b2d; font-size: 12px; font-weight: 800; }
.bookmark-card .favicon { width: auto; max-width: calc(100% - 42px); min-height: 34px; height: auto; padding: 0 12px; overflow: hidden; border-radius: 10px; text-overflow: ellipsis; white-space: nowrap; }

.settings-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; }
.settings-nav { display: grid; align-content: start; gap: 4px; }
.settings-section { margin-bottom: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.settings-section h3 { margin: 0; font-size: 15px; letter-spacing: -.03em; }
.settings-section > p { margin: 6px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.settings-content { min-width: 0; }
.settings-input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.settings-input-grid .form-field span { color: var(--muted); font-size: 11px; font-weight: 650; }
.settings-option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.settings-content-stack { display: grid; gap: 0; }
.settings-dropdown-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.settings-dropdown-field { display: grid; gap: 7px; min-width: 0; }
.settings-dropdown-field > span { color: var(--muted); font-size: 11px; font-weight: 650; }
.settings-dropdown-field .dropdown { min-width: 0; }
.editable-options { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.editable-options-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.editable-options-label strong { font-size: 12px; }
.editable-options-label span { color: var(--muted-2); font-size: 10px; }
.option-chip-list { display: flex; flex-wrap: wrap; gap: 5px; min-height: 28px; }
.option-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 25px; padding: 0 6px 0 8px; border-radius: 7px; color: var(--ink); background: var(--surface); font-size: 10px; }
.option-chip button { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 5px; color: var(--muted); background: transparent; }
.option-chip button:hover { color: var(--ink); background: var(--surface-soft); }
.option-chip-edit { min-width: 0; display: inline-flex; align-items: center; gap: 3px; min-height: 25px; padding: 0 4px 0 7px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); }
.option-chip-edit input { width: 88px; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 10px; }
.option-chip-edit button { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 5px; color: var(--muted); background: transparent; }
.option-chip-edit button:hover { color: var(--ink); background: var(--surface-soft); }
.option-add-form { display: flex; gap: 6px; margin-top: 10px; }
.option-add-form input { min-width: 0; flex: 1; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); outline: 0; font-size: 10px; }
.option-add-form .button { min-height: 34px; padding: 0 8px; }
.option-add-form .button:disabled { cursor: not-allowed; opacity: .5; }
.goal-editor-list { display: grid; gap: 10px; }
.goal-editor { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.goal-editor-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.goal-editor-top strong { font-size: 12px; }
.goal-editor-top .icon-button { width: 30px; height: 30px; border: 0; background: transparent; }
.goal-add-form { display: grid; grid-template-columns: 1fr .7fr auto; gap: 8px; margin-top: 12px; }
.goal-add-form input { min-width: 0; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); outline: 0; font-size: 11px; }
.goal-style-option { min-height: 92px; padding: 13px; border-radius: 12px; cursor: default; }
.goal-style-option { height: auto; }
.goal-style-option:hover { transform: translateY(-2px); }
.goal-style-option-name, .goal-style-option-line { position: relative; z-index: 1; display: block; }
.goal-style-option-name { color: rgba(255,255,255,.82); font-size: 11px; font-weight: 700; }
.goal-style-option-line { margin-top: 23px; color: rgba(255,255,255,.48); font-size: 9px; }
.goal-style-picker { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.goal-style-picker-option { min-width: 0; min-height: 58px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--surface); text-align: left; transition: border-color .2s ease, background .2s ease, box-shadow .25s var(--ease), transform .25s var(--ease); }
.goal-style-picker-option:hover { border-color: var(--line-strong); background: var(--surface-soft); transform: translateY(-2px); }
.goal-style-picker-option.is-selected { border-color: var(--pink); color: var(--ink); background: var(--surface-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 18%, transparent); }
.goal-style-picker-option > span:last-of-type { overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.goal-style-picker-option > .icon { color: var(--pink); }
.goal-style-picker-swatch { width: 42px; min-height: 40px; height: 40px; padding: 0; border-radius: 9px; box-shadow: none; pointer-events: none; }
.theme-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.theme-card { position: relative; min-height: 142px; display: grid; align-content: end; gap: 5px; padding: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface-soft); text-align: left; transition: transform .3s var(--ease), border-color .2s ease, box-shadow .3s var(--ease); }
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.theme-card.is-active { border: 2px solid var(--pink); }
.theme-card > strong { position: relative; z-index: 1; font-size: 12px; }
.theme-card > small { position: relative; z-index: 1; color: var(--muted); font-size: 10px; }
.theme-card > .icon { position: absolute; right: 11px; top: 11px; z-index: 2; }
.theme-preview { position: absolute; inset: 0 0 42px; background: var(--theme-color); }
.theme-preview::after { content: ''; position: absolute; width: 80px; height: 80px; right: -18px; top: -28px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; box-shadow: 0 0 0 15px rgba(255,255,255,.12); }
.theme-duna .theme-preview { background: #e8875d; }
.theme-greptile { background: #18211b; color: #eff7e9; }
.theme-greptile .theme-preview { background: #b7ff4a; }
.theme-greptile > small { color: #9dac9c; }
.theme-hosier .theme-preview { background: #e8a0a7; }
.app-icon-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.app-icon-option { position: relative; min-height: 94px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--surface-soft); transition: transform .25s var(--ease), border-color .2s ease, color .2s ease; }
.app-icon-option:hover { transform: translateY(-3px); color: var(--ink); }
.app-icon-option.is-active { border-color: var(--pink); color: var(--ink); }
.app-icon-option > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; color: #25262a; font-weight: 800; }
.app-icon-option > strong { font-size: 10px; }
.app-icon-option > .icon { position: absolute; top: 8px; right: 8px; }
.setting-row { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); }
.setting-row:first-of-type { border-top: 0; }
.setting-copy strong { display: block; font-size: 13px; }
.setting-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.toggle { width: 42px; height: 25px; padding: 3px; flex: 0 0 auto; border-radius: 20px; background: var(--line-strong); transition: background .25s ease; }
.toggle span { width: 19px; height: 19px; display: block; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: transform .3s var(--ease); }
.toggle.is-on { background: var(--pink); }
.toggle.is-on span { transform: translateX(17px); }
.mode-toggle { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface-soft); font-size: 11px; font-weight: 700; transition: transform .25s var(--ease), border-color .25s ease, background .25s ease, box-shadow .25s ease; }
.mode-toggle:hover { border-color: var(--line-strong); background: var(--surface); box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.mode-toggle .icon { color: var(--pink); }
.mode-toggle.is-night .icon { color: var(--blue); }
.theme-picker { display: flex; gap: 5px; padding: 4px; border-radius: 9px; background: var(--surface-soft); }
.theme-option { min-height: 29px; padding: 0 9px; border-radius: 7px; color: var(--muted); background: transparent; font-size: 10px; }
.theme-option.is-active { color: var(--ink); background: var(--surface); box-shadow: 0 2px 6px rgba(0,0,0,.07); }
.sync-status-card { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px; border-radius: 11px; background: var(--surface-soft); }
.sync-status-left { display: flex; align-items: center; gap: 10px; }
.sync-status-left .icon { color: #5f9f4b; }
.sync-status-left strong { display: block; font-size: 12px; }
.sync-status-left span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.sync-label { padding: 5px 8px; border-radius: 7px; font-size: 10px; font-weight: 750; }
.sync-label.sync-success { color: #477f37; background: #dff4cf; }
.sync-label.sync-error { color: #a13d4f; background: #ffd9dc; }
.sync-label.sync-idle { color: var(--muted); background: var(--chip); }
.sync-label.sync-syncing { color: #996d20; background: #fff0c8; }
.pin-setting { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); }
.pin-setting input { width: 105px; min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); outline: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .18em; text-align: center; }

.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 20px; contain: paint; background: rgba(20,21,23,.48); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: fade-in .16s ease both; }
.modal-backdrop.is-closing { animation: fade-out .22s ease both; pointer-events: none; }
.modal { position: relative; width: min(510px, 100%); max-height: min(700px, 92vh); display: flex; flex-direction: column; overflow: hidden; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 30px 100px rgba(0,0,0,.25); animation: none; will-change: transform, opacity; }
.modal > form { min-height: 0; flex: 1 1 auto; overflow-y: auto; scrollbar-width: none; }
.modal > form::-webkit-scrollbar { display: none; }
.card-form-modal { display: flex; flex-direction: column; overflow: hidden; }
.card-form-modal > form { min-height: 0; overflow-y: auto; scrollbar-width: none; }
.card-form-modal > form::-webkit-scrollbar { display: none; }
.card-form-modal > form .modal-footer { background: transparent; }
.modal > *:not(.modal-comet) { position: relative; z-index: 6; }
.modal-comet { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: 0; }
.modal-comet-active { opacity: 1; }
.modal-comet-path { stroke: url(#modal-comet-gradient); stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; will-change: stroke-dashoffset; stroke-dashoffset: var(--modal-comet-start-offset, 0px); }
.modal-comet-far { stroke-width: 6; opacity: .3; }
.modal-comet-mid { stroke-width: 4; opacity: .47; }
.modal-comet-near { stroke-width: 2.5; opacity: .72; }
.modal-comet-head { stroke-width: 1.7; opacity: 1; filter: drop-shadow(0 0 3px rgba(255,255,255,1)) drop-shadow(0 0 8px rgba(255,113,133,.92)); }
.modal-comet-active .modal-comet-path { animation: modal-comet-travel 16.4s linear infinite; }
.modal-comet-closing { opacity: 1; }
.modal-comet-closing .modal-comet-path { animation: modal-comet-travel-reverse .22s linear both; }
@keyframes modal-comet-travel { from { stroke-dashoffset: var(--modal-comet-start-offset, 0px); } to { stroke-dashoffset: var(--modal-comet-end-offset, var(--modal-comet-distance)); } }
@keyframes modal-comet-travel-reverse { from { stroke-dashoffset: var(--modal-comet-reverse-from, var(--modal-comet-start-offset, 0px)); } to { stroke-dashoffset: var(--modal-comet-start-offset, 0px); } }
.modal.modal-origin-action, .modal.modal-origin-fab { transform-origin: 50% 50%; }
.modal.is-closing { animation: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.12); } 68% { opacity: 1; transform: translateY(-3px) scale(1.015); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modal-collapse { from { opacity: 1; transform: translateY(0) scale(1); } 34% { opacity: .92; transform: translateY(-2px) scale(.98); } to { opacity: 0; transform: translateY(16px) scale(.12); } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.modal-header h2 { margin: 0; font-size: 24px; letter-spacing: -.06em; }
.modal-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.modal-close { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--muted); background: var(--surface-soft); transition: transform .2s var(--ease), color .2s ease; }
.modal-close:hover { color: var(--ink); transform: rotate(8deg); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-field { display: grid; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: var(--muted); font-size: 11px; font-weight: 650; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--ink); background: var(--surface); font-size: 13px; transition: border-color .2s ease, box-shadow .2s ease; }
.form-field textarea { min-height: 84px; padding-top: 11px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--line-strong); box-shadow: 0 0 0 4px rgba(174,189,255,.2); }
.type-switch { display: flex; gap: 6px; padding: 4px; margin-bottom: 17px; border-radius: 10px; background: var(--surface-soft); }
.type-switch button { min-height: 35px; flex: 1; border-radius: 7px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; transition: color .3s ease, background .36s var(--ease-out-expo), box-shadow .36s var(--ease-out-expo), transform .18s var(--ease-out-expo); }
.type-switch button.is-income { color: #426f2d; background: var(--lime); }
.type-switch button.is-expense { color: #762f3a; background: var(--pink-soft); }
@keyframes tab-settle { from { transform: scale(.96); } 68% { transform: scale(1.015); } to { transform: scale(1); } }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }
.detail-card { display: grid; gap: 14px; padding: 16px; border-radius: 13px; background: var(--surface-soft); }
.detail-line { display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 12px; }
.detail-line strong { color: var(--ink); font-weight: 700; text-align: right; }
.unlock-box { display: grid; gap: 13px; padding: 17px; border-radius: 13px; background: var(--surface-soft); }
.unlock-box .lock-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--teal); }
.unlock-box h3 { margin: 0; font-size: 17px; }
.unlock-box p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.biometric-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.biometric-actions.single { grid-template-columns: 1fr; }
.biometric-button { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); font-size: 11px; font-weight: 700; transition: transform .25s var(--ease), border-color .2s ease, background .2s ease; }
.biometric-button:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--surface-soft); }
.biometric-button .icon { color: var(--pink); }
.pin-entry { display: grid; gap: 7px; }
.pin-entry label { color: var(--muted); font-size: 11px; font-weight: 650; }
.pin-entry input { min-height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); outline: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .18em; }
.pin-entry small { color: #b64b5d; font-size: 10px; }
.login-gate { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; overflow: hidden; padding: 20px; background: var(--canvas); }
.login-orbit { position: absolute; border: 1px solid color-mix(in srgb, var(--pink) 35%, transparent); border-radius: 50%; pointer-events: none; }
.login-orbit-one { width: 520px; height: 520px; right: -160px; top: -140px; box-shadow: 0 0 0 34px color-mix(in srgb, var(--pink) 7%, transparent), 0 0 0 80px color-mix(in srgb, var(--pink) 5%, transparent); animation: login-orbit 14s linear infinite; }
.login-orbit-two { width: 360px; height: 360px; left: -150px; bottom: -120px; border-color: color-mix(in srgb, var(--blue) 45%, transparent); animation: login-orbit 11s linear reverse infinite; }
.login-card { position: relative; width: min(420px, 100%); display: grid; gap: 14px; padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 28px 90px rgba(28,30,29,.16); backdrop-filter: blur(18px); animation: login-card-in .65s var(--ease) both; }
.login-brand { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.login-brand .brand-mark { width: 31px; height: 31px; }
.login-lock-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-top: 20px; border-radius: 17px; color: #242529; background: var(--yellow); }
.login-kicker { color: var(--muted-2); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.login-card h1 { margin: 0; font-size: 30px; letter-spacing: -.06em; }
.login-card > p { margin: -5px 0 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.login-biometric-actions .biometric-button { min-height: 66px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; justify-content: stretch; padding: 0 12px; text-align: left; }
.login-biometric-actions .biometric-button .icon { grid-row: 1 / -1; }
.login-biometric-actions .biometric-button span { align-self: end; }
.login-biometric-actions .biometric-button small { align-self: start; color: var(--muted); font-size: 9px; font-weight: 500; }
.verification-hint { color: var(--muted); font-size: 10px; line-height: 1.5; }
.login-divider { display: flex; align-items: center; gap: 9px; color: var(--muted-2); font-size: 10px; }
.login-divider::before, .login-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.login-pin-form { display: flex; gap: 8px; }
.login-pin-form input { min-width: 0; flex: 1; min-height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); outline: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
.login-pin-form .button { flex: 0 0 auto; }
.login-error { color: #b64b5d; font-size: 10px; }
.login-safe-note { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; color: var(--muted-2); font-size: 10px; }
.workbench-login-card { gap: 13px; }
.workbench-login-form { display: grid; gap: 12px; margin-top: 2px; }
.workbench-login-form .button { width: 100%; margin-top: 3px; }
.remember-login { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; cursor: pointer; }
.remember-login input { width: 15px; height: 15px; margin: 0; accent-color: var(--pink); }
.touch-id-login { min-height: 66px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 0 13px; border: 1px solid color-mix(in srgb, var(--pink) 28%, var(--line)); border-radius: 12px; color: var(--ink); background: color-mix(in srgb, var(--pink) 8%, var(--surface)); text-align: left; transition: transform .25s var(--ease), background .25s ease, border-color .25s ease; }
.touch-id-login:hover { transform: translateY(-2px); border-color: var(--pink); background: color-mix(in srgb, var(--pink) 13%, var(--surface)); }
.touch-id-login:active { transform: scale(.98); }
.touch-id-login:disabled { cursor: wait; opacity: .7; }
.touch-id-login .icon { grid-row: 1 / -1; color: var(--pink); }
.touch-id-login span { align-self: end; font-size: 12px; font-weight: 750; }
.touch-id-login small { align-self: start; color: var(--muted); font-size: 9px; }
.welcome-splash { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; overflow: hidden; color: var(--ink); background: var(--canvas); animation: welcome-fade-out .42s 1.02s ease forwards; }
.welcome-logo { position: relative; z-index: 2; width: 112px; height: 112px; display: grid; place-items: center; border-radius: 32px; color: #202123; background: linear-gradient(135deg, #202123 0 48%, #fff8f5 49% 100%), var(--pink); background-blend-mode: overlay; box-shadow: 0 20px 48px rgba(255,113,133,.28); font-size: 32px; font-weight: 900; letter-spacing: -.08em; animation: welcome-logo-in .9s var(--ease) both, welcome-breathe 2.1s 1s ease-in-out infinite; }
.welcome-kicker { position: relative; z-index: 2; margin-top: 14px; color: var(--muted-2); font-size: 10px; font-weight: 850; letter-spacing: .2em; animation: welcome-copy-in .7s .22s var(--ease) both; }
.welcome-splash strong { position: relative; z-index: 2; font-size: 23px; letter-spacing: -.06em; animation: welcome-copy-in .7s .32s var(--ease) both; }
.welcome-splash small { position: relative; z-index: 2; color: var(--muted); font-size: 9px; letter-spacing: .14em; animation: welcome-copy-in .7s .42s var(--ease) both; }
.welcome-orbit { position: absolute; border: 1px solid color-mix(in srgb, var(--pink) 38%, transparent); border-radius: 50%; pointer-events: none; }
.welcome-orbit-one { width: 430px; height: 430px; animation: welcome-orbit 8s linear infinite; box-shadow: 0 0 0 30px color-mix(in srgb, var(--pink) 6%, transparent); }
.welcome-orbit-two { width: 660px; height: 660px; border-color: color-mix(in srgb, var(--blue) 34%, transparent); animation: welcome-orbit 13s linear reverse infinite; }
.app-entering .main-content { animation: app-content-in .7s var(--ease) both; }
.app-entering .sidebar { animation: app-sidebar-in .6s var(--ease) both; }
.vault-password-intro { display: flex; align-items: center; gap: 12px; padding: 13px; border-radius: 13px; background: var(--surface-soft); }
.vault-password-intro .lock-icon { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: #202123; background: var(--teal); }
.vault-password-intro strong { display: block; font-size: 12px; }
.vault-password-intro p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
@keyframes welcome-logo-in { from { opacity: 0; transform: translateY(16px) scale(.72) rotate(-8deg); } to { opacity: 1; transform: translateY(0) scale(1) rotate(0); } }
@keyframes welcome-breathe { 0%, 100% { box-shadow: 0 20px 48px rgba(255,113,133,.22); } 50% { box-shadow: 0 24px 58px rgba(255,113,133,.38); } }
@keyframes welcome-copy-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes welcome-orbit { to { transform: rotate(360deg); } }
@keyframes welcome-fade-out { to { opacity: 0; visibility: hidden; } }
@keyframes app-content-in { from { opacity: .25; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes app-sidebar-in { from { opacity: .5; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
.encryption-gate { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; overflow: hidden; padding: 20px; background: var(--canvas); }
.encryption-card { width: min(440px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 30px 90px rgba(20,21,23,.16); animation: modal-in .45s var(--ease) both; }
.encryption-card .login-brand { margin-bottom: 28px; }
.encryption-card .login-lock-icon { margin: 0 auto 15px; }
.encryption-card .login-kicker { display: block; text-align: center; }
.encryption-card h1 { margin: 10px 0 8px; text-align: center; }
.encryption-card > p { max-width: 320px; margin: 0 auto 22px; color: var(--muted); font-size: 12px; line-height: 1.65; text-align: center; }
.encryption-form { display: grid; gap: 13px; }
.encryption-form .button { width: 100%; margin-top: 4px; }
.encryption-form .login-error { margin: 0; }
.security-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.security-tools > div:first-child { min-width: 0; display: grid; gap: 4px; }
.security-tools strong { font-size: 12px; }
.security-tools span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.security-tool-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
@keyframes login-card-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes login-orbit { to { transform: rotate(360deg); } }
.toast { position: fixed; z-index: 50; right: 25px; bottom: 25px; display: flex; align-items: center; gap: 9px; max-width: min(360px, calc(100vw - 40px)); padding: 13px 15px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; color: #fff; background: var(--rail); box-shadow: var(--shadow); animation: toast-in .45s var(--ease) both; font-size: 12px; }
.toast .icon { color: var(--lime); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.account-menu-backdrop { position: fixed; z-index: 31; inset: 0; background: transparent; }
.account-menu { position: absolute; right: auto; bottom: 78px; left: 16px; width: min(290px, calc(100vw - 36px)); padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 60px rgba(28,30,29,.18); animation: account-menu-in .32s var(--ease) both; }
.account-menu-profile { display: flex; align-items: center; gap: 10px; padding: 4px 4px 13px; border-bottom: 1px solid var(--line); }
.avatar-large { width: 38px; height: 38px; flex: 0 0 auto; }
.account-menu-profile > div:nth-child(2) { min-width: 0; flex: 1; }
.account-menu-profile strong { display: block; font-size: 13px; }
.account-menu-profile span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.account-menu-profile .icon-button { width: 30px; height: 30px; border: 0; background: transparent; }
.account-menu-list { display: grid; gap: 3px; padding: 9px 0; }
.account-menu-list button { min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 8px; border-radius: 9px; color: var(--ink); background: transparent; font-size: 12px; text-align: left; }
.account-menu-list button:hover { background: var(--surface-soft); }
.account-menu-list button span { flex: 1; }
.account-menu-note { margin: 0; padding: 10px 8px 3px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 10px; }
@keyframes account-menu-in { from { opacity: 0; transform: translateY(9px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.celebration-backdrop { position: fixed; z-index: 40; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(20,21,23,.22); backdrop-filter: blur(4px); animation: fade-in .2s ease both; }
.celebration-modal { position: relative; width: min(360px, 100%); overflow: hidden; padding: 0 25px 25px; border-radius: 23px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 80px rgba(20,21,23,.2); text-align: center; animation: celebration-in .65s var(--ease) both; }
.celebration-art { position: relative; height: 144px; margin: 0 -25px 19px; display: grid; place-items: center; overflow: hidden; background: var(--pink); }
.celebration-yellow .celebration-art { background: var(--yellow); }
.celebration-blue .celebration-art { background: var(--blue); }
.celebration-teal .celebration-art { background: var(--teal); }
.celebration-lime .celebration-art { background: var(--lime); }
.celebration-icon { position: relative; z-index: 2; width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 21px; color: #202123; background: rgba(255,255,255,.56); box-shadow: 0 11px 24px rgba(29,30,32,.12); animation: icon-pop .7s .12s var(--ease) both; }
.celebration-yellow .celebration-icon { border-radius: 50%; animation-name: sparkle-pop; }
.celebration-blue .celebration-icon { border-radius: 17px 17px 26px 17px; animation-name: bookmark-pop; }
.celebration-teal .celebration-icon { border-radius: 50%; animation-name: shield-pop; }
.celebration-lime .celebration-icon { border-radius: 16px; animation-name: card-pop; }
.celebration-ring { position: absolute; width: 118px; height: 118px; border: 1px solid rgba(255,255,255,.48); border-radius: 50%; animation: ring-pulse 1.8s ease-out both; }
.ring-one { animation-delay: .1s; }
.ring-two { width: 184px; height: 184px; opacity: .55; animation-delay: .28s; }
.celebration-spark { position: absolute; width: 8px; height: 8px; border-radius: 3px; background: rgba(255,255,255,.82); transform: rotate(45deg); animation: spark-float 1.1s var(--ease) both; }
.spark-one { left: 22%; top: 27%; }
.spark-two { right: 23%; top: 22%; width: 5px; height: 5px; animation-delay: .15s; }
.spark-three { right: 29%; bottom: 20%; width: 6px; height: 6px; animation-delay: .25s; }
.celebration-kicker { color: var(--muted-2); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.celebration-copy h2 { margin: 8px 0 7px; font-size: 25px; letter-spacing: -.06em; }
.celebration-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
@keyframes celebration-in { from { opacity: 0; transform: translateY(18px) scale(.92) rotate(-1deg); } to { opacity: 1; transform: translateY(0) scale(1) rotate(0); } }
@keyframes icon-pop { from { opacity: 0; transform: scale(.35) rotate(-20deg); } 70% { transform: scale(1.1) rotate(5deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes sparkle-pop { from { opacity: 0; transform: scale(.2) rotate(-40deg); } 65% { transform: scale(1.16) rotate(10deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes bookmark-pop { from { opacity: 0; transform: translateY(-24px) rotate(8deg); } 70% { transform: translateY(5px) rotate(-3deg); } to { opacity: 1; transform: translateY(0) rotate(0); } }
@keyframes shield-pop { from { opacity: 0; transform: scale(.45); box-shadow: 0 0 0 0 rgba(255,255,255,.65); } 55% { box-shadow: 0 0 0 18px rgba(255,255,255,0); } to { opacity: 1; transform: scale(1); } }
@keyframes card-pop { from { opacity: 0; transform: translateX(28px) rotate(12deg); } 70% { transform: translateX(-4px) rotate(-2deg); } to { opacity: 1; transform: translateX(0) rotate(0); } }
@keyframes ring-pulse { from { opacity: 0; transform: scale(.55); } 35% { opacity: .75; } to { opacity: 0; transform: scale(1.18); } }
@keyframes spark-float { from { opacity: 0; transform: translateY(16px) rotate(45deg) scale(.5); } to { opacity: 1; transform: translateY(0) rotate(45deg) scale(1); } }
.quick-add { position: fixed; z-index: 10; right: 32px; bottom: 30px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; color: #202123; background: var(--pink); box-shadow: 0 12px 24px rgba(255,113,133,.3); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.quick-add:hover { transform: translateY(-5px) rotate(4deg); box-shadow: 0 18px 30px rgba(255,113,133,.36); }
.quick-add:active { transform: translateY(1px) scale(.95); }
.mobile-nav { display: none; }
.treasure-menu { position: fixed; z-index: 13; right: 12px; bottom: 76px; width: min(220px, calc(100vw - 24px)); display: grid; gap: 4px; padding: 7px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 18px 45px rgba(28,30,29,.18); animation: treasure-in .3s var(--ease) both; }
.treasure-menu button { min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 10px; border-radius: 9px; color: var(--ink); background: transparent; font-size: 12px; text-align: left; }
.treasure-menu button:hover { background: var(--surface-soft); }
.treasure-menu button span { flex: 1; }
@keyframes treasure-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.sidebar-backdrop { position: fixed; z-index: 20; inset: 0; background: rgba(20, 21, 23, .45); backdrop-filter: blur(5px); animation: fade-in .22s ease both; }

@media (max-width: 1080px) {
  .sidebar { width: 214px; flex-basis: 214px; }
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-balance { grid-column: 1 / -1; min-height: 210px; }
  .dashboard-lower { grid-template-columns: 1fr; }
  .bookmark-top { grid-template-columns: 1fr 220px; }
}

@media (max-width: 760px) {
  html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
  *::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .app-shell { display: block; }
  .sidebar, .sidebar-backdrop { display: none; }
  .mobile-menu-button { display: none; }
  .topbar { min-height: 88px; padding: 18px 18px 15px; }
  .topbar-heading { flex: 1; }
  .topbar h1 { font-size: 22px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .search-field { display: none; }
  .topbar-actions > .avatar { width: 34px; height: 34px; display: grid; font-size: 11px; }
  .page-scroll { padding: 25px 18px calc(112px + env(safe-area-inset-bottom)); }
  .page-header { display: block; margin-bottom: 22px; }
  .page-title { font-size: 38px; }
  .page-description { margin-top: 10px; }
  .page-actions { margin-top: 18px; }
  .page-actions .button { flex: 1; }
  .overview-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .hero-balance { grid-column: 1 / -1; min-height: 205px; padding: 19px; }
  .metric-card { min-height: 170px; padding: 17px; }
  .metric-number { font-size: 25px; }
  .dashboard-lower { gap: 9px; margin-top: 9px; }
  .chart-panel, .recent-panel { padding: 17px; }
  .bar-chart { height: 205px; gap: 5px; }
  .module-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .module-card { min-height: 88px; padding: 11px 9px; border-radius: 12px; }
  .module-card h3 { margin-top: 9px; font-size: 12px; }
  .module-card-foot { margin-top: 8px; font-size: 9px; }
  .module-card-foot span:last-child { display: none; }
  .stat-row { gap: 8px; }
  .stat-card { padding: 13px; }
  .stat-card strong { font-size: 18px; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-actions { justify-content: space-between; }
  .transaction-table-head { display: none; }
  .transaction-table-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; min-height: 72px; padding: 0 13px; }
  .transaction-table-row:hover { padding-left: 16px; }
  .transaction-table-row .table-cell:nth-child(2), .transaction-table-row .table-cell:nth-child(3) { display: none; }
  .table-amount { grid-column: 2; grid-row: 1; }
  .library-toolbar { display: block; }
  .library-toolbar .library-search { width: 100%; margin-bottom: 10px; }
  .library-toolbar .button { width: 100%; }
  .library-layout, .settings-layout { grid-template-columns: 1fr; gap: 13px; }
  .category-list { display: flex; overflow-x: auto; gap: 5px; padding-bottom: 2px; scrollbar-width: none; }
  .category-list::-webkit-scrollbar { display: none; }
  .settings-nav { display: flex; flex-direction: column; gap: 6px; padding-bottom: 0; overflow: visible; }
  .settings-nav .category-button { width: 100%; min-width: 0; justify-content: flex-start; }
  .category-button { flex: 0 0 auto; min-height: 35px; white-space: nowrap; }
  .prompt-category-row { flex-wrap: wrap; align-items: center; overflow: visible; row-gap: 5px; }
  .prompt-category-row .category-button { min-width: 0; flex: 0 1 auto; }
  .prompt-grid, .bookmark-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .prompt-grid-stacked { grid-template-columns: repeat(2, minmax(0, min(148px, calc((100% - 8px) / 2)))); justify-content: start; }
  .prompt-grid-stacked .prompt-card { aspect-ratio: 9 / 16; border-radius: 12px; }
  .prompt-grid-stacked .prompt-card-body { padding: 11px; }
  .prompt-grid-stacked .prompt-card h3 { margin-top: 12px; font-size: 13px; }
  .prompt-grid-stacked .prompt-card p { margin-top: 6px; font-size: 10px; line-height: 1.45; }
  .prompt-grid-stacked .prompt-card-foot { gap: 5px; }
  .prompt-grid-stacked .prompt-card-foot code { max-width: 48%; font-size: 8px; }
  .prompt-grid-stacked .prompt-card-foot .button { min-height: 29px; padding: 0 7px; font-size: 9px; }
  .bookmark-card { min-height: 78px; padding: 9px; }
  .bookmark-card .favicon { min-height: 31px; padding: 0 10px; }
  .bank-card-stacks { grid-template-columns: 1fr; }
  .bank-stack-cards, .bank-stack.is-expanded .bank-stack-cards { display: flex; gap: 10px; overflow-x: auto; min-height: 0; height: auto; padding: 5px 2px 9px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x; }
  .bank-stack-cards::-webkit-scrollbar { display: none; }
  .bank-stack:not(.is-expanded) .bank-card, .bank-stack.is-expanded .bank-card { position: relative; inset: auto; z-index: auto; flex: 0 0 min(245px, 78vw); transform: none; pointer-events: auto; scroll-snap-align: start; }
  .bank-stack:not(.is-expanded) .bank-card:not(:last-child) { pointer-events: auto; }
  .saving-goal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .saving-goal-card { min-height: 164px; height: 164px; padding: 18px; }
  .saving-goal-value { margin: 12px 0 0; font-size: clamp(34px, 9vw, 42px); }
  .goal-style-option { min-height: 92px; height: auto; }
  .goal-style-picker-swatch { min-height: 40px; height: 40px; }
  .card-library-heading { align-items: flex-start; flex-direction: column; }
  .security-banner { align-items: flex-start; flex-direction: column; padding: 17px; }
  .vault-password { width: 92px; font-size: 11px; }
  .vault-row { padding: 12px; gap: 10px; }
  .vault-row:hover { padding-left: 15px; }
  .vault-actions .icon-button { width: 34px; height: 34px; }
  .bookmark-top { grid-template-columns: 1fr 1fr; gap: 9px; }
  .bookmark-hero { min-height: 155px; padding: 17px; }
  .bookmark-hero h2 { font-size: 22px; }
  .bookmark-count-card { padding: 17px; }
  .bookmark-count-card strong { font-size: 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .chart-panel .panel-heading { display: block; }
  .chart-summary { justify-content: flex-start; margin-top: 11px; }
  .expense-rhythm-tools { align-items: stretch; justify-content: space-between; gap: 9px; margin-top: 11px; }
  .expense-rhythm-tools .chart-summary { min-width: 0; margin-top: 0; }
  .expense-rhythm-tools .chart-summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .expense-year-select { flex: 0 0 88px; }
  .category-breakdown { padding: 17px; }
  .category-breakdown .panel-heading { display: block; }
  .category-breakdown-controls { width: 100%; display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 11px; }
  .category-breakdown-controls .dropdown { width: 100%; }
  .category-breakdown-summary strong { max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .category-breakdown-head, .category-breakdown-row { grid-template-columns: minmax(0, 1fr) 58px 58px; gap: 8px; }
  .category-breakdown-row { padding: 0; }
  .dual-chart { height: 196px; }
  .dual-chart { overflow-x: auto; }
  .dual-chart-line { width: 468px; height: 174px; flex: 0 0 468px; }
  .chart-months { width: calc(100% - 44px); grid-template-columns: repeat(12, 39px); overflow-x: auto; margin-top: -29px; }
  .bank-card-stacks { grid-template-columns: 1fr; }
  .bank-stack-cards { min-height: 174px; }
  .settings-input-grid, .goal-add-form, .settings-option-grid, .settings-dropdown-grid { grid-template-columns: 1fr; }
  .image-upload-actions { align-items: stretch; flex-direction: column; }
  .theme-card-grid { grid-template-columns: 1fr 1fr; }
  .app-icon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal { max-height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden; padding: 19px; border-radius: 17px; }
  .modal > form { min-height: 0; overflow-y: auto; padding-right: 2px; scrollbar-width: none; }
  .modal > form::-webkit-scrollbar { display: none; }
  .modal > form .modal-footer, .modal > .modal-footer { position: sticky; bottom: 0; z-index: 1; margin-top: 12px; padding: 12px 0 0; background: transparent; }
  .celebration-modal { width: min(330px, 100%); }
  .encryption-gate { align-items: end; padding: 14px; }
  .encryption-card { width: 100%; padding: 24px 18px calc(20px + env(safe-area-inset-bottom)); border-radius: 21px 21px 14px 14px; }
  .welcome-logo { width: 92px; height: 92px; border-radius: 27px; font-size: 27px; }
  .welcome-orbit-one { width: 280px; height: 280px; }
  .welcome-orbit-two { width: 440px; height: 440px; }
  .workbench-login-card { padding: 23px 19px; }
  .touch-id-login { min-height: 60px; }
  .security-tools { align-items: stretch; flex-direction: column; gap: 12px; }
  .security-tool-actions { justify-content: stretch; }
  .security-tool-actions .button { flex: 1 1 0; min-width: 0; }
  .account-menu { top: 68px; right: 12px; }
  .quick-add { right: 19px; bottom: calc(78px + env(safe-area-inset-bottom)); width: 50px; height: 50px; }
  .mobile-nav { position: fixed; z-index: 12; left: 0; right: 0; bottom: 0; width: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(18px); }
  .mobile-nav button { min-width: 0; min-height: 47px; display: grid; place-items: center; gap: 2px; overflow: hidden; padding: 0 2px; border-radius: 10px; color: var(--muted); background: transparent; font-size: 9px; }
  .mobile-nav button.is-active { color: var(--ink); border: 1px solid color-mix(in srgb, var(--control-accent) 42%, var(--line)); background: linear-gradient(145deg, color-mix(in srgb, var(--control-accent) 18%, transparent), color-mix(in srgb, var(--surface) 72%, transparent)); box-shadow: inset 0 1px 0 color-mix(in srgb, white 64%, transparent), 0 7px 18px color-mix(in srgb, var(--control-accent) 18%, transparent); backdrop-filter: blur(18px) saturate(145%); -webkit-backdrop-filter: blur(18px) saturate(145%); }
  .mobile-nav button span { font-size: 9px; }
}

/* Shared interaction fixes: keep form geometry stable while controls float above it. */
.dropdown-option { min-width: 0; display: flex; align-items: center; gap: 3px; }
.dropdown-option > button:first-child { min-width: 0; flex: 1; }
.dropdown-option-actions { display: inline-flex; align-items: center; gap: 1px; }
.dropdown-option-actions button,
.dropdown-edit-form button { width: 25px; min-height: 28px !important; justify-content: center !important; padding: 0 !important; color: var(--muted-2) !important; background: transparent !important; }
.dropdown-option-actions button:hover,
.dropdown-edit-form button:hover { color: var(--ink) !important; background: var(--surface-soft) !important; }
.dropdown-option-actions button:disabled { opacity: .32; cursor: not-allowed; }
.dropdown-edit-form { display: flex; align-items: center; gap: 3px; padding: 3px; }
.dropdown-edit-form input { min-width: 0; min-height: 30px; flex: 1; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--surface-soft); outline: 0; font-size: 11px; }
.dropdown-edit-form button { min-height: 30px !important; }
.dropdown-menu-portal { position: fixed; z-index: 100; max-width: min(320px, calc(100vw - 16px)); max-height: min(260px, calc(100vh - 24px)); overflow-y: auto; }

.bookmark-list { min-width: 0; display: grid; align-content: start; gap: 2px; }
.bookmark-list-row { min-width: 0; min-height: 52px; display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 13px; border-bottom: 1px solid var(--line); color: var(--ink); background: var(--surface); cursor: pointer; transition: background .24s ease, padding .28s var(--ease-out-expo), border-color .24s ease, transform .28s var(--ease-out-expo); }
.bookmark-list-row:first-child { border-top: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.bookmark-list-row:last-of-type { border-radius: 0 0 12px 12px; }
.bookmark-list-row:hover { padding-left: 17px; background: var(--surface-soft); border-color: var(--line-strong); }
.bookmark-list-row:active { transform: scale(.995); }
.bookmark-list-row strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.bookmark-list-mark { width: 9px; height: 9px; border-radius: 3px; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 10%, transparent); }
.bookmark-list-empty { min-height: 120px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--surface); font-size: 12px; }
.pagination { display: flex; justify-content: center; gap: 5px; padding: 16px 0 2px; }
.pagination button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); font-size: 11px; transition: transform .25s var(--ease), color .2s ease, background .2s ease, border-color .2s ease; }
.pagination button:hover { transform: translateY(-2px); color: var(--ink); border-color: var(--line-strong); }
.pagination button.is-active { color: var(--ink); border-color: var(--pink); background: var(--pink-soft); font-weight: 750; }
.bookmark-category-manager { width: 100%; margin-top: 5px; }
.bookmark-category-manager .dropdown-trigger { min-height: 35px; }

.modal-comet-path { stroke-dashoffset: var(--modal-comet-start-offset, 0px); }
.resource-comet-path { stroke-dashoffset: var(--resource-comet-start-offset, 0px); }
.modal-comet-active .modal-comet-path,
.resource-comet-active .resource-comet-path { animation-duration: 16.4s; }
.modal-comet-closing .modal-comet-path,
.resource-comet-closing .resource-comet-path { animation-duration: .22s; animation-iteration-count: 1; }
.modal-backdrop,
.resource-form-backdrop { will-change: opacity, backdrop-filter; }
.modal,
.resource-form-panel { backface-visibility: hidden; transform-origin: var(--modal-origin-x, 50%) var(--modal-origin-y, 50%); }
.modal.is-closing,
.resource-form-panel.is-closing { pointer-events: none; }

.bank-card { color: var(--card-ink, #202123); }
.bank-card-bottom { color: color-mix(in srgb, var(--card-ink, #202123) 66%, transparent); }
.card-form-preview,
.card-detail-hero { color: var(--card-ink, #202123); }

[data-theme="liquid-glass"] .bookmark-list-row,
[data-theme="liquid-glass"] .bookmark-list-empty,
[data-theme="liquid-glass"] .pagination button,
[data-theme="liquid-glass"] .bookmark-category-manager .dropdown-trigger {
  border-color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.76);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
}
[data-theme="liquid-glass"] .bookmark-list-row:hover { background: rgba(255,255,255,.68); }

@media (max-width: 760px) {
  .bookmark-list-row { min-height: 48px; padding: 0 10px; }
  .bookmark-category-manager { min-width: 140px; }
}

/* Expense tooltip chart */
.expense-chart-wrap { position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr); min-height: 246px; padding-top: 8px; }
.expense-chart-scale { display: flex; flex-direction: column; justify-content: space-between; padding: 3px 10px 28px 0; color: var(--muted-2); font-size: 10px; text-align: right; }
.expense-rhythm-tools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.expense-year-select { min-width: 88px; }
.expense-chart { min-width: 0; min-height: 218px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: clamp(4px, 1.2vw, 13px); padding: 7px 4px 0; border-bottom: 1px solid var(--line-strong); background: repeating-linear-gradient(to bottom, transparent 0, transparent 53px, var(--line) 54px, transparent 55px); }
.expense-month-bar { position: relative; min-width: 0; height: 208px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; padding: 0; color: var(--muted); background: transparent; }
.expense-month-bar i { display: block; width: min(30px, 74%); height: var(--bar-height); flex: 0 0 var(--bar-height); border-radius: 8px 8px 3px 3px; background: var(--month-color); box-shadow: 0 7px 14px color-mix(in srgb, var(--month-color) 24%, transparent); transform-origin: bottom; transition: height .5s var(--ease), transform .25s var(--ease), filter .25s ease; }
.expense-month-bar:hover i, .expense-month-bar.is-selected i { transform: scaleX(1.14); filter: saturate(1.12) brightness(1.02); }
.expense-month-bar small { font-size: 10px; white-space: nowrap; }
.expense-bar-value { display: none; }
.expense-tooltip { position: absolute; z-index: 4; top: 18px; right: 14px; display: grid; gap: 4px; min-width: 140px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); box-shadow: 0 15px 35px rgba(28,30,29,.14); animation: tooltip-in .24s var(--ease) both; }
.expense-tooltip span { color: var(--muted); font-size: 10px; }
.expense-tooltip strong { font-size: 17px; letter-spacing: -.04em; }
.expense-tooltip small { color: var(--muted-2); font-size: 9px; }
@keyframes tooltip-in { from { opacity: 0; transform: translateY(-5px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Prompt library entry and design catalog */
.library-hub-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.library-hub-note { color: var(--muted-2); font-size: 11px; }
.library-hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.library-hub-card { position: relative; min-height: 270px; display: flex; flex-direction: column; align-items: flex-start; padding: 19px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); text-align: left; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.library-hub-card::after { content: ''; position: absolute; right: -36px; top: -42px; width: 148px; height: 148px; border: 1px solid rgba(29,30,32,.1); border-radius: 50%; box-shadow: 0 0 0 24px rgba(255,255,255,.18), 0 0 0 50px rgba(255,255,255,.13); }
.library-hub-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.hub-pink { background: var(--pink-soft); }
.hub-blue { background: var(--blue-soft); }
.hub-lime { background: var(--lime); }

.library-hub-card { isolation: isolate; border-color: color-mix(in srgb, var(--surface) 72%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 54%, transparent), color-mix(in srgb, var(--surface-soft) 38%, transparent)); box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 12px 32px rgba(35,37,35,.07); backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%); transition: transform .42s var(--ease-out-expo), box-shadow .42s var(--ease-out-expo), border-color .28s ease, background .42s ease; }
.library-hub-card::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(116deg, rgba(255,255,255,.48), transparent 32%, transparent 68%, rgba(255,255,255,.16)); opacity: .72; transition: transform .65s var(--ease-out-expo), opacity .4s ease; }
.library-hub-card::after { right: -20px; top: -46px; width: 170px; height: 170px; border-color: rgba(255,255,255,.5); box-shadow: 0 0 0 24px rgba(255,255,255,.12), 0 0 0 50px rgba(255,255,255,.06); opacity: .72; transition: transform .65s var(--ease-out-expo); }
.hub-pink { background-color: color-mix(in srgb, var(--pink-soft) 70%, transparent); }
.hub-blue { background-color: color-mix(in srgb, var(--blue-soft) 72%, transparent); }
.hub-lime { background-color: color-mix(in srgb, var(--lime) 58%, transparent); }
.hub-pink:hover, .hub-pink:focus-visible { transform: translateY(-8px) rotate(-.8deg); box-shadow: 0 18px 38px rgba(255,113,133,.2), inset 0 1px 0 rgba(255,255,255,.8); }
.hub-pink:hover::before, .hub-pink:focus-visible::before { transform: translateX(18%); }
.hub-blue:hover, .hub-blue:focus-visible { transform: translateY(-5px) rotate(.8deg) scale(1.012); box-shadow: 0 20px 40px rgba(115,139,224,.2), inset 0 1px 0 rgba(255,255,255,.8); }
.hub-blue:hover::after, .hub-blue:focus-visible::after { transform: translate(-10px, 14px) scale(1.08); }
.hub-lime:hover, .hub-lime:focus-visible { transform: translateY(-7px) scale(1.02); box-shadow: 0 22px 42px rgba(130,156,69,.2), inset 0 1px 0 rgba(255,255,255,.8); }
.hub-lime:hover::before, .hub-lime:focus-visible::before { opacity: 1; transform: translateX(-12%); }
.library-hub-card:active { transform: translateY(1px) scale(.985); }
.library-hub-index { position: absolute; top: 17px; right: 19px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.library-hub-icon { position: relative; z-index: 1; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: var(--ink); background: rgba(255,255,255,.52); }
.library-hub-copy { position: relative; z-index: 1; display: grid; margin-top: 34px; }
.library-hub-copy strong { font-size: 24px; letter-spacing: -.06em; }
.library-hub-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.library-hub-copy p { max-width: 240px; margin: 14px 0 0; color: rgba(29,30,32,.68); font-size: 11px; line-height: 1.65; }
.library-hub-meta { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 5px; margin-top: auto; }
.library-hub-meta b { font-size: 27px; letter-spacing: -.06em; }
.library-hub-meta span { color: var(--muted); font-size: 10px; }
.library-hub-enter { position: relative; z-index: 1; display: flex; align-items: center; gap: 5px; margin-top: 7px; color: var(--ink); font-size: 10px; font-weight: 750; }
.library-subpage { animation: subpage-in .35s var(--ease) both; }
@keyframes subpage-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
.library-back { display: inline-flex; align-items: center; gap: 6px; min-height: 31px; margin: 0 0 17px; padding: 0 9px; border-radius: 8px; color: var(--muted); background: var(--surface-soft); font-size: 10px; font-weight: 700; transition: color .2s ease, transform .25s var(--ease); }
.library-back:hover { color: var(--ink); transform: translateX(-3px); }
.style-catalog-banner { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 21px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.style-catalog-banner h3 { margin: 8px 0 0; font-size: 25px; letter-spacing: -.06em; }
.style-catalog-banner p { max-width: 550px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.style-catalog-banner > strong { color: var(--ink); font-size: 45px; line-height: .8; letter-spacing: -.08em; }
.style-catalog-banner > strong small { color: var(--muted-2); font-size: 13px; letter-spacing: 0; }
.style-catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.style-catalog-card { min-width: 0; display: grid; grid-template-rows: auto 155px auto; gap: 13px; padding: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface); text-align: left; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s ease; }
.style-catalog-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.style-catalog-copy { min-height: 96px; }
.style-catalog-kicker { color: var(--muted-2); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.style-catalog-copy h3 { margin: 7px 0 0; font-size: 16px; letter-spacing: -.04em; }
.style-catalog-copy p { display: -webkit-box; overflow: hidden; margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.style-catalog-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.style-catalog-foot span:last-child { display: flex; align-items: center; gap: 3px; color: var(--ink); font-weight: 750; }
.library-empty { min-height: 360px; display: grid; place-items: center; align-content: center; padding: 30px; border: 1px dashed var(--line-strong); border-radius: 15px; text-align: center; }
.library-empty.is-compact { min-height: 260px; margin-top: 10px; }
.library-empty .library-back { justify-self: center; }
.library-empty-art { width: 66px; height: 66px; display: grid; place-items: center; margin-bottom: 17px; border-radius: 20px; color: var(--ink); background: var(--yellow); }
.library-empty h3 { margin: 0; font-size: 21px; letter-spacing: -.05em; }
.library-empty p { max-width: 300px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

/* Style drawer and six sample pages */
.style-drawer-backdrop { position: fixed; z-index: 40; inset: 0; background: rgba(20,21,23,.38); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade-in .16s ease both; }
.style-drawer { position: absolute; right: 0; bottom: 24px; width: min(760px, 92vw); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; padding: 26px 26px 28px; border: 1px solid var(--line); border-right: 0; border-radius: 22px 0 0 22px; color: var(--ink); background: var(--surface); box-shadow: -25px 0 70px rgba(20,21,23,.18); animation: drawer-in .28s var(--ease) both; }
@keyframes drawer-in { from { opacity: .4; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes sheet-in { from { opacity: .4; transform: translateY(100%); } to { opacity: 1; transform: translateY(0); } }
.style-drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.style-drawer-header h2 { margin: 9px 0 0; font-size: 31px; letter-spacing: -.07em; }
.style-drawer-header p { max-width: 520px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.style-drawer-meta { display: flex; gap: 8px; padding: 13px 0 17px; color: var(--muted); font-size: 10px; }
.style-drawer-meta span { padding: 5px 8px; border-radius: 6px; background: var(--surface-soft); }
.style-showcase-list { min-height: 0; overflow: visible; display: grid; gap: 16px; padding-right: 4px; }
.style-showcase-list::-webkit-scrollbar { display: none; }
.style-showcase-item { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 12px; align-items: start; }
.style-showcase-label { display: grid; gap: 5px; padding-top: 11px; }
.style-showcase-label span { color: var(--muted-2); font-size: 10px; font-variant-numeric: tabular-nums; }
.style-showcase-label strong { font-size: 11px; writing-mode: vertical-rl; }
.style-preview { position: relative; min-height: 220px; overflow: hidden; padding: 22px; border: 1px solid rgba(29,30,32,.12); border-radius: 11px; color: #202123; background: #f3f4f1; isolation: isolate; }
.style-preview.is-compact { min-height: 155px; height: 155px; padding: 14px; }
.style-preview-noise { position: absolute; z-index: -1; inset: 0; opacity: .2; background-image: radial-gradient(rgba(29,30,32,.18) .6px, transparent .6px); background-size: 7px 7px; }
.style-preview-eyebrow { display: block; color: rgba(29,30,32,.58); font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.style-preview > strong { display: block; max-width: 74%; margin-top: 24px; font-size: 28px; line-height: .95; letter-spacing: -.08em; }
.style-preview.is-compact > strong { margin-top: 18px; font-size: 20px; }
.style-preview > small { display: block; max-width: 63%; margin-top: 15px; color: rgba(29,30,32,.62); font-size: 9px; line-height: 1.45; }
.style-preview > small:last-child { position: absolute; right: 16px; bottom: 13px; margin: 0; }
.style-preview-shape { position: absolute; display: block; border-radius: 50%; opacity: .82; }
.shape-one { right: 10%; top: 18%; width: 90px; height: 90px; background: var(--style-accent, #e3a36d); }
.shape-two { right: 20%; bottom: 8%; width: 42px; height: 42px; border: 8px solid rgba(255,255,255,.64); background: transparent; }
.style-preview-button { display: inline-flex; align-items: center; gap: 4px; margin-top: 17px; padding: 7px 11px; border-radius: 5px; color: #fff; background: #222; font-size: 9px; font-weight: 750; }
.style-preview-orbit { position: absolute; right: 13%; top: 22%; width: 118px; height: 118px; border: 1px solid var(--style-accent, #8caaff); border-radius: 50%; box-shadow: 0 0 0 18px rgba(255,255,255,.45), 0 0 0 36px rgba(255,255,255,.32); }
.style-preview-chapter { display: block; color: var(--style-accent, #d69d53); font-size: 62px; font-weight: 850; letter-spacing: -.1em; }
.style-preview-chapter + strong { margin-top: 12px; }
.style-preview p { max-width: 58%; margin: 13px 0 0; color: rgba(29,30,32,.63); font-size: 10px; line-height: 1.5; }
.style-preview-lines { display: grid; gap: 7px; margin-top: 21px; color: rgba(29,30,32,.7); font-size: 9px; }
.style-preview-lines span { padding-bottom: 5px; border-bottom: 1px solid rgba(29,30,32,.17); }
.style-preview-phone { position: absolute; right: 13%; top: 20px; width: 104px; height: 178px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 19px; overflow: hidden; border: 4px solid #202123; border-radius: 21px; color: #fff; background: linear-gradient(145deg, #68707c, #161b25); box-shadow: 0 16px 24px rgba(29,30,32,.2); font-size: 8px; }
.style-preview.is-compact .style-preview-phone { top: 14px; width: 74px; height: 124px; border-radius: 15px; }
.phone-camera { position: absolute; top: 11px; left: 50%; width: 26px; height: 7px; border-radius: 8px; background: #06080c; transform: translateX(-50%); }
.style-preview-case-image { position: absolute; right: 10%; bottom: 21px; width: 42%; height: 102px; padding: 12px; background: var(--style-accent, #8caaff); }
.style-preview-case-image span { color: #fff; font-size: 25px; font-weight: 850; }
.style-preview-case-image i, .style-preview-case-image b { position: absolute; display: block; background: rgba(255,255,255,.7); }
.style-preview-case-image i { right: 12px; bottom: 15px; width: 45px; height: 7px; }
.style-preview-case-image b { right: 12px; bottom: 30px; width: 72px; height: 7px; }
.style-tone-gold { --style-accent: #d69d53; }
.style-tone-blue { --style-accent: #8caaff; }
.style-tone-peach { --style-accent: #ef9a75; }
.style-tone-mint { --style-accent: #74d7c7; }
.style-tone-purple { --style-accent: #9e9be8; }
.style-tone-white { --style-accent: #9aa4b1; }
.style-tone-lime { --style-accent: #b9df5a; }
.style-tone-indigo { --style-accent: #817fea; }
.style-tone-red { --style-accent: #ed685e; }
.style-tone-dark { --style-accent: #94d8b7; }
.style-tone-paper { --style-accent: #d68b72; }
.style-tone-yellow { --style-accent: #f0c84e; }
.style-preview.style-tone-dark { color: #eff7e9; background: #17201b; border-color: #33433a; }
.style-preview.style-tone-dark .style-preview-eyebrow, .style-preview.style-tone-dark > small, .style-preview.style-tone-dark p, .style-preview.style-tone-dark .style-preview-lines { color: #a1b5a4; }
.style-preview.style-tone-dark .style-preview-button { color: #17201b; background: #b9f06f; }
.style-preview.style-tone-dark .style-preview-noise { opacity: .08; background-image: radial-gradient(#b9f06f .6px, transparent .6px); }
.style-preview.style-tone-yellow { background: #f5d85b; }
.style-preview.style-tone-red { background: #f2d9ce; }
.style-preview.style-tone-indigo { color: #fff; background: linear-gradient(140deg, #252a72, #6961be); }
.style-preview.style-tone-indigo .style-preview-eyebrow, .style-preview.style-tone-indigo > small { color: rgba(255,255,255,.68); }

.style-preview-glassmorphism { color: #24344b; background: linear-gradient(135deg, rgba(238,247,255,.86), rgba(184,211,255,.5)), radial-gradient(circle at 80% 20%, #fff 0 8%, transparent 35%); border-color: rgba(255,255,255,.75); border-radius: 22px; box-shadow: 0 16px 30px rgba(71,113,169,.15), inset 0 1px 0 rgba(255,255,255,.9); backdrop-filter: blur(10px); }
.style-preview-glassmorphism .style-preview-noise { opacity: .08; background-image: radial-gradient(#fff 1px, transparent 1px); }
.style-preview-neumorphism { color: #44505b; background: #e8edf1; border-color: transparent; border-radius: 25px; box-shadow: 12px 12px 24px rgba(87,101,116,.2), -10px -10px 22px rgba(255,255,255,.92); }
.style-preview-neumorphism .style-preview-button, .style-preview-neumorphism .style-preview-case-image { color: #44505b; background: #e8edf1; box-shadow: 5px 5px 10px rgba(87,101,116,.18), -4px -4px 9px rgba(255,255,255,.9); }
.style-preview-gradient-mesh { color: #2c2142; background: radial-gradient(circle at 20% 15%, #ffd1e9 0 12%, transparent 42%), radial-gradient(circle at 85% 25%, #b6e5ff 0 10%, transparent 43%), radial-gradient(circle at 75% 90%, #c8b8ff 0 8%, transparent 40%), #f6efff; border-color: rgba(255,255,255,.78); border-radius: 24px; }
.style-preview-gradient-mesh .style-preview-shape { filter: blur(3px); }
.style-preview-aurora { color: #effff8; background: radial-gradient(ellipse at 10% 90%, rgba(61,228,191,.56), transparent 46%), radial-gradient(ellipse at 85% 10%, rgba(77,115,255,.52), transparent 45%), #071825; border-color: #315b67; border-radius: 15px; }
.style-preview-aurora .style-preview-eyebrow, .style-preview-aurora > small, .style-preview-aurora p, .style-preview-aurora .style-preview-lines { color: #acd4cb; }
.style-preview-cyberpunk { color: #f6f5ff; background: linear-gradient(135deg, #0b0b18, #1b1230); border: 1px solid #f45dca; border-radius: 2px; box-shadow: 5px 5px 0 #40e8ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.style-preview-cyberpunk .style-preview-eyebrow, .style-preview-cyberpunk > small, .style-preview-cyberpunk p, .style-preview-cyberpunk .style-preview-lines { color: #8ef3ff; }
.style-preview-cyberpunk .style-preview-button { color: #131022; background: #f45dca; border-radius: 2px; }
.style-preview-vaporwave { color: #fff; background: linear-gradient(145deg, #2b1d67 0%, #9d4ab7 48%, #f18fc2 100%); border-color: #ffbce3; border-radius: 9px; }
.style-preview-vaporwave::after { content: ''; position: absolute; inset: auto 0 0; height: 34%; opacity: .28; background: repeating-linear-gradient(0deg, transparent 0 8px, #fff 9px 10px), linear-gradient(90deg, transparent 49%, #fff 50%, transparent 51%); }
.style-preview-vaporwave .style-preview-eyebrow, .style-preview-vaporwave > small, .style-preview-vaporwave p, .style-preview-vaporwave .style-preview-lines { color: rgba(255,255,255,.78); }
.style-preview-y2k { color: #12384d; background: linear-gradient(145deg, #effcff, #93def2); border-color: #fff; border-radius: 26px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55), 0 12px 20px rgba(48,138,174,.22); }
.style-preview-y2k .style-preview-button { color: #fff; background: linear-gradient(#74daf4, #4e92ed); border-radius: 999px; box-shadow: inset 0 2px 1px #fff8, 0 5px 8px #377da455; }
.style-preview-memphis { color: #1d1d20; background: #fbefdc; border: 3px solid #1d1d20; border-radius: 0; }
.style-preview-memphis .style-preview-noise { opacity: .3; background-image: radial-gradient(#ef8e6d 1.2px, transparent 1.2px); background-size: 9px 9px; }
.style-preview-memphis .style-preview-shape.shape-one { border-radius: 12px; transform: rotate(18deg); }
.style-preview-organic { color: #3b342f; background: #f6eee6; border-color: #ddc8b7; border-radius: 34px 12px 30px 16px; }
.style-preview-organic .style-preview-shape.shape-one { width: 105px; height: 80px; border-radius: 63% 37% 52% 48%; transform: rotate(24deg); }
.style-preview-scandinavian { color: #26333b; background: #f4f6f3; border-color: #dce4df; border-radius: 6px; }
.style-preview-scandinavian .style-preview-noise { opacity: .08; }
.style-preview-japandi { color: #403b35; background: #eee7dd; border-color: #d5c5b2; border-radius: 3px; }
.style-preview-japandi > strong, .style-preview-japandi .style-preview-chapter { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; }
.style-preview-bauhaus { color: #111; background: #f4eee2; border: 3px solid #111; border-radius: 0; }
.style-preview-bauhaus .style-preview-shape.shape-one { border-radius: 0; background: #dc5146; transform: rotate(45deg); }
.style-preview-bauhaus .style-preview-button { border-radius: 0; background: #111; }
.style-preview-art-nouveau { color: #304337; background: #f0f4e8; border-color: #78a88b; border-radius: 38px 7px 38px 7px; }
.style-preview-art-nouveau > strong, .style-preview-art-nouveau .style-preview-chapter { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; }
.style-preview-art-nouveau .style-preview-shape.shape-one { border-radius: 70% 30% 70% 30%; background: #78a88b; }
.style-preview-gothic { color: #f4e9df; background: #18131b; border-color: #80519a; border-radius: 3px; }
.style-preview-gothic .style-preview-eyebrow, .style-preview-gothic > small, .style-preview-gothic p, .style-preview-gothic .style-preview-lines { color: #c9a9cf; }
.style-preview-gothic > strong, .style-preview-gothic .style-preview-chapter { font-family: Georgia, 'Times New Roman', serif; font-weight: 600; }
.style-preview-retro-futurism { color: #f7e8c8; background: radial-gradient(circle at 75% 30%, #e9a955 0 2px, transparent 3px), linear-gradient(145deg, #18273d, #293d5a); border-color: #efad58; border-radius: 10px; }
.style-preview-retro-futurism .style-preview-eyebrow, .style-preview-retro-futurism > small, .style-preview-retro-futurism p, .style-preview-retro-futurism .style-preview-lines { color: #c8d5db; }
.style-preview-kinetic-type { color: #171717; background: #f7f4ee; border-color: #171717; border-radius: 0; }
.style-preview-kinetic-type .style-preview-shape.shape-one { right: 0; top: 0; width: 14px; height: 100%; border-radius: 0; background: #ff5e64; }
.style-preview-kinetic-type > strong { text-transform: uppercase; font-style: italic; }
.style-preview-monochrome { color: #17191b; background: #e9e9e7; border-color: #797d7f; border-radius: 0; filter: grayscale(1); }
.style-preview-monochrome .style-preview-shape.shape-one { background: #333; }
.style-preview-maximalism { color: #fff; background: radial-gradient(circle at 14% 15%, #ffd45f 0 8%, transparent 9%), linear-gradient(125deg, #6d2ea5, #dc4d9c 55%, #f47d53); border-color: #ffd45f; border-radius: 16px; }
.style-preview-maximalism .style-preview-shape.shape-two { border-color: #ffd45f; }
.style-preview-dark-academia { color: #f2e1c7; background: #2d251e; border-color: #8f6c4a; border-radius: 2px; }
.style-preview-dark-academia .style-preview-eyebrow, .style-preview-dark-academia > small, .style-preview-dark-academia p, .style-preview-dark-academia .style-preview-lines { color: #cbb08c; }
.style-preview-dark-academia > strong, .style-preview-dark-academia .style-preview-chapter { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; }
.style-preview-soft-ui { color: #52585a; background: #e8ebe7; border-color: transparent; border-radius: 28px; box-shadow: 12px 12px 25px rgba(80,91,88,.14), -10px -10px 23px rgba(255,255,255,.88); }
.style-preview-soft-ui .style-preview-button { color: #52585a; background: #e8ebe7; border-radius: 999px; box-shadow: 5px 5px 11px rgba(80,91,88,.16), -4px -4px 9px #fff; }
.style-preview-hand-drawn { color: #34312b; background: #fff6e4; border: 2px solid #34312b; border-radius: 12px 4px 13px 5px; transform: rotate(-.3deg); }
.style-preview-hand-drawn .style-preview-button { color: #34312b; background: #f4c35e; border: 2px solid #34312b; border-radius: 5px 3px 6px 4px; }
.style-preview-3d-illustration { color: #fff; background: linear-gradient(135deg, #78aaf4, #364eaa); border-color: #b9d6ff; border-radius: 19px; box-shadow: inset 0 1px #fff7, 0 12px 23px #4966b655; }
.style-preview-3d-illustration .style-preview-phone { box-shadow: 13px 18px 0 rgba(24,43,104,.35), 0 18px 25px rgba(15,30,80,.3); }
.style-preview-biophilic { color: #234436; background: linear-gradient(135deg, #f1f5e7, #d8e8c9); border-color: #a9c693; border-radius: 19px; }
.style-preview-biophilic .style-preview-noise { opacity: .12; background-image: radial-gradient(#4e8056 1px, transparent 1px); background-size: 13px 13px; }
.style-preview-government { color: #173d5e; background: #fff; border: 2px solid #1261a0; border-radius: 0; }
.style-preview-government .style-preview-button { color: #fff; background: #1261a0; border-radius: 0; }
.style-preview-art-deco { color: #f8e8c7; background: linear-gradient(135deg, #17213b, #26385a); border: 1px solid #d69d53; border-radius: 1px; }
.style-preview-art-deco .style-preview-noise { opacity: .08; background-image: linear-gradient(45deg, #d69d53 1px, transparent 1px); background-size: 12px 12px; }
.style-preview-art-deco .style-preview-shape.shape-one { border-radius: 0; border: 1px solid #d69d53; background: transparent; transform: rotate(45deg); }
.style-preview-bento-grid { color: #25324b; background: linear-gradient(90deg, rgba(140,170,255,.22) 1px, transparent 1px), linear-gradient(rgba(140,170,255,.22) 1px, transparent 1px), #f4f7ff; background-size: 24px 24px; border-color: #c9d6ff; border-radius: 12px; }
.style-preview-bento-grid .style-preview-case-image { border-radius: 8px; box-shadow: -48px 20px 0 -28px #fff, -50px -25px 0 -30px #c9d6ff; }
.style-preview-claymorphism { color: #684b48; background: #f9dfd8; border-color: transparent; border-radius: 27px; box-shadow: 12px 13px 22px rgba(195,136,129,.18), -9px -9px 18px rgba(255,255,255,.78); }
.style-preview-claymorphism .style-preview-shape.shape-one { background: #b6dded; box-shadow: inset 5px 6px 8px #fff8, 8px 8px 14px #9bbbc455; }
.style-preview-futurism { color: #ecfffb; background: linear-gradient(135deg, #092b34, #0f172c); border-color: #74d7c7; border-radius: 4px; }
.style-preview-futurism .style-preview-eyebrow, .style-preview-futurism > small, .style-preview-futurism p, .style-preview-futurism .style-preview-lines { color: #9bd9d0; }
.style-preview-futurism .style-preview-shape.shape-one { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: #74d7c7; }
.style-preview-material-design { color: #26304a; background: #f5f4ff; border-color: #d9d5ff; border-radius: 5px; box-shadow: 0 8px 17px rgba(75,70,139,.14); }
.style-preview-material-design .style-preview-button { border-radius: 999px; color: #fff; background: #6658d3; box-shadow: 0 4px 7px #6658d344; }
.style-preview-minimalism { color: #1f2123; background: #fff; border-color: #e7e7e5; border-radius: 0; }
.style-preview-minimalism .style-preview-noise, .style-preview-minimalism .style-preview-shape.shape-two { display: none; }
.style-preview-pixel-illustration { color: #2e2a29; background: #f6efd0; border: 2px solid #2e2a29; border-radius: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; image-rendering: pixelated; }
.style-preview-pixel-illustration .style-preview-shape.shape-one { border-radius: 0; box-shadow: 10px 10px 0 #e57373, 20px 20px 0 #75aadb; }
.style-preview-saas-marketing { color: #21325b; background: linear-gradient(145deg, #fff, #eef2ff); border-color: #d7ddff; border-radius: 19px; }
.style-preview-saas-marketing .style-preview-button { border-radius: 8px; color: #fff; background: #817fea; }
.style-preview-swiss-style { color: #17191d; background: #f7f7f4; border-color: #17191d; border-radius: 0; }
.style-preview-swiss-style .style-preview-shape.shape-one { right: 0; top: 0; width: 18px; height: 100%; border-radius: 0; background: #ed685e; }
.style-preview-swiss-style > strong { font-weight: 850; letter-spacing: -.11em; }
.style-preview.style-preview-dark-ui { color: #eff7e9; background: #17201b; border-color: #33433a; border-radius: 8px; }
.style-preview.style-preview-dark-ui .style-preview-eyebrow, .style-preview.style-preview-dark-ui > small, .style-preview.style-preview-dark-ui p, .style-preview.style-preview-dark-ui .style-preview-lines { color: #a1b5a4; }
.style-preview-editorial { color: #3d302b; background: #f4e9dd; border-color: #d9baa5; border-radius: 1px; }
.style-preview-editorial > strong, .style-preview-editorial .style-preview-chapter { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; }
.style-preview-brutalism { color: #171717; background: #f5d85b; border: 3px solid #171717; border-radius: 0; box-shadow: 7px 7px 0 #171717; }
.style-preview-brutalism .style-preview-shape.shape-one { border-radius: 0; background: #f27665; transform: rotate(12deg); }
.style-preview.style-preview-cyberpunk { background: linear-gradient(135deg, #0b0b18, #1b1230); }
.style-preview.style-preview-memphis { background: #fbefdc; }
.style-preview.style-preview-bauhaus, .style-preview.style-preview-kinetic-type { background: #f4eee2; }
.style-preview.style-preview-swiss-style { background: #f7f7f4; }
.style-preview.style-preview-brutalism { background: #f5d85b; }
.style-drawer-header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.style-drawer-content { min-height: 0; overflow: auto; display: grid; gap: 22px; padding: 2px 4px 0 0; scrollbar-width: none; }
.style-drawer-content::-webkit-scrollbar { display: none; }
.style-detail-hero { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 15px; align-items: stretch; }
.style-detail-hero-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.style-detail-kicker { color: var(--muted-2); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.style-detail-hero-copy h3 { margin: 10px 0 0; font-size: 27px; letter-spacing: -.07em; }
.style-detail-cover-field { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 10px; }
.style-detail-cover-field strong { color: var(--ink); font-size: 10px; }
.style-detail-hero-copy p { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.style-detail-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; color: var(--muted); font-size: 10px; }
.style-detail-stats strong { display: block; color: var(--ink); font-size: 22px; letter-spacing: -.05em; }
.style-detail-hero-media { min-width: 0; overflow: hidden; border-radius: 14px; }
.style-detail-hero-media > img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.style-preview.is-hero { width: 100%; min-height: 0; height: 100%; aspect-ratio: 16 / 9; border-radius: 14px; }
.style-preview.is-hero > strong { font-size: clamp(28px, 4vw, 44px); }
.style-detail-section { display: grid; gap: 12px; }
.style-detail-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.style-detail-section-heading h3 { margin: 6px 0 0; font-size: 18px; letter-spacing: -.05em; }
.style-detail-section-heading > span { color: var(--muted-2); font-size: 10px; }
.style-scene-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.style-scene-card { min-width: 0; min-height: 116px; display: flex; flex-direction: column; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); transition: transform .25s var(--ease), box-shadow .25s ease; }
.style-scene-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.style-scene-card > span { color: var(--muted-2); font-size: 9px; }
.style-scene-card strong { margin-top: 14px; font-size: 13px; }
.style-scene-card p { margin: auto 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.style-prompt-section { padding: 17px; border-radius: 14px; background: var(--surface-soft); }
.style-ai-prompt { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.style-ai-prompt code { display: block; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.65; white-space: pre-wrap; }
.style-edit-form { min-height: 0; overflow: auto; display: grid; gap: 14px; padding: 4px 4px 0 0; scrollbar-width: none; }
.style-edit-form::-webkit-scrollbar { display: none; }
.style-edit-intro { display: grid; gap: 4px; padding: 15px; border-radius: 12px; color: var(--ink); background: var(--surface-soft); }
.style-edit-intro strong { font-size: 15px; }
.style-edit-intro span { color: var(--muted); font-size: 10px; }
.style-edit-form .form-field { display: grid; gap: 7px; }
.style-edit-form .form-field > span, .style-hero-upload > span { color: var(--muted); font-size: 10px; font-weight: 750; }
.style-edit-form textarea { min-height: 92px; resize: vertical; }
.style-edit-form .style-edit-prompt { min-height: 138px; }
.style-hero-upload { position: relative; display: grid; gap: 8px; min-height: 118px; padding: 14px; overflow: hidden; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--ink); background: var(--surface-soft); cursor: pointer; }
.style-hero-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.style-hero-upload strong { align-self: center; color: var(--ink); font-size: 12px; }
.style-hero-upload img { width: 100%; max-height: 160px; border-radius: 8px; object-fit: cover; aspect-ratio: 16 / 9; }

@media (hover: none) {
  .library-hub-card:active { transform: translateY(1px) scale(.975); box-shadow: 0 8px 18px rgba(35,37,35,.12); }
  .category-button:active, .type-switch button:active { transform: scale(.96); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Keep modal entry and exit on one compositor-owned path. */
.modal-backdrop:not(.is-closing) > .modal {
  animation: modal-expand-from-trigger .24s cubic-bezier(.2, .8, .2, 1) both;
}
.modal-backdrop.is-closing > .modal {
  animation: modal-collapse-to-trigger .22s cubic-bezier(.4, 0, .8, .2) both;
}
.resource-form-backdrop:not(.is-closing) > .resource-form-panel {
  animation: resource-expand-from-trigger .24s cubic-bezier(.2, .8, .2, 1) both;
}
.resource-form-backdrop.is-closing > .resource-form-panel {
  animation: resource-collapse-to-trigger .22s cubic-bezier(.4, 0, .8, .2) both;
}
@keyframes modal-expand-from-trigger {
  from { opacity: .2; transform: translate(var(--modal-start-x, 0px), var(--modal-start-y, 0px)) scale(var(--modal-start-scale, .08)); }
  to { opacity: 1; transform: translate(0, 0) scale(1); }
}
@keyframes modal-collapse-to-trigger {
  from { opacity: 1; transform: translate(0, 0) scale(1); }
  to { opacity: .2; transform: translate(var(--modal-start-x, 0px), var(--modal-start-y, 0px)) scale(var(--modal-start-scale, .08)); }
}
@keyframes resource-expand-from-trigger {
  from { opacity: .2; transform: translate(var(--resource-start-x, 0px), var(--resource-start-y, 0px)) scale(var(--resource-start-scale, .08)); }
  to { opacity: 1; transform: translate(0, 0) scale(1); }
}
@keyframes resource-collapse-to-trigger {
  from { opacity: 1; transform: translate(0, 0) scale(1); }
  to { opacity: .2; transform: translate(var(--resource-start-x, 0px), var(--resource-start-y, 0px)) scale(var(--resource-start-scale, .08)); }
}
.modal-comet-closing .modal-comet-path,
.resource-comet-closing .resource-comet-path {
  animation-name: modal-comet-travel-reverse;
  animation-duration: .22s;
  animation-timing-function: linear;
  animation-iteration-count: 1;
  animation-fill-mode: both;
}
.resource-comet-closing .resource-comet-path { animation-name: resource-comet-travel-reverse; }
.modal-backdrop,
.resource-form-backdrop { will-change: opacity; }

.bookmark-category-editor { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.bookmark-category-items { display: grid; gap: 5px; }
.bookmark-category-item,
.bookmark-category-edit { min-height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); }
.bookmark-category-item span { min-width: 0; flex: 1; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.bookmark-category-item button,
.bookmark-category-edit button { width: 26px; height: 27px; display: grid; place-items: center; border-radius: 6px; color: var(--muted-2); background: transparent; }
.bookmark-category-item button:hover,
.bookmark-category-edit button:hover { color: var(--ink); background: var(--surface-soft); }
.bookmark-category-item button:disabled { opacity: .3; cursor: not-allowed; }
.bookmark-category-edit input { min-width: 0; flex: 1; height: 28px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.bookmark-category-settings { margin-top: 14px; }

@media (min-width: 761px) {
  [data-screen-label="05 bookmarks"] .library-layout { grid-template-columns: 114px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop:not(.is-closing) > .modal,
  .modal-backdrop.is-closing > .modal,
  .resource-form-backdrop:not(.is-closing) > .resource-form-panel,
  .resource-form-backdrop.is-closing > .resource-form-panel { animation-duration: .01ms !important; }
}

@media (max-width: 760px) {
  .library-hub-toolbar { display: block; }
  .library-hub-note { display: block; margin-top: 8px; }
  .library-hub-grid, .style-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .library-hub-card { min-height: 205px; padding: 13px; border-radius: 13px; }
  .library-hub-copy { margin-top: 24px; }
  .library-hub-copy strong { font-size: 18px; }
  .library-hub-copy small { font-size: 8px; }
  .library-hub-copy p { margin-top: 8px; font-size: 9px; line-height: 1.45; }
  .library-hub-meta b { font-size: 20px; }
  .library-hub-enter { font-size: 9px; }
  .style-catalog-banner { align-items: flex-start; padding: 15px; }
  .style-catalog-banner h3 { font-size: 20px; }
  .style-catalog-banner > strong { font-size: 32px; }
  .style-catalog-card { grid-template-rows: auto 108px auto; gap: 8px; padding: 10px; border-radius: 11px; }
  .style-catalog-copy { min-height: 80px; }
  .style-catalog-copy h3 { font-size: 13px; }
  .style-catalog-copy p { font-size: 9px; }
  .style-catalog-foot { font-size: 8px; }
  .style-preview.is-compact { height: 108px; min-height: 108px; padding: 9px; }
  .style-preview.is-compact > strong { margin-top: 12px; font-size: 14px; }
  .style-preview.is-compact .style-preview-eyebrow { font-size: 6px; }
  .style-preview.is-compact .style-preview-phone { width: 50px; height: 82px; right: 9%; top: 9px; border-width: 3px; border-radius: 11px; font-size: 6px; }
  .style-preview.is-compact .phone-camera { top: 6px; width: 16px; height: 4px; }
  .style-drawer { right: 0; bottom: 0; width: 100%; max-height: calc(100dvh - 14px); padding: 24px 16px calc(20px + env(safe-area-inset-bottom)); border-right: 0; border-bottom: 0; border-radius: 22px 22px 0 0; animation-name: sheet-in; }
  .style-drawer::before { content: ''; position: absolute; top: 9px; left: 50%; width: 38px; height: 4px; border-radius: 999px; background: var(--line-strong); transform: translateX(-50%); }
  .style-drawer-header h2 { font-size: 26px; }
  .style-drawer-header-actions { gap: 5px; }
  .style-drawer-header-actions .button-small { min-height: 34px; padding: 0 9px; font-size: 10px; }
  .style-drawer-meta { overflow-x: auto; white-space: nowrap; }
  .style-drawer-content { gap: 17px; padding-right: 0; }
  .style-detail-hero { grid-template-columns: 1fr; gap: 9px; }
  .style-detail-hero-copy { padding: 15px; }
  .style-detail-hero-copy h3 { font-size: 23px; }
  .style-detail-stats { margin-top: 15px; }
  .style-detail-hero-media { order: -1; }
  .style-preview.is-hero { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .style-preview.is-hero > strong { font-size: 25px; }
  .style-scene-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .style-scene-card { min-height: 105px; padding: 11px; }
  .style-scene-card strong { margin-top: 11px; font-size: 12px; }
  .style-prompt-section { padding: 13px; }
  .style-ai-prompt code { font-size: 10px; }
  .style-edit-form { padding-right: 0; }
  .style-edit-form .modal-footer { position: sticky; bottom: 0; margin-top: 2px; padding: 12px 0 0; background: var(--surface); }
  .style-showcase-item { grid-template-columns: 38px minmax(0, 1fr); gap: 8px; }
  .style-preview { min-height: 180px; padding: 15px; }
  .style-preview > strong { font-size: 22px; }
  .style-preview-phone { width: 78px; height: 136px; right: 10%; }
  .expense-chart-wrap { min-height: 222px; grid-template-columns: 43px minmax(0, 1fr); }
  .expense-chart { min-height: 194px; gap: 2px; padding: 5px 1px 0; }
  .expense-month-bar { height: 184px; gap: 5px; }
  .expense-month-bar i { width: min(20px, 68%); border-radius: 6px 6px 2px 2px; }
  .expense-month-bar small { font-size: 8px; }
  .expense-bar-value { display: none; }
  .expense-tooltip { right: 7px; top: 10px; min-width: 122px; padding: 9px 10px; }
}

/* Liquid Glass theme */
[data-theme="liquid-glass"] {
  --canvas: #edf1f6;
  --surface: rgba(255,255,255,.62);
  --surface-soft: rgba(255,255,255,.42);
  --ink: #17202b;
  --muted: #667384;
  --muted-2: #94a0ad;
  --line: rgba(255,255,255,.72);
  --line-strong: rgba(142,158,176,.5);
  --rail: rgba(31,39,51,.78);
  --rail-muted: #c3ccd8;
  --pink: #ff7185;
  --pink-soft: rgba(255,113,133,.22);
  --blue: #9db8ff;
  --blue-soft: rgba(157,184,255,.26);
  --lime: #bfe77c;
  --yellow: #ffd77c;
  --teal: #8edbd0;
  --shadow: 0 24px 70px rgba(75,92,113,.16);
  --shadow-soft: 0 10px 28px rgba(75,92,113,.12);
  background: var(--canvas);
}
[data-theme="liquid-glass"] body,
[data-theme="liquid-glass"] .app-shell {
  background:
    radial-gradient(circle at 8% 8%, rgba(255,255,255,.82), transparent 28%),
    radial-gradient(circle at 86% 88%, rgba(157,184,255,.22), transparent 30%),
    var(--canvas);
}
[data-theme="liquid-glass"] .sidebar,
[data-theme="liquid-glass"] .topbar,
[data-theme="liquid-glass"] .mobile-nav {
  border-color: rgba(255,255,255,.42);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 16px 40px rgba(75,92,113,.12);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
}
[data-theme="liquid-glass"] .sidebar {
  background: color-mix(in srgb, var(--rail) 88%, transparent);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.14), 12px 0 40px rgba(41,52,68,.12);
}
[data-theme="liquid-glass"] .topbar {
  background: color-mix(in srgb, var(--canvas) 58%, transparent);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.62), 0 8px 24px rgba(75,92,113,.07);
}
[data-theme="liquid-glass"] .panel,
[data-theme="liquid-glass"] .settings-section,
[data-theme="liquid-glass"] .vault-list,
[data-theme="liquid-glass"] .card-library,
[data-theme="liquid-glass"] .bookmark-card,
[data-theme="liquid-glass"] .prompt-card,
[data-theme="liquid-glass"] .style-catalog-card,
[data-theme="liquid-glass"] .style-catalog-banner,
[data-theme="liquid-glass"] .modal,
[data-theme="liquid-glass"] .style-drawer,
[data-theme="liquid-glass"] .treasure-menu {
  border-color: rgba(255,255,255,.7);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), var(--shadow-soft);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}
[data-theme="liquid-glass"] .panel,
[data-theme="liquid-glass"] .settings-section,
[data-theme="liquid-glass"] .card-library,
[data-theme="liquid-glass"] .bookmark-card,
[data-theme="liquid-glass"] .prompt-card,
[data-theme="liquid-glass"] .style-catalog-card {
  transition: transform .42s var(--ease-out-expo), box-shadow .42s var(--ease-out-expo), border-color .3s ease, background .42s ease;
}
[data-theme="liquid-glass"] .panel:hover,
[data-theme="liquid-glass"] .bookmark-card:hover,
[data-theme="liquid-glass"] .prompt-card:hover,
[data-theme="liquid-glass"] .style-catalog-card:hover {
  border-color: rgba(255,255,255,.94);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 18px 42px rgba(75,92,113,.16);
}
[data-theme="liquid-glass"] .hero-balance {
  background: linear-gradient(135deg, rgba(31,39,51,.9), rgba(61,73,91,.78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 20px 50px rgba(54,68,86,.2);
}
[data-theme="liquid-glass"] .security-banner {
  --security-bg: linear-gradient(135deg, rgba(182,236,222,.78), rgba(218,231,255,.68));
  --security-ink: #213244;
  --security-muted: #607286;
  --security-icon-bg: rgba(255,255,255,.48);
  --security-icon-border: rgba(255,255,255,.82);
  --security-button-bg: rgba(38,49,64,.88);
  --security-button-ink: #fff;
  border-color: rgba(255,255,255,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 14px 32px rgba(75,92,113,.12);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}
[data-theme="liquid-glass"] .search-field,
[data-theme="liquid-glass"] .icon-button,
[data-theme="liquid-glass"] .form-field input,
[data-theme="liquid-glass"] .form-field select,
[data-theme="liquid-glass"] .form-field textarea,
[data-theme="liquid-glass"] .pin-setting input,
[data-theme="liquid-glass"] .pin-entry input,
[data-theme="liquid-glass"] .theme-picker,
[data-theme="liquid-glass"] .segmented,
[data-theme="liquid-glass"] .type-switch {
  border-color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.46);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
[data-theme="liquid-glass"] .icon-button:hover,
[data-theme="liquid-glass"] .search-field:focus-within,
[data-theme="liquid-glass"] .form-field input:focus,
[data-theme="liquid-glass"] .form-field select:focus,
[data-theme="liquid-glass"] .form-field textarea:focus {
  border-color: rgba(255,113,133,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 0 0 4px rgba(255,113,133,.14);
}
[data-theme="liquid-glass"] .button,
[data-theme="liquid-glass"] .category-button,
[data-theme="liquid-glass"] .segment,
[data-theme="liquid-glass"] .theme-option,
[data-theme="liquid-glass"] .library-back,
[data-theme="liquid-glass"] .quick-add {
  transition: transform .38s var(--ease-out-expo), color .3s ease, background .38s ease, border-color .3s ease, box-shadow .38s ease;
}
[data-theme="liquid-glass"] .button-secondary,
[data-theme="liquid-glass"] .button-quiet,
[data-theme="liquid-glass"] .category-button,
[data-theme="liquid-glass"] .theme-option,
[data-theme="liquid-glass"] .library-back {
  border-color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.68);
}
[data-theme="liquid-glass"] .button-primary,
[data-theme="liquid-glass"] .quick-add,
[data-theme="liquid-glass"] .category-button.is-active,
[data-theme="liquid-glass"] .segment.is-active,
[data-theme="liquid-glass"] .theme-option.is-active {
  color: #202123;
  background: color-mix(in srgb, var(--pink) 82%, #fff 18%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 10px 24px rgba(255,113,133,.2);
}
[data-theme="liquid-glass"] .button:hover,
[data-theme="liquid-glass"] .category-button:hover,
[data-theme="liquid-glass"] .segment:hover,
[data-theme="liquid-glass"] .quick-add:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 14px 30px rgba(75,92,113,.15);
}
[data-theme="liquid-glass"] .library-hub-card {
  border-color: rgba(255,255,255,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 16px 38px rgba(75,92,113,.13);
}
[data-theme="liquid-glass"] .hub-pink { background: linear-gradient(145deg, rgba(255,213,221,.78), rgba(255,255,255,.38)); }
[data-theme="liquid-glass"] .hub-blue { background: linear-gradient(145deg, rgba(202,216,255,.78), rgba(255,255,255,.38)); }
[data-theme="liquid-glass"] .hub-lime { background: linear-gradient(145deg, rgba(224,244,174,.76), rgba(255,255,255,.38)); }
[data-theme="liquid-glass"] .library-hub-icon { background: rgba(255,255,255,.56); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
[data-theme="liquid-glass"] .modal-backdrop,
[data-theme="liquid-glass"] .style-drawer-backdrop {
  background: rgba(44,55,70,.28);
  backdrop-filter: blur(15px) saturate(125%);
  -webkit-backdrop-filter: blur(15px) saturate(125%);
}
[data-theme="liquid-glass"] .modal,
[data-theme="liquid-glass"] .style-drawer {
  background: rgba(247,250,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), -25px 0 70px rgba(75,92,113,.2);
}
[data-theme="liquid-glass"] .mobile-nav { background: rgba(247,250,255,.72); }
[data-theme="liquid-glass"] .mobile-nav button { border: 1px solid transparent; transition: color .34s ease, transform .42s var(--ease-out-expo), background .42s ease, border-color .34s ease, box-shadow .42s ease; }
@media (hover: hover) and (pointer: fine) {
  [data-theme="liquid-glass"] .mobile-nav button:hover { color: var(--ink); transform: translateY(-2px); background: rgba(255,255,255,.44); border-color: rgba(255,255,255,.7); }
}
[data-theme="liquid-glass"] .mobile-nav button:active { transform: scale(.94); }
[data-theme="liquid-glass"] .mobile-nav button.is-active { color: var(--ink); border-color: rgba(255,255,255,.84); background: rgba(255,255,255,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 6px 16px rgba(75,92,113,.11); }
[data-theme="liquid-glass"] .theme-liquid-glass .theme-preview {
  background: linear-gradient(135deg, rgba(255,255,255,.8), rgba(157,184,255,.75) 48%, rgba(255,113,133,.8));
}
[data-theme="liquid-glass"] .theme-liquid-glass .theme-preview::after {
  border-color: rgba(255,255,255,.84);
  box-shadow: 0 0 0 15px rgba(255,255,255,.22);
}
@media (prefers-reduced-transparency: reduce) {
  [data-theme="liquid-glass"] .sidebar,
  [data-theme="liquid-glass"] .topbar,
  [data-theme="liquid-glass"] .panel,
  [data-theme="liquid-glass"] .settings-section,
  [data-theme="liquid-glass"] .vault-list,
  [data-theme="liquid-glass"] .card-library,
  [data-theme="liquid-glass"] .bookmark-card,
  [data-theme="liquid-glass"] .prompt-card,
  [data-theme="liquid-glass"] .style-catalog-card,
  [data-theme="liquid-glass"] .modal,
  [data-theme="liquid-glass"] .style-drawer {
    background: #f5f7fb;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.resource-category-tabs { display: flex; gap: 6px; margin: 0 0 17px; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); scrollbar-width: none; }
.resource-category-tabs::-webkit-scrollbar { display: none; }
.resource-category-tabs button { min-height: 35px; flex: 1 0 120px; border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; transition: color .32s ease, background .42s var(--ease-out-expo), transform .28s var(--ease-out-expo), box-shadow .42s ease; }
.resource-category-tabs button:hover { color: var(--ink); transform: translateY(-1px); }
.resource-category-tabs button.is-active { color: var(--ink); background: var(--surface); box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 5px 14px rgba(54,68,86,.1); }
.resource-category-tabs button span { margin-left: 5px; color: var(--muted-2); font-size: 9px; }
.resource-card-components .resource-card-preview { background: linear-gradient(135deg, rgba(157,184,255,.64), rgba(255,255,255,.66)); }
.resource-card-motion .resource-card-preview { background: linear-gradient(135deg, rgba(167,221,199,.64), rgba(255,255,255,.64)); }
.resource-card-preview { position: relative; min-height: 155px; display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; overflow: hidden; padding: 15px; border: 1px solid rgba(255,255,255,.8); border-radius: 11px; color: #253144; background: linear-gradient(135deg, color-mix(in srgb, var(--resource-accent) 42%, white), rgba(255,255,255,.58)); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.resource-card-preview::before, .resource-card-preview::after { content: ''; position: absolute; border: 1px solid rgba(255,255,255,.72); border-radius: 50%; }
.resource-card-preview::before { width: 150px; height: 150px; right: -34px; top: -48px; box-shadow: 0 0 0 20px rgba(255,255,255,.12), 0 0 0 43px rgba(255,255,255,.08); }
.resource-card-preview::after { width: 74px; height: 74px; right: 25%; top: 16%; background: color-mix(in srgb, var(--resource-accent) 58%, white); opacity: .72; }
.resource-card-preview > * { position: relative; z-index: 1; }
.resource-card-preview span { color: rgba(37,49,68,.58); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.resource-card-preview strong { max-width: 75%; font-size: 18px; letter-spacing: -.05em; }
.resource-card-preview i, .resource-card-preview b { display: block; height: 4px; border-radius: 999px; background: rgba(255,255,255,.82); }
.resource-card-preview i { width: 45%; }
.resource-card-preview b { width: 68%; opacity: .7; }
.resource-card-preview.has-media { padding: 0; }
.resource-card-preview.has-media img, .resource-card-preview.has-media video { width: 100%; height: 100%; min-height: 155px; object-fit: cover; }

.resource-form-backdrop { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; padding: 18px; overflow: hidden; contain: paint; background: rgba(28,39,53,.27); backdrop-filter: blur(6px) saturate(115%); -webkit-backdrop-filter: blur(6px) saturate(115%); animation: fade-in .16s ease both; }
.resource-form-backdrop.is-closing { animation: fade-out .22s ease both; pointer-events: none; }
.resource-form-panel { position: relative; width: min(720px, calc(100vw - 36px)); max-height: min(820px, calc(100dvh - 36px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.94); border-radius: 25px; color: var(--ink); background: rgba(244,248,252,.82); box-shadow: inset 0 1px 0 #fff, 0 35px 100px rgba(23,36,51,.24); backdrop-filter: blur(36px) saturate(155%); -webkit-backdrop-filter: blur(36px) saturate(155%); transform-origin: center; will-change: transform, opacity; }
.resource-form-header { position: relative; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 21px 23px 15px; border-bottom: 1px solid rgba(115,136,157,.14); }
.resource-form-header h2 { margin: 6px 0 0; font-size: 23px; letter-spacing: -.04em; }
.resource-form-header p { max-width: 480px; margin: 6px 0 0; color: #6c7b8d; font-size: 10px; line-height: 1.55; }
.resource-modal-content { position: relative; z-index: 2; min-height: 0; overflow: auto; padding: 16px 23px 22px; scrollbar-width: none; }
.resource-modal-content::-webkit-scrollbar { display: none; }
.resource-modal-content .form-field label { color: #637386; font-size: 9px; font-weight: 700; }
.resource-media-tools { display: flex; flex-wrap: wrap; gap: 7px; }
.resource-upload { position: relative; overflow: hidden; }
.resource-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.resource-dropzone { min-height: 60px; display: grid; place-items: center; margin-top: 8px; padding: 12px; border: 1px dashed rgba(120,143,166,.35); border-radius: 12px; color: #758498; background: rgba(255,255,255,.26); font-size: 9px; text-align: center; }
.resource-media-preview { position: relative; max-height: 230px; overflow: hidden; margin-top: 9px; border: 1px solid rgba(255,255,255,.92); border-radius: 12px; background: rgba(255,255,255,.5); }
.resource-media-preview img, .resource-media-preview video { width: 100%; max-height: 230px; display: block; object-fit: contain; background: rgba(31,45,61,.06); }
.resource-media-preview .icon-button { position: absolute; top: 7px; right: 7px; }
.resource-comet { position: absolute; z-index: 4; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: 0; }
.resource-comet-active { opacity: 1; }
.resource-comet-path { stroke: url(#resource-comet-gradient); stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; will-change: stroke-dashoffset; stroke-dashoffset: var(--resource-comet-start-offset, 0px); }
.resource-comet-far { stroke-width: 6; opacity: .3; }
.resource-comet-mid { stroke-width: 4; opacity: .47; }
.resource-comet-near { stroke-width: 2.5; opacity: .72; }
.resource-comet-head { stroke-width: 1.7; opacity: 1; filter: drop-shadow(0 0 3px rgba(255,255,255,1)) drop-shadow(0 0 8px rgba(255,113,133,.92)); }
.resource-comet-active .resource-comet-path { animation: resource-comet-travel 16.4s linear infinite; }
.resource-comet-closing { opacity: 1; }
.resource-comet-closing .resource-comet-path { animation: resource-comet-travel-reverse .22s linear both; }
@keyframes resource-comet-travel { from { stroke-dashoffset: var(--resource-comet-start-offset, 0px); } to { stroke-dashoffset: var(--resource-comet-end-offset, var(--resource-comet-distance)); } }
@keyframes resource-comet-travel-reverse { from { stroke-dashoffset: var(--resource-comet-reverse-from, var(--resource-comet-start-offset, 0px)); } to { stroke-dashoffset: var(--resource-comet-start-offset, 0px); } }

@media (max-width: 760px) {
  .resource-category-tabs { margin-right: 0; }
  .resource-category-tabs button { flex-basis: 105px; font-size: 10px; }
  .resource-form-backdrop { align-items: end; padding: 0; }
  .resource-form-panel { width: 100%; max-height: calc(100dvh - 9px); border-radius: 24px 24px 0 0; }
  .resource-form-header { padding: 21px 17px 13px; }
  .resource-form-header h2 { font-size: 20px; }
  .resource-modal-content { padding: 14px 17px calc(15px + env(safe-area-inset-bottom)); }
  .resource-modal-content .form-grid { grid-template-columns: 1fr; gap: 10px; }
  .resource-modal-content .form-field.full { grid-column: auto; }
  .resource-card-preview { min-height: 108px; }
  .resource-card-preview.has-media img, .resource-card-preview.has-media video { min-height: 108px; }
}

@media (prefers-reduced-motion: reduce) {
  .resource-form-panel { animation-duration: .01ms !important; }
}

/* Liquid Glass coverage for the remaining workbench surfaces. */
[data-theme="liquid-glass"] .sidebar {
  border-right: 1px solid rgba(255,255,255,.62);
  color: var(--ink);
  background: linear-gradient(160deg, rgba(255,255,255,.72), rgba(231,238,248,.46));
  box-shadow: inset -1px 0 0 rgba(255,255,255,.8), 14px 0 45px rgba(75,92,113,.12);
}
[data-theme="liquid-glass"] .sidebar .brand-copy strong,
[data-theme="liquid-glass"] .sidebar .brand-copy span,
[data-theme="liquid-glass"] .sidebar .nav-label,
[data-theme="liquid-glass"] .sidebar .profile-mini strong,
[data-theme="liquid-glass"] .sidebar .profile-mini span { color: var(--ink); }
[data-theme="liquid-glass"] .sidebar .nav-item { color: var(--muted); }
[data-theme="liquid-glass"] .sidebar .nav-list { gap: 7px; margin: 0 -7px; padding: 7px; border: 1px solid rgba(255,255,255,.38); border-radius: 18px; background: rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.56), 0 12px 28px rgba(75,92,113,.08); backdrop-filter: blur(20px) saturate(145%); -webkit-backdrop-filter: blur(20px) saturate(145%); }
[data-theme="liquid-glass"] .sidebar .nav-item { position: relative; min-height: 48px; overflow: hidden; border: 1px solid transparent; border-radius: 13px; transition: color .3s ease, transform .5s var(--ease-out-expo), background .5s ease, border-color .35s ease, box-shadow .5s ease; }
[data-theme="liquid-glass"] .sidebar .nav-item::before { content: ''; position: absolute; inset: 1px; pointer-events: none; border-radius: 11px; background: linear-gradient(110deg, rgba(255,255,255,.34), transparent 42%, rgba(255,255,255,.12)); opacity: 0; transform: translateX(-16px); transition: opacity .42s ease, transform .55s var(--ease-out-expo); }
[data-theme="liquid-glass"] .sidebar .nav-item > * { position: relative; z-index: 1; }
[data-theme="liquid-glass"] .sidebar .nav-item:hover { color: var(--ink); transform: translateX(3px); border-color: rgba(255,255,255,.66); background: rgba(255,255,255,.42); box-shadow: inset 0 1px 0 rgba(255,255,255,.74), 0 9px 22px rgba(75,92,113,.1); }
[data-theme="liquid-glass"] .sidebar .nav-item:hover::before { opacity: 1; transform: translateX(0); }
[data-theme="liquid-glass"] .sidebar .nav-item:active { transform: translateX(3px) scale(.975); }
[data-theme="liquid-glass"] .sidebar .nav-item.is-active { color: var(--ink); border-color: rgba(255,255,255,.82); background: linear-gradient(105deg, rgba(255,113,133,.78), rgba(255,190,202,.52)); box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 10px 25px rgba(255,113,133,.2); }
[data-theme="liquid-glass"] .sidebar .nav-item.is-active::before { opacity: 1; transform: translateX(0); background: linear-gradient(110deg, rgba(255,255,255,.38), transparent 55%); }
[data-theme="liquid-glass"] .topbar { border-bottom-color: rgba(255,255,255,.66); }
[data-theme="liquid-glass"] .topbar .icon-button,
[data-theme="liquid-glass"] .topbar .avatar { border-color: rgba(255,255,255,.68); background: rgba(255,255,255,.42); box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 7px 16px rgba(75,92,113,.08); transition: transform .42s var(--ease-out-expo), background .3s ease, box-shadow .3s ease; }
[data-theme="liquid-glass"] .topbar .icon-button:hover,
[data-theme="liquid-glass"] .topbar .avatar:hover { transform: translateY(-2px) scale(1.03); background: rgba(255,255,255,.66); box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 10px 22px rgba(75,92,113,.13); }
[data-theme="liquid-glass"] .topbar .icon-button:active,
[data-theme="liquid-glass"] .topbar .avatar:active { transform: scale(.95); }
[data-theme="liquid-glass"] .sidebar .profile-mini { padding: 9px; border: 1px solid rgba(255,255,255,.62); border-radius: 14px; background: rgba(255,255,255,.34); box-shadow: inset 0 1px 0 rgba(255,255,255,.66); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }

[data-theme="liquid-glass"] .module-card,
[data-theme="liquid-glass"] .bookmark-hero,
[data-theme="liquid-glass"] .bookmark-count-card,
[data-theme="liquid-glass"] .saving-goal-card,
[data-theme="liquid-glass"] .card-form-preview,
[data-theme="liquid-glass"] .card-detail-hero {
  border: 1px solid rgba(255,255,255,.74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 14px 32px rgba(75,92,113,.12);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}
[data-theme="liquid-glass"] .module-card { position: relative; overflow: hidden; color: var(--ink); }
[data-theme="liquid-glass"] .module-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255,255,255,.38), transparent 42%, rgba(255,255,255,.16)); }
[data-theme="liquid-glass"] .module-card.prompt { background: linear-gradient(135deg, rgba(255,218,226,.72), rgba(255,255,255,.28)); }
[data-theme="liquid-glass"] .module-card.vault { background: linear-gradient(135deg, rgba(166,231,219,.66), rgba(255,255,255,.28)); }
[data-theme="liquid-glass"] .module-card.bookmarks { background: linear-gradient(135deg, rgba(184,204,255,.72), rgba(255,255,255,.28)); }
[data-theme="liquid-glass"] .module-card:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 20px 42px rgba(75,92,113,.18); }
[data-theme="liquid-glass"] .module-card-foot { color: var(--muted); }

[data-theme="liquid-glass"] .bookmark-hero {
  background: linear-gradient(135deg, rgba(184,204,255,.72), rgba(255,255,255,.34));
  border-color: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.84), 0 14px 32px rgba(75,92,113,.12);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}
[data-theme="liquid-glass"] .bookmark-count-card {
  background: linear-gradient(145deg, rgba(255,219,139,.72), rgba(255,255,255,.34));
  border-color: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.84), 0 14px 32px rgba(75,92,113,.12);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}
[data-theme="liquid-glass"] .bookmark-hero h2,
[data-theme="liquid-glass"] .bookmark-count-card strong { color: #233044; }
[data-theme="liquid-glass"] .bookmark-hero p,
[data-theme="liquid-glass"] .bookmark-count-card span { color: rgba(35,48,68,.72); }

[data-theme="liquid-glass"] .prompt-visual,
[data-theme="liquid-glass"] .prompt-detail-visual,
[data-theme="liquid-glass"] .resource-card-preview,
[data-theme="liquid-glass"] .style-detail-hero-media,
[data-theme="liquid-glass"] .style-preview,
[data-theme="liquid-glass"] .vault-preview,
[data-theme="liquid-glass"] .card-detail-hero,
[data-theme="liquid-glass"] .bookmark-detail-icon {
  border-color: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 12px 28px rgba(75,92,113,.1);
}
[data-theme="liquid-glass"] .prompt-visual img,
[data-theme="liquid-glass"] .prompt-detail-visual img,
[data-theme="liquid-glass"] .style-detail-hero-media img,
[data-theme="liquid-glass"] .resource-card-preview.has-media img,
[data-theme="liquid-glass"] .resource-card-preview.has-media video {
  filter: saturate(1.04) contrast(.98);
}
[data-theme="liquid-glass"] .style-preview { background-color: rgba(255,255,255,.38); }
[data-theme="liquid-glass"] .style-catalog-card:hover,
[data-theme="liquid-glass"] .module-card:hover,
[data-theme="liquid-glass"] .bookmark-card:hover,
[data-theme="liquid-glass"] .prompt-card:hover { transform: translateY(-5px); }
[data-theme="liquid-glass"] .dropdown-trigger,
[data-theme="liquid-glass"] .dropdown-menu,
[data-theme="liquid-glass"] .tag-picker-trigger,
[data-theme="liquid-glass"] .tag-picker-menu,
[data-theme="liquid-glass"] .form-select-trigger,
[data-theme="liquid-glass"] .form-select-menu,
[data-theme="liquid-glass"] .resource-dropzone,
[data-theme="liquid-glass"] .resource-media-preview {
  border-color: rgba(255,255,255,.76);
  background: rgba(255,255,255,.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 14px 30px rgba(75,92,113,.1);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}
[data-theme="liquid-glass"] .dropdown-menu button:hover,
[data-theme="liquid-glass"] .dropdown-menu button.is-selected,
[data-theme="liquid-glass"] .tag-picker-menu button:hover,
[data-theme="liquid-glass"] .tag-picker-menu button.is-selected { background: rgba(255,255,255,.7); }
[data-theme="liquid-glass"] .resource-form-panel { background: rgba(247,250,255,.72); box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 35px 100px rgba(75,92,113,.22); }
[data-theme="liquid-glass"] .resource-form-backdrop { background: rgba(44,55,70,.28); }

@media (max-width: 760px) {
  [data-theme="liquid-glass"] .mobile-nav { border-top-color: rgba(255,255,255,.74); background: rgba(247,250,255,.7); }
  [data-theme="liquid-glass"] .mobile-nav button.is-active { color: var(--ink); background: rgba(255,255,255,.56); box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 4px 14px rgba(75,92,113,.1); }
}

/* Liquid Glass final alignment with the approved preview. */
[data-theme="liquid-glass"] .sidebar {
  color: #f4f7fb;
  background: linear-gradient(160deg, rgba(28,36,48,.92), rgba(42,53,68,.78));
  border-right-color: rgba(255,255,255,.18);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.12), 14px 0 45px rgba(38,50,66,.18);
}
[data-theme="liquid-glass"] .sidebar .brand-copy strong,
[data-theme="liquid-glass"] .sidebar .brand-copy span,
[data-theme="liquid-glass"] .sidebar .nav-label,
[data-theme="liquid-glass"] .sidebar .profile-mini strong { color: #f4f7fb; }
[data-theme="liquid-glass"] .sidebar .brand-copy span,
[data-theme="liquid-glass"] .sidebar .nav-label,
[data-theme="liquid-glass"] .sidebar .profile-mini span { color: #b8c4d1; }
[data-theme="liquid-glass"] .sidebar .nav-list {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 12px 28px rgba(10,18,28,.14);
}
[data-theme="liquid-glass"] .sidebar .nav-item { color: #c8d1dc; }
[data-theme="liquid-glass"] .sidebar .nav-item:hover { color: #fff; border-color: rgba(255,255,255,.23); background: rgba(255,255,255,.1); }
[data-theme="liquid-glass"] .sidebar .nav-item.is-active {
  color: #202123;
  border-color: rgba(255,255,255,.55);
  background: linear-gradient(105deg, rgba(255,113,133,.95), rgba(255,177,190,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 10px 25px rgba(255,113,133,.26);
}
[data-theme="liquid-glass"] .sidebar .profile-mini {
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
[data-theme="liquid-glass"] .sidebar .profile-mini:hover { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.13); }
[data-theme="liquid-glass"] .sidebar .profile-mini .avatar { color: #26303b; background: #ffd77c; }

[data-theme="liquid-glass"] .shortcut-rail { gap: 14px; }
[data-theme="liquid-glass"] .shortcut-card {
  position: relative;
  min-height: 158px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: 0 11px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 17px;
  color: var(--ink);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88), 0 12px 30px rgba(72,91,114,.08);
  backdrop-filter: blur(23px) saturate(150%);
  -webkit-backdrop-filter: blur(23px) saturate(150%);
  transition: transform .4s var(--ease-out-expo), box-shadow .4s ease, border-color .3s ease, background .4s ease;
}
[data-theme="liquid-glass"] .shortcut-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(137deg, rgba(255,255,255,.5), transparent 43%, rgba(255,255,255,.16));
}
[data-theme="liquid-glass"] .shortcut-card::after {
  content: '';
  position: absolute;
  right: -34px;
  top: -48px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255,255,255,.56);
  border-radius: 50%;
  box-shadow: 0 0 0 20px rgba(255,255,255,.12), 0 0 0 43px rgba(255,255,255,.07);
  transition: transform .6s var(--ease-out-expo);
}
[data-theme="liquid-glass"] .shortcut-pink { background: linear-gradient(137deg, rgba(255,213,221,.8), rgba(255,255,255,.34)); }
[data-theme="liquid-glass"] .shortcut-blue { background: linear-gradient(137deg, rgba(202,216,255,.8), rgba(255,255,255,.34)); }
[data-theme="liquid-glass"] .shortcut-lime { background: linear-gradient(137deg, rgba(224,244,174,.78), rgba(255,255,255,.34)); }
[data-theme="liquid-glass"] .shortcut-card:hover { border-color: #fff; box-shadow: inset 0 1px 0 #fff, 0 19px 38px rgba(72,91,114,.15); }
[data-theme="liquid-glass"] .shortcut-pink:hover { transform: translateY(-5px) rotate(-.55deg); box-shadow: inset 0 1px 0 #fff, 0 19px 38px rgba(255,113,133,.2); }
[data-theme="liquid-glass"] .shortcut-blue:hover { transform: translateY(-5px) scale(1.012); }
[data-theme="liquid-glass"] .shortcut-lime:hover { transform: translateY(-5px) rotate(.55deg); }
[data-theme="liquid-glass"] .shortcut-card:hover::after { transform: translate(-8px, 10px) scale(1.08); }
[data-theme="liquid-glass"] .shortcut-card:active { transform: translateY(1px) scale(.975); }
[data-theme="liquid-glass"] .shortcut-card > * { position: relative; z-index: 1; }
[data-theme="liquid-glass"] .shortcut-card-index { position: absolute; top: 16px; right: 17px; color: #6d7c8e; font-size: 10px; font-variant-numeric: tabular-nums; }
[data-theme="liquid-glass"] .shortcut-card-icon { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.72); border-radius: 14px; color: var(--ink); background: rgba(255,255,255,.52); box-shadow: inset 0 1px 0 rgba(255,255,255,.78); }
[data-theme="liquid-glass"] .shortcut-card-copy { grid-column: 1 / -1; grid-row: 2; align-self: end; display: grid; gap: 4px; padding-top: 17px; }
[data-theme="liquid-glass"] .shortcut-card-copy strong { font-size: 16px; font-weight: 720; }
[data-theme="liquid-glass"] .shortcut-card-copy small { color: #68788b; font-size: 9px; line-height: 1.35; }
[data-theme="liquid-glass"] .shortcut-card-meta { grid-column: 1 / 2; grid-row: 3; display: flex; align-items: baseline; gap: 5px; margin-top: 9px; color: #718094; font-size: 9px; }
[data-theme="liquid-glass"] .shortcut-card-meta b { color: var(--ink); font-size: 20px; letter-spacing: -.05em; }
[data-theme="liquid-glass"] .shortcut-card-enter { grid-column: 3; grid-row: 3; display: inline-flex; align-items: center; gap: 4px; margin-top: 9px; color: var(--ink); font-size: 9px; font-weight: 750; }

[data-theme="liquid-glass"] .style-catalog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 11px;
  overflow: hidden;
  border-color: rgba(255,255,255,.86);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.68), rgba(255,255,255,.32));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 11px 29px rgba(66,84,105,.08);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}
[data-theme="liquid-glass"] .style-catalog-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(255,255,255,.34), transparent 42%, rgba(255,255,255,.12)); opacity: .8; }
[data-theme="liquid-glass"] .style-catalog-card > * { position: relative; z-index: 1; }
[data-theme="liquid-glass"] .style-catalog-copy { min-height: 79px; padding: 0 3px; }
[data-theme="liquid-glass"] .style-catalog-copy h3 { font-size: 14px; }
[data-theme="liquid-glass"] .style-catalog-copy p { color: #718094; }
[data-theme="liquid-glass"] .style-catalog-card .resource-card-preview { width: 100%; min-height: 155px; border-color: rgba(255,255,255,.86); border-radius: 13px; box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 20px rgba(66,84,105,.08); transition: transform .5s var(--ease-out-expo), filter .4s ease; }
[data-theme="liquid-glass"] .style-catalog-card:hover .resource-card-preview { transform: scale(1.018); filter: saturate(1.06); }
[data-theme="liquid-glass"] .style-catalog-card .resource-card-preview::before { transition: transform .65s var(--ease-out-expo); }
[data-theme="liquid-glass"] .style-catalog-card:hover .resource-card-preview::before { transform: translate(-7px, 8px) scale(1.08); }
[data-theme="liquid-glass"] .style-catalog-card .resource-card-preview.has-media img,
[data-theme="liquid-glass"] .style-catalog-card .resource-card-preview.has-media video { border-radius: inherit; }
[data-theme="liquid-glass"] .style-catalog-foot { min-height: 28px; padding: 10px 3px 0; color: #8996a5; }
[data-theme="liquid-glass"] .style-catalog-card.resource-card-styles:hover { transform: translateY(-5px) rotate(-.35deg); }
[data-theme="liquid-glass"] .style-catalog-card.resource-card-components:hover { transform: translateY(-5px) scale(1.012); }
[data-theme="liquid-glass"] .style-catalog-card.resource-card-motion:hover { transform: translateY(-5px) rotate(.35deg); }

@media (max-width: 760px) {
  [data-theme="liquid-glass"] .shortcut-rail { gap: 6px; }
  [data-theme="liquid-glass"] .shortcut-card { min-height: 94px; grid-template-rows: auto auto; padding: 11px; border-radius: 14px; }
  [data-theme="liquid-glass"] .shortcut-card-icon { width: 31px; height: 31px; border-radius: 10px; }
  [data-theme="liquid-glass"] .shortcut-card-copy { grid-column: 2; grid-row: 1; align-self: end; padding: 0 0 0 1px; }
  [data-theme="liquid-glass"] .shortcut-card-copy strong { font-size: 12px; }
  [data-theme="liquid-glass"] .shortcut-card-copy small { font-size: 7px; }
  [data-theme="liquid-glass"] .shortcut-card-meta { grid-column: 2; grid-row: 2; margin-top: 3px; font-size: 8px; }
  [data-theme="liquid-glass"] .shortcut-card-meta b { font-size: 15px; }
  [data-theme="liquid-glass"] .shortcut-card-enter { display: none; }
  [data-theme="liquid-glass"] .shortcut-card-index { top: 10px; right: 11px; font-size: 8px; }
  [data-theme="liquid-glass"] .style-catalog-card { border-radius: 15px; }
  [data-theme="liquid-glass"] .style-catalog-card .resource-card-preview { min-height: 108px; }
  [data-theme="liquid-glass"] .account-menu { right: auto; bottom: 78px; left: 12px; }
}

@media (max-width: 1080px) {
  .main-content { margin-left: 214px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; width: 100%; height: 100dvh; }
  .main-content { width: 100%; height: 100dvh; margin-left: 0; }
  .topbar { min-height: 88px; flex-basis: 88px; }
}

/* Final shared motion layer: the border path is measured by the component. */
.modal-comet-active .modal-comet-path,
.resource-comet-active .resource-comet-path { animation-duration: 16.4s; }
.modal-comet-closing .modal-comet-path,
.resource-comet-closing .resource-comet-path { animation-duration: .22s; animation-iteration-count: 1; }
.resource-form-backdrop.is-closing .resource-form-panel { pointer-events: none; }
.modal-backdrop.is-closing,
.resource-form-backdrop.is-closing { animation-duration: .22s; }

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .resource-form-backdrop,
  .modal-backdrop.is-closing,
  .resource-form-backdrop.is-closing { animation-duration: .01ms !important; }
  .modal-comet-active .modal-comet-path,
  .resource-comet-active .resource-comet-path { animation: none; }
}

/* Dense vault layout and theme-aware secondary modules. */
.vault-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.vault-module {
  min-width: 0;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.vault-module-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 19px;
}
.vault-module-heading > div:first-child { min-width: 0; }
.vault-category-tabs {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}
.vault-category-tabs button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
  white-space: nowrap;
  transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s var(--ease-out-expo);
}
.vault-category-tabs button span { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.vault-category-tabs button:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
.vault-category-tabs button.is-active { color: var(--ink); border-color: color-mix(in srgb, var(--pink) 55%, var(--line)); background: var(--pink-soft); font-weight: 750; }
.vault-category-tabs button.is-active span { color: var(--ink); }
.vault-module > .vault-list { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.vault-empty { min-height: 82px; display: grid; place-items: center; padding: 18px; color: var(--muted); font-size: 12px; }
.vault-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(86px, auto) auto;
  gap: 9px;
  padding: 8px 13px;
  border-bottom: 1px solid var(--line);
}
.vault-row:nth-child(odd):not(:last-child) { border-right: 1px solid var(--line); }
.vault-row:hover { padding-left: 16px; }
.vault-logo { width: 30px; height: 30px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--vault-accent, var(--blue)) 55%, var(--line)); color: var(--vault-ink, var(--ink)); background: color-mix(in srgb, var(--vault-accent, var(--blue)) 78%, var(--surface)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); font-size: 11px; }
.vault-meta strong { font-size: 12px; }
.vault-meta span { margin-top: 2px; font-size: 10px; }
.vault-password { width: auto; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.vault-actions { gap: 3px; }
.vault-actions .icon-button { width: 30px; height: 30px; border-radius: 9px; }
.api-module {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 34%, var(--surface));
}
.api-module .vault-module-heading { padding-bottom: 14px; border-bottom: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line)); }
.api-list { display: grid; gap: 8px; }
.api-row { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(0, 1.6fr) auto; align-items: center; gap: 14px; padding: 12px; border: 1px solid color-mix(in srgb, var(--blue) 28%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--surface) 76%, var(--blue-soft)); }
.api-row-main { min-width: 0; display: flex; align-items: center; gap: 9px; }
.api-platform-mark { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--ink); background: color-mix(in srgb, var(--blue) 48%, var(--surface)); font-size: 12px; font-weight: 800; }
.api-row-main strong, .api-row-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-row-main strong { font-size: 12px; }
.api-row-main span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.api-row-fields { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.api-value { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) 25px; align-items: center; gap: 6px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.api-value > span { color: var(--muted-2); font-size: 9px; font-weight: 750; }
.api-value code { min-width: 0; overflow: hidden; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.api-value .icon-button { width: 25px; height: 25px; border: 0; border-radius: 6px; background: transparent; }
.api-value .icon-button:hover { background: var(--surface-soft); }
.api-row-actions { display: flex; gap: 3px; }
.api-row-actions .icon-button { width: 30px; height: 30px; border-radius: 8px; }

.modal .form-field .dropdown-trigger {
  min-height: 43px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  font-size: 13px;
}
.modal .form-field .dropdown-trigger:hover,
.modal .form-field .dropdown.is-open .dropdown-trigger {
  color: var(--ink);
  background: var(--surface-soft);
}

.security-banner {
  --security-bg: linear-gradient(135deg, color-mix(in srgb, var(--teal) 38%, var(--surface)), color-mix(in srgb, var(--blue) 20%, var(--surface)));
  --security-muted: color-mix(in srgb, var(--security-ink) 66%, transparent);
  background: var(--security-bg);
}
.security-banner-copy .icon { background: color-mix(in srgb, var(--teal) 34%, var(--surface)); }
.security-banner .button-dark { background: color-mix(in srgb, var(--rail) 92%, var(--teal)); }

.celebration-backdrop { background: color-mix(in srgb, var(--rail) 22%, transparent); }
.celebration-modal { border: 1px solid color-mix(in srgb, var(--ink) 10%, var(--line)); }
.celebration-art { background: linear-gradient(135deg, color-mix(in srgb, var(--pink) 90%, var(--surface)), color-mix(in srgb, var(--blue) 45%, var(--pink))); }
.celebration-yellow .celebration-art { background: linear-gradient(135deg, color-mix(in srgb, var(--yellow) 92%, var(--surface)), color-mix(in srgb, var(--pink) 32%, var(--yellow))); }
.celebration-blue .celebration-art { background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 90%, var(--surface)), color-mix(in srgb, var(--teal) 34%, var(--blue))); }
.celebration-teal .celebration-art { background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 90%, var(--surface)), color-mix(in srgb, var(--blue) 28%, var(--teal))); }
.celebration-lime .celebration-art { background: linear-gradient(135deg, color-mix(in srgb, var(--lime) 92%, var(--surface)), color-mix(in srgb, var(--yellow) 34%, var(--lime))); }

@media (hover: hover) {
  .expense-tooltip { display: none; }
  .expense-month-bar:hover .expense-bar-value,
  .expense-month-bar:focus-visible .expense-bar-value { position: absolute; z-index: 2; bottom: calc(var(--bar-height) + 10px); display: block; padding: 4px 6px; border: 1px solid color-mix(in srgb, var(--month-color) 45%, var(--line)); border-radius: 6px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-soft); font-size: 9px; white-space: nowrap; }
}

@media (max-width: 760px) {
  .vault-module-heading { flex-direction: column; gap: 11px; padding: 15px; }
  .vault-category-tabs { width: 100%; justify-content: flex-start; }
  .vault-list { grid-template-columns: 1fr; }
  .vault-row { grid-template-columns: 30px minmax(0, 1fr) auto; min-height: 54px; padding: 8px 11px; }
  .vault-row:nth-child(odd):not(:last-child) { border-right: 0; }
  .vault-password { display: none; }
  .api-row { grid-template-columns: 1fr auto; gap: 10px; }
  .api-row-fields { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 1fr; }
  .api-row-actions { grid-column: 2; grid-row: 1; }
  .api-value { min-height: 34px; }
}

/* Ledger keeps category as a first-class column while preserving old records. */
.transaction-table-head,
.transaction-table-row { grid-template-columns: minmax(190px, 1.45fr) .8fr .8fr .95fr .7fr; }

@media (max-width: 760px) {
  .transaction-table-head,
  .transaction-table-row { grid-template-columns: minmax(0, 1fr) auto; }
  .transaction-table-row .table-cell:nth-child(2),
  .transaction-table-row .table-cell:nth-child(3),
  .transaction-table-row .table-cell:nth-child(4) { display: none; }
  .transaction-table-row .table-amount { grid-column: 2; grid-row: 1; }
}

/* Independent day/night appearance layer. The selected workbench theme remains unchanged. */
[data-color-mode="night"] {
  --canvas: #15181c;
  --surface: #22272d;
  --surface-soft: #2d343c;
  --ink: #f4f5f2;
  --muted: #adb5be;
  --muted-2: #7d8792;
  --line: #3b444e;
  --line-strong: #56616c;
  --rail: #0d1013;
  --rail-muted: #aab3bd;
  --shadow: 0 20px 60px rgba(0, 0, 0, .3);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, .24);
}
[data-theme="duna"][data-color-mode="night"] { --canvas: #1d1917; --surface: #2b2421; --surface-soft: #3a2e29; --ink: #f8eee4; --muted: #c9b6a8; --muted-2: #9f8879; --line: #514038; --line-strong: #71594a; --rail: #130f0d; }
[data-theme="greptile"][data-color-mode="night"] { --canvas: #0b100d; --surface: #151e18; --surface-soft: #1f2c23; --line: #2f4435; --line-strong: #4e6a54; }
[data-theme="hosier"][data-color-mode="night"] { --canvas: #1b1413; --surface: #2a201d; --surface-soft: #3b2c27; --ink: #f9eee2; --muted: #cfb7a7; --muted-2: #997b6d; --line: #513b33; --line-strong: #725348; --rail: #100b0a; }
[data-theme="liquid-glass"][data-color-mode="night"] { --canvas: #121922; --surface: rgba(30, 40, 53, .78); --surface-soft: rgba(49, 62, 79, .72); --ink: #f4f7fb; --muted: #b5c0cc; --muted-2: #8290a0; --line: rgba(190, 211, 232, .24); --line-strong: rgba(211, 228, 245, .42); --rail: rgba(8, 13, 20, .9); --rail-muted: #b9c7d5; --shadow: 0 24px 70px rgba(0, 0, 0, .32); --shadow-soft: 0 10px 28px rgba(0, 0, 0, .24); }
[data-color-mode="night"] body,
[data-color-mode="night"] .app-shell { background: var(--canvas); }
[data-color-mode="night"] .form-field input,
[data-color-mode="night"] .form-field select,
[data-color-mode="night"] .form-field textarea,
[data-color-mode="night"] .search-field,
[data-color-mode="night"] .pin-setting input,
[data-color-mode="night"] .pin-entry input,
[data-color-mode="night"] .goal-add-form input,
[data-color-mode="night"] .option-add-form input,
[data-color-mode="night"] .option-chip-edit { color: var(--ink); background: var(--surface); }
[data-color-mode="night"] .security-banner { --security-bg: linear-gradient(135deg, color-mix(in srgb, var(--teal) 24%, var(--surface)), color-mix(in srgb, var(--blue) 22%, var(--surface))); --security-ink: var(--ink); --security-muted: var(--muted); --security-icon-bg: color-mix(in srgb, var(--teal) 24%, var(--surface)); --security-icon-border: var(--line-strong); --security-button-bg: var(--rail); }
[data-color-mode="night"] .theme-card,
[data-color-mode="night"] .settings-section,
[data-color-mode="night"] .panel,
[data-color-mode="night"] .modal,
[data-color-mode="night"] .style-drawer { color: var(--ink); }
[data-color-mode="night"] .sync-label.sync-success { color: #cbeab9; background: #29432a; }
[data-color-mode="night"] .sync-label.sync-error { color: #ffd1d5; background: #532d35; }
[data-color-mode="night"] .sync-label.sync-idle { color: var(--muted); background: var(--surface-soft); }
[data-color-mode="night"] .sync-label.sync-syncing { color: #ffe6a5; background: #51432a; }

:root {
  --control-accent: #ff7185;
  --control-bg: #eeefe9;
  --control-active-bg: #ffd4dc;
  --control-ink: #1d1e20;
  --api-accent: #aebdff;
  --api-module-bg: #f2edf4;
  --api-header-bg: #eee6f0;
  --api-empty-bg: #f8f4f9;
  --api-row-bg: #fffdfd;
}
[data-theme="dark"] {
  --control-accent: #ff8798;
  --control-bg: #2c2f31;
  --control-active-bg: #53343d;
  --control-ink: #f4f3ef;
  --api-accent: #607ab8;
  --api-module-bg: #24282e;
  --api-header-bg: #20242a;
  --api-empty-bg: #292e34;
  --api-row-bg: #2d3238;
}
[data-theme="duna"] {
  --control-accent: #e8875d;
  --control-bg: #eadbca;
  --control-active-bg: #f5c2a9;
  --control-ink: #352c28;
  --api-accent: #9fc6bd;
  --api-module-bg: #f3e7dc;
  --api-header-bg: #f0e1d4;
  --api-empty-bg: #faf1e9;
  --api-row-bg: #fffaf5;
}
[data-theme="greptile"] {
  --control-accent: #b7ff4a;
  --control-bg: #202d24;
  --control-active-bg: #3b4a27;
  --control-ink: #eff7e9;
  --api-accent: #79d7ca;
  --api-module-bg: #17231b;
  --api-header-bg: #142019;
  --api-empty-bg: #1d2c23;
  --api-row-bg: #203027;
}
[data-theme="hosier"] {
  --control-accent: #e8a0a7;
  --control-bg: #59433a;
  --control-active-bg: #6a4348;
  --control-ink: #f9eee2;
  --api-accent: #9bc9c0;
  --api-module-bg: #4c3933;
  --api-header-bg: #46332e;
  --api-empty-bg: #554039;
  --api-row-bg: #59443b;
}
[data-theme="liquid-glass"] {
  --control-accent: #ff7185;
  --control-bg: rgba(255,255,255,.38);
  --control-active-bg: rgba(255,113,133,.7);
  --control-ink: #263342;
  --api-accent: #c3b4ef;
  --api-module-bg: rgba(247,244,252,.54);
  --api-header-bg: rgba(255,255,255,.56);
  --api-empty-bg: rgba(255,255,255,.34);
  --api-row-bg: rgba(255,255,255,.46);
  --metric-ink: #263342;
  --metric-muted: rgba(38,51,66,.7);
  --tile-ink: #263342;
  --tile-muted: rgba(38,51,66,.7);
}

.vault-category-tabs button {
  color: color-mix(in srgb, var(--control-ink) 62%, transparent);
  border-color: color-mix(in srgb, var(--control-accent) 22%, var(--line));
  background: var(--control-bg);
  transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s var(--ease-out-expo), box-shadow .25s ease;
}
.vault-category-tabs button span { color: color-mix(in srgb, var(--control-ink) 44%, transparent); }
.vault-category-tabs button:hover {
  color: var(--control-ink);
  border-color: color-mix(in srgb, var(--control-accent) 58%, var(--line));
  background: color-mix(in srgb, var(--control-accent) 12%, var(--control-bg));
  box-shadow: 0 5px 12px color-mix(in srgb, var(--control-accent) 14%, transparent);
}
.vault-category-tabs button:active:not(:disabled) { transform: translateY(1px) scale(.96); }
.vault-category-tabs button.is-active {
  color: var(--control-ink);
  border-color: color-mix(in srgb, var(--control-accent) 68%, var(--line));
  background: var(--control-active-bg);
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 42%, transparent), 0 5px 14px color-mix(in srgb, var(--control-accent) 17%, transparent);
}
.vault-category-tabs button.is-active span { color: var(--control-ink); }

.api-module {
  border-color: color-mix(in srgb, var(--api-accent) 54%, var(--line));
  background: var(--api-module-bg);
}
.api-module .vault-module-heading {
  border-bottom-color: color-mix(in srgb, var(--api-accent) 35%, var(--line));
  background: var(--api-header-bg);
}
.api-module .vault-empty { background: var(--api-empty-bg); }
.api-module .button-secondary,
.api-row-actions .icon-button {
  color: var(--control-ink);
  border-color: color-mix(in srgb, var(--api-accent) 42%, var(--line));
  background: color-mix(in srgb, var(--api-accent) 12%, var(--surface));
}
.api-module .button-secondary:hover,
.api-row-actions .icon-button:hover {
  color: var(--control-ink);
  border-color: color-mix(in srgb, var(--api-accent) 68%, var(--line));
  background: color-mix(in srgb, var(--api-accent) 24%, var(--surface));
  box-shadow: 0 6px 15px color-mix(in srgb, var(--api-accent) 18%, transparent);
}
.api-module .button-secondary:active:not(:disabled),
.api-row-actions .icon-button:active:not(:disabled) { transform: translateY(1px) scale(.95); }
.api-row {
  border-color: color-mix(in srgb, var(--api-accent) 42%, var(--line));
  background: var(--api-row-bg);
}
.api-platform-mark {
  color: var(--control-ink);
  background: color-mix(in srgb, var(--api-accent) 52%, var(--surface));
}
.api-value {
  border-color: color-mix(in srgb, var(--api-accent) 28%, var(--line));
  background: color-mix(in srgb, var(--api-row-bg) 64%, var(--surface));
}
.api-value .icon-button { color: var(--control-ink); }
.api-value .icon-button:hover { color: var(--control-ink); background: color-mix(in srgb, var(--api-accent) 18%, var(--surface-soft)); }

.modal .form-field > span { color: var(--muted); font-size: 11px; font-weight: 650; }
.settings-section .section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.metric-card,
.metric-card.spending,
.metric-card.available { color: var(--metric-ink); }
.metric-card .metric-top .label,
.metric-card .metric-foot { color: var(--metric-muted); }
.module-card { color: var(--tile-ink); }
.module-card .icon,
.module-card-foot { color: var(--tile-muted); }

/* Shared approved design-style detail layout. */
.futurism-drawer { width: min(940px, 94vw); top: 24px; bottom: 24px; max-height: none; padding: 22px 24px 0; }
.futurism-drawer .style-drawer-header { align-items: center; padding-bottom: 18px; }
.futurism-drawer .style-drawer-header h2 { font-size: 28px; margin-top: 5px; }
.futurism-content { min-height: 0; overflow-y: auto; scrollbar-gutter: stable; padding: 22px 4px 28px 0; display: flex; flex-direction: column; gap: 26px; }
.futurism-image-field { position: relative; overflow: hidden; border-radius: calc(var(--radius) * .65); background: var(--surface-soft); }
.futurism-image-field > img { width: 100%; aspect-ratio: 1200 / 680; object-fit: contain; display: block; }
.futurism-image-edit { position: absolute; bottom: 12px; right: 12px; display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 8px; color: #effff9; background: rgba(12,25,32,.86); border: 1px solid rgba(183,230,220,.35); font-size: 11px; }
.futurism-image-edit:hover { background: #244940; }
.futurism-image-actions { display: flex; gap: 8px; padding: 10px; background: var(--surface-soft); }
.futurism-image-actions label { cursor: pointer; }
.futurism-image-actions input { display: none; }
.futurism-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.futurism-caption span { color: var(--muted-2); }
.futurism-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.futurism-fields > :last-child { grid-column: 1 / -1; }
.futurism-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.futurism-heading h3, .futurism-heading h4 { margin: 0 auto 0 0; color: var(--ink); font-weight: 650; }
.futurism-heading h3 { font-size: 17px; }
.futurism-heading h4 { font-size: 14px; }
.futurism-heading > span { color: var(--muted); font-size: 11px; }
.futurism-section > p, .futurism-scene-copy p { margin: 0; color: var(--muted); line-height: 1.75; font-size: 13px; white-space: pre-wrap; }
.futurism-scenes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.futurism-scene:first-child { grid-column: 1 / -1; }
.futurism-scene { overflow: hidden; border: 1px solid var(--line); border-radius: calc(var(--radius) * .65); background: var(--surface-soft); }
.futurism-scene .futurism-image-field { border-radius: 0; }
.futurism-scene-copy { padding: 16px; display: grid; gap: 12px; }
.futurism-scene-copy .futurism-heading { margin: 0; }
.futurism-content textarea { min-height: 100px; padding: 12px; line-height: 1.65; }
.futurism-content .style-ai-prompt { max-height: none; }
.futurism-form-footer { position: sticky; bottom: -28px; margin-bottom: -28px; padding: 16px 0; background: var(--surface); border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; z-index: 3; }
.futurism-form-footer > span { margin-right: auto; font-size: 11px; color: var(--muted); }
[data-theme="liquid-glass"] .futurism-scene { background: color-mix(in srgb, var(--surface) 76%, transparent); border-color: var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
[data-theme="duna"] .futurism-heading h3 { font-family: Georgia, serif; }
[data-theme="greptile"] .futurism-scene { border-radius: 4px; }
@media (max-width: 760px) {
  .futurism-drawer { top: auto; bottom: 0; width: 100%; max-height: calc(100dvh - 12px); padding: 22px 16px 0; }
  .futurism-content { gap: 22px; }
  .futurism-scenes, .futurism-fields { grid-template-columns: minmax(0,1fr); }
  .futurism-form-footer { flex-wrap: wrap; }
  .futurism-form-footer > span { width: 100%; }
  .futurism-caption { flex-wrap: wrap; }
}
.futurism-pages .futurism-scene-copy h4 { margin: 0; font-size: 15px; color: var(--ink); }
.futurism-pages .style-preview { margin: 0; border: 0; border-radius: 0; min-height: 260px; }
/* Component and motion resources show their working result in the catalog. */
.effect-catalog-card { grid-template-rows: auto minmax(230px,1fr) auto; gap: 18px; padding: 22px; }
.effect-catalog-card:hover, [data-theme="liquid-glass"] .effect-catalog-card:hover { transform: none; }
.effect-card-title { padding: 0; background: none; color: var(--ink); text-align: left; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.effect-card-title h3 { font-size: 18px; margin: 0; letter-spacing: -.03em; }
.effect-card-title > span { font-size: 10px; color: var(--control-accent); }
.effect-catalog-card header p { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 12px 0 0; }
.effect-detail-link { background: none; padding: 5px 0; color: var(--ink); display: flex; align-items: center; gap: 6px; font-size: 11px; }
.resource-effect { min-width: 0; min-height: 230px; padding: 20px; border: 1px solid var(--line); border-radius: calc(var(--radius) * .65); background: var(--surface-soft); display: grid; align-items: center; }
.effect-stage { min-width: 0; width: 100%; max-width: 380px; margin: auto; }
.effect-stage > small { color: var(--control-accent); font-size: 10px; }
.effect-stage h4 { margin: 6px 0 18px; color: var(--ink); font-size: 16px; }
.resource-effect button, .resource-effect input { font-family: inherit; }
.effect-segment { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: var(--chip); padding: 4px; border: 1px solid var(--line); border-radius: 12px; isolation: isolate; }
.effect-segment > i { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-soft); transition: transform .25s cubic-bezier(.2,.8,.2,1); z-index: -1; }
.effect-segment button { min-width: 0; height: 34px; background: none; color: var(--muted); font-size: 11px; }
.effect-segment button[aria-pressed="true"] { color: var(--ink); font-weight: 700; }
.effect-tab-content { min-height: 70px; display: flex; gap: 12px; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; padding-top: 15px; animation: effect-content-in .2s ease both; }
.effect-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); transition: box-shadow .16s ease,border-color .16s ease; }
.effect-search:focus-within { border-color: var(--control-accent); box-shadow: 0 0 0 3px color-mix(in srgb,var(--control-accent) 18%,transparent); }
.effect-search input { min-width: 0; width: 100%; background: none; border: 0; color: var(--ink); font-size: 12px; outline: none; }
.effect-search-results { min-height: 98px; padding-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.effect-search-results > span { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; padding: 5px 8px; }
.effect-shortcut { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: 14px; text-align: left; transition: transform .18s ease,box-shadow .18s ease; }
.effect-shortcut:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.effect-shortcut-icon { padding: 10px; border-radius: 11px; background: color-mix(in srgb,var(--control-accent) 18%,var(--surface)); }
.effect-shortcut strong, .effect-shortcut small { display: block; }
.effect-shortcut strong { font-size: 12px; }
.effect-shortcut small { margin-top: 6px; color: var(--muted); font-size: 10px; }
.effect-shortcut > .icon { margin-left: auto; }
.effect-shortcut-result { font-size: 11px; color: var(--muted); margin-top: 15px; min-height: 28px; }
.effect-comet { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 100px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; font-size: 12px; }
.effect-comet svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.effect-comet rect { fill: none; stroke: var(--control-accent); stroke-width: 2; stroke-dasharray: 16 84; animation: effect-comet-travel 3s linear infinite; vector-effect: non-scaling-stroke; }
.effect-replay { background: none; display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 10px; padding: 8px 0 0; }
.effect-expand { min-height: 130px; }
.effect-expand-trigger { display: flex; gap: 7px; align-items: center; padding: 10px 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; }
.effect-expand-body { margin-top: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; animation: effect-content-in .24s ease both; }
.effect-expand-body strong { font-size: 12px; color: var(--ink); }
.effect-expand-body p { font-size: 11px; color: var(--muted); line-height: 1.6; margin-bottom: 0; }
.effect-mini-lines { display: grid; gap: 5px; width: 60px; }
.effect-mini-lines i { height: 4px; background: var(--line-strong); border-radius: 3px; }
.effect-mini-lines i:nth-child(2) { width: 80%; }
.effect-mini-lines i:last-child { width: 60%; }
.effect-media { min-width: 0; overflow: hidden; border-radius: calc(var(--radius)*.65); background: var(--surface-soft); display: grid; place-items: center; }
.effect-media img, .effect-media video { width: 100%; height: 230px; object-fit: contain; display: block; }
.effect-media.is-large img, .effect-media.is-large video { height: auto; max-height: 520px; }
.effect-empty { display: grid; justify-items: center; gap: 12px; color: var(--muted); font-size: 11px; text-align: center; }
.effect-empty strong { color: var(--ink); }
.effect-drawer { width: min(860px,94vw); top: 24px; bottom: 24px; padding-bottom: 0; max-height: none; }
.effect-detail-content { min-height: 0; overflow-y: auto; scrollbar-gutter: stable; display: flex; flex-direction: column; gap: 26px; padding: 22px 4px 26px 0; }
.effect-detail-content .resource-effect.is-large { min-height: 330px; padding: 38px; }
.effect-detail-content h3 { color: var(--ink); font-size: 17px; margin: 0 0 12px; }
.effect-detail-content section > p { color: var(--muted); font-size: 13px; line-height: 1.8; white-space: pre-wrap; margin: 0; }
.effect-prompt-heading { display: flex; align-items: center; justify-content: space-between; }
.effect-prompt-heading h3 { margin: 0; }
.effect-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.effect-upload input { display: none; }
.effect-upload label { cursor: pointer; }
.effect-upload small { color: var(--muted); font-size: 10px; }
.effect-detail-content textarea { padding: 12px; min-height: 108px; line-height: 1.7; }
.effect-form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: sticky; bottom: -26px; margin-bottom: -26px; background: var(--surface); border-top: 1px solid var(--line); padding: 16px 0; z-index: 2; }
.effect-form-footer > span { margin-right: auto; font-size: 10px; color: var(--muted); }
[data-theme="liquid-glass"] .effect-segment, [data-theme="liquid-glass"] .effect-shortcut { background: color-mix(in srgb,var(--surface) 80%,transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
[data-theme="greptile"] .resource-effect, [data-theme="greptile"] .effect-segment, [data-theme="greptile"] .effect-shortcut { border-radius: 4px; }
@keyframes effect-content-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes effect-comet-travel { to { stroke-dashoffset: -100; } }
@media (max-width:1100px) { .style-catalog-grid:has(.effect-catalog-card) { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) { .style-catalog-grid:has(.effect-catalog-card) { grid-template-columns: minmax(0,1fr); }.effect-drawer { top: auto; bottom: 0; width:100%; max-height:calc(100dvh - 12px); padding:22px 16px 0; }.effect-catalog-card { padding:18px; }.effect-detail-content .resource-effect.is-large { padding:22px; }.effect-form-footer > span { width:100%; } }
@media (prefers-reduced-motion:reduce) { .effect-comet rect { animation:none; }.effect-segment > i { transition:none; } }
[data-theme="liquid-glass"] .effect-catalog-card, [data-theme="liquid-glass"] .effect-drawer { background: var(--surface); color: var(--ink); border-color: var(--line); }
.resource-effect.is-paused .effect-comet rect { animation-play-state: paused; }

/* Three distinct surfaces: resource card, tinted demo stage, raised controls. */
.effect-catalog-card, .effect-drawer {
  --effect-tint: var(--blue);
  --effect-stage-bg: color-mix(in srgb, var(--effect-tint) 24%, var(--surface-soft));
  --effect-stage-line: color-mix(in srgb, var(--effect-tint) 45%, var(--line-strong));
}
.resource-card-motion, .effect-drawer:has([data-effect^="motion-"]) { --effect-tint: var(--teal); }
[data-theme="duna"] .effect-catalog-card, [data-theme="duna"] .effect-drawer { --effect-tint: var(--yellow); }
[data-theme="duna"] .resource-card-motion, [data-theme="duna"] .effect-drawer:has([data-effect^="motion-"]) { --effect-tint: var(--blue); }
[data-theme="greptile"] .effect-catalog-card, [data-theme="greptile"] .effect-drawer { --effect-tint: var(--teal); }
[data-theme="greptile"] .resource-card-motion, [data-theme="greptile"] .effect-drawer:has([data-effect^="motion-"]) { --effect-tint: var(--lime); }
[data-theme="hosier"] .resource-card-motion, [data-theme="hosier"] .effect-drawer:has([data-effect^="motion-"]) { --effect-tint: var(--pink); }
[data-color-mode="night"] .effect-catalog-card, [data-color-mode="night"] .effect-drawer,
[data-theme="greptile"] .effect-catalog-card, [data-theme="greptile"] .effect-drawer,
[data-theme="hosier"] .effect-catalog-card, [data-theme="hosier"] .effect-drawer {
  --effect-stage-bg: color-mix(in srgb, var(--effect-tint) 14%, var(--surface-soft));
  --effect-stage-line: color-mix(in srgb, var(--effect-tint) 30%, var(--line-strong));
}
.effect-catalog-card .resource-effect, .effect-drawer .resource-effect,
.effect-catalog-card .effect-media, .effect-drawer .effect-media {
  background: var(--effect-stage-bg);
  border: 1px solid var(--effect-stage-line);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--surface) 55%, transparent);
}
[data-theme="liquid-glass"] .effect-catalog-card .resource-effect,
[data-theme="liquid-glass"] .effect-drawer .resource-effect {
  background: linear-gradient(145deg, color-mix(in srgb, var(--effect-tint) 30%, var(--surface-soft)), color-mix(in srgb, var(--effect-tint) 16%, var(--surface-soft)));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--surface) 70%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--effect-tint) 20%, transparent);
}
[data-theme="liquid-glass"][data-color-mode="night"] .effect-catalog-card .resource-effect,
[data-theme="liquid-glass"][data-color-mode="night"] .effect-drawer .resource-effect {
  background: linear-gradient(145deg, color-mix(in srgb, var(--effect-tint) 17%, var(--surface-soft)), color-mix(in srgb, var(--effect-tint) 9%, var(--surface-soft)));
}
.effect-catalog-card .effect-segment, .effect-drawer .effect-segment { background: color-mix(in srgb, var(--effect-tint) 10%, var(--surface-soft)); }
.effect-catalog-card .effect-search, .effect-drawer .effect-search,
.effect-catalog-card .effect-shortcut, .effect-drawer .effect-shortcut,
.effect-catalog-card .effect-comet, .effect-drawer .effect-comet,
.effect-catalog-card .effect-expand-trigger, .effect-drawer .effect-expand-trigger,
.effect-catalog-card .effect-expand-body, .effect-drawer .effect-expand-body {
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

/* Liquid Glass resources: pearl shell over a tinted, refractive demo surface. */
[data-theme="liquid-glass"] .effect-catalog-card,
[data-theme="liquid-glass"] .effect-drawer {
  --effect-tint: var(--goal-accent-2);
  background: linear-gradient(132deg, color-mix(in srgb, var(--surface) 88%, white) 0%, color-mix(in srgb, var(--goal-accent-2) 9%, var(--surface)) 48%, color-mix(in srgb, var(--goal-accent-3) 10%, var(--surface)) 100%);
  border: 1px solid color-mix(in srgb, white 64%, var(--line));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 1px 0 0 rgba(255,255,255,.34), 0 12px 30px rgba(75,92,113,.1);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
}
[data-theme="liquid-glass"] .resource-card-motion,
[data-theme="liquid-glass"] .effect-drawer:has([data-effect^="motion-"]) { --effect-tint: var(--goal-accent-3); }
[data-theme="liquid-glass"] .effect-catalog-card .resource-effect,
[data-theme="liquid-glass"] .effect-drawer .resource-effect,
[data-theme="liquid-glass"] .effect-catalog-card .effect-media,
[data-theme="liquid-glass"] .effect-drawer .effect-media {
  background: radial-gradient(ellipse at 8% 0%, rgba(255,255,255,.7), transparent 62%), radial-gradient(ellipse at 96% 90%, color-mix(in srgb, var(--goal-accent-3) 24%, transparent), transparent 72%), linear-gradient(138deg, color-mix(in srgb, var(--effect-tint) 35%, var(--surface-soft)), color-mix(in srgb, var(--effect-tint) 19%, var(--surface-soft)) 55%, color-mix(in srgb, var(--goal-accent-2) 22%, var(--surface-soft)));
  border-color: color-mix(in srgb, var(--effect-tint) 38%, var(--line));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), inset 1px 0 0 rgba(255,255,255,.4), inset 0 -1px 0 color-mix(in srgb, var(--effect-tint) 28%, transparent), 0 6px 18px color-mix(in srgb, var(--effect-tint) 12%, transparent);
}
[data-theme="liquid-glass"][data-color-mode="night"] .effect-catalog-card,
[data-theme="liquid-glass"][data-color-mode="night"] .effect-drawer {
  background: linear-gradient(132deg, color-mix(in srgb, var(--goal-accent-2) 8%, var(--surface)), var(--surface) 48%, color-mix(in srgb, var(--goal-accent-3) 7%, var(--surface)));
  border-color: var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(220,234,255,.18), inset 1px 0 0 rgba(220,234,255,.08), var(--shadow-soft);
}
[data-theme="liquid-glass"][data-color-mode="night"] .effect-catalog-card .resource-effect,
[data-theme="liquid-glass"][data-color-mode="night"] .effect-drawer .resource-effect,
[data-theme="liquid-glass"][data-color-mode="night"] .effect-catalog-card .effect-media,
[data-theme="liquid-glass"][data-color-mode="night"] .effect-drawer .effect-media {
  background: radial-gradient(ellipse at 8% 0%, color-mix(in srgb, var(--effect-tint) 16%, transparent), transparent 65%), radial-gradient(ellipse at 96% 90%, color-mix(in srgb, var(--goal-accent-3) 14%, transparent), transparent 72%), linear-gradient(138deg, color-mix(in srgb, var(--effect-tint) 18%, var(--surface-soft)), color-mix(in srgb, var(--goal-accent-2) 8%, var(--surface-soft)));
  border-color: color-mix(in srgb, var(--effect-tint) 32%, var(--line));
  box-shadow: inset 0 1px 0 rgba(220,234,255,.2), inset 1px 0 0 rgba(220,234,255,.08), 0 6px 18px rgba(0,0,0,.12);
}
@media (prefers-reduced-transparency: reduce) {
  [data-theme="liquid-glass"] .effect-catalog-card, [data-theme="liquid-glass"] .effect-drawer { background: color-mix(in srgb, var(--canvas) 94%, var(--effect-tint)); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
/* Catalog footers retain a single, consistently right-aligned detail action. */
.style-catalog-card > .style-catalog-foot { justify-content: flex-end; }

/* Resource deletion stays separate from everyday editing and needs confirmation. */
.resource-delete-action { border-top: 1px solid var(--line); padding-top: 18px; }
.resource-delete-button { color: var(--danger, #b64b54); }
.resource-delete-confirm { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.resource-delete-confirm strong { color: var(--ink); font-size: 14px; }
.resource-delete-confirm p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.resource-delete-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.futurism-image-field > .style-preview { width: 100%; min-height: 220px; aspect-ratio: 1200 / 680; }
[data-theme="liquid-glass"] .resource-delete-confirm { background: color-mix(in srgb, var(--surface-soft) 85%, transparent); backdrop-filter: blur(18px); }

.resource-style-live-preview { overflow: hidden; border-radius: 11px; }
.resource-style-live-preview > .style-preview { width: 100%; border: 0; border-radius: inherit; }
/* Preview annotations follow each style's own ink, including dark art-deco covers. */
.style-preview .style-preview-eyebrow,
.style-preview > small,
.style-preview > p,
.style-preview .style-preview-lines { color: color-mix(in srgb, currentColor 76%, transparent); }
