/* UI v2 overrides for /ui/* pages only.
 *
 * Use this for your redesign work so you don't accidentally affect the legacy tester UI.
 * This file is loaded after `ui2.css`.
 */

:root {
  /* Example:
  --accent: #7dd3fc;
  --bg: #070810;
  */
}

/* ---------- App appearance presets (Tier 3) ---------- */

:root[data-ui-preset="deco"] {
  --bg: #07060a;
  --panel: rgba(16, 14, 20, 0.78);
  --panel-2: rgba(16, 14, 20, 0.92);
  --chrome: rgba(16, 14, 20, 0.78);
  --chrome-2: rgba(16, 14, 20, 0.92);
  --line: rgba(255, 219, 161, 0.12);
  --text: #fff7ed;
  --muted: rgba(255, 247, 237, 0.65);
  --accent: #fbbf24;
  --ui-bg-pattern:
    radial-gradient(1100px 900px at 12% 10%, rgba(251, 191, 36, 0.10), transparent 60%),
    radial-gradient(1000px 700px at 85% 0%, rgba(125, 211, 252, 0.06), transparent 60%),
    repeating-linear-gradient(135deg, rgba(251, 191, 36, 0.06) 0 1px, transparent 1px 16px);
}

:root[data-ui-preset="neon-grid"] {
  --bg: #04040a;
  --panel: rgba(10, 10, 24, 0.78);
  --panel-2: rgba(10, 10, 24, 0.92);
  --chrome: rgba(10, 10, 24, 0.78);
  --chrome-2: rgba(10, 10, 24, 0.92);
  --line: rgba(129, 140, 248, 0.16);
  --text: #f5f3ff;
  --muted: rgba(245, 243, 255, 0.64);
  --accent: #22d3ee;
  --ui-bg-pattern:
    radial-gradient(900px 700px at 20% 10%, rgba(34, 211, 238, 0.12), transparent 58%),
    radial-gradient(900px 700px at 80% 0%, rgba(167, 139, 250, 0.10), transparent 58%),
    linear-gradient(rgba(129, 140, 248, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 140, 248, 0.09) 1px, transparent 1px);
}

:root[data-ui-preset="ocean"] {
  --bg: #06101a;
  --panel: rgba(8, 20, 34, 0.74);
  --panel-2: rgba(8, 20, 34, 0.92);
  --chrome: rgba(8, 20, 34, 0.74);
  --chrome-2: rgba(8, 20, 34, 0.92);
  --line: rgba(56, 189, 248, 0.14);
  --text: #f0f9ff;
  --muted: rgba(224, 242, 254, 0.66);
  --accent: #38bdf8;
  --ui-bg-pattern:
    radial-gradient(1200px 700px at 15% 0%, rgba(56, 189, 248, 0.14), transparent 65%),
    radial-gradient(1100px 800px at 90% 10%, rgba(45, 212, 191, 0.10), transparent 65%),
    radial-gradient(1000px 700px at 50% 100%, rgba(59, 130, 246, 0.07), transparent 65%);
}

:root[data-ui-preset="sakura"] {
  --bg: #0c0612;
  --panel: rgba(20, 10, 28, 0.74);
  --panel-2: rgba(20, 10, 28, 0.92);
  --chrome: rgba(20, 10, 28, 0.74);
  --chrome-2: rgba(20, 10, 28, 0.92);
  --line: rgba(244, 114, 182, 0.14);
  --text: #fff1f2;
  --muted: rgba(255, 241, 242, 0.62);
  --accent: #fb7185;
  --ui-bg-pattern:
    radial-gradient(900px 700px at 12% 8%, rgba(251, 113, 133, 0.14), transparent 60%),
    radial-gradient(1000px 800px at 85% 0%, rgba(167, 139, 250, 0.10), transparent 62%),
    radial-gradient(1100px 900px at 50% 100%, rgba(244, 114, 182, 0.08), transparent 68%);
}

:root[data-ui-preset="forest"] {
  --bg: #050b07;
  --panel: rgba(10, 22, 14, 0.74);
  --panel-2: rgba(10, 22, 14, 0.92);
  --chrome: rgba(10, 22, 14, 0.74);
  --chrome-2: rgba(10, 22, 14, 0.92);
  --line: rgba(34, 197, 94, 0.14);
  --text: #f0fdf4;
  --muted: rgba(220, 252, 231, 0.64);
  --accent: #34d399;
  --ui-bg-pattern:
    radial-gradient(1100px 780px at 12% 0%, rgba(34, 197, 94, 0.12), transparent 62%),
    radial-gradient(1000px 740px at 85% 0%, rgba(16, 185, 129, 0.08), transparent 62%),
    repeating-linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0 1px, transparent 1px 20px);
}

:root[data-ui-preset="mono"] {
  --bg: #070810;
  --panel: rgba(12, 14, 24, 0.74);
  --panel-2: rgba(12, 14, 24, 0.92);
  --chrome: rgba(12, 14, 24, 0.74);
  --chrome-2: rgba(12, 14, 24, 0.92);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: rgba(248, 250, 252, 0.64);
  --accent: #7dd3fc;
  --ui-bg-pattern:
    radial-gradient(1000px 760px at 18% 0%, rgba(148, 163, 184, 0.10), transparent 62%),
    radial-gradient(1000px 760px at 84% 0%, rgba(125, 211, 252, 0.08), transparent 62%),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.04) 0 1px, transparent 1px 22px);
}

:root[data-ui-preset="sunset"] {
  --bg: #090616;
  --panel: rgba(18, 12, 38, 0.72);
  --panel-2: rgba(18, 12, 38, 0.92);
  --chrome: rgba(18, 12, 38, 0.72);
  --chrome-2: rgba(18, 12, 38, 0.92);
  --line: rgba(249, 115, 22, 0.16);
  --text: #fff7ed;
  --muted: rgba(255, 237, 213, 0.65);
  --accent: #fb7185;
  --ui-bg-pattern:
    radial-gradient(900px 700px at 20% 10%, rgba(236, 72, 153, 0.16), transparent 62%),
    radial-gradient(1000px 800px at 85% 10%, rgba(249, 115, 22, 0.14), transparent 62%),
    radial-gradient(1000px 900px at 50% 110%, rgba(99, 102, 241, 0.10), transparent 60%);
}

:root[data-ui-preset="paper"] {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-2: rgba(255, 255, 255, 0.96);
  --chrome: rgba(255, 255, 255, 0.72);
  --chrome-2: rgba(255, 255, 255, 0.66);
  --line: rgba(2, 6, 23, 0.10);
  --text: #0b1220;
  --muted: rgba(2, 6, 23, 0.68);
  --accent: #2563eb;
  --ui-bg-pattern:
    radial-gradient(900px 650px at 20% 0%, rgba(37, 99, 235, 0.10), transparent 62%),
    radial-gradient(900px 650px at 80% 0%, rgba(22, 163, 74, 0.08), transparent 62%),
    repeating-linear-gradient(0deg, rgba(2, 6, 23, 0.035) 0 1px, transparent 1px 22px);
}

:root[data-ui-preset="ice"] {
  --bg: #070c12;
  --panel: rgba(12, 18, 28, 0.58);
  --panel-2: rgba(12, 18, 28, 0.84);
  --chrome: rgba(12, 18, 28, 0.58);
  --chrome-2: rgba(12, 18, 28, 0.84);
  --line: rgba(125, 211, 252, 0.14);
  --text: #f0f9ff;
  --muted: rgba(224, 242, 254, 0.62);
  --accent: #a5f3fc;
  --ui-bg-pattern:
    radial-gradient(1100px 800px at 18% 0%, rgba(165, 243, 252, 0.12), transparent 62%),
    radial-gradient(1000px 700px at 85% 0%, rgba(96, 165, 250, 0.10), transparent 62%),
    repeating-linear-gradient(135deg, rgba(165, 243, 252, 0.06) 0 1px, transparent 1px 18px);
}

:root[data-ui-preset="aurora"] {
  --bg: #030c10;
  --panel: rgba(6, 18, 22, 0.72);
  --panel-2: rgba(6, 18, 22, 0.92);
  --chrome: rgba(6, 18, 22, 0.72);
  --chrome-2: rgba(6, 18, 22, 0.92);
  --line: rgba(52, 211, 153, 0.16);
  --text: #ecfeff;
  --muted: rgba(236, 254, 255, 0.64);
  --accent: #34d399;
  --ui-bg-pattern:
    radial-gradient(1000px 760px at 15% 0%, rgba(52, 211, 153, 0.14), transparent 62%),
    radial-gradient(1100px 900px at 85% 0%, rgba(167, 139, 250, 0.12), transparent 64%),
    radial-gradient(1100px 900px at 50% 110%, rgba(56, 189, 248, 0.08), transparent 62%),
    repeating-linear-gradient(165deg, rgba(52, 211, 153, 0.06) 0 1px, transparent 1px 22px);
}

:root[data-ui-preset="cloud"] {
  color-scheme: light;
  --bg: #f6f8ff;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-2: rgba(255, 255, 255, 0.96);
  --chrome: rgba(255, 255, 255, 0.72);
  --chrome-2: rgba(255, 255, 255, 0.66);
  --line: rgba(2, 6, 23, 0.10);
  --text: #0b1220;
  --muted: rgba(2, 6, 23, 0.66);
  --accent: #0ea5e9;
  --ui-bg-pattern:
    radial-gradient(1000px 720px at 15% 0%, rgba(14, 165, 233, 0.10), transparent 62%),
    radial-gradient(950px 720px at 85% 0%, rgba(99, 102, 241, 0.10), transparent 62%),
    repeating-linear-gradient(0deg, rgba(2, 6, 23, 0.030) 0 1px, transparent 1px 22px);
}

:root[data-ui-preset="linen"] {
  color-scheme: light;
  --bg: #fff7ed;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-2: rgba(255, 255, 255, 0.96);
  --chrome: rgba(255, 255, 255, 0.72);
  --chrome-2: rgba(255, 255, 255, 0.66);
  --line: rgba(120, 53, 15, 0.14);
  --text: #1f1300;
  --muted: rgba(31, 19, 0, 0.62);
  --accent: #ea580c;
  --ui-bg-pattern:
    radial-gradient(980px 700px at 18% 0%, rgba(234, 88, 12, 0.12), transparent 62%),
    radial-gradient(980px 700px at 86% 0%, rgba(22, 163, 74, 0.08), transparent 62%),
    repeating-linear-gradient(90deg, rgba(120, 53, 15, 0.045) 0 1px, transparent 1px 26px);
}

:root[data-ui-preset="noir"] {
  --bg: #050607;
  --panel: rgba(10, 12, 14, 0.74);
  --panel-2: rgba(10, 12, 14, 0.92);
  --chrome: rgba(10, 12, 14, 0.74);
  --chrome-2: rgba(10, 12, 14, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --muted: rgba(244, 244, 245, 0.64);
  --accent: #a3e635;
  --ui-bg-pattern:
    radial-gradient(900px 650px at 18% 0%, rgba(163, 230, 53, 0.08), transparent 62%),
    radial-gradient(1000px 760px at 82% 0%, rgba(56, 189, 248, 0.08), transparent 62%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 22px);
}

:root[data-ui-preset="ruby"] {
  --bg: #120408;
  --panel: rgba(24, 7, 12, 0.78);
  --panel-2: rgba(24, 7, 12, 0.92);
  --chrome: rgba(24, 7, 12, 0.78);
  --chrome-2: rgba(24, 7, 12, 0.92);
  --line: rgba(251, 113, 133, 0.14);
  --text: #fff1f2;
  --muted: rgba(255, 241, 242, 0.66);
  --accent: #fb7185;
  --ui-bg-pattern:
    radial-gradient(1050px 760px at 15% 0%, rgba(251, 113, 133, 0.14), transparent 62%),
    radial-gradient(1050px 760px at 85% 0%, rgba(251, 191, 36, 0.08), transparent 62%),
    repeating-linear-gradient(160deg, rgba(251, 113, 133, 0.06) 0 1px, transparent 1px 22px);
}

:root[data-ui-preset="custom"] {
  /* Defaults; real values are injected via /theme/custom.css. */
  --bg: #07060a;
  --panel: rgba(16, 14, 20, 0.78);
  --panel-2: rgba(16, 14, 20, 0.92);
  --chrome: rgba(16, 14, 20, 0.78);
  --chrome-2: rgba(16, 14, 20, 0.92);
  --line: rgba(255, 255, 255, 0.10);
  --text: #f4f4f5;
  --muted: rgba(244, 244, 245, 0.68);
  --accent: #7dd3fc;
}

pre.debug {
  margin: 10px 0 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  overflow: auto;
  font-family: var(--mono);
  font-size: 12px;
}

/* ---------- Small UI helpers used by the app panels ---------- */

.big-number {
  margin-top: 10px;
  font-size: 44px;
  font-weight: 820;
  letter-spacing: -0.02em;
  line-height: 1.0;
}

.theme-preview {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 12px 12px;
  background: rgba(0, 0, 0, 0.16);
}

:root[data-theme="light"] .theme-preview {
  background: rgba(2, 6, 23, 0.03);
}

.theme-preview .title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-preview .sample {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 750;
}

.theme-preview[data-font="system"] .sample {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
.theme-preview[data-font="serif"] .sample {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}
.theme-preview[data-font="mono"] .sample {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.theme-preview[data-font="rounded"] .sample {
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Trebuchet MS", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
.theme-preview[data-font="condensed"] .sample {
  font-family: "Segoe UI", "Arial Narrow", Arial, ui-sans-serif, system-ui, -apple-system, Roboto, Helvetica;
}

/* ---------- Store theme preview (mini website) ---------- */

.store-theme-preview {
  --tp-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --tp-bg: #07060a;
  --tp-surface: rgba(16, 14, 20, 0.78);
  --tp-surface2: rgba(16, 14, 20, 0.92);
  --tp-line: rgba(255, 219, 161, 0.12);
  --tp-text: #fff7ed;
  --tp-muted: rgba(255, 247, 237, 0.65);
  --tp-accent: #fbbf24;
}

.store-theme-preview[data-font="system"] {
  --tp-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
.store-theme-preview[data-font="serif"] {
  --tp-font: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}
.store-theme-preview[data-font="mono"] {
  --tp-font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.store-theme-preview[data-font="rounded"] {
  --tp-font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Trebuchet MS", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
.store-theme-preview[data-font="condensed"] {
  --tp-font: "Segoe UI", "Arial Narrow", Arial, ui-sans-serif, system-ui, -apple-system, Roboto, Helvetica;
}

.store-theme-preview .tp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.store-theme-preview .tp-swatches {
  display: flex;
  gap: 6px;
  align-items: center;
}

.store-theme-preview .tp-swatch {
  width: 14px;
  height: 14px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.20);
}

.store-theme-preview .tp-swatch.bg {
  background: var(--tp-bg);
}
.store-theme-preview .tp-swatch.surface {
  background: var(--tp-surface2);
}
.store-theme-preview .tp-swatch.accent {
  background: var(--tp-accent);
}

.store-theme-preview .tp-mini {
  margin-top: 10px;
  border: 1px solid var(--tp-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--tp-bg);
  color: var(--tp-text);
  font-family: var(--tp-font);
  box-shadow: 0 14px 60px rgba(0, 0, 0, 0.26);
}

.store-theme-preview .tp-topbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  background: color-mix(in srgb, var(--tp-surface2) 72%, transparent);
  border-bottom: 1px solid var(--tp-line);
}

.store-theme-preview .tp-brand {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.store-theme-preview .tp-logo {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid var(--tp-line);
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--tp-accent) 18%, transparent);
  color: var(--tp-text);
  flex: 0 0 auto;
}

.store-theme-preview .tp-logo-letter {
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
}

.store-theme-preview .tp-name {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-theme-preview .tp-top-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
}

.store-theme-preview .tp-chip {
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--tp-line);
  color: var(--tp-muted);
  font-size: 11px;
  background: color-mix(in srgb, var(--tp-surface2) 70%, transparent);
}

.store-theme-preview .tp-hero {
  padding: 12px 10px 12px 10px;
  border-bottom: 1px solid var(--tp-line);
  background: color-mix(in srgb, var(--tp-surface) 55%, transparent);
}

.store-theme-preview .tp-kicker {
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--tp-muted);
  font-weight: 700;
}

.store-theme-preview .tp-title {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.store-theme-preview .tp-sub {
  margin-top: 6px;
  font-size: 11px;
  color: var(--tp-muted);
}

.store-theme-preview .tp-cta {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.store-theme-preview .tp-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--tp-line);
  background: color-mix(in srgb, var(--tp-surface2) 70%, transparent);
  font-size: 11px;
  color: var(--tp-text);
}

.store-theme-preview .tp-btn.primary {
  border-color: color-mix(in srgb, var(--tp-accent) 50%, var(--tp-line));
  background: color-mix(in srgb, var(--tp-accent) 22%, transparent);
}

.store-theme-preview .tp-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 10px 10px;
}

.store-theme-preview .tp-filters {
  display: none;
  gap: 6px;
  align-content: start;
  padding: 8px 8px;
  border: 1px solid var(--tp-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--tp-surface2) 70%, transparent);
}

.store-theme-preview .tp-filters-title {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: -0.01em;
}

.store-theme-preview .tp-field {
  height: 10px;
  border-radius: 7px;
  border: 1px solid var(--tp-line);
  background: color-mix(in srgb, var(--tp-surface) 65%, transparent);
}

.store-theme-preview .tp-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.store-theme-preview .tp-card {
  border: 1px solid var(--tp-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--tp-surface) 78%, transparent);
  overflow: hidden;
  display: grid;
  gap: 8px;
}

.store-theme-preview .tp-card-img {
  height: 46px;
  background:
    radial-gradient(140px 70px at 25% 30%, color-mix(in srgb, var(--tp-accent) 18%, transparent), transparent 68%),
    color-mix(in srgb, var(--tp-surface2) 72%, transparent);
}

.store-theme-preview .tp-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}

.store-theme-preview .tp-card-name {
  font-size: 11px;
  font-weight: 850;
}

.store-theme-preview .tp-card-price {
  font-size: 11px;
  color: var(--tp-muted);
}

.store-theme-preview .tp-card-meta {
  padding: 0 8px 10px 8px;
  font-size: 10px;
  color: var(--tp-muted);
}

.store-theme-preview .tp-support {
  padding: 10px 10px;
  border-top: 1px solid var(--tp-line);
  background: color-mix(in srgb, var(--tp-surface2) 72%, transparent);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.store-theme-preview .tp-support-title {
  font-weight: 900;
  font-size: 11px;
}

.store-theme-preview .tp-support-line {
  font-size: 11px;
  color: var(--tp-muted);
}

/* Layout hints inside the preview */
.store-theme-preview[data-sf-layout="catalog"] .tp-body,
.store-theme-preview[data-sf-layout="collection"] .tp-body,
.store-theme-preview[data-sf-layout="sidebar"] .tp-body {
  grid-template-columns: 132px 1fr;
  align-items: start;
}

.store-theme-preview[data-sf-layout="catalog"] .tp-filters,
.store-theme-preview[data-sf-layout="collection"] .tp-filters,
.store-theme-preview[data-sf-layout="sidebar"] .tp-filters {
  display: grid;
}

.store-theme-preview[data-sf-layout="collection"] .tp-products {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.store-theme-preview[data-sf-layout="creator"] .tp-products {
  grid-template-columns: 1fr;
}

.store-theme-preview[data-sf-layout="creator"] .tp-card {
  grid-template-columns: 62px 1fr;
  grid-template-rows: 1fr;
  align-items: stretch;
}

.store-theme-preview[data-sf-layout="creator"] .tp-card-img {
  height: auto;
}

.store-theme-preview[data-sf-layout="hero"] .tp-top-actions {
  display: none;
}

.store-theme-preview[data-sf-layout="hero"] .tp-hero {
  text-align: center;
}

.store-theme-preview[data-sf-layout="hero"] .tp-cta {
  justify-content: center;
}

.store-theme-preview[data-sf-layout="hero"] .tp-products {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.store-theme-preview[data-sf-layout="dense"] .tp-hero {
  padding: 10px 10px;
}

.store-theme-preview[data-sf-layout="dense"] .tp-products {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.store-theme-preview[data-sf-layout="dense"] .tp-card-meta {
  display: none;
}

.store-theme-preview[data-sf-layout="featured"] .tp-products {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.store-theme-preview[data-sf-layout="featured"] .tp-card:first-child {
  grid-column: 1 / -1;
  border-color: color-mix(in srgb, var(--tp-accent) 42%, var(--tp-line));
}

.store-theme-preview[data-sf-layout="featured"] .tp-card:first-child .tp-card-img {
  height: 74px;
}

.store-theme-preview[data-sf-layout="masonry"] .tp-products {
  display: block;
  columns: 2 140px;
  column-gap: 8px;
}

.store-theme-preview[data-sf-layout="masonry"] .tp-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 8px 0;
  break-inside: avoid;
}

.store-theme-preview[data-sf-layout="masonry"] .tp-card-img {
  height: 52px;
}

.store-theme-preview[data-sf-layout="masonry"] .tp-card:nth-child(2) .tp-card-img {
  height: 68px;
}

.store-theme-preview[data-sf-layout="masonry"] .tp-card:nth-child(3) .tp-card-img {
  height: 60px;
}

.store-theme-preview[data-sf-layout="showcase"] .tp-products {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(110px, 62%);
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.store-theme-preview[data-sf-layout="showcase"] .tp-card {
  scroll-snap-align: start;
}

.store-theme-preview[data-sf-layout="showcase"] .tp-card-img {
  height: 58px;
}

.store-theme-preview[data-sf-layout="minimal"] .tp-top-actions {
  display: none;
}

.store-theme-preview[data-sf-layout="minimal"] .tp-cta {
  display: none;
}

.store-theme-preview[data-sf-layout="minimal"] .tp-products {
  grid-template-columns: 1fr;
}

.store-theme-preview[data-sf-layout="minimal"] .tp-card {
  grid-template-columns: 62px 1fr;
  grid-template-rows: 1fr;
  align-items: stretch;
}

.store-theme-preview[data-sf-layout="minimal"] .tp-card-img {
  height: auto;
}

.store-theme-preview[data-sf-layout="minimal"] .tp-card-meta {
  display: none;
}

@media (max-width: 720px) {
  .store-theme-preview .tp-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-theme-preview[data-sf-layout="catalog"] .tp-body,
  .store-theme-preview[data-sf-layout="collection"] .tp-body,
  .store-theme-preview[data-sf-layout="sidebar"] .tp-body {
    grid-template-columns: 1fr;
  }

  .store-theme-preview[data-sf-layout="catalog"] .tp-filters,
  .store-theme-preview[data-sf-layout="collection"] .tp-filters,
  .store-theme-preview[data-sf-layout="sidebar"] .tp-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .store-theme-preview[data-sf-layout="collection"] .tp-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-theme-preview[data-sf-layout="dense"] .tp-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .store-theme-preview[data-sf-layout="hero"] .tp-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-theme-preview[data-sf-layout="masonry"] .tp-products {
    columns: 1;
  }

  .store-theme-preview[data-sf-layout="showcase"] .tp-products {
    grid-auto-columns: minmax(170px, 82%);
  }
}

@media (max-width: 420px) {
  .store-theme-preview .tp-products {
    grid-template-columns: 1fr;
  }

  .store-theme-preview[data-sf-layout="dense"] .tp-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Preset palette mapping (storefront-like) */

.store-theme-preview[data-sf-preset="deco"] {
  --tp-bg: #07060a;
  --tp-surface: rgba(16, 14, 20, 0.78);
  --tp-surface2: rgba(16, 14, 20, 0.92);
  --tp-line: rgba(255, 219, 161, 0.12);
  --tp-text: #fff7ed;
  --tp-muted: rgba(255, 247, 237, 0.65);
  --tp-accent: #fbbf24;
}

.store-theme-preview[data-sf-preset="neon-grid"] {
  --tp-bg: #04040a;
  --tp-surface: rgba(10, 10, 24, 0.78);
  --tp-surface2: rgba(10, 10, 24, 0.92);
  --tp-line: rgba(129, 140, 248, 0.16);
  --tp-text: #f5f3ff;
  --tp-muted: rgba(245, 243, 255, 0.64);
  --tp-accent: #22d3ee;
}

.store-theme-preview[data-sf-preset="ocean"] {
  --tp-bg: #06101a;
  --tp-surface: rgba(8, 20, 34, 0.74);
  --tp-surface2: rgba(8, 20, 34, 0.92);
  --tp-line: rgba(56, 189, 248, 0.14);
  --tp-text: #f0f9ff;
  --tp-muted: rgba(224, 242, 254, 0.66);
  --tp-accent: #38bdf8;
}

.store-theme-preview[data-sf-preset="sakura"] {
  --tp-bg: #0c0612;
  --tp-surface: rgba(20, 10, 28, 0.74);
  --tp-surface2: rgba(20, 10, 28, 0.92);
  --tp-line: rgba(244, 114, 182, 0.14);
  --tp-text: #fff1f2;
  --tp-muted: rgba(255, 241, 242, 0.62);
  --tp-accent: #fb7185;
}

.store-theme-preview[data-sf-preset="forest"] {
  --tp-bg: #050e0b;
  --tp-surface: rgba(8, 20, 14, 0.74);
  --tp-surface2: rgba(8, 20, 14, 0.92);
  --tp-line: rgba(34, 197, 94, 0.14);
  --tp-text: #ecfdf5;
  --tp-muted: rgba(236, 253, 245, 0.64);
  --tp-accent: #22c55e;
}

.store-theme-preview[data-sf-preset="mono"] {
  --tp-bg: #07090d;
  --tp-surface: rgba(13, 16, 21, 0.76);
  --tp-surface2: rgba(13, 16, 21, 0.94);
  --tp-line: rgba(255, 255, 255, 0.10);
  --tp-text: #f9fafb;
  --tp-muted: rgba(249, 250, 251, 0.60);
  --tp-accent: #e5e7eb;
}

.store-theme-preview[data-sf-preset="sunset"] {
  --tp-bg: #090616;
  --tp-surface: rgba(18, 12, 38, 0.72);
  --tp-surface2: rgba(18, 12, 38, 0.92);
  --tp-line: rgba(249, 115, 22, 0.16);
  --tp-text: #fff7ed;
  --tp-muted: rgba(255, 237, 213, 0.65);
  --tp-accent: #fb7185;
}

.store-theme-preview[data-sf-preset="paper"] {
  --tp-bg: #f8fafc;
  --tp-surface: rgba(255, 255, 255, 0.86);
  --tp-surface2: rgba(255, 255, 255, 0.96);
  --tp-line: rgba(2, 6, 23, 0.10);
  --tp-text: #0b1220;
  --tp-muted: rgba(2, 6, 23, 0.68);
  --tp-accent: #2563eb;
}

.store-theme-preview[data-sf-preset="ice"] {
  --tp-bg: #070c12;
  --tp-surface: rgba(12, 18, 28, 0.58);
  --tp-surface2: rgba(12, 18, 28, 0.84);
  --tp-line: rgba(125, 211, 252, 0.14);
  --tp-text: #f0f9ff;
  --tp-muted: rgba(224, 242, 254, 0.62);
  --tp-accent: #a5f3fc;
}

.store-theme-preview[data-sf-preset="aurora"] {
  --tp-bg: #030c10;
  --tp-surface: rgba(6, 18, 22, 0.72);
  --tp-surface2: rgba(6, 18, 22, 0.92);
  --tp-line: rgba(52, 211, 153, 0.16);
  --tp-text: #ecfeff;
  --tp-muted: rgba(236, 254, 255, 0.64);
  --tp-accent: #34d399;
}

.store-theme-preview[data-sf-preset="cloud"] {
  --tp-bg: #f6f8ff;
  --tp-surface: rgba(255, 255, 255, 0.86);
  --tp-surface2: rgba(255, 255, 255, 0.96);
  --tp-line: rgba(2, 6, 23, 0.10);
  --tp-text: #0b1220;
  --tp-muted: rgba(2, 6, 23, 0.66);
  --tp-accent: #0ea5e9;
}

.store-theme-preview[data-sf-preset="linen"] {
  --tp-bg: #fff7ed;
  --tp-surface: rgba(255, 255, 255, 0.86);
  --tp-surface2: rgba(255, 255, 255, 0.96);
  --tp-line: rgba(120, 53, 15, 0.14);
  --tp-text: #1f1300;
  --tp-muted: rgba(31, 19, 0, 0.62);
  --tp-accent: #ea580c;
}

.store-theme-preview[data-sf-preset="noir"] {
  --tp-bg: #050607;
  --tp-surface: rgba(10, 12, 14, 0.74);
  --tp-surface2: rgba(10, 12, 14, 0.92);
  --tp-line: rgba(255, 255, 255, 0.08);
  --tp-text: #f4f4f5;
  --tp-muted: rgba(244, 244, 245, 0.64);
  --tp-accent: #a3e635;
}

.store-theme-preview[data-sf-preset="ruby"] {
  --tp-bg: #120408;
  --tp-surface: rgba(24, 7, 12, 0.78);
  --tp-surface2: rgba(24, 7, 12, 0.92);
  --tp-line: rgba(251, 113, 133, 0.14);
  --tp-text: #fff1f2;
  --tp-muted: rgba(255, 241, 242, 0.66);
  --tp-accent: #fb7185;
}

/* Accent overrides (matches storefront palette) */
.store-theme-preview[data-sf-accent="sky"] {
  --tp-accent: #7dd3fc;
}
.store-theme-preview[data-sf-accent="emerald"] {
  --tp-accent: #34d399;
}
.store-theme-preview[data-sf-accent="amber"] {
  --tp-accent: #fbbf24;
}
.store-theme-preview[data-sf-accent="rose"] {
  --tp-accent: #fb7185;
}
.store-theme-preview[data-sf-accent="violet"] {
  --tp-accent: #a78bfa;
}
.store-theme-preview[data-sf-accent="lime"] {
  --tp-accent: #a3e635;
}
.store-theme-preview[data-sf-accent="orange"] {
  --tp-accent: #fb923c;
}
.store-theme-preview[data-sf-accent="cyan"] {
  --tp-accent: #22d3ee;
}

/* ---------- Layout helpers for the /ui/ app panels ---------- */

.stack {
  display: grid;
  gap: 12px;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 920px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

@media (max-width: 920px) {
  .kv-grid {
    grid-template-columns: 1fr;
  }
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.kv .k {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.kv .v {
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
}

.out {
  margin: 10px 0 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  overflow: auto;
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
}

.small-btn {
  padding: 6px 10px;
  border-radius: 10px;
}

.list {
  display: grid;
  gap: 8px;
}

.list-item {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.list-item .meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.pill-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

/* Sidebar icons (inline SVG). */
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sponsored banner shown to Tier 1 users is clickable (tracks clicks if promo is active). */
#spotSlot {
  cursor: pointer;
  touch-action: manipulation;
}

/* Tap-friendly spacing and reliable click-target on mobile. */
.topbar-mid {
  padding: 0 14px;
}

.spot-slot::before {
  pointer-events: none;
}

/* ---------- Messaging UX (threads + chat) ---------- */

.msg-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.msg-threads {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.10);
  padding: 12px;
  min-height: 520px;
}

.msg-chat {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.10);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.msg-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
}

.msg-chat-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.msg-peer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.msg-peer:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.msg-peer-avwrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.msg-peer-avwrap .msg-peer-av,
.msg-peer-avwrap .msg-peer-fallback {
  position: absolute;
  inset: 0;
}

.msg-peer-av {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  object-fit: cover;
  display: block;
  flex: 0 0 auto;
}

.msg-peer-fallback {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(125, 211, 252, 0.9);
  background: rgba(125, 211, 252, 0.08);
  flex: 0 0 auto;
}

.msg-peer-text {
  min-width: 0;
}

.msg-peer-name {
  font-weight: 740;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.msg-peer-name > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-peer-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 46vw;
}

.msg-compose {
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.14);
}

.msg-compose-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.msg-threads .list-item {
  border-radius: 14px;
}

.thread-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.thread-item:hover {
  border-color: rgba(125, 211, 252, 0.25);
}

.thread-item.is-active {
  border-color: rgba(125, 211, 252, 0.45);
  background: rgba(125, 211, 252, 0.08);
}

.thread-av {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  overflow: hidden;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(125, 211, 252, 0.9);
}

.thread-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Presence dots ---------- */

.thread-av,
.msg-av-btn,
.msg-peer-avwrap {
  position: relative;
}

.thread-av.is-online::after,
.msg-av-btn.is-online::after,
.msg-peer-avwrap.is-online::after {
  content: "";
  position: absolute;
  /* Keep the dot inside the avatar bounds so it isn't clipped by overflow:hidden. */
  right: 2px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.95);
  border: 2px solid var(--panel-2);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.online-dot-inline {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
  background: rgba(34, 197, 94, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.thread-main {
  min-width: 0;
  flex: 1 1 auto;
}

.thread-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.thread-name {
  font-weight: 740;
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.thread-name > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-ts {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  flex: 0 0 auto;
}

.thread-preview {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-unread {
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.92);
  color: rgba(10, 12, 16, 0.95);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 850;
  display: grid;
  place-items: center;
}

@media (max-width: 920px) {
  .msg-shell {
    grid-template-columns: 1fr;
  }
  .msg-peer-sub {
    max-width: 62vw;
  }
}

/* ---------- Message actions + modals ---------- */

.sheet,
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  padding-top: calc(18px + env(safe-area-inset-top));
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

.sheet {
  place-items: end center;
}

.sheet-card,
.modal-card {
  width: min(860px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
  padding: 14px;
  max-height: calc(100vh - 56px);
  max-height: calc(100dvh - 56px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.sheet-card {
  width: min(860px, calc(100vw - 24px));
}

.sheet-title {
  font-weight: 760;
}

.sheet-preview {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
}

.profile-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.profile-av {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid var(--line);
  object-fit: cover;
  display: block;
  flex: 0 0 auto;
}

.profile-fallback {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: rgba(125, 211, 252, 0.9);
  background: rgba(125, 211, 252, 0.08);
  flex: 0 0 auto;
}

.profile-text {
  min-width: 0;
}

.profile-name {
  font-weight: 780;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- DM bubble avatars + action hooks ---------- */

.bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.bubble-row.me {
  justify-content: flex-end;
}

.msg-av-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 0;
  overflow: hidden;
  flex: 0 0 auto;
  cursor: pointer;
}

.msg-av-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.msg-av-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(125, 211, 252, 0.9);
  background: rgba(125, 211, 252, 0.08);
}

.chat.msg-chat-body,
.msg-chat .chat {
  flex: 1 1 auto;
  max-height: none;
}

.clip-ta {
  position: fixed;
  left: -9999px;
  top: 0;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Chat bubbles (messages + escrow chat) ---------- */

.chat {
  height: 420px;
  max-height: 55vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 78%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.bubble.me {
  align-self: flex-end;
  background: rgba(125, 211, 252, 0.09);
  border-color: rgba(125, 211, 252, 0.2);
}

.bubble .mhead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.bubble .mhead .mright {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.bubble .body {
  white-space: pre-wrap;
}

/* ---------- Tools (Telegram-like) entities + inline keyboard ---------- */

.t-ent.code {
  font-family: var(--mono);
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.t-ent.pre {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.t-ent.spoiler {
  filter: blur(6px);
  cursor: pointer;
}

.t-ent.spoiler:hover {
  filter: none;
}

.ikb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ikb .btn {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, 0.45);
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.18), rgba(125, 211, 252, 0.08));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    filter 140ms ease;
  position: relative;
  overflow: hidden;
}

.ikb .btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 55%);
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.ikb .btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.7);
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.22), rgba(125, 211, 252, 0.1));
  filter: saturate(1.04);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.ikb .btn:hover::after {
  opacity: 1;
}

.ikb .btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.ikb .btn:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.85);
  outline-offset: 2px;
}

/* Persistent "reply keyboard" menus for tools (Telegram-ish keyboard). */

.t-kb {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
}

.t-kb-row {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: 8px;
}

.t-kb-row + .t-kb-row {
  margin-top: 8px;
}

.t-kb .btn {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(125, 211, 252, 0.42);
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.18), rgba(125, 211, 252, 0.06));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
  font-weight: 720;
  letter-spacing: 0.01em;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.t-kb .btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.7);
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.22), rgba(125, 211, 252, 0.1));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
}

.t-kb .btn:active {
  transform: translateY(0) scale(0.985);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .ikb .btn,
  .t-kb .btn {
    transition: none;
  }
  .ikb .btn:hover,
  .t-kb .btn:hover {
    transform: none;
  }
  .ikb .btn:active,
  .t-kb .btn:active {
    transform: none;
  }
}

.msg-image {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 55vh;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.msg-video {
  display: block;
  max-width: 100%;
  width: 100%;
  max-height: 55vh;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.bubble .msg-image,
.bubble .msg-video {
  margin-top: 8px;
}

.bubble .meta-line {
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.bubble .post-title {
  margin-bottom: 6px;
  font-weight: 700;
}

/* Telegram-style channel feed (Updates). */
.chat.channel {
  height: 520px;
}

.chat.channel .bubble {
  max-width: 100%;
  width: 100%;
  align-self: stretch;
}

.chat.channel .bubble.me {
  align-self: stretch;
}

/* Marketplace feeds (freelance requests + gigs). */
.chat.market {
  height: 520px;
}

.chat.market .bubble {
  max-width: 100%;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.chat.market .bubble .mp-content {
  flex: 1;
  min-width: 0;
}

.chat.market .bubble:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chat.market .bubble:focus {
  outline: 2px solid rgba(125, 211, 252, 0.45);
  outline-offset: 2px;
}

.mp-owner {
  align-items: center;
  gap: 10px;
}

.mp-avwrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.mp-avwrap .mp-av,
.mp-avwrap .mp-fallback {
  position: absolute;
  inset: 0;
}

.mp-av {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  object-fit: cover;
  display: block;
  flex: 0 0 auto;
}

.mp-fallback {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(125, 211, 252, 0.9);
  background: rgba(125, 211, 252, 0.08);
  flex: 0 0 auto;
}

.mp-owner-text {
  min-width: 0;
}

.mp-owner-name {
  font-weight: 740;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.media-preview img,
.media-preview video {
  display: block;
  max-width: 100%;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

/* Small status pills (used by the UI boot loader). */
.brand-pill.ok {
  border-color: rgba(74, 222, 128, 0.35);
  color: rgba(74, 222, 128, 0.95);
  background: rgba(74, 222, 128, 0.08);
}

.brand-pill.bad {
  border-color: rgba(255, 107, 107, 0.35);
  color: rgba(255, 107, 107, 0.95);
  background: rgba(255, 107, 107, 0.08);
}

/* Collectible vanity usernames (gold). */
.cuname-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cuname {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.42);
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.18), rgba(250, 204, 21, 0.06));
  color: rgba(253, 230, 138, 0.98);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: help;
}

.cuname.more {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.08);
  color: rgba(226, 232, 240, 0.92);
}

.msg-peer-cunames {
  margin-top: 6px;
}

.msg-peer-cunames .cuname {
  height: 16px;
  padding: 0 7px;
  font-size: 10px;
}

/* Remove bottom sidebar chrome when there's no footer content. */
.sidebar-footer:empty {
  display: none;
}

/* ---------- 2026 redesign system ---------- */

:root {
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 24px;
  --radius-lg: 32px;
  --radius-sm: 18px;
  --shadow-soft: 0 28px 90px rgba(0, 0, 0, 0.14);
  --shadow-card: 0 28px 90px rgba(0, 0, 0, 0.16);
}

body {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 96%, var(--panel) 4%), color-mix(in srgb, var(--bg) 88%, var(--panel-2) 12%)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 22%, rgba(255, 255, 255, 0.015) 48%, rgba(255, 255, 255, 0) 72%, rgba(255, 255, 255, 0.018) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(18% 120% at 8% -10%, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 62%),
    radial-gradient(16% 140% at 22% -16%, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0) 66%),
    radial-gradient(20% 150% at 56% -14%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 64%),
    radial-gradient(18% 130% at 92% -12%, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0) 64%);
  mix-blend-mode: screen;
  filter: blur(18px);
  opacity: 0.9;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 170px 170px;
  mix-blend-mode: soft-light;
}

.app {
  padding: 18px;
  gap: 18px;
}

.sidebar,
.main {
  border: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
  box-shadow: var(--shadow-soft);
}

.sidebar {
  width: 290px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--chrome) 88%, transparent), color-mix(in srgb, var(--panel) 90%, transparent));
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-brand {
  align-items: flex-start;
  height: auto;
  margin: 0 0 18px 0;
  padding: 0 0 18px 0;
  background: transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
}

.sidebar-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-kicker,
.sidebar-section-label,
.page-eyebrow,
.home-feature-kicker {
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-title {
  font-family: var(--sans);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: none;
}

.sidebar-section-label {
  margin: 0 6px 10px;
}

.sidebar-section-label-secondary {
  margin-top: 12px;
}

.nav {
  flex: 1 1 auto;
  gap: 10px;
  padding: 0;
}

.nav-item {
  padding: 12px 13px;
  border-radius: 16px;
  border-color: color-mix(in srgb, var(--line) 68%, transparent);
  background: rgba(255, 255, 255, 0.02);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.nav-item:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.nav-item.is-active {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    color-mix(in srgb, var(--panel-2) 72%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-label {
  gap: 11px;
  font-weight: 620;
  font-size: 0.96rem;
}

.nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-footer {
  margin-top: auto;
}

.sidebar-summary {
  padding: 14px 15px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 10%, transparent), transparent 45%),
    color-mix(in srgb, var(--panel-2) 84%, transparent);
}

.sidebar-summary-kicker {
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.sidebar-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.main {
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  backdrop-filter: blur(22px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  height: auto;
  min-height: var(--topbar-h);
  padding: 22px 28px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--chrome-2) 94%, transparent), color-mix(in srgb, var(--chrome) 70%, transparent));
  backdrop-filter: blur(24px);
}

.topbar-left {
  align-items: flex-start;
  gap: 14px;
}

.page-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 720;
  letter-spacing: -0.06em;
}

.page-subtitle {
  max-width: 700px;
  font-size: 0.97rem;
  line-height: 1.55;
}

.topbar-right {
  gap: 12px;
}

.content {
  padding: 28px;
}

.panel {
  gap: 18px;
}

.card,
.card.flat {
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 28%),
    color-mix(in srgb, var(--panel-2) 88%, transparent);
  box-shadow: var(--shadow-card);
}

.row.between h2,
.page-h1,
.card h2 {
  letter-spacing: -0.04em;
}

.page-subtitle {
  margin-top: 6px;
}

.banner {
  border-radius: 18px;
}

.home-shell {
  display: grid;
  gap: 18px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.95fr);
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 10%, transparent), transparent 42%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.05), transparent 36%),
    color-mix(in srgb, var(--panel-2) 86%, transparent);
}

.home-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.home-hero-copy p {
  max-width: 62ch;
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
}

.home-hero-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  background: rgba(255, 255, 255, 0.03);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-feature {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}

.home-feature p {
  flex: 1 1 auto;
  margin: 0;
  line-height: 1.6;
}

.home-stats .kv {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.msg-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.25fr);
  gap: 18px;
}

.msg-threads,
.msg-chat {
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.025);
  padding: 18px;
}

.msg-chat {
  min-height: 760px;
}

.msg-chat-head {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}

.msg-compose {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}

[data-view-panel="settings"] .grid2,
[data-view-panel="stores"] .grid2 {
  gap: 18px;
}

[data-view-panel="settings"] .card.flat,
[data-view-panel="stores"] .card.flat,
[data-view-panel="updates"] .card.flat {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 26%),
    color-mix(in srgb, var(--panel) 90%, transparent);
}

.form input,
.form textarea,
.form select,
input,
textarea,
select {
  border-radius: 16px;
  border-color: color-mix(in srgb, var(--line) 90%, transparent);
  background: color-mix(in srgb, var(--bg) 22%, var(--panel-2));
}

.btn {
  border-radius: 999px;
}

.btn.primary {
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 26%, transparent);
}

.out {
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  background: color-mix(in srgb, var(--bg) 35%, var(--panel));
}

/* Consumer-first declutter pass: keep primary flows visible, tuck away operator-heavy surfaces. */
#homeStatusCard,
#updatesPostCard,
#storeStatsCard,
#storeTicketsCard,
#storeBotsCard,
#settingsBlockedCard,
#settingsEmailCard,
#settingsSessionsCard {
  display: none !important;
}

#storeDeleteBtn {
  display: none !important;
}

#storeOut,
#storeCreateOut,
#storeUpdOut,
#storeLogoOut,
#themeOut,
#prodUpsertOut,
#stockOut,
#profileOut,
#avatarOut,
#appearanceOut,
#msgSettingsOut,
#notifyOut,
#twofaOut {
  display: none !important;
}

[data-view-panel="stores"] .grid2,
[data-view-panel="settings"] .grid2 {
  grid-template-columns: 1fr;
}

[data-view-panel="stores"] .page-subtitle,
[data-view-panel="settings"] .page-subtitle,
[data-view-panel="messages"] .page-subtitle {
  max-width: 58ch;
}

[data-view-panel="stores"] .card.flat,
[data-view-panel="settings"] .card.flat,
[data-view-panel="messages"] .card.flat {
  padding: 22px;
}

[data-view-panel="settings"] > .card.flat,
[data-view-panel="settings"] > .grid2,
[data-view-panel="settings"] > .card.mt12 {
  max-width: 960px;
}

[data-view-panel="settings"] .pill-mini {
  border-radius: 999px;
}

[data-view-panel="settings"] .row {
  align-items: center;
}

[data-view-panel="stores"] h2,
[data-view-panel="settings"] h2,
[data-view-panel="messages"] h2 {
  margin-bottom: 6px;
}

[data-view-panel="stores"] details,
[data-view-panel="settings"] details {
  margin-top: 14px;
}

@media (max-width: 1120px) {
  .home-grid,
  .msg-shell,
  .home-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .app {
    padding: 12px;
    gap: 12px;
  }

  .main,
  .sidebar {
    border-radius: 24px;
  }

  .sidebar {
    width: min(320px, calc(100vw - 32px));
  }

  .sidebar-footer {
    margin-top: 14px;
  }

  .topbar {
    padding: 18px 18px 16px;
  }

  .content {
    padding: 18px;
  }

  .topbar-mid {
    display: none;
  }

  .page-subtitle {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .page-title {
    font-size: 1.55rem;
  }

  .sidebar-summary {
    display: none;
  }

  .home-hero {
    padding: 22px;
  }

  .msg-threads,
  .msg-chat {
    padding: 14px;
    border-radius: 20px;
  }
}

body.landing .app {
  display: block;
  padding: 0;
}

body.landing .main {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.landing .content {
  padding: clamp(18px, 2.2vw, 28px);
}

.landing-panel {
  width: min(1240px, 100%);
  margin: 0 auto;
  gap: clamp(42px, 6vw, 72px);
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  font-weight: 700;
}

.landing-brand-name {
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.landing-brand-sub {
  margin-top: 4px;
  font-size: 0.94rem;
}

.landing-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.landing-links a:not(.btn) {
  color: var(--muted);
}

.landing-hero-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: min(920px, calc(100vh - 140px));
  padding: clamp(24px, 5vw, 74px) 0 clamp(20px, 3vw, 38px);
}

.landing-copy {
  min-width: 0;
}

.landing-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  color: var(--text);
}

.landing-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 65%, white), var(--accent));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 26%, transparent);
}

.landing-title {
  margin: 24px 0 0;
  max-width: 8.5ch;
  font-size: clamp(2.7rem, 7vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
  text-wrap: balance;
}

.landing-subtitle {
  margin: 24px 0 0;
  max-width: min(58ch, 100%);
  font-size: clamp(0.96rem, 0.5vw + 0.84rem, 1.05rem);
  line-height: 1.9;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.landing-note {
  margin-top: 22px;
  font-size: 0.92rem;
}

.landing-visual {
  position: relative;
  padding: clamp(18px, 2vw, 24px);
  min-height: clamp(320px, 52vw, 620px);
  border-radius: 28px;
  border: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    color-mix(in srgb, var(--panel-2) 90%, transparent);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.landing-visual::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 55%);
}

.landing-visual > * {
  position: relative;
  z-index: 1;
}

.landing-visual-kicker {
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.landing-visual-title {
  margin-top: 14px;
  max-width: 12ch;
  font-size: clamp(1.9rem, 4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.landing-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.landing-mini-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  background: rgba(255, 255, 255, 0.03);
}

.landing-mini-card span {
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.landing-mini-card strong {
  font-size: 1rem;
  line-height: 1.45;
}

.landing-rows {
  display: grid;
  gap: 18px;
}

.landing-section-head {
  max-width: 58ch;
}

.landing-row {
  display: grid;
  grid-template-columns: clamp(110px, 15vw, 160px) minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}

.landing-row-label {
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 6px;
}

.landing-row-body h3 {
  margin: 0 0 10px;
  font-size: clamp(1.1rem, 1vw + 0.95rem, 1.375rem);
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.landing-row-body p {
  margin: 0;
  max-width: 60ch;
  line-height: 1.8;
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}

.landing-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.landing-footer-links a {
  color: var(--muted);
}

@media (max-width: 960px) {
  .landing-nav,
  .landing-footer,
  .landing-hero-split,
  .landing-row {
    grid-template-columns: 1fr;
  }

  .landing-nav,
  .landing-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-title {
    max-width: 10ch;
  }
}

@media (max-width: 720px) {
  .landing-visual-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Premium sitewide system (reference-aligned) ---------- */

:root {
  --premium-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --premium-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --premium-radius-xs: 10px;
  --premium-radius-sm: 12px;
  --premium-radius-md: 14px;
  --premium-radius-lg: 18px;
  --premium-radius-xl: 24px;
  --premium-shadow-soft: 0 16px 50px rgba(0, 0, 0, 0.14);
  --premium-shadow-strong: 0 30px 80px rgba(0, 0, 0, 0.24);
  --premium-glass-fill: rgba(255, 255, 255, 0.08);
  --premium-glass-border: rgba(255, 255, 255, 0.12);
}

:root,
html[data-theme="light"] {
  --bg: #eef2f7;
  --panel: rgba(255, 255, 255, 0.62);
  --panel-2: rgba(249, 251, 254, 0.94);
  --chrome: rgba(255, 255, 255, 0.56);
  --chrome-2: rgba(249, 251, 254, 0.88);
  --line: rgba(20, 36, 58, 0.12);
  --text: #0d1728;
  --muted: rgba(13, 23, 40, 0.68);
  --accent: #2684ff;
  --premium-glass-fill: rgba(255, 255, 255, 0.28);
  --premium-glass-border: rgba(255, 255, 255, 0.34);
}

html:not([data-theme="light"]) {
  --bg: #070a10;
  --panel: rgba(14, 18, 28, 0.54);
  --panel-2: rgba(10, 13, 19, 0.9);
  --chrome: rgba(14, 18, 28, 0.54);
  --chrome-2: rgba(10, 13, 19, 0.84);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f3f7fd;
  --muted: rgba(243, 247, 253, 0.68);
  --accent: #49a0ff;
}

body:not(.landing-page) {
  font-family: var(--premium-sans);
  background:
    radial-gradient(1200px 700px at 12% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 56%),
    radial-gradient(900px 600px at 100% 0%, rgba(255, 255, 255, 0.08), transparent 46%),
    radial-gradient(1000px 800px at 50% 110%, rgba(80, 122, 190, 0.1), transparent 52%),
    linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 82%, #0d121b) 48%, color-mix(in srgb, var(--bg) 66%, #111827));
  color: var(--text);
}

body:not(.landing-page)::before {
  background:
    radial-gradient(42% 28% at 20% 18%, rgba(255, 255, 255, 0.11), transparent 70%),
    radial-gradient(36% 24% at 82% 20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 72%),
    radial-gradient(44% 30% at 66% 76%, rgba(255, 255, 255, 0.05), transparent 72%),
    repeating-linear-gradient(115deg, transparent 0 18px, rgba(255, 255, 255, 0.012) 18px 19px, transparent 19px 38px),
    repeating-linear-gradient(0deg, transparent 0 24px, rgba(255, 255, 255, 0.01) 24px 25px, transparent 25px 50px);
  mix-blend-mode: screen;
  animation: premiumMetalDriftA 28s linear infinite;
  opacity: 0.95;
}

body:not(.landing-page)::after {
  background:
    radial-gradient(48% 34% at 14% 24%, rgba(255, 255, 255, 0.1), transparent 68%),
    radial-gradient(32% 24% at 76% 14%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 66%),
    radial-gradient(40% 26% at 50% 78%, rgba(255, 255, 255, 0.035), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 16%, transparent 84%, rgba(0, 0, 0, 0.12));
  mix-blend-mode: soft-light;
  animation: premiumMetalDriftB 34s ease-in-out infinite alternate;
  opacity: 0.92;
}

.sidebar,
.main,
.topbar,
.card,
.card.flat,
.home-hero,
.home-hero-actions,
.msg-threads,
.msg-chat,
.sidebar-summary,
.dropdown,
.auth-card,
.out,
.banner {
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
  box-shadow: var(--premium-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar,
.main,
.topbar,
.card,
.card.flat,
.msg-threads,
.msg-chat,
.sidebar-summary,
.dropdown,
.auth-card,
.out {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    color-mix(in srgb, var(--panel-2) 90%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.brand-title,
.page-title,
.page-h1,
.home-hero h1,
.row.between h2,
.card h2,
.home-feature h2,
.auth-card h1,
.dropdown .head .handle,
.modal h3 {
  font-family: var(--premium-display);
  font-weight: 600;
  letter-spacing: -0.05em;
}

.brand-kicker,
.sidebar-section-label,
.page-eyebrow,
.home-feature-kicker,
.kicker,
.hint,
label,
.small,
.dropdown .head .muted {
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.app {
  gap: 20px;
  padding: 20px;
}

.sidebar {
  width: 278px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    color-mix(in srgb, var(--chrome-2) 92%, transparent);
}

.sidebar-brand {
  padding-bottom: 20px;
}

.brand-title {
  font-size: 1.55rem;
}

.nav {
  gap: 8px;
}

.nav-item {
  min-height: 54px;
  border-radius: 14px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none;
}

.nav-item .lock {
  color: var(--muted);
}

.nav-icon {
  width: 18px;
  height: 18px;
  border-radius: 0;
  background: transparent !important;
  border: 0 !important;
}

.nav-item.is-active {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 18%, transparent), transparent 46%),
    color-mix(in srgb, var(--panel-2) 42%, transparent) !important;
  box-shadow: none;
}

.topbar {
  top: 12px;
  margin: 12px;
  border-radius: 18px;
  padding: 20px 24px;
  min-height: 88px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    color-mix(in srgb, var(--chrome-2) 90%, transparent);
}

.topbar .brand-pill,
.brand-pill,
.pill-mini,
.vbadge,
.lock,
.btn,
.avatar-btn {
  border-radius: 999px;
}

.page-title {
  font-size: clamp(2rem, 3vw, 2.9rem);
  line-height: 0.95;
}

.page-subtitle {
  max-width: 60ch;
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--muted);
}

.content {
  padding: 22px 24px 28px;
}

.panel {
  gap: 20px;
}

.card,
.card.flat {
  border-radius: 20px;
  padding: 24px;
}

.home-hero {
  padding: 30px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 14%, transparent), transparent 40%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.06), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    color-mix(in srgb, var(--panel-2) 84%, transparent);
}

.home-hero h1 {
  max-width: 9ch;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  line-height: 0.92;
}

.home-hero-actions,
.msg-threads,
.msg-chat,
.sidebar-summary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
    color-mix(in srgb, var(--panel) 88%, transparent);
}

.home-grid {
  gap: 16px;
}

.home-feature {
  min-height: 0;
}

.btn {
  padding: 13px 18px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.btn:hover,
.avatar-btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 60%, white), var(--accent));
  color: white;
  box-shadow: 0 12px 34px color-mix(in srgb, var(--accent) 24%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn.danger {
  background: linear-gradient(180deg, #ff8b97, #fb7185);
  border-color: transparent;
}

input,
textarea,
select,
.form input,
.form textarea,
.form select {
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 26%),
    color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 92%, transparent);
}

.auth-card {
  max-width: 620px;
  padding: 28px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
}

.auth-card .hint,
.auth-card .hint.mt12 {
  display: none;
}

.auth-card .auth-meta {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-card .auth-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.4;
  user-select: none;
}

.auth-card .auth-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent, #5ba8ff);
}

.auth-card .auth-recovery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-card .auth-recovery.is-hidden {
  display: none !important;
}

.auth-card .btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.auth-card .btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: -2;
}

.auth-card .btn::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -32%;
  width: 32%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
  transform: translateX(-150%) rotate(16deg);
  opacity: 0;
  transition:
    transform 420ms ease,
    opacity 220ms ease;
  z-index: -1;
}

.auth-card .btn:hover {
  transform: translateY(-1px);
}

.auth-card .btn:hover::before {
  opacity: 1;
}

.auth-card .btn:hover::after {
  opacity: 1;
  transform: translateX(280%) rotate(16deg);
}

html[data-theme="light"] .auth-card .btn.primary,
:root[data-theme="light"] .auth-card .btn.primary,
body[data-theme="light"] .auth-card .btn.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 42%, white), color-mix(in srgb, var(--accent) 92%, #2563eb));
  color: #ffffff;
  border-color: color-mix(in srgb, var(--accent) 78%, rgba(15, 23, 42, 0.08));
  box-shadow:
    0 14px 34px color-mix(in srgb, var(--accent) 26%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

html[data-theme="light"] .auth-card .btn.primary:hover,
:root[data-theme="light"] .auth-card .btn.primary:hover,
body[data-theme="light"] .auth-card .btn.primary:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 34%, white), color-mix(in srgb, var(--accent) 100%, #1d4ed8));
  box-shadow:
    0 18px 40px color-mix(in srgb, var(--accent) 30%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.settings-choice-grid,
.settings-notify-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-choice-card,
.settings-toggle-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    color-mix(in srgb, var(--panel) 86%, transparent);
  letter-spacing: normal;
  text-transform: none;
}

.settings-choice-card input,
.settings-toggle-card input {
  margin: 0 0 2px;
}

.settings-choice-title {
  font-size: 0.98rem;
  font-weight: 620;
  letter-spacing: -0.02em;
  text-transform: none;
}

.settings-choice-copy {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: normal;
}

.settings-toggle-row {
  display: grid;
  grid-template-columns: 1fr;
}

.dropdown {
  border-radius: 18px;
}

.msg-chat {
  min-height: 680px;
}

body:not(.landing-page) .content > .card.auth-card {
  margin: min(8vh, 72px) auto;
}

@keyframes premiumMetalDriftA {
  0% { transform: translate3d(-1%, -1%, 0) scale(1.03); }
  100% { transform: translate3d(1%, 1%, 0) scale(1.05); }
}

@keyframes premiumMetalDriftB {
  0% { transform: translate3d(1%, 0, 0) scale(1.03); }
  100% { transform: translate3d(-1%, 1%, 0) scale(1.05); }
}

@media (max-width: 960px) {
  .app {
    padding: 12px;
  }

  .topbar {
    margin: 8px;
    padding: 16px 18px;
  }

  .content {
    padding: 16px 18px 22px;
  }

  .card,
  .card.flat,
  .auth-card,
  .home-hero {
    padding: 20px;
  }

  .settings-choice-grid,
  .settings-notify-grid {
    grid-template-columns: 1fr;
  }
}

body[data-entry-view] .app {
  width: min(1420px, calc(100% - 18px));
  margin: 0 auto;
  align-items: start;
}

body[data-entry-view] .main {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-entry-view] .content {
  padding-top: 8px;
}

body[data-entry-view] .panel > [data-view-panel] {
  max-width: 1220px;
  margin: 0 auto;
}

body[data-entry-view] .sidebar-summary {
  display: none;
}

body[data-entry-view] .home-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-entry-view] .home-feature:last-child {
  grid-column: 1 / -1;
}

body[data-entry-view] .topbar-right {
  align-items: flex-start;
}

@media (max-width: 1120px) {
  body[data-entry-view] .home-grid {
    grid-template-columns: 1fr;
  }

  body[data-entry-view] .home-feature:last-child {
    grid-column: auto;
  }
}

.home-feature-minimal {
  min-height: 0;
  max-width: 820px;
}

.home-feature-minimal .row.wrap {
  flex-wrap: wrap;
}

.updates-feed-card {
  max-width: 920px;
}

.updates-feed-card .chat.channel {
  min-height: 340px;
}

.settings-simple-grid {
  grid-template-columns: 1fr;
  max-width: 920px;
}

.settings-notifications-card {
  max-width: 920px;
}

.settings-notifications-card .row {
  flex-wrap: wrap;
}

body[data-entry-view] .panel {
  gap: 16px;
}

body[data-entry-view] .card,
body[data-entry-view] .card.flat {
  padding: 20px;
}

/* ---------- Dashboard structure refinement ---------- */

body:not(.landing-page)::before {
  opacity: 0.68;
}

body:not(.landing-page)::after {
  opacity: 0.54;
}

.sidebar {
  width: 264px;
  padding: 16px 14px;
}

.nav {
  gap: 4px;
}

.nav-item {
  min-height: 46px;
  padding: 10px 10px;
  color: color-mix(in srgb, var(--text) 72%, transparent);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.025) !important;
}

.nav-item.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 10%, transparent) !important;
}

.nav-label {
  gap: 10px;
  font-weight: 560;
}

.topbar {
  min-height: 78px;
  padding: 16px 22px;
}

.page-copy {
  gap: 2px;
}

.page-title {
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
}

.page-subtitle {
  max-width: 56ch;
  font-size: 0.93rem;
  line-height: 1.65;
}

.content {
  padding: 12px 22px 26px;
}

.panel {
  gap: 14px;
}

.card[data-view-panel="home"] {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.home-shell {
  gap: 14px;
}

.home-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.home-overview-main,
.home-overview-summary,
.home-workitem,
.updates-feed-card {
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    color-mix(in srgb, var(--panel-2) 84%, transparent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.home-overview-main {
  padding: 22px 24px;
}

.home-overview-main h1 {
  margin: 6px 0 10px;
  max-width: 11ch;
  font-family: var(--premium-display);
  font-size: clamp(2.05rem, 4.8vw, 3.6rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.home-overview-main p {
  margin: 0;
  max-width: 56ch;
  line-height: 1.65;
}

.home-actions {
  margin-top: 16px;
  gap: 10px;
  flex-wrap: wrap;
}

.home-overview-summary {
  padding: 20px;
}

.home-summary-head {
  align-items: start;
  margin-bottom: 12px;
}

.home-overview-summary h2 {
  margin: 4px 0 0;
  font-size: 1.45rem;
}

.home-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-summary-item {
  padding: 14px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.home-summary-label,
.home-workitem-label {
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-summary-value {
  margin-top: 10px;
  font-size: 1.35rem;
  font-weight: 620;
  letter-spacing: -0.04em;
  color: var(--text);
}

.home-summary-value-meta {
  font-size: 1rem;
  line-height: 1.45;
}

.home-summary-copy {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.home-workstrip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-workitem {
  padding: 18px;
}

.home-workitem h2 {
  margin: 10px 0 8px;
  font-size: 1.16rem;
  line-height: 1.3;
}

.home-workitem p {
  margin: 0 0 16px;
  line-height: 1.55;
}

.updates-feed-card {
  padding: 18px;
}

.updates-feed-card .chat.channel {
  min-height: 300px;
}

@media (max-width: 1120px) {
  .home-overview,
  .home-workstrip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .sidebar {
    width: min(300px, calc(100vw - 24px));
  }

  .content {
    padding: 10px 16px 22px;
  }

  .home-overview-main,
  .home-overview-summary,
  .home-workitem,
  .updates-feed-card {
    padding: 16px;
  }

  .home-summary-grid {
    grid-template-columns: 1fr;
  }
}
