:root {
  --bg: #fffaf6;
  --surface: #ffffff;
  --surface-alt: #f7f1ff;
  --surface-violet: #eee3ff;
  --border: #e7dff0;
  --border-strong: #d2c3df;
  --text: #100b37;
  --ink: #100b37;
  --muted: #615a76;
  --muted-light: #655e77;
  --primary: #6418bd;
  --primary-dark: #3c0b86;
  --primary-soft: #d6baf5;
  --lavender: #8f5de0;
  --coral: #ec287d;
  --teal: #258ac8;
  --amber: #dc8b20;
  --success-soft: #edf7ee;
  --success-border: #cce5cf;
  --success-text: #285f31;
  --danger-soft: #fff0ef;
  --danger-border: #f1c9c4;
  --danger-text: #8b3127;
  --warn-soft: #fff6e6;
  --warn-border: #ecd6aa;
  --warn-text: #74521b;
  --shell-width: 390px;
  --safe-top: 54px;
  --bottom-nav-height: 68px;
  --font-ui: "Avenir Next", "Inter", "Segoe UI", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  background:
    radial-gradient(circle at 14% 18%, rgba(111, 36, 216, 0.22), transparent 25%),
    radial-gradient(circle at 88% 82%, rgba(214, 10, 135, 0.16), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.prototype-stage {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.72), rgba(255, 248, 241, 0.58)),
    radial-gradient(circle at 8% 10%, rgba(112, 66, 184, 0.14), transparent 32%),
    radial-gradient(circle at 92% 88%, rgba(233, 163, 66, 0.12), transparent 28%);
}

.device-shell {
  border: 8px solid #18151c;
  background: #18151c;
  box-shadow: 0 22px 65px rgba(24, 16, 47, 0.22);
}

.app-surface,
.screen {
  background: var(--bg);
}

.back-to-hub {
  top: 7px;
  left: 12px;
  min-width: auto;
  min-height: 44px;
  color: var(--primary-dark);
  border: 1px solid rgba(112, 66, 184, 0.16);
  box-shadow: none;
}

.screen-scroll {
  padding: 0 16px calc(var(--bottom-nav-height) + 22px);
}

.screen-enter .screen-scroll > * {
  animation: settle-in 280ms cubic-bezier(.2, .75, .25, 1) both;
}

@keyframes settle-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-header {
  min-height: 58px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.screen-header h1,
.screen-title {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.header-action,
.icon-button {
  border: 0;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
}

.header-action:hover,
.icon-button:hover {
  background: var(--surface-alt);
}

.ui-icon {
  display: block;
  pointer-events: none;
}

.home-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0 8px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.home-header h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.header-actions {
  display: flex;
  gap: 2px;
}

.header-spacer {
  width: 44px;
  height: 44px;
}

.finish-button {
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
}

.reset-picture-header {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  border: 1px solid #e5a4b5;
  border-radius: 11px;
  background: #fff3f6;
  color: #b54b69;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.reset-picture-header:hover {
  background: #ffe7ee;
}

.daily-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  margin: 4px 0 18px;
  padding: 18px;
  border-radius: 18px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(55, 9, 120, .98) 0%, rgba(100, 24, 189, .94) 56%, rgba(89, 15, 167, .30) 100%),
    url("assets/starlight-sorceress-thumb.webp") center right / 58% auto no-repeat;
}

.daily-card::after {
  content: "✦";
  position: absolute;
  right: 13px;
  top: 14px;
  font-size: 70px;
  line-height: 1;
  color: rgba(255,255,255,.2);
}

.daily-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.daily-card p {
  max-width: 170px;
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255,255,255,.96);
}

.streak-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
}

.streak-row .ui-icon { color: #ffebe0; }

.continue-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  min-width: auto;
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 9px;
}

.section-heading h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.link-button {
  min-height: 44px;
  min-width: auto;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  font-size: 11.5px;
  cursor: pointer;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-bottom: 18px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  padding: 10px 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.category-card span:last-child {
  font-size: 10px;
  font-weight: 650;
}

.category-glyph {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-alt);
  color: var(--primary);
  font-size: 24px;
}

.category-card[data-accent="coral"] .category-glyph { color: var(--coral); }
.category-card[data-accent="teal"] .category-glyph { color: var(--teal); }
.category-card[data-accent="amber"] .category-glyph { color: var(--amber); }

.recent-list {
  display: grid;
  gap: 9px;
}

.recent-row {
  display: grid;
  grid-template-columns: 58px 1fr 38px;
  align-items: center;
  gap: 10px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.recent-row img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
}

.recent-row h3 {
  margin: 0 0 2px;
  font-size: 12.5px;
}

.recent-row p,
.recent-row small {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.progress-track {
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee7f2;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--lavender));
}

.empty-state {
  padding: 26px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  background: rgba(255,255,255,.62);
  text-align: center;
}

.empty-state .empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  place-items: center;
  border-radius: 17px;
  background: var(--surface-violet);
  color: var(--primary);
}

.empty-state h3 {
  margin: 0 0 5px;
  font-size: 14px;
}

.empty-state p {
  margin: 0 auto 13px;
  max-width: 250px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--primary);
  background: linear-gradient(135deg, #7f4cc4, #6236aa);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--primary-dark);
}

.danger-button {
  border: 1px solid var(--danger-border);
  background: var(--danger-soft);
  color: var(--danger-text);
}

.bottom-nav {
  position: relative;
  padding: 3px 9px 6px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.97);
}

.nav-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 50px;
  padding: 2px;
  border: 0;
  background: transparent;
  color: #625b70;
  font-size: 8.5px;
  cursor: pointer;
}

.nav-item.active {
  color: var(--primary);
  font-weight: 750;
}

.nav-item.nav-color {
  margin-top: -26px;
}

.nav-item.nav-color .nav-orb {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: linear-gradient(145deg, #8a55ca, #5c30a6);
  color: #fff;
}

.nav-item.nav-color > span:last-child {
  color: var(--primary);
  font-weight: 750;
}

.nav-item > .ui-icon,
.nav-item .nav-orb .ui-icon {
  width: 18px;
  height: 18px;
}

.search-wrap {
  position: relative;
  margin: 4px 0 13px;
}

.search-wrap .ui-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 43px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  color: var(--text);
}

.chip-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  min-width: auto;
  min-height: 44px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
}

.chip.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

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

.reset-designs-button {
  display: grid;
  width: 100%;
  grid-template-columns: 38px 1fr 24px;
  align-items: center;
  gap: 10px;
  margin: -2px 0 13px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.reset-designs-button:hover {
  border-color: var(--primary-soft);
  background: var(--surface-alt);
}

.reset-designs-button > span:nth-child(2) {
  min-width: 0;
}

.reset-designs-button strong,
.reset-designs-button small {
  display: block;
}

.reset-designs-button strong {
  margin-bottom: 2px;
  font-size: 12px;
}

.reset-designs-button small {
  color: var(--muted);
  font-size: 10px;
}

.reset-designs-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-violet);
  color: var(--primary-dark);
}

.design-card,
.gallery-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.design-card img,
.gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f8f1e8;
}

.design-copy,
.gallery-copy {
  padding: 10px;
}

.design-copy h3,
.gallery-copy h3 {
  margin: 0 0 2px;
  font-size: 12px;
}

.design-copy p,
.gallery-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.workspace-scroll {
  padding-left: 10px;
  padding-right: 10px;
}

.artboard-wrap {
  position: relative;
  height: min(52vh, 450px);
  min-height: 350px;
  margin: 0 -2px 10px;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  touch-action: none;
}

#artboard {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: top left;
  transition: transform 90ms ease-out;
  touch-action: none;
}

#artboard.is-zoomed {
  cursor: grab;
}

.palette-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 9px 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.swatch,
.custom-swatch {
  width: 37px;
  min-width: 37px;
  height: 37px;
  min-height: 37px;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}

.swatch.active {
  border-color: #fff;
  outline: 2px solid var(--primary);
}

.custom-swatch {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  background: #fff;
}

.custom-swatch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tool-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding-top: 9px;
}

.tool-area {
  position: relative;
}

.brush-size-popover {
  position: absolute;
  z-index: 5;
  right: 8px;
  bottom: 64px;
  display: grid;
  grid-template-columns: auto repeat(3, minmax(58px, 1fr));
  align-items: center;
  gap: 5px;
  padding: 7px;
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(59, 34, 94, 0.16);
}

.brush-size-popover[hidden] {
  display: none;
}

.brush-size-title {
  padding: 0 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.brush-size-button {
  display: inline-flex;
  min-width: 58px;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.brush-size-button.active {
  border-color: var(--primary);
  background: var(--surface-violet);
  color: var(--primary-dark);
}

.brush-size-preview {
  display: inline-block;
  width: var(--brush-preview);
  height: var(--brush-preview);
  max-width: 20px;
  max-height: 20px;
  border-radius: 50%;
  background: currentColor;
}

.tool-button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 55px;
  padding: 5px 2px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--text);
  font-size: 9px;
  cursor: pointer;
}

.tool-button.active {
  background: var(--surface-violet);
  color: var(--primary-dark);
  font-weight: 750;
}

.completion-art {
  display: block;
  width: min(100%, 315px);
  max-height: 43vh;
  margin: 0 auto 8px;
  object-fit: contain;
}

.completion-card {
  padding: 16px;
  border: 1px solid #eee6f3;
  border-radius: 20px;
  background: linear-gradient(180deg, #fbf8fd, #fff);
  text-align: center;
}

.completion-card h2 {
  margin: 0 0 5px;
  font-size: 16px;
}

.completion-card > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11.5px;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 14px;
}

.metric {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 8px;
}

.metric + .metric { border-left: 1px solid var(--border); }

.metric strong,
.metric span { display: block; }
.metric strong { font-size: 14px; }
.metric span { margin-top: 1px; color: var(--muted); font-size: 9px; }

.completion-card .primary-button { width: 100%; }

.completion-card .completion-download {
  width: 100%;
  margin-top: 8px;
}

.closing-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.avatar {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--lavender), var(--coral));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.profile-hero h2 { margin: 0 0 3px; font-size: 16px; }
.profile-hero p { margin: 0; color: var(--muted); font-size: 11px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 12px 0 17px;
}

.stat-card {
  padding: 12px 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  text-align: center;
}

.stat-card strong { display: block; font-size: 17px; color: var(--primary-dark); }
.stat-card span { color: var(--muted); font-size: 9.5px; }

.settings-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.settings-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 56px;
  gap: 11px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.settings-row:last-child { border-bottom: 0; }
.settings-row .row-icon { color: var(--primary); }
.settings-row .row-copy { flex: 1; }
.settings-row strong { display: block; font-size: 12px; }
.settings-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }

.toggle {
  position: relative;
  width: 44px;
  height: 26px;
  flex: 0 0 44px;
  border-radius: 999px;
  background: #d7d0dc;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}

.toggle.on { background: var(--primary); }
.toggle.on::after { transform: translateX(18px); }

.info-card {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-alt);
}

.info-card h2,
.info-card h3 { margin: 0 0 6px; font-size: 14px; }
.info-card p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.55; }

.info-card p + .privacy-note {
  margin-top: 10px;
}

.info-card p strong {
  color: var(--text);
  font-size: 11.5px;
}

.privacy-legal-content {
  display: flex;
  min-height: 0;
  flex: 1 0 auto;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 0;
}

.screen[data-route="privacy-legal"] .screen-scroll {
  display: flex;
  flex-direction: column;
  padding-bottom: 10px;
}

.legal-links .settings-row {
  min-height: 58px;
}

.powered-by-visionvix {
  position: relative;
  display: flex;
  width: min(100%, 280px);
  min-height: 44px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
  align-self: center;
  overflow: hidden;
  padding: 5px 12px;
  border: 1px solid rgba(174, 151, 255, .78);
  border-radius: 15px;
  background: linear-gradient(135deg, #4330a4 0%, #281568 54%, #160d44 100%);
  box-shadow: 0 3px 0 #d9cff8, inset 0 1px 0 rgba(255, 255, 255, .18);
  color: #fff;
  text-decoration: none;
}

.powered-by-visionvix::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 20%, rgba(255, 255, 255, .16), transparent 34%);
  content: "";
  pointer-events: none;
}

.powered-by-visionvix span,
.powered-by-visionvix strong,
.powered-by-visionvix img {
  position: relative;
  z-index: 1;
}

.powered-by-visionvix span {
  color: #d9d0ff;
  font-size: 11px;
  font-weight: 600;
}

.powered-by-visionvix img {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(5, 3, 24, .4);
}

.powered-by-visionvix strong {
  font-size: 12.5px;
  font-weight: 850;
  letter-spacing: -.15px;
}

.powered-by-visionvix:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #d9cff8, inset 0 1px 0 rgba(255, 255, 255, .18);
}

.stack { display: grid; gap: 12px; }
.button-stack { display: grid; gap: 9px; margin-top: 14px; }
.button-stack > * { width: 100%; }

.toast {
  position: absolute;
  z-index: 80;
  left: 50%;
  bottom: calc(var(--bottom-nav-height) + 16px);
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  text-align: center;
  transform: translateX(-50%);
  animation: toast-in 180ms ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.portrait-icon { font-size: 52px; margin-bottom: 14px; }
#appPortraitLock strong { font-size: 22px; margin-bottom: 8px; }
#appPortraitLock span { max-width: 280px; color: var(--muted); font-size: 14px; }

@media (max-width: 520px) {
  .device-shell { border: 0; }
  .back-to-hub { top: calc(7px + env(safe-area-inset-top)); }
}

@media (max-height: 730px) and (min-width: 521px) {
  :root { --safe-top: 44px; --bottom-nav-height: 70px; }
  .daily-card { min-height: 140px; margin-bottom: 13px; padding: 15px; }
  .category-grid { margin-bottom: 13px; }
  .artboard-wrap { min-height: 300px; height: 47vh; }
}

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

/* VisionVix host header and compact one-screen studio */
:root {
  --app-bg: #fffaf6;
  --app-text: #3c0b86;
  --app-line: rgba(100, 24, 189, .25);
}

.app-surface {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  background: var(--app-bg);
}

.vv-app-header {
  position: relative;
  z-index: 30;
  box-sizing: border-box;
  display: flex;
  height: calc(36px + env(safe-area-inset-top, 0px));
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 0px) 7px 0;
  border-bottom: 1px solid rgba(100, 24, 189, .10);
  background: var(--app-bg);
}

.app-root {
  height: auto;
  min-height: 0;
  flex: 1 1 auto;
  padding-top: 0;
}

.vv-my-apps {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  min-width: 0;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 8px;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  background: #fff;
  color: var(--app-text);
  font: 700 13.5px/1 var(--font-ui);
  text-decoration: none;
}

.vv-my-apps span {
  font-size: 14px;
  transform: translateY(-.5px);
}

.vv-my-apps .vv-logo {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 5px;
}

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

.vv-credits {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 2px;
  color: #665f77;
  font: 650 12px/1 var(--font-ui);
}

.vv-credits i {
  position: relative;
  display: grid;
  width: 21px;
  height: 21px;
  box-sizing: border-box;
  place-items: center;
  border: 2px solid #a96509;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff1a1 8%, #ffd44d 38%, #e7a91c 68%, #bf7710 100%);
  box-shadow: inset 1px 1px 1px rgba(255,255,255,.85), inset -2px -2px 2px rgba(137,76,6,.38), 0 1px 2px rgba(84,53,10,.28);
  transform: rotate(-8deg);
}

.vv-credits i::before {
  content: "V";
  position: relative;
  z-index: 1;
  display: grid;
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  place-items: center;
  border: 1px solid rgba(151,89,8,.72);
  border-radius: 50%;
  color: #915508;
  font: 900 8px/1 Arial, sans-serif;
  text-shadow: 0 1px 0 rgba(255,244,166,.9);
}

.vv-credits i::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px dashed rgba(255,244,166,.8);
  border-radius: 50%;
}

.vv-share {
  position: relative;
  display: grid;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  flex: 0 0 24px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(100, 24, 189, .42);
  border-radius: 50%;
  background: #f4edff;
  color: var(--primary-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  cursor: pointer;
}

.vv-share svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vv-share svg circle {
  fill: currentColor;
  stroke: none;
}

.vv-my-apps::after,
.vv-share::after {
  position: absolute;
  content: "";
  inset: -9px -6px;
}

.vv-share::after {
  inset: -10px;
  border-radius: 50%;
}

.color-screen .screen-scroll {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 0 10px 5px;
}

.color-screen .screen-header.compact {
  min-height: 44px;
  flex: 0 0 44px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 5px;
  margin: 0 0 5px;
}

.color-screen .screen-header.compact .header-action {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
}

.color-screen .screen-header.compact h1 {
  font-size: 15px;
}

.studio-actions {
  gap: 5px;
}

.reset-picture-header,
.save-picture-header {
  display: inline-flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 9px;
  border-radius: 11px;
  font: 800 10.5px/1 var(--font-ui);
  cursor: pointer;
}

.reset-picture-header {
  border: 1px solid #e5a4b5;
  background: #fff3f6;
  color: #b54b69;
}

.save-picture-header {
  border: 1px solid #4a9a58;
  background: #318b45;
  color: #fff;
  box-shadow: 0 2px 0 #226c32;
}

.color-screen .artboard-wrap {
  height: auto;
  min-height: 180px;
  max-height: none;
  flex: 1 1 auto;
  margin: 0 -2px 6px;
  border-radius: 14px;
}

.color-screen .palette-bar {
  min-height: 42px;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 13px;
}

.color-screen .swatch,
.color-screen .custom-swatch {
  width: 33px;
  min-width: 33px;
  height: 33px;
  min-height: 33px;
}

.color-screen .tool-area {
  flex: 0 0 auto;
}

.color-screen .tool-row {
  gap: 3px;
  padding-top: 5px;
}

.color-screen .tool-button {
  min-height: 45px;
  gap: 1px;
  padding: 3px 1px 2px;
  border-radius: 10px;
  font-size: 8px;
}

.color-screen #session-progress {
  min-height: 12px;
  flex: 0 0 auto;
  margin: 2px 0 0 !important;
  font-size: 9px;
  line-height: 1.2;
}

.color-screen .brush-size-popover {
  bottom: 49px;
}

@media (max-height: 700px) {
  .color-screen .screen-header.compact {
    min-height: 40px;
    flex-basis: 40px;
  }

  .color-screen .screen-header.compact .header-action,
  .reset-picture-header,
  .save-picture-header {
    min-height: 36px;
  }

  .color-screen .tool-button {
    min-height: 41px;
  }

  .color-screen #session-progress {
    display: block;
    min-height: 10px;
    margin-top: 1px !important;
    font-size: 8.5px;
  }
}
