.image-skeleton,
.skeleton-image {
  --skeleton-base: #e2e2e2;
  display: block;
  background: var(--skeleton-base);
}
[data-theme='dark'] .image-skeleton,
[data-theme='dark'] .skeleton-image {
  --skeleton-base: #666666;
}
.image-skeleton {
  aspect-ratio: 1;
  animation: image-skeleton-pulse 2.2s ease-in-out infinite;
}
.skeleton-image { background: transparent; position: relative; overflow: hidden; }
.skeleton-image[data-image-state='loaded'] { background: transparent; }
.skeleton-image > img { display: block; width: 100%; height: auto; object-fit: contain; transition: opacity .2s ease; }
.skeleton-image[data-image-state='loading'] > img,
.skeleton-image[data-image-state='failed'] > img { opacity: 0; position: absolute; }
.skeleton-image > .image-skeleton,
.skeleton-image-error { position: absolute; inset: 0; aspect-ratio: auto; }
.skeleton-image-error { background: var(--skeleton-base); display: grid; place-items: center; padding: 16px; color: #454545; font-size: 13px; }
[data-theme='dark'] .skeleton-image-error { color: #ffffff; }
@keyframes image-skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) {
  .image-skeleton { animation: none; }
  .skeleton-image > img { transition: none; }
}
html:has(.pull-to-refresh) { overscroll-behavior-y: contain; }
.pull-to-refresh { width: 100%; }
.pull-to-refresh-status { display: flex; align-items: center; justify-content: center; gap: 8px; overflow: hidden; color: var(--muted); font-size: 13px; }
.pull-to-refresh-status .spinning { animation: refresh-spin .8s linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pull-to-refresh-status .spinning { animation: none; } }
.modal.design-detail-modal {
  --design-media-max-height: min(560px, 60dvh);
  width: min(760px, calc(100vw - 24px), max(240px, calc(var(--design-media-max-height) * var(--design-image-ratio, 1.35))));
  max-width: calc(100vw - 24px);
  height: fit-content;
  max-height: 90dvh;
  padding: 0;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 16px;
  background: #d8dce1;
  color: #fff;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.modal.design-detail-modal .modal-content { position: relative; padding: 0; min-width: 0; }
.modal.design-detail-modal .modal-heading { position: sticky; top: 12px; z-index: 4; height: 44px; min-height: 44px; margin: 0 12px -44px; padding: 0 56px; display: flex; justify-content: center; align-items: center; color: #fff; pointer-events: none; }
.modal.design-detail-modal .modal-heading h2 { min-width: 0; max-width: 100%; font-family: 'Noto Sans SC', sans-serif; font-size: clamp(18px, 2.5vw, 27px); font-weight: 500; line-height: 1.3; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.modal.design-detail-modal .modal-heading .modal-close { top: 0; left: 0; right: auto; width: 44px; min-width: 44px; height: 44px; padding: 0; border-radius: 6px; background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: none; pointer-events: auto; }
.design-detail { position: relative; min-width: 0; color: #fff; }
.design-detail-media { position: relative; display: grid; place-items: center; min-height: 72px; overflow: hidden; }
.design-detail-media::after { content: ''; position: absolute; inset: 0 0 auto; height: min(120px, 100%); background: linear-gradient(rgba(0, 0, 0, .56), transparent); pointer-events: none; }
.design-detail-image { display: block; width: min(100%, calc(var(--design-media-max-height) * var(--design-image-ratio, 1.35))); height: auto; aspect-ratio: var(--design-image-ratio, 1.35); max-height: var(--design-media-max-height); object-fit: contain; }
.design-detail-skeleton { position: absolute; inset: 0; aspect-ratio: auto; }
.design-detail-media:has(.design-detail-skeleton)::after { opacity: 0; }
.design-detail-image-unavailable { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 72px 20px 24px; color: #555862; font-size: 14px; }
.design-detail-favorite { position: absolute; top: 12px; right: 12px; z-index: 4; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 6px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; }
.design-detail-favorite.is-favorite { background: rgba(207, 110, 110, .3); }
.design-detail-favorite > img { width: 25px; height: 22px; object-fit: contain; }
.design-detail-content { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 20px; overflow: hidden; background: rgba(52, 55, 65, .7); }
.design-detail-frosted-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(20px); transform: scale(1.12); opacity: .45; z-index: -2; pointer-events: none; }
.design-detail-content::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(83, 86, 94, .2), rgba(42, 44, 52, .48)); z-index: -1; pointer-events: none; }
.design-detail-meta { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; font-family: 'Noto Sans SC', sans-serif; }
.design-detail-meta > span { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 34px; padding: 6px 10px; border-radius: 3px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 13px; overflow-wrap: anywhere; }
.design-detail-meta > .design-detail-category { font-size: 16px; font-weight: 500; }
.design-detail-author > svg { flex: 0 0 auto; }
.design-detail-uses > img { width: 20px; height: 20px; object-fit: contain; }
.design-detail-description { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .38); border-radius: 3px; background: linear-gradient(rgba(154, 154, 154, .28), rgba(56, 58, 67, .31)); box-shadow: 0 4px 7px rgba(0, 0, 0, .16); }
.design-detail-description::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .45) .4px, transparent .5px); background-size: 4.2px 4.2px; mask-image: linear-gradient(90deg, transparent, #000); pointer-events: none; }
.design-detail-description > div { flex: 1; min-width: 0; }
.design-detail-description strong { display: block; margin-bottom: 5px; font-size: 16px; font-weight: 500; line-height: 1.4; }
.design-detail-description p { margin: 0; font-size: 13px; line-height: 1.5; opacity: .82; white-space: pre-wrap; overflow-wrap: anywhere; }
.design-detail-description > svg { flex: 0 0 auto; width: 19px; height: 27px; }
.design-detail-error { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 4px; background: rgba(126, 37, 50, .85); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.design-detail-error > svg { flex: 0 0 auto; margin-top: 1px; }
.design-detail-action { position: relative; container-type: inline-size; }
.design-detail-remix { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 56px; padding: 12px 22px; border: 0; border-radius: 0; background: rgba(36, 36, 45, .65); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); color: #fff; text-align: left; font-size: 18px; font-weight: 500; line-height: 1.4; }
.design-detail-remix:hover:not(:disabled) { background: rgba(36, 36, 45, .85); }
.design-detail-remix > span:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; }
.design-detail-remix > span:first-child > svg { flex: 0 0 auto; }
.design-detail-chevrons { flex: 0 0 auto; display: flex; gap: 9px; }
.design-detail-chevrons svg { display: block; width: 18px; height: 27px; }
.design-detail-corner { position: absolute; width: 32px; height: 30px; pointer-events: none; }
.design-detail-corner-top { top: -2px; left: 0; }
.design-detail-corner-bottom { right: 0; bottom: -2px; }
@media (max-width: 480px) {
  .modal.design-detail-modal { --design-media-max-height: 56dvh; }
  .design-detail-content { padding: 14px 16px 18px; }
  .design-detail-remix { padding: 12px 16px; font-size: 16px; }
  .design-detail-chevrons { gap: 6px; }
  .design-detail-chevrons svg { width: 15px; height: 24px; }
}
@container (max-width: 320px) {
  .design-detail-remix { gap: 10px; padding: 12px; font-size: 16px; }
  .design-detail-chevrons { gap: 4px; }
  .design-detail-chevrons svg { width: 13px; height: 22px; }
}
@media (prefers-reduced-transparency: reduce) {
  .design-detail-frosted-image { display: none; }
  .design-detail-content { background: #555862; }
  .design-detail-meta > span, .design-detail-remix, .design-detail-favorite, .modal.design-detail-modal .modal-close { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@font-face {
  font-family: Silkscreen;
  src: url("/assets/fonts/Silkscreen-Regular.ttf") format("truetype");
  font-display: swap;
}
:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    system-ui, sans-serif;
  font-synthesis: none;
  font-optical-sizing: auto;
  color: #20212b;
  background: #eff1f8;
  --ink: #20212b;
  --muted: #7b7d89;
  --accent: #4c3caf;
  --accent-soft: #e5e1f5;
  --surface: rgba(255, 255, 255, 0.72);
  --solid: #fff;
  --line: rgba(75, 63, 136, 0.15);
  --glass: rgba(240, 241, 249, 0.77);
  --shadow: 0 20px 60px rgba(30, 29, 54, 0.12);
  --danger: #c13d48;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(241, 243, 249, 0.65), rgba(243, 244, 250, 0.8)),
    url("/assets/ui/FigmaIceBackground.png") center/cover no-repeat;
  z-index: -1;
  pointer-events: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:active:not(:disabled) {
  filter: brightness(0.96);
}
a {
  color: inherit;
  text-decoration: none;
}
input,
textarea,
select {
  color: var(--ink);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #9787eb;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
}
img {
  display: block;
  max-width: 100%;
}
svg {
  flex-shrink: 0;
}
textarea {
  resize: vertical;
}
select {
  cursor: pointer;
}
::selection {
  background: #d4cafa;
  color: #302763;
}
[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f0f0f8;
  --muted: #aaa9bb;
  --accent: #b5a3ff;
  --accent-soft: #383047;
  --surface: rgba(30, 31, 46, 0.82);
  --solid: #252635;
  --line: rgba(213, 200, 255, 0.18);
  --glass: rgba(34, 35, 50, 0.82);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  background: #101321;
  color: var(--ink);
}
[data-theme="dark"] body:before {
  background:
    linear-gradient(rgba(13, 17, 30, 0.55), rgba(13, 17, 30, 0.83)),
    url("/assets/ui/FigmaDarkBackground.png") center/cover no-repeat;
}
.glass {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(130%);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.27);
  box-shadow: var(--shadow);
}
.cut-corner {
  clip-path: polygon(
    12px 0,
    100% 0,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    0 100%,
    0 12px
  );
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.primary {
  background: #4c3caf;
  color: #fff;
  box-shadow: 0 4px 14px rgba(76, 60, 175, 0.15);
}
.primary:hover:not(:disabled) {
  background: #5d4bc4;
}
.secondary {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.secondary:hover:not(:disabled) {
  background: var(--accent-soft);
}
.danger {
  background: var(--danger);
  color: white;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
}
.icon-button:hover {
  background: var(--accent-soft);
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 8px 0;
}
.accent {
  color: var(--accent);
}
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.eyebrow {
  font-family: Silkscreen, monospace;
  font-size: 10px;
  letter-spacing: 0.07em;
}
.section-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  transform: translateY(-180%);
  padding: 12px;
  background: var(--solid);
  z-index: 150;
}
.skip-link:focus {
  transform: none;
}
.app-header {
  height: 116px;
  width: min(1264px, 100%);
  margin: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 0;
}
.brand img {
  width: 35px;
  height: 35px;
}
.brand > span {
  font-size: 18px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.brand small {
  display: block;
  font:
    8px Silkscreen,
    monospace;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  background: rgba(127, 129, 151, 0.07);
  border-radius: 16px;
}
.desktop-nav button {
  min-height: 48px;
  padding: 8px 22px;
  font-size: 17px;
  white-space: nowrap;
}
.desktop-nav button.active {
  font-weight: 650;
  color: var(--accent);
  background: var(--accent-soft);
  position: relative;
}
.desktop-nav button.active:before,
.output-tabs button.active:before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(76, 60, 175, 0.4);
  pointer-events: none;
}
.header-actions {
  margin-left: auto;
  display: flex;
  gap: 14px;
  align-items: center;
}
.search-field {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 46px;
  background: rgba(120, 122, 145, 0.07);
  border-radius: 10px;
  padding: 10px 14px;
  width: 210px;
}
.search-field input {
  width: 100%;
  min-width: 0;
  background: none;
  border: 0;
  font-size: 14px;
  outline-offset: 8px;
}
.search-field input::placeholder {
  color: #9394a0;
}
.search-field button {
  display: flex;
  padding: 0;
}
.account-button {
  background: var(--surface);
}
.connection-dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 7px;
  height: 7px;
  background: #45ab8a;
  border-radius: 50%;
  outline: 2px solid var(--solid);
}
.page-content {
  width: min(1264px, 100%);
  margin: auto;
  padding: 28px 32px 110px;
  min-height: calc(100dvh - 116px);
}
.hero {
  height: 290px;
  position: relative;
  margin: 18px 0 36px;
}
.hero-shell {
  height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg, #040405 25%, #101217);
  clip-path: polygon(
    40px 0,
    100% 0,
    100% calc(100% - 40px),
    calc(100% - 40px) 100%,
    0 100%,
    0 40px
  );
}
.hero-dots {
  position: absolute;
  inset: 0 0 0 40%;
  background: radial-gradient(#9296b24d 0.9px, transparent 1px) 0 0/10px 10px;
  mask-image: linear-gradient(90deg, transparent, black);
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 44px 35px;
  width: 58%;
  color: white;
}
.hero-copy .eyebrow {
  color: #99999d;
}
.hero h1 {
  font-size: 34px;
  margin: 14px 0;
  font-weight: 600;
  line-height: 1.3;
}
.hero p {
  font-size: 19px;
  font-weight: 400;
  color: #ededf0;
  margin-bottom: 22px;
}
.hero-cta {
  background: #ffffff1c;
  color: #fff;
  font-size: 13px;
  border-radius: 0;
  padding: 10px 15px;
  min-height: 40px;
}
.hero-cta:hover {
  background: #ffffff2e;
}
.hero-product {
  position: absolute;
  right: 1.5%;
  top: -27px;
  width: 44%;
  height: calc(100% + 46px);
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 16px 12px rgba(0, 0, 0, 0.2));
}
.hero-echo {
  position: absolute;
  right: 15%;
  top: 8%;
  width: 56%;
  height: 120%;
  object-fit: contain;
  opacity: 0.22;
  filter: blur(5px) grayscale(0.4);
}
.hero-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--accent-soft);
  filter: drop-shadow(2px 2px 0 #a4a6b6);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  pointer-events: none;
}
.top-left {
  top: -3px;
  left: -3px;
}
.bottom-right {
  bottom: -3px;
  right: -3px;
  rotate: 180deg;
}
.section-heading {
  display: flex;
  gap: 17px;
  align-items: center;
  margin: 0 0 24px;
  min-height: 44px;
}
.section-heading h2 {
  font-size: 21px;
  line-height: 1.3;
  white-space: nowrap;
  position: relative;
  padding-left: 18px;
}
.section-heading h2:before {
  content: "";
  position: absolute;
  left: 0;
  top: -5px;
  bottom: -5px;
  width: 8px;
  border: 1px solid var(--accent);
  border-right: 0;
}
.heading-line {
  height: 1px;
  flex: 1;
  background: var(--line);
}
.count {
  font:
    600 23px ui-monospace,
    monospace;
  color: var(--muted);
}
.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  padding: 9px 12px;
  border: 1px solid var(--line);
  font-size: 14px;
  min-height: 44px;
}
.sort-control select {
  border: 0;
  background: transparent;
  font-weight: 500;
  max-width: 85px;
}
.sort-control option {
  background: var(--solid);
}
.category-tabs {
  display: flex;
  align-items: end;
  gap: 0;
  margin: 0 -12px 20px;
  background: rgba(110, 112, 140, 0.06);
  border-radius: 18px 18px 0 0;
  padding-top: 6px;
}
.category-tabs button {
  flex: 1;
  min-height: 56px;
  font-size: 17px;
  white-space: nowrap;
  border-radius: 20px 20px 0 0;
  position: relative;
}
.category-tabs button.active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
}
.category-tabs button.active:before,
.category-tabs button.active:after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 16px;
  height: 16px;
  background: transparent;
  pointer-events: none;
}
.category-tabs button.active:before {
  left: -16px;
  border-radius: 0 0 16px 0;
  box-shadow: 5px 5px 0 5px var(--surface);
}
.category-tabs button.active:after {
  right: -16px;
  border-radius: 0 0 0 16px;
  box-shadow: -5px 5px 0 5px var(--surface);
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 20px;
}
/* Original cut-corner cards, now sized by the source image rather than a fixed frame. */
.template-card {
  position: relative;
  container-type: inline-size;
  --card-cut: 20px;
  min-width: 0;
  background: #ddd;
  clip-path: polygon(var(--card-cut) 0,100% 0,100% 100%,0 100%,0 var(--card-cut));
}
[data-theme='dark'] .template-card {
  background: linear-gradient(145deg,#464854,#272a34);
}
.card-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
}
.card-media > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  border-radius: 0;
  object-fit: contain;
}
.card-media > .image-placeholder {
  width: 100%;
  aspect-ratio: 1;
  padding: 16px;
  overflow-wrap: anywhere;
}
.card-media > .skeleton-image { width: 100%; }
.image-placeholder:has(> .image-skeleton) { position: relative; padding: 0; }
.image-placeholder > .image-skeleton { position: absolute; inset: 0; aspect-ratio: auto; }
.template-card:has([data-image-state='loading'], [data-image-state='failed'], .image-placeholder) .card-shade { opacity: 0; }
.template-card:has([data-image-state='loading'], [data-image-state='failed'], .image-placeholder) .card-info { color: #454545; }
[data-theme='dark'] .template-card:has([data-image-state='loading'], [data-image-state='failed'], .image-placeholder) .card-info { color: #ffffff; }
.template-card:has([data-image-state='loading'], [data-image-state='failed'], .image-placeholder) .card-info h3 { text-shadow: none; }
.card-shade {
  position: absolute;
  inset: auto 0 0;
  height: 36.44%;
  background: linear-gradient(transparent,rgba(0,0,0,.08) 48%,rgba(0,0,0,.42));
  pointer-events: none;
}
.card-info {
  position: absolute;
  inset: 0;
  color: #fff;
  pointer-events: none;
}
.card-info h3 {
  position: absolute;
  left: 6.275%;
  bottom: calc(3.82% + 15.3cqw);
  width: 83.66%;
  height: 11.63cqw;
  font: 500 7.752cqw/1.5 'Noto Sans SC',sans-serif;
  letter-spacing: -.109cqw;
  text-shadow: 0 1px 2px rgba(0,0,0,.42);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.card-info h3 > span,
.card-category > span {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.card-category > span { text-align:center; }
.card-meta {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: space-between;
  left: 6.275%;
  right: 3.65%;
  bottom: 3.82%;
  height: 11.5cqw;
  gap: 8px;
}
.card-meta > span {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 100%;
  font: 500 6.889cqw/1 'Noto Sans SC',sans-serif;
  letter-spacing: -.108cqw;
  border-radius: 2px;
  padding: 0 1.4cqw;
  background: rgba(94,98,120,.46);
}
.card-meta > .card-category { width:32.05cqw; justify-content:center; overflow:hidden; }
.card-meta > .card-secondary { width:28.49cqw; font:5.794cqw/1 Silkscreen,monospace; padding:0; gap:1.2cqw; justify-content:center; margin-left:auto; }
.card-meta > span img { width:10.08cqw; height:9.56cqw; object-fit:contain; }
.favorite-button {
  position: absolute;
  right: 3.65%;
  top: 3.83%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16.037cqw;
  height: 16.735cqw;
  border-radius: 3.787cqw;
  background: rgba(56,58,67,.66);
  color: white;
  z-index: 3;
}
.favorite-button img { width:9.72cqw; height:8.59cqw; object-fit:contain; }
.favorite-button:hover { background:#535662b0; }
.favorite-button.is-favorite { background:rgba(207,110,110,.30); }
.page-footnote {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.07em;
  margin-top: 34px;
}
.page-footnote > span:first-child {
  font-family: Silkscreen, monospace;
}
.floating-create {
  position: fixed;
  bottom: 32px;
  right: max(32px, calc((100vw - 1200px) / 2));
  padding: 15px 22px;
  display: flex;
  gap: 10px;
  align-items: center;
  background: linear-gradient(120deg, #8064fa, #493ab2);
  color: white;
  min-height: 56px;
  font-size: 17px;
  font-weight: 600;
  filter: drop-shadow(0 8px 15px #5342c12a);
  z-index: 5;
}
.mobile-nav {
  display: none;
}
.readable-page {
  max-width: 1000px;
  margin: 0 auto;
}
.page-heading {
  margin: 14px 0 32px;
}
.page-heading h1 {
  font-size: 32px;
  margin: 12px 0 10px;
}
.page-heading p {
  color: var(--muted);
  font-size: 15px;
}
.inspiration-composer {
  padding: 24px;
  border-radius: 24px;
}
.inspiration-composer textarea {
  border: 0;
  background: none;
  min-height: 90px;
  width: 100%;
  font-size: 16px;
  line-height: 1.8;
  padding: 0;
  resize: none;
}
.composer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 11px;
  background: rgba(127, 129, 151, 0.09);
  gap: 3px;
}
.segmented button {
  padding: 9px 18px;
  min-height: 42px;
  font-size: 15px;
  border-radius: 8px;
  white-space: nowrap;
}
.segmented button.active {
  background: var(--solid);
  color: var(--accent);
  box-shadow: 0 2px 7px rgba(30, 25, 70, 0.06);
  font-weight: 600;
}
.segmented.small button {
  font-size: 12px;
  min-height: 36px;
  padding: 8px 12px;
}
.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 40px;
}
.suggestion-chips button {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 12px;
  color: var(--muted);
  font-size: 12px;
}
.suggestion-chips button:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.inspiration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.reference-card {
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0 0 14px;
}
.reference-card > img,
.reference-card > .reference-preview {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  border-radius: 0;
}
.reference-card h3 {
  padding: 14px 14px 0;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reference-card p {
  font-size: 12px;
  padding: 7px 14px 0;
  color: var(--muted);
}
.reference-preview {
  max-height: 400px;
  object-fit: contain;
  border-radius: 12px;
  width: 100%;
  background: rgba(128, 128, 145, 0.1);
}
.image-placeholder {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.profile-heading {
  display: flex;
  gap: 19px;
  align-items: center;
  margin: 12px 0 25px;
}
.profile-heading > div:nth-child(2) {
  flex: 1;
}
.profile-heading h1 {
  font-size: 24px;
}
.profile-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.avatar {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.cloud-connect {
  margin: 0 0 25px;
}
.collection-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.collection-toolbar > .icon-button {
  margin-left: auto;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.project-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.project-open {
  text-align: left;
  padding: 0;
  width: 100%;
}
.project-open img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: rgba(150, 155, 164, 0.13);
}
.project-open > div {
  padding: 16px 16px 7px;
}
.project-open h3 {
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-open p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
.project-actions {
  display: flex;
  align-items: center;
  padding: 0 12px 10px;
}
.project-actions > .text-button {
  flex: 1;
  margin-left: 4px;
}
.project-actions > .icon-button {
  width: 34px;
  height: 34px;
}
.cloud-projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.cloud-project {
  padding: 20px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: left;
}
.cloud-project span {
  flex: 1;
}
.cloud-project strong {
  display: block;
  font-size: 14px;
}
.cloud-project small {
  font-size: 11px;
  color: var(--muted);
}
.empty-state {
  min-height: 320px;
  padding: 45px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: var(--muted);
}
.empty-state h2 {
  font-size: 19px;
  color: var(--ink);
  margin: 20px 0 12px;
}
.empty-state p {
  max-width: 320px;
  font-size: 14px;
  line-height: 1.9;
  margin-bottom: 24px;
}
.modal {
  padding: 0;
  background: var(--solid);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 24px;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  box-shadow: 0 30px 100px rgba(13, 12, 35, 0.23);
  overscroll-behavior: contain;
}
.modal::backdrop {
  background: rgba(15, 16, 29, 0.5);
  backdrop-filter: blur(7px);
}
.modal-wide {
  width: min(960px, calc(100vw - 48px));
}
.modal-content {
  padding: 26px;
}
.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.modal-heading h2 {
  font-size: 20px;
}
.modal-heading .icon-button {
  background: rgba(127, 129, 151, 0.07);
}
.panel-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field-label {
  font-size: 13px;
  font-weight: 500;
  display: block;
  line-height: 1.7;
}
.form-field {
  display: block;
  background: rgba(127, 129, 151, 0.07);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 100%;
  padding: 12px 13px;
  margin-top: 7px;
  min-height: 46px;
  font-size: 14px;
}
.notice {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.8;
}
.notice.error {
  color: var(--danger);
  background: rgba(208, 49, 63, 0.08);
}
.notice strong {
  font-size: 14px;
}
.notice p {
  margin-top: 5px;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}
.appearance-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.appearance-options button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(127, 129, 151, 0.06);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 6px;
  min-height: 112px;
  font-size: 13px;
  position: relative;
}
.appearance-options button.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}
.appearance-options button > svg:last-child:not(:first-child) {
  position: absolute;
  top: 8px;
  right: 8px;
}
.upload-zone {
  border: 1px dashed var(--line);
  border-radius: 16px;
  min-height: 190px;
  overflow: hidden;
  background: rgba(127, 129, 151, 0.05);
}
.upload-button {
  min-height: 190px;
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.upload-button strong {
  color: var(--ink);
  font-size: 16px;
}
.upload-button > svg {
  color: var(--accent);
}
.upload-button > img {
  max-height: 250px;
  object-fit: contain;
  border-radius: 7px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 20px;
  border-radius: 16px;
  z-index: 200;
  max-width: min(90vw, 600px);
  font-size: 13px;
}
.toast > .icon-button {
  width: 30px;
  height: 30px;
}
.spinning,
.spin {
  animation: spin 1.2s linear infinite;
}
@keyframes spin {
  to {
    rotate: 360deg;
  }
}
.studio-editor {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--glass);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  overflow: auto;
  color: var(--ink);
}
.studio-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 22px 30px;
  flex-shrink: 0;
}
.studio-project-heading,
.studio-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 18px;
  background: var(--surface);
}
.studio-project-heading > div {
  padding-right: 16px;
  max-width: 300px;
}
.studio-project-heading h1,
.studio-project-heading strong {
  font-size: 16px;
}
.studio-project-heading small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.studio-top-actions .button {
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  padding: 9px 13px;
}
.studio-top-actions .primary {
  color: var(--accent);
}
.studio-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 25px;
  align-items: center;
  flex: 1;
  min-height: 0;
  padding: 0 30px 26px;
}
.output-tabs {
  display: flex;
  justify-content: center;
  gap: 7px;
  align-self: center;
  width: max-content;
  padding: 5px;
  border-radius: 13px;
  background: rgba(127, 129, 151, 0.08);
  margin-bottom: 15px;
  flex-shrink: 0;
}
.output-tabs button {
  padding: 9px 28px;
  min-height: 42px;
  font-size: 15px;
  position: relative;
  white-space: nowrap;
}
.output-tabs button.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
  clip-path: polygon(
    6px 0,
    100% 0,
    100% calc(100% - 6px),
    calc(100% - 6px) 100%,
    0 100%,
    0 6px
  );
}
.studio-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  gap: 14px;
}
.stage-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(152, 157, 169, 0.17);
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage-artwork {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: calc(100dvh - 235px);
}
.stage-toolbar {
  position: absolute;
  bottom: 15px;
  right: 15px;
  display: flex;
  gap: 5px;
  align-items: center;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  padding: 4px;
  z-index: 2;
}
.stage-toolbar .icon-button {
  width: 34px;
  height: 34px;
}
.version-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 11px;
  color: var(--muted);
  z-index: 2;
}
.studio-composer {
  padding: 20px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.composer-tools .button,
.composer-tools button {
  font-size: 13px;
}
.composer-input {
  border: 0;
  background: transparent;
  width: 100%;
  min-height: 220px;
  line-height: 1.8;
  resize: none;
  font-size: 16px;
  padding: 4px 0;
}
.composer-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.composer-submit .primary {
  border-radius: 999px;
  padding: 12px 23px;
}
.composer-submit .muted {
  font-size: 11px;
}
.studio-side-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}
.version-strip {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  max-width: 100%;
  padding: 3px 2px 7px;
  flex-shrink: 0;
}
.version-thumbnail {
  flex-shrink: 0;
  position: relative;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  width: 76px;
  background: var(--surface);
  font-size: 10px;
  color: var(--muted);
}
.version-thumbnail > img {
  width: 72px;
  height: 58px;
  object-fit: contain;
  background: rgba(127, 129, 151, 0.09);
}
.version-thumbnail > span {
  display: block;
  padding: 4px;
}
.version-thumbnail.active,
.version-thumbnail[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.studio-modal-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.studio-modal-tabs button {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 9px;
  background: rgba(127, 129, 151, 0.07);
  font-size: 13px;
}
.studio-modal-tabs button.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.reference-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-height: 390px;
  overflow: auto;
  padding: 4px;
}
.reference-item {
  border: 2px solid transparent;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  font-size: 11px;
  background: var(--surface);
  text-align: left;
}
.reference-item img {
  aspect-ratio: 1;
  object-fit: contain;
  width: 100%;
  background: rgba(127, 129, 151, 0.09);
}
.reference-item span {
  display: block;
  padding: 9px 6px;
}
.reference-item .skeleton-image,
.reference-item .image-skeleton { padding: 0; }
.reference-item > .skeleton-image { width: 100%; aspect-ratio: 1; }
.reference-item.active,
.reference-item[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.language-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.language-chips button {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
}
.language-chips button.active,
.language-chips button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.constraint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.region-canvas {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1;
  touch-action: none;
  margin: 0 auto;
  background: rgba(127, 129, 151, 0.12);
  border-radius: 12px;
  overflow: hidden;
  cursor: crosshair;
}
.region-canvas > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.region-selection {
  position: absolute;
  border: 2px solid var(--accent);
  background: rgba(125, 102, 226, 0.16);
  pointer-events: none;
}
.output-stage {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
}
.output-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 17px;
  text-align: center;
  padding: 30px;
  min-height: 250px;
}
.output-empty h2 {
  font-size: 22px;
}
.output-empty p {
  font-size: 13px;
  color: var(--muted);
  max-width: 300px;
}
.output-assets {
  width: 100%;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.output-assets img,
.output-assets video {
  max-height: calc(100dvh - 270px);
  width: 100%;
  object-fit: contain;
  border-radius: 16px;
}
.output-assets model-viewer {
  width: 100%;
  height: calc(100dvh - 290px);
  min-height: 280px;
  background: transparent;
}
.compare-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.compare-image img {
  position: absolute;
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: white;
  box-shadow: 0 0 3px #323342;
  pointer-events: none;
}
.compare-control {
  position: absolute;
  bottom: 65px;
  left: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--glass);
  padding: 9px 14px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  z-index: 2;
  font-size: 11px;
}
.compare-control input {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
}
.fullscreen-artwork {
  width: 100%;
  max-height: 72dvh;
  object-fit: contain;
  touch-action: pan-x pan-y;
}
.quote-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
}
.quote-details strong {
  font-size: 26px;
  display: block;
}
.studio-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.studio-history button {
  display: flex;
  gap: 14px;
  text-align: left;
  align-items: center;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.studio-history img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(127, 129, 151, 0.1);
}
.studio-history strong {
  font-size: 13px;
}
.studio-history p {
  font-size: 12px;
  color: var(--muted);
}
.generation-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 23, 60, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 15px;
  color: #fff;
  z-index: 3;
  backdrop-filter: blur(18px);
}
.generation-overlay svg {
  color: #c6baff;
}
.generation-overlay p {
  font-size: 13px;
  color: #e3dfed;
}
.studio-editor ~ .toast {
  z-index: 45;
}
@media (min-width: 1500px) {
  .studio-workspace {
    grid-template-columns: minmax(0, 1fr) 440px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding-bottom: 35px;
  }
  .composer-input {
    min-height: 280px;
  }
  .hero {
    height: 305px;
  }
}
@media (max-width: 1100px) {
  .brand > span {
    display: none;
  }
  .app-header {
    gap: 18px;
    padding: 18px 24px;
  }
  .desktop-nav button {
    font-size: 16px;
    padding: 8px 18px;
  }
  .page-content {
    padding-left: 24px;
    padding-right: 24px;
  }
  .template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero {
    height: 275px;
  }
  .hero-copy {
    padding: 40px 28px;
  }
  .hero h1 {
    font-size: 30px;
  }
  .hero p {
    font-size: 17px;
  }
  .studio-workspace {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    padding: 0 24px 25px;
  }
  .studio-topbar {
    padding: 18px 24px;
  }
  .composer-input {
    min-height: 190px;
  }
}
@media (max-width: 800px) {
  .app-header {
    gap: 12px;
    height: 94px;
    padding: 15px 20px;
  }
  .brand {
    display: none;
  }
  .desktop-nav {
    gap: 0;
    padding: 5px;
  }
  .desktop-nav button {
    padding: 8px 15px;
    font-size: 15px;
  }
  .search-field {
    width: 155px;
  }
  .header-actions {
    gap: 10px;
  }
  .hero {
    height: 235px;
    margin-top: 14px;
  }
  .hero-copy {
    padding: 31px 24px;
    width: 58%;
  }
  .hero h1 {
    font-size: 26px;
    margin: 12px 0;
  }
  .hero p {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 18px;
  }
  .hero-product {
    width: 44%;
    top: -18px;
    height: calc(100% + 28px);
  }
  .page-content {
    padding-top: 18px;
    min-height: calc(100dvh - 94px);
  }
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .studio-workspace {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 18px;
    overflow: auto;
    padding-bottom: 26px;
  }
  .studio-stage {
    min-height: 300px;
    height: 48dvh;
    flex-shrink: 0;
  }
  .stage-image-wrap {
    min-height: 270px;
  }
  .stage-artwork {
    max-height: 48dvh;
  }
  .studio-side-panel {
    max-width: 700px;
    width: 100%;
    align-self: center;
  }
  .studio-composer {
    border-radius: 20px;
    padding: 18px;
  }
  .composer-input {
    min-height: 90px;
  }
  .studio-top-actions {
    gap: 0;
  }
  .studio-top-actions .button {
    padding: 8px;
  }
  .studio-project-heading > div {
    max-width: 210px;
  }
  .output-tabs button {
    padding: 8px 23px;
  }
  .studio-topbar {
    padding: 14px 20px;
  }
  .studio-editor .version-strip {
    padding-bottom: 3px;
  }
  .output-assets model-viewer {
    height: 42dvh;
  }
  .output-assets video,
  .output-assets img {
    max-height: 43dvh;
  }
}
@media (max-width: 600px) {
  .app-header {
    height: 80px;
    padding: 15px 16px;
    gap: 12px;
  }
  .brand {
    display: flex;
  }
  .brand > span {
    display: block;
    font-size: 16px;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  .desktop-nav {
    display: none;
  }
  .header-actions {
    gap: 8px;
  }
  .search-field {
    width: 165px;
    min-height: 42px;
    padding: 9px 11px;
  }
  .search-field input {
    font-size: 13px;
  }
  .account-button {
    width: 36px;
    height: 36px;
  }
  .page-content {
    padding: 18px 16px 105px;
    min-height: calc(100dvh - 80px);
  }
  .hero {
    height: 195px;
    margin: 12px 0 27px;
  }
  .hero-shell {
    clip-path: polygon(
      25px 0,
      100% 0,
      100% calc(100% - 25px),
      calc(100% - 25px) 100%,
      0 100%,
      0 25px
    );
  }
  .hero-copy {
    padding: 28px 18px;
    width: 55%;
  }
  .hero .eyebrow {
    font-size: 7px;
    letter-spacing: 0.02em;
  }
  .hero h1 {
    font-size: 22px;
    white-space: nowrap;
    margin: 12px 0 9px;
  }
  .hero p {
    font-size: 12px;
    line-height: 1.7;
    max-width: 170px;
    margin-bottom: 14px;
  }
  .hero-cta {
    font-size: 10px;
    gap: 5px;
    min-height: 31px;
    padding: 7px 9px;
  }
  .hero-cta svg {
    width: 13px;
  }
  .hero-product {
    right: 1%;
    width: 49%;
    height: calc(100% + 20px);
    top: -14px;
  }
  .hero-corner {
    width: 25px;
    height: 25px;
  }
  .section-heading {
    gap: 10px;
    margin-bottom: 17px;
  }
  .section-heading h2 {
    font-size: 18px;
    padding-left: 14px;
  }
  .count {
    font-size: 18px;
  }
  .sort-control {
    font-size: 12px;
    padding: 7px 8px;
    min-height: 38px;
    gap: 5px;
  }
  .category-tabs {
    background: none;
    gap: 7px;
    overflow: auto;
    margin: 0 -1px 17px;
    padding: 2px 1px;
    scrollbar-width: none;
  }
  .category-tabs button {
    flex: 0 0 auto;
    min-height: 42px;
    font-size: 12px;
    padding: 9px 14px;
    border-radius: 8px;
    background: rgba(127, 129, 151, 0.07);
  }
  .category-tabs button.active {
    background: var(--accent-soft);
    color: var(--accent);
  }
  .category-tabs button.active:before,
  .category-tabs button.active:after {
    display: none;
  }
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }
  .favorite-button svg {
    width: 20px;
    height: 20px;
  }
  .floating-create {
    display: none;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 16px;
    right: 16px;
    border-radius: 20px;
    padding: 7px;
    z-index: 10;
  }
  .mobile-nav button {
    flex: 1;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 10px;
    border-radius: 13px;
    color: var(--muted);
  }
  .mobile-nav button.active {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 600;
  }
  .mobile-nav button:last-child {
    background: #4c3caf;
    color: white;
    flex: 0 0 58px;
    margin-left: 5px;
  }
  .page-footnote {
    font-size: 9px;
    gap: 15px;
    margin-top: 25px;
  }
  .page-footnote > span:first-child {
    max-width: 120px;
    line-height: 1.8;
  }
  .page-heading {
    margin-top: 10px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .page-heading p {
    font-size: 13px;
  }
  .inspiration-composer {
    padding: 18px;
    border-radius: 18px;
  }
  .inspiration-composer textarea {
    font-size: 14px;
    min-height: 95px;
  }
  .composer-bottom {
    gap: 6px;
  }
  .composer-bottom > .button {
    font-size: 12px;
    padding: 10px 12px;
  }
  .segmented.small button {
    font-size: 11px;
    padding: 7px 9px;
  }
  .suggestion-chips {
    margin-bottom: 30px;
    gap: 8px;
  }
  .suggestion-chips button {
    font-size: 11px;
    padding: 7px 10px;
  }
  .inspiration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .profile-heading {
    gap: 12px;
    margin-top: 4px;
  }
  .profile-heading h1 {
    font-size: 19px;
  }
  .profile-heading p {
    font-size: 11px;
  }
  .avatar {
    width: 50px;
    height: 50px;
  }
  .avatar svg {
    width: 27px;
  }
  .profile-heading > .icon-button {
    width: 36px;
    height: 36px;
  }
  .segmented button {
    font-size: 13px;
    padding: 8px 15px;
    min-height: 38px;
  }
  .project-grid {
    gap: 14px 12px;
  }
  .project-open > div {
    padding: 12px 12px 7px;
  }
  .project-open h3 {
    font-size: 13px;
  }
  .project-open p {
    font-size: 10px;
  }
  .project-actions {
    padding: 0 8px 8px;
    flex-wrap: wrap;
  }
  .project-actions .text-button {
    font-size: 11px;
  }
  .project-actions > .icon-button {
    width: 27px;
    height: 30px;
  }
  .project-actions > .icon-button svg {
    width: 15px;
  }
  .cloud-projects {
    grid-template-columns: 1fr;
  }
  .modal-wide {
    width: calc(100vw - 24px);
  }
  .modal-content {
    padding: 20px;
  }
  .modal-heading {
    margin-bottom: 20px;
  }
  .modal-heading h2 {
    font-size: 18px;
  }
  .modal {
    border-radius: 20px;
    max-height: calc(100dvh - 24px);
  }
  .toast {
    bottom: 91px;
    font-size: 12px;
  }
  .studio-topbar {
    padding: 12px;
    gap: 7px;
  }
  .studio-project-heading {
    gap: 4px;
    padding: 3px;
  }
  .studio-project-heading .icon-button {
    width: 34px;
    height: 34px;
  }
  .studio-project-heading > div {
    max-width: 135px;
    padding-right: 5px;
  }
  .studio-project-heading h1,
  .studio-project-heading strong {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .studio-project-heading small {
    font-size: 9px;
  }
  .studio-top-actions {
    padding: 3px;
    border-radius: 12px;
  }
  .studio-top-actions .button {
    font-size: 11px;
    gap: 4px;
    padding: 8px 5px;
    min-height: 35px;
  }
  .studio-top-actions .button svg {
    width: 17px;
    height: 17px;
  }
  .studio-top-actions .icon-button {
    width: 32px;
    height: 35px;
  }
  .studio-workspace {
    padding: 0 12px 18px;
    gap: 12px;
  }
  .output-tabs {
    margin-bottom: 11px;
    padding: 4px;
    gap: 3px;
  }
  .output-tabs button {
    font-size: 13px;
    padding: 7px 21px;
    min-height: 36px;
  }
  .studio-stage {
    height: 40dvh;
    min-height: 250px;
    gap: 8px;
  }
  .stage-image-wrap {
    min-height: 230px;
    border-radius: 16px;
  }
  .stage-artwork {
    max-height: 40dvh;
  }
  .studio-composer {
    padding: 16px;
    gap: 12px;
    border-radius: 19px;
  }
  .composer-input {
    min-height: 86px;
    font-size: 14px;
  }
  .composer-tools .button {
    font-size: 12px;
    padding: 6px 8px;
    min-height: 34px;
  }
  .composer-submit .primary {
    font-size: 13px;
    padding: 11px 18px;
  }
  .version-badge {
    top: 10px;
    left: 10px;
    font-size: 10px;
    padding: 6px 9px;
  }
  .stage-toolbar {
    bottom: 10px;
    right: 10px;
    padding: 3px;
  }
  .stage-toolbar .icon-button {
    width: 31px;
    height: 31px;
  }
  .reference-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }
  .constraint-grid {
    grid-template-columns: 1fr;
  }
  .studio-modal-tabs {
    gap: 5px;
  }
  .studio-modal-tabs button {
    font-size: 11px;
    padding: 7px 9px;
  }
  .fullscreen-artwork {
    max-height: 65dvh;
  }
  .empty-state {
    min-height: 290px;
  }
  .appearance-options button {
    padding: 18px 5px;
  }
  .page-content .notice {
    margin-bottom: 20px;
  }
  .studio-editor ~ .toast {
    bottom: 18px;
  }
  .output-assets model-viewer {
    height: 36dvh;
    min-height: 240px;
  }
}
@media (max-width: 370px) {
  .brand > span {
    display: none;
  }
  .search-field {
    width: 170px;
  }
  .hero h1 {
    font-size: 20px;
  }
  .hero p {
    font-size: 11px;
  }
  .hero .eyebrow {
    font-size: 6px;
  }
  .card-meta > .card-secondary {
    font-size: 6px;
  }
  .studio-project-heading > div {
    max-width: 100px;
  }
  .output-tabs button {
    padding: 7px 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card-open:hover > img {
    transform: none;
  }
}
.project-name-button {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  padding: 4px 12px 4px 2px;
  max-width: 310px;
}
.project-name-button > .section-label {
  font:
    8px Silkscreen,
    monospace;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.project-name-button strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.studio-top-actions small {
  font:
    10px ui-monospace,
    monospace;
  color: var(--muted);
}
.output-tabs button {
  display: flex;
  gap: 7px;
  align-items: center;
}
.output-tabs svg {
  width: 16px;
}
.stage-status {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  z-index: 3;
  max-width: calc(100% - 28px);
}
.stage-status .version-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.demo-badge {
  font-size: 10px;
  padding: 6px 9px;
  border-radius: 7px;
  color: var(--accent);
  background: var(--accent-soft);
  line-height: 1.5;
}
.studio-stage > .stage-toolbar {
  position: static;
  box-shadow: none;
  align-self: center;
  flex-shrink: 0;
}
.studio-stage > .compare-control {
  position: static;
  width: min(480px, 100%);
  flex-shrink: 0;
}
.stage-toolbar .button {
  font-size: 12px;
  min-height: 34px;
  padding: 5px 12px;
  border: 0;
  background: transparent;
}
.composer-heading {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}
.composer-heading > .section-label {
  font:
    8px Silkscreen,
    monospace;
}
.composer-heading > .muted {
  font-size: 10px;
}
.composer-tools > button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(127, 129, 151, 0.07);
}
.composer-tools > button.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.composer-tools img {
  width: 19px;
  height: 19px;
  object-fit: contain;
}
.studio-composer > .composer-submit {
  justify-content: center;
  width: 100%;
  border-radius: 999px;
  min-height: 46px;
}
.composer-caption {
  font-size: 11px;
  text-align: center;
  line-height: 1.7;
}
.brief-summary {
  font-size: 11px;
}
.video-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.video-settings .form-field {
  font-size: 12px;
  padding: 9px;
}
.version-strip-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: -10px;
}
.version-strip-heading > .text-button {
  font-size: 11px;
}
.version-thumbnail.selected {
  border-color: var(--accent);
  color: var(--accent);
}
.version-thumbnail > svg {
  position: absolute;
  top: 3px;
  right: 3px;
  color: var(--accent);
}
.history-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.history-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  min-width: 0;
}
.history-card.selected {
  border-color: var(--accent);
}
.history-artwork {
  width: 100%;
  padding: 0;
  background: rgba(127, 129, 151, 0.1);
}
.history-artwork img {
  width: 100%;
  aspect-ratio: 1.1;
  object-fit: contain;
}
.history-card-copy {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
}
.history-card-copy strong {
  font-size: 14px;
}
.history-card-copy .muted {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.history-card-copy p {
  font-size: 11px;
  white-space: pre-line;
  max-height: 72px;
  overflow: auto;
  line-height: 1.8;
}
.history-card-copy .demo-badge {
  font-size: 9px;
  align-self: start;
}
.history-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px 10px;
}
.history-card-actions > .button {
  min-height: 34px;
  font-size: 10px;
  padding: 7px 10px;
  flex: 1;
}
.history-card-actions > .icon-button {
  width: 31px;
  height: 32px;
}
.tool-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.custom-language {
  display: flex;
  gap: 10px;
  align-items: center;
}
.custom-language .form-field {
  margin: 0;
}
.reference-item.selected {
  border-color: var(--accent);
  color: var(--accent);
  position: relative;
}
.reference-item > svg {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--solid);
  border-radius: 50%;
}
.output-asset {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  min-height: 0;
}
.output-asset > .button {
  font-size: 12px;
}
.quote-details {
  display: flex;
  padding: 0;
  background: transparent;
}
.quote-details > img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(127, 129, 151, 0.1);
}
.quote-cost {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--accent-soft);
  border-radius: 12px;
  color: var(--accent);
}
.quote-cost strong {
  font-size: 25px;
}
.fullscreen-artwork {
  max-height: none;
}
.fullscreen-image {
  overflow: auto;
  max-height: 65dvh;
  border-radius: 12px;
  background: rgba(127, 129, 151, 0.08);
  margin-bottom: 18px;
}
.fullscreen-image img {
  width: 100%;
  max-height: 65dvh;
  object-fit: contain;
  transform-origin: top left;
}
.creative-tools .field-label > input[type="range"] {
  width: 100%;
  margin-top: 15px;
  accent-color: var(--accent);
}
@media (max-width: 600px) {
  .project-name-button {
    max-width: 145px;
    padding-right: 6px;
  }
  .project-name-button strong {
    font-size: 11px;
  }
  .project-name-button > .section-label {
    font-size: 7px;
  }
  .output-tabs button {
    padding: 7px 15px;
    gap: 5px;
  }
  .output-tabs svg {
    width: 14px;
  }
  .stage-status {
    top: 9px;
    left: 9px;
    gap: 5px;
    max-width: calc(100% - 18px);
  }
  .demo-badge {
    font-size: 8px;
    padding: 5px 7px;
  }
  .stage-status .version-badge {
    font-size: 9px;
  }
  .history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .history-card-copy {
    padding: 10px;
  }
  .history-card-actions {
    padding: 0 7px 8px;
  }
  .history-card-actions > .button {
    font-size: 9px;
    padding: 6px;
  }
  .composer-tools > button {
    font-size: 11px;
    padding: 7px;
    gap: 5px;
  }
  .composer-tools img,
  .composer-tools svg {
    width: 16px;
    height: 16px;
  }
  .composer-heading > .section-label {
    font-size: 7px;
  }
  .studio-stage > .stage-toolbar {
    gap: 2px;
    padding: 3px;
  }
  .studio-stage > .stage-toolbar .button {
    font-size: 11px;
    padding: 4px 8px;
  }
  .composer-caption {
    font-size: 10px;
  }
  .studio-workspace > .studio-stage {
    height: 42dvh;
  }
  .stage-image-wrap {
    height: 100%;
    min-height: 0;
  }
  .stage-artwork {
    max-height: 36dvh;
  }
  .studio-stage .compare-control {
    padding: 6px 12px;
  }
  .video-settings .form-field {
    padding: 8px;
    font-size: 11px;
  }
  .output-asset model-viewer {
    min-height: 230px !important;
  }
  .custom-language {
    gap: 7px;
  }
  .custom-language > .button {
    font-size: 12px;
    padding: 11px 12px;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .glass,
  .stage-toolbar,
  .version-badge,
  .studio-editor {
    background: var(--solid);
    backdrop-filter: none;
  }
  .modal::backdrop {
    backdrop-filter: none;
  }
}
.app-content-hidden {
  display: none;
}
.studio-editor {
  background:
    linear-gradient(rgba(241, 243, 249, 0.67), rgba(243, 244, 250, 0.86)),
    url("/assets/ui/FigmaIceBackground.png") center/cover no-repeat;
  backdrop-filter: none;
}
.composer-tools img {
  filter: brightness(0.42) sepia(0.1);
}
[data-theme="dark"] .studio-editor {
  background:
    linear-gradient(rgba(13, 17, 30, 0.65), rgba(13, 17, 30, 0.87)),
    url("/assets/ui/FigmaDarkBackground.png") center/cover no-repeat;
}
[data-theme="dark"] .composer-tools img {
  filter: none;
}
@media (prefers-contrast: more) {
  :root {
    --muted: #4a4b58;
    --line: #858092;
    --surface: #fff;
    --glass: #fff;
  }
  .glass {
    border-color: var(--ink);
  }
  [data-theme="dark"] {
    --muted: #d5d3e4;
    --line: #9893ab;
    --surface: #252635;
    --glass: #252635;
  }
}

/* Current SwiftUI dimensions and materials: FigmaIPadDiscover, Theme, EditorView. */
@font-face { font-family: 'Noto Sans SC'; src: url('/assets/fonts/NotoSansSC-Variable.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
:root { --ink:#080808; --muted:#8d8d93; --accent:#3a3496; --accent-soft:rgba(202,202,221,.68); --surface:rgba(255,255,255,.72); --solid:#f5f6fb; --line:rgba(31,31,31,.18); --glass:rgba(246,246,249,.76); color:var(--ink); background:#f5f6fb; }
body::before { background:linear-gradient(rgba(245,246,251,.62),rgba(245,246,251,.62)),url('/assets/ui/FigmaIceBackground.png') center/cover no-repeat; }
h1,h2,h3 { letter-spacing:0; }
.button { border-radius:0; clip-path:polygon(12px 0,100% 0,100% calc(100% - 12px),calc(100% - 12px) 100%,0 100%,0 12px); font-size:16px; min-height:44px; box-shadow:none; }
.primary { background:var(--accent); }
.primary:hover:not(:disabled) { background:#4841ab; }
.icon-button { border-radius:50%; }
.app-header { width:min(1244px,100%); height:124px; padding:24px 32px; gap:24px; }
.desktop-nav { padding:6px 10px; gap:16px; background:rgba(220,222,227,.44); border-radius:18px; }
.desktop-nav button { height:58px; padding:0 18px; font-family:'Noto Sans SC',sans-serif; font-size:22px; font-weight:500; }
.desktop-nav button.active { background:rgba(202,202,221,.58); font-weight:700; color:#3a3496; border-radius:0; clip-path:polygon(8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%,0 8px); }
.desktop-nav button.active::before,.output-tabs button.active::before { inset:4px; border:0; background:linear-gradient(var(--accent),var(--accent)) top right/13px 1px no-repeat,linear-gradient(var(--accent),var(--accent)) top right/1px 7px no-repeat,linear-gradient(var(--accent),var(--accent)) bottom left/13px 1px no-repeat,linear-gradient(var(--accent),var(--accent)) bottom left/1px 7px no-repeat; }
.header-actions { gap:12px; }
.search-field { width:180px; height:52px; padding:0 14px; background:rgba(220,222,227,.4); border-radius:10px; }
.search-field input { font-size:17px; }
.search-field input::placeholder { color:#b3b3b8; }
.page-content { width:min(1244px,100%); padding:28px 32px 110px; }
.hero { height:250px; margin:20px 0 36px; }
.hero-copy { padding:38px 30px; width:57%; }
.hero h1 { font-size:34px; margin:18px 0; font-family:'Noto Sans SC',sans-serif; font-weight:700; }
.hero p { font-size:22px; line-height:1.45; margin-bottom:16px; }
.hero-cta { min-height:36px; font-size:13px; padding:9px 15px; gap:8px; }
.hero-product { right:0; top:-28px; width:46%; height:calc(100% + 36px); }
.hero-corner { width:54px; height:54px; background:rgba(224,224,235,.85); }
.hero-shell { clip-path:polygon(48px 0,100% 0,100% calc(100% - 48px),calc(100% - 48px) 100%,0 100%,0 48px); }
.section-heading { margin-bottom:30px; min-height:48px; gap:14px; }
.section-heading h2 { font-family:'Noto Sans SC',sans-serif; font-size:23px; padding-left:22px; font-weight:700; }
.section-heading h2::before { top:-5px; bottom:-5px; width:9px; }
.category-tabs { margin:0 -32px 0; border-radius:0; background:rgba(220,222,227,.65); padding:6px 20px 0; min-height:74px; }
.category-tabs button { min-height:74px; font-family:'Noto Sans SC',sans-serif; font-size:20px; font-weight:700; border-radius:22px 22px 0 0; }
.page-products { --category-track:rgba(220,222,227,.65); --category-label:#2e2e2e; --category-surface:#fff; --category-panel:linear-gradient(#fff,rgba(255,255,255,.72) 35%,rgba(255,255,255,.2) 82%,transparent); }
[data-theme='dark'] .page-products { --category-track:rgba(71,75,86,.65); --category-label:#aeaeb9; --category-surface:#1c1c1e; --category-panel:linear-gradient(#1c1c1e,rgba(28,28,30,.72) 35%,rgba(28,28,30,.2) 82%,transparent); }
.template-grid { gap:24px 18px; padding:20px 0 0; }
.page-products > .template-grid { background:rgba(255,255,255,.92); margin:0 -32px; padding:20px; }
/* SwiftUI choice popovers, kept in the browser top layer even inside a sheet. */
.dropdown { position:relative; }
.dropdown-trigger { display:flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:9px 12px; color:var(--ink); }
.dropdown-compact .dropdown-trigger { background:var(--surface); border:1px solid var(--line); border-radius:0; font-weight:600; }
.dropdown-field { width:100%; }
.dropdown-field .dropdown-trigger { width:100%; justify-content:flex-start; padding:12px 16px; background:var(--surface); clip-path:polygon(15px 0,100% 0,100% calc(100% - 15px),calc(100% - 15px) 100%,0 100%,0 15px); border:1px solid var(--line); }
.dropdown-label { flex:1; text-align:left; font-weight:500; }
.dropdown-value { white-space:nowrap; }
.dropdown-field .dropdown-value { color:var(--muted); }
.dropdown-field .dropdown-trigger > svg { color:var(--accent); }
.dropdown-icon { display:flex; align-items:center; color:var(--accent); }
.dropdown-menu { position:fixed; inset:auto; margin:0; border:1px solid rgba(255,255,255,.65); border-radius:28px; overflow:visible; background:linear-gradient(rgba(245,246,251,.88),rgba(245,246,251,.88)),url('/assets/ui/FigmaIceBackground.png') center/cover; backdrop-filter:blur(30px) saturate(150%); -webkit-backdrop-filter:blur(30px) saturate(150%); box-shadow:0 12px 48px rgba(29,33,53,.16); padding:12px; color:var(--ink); }
.dropdown-menu::before,.modal-popover::before { content:''; width:18px; height:18px; position:absolute; top:var(--menu-arrow-top,-9px); bottom:var(--menu-arrow-bottom,auto); left:calc(var(--menu-arrow-x,50%) - 9px); border-radius:4px 0 0 0; transform:rotate(45deg); background:rgba(245,246,251,.97); }
.dropdown-menu::backdrop { background:transparent; }
.dropdown-menu-title { color:var(--accent); font-size:12px; font-weight:700; letter-spacing:1px; padding:3px 12px 7px; }
.dropdown-option { min-height:46px; padding:10px 12px; display:flex; align-items:center; gap:10px; width:100%; font-size:17px; text-align:left; border-radius:0; }
.dropdown-option > span:not(.dropdown-icon) { flex:1; }
.dropdown-option[aria-selected='true'] { background:rgba(202,202,221,.45); clip-path:polygon(12px 0,100% 0,100% calc(100% - 12px),calc(100% - 12px) 100%,0 100%,0 12px); }
.dropdown-option > svg { color:var(--accent); }
.dropdown-option:focus-visible { background:rgba(202,202,221,.4); outline:2px solid var(--accent); outline-offset:-2px; }

/* Native form sheets: current iOS uses a centered form on iPad and bottom sheet on iPhone. */
.modal { border:0; border-radius:35px; padding:0; width:min(580px,calc(100vw - 48px)); max-height:86dvh; color:var(--ink); background:var(--solid); box-shadow:0 26px 90px rgba(0,0,0,.2); overflow:auto; }
.modal::backdrop { background:rgba(26,29,31,.32); backdrop-filter:blur(3px); }
.modal-wide { width:min(720px,calc(100vw - 48px)); }
.modal-content { position:relative; padding:20px; }
.modal-heading { position:relative; min-height:48px; display:flex; align-items:center; justify-content:center; padding:0 68px; margin:0 0 28px; }
.modal-heading h2 { font-size:17px; font-weight:600; text-align:center; }
.modal-heading .modal-close { position:absolute; right:0; top:0; width:auto; min-width:44px; height:44px; padding:0 16px; background:rgba(255,255,255,.72); color:var(--accent); font-weight:600; font-size:17px; box-shadow:0 8px 22px rgba(44,45,50,.07); }
.sheet-grabber { position:absolute; top:5px; left:calc(50% - 18px); width:36px; height:5px; border-radius:4px; background:#b9b9bf; }
.modal-dialog { border-radius:20px; }
.modal-dialog .modal-heading { justify-content:flex-start; padding-left:0; }
.modal-dialog .modal-heading h2 { text-align:left; }
.modal-popover { position:fixed; inset:auto; margin:0; width:min(420px,calc(100vw - 32px)); max-height:76dvh; border:1px solid rgba(255,255,255,.65); border-radius:32px; overflow:visible; background:rgba(246,247,250,.88); backdrop-filter:blur(30px) saturate(150%); }
.modal-popover::backdrop { background:rgba(29,32,35,.16); backdrop-filter:blur(1px); }
.modal-popover .modal-content { max-height:72dvh; overflow:auto; padding:16px 20px; border-radius:inherit; }
.modal-popover .modal-heading { margin-bottom:16px; }
.share-popover { width:300px; }
.share-popover .modal-heading { display:none; }
.share-popover .modal-content { padding:12px 20px; }
.share-popover .share-actions { display:flex; flex-direction:column; }
.share-popover .share-actions button { display:flex; align-items:center; gap:20px; min-height:60px; font-size:19px; text-align:left; }
.share-popover .share-actions button > svg { color:var(--accent); width:24px; }
.share-popover .share-actions button:first-child { border-bottom:1px solid var(--line); margin-bottom:8px; }
.panel-stack { gap:18px; }
.field-label { font-size:15px; line-height:1.5; font-weight:500; }
.form-field,.design-input { min-height:44px; padding:11px 16px; background:rgba(255,255,255,.44); border:1px solid var(--line); border-radius:0; clip-path:polygon(15px 0,100% 0,100% calc(100% - 15px),calc(100% - 15px) 100%,0 100%,0 15px); font-size:17px; }
.form-field { margin-top:7px; }
.design-input { display:flex; align-items:center; gap:11px; margin-top:8px; position:relative; width:100%; }
.design-input > svg { color:var(--muted); }
.design-input input { min-width:0; flex:1; width:100%; border:0; background:none; outline-offset:0; font-size:17px; }
.design-input::after { content:''; position:absolute; right:9px; bottom:7px; width:20px; height:2px; background:radial-gradient(circle,rgba(58,52,150,.45) 1px,transparent 1px) 0 0/7px 2px repeat-x; pointer-events:none; }
.design-input:focus-within { border-color:var(--accent); }
.form-field::placeholder,.design-input input::placeholder { color:#b9b9bf; }
.remix-panel { padding:18px; background:var(--surface); clip-path:polygon(18px 0,100% 0,100% calc(100% - 18px),calc(100% - 18px) 100%,0 100%,0 18px); }
.remix-panel h4 { margin:0 0 12px; font-size:13px; color:var(--muted); font-weight:500; }
.account-form { display:flex; flex-direction:column; gap:24px; min-height:400px; padding:0 4px; }
.account-mode { margin-bottom:4px; }
.account-mode button { width:50%; font-size:17px; }
.account-submit { margin-top:auto; padding-top:22px; }
.account-submit .button { width:100%; }
.account-identity { text-align:center; background:var(--surface); padding:24px; clip-path:polygon(18px 0,100% 0,100% calc(100% - 18px),calc(100% - 18px) 100%,0 100%,0 18px); }
.account-identity > svg { margin:0 auto 14px; color:var(--accent); }
.account-identity h3 { font-size:23px; }
.account-identity p { margin-top:6px; }
.account-row { display:flex; align-items:center; gap:10px; min-height:44px; font-size:15px; }
.account-row + .account-row { border-top:1px solid var(--line); }
.account-row > .muted:last-child { margin-left:auto; text-align:right; word-break:break-word; }
.account-credit-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:14px; }
.account-credit-grid strong { font-size:28px; display:block; margin-top:5px; }
.account-error { display:flex; align-items:flex-start; gap:8px; margin-bottom:16px; color:#d23f42; font-size:14px; }
.account-actions { display:flex; gap:12px; }

/* Workspace chrome overlays the original app backdrop; the product stays the main surface. */
.ios-generation { position:fixed; inset:0; z-index:50; height:100dvh; overflow:hidden; background:linear-gradient(rgba(245,246,251,.62),rgba(245,246,251,.62)),url('/assets/ui/FigmaIceBackground.png') center/cover; padding:24px 36px; }
.ios-generation .ios-immersive-backdrop { position:absolute; inset:0; width:100%; height:100%; max-width:none; max-height:none; object-fit:contain; filter:none; opacity:1; transform:none; pointer-events:none; z-index:0; }
.ios-generation.ios-landscape .ios-immersive-backdrop { display:none; }
.ios-generation.ios-portrait::after { content:''; position:absolute; inset:0; z-index:0; pointer-events:none; background:linear-gradient(to bottom,rgba(0,0,0,.24) 0%,transparent 30%,transparent 62%,rgba(0,0,0,.30) 100%); }
.ios-generation .studio-topbar { height:44px; padding:0; gap:20px; position:relative; z-index:3; background:none; border:0; box-shadow:none; }
.ios-generation .studio-project-heading,.ios-generation .studio-top-actions { min-height:44px; display:flex; align-items:center; gap:8px; padding:0 6px; border-radius:18px; background:var(--glass); backdrop-filter:blur(24px) saturate(140%); border:0; box-shadow:none; }
.ios-generation .studio-project-heading .icon-button { width:44px; height:44px; }
.ios-generation .studio-project-heading strong { font-size:17px; font-weight:600; }
.ios-generation .studio-top-actions .button { padding:0 7px; min-height:40px; background:none; color:var(--ink); clip-path:none; border:0; font-size:17px; font-weight:500; }
.ios-generation .studio-top-actions .button svg { width:20px; height:20px; }
.ios-generation .studio-top-actions .icon-button { height:44px; width:44px; }
.ios-generation .studio-top-actions .primary { color:var(--accent); }
.ios-generation .studio-top-actions .icon-button.primary { background:none; color:var(--accent); box-shadow:none; }
.ios-generation .studio-top-actions .primary svg { width:24px; height:24px; }
.ios-generation .ios-history-button > span { display:none; }
.ios-generation .output-tabs { position:relative; z-index:2; width:420px; max-width:100%; height:46px; margin:14px auto 12px; padding:4px; border-radius:8px; background:rgba(220,222,227,.44); gap:2px; display:flex; }
.ios-generation .output-tabs button { flex:1; min-height:38px; padding:0 8px; font-family:'Noto Sans SC',sans-serif; font-size:17px; font-weight:500; gap:0; border-radius:0; }
.ios-generation .output-tabs button > svg { display:none; }
.ios-generation .output-tabs button.active { font-weight:700; color:var(--accent); background:rgba(202,202,221,.58); clip-path:polygon(8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%,0 8px); }
.ios-generation .studio-workspace { display:flex; position:relative; z-index:1; flex:1; min-height:0; height:calc(100% - 116px); padding:0; gap:20px; align-items:center; }
.ios-generation .studio-stage { position:relative; flex:1; min-width:0; height:100%; min-height:0; padding:0; overflow:hidden; border-radius:18px; background:rgba(152,158,164,.22); border:1px solid rgba(58,58,58,.12); }
.ios-generation .stage-image-wrap { height:100%; width:100%; border-radius:0; background:none; min-height:0; display:flex; align-items:center; justify-content:center; }
.ios-generation .stage-artwork { width:100%; height:100%; object-fit:contain; max-height:none; transform:none; }
.ios-generation .studio-side-panel { width:clamp(330px,34vw,390px); flex:0 0 auto; }
.ios-generation .studio-composer { height:min(310px,46dvh); min-height:260px; padding:14px; border-radius:22px; background:var(--glass); backdrop-filter:blur(28px) saturate(150%); border:1px solid rgba(255,255,255,.42); box-shadow:0 14px 45px rgba(24,26,31,.18); display:flex; flex-direction:column; gap:12px; }
.ios-composer-reference { display:flex; align-items:center; gap:10px; height:40px; }
.ios-composer-reference > button { display:flex; align-items:center; gap:8px; min-height:36px; font-size:15px; font-weight:500; }
.ios-composer-reference > button:last-child { margin-left:auto; }
.ios-source-thumb { width:40px; height:40px; object-fit:contain; border-radius:8px; background:rgba(127,127,133,.12); }
.ios-generation .composer-input { flex:1; min-height:64px; border:0; padding:0; margin:0; background:none; resize:none; font-size:17px; line-height:1.5; color:var(--ink); }
.ios-generation .composer-input:focus { outline:0; }
.ios-generation .composer-input::placeholder { color:var(--muted); }
.ios-composer-bottom { display:flex; align-items:center; gap:14px; min-height:44px; }
.ios-composer-bottom > .icon-button { width:30px; height:36px; border-radius:0; }
.ios-composer-bottom > .icon-button img { width:24px; height:26px; object-fit:contain; }
.ios-composer-bottom > .composer-submit { margin-left:auto; display:flex; align-items:center; gap:8px; min-height:44px; padding:8px 16px; background:var(--accent); color:#fff; border-radius:26px; clip-path:none; font-size:16px; white-space:nowrap; width:auto; }
.ios-composer-bottom > .composer-submit > svg { width:18px; }
.ios-composer-bottom .composer-service { color:var(--muted); font-size:12px; }
.ios-generation .brief-summary { margin:0; min-height:0; font-size:11px; color:var(--accent); }
.ios-generation .ios-version-dots { position:static; transform:none; display:flex; gap:5px; max-width:100%; min-height:28px; overflow-x:auto; padding:0 9px; border-radius:999px; background:var(--glass); backdrop-filter:blur(16px); pointer-events:auto; }
.ios-version-dots button { width:14px; height:28px; min-width:14px; flex:0 0 auto; display:grid; place-items:center; border-radius:50%; background:none; padding:0; }
.ios-version-dots button > span { width:6px; height:6px; border-radius:999px; background:var(--ink); opacity:.42; }
.ios-version-dots button[aria-pressed='true'] { width:24px; min-width:24px; }
.ios-version-dots button[aria-pressed='true'] > span { width:18px; background:var(--accent); opacity:1; }
.ios-revision-controls { position:absolute; left:12px; right:12px; bottom:12px; z-index:2; display:flex; align-items:center; justify-content:center; gap:8px; pointer-events:none; }
.ios-revision-controls > button { width:auto; min-height:44px; height:44px; flex:0 0 auto; padding:0 12px; border-radius:24px; background:var(--glass); color:var(--accent); display:flex; align-items:center; justify-content:center; gap:6px; white-space:nowrap; font-size:12px; pointer-events:auto; }
.ios-generation.ios-landscape .ios-revision-controls { inset:14px; align-items:flex-end; }
.ios-generation.ios-landscape .ios-revision-controls > .ios-compare-button { position:absolute; top:0; right:0; }
.ios-generation > .studio-notice { position:absolute; z-index:4; top:128px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:12px; width:max-content; max-width:calc(100% - 48px); margin:0; padding:10px 14px; border-radius:14px; background:var(--glass); backdrop-filter:blur(16px); box-shadow:var(--shadow); font-size:14px; }
.history-popover { width:420px; }
:is(.history-popover,.history-sheet) .history-list { display:flex; flex-direction:column; gap:8px; }
:is(.history-popover,.history-sheet) .history-count { font-size:16px; color:var(--muted); margin:0 16px 12px; }
:is(.history-popover,.history-sheet) .history-version { display:flex; align-items:center; gap:14px; width:100%; min-height:86px; padding:14px 16px; text-align:left; border-radius:24px; background:rgba(220,220,224,.45); }
:is(.history-popover,.history-sheet) .history-version img { width:58px; height:58px; flex:0 0 auto; object-fit:contain; border-radius:10px; }
:is(.history-popover,.history-sheet) .history-version > .skeleton-image { width:58px; height:58px; flex:0 0 auto; border-radius:10px; }
:is(.history-popover,.history-sheet) .history-version > div { flex:1; min-width:0; }
:is(.history-popover,.history-sheet) .history-version strong { display:block; font-size:15px; color:var(--ink); margin-bottom:5px; }
:is(.history-popover,.history-sheet) .history-version span { display:block; color:var(--muted); font-size:12px; }
:is(.history-popover,.history-sheet) .history-version > div > span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
:is(.history-popover,.history-sheet) .history-version small { display:block; margin-top:5px; font-size:11px; }
:is(.history-popover,.history-sheet) .history-version > svg { color:var(--accent); flex:0 0 auto; }
.history-selection-indicator { fill:var(--accent); stroke:var(--accent); }
.history-selection-indicator path { stroke:#fff; }
:is(.history-popover,.history-sheet) .history-note { margin:10px 16px 14px; color:var(--muted); font-size:12px; }
:is(.history-popover,.history-sheet) .history-task-link { display:flex; align-items:center; gap:12px; width:100%; min-height:44px; padding:8px 16px; text-align:left; font-size:15px; color:var(--accent); }
:is(.history-popover,.history-sheet) .history-task-link > svg:last-child { margin-left:auto; color:var(--muted); }
.history-sheet.modal-sheet { position:fixed; inset:auto 0 0; margin:0; width:100%; max-width:100%; height:50dvh; max-height:92dvh; border-radius:28px 28px 0 0; }
.history-sheet .modal-content { display:flex; flex-direction:column; height:100%; max-height:100%; overflow:hidden; padding:18px 20px max(24px,env(safe-area-inset-bottom)); }
.history-sheet .modal-heading { flex:0 0 auto; margin-bottom:16px; }
.history-sheet .history-list { min-height:0; flex:1; overflow-y:auto; overscroll-behavior:contain; }
.history-sheet[data-sheet-detents] { transition:height .28s cubic-bezier(.22,1,.36,1); }
.history-sheet[data-sheet-dragging] { transition:none; }
.sheet-detent-handle { top:0; left:calc(50% - 26px); width:52px; height:22px; padding:0; border:0; background:none; border-radius:0; touch-action:none; cursor:ns-resize; }
.sheet-detent-handle::before { content:''; display:block; position:absolute; top:5px; left:8px; width:36px; height:5px; border-radius:4px; background:#b9b9bf; }
@media (prefers-reduced-motion:reduce) { .history-sheet[data-sheet-detents] { transition:none; } }
@media (orientation:landscape) and (max-height:499px) { .history-sheet.modal-sheet { height:92dvh; } .sheet-detent-handle { pointer-events:none; } }
.studio-tool-sheet .modal-content { padding:20px; }
.studio-tool-sheet .studio-modal-tabs { display:flex; gap:0; width:100%; padding:4px; background:rgba(224,224,232,.44); clip-path:polygon(15px 0,100% 0,100% calc(100% - 15px),calc(100% - 15px) 100%,0 100%,0 15px); margin:16px 0 36px; }
.studio-tool-sheet .studio-modal-tabs button { flex:1; padding:10px 4px; min-height:40px; font-size:14px; border:0; background:none; color:var(--ink); }
.studio-tool-sheet .studio-modal-tabs button[aria-pressed='true'] { color:var(--accent); background:rgba(202,202,221,.68); box-shadow:inset 0 0 0 1px rgba(58,52,150,.38); clip-path:polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px); }
.studio-tool-sheet .creative-tools > h3 { font-size:20px; font-weight:600; line-height:1.35; margin-bottom:8px; }
.studio-tool-sheet .creative-tools > .muted { font-size:15px; line-height:1.5; margin-bottom:24px; }
.studio-tool-sheet .creative-tools > .parameter-card + .field-label,.studio-tool-sheet .creative-tools > .field-label + .field-label,.studio-tool-sheet .creative-tools > .field-label + .more-design-constraints { margin-top:24px; }
.parameter-card { padding:16px; background:#fff; border-radius:18px; }
.parameter-card .parameter-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; font-size:16px; }
.parameter-card .parameter-heading > span:last-child { color:var(--muted); }
.parameter-card input[type='range'] { display:block; width:100%; accent-color:var(--accent); margin:18px 0; }
.parameter-range-labels { display:flex; justify-content:space-between; color:var(--muted); font-size:12px; margin:24px 0 12px; }
.parameter-card .dropdown-field .dropdown-trigger { clip-path:none; border:0; border-top:1px solid var(--line); padding:18px 0 4px; background:none; }
.parameter-card .dropdown-field .dropdown-value { color:var(--accent); }
.parameter-card .parameter-heading > strong { color:var(--muted); font-size:17px; font-weight:400; font-variant-numeric:tabular-nums; }
.constraint-disclosure > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:24px; list-style:none; font-size:15px; font-weight:500; color:var(--accent); cursor:pointer; }
.constraint-disclosure > summary::-webkit-details-marker { display:none; }
.constraint-disclosure > summary::marker { content:''; }
.constraint-disclosure > summary::after { content:''; width:7px; height:7px; margin-right:4px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(-45deg); }
.constraint-disclosure[open] > summary::after { transform:rotate(45deg); }
.constraint-disclosure > .field-label { margin-top:18px; }
.reset-parameters { margin-top:20px; padding:0; min-height:22px; color:var(--accent); font-size:15px; font-weight:400; }

@media (min-width:700px) and (max-width:999px) { .template-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (min-width:700px) and (orientation:portrait) {
  .ios-generation { padding:32px 36px 40px; }
  .ios-generation .studio-topbar { height:44px; }
  .ios-generation .output-tabs { width:449px; height:54px; margin:14px auto; }
  .ios-generation .output-tabs button { min-height:46px; }
  .ios-generation .studio-workspace { display:block; height:calc(100% - 126px); position:relative; }
  .ios-generation .studio-stage { position:absolute; inset:0 -36px; height:calc(100% - 100px); border:0; border-radius:0; background:none; }
  .ios-generation .studio-side-panel { position:absolute; bottom:0; left:0; width:100%; }
  .ios-generation .studio-composer { height:230px; min-height:230px; padding:18px; border-radius:22px; }
  .ios-generation .composer-input { font-size:19px; }
}
@media (max-width:699px) {
  .app-header { height:74px; padding:10px 14px; width:100%; }
  .desktop-nav { display:none; }
  .header-actions { margin:0; width:100%; }
  .search-field { width:100%; height:46px; border-radius:0; background:rgba(220,222,227,.44); }
  .search-field input { font-family:'Noto Sans SC',sans-serif; font-size:15px; }
  .page-content { padding:0 14px 110px; width:100%; }
  .hero { margin:40px 0 24px; height:180px; }
  .hero-copy { padding:18px 22px; width:51%; }
  .hero h1 { font-size:24px; line-height:1.2; margin:14px 0; }
  .hero p { font-size:16px; line-height:1.4; margin-bottom:9px; }
  .hero .eyebrow { font-size:7px; white-space:nowrap; }
  .hero-cta { font-size:12px; padding:8px 14px; min-height:34px; }
  .hero-product { width:55%; right:0; top:-24px; height:calc(100% + 16px); }
  .hero-shell { clip-path:polygon(30px 0,100% 0,100% calc(100% - 30px),calc(100% - 30px) 100%,0 100%,0 30px); }
  .hero-corner { width:32px; height:32px; }
  .section-heading { margin:0 0 18px; gap:10px; min-height:42px; }
  .section-heading h2 { font-size:20px; padding-left:20px; }
  .section-heading .count { font-size:17px; }
  .section-heading .dropdown-trigger { padding:8px; min-height:36px; font-size:12px; }
  .category-tabs { margin:0 -4px 12px; padding:0; gap:9px; overflow-x:auto; min-height:44px; background:none; scrollbar-width:none; }
  .category-tabs button { flex:0 0 auto; min-height:44px; padding:0 18px; font-size:14px; border-radius:0; background:rgba(220,222,227,.65); }
  .category-tabs button.active::before,.category-tabs button.active::after { display:none; }
  .template-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 12px; padding:0; }
  .page-products > .template-grid { margin:0; padding:0; background:none; }
  .mobile-nav { display:flex; position:fixed; left:18px; right:18px; bottom:12px; height:64px; padding:5px; border-radius:0; background:rgba(255,255,255,.7); backdrop-filter:blur(24px); border:1px solid #fff; box-shadow:0 10px 30px rgba(20,25,40,.18); z-index:30; }
  .mobile-nav button { flex:1; display:flex; flex-direction:column; gap:4px; align-items:center; justify-content:center; color:var(--ink); padding:2px; font-size:12px; border-radius:10px; }
  .mobile-nav button > svg { width:23px; height:23px; }
  .mobile-nav button.active { color:var(--accent); background:rgba(202,202,221,.5); font-weight:600; }
  .mobile-nav button:last-child { flex:0 0 64px; background:linear-gradient(135deg,#7560f5,#483bc0); color:white; border-radius:0; clip-path:polygon(12px 0,100% 0,100% calc(100% - 12px),calc(100% - 12px) 100%,0 100%,0 12px); }
  .mobile-nav button:last-child > svg { width:28px; height:28px; }
  .mobile-nav button:last-child > span { display:none; }
  .floating-create { display:none; }
  .modal-sheet { width:100%; max-width:100%; max-height:92dvh; margin:auto 0 0; border-radius:28px 28px 0 0; }
  .modal-sheet .modal-content { padding:18px 20px max(24px,env(safe-area-inset-bottom)); }
  .modal-sheet .modal-heading { margin-bottom:30px; }
  .modal-popover { width:min(300px,calc(100vw - 32px)); border-radius:28px; }
  .modal-popover .modal-content { padding:14px 18px; }
  .modal-popover .modal-heading { padding:0 54px; }
  .modal-popover .modal-heading h2 { font-size:16px; }
  .studio-tool-sheet { height:92dvh; }
  .studio-tool-sheet .studio-modal-tabs { margin:14px 0 34px; }
  .studio-tool-sheet .studio-modal-tabs button { min-height:38px; font-size:13px; padding:9px 2px; }
  .ios-generation { padding:12px 12px max(24px,env(safe-area-inset-bottom)); }
  .ios-generation .studio-topbar { height:44px; gap:8px; }
  .ios-generation .studio-project-heading,.ios-generation .studio-top-actions { padding:0 7px; min-height:44px; }
  .ios-generation .studio-top-actions { gap:2px; }
  .ios-generation .studio-project-heading strong { font-size:15px; }
  .ios-generation .studio-top-actions .button { font-size:14px; padding:0 4px; }
  .ios-generation .studio-top-actions .button svg { width:17px; }
  .ios-generation .studio-top-actions .icon-button { width:44px; }
  .ios-generation .output-tabs { width:100%; height:46px; margin:10px 0 0; }
  .ios-generation .output-tabs button { min-height:38px; font-size:15px; padding:0 4px; }
  .ios-generation .studio-workspace { display:block; position:relative; height:calc(100% - 114px); }
  .ios-generation .studio-stage { position:absolute; inset:0 -12px; height:calc(100% - 100px); min-height:0; background:none; border:0; border-radius:0; }
  .ios-generation .stage-image-wrap { min-height:0; }
  .ios-generation .studio-side-panel { position:absolute; bottom:0; left:0; width:100%; }
  .ios-generation .studio-composer { height:188px; min-height:188px; padding:13px; border-radius:22px; gap:12px; }
  .ios-generation .composer-input { font-size:17px; min-height:54px; }
  .ios-composer-reference { gap:8px; height:40px; }
  .ios-composer-reference > button { font-size:14px; gap:6px; padding:0; }
  .ios-composer-reference > button svg { width:18px; }
  .ios-composer-bottom { gap:12px; min-height:40px; }
  .ios-composer-bottom > .composer-submit { min-height:42px; padding:8px 15px; font-size:15px; }
  .ios-generation .brief-summary { font-size:10px; }
  .ios-generation .ios-version-dots { bottom:3px; }
  .ios-generation > .studio-notice { top:116px; max-width:calc(100% - 28px); }
  .account-form { min-height:440px; }
  .account-credit-grid { gap:8px; }
  .account-credit-grid .field-label { font-size:11px; }
  .account-identity h3 { font-size:21px; }
  .account-actions .button { flex:1; font-size:14px; padding:10px 8px; }
}
[data-theme='dark'] { --ink:#f7f7fb; --muted:#ababba; --accent:#8f87ff; --accent-soft:rgba(143,135,255,.18); --solid:#151827; --surface:rgba(21,24,39,.88); --glass:rgba(34,36,52,.82); --line:rgba(255,255,255,.18); }
[data-theme='dark'] .desktop-nav button.active,[data-theme='dark'] .segmented button.active,[data-theme='dark'] .mobile-nav button.active,[data-theme='dark'] .ios-generation .output-tabs button.active,[data-theme='dark'] .studio-tool-sheet .studio-modal-tabs button[aria-pressed='true'] { color:var(--accent); background:var(--accent-soft); }
[data-theme='dark'] .desktop-nav,[data-theme='dark'] .ios-generation .output-tabs,[data-theme='dark'] .studio-tool-sheet .studio-modal-tabs,[data-theme='dark'] .segmented { background:var(--glass); }
[data-theme='dark'] .modal { background:var(--solid); }
[data-theme='dark'] .dropdown-menu { background:rgba(21,24,39,.94); }
[data-theme='dark'] .dropdown-menu::before,[data-theme='dark'] .modal-popover::before { background:#151827; }
[data-theme='dark'] .parameter-card { background:var(--surface); }
[data-theme='dark'] .ios-generation { background:linear-gradient(rgba(7,9,18,.7),rgba(7,9,18,.7)),url('/assets/ui/FigmaDarkBackground.png') center/cover; }
@media (prefers-reduced-transparency:reduce) { .modal-popover,.dropdown-menu,.ios-generation .studio-composer,.ios-generation .studio-project-heading,.ios-generation .studio-top-actions { background:var(--solid); backdrop-filter:none; -webkit-backdrop-filter:none; } }
@media (prefers-contrast:more) { :root { --muted:#56565d; --line:#74747c; } .dropdown-trigger,.modal,.ios-generation .studio-composer { border:1px solid var(--line); } }

.dropdown-menu { background:linear-gradient(rgba(245,246,251,.62),rgba(245,246,251,.62)),url('/assets/ui/FigmaIceBackground.png') center/cover; }
.dropdown-menu-title { font-size:11px; line-height:14px; letter-spacing:1.2px; padding:0 8px; margin-bottom:6px; }
.dropdown-menu-options { display:flex; flex-direction:column; gap:6px; overflow:auto; scrollbar-width:thin; overscroll-behavior:contain; }
.dropdown-option { min-height:36px; padding:0 10px; flex:0 0 auto; }
.account-modal .modal-heading .modal-close { font-size:0; width:44px; padding:0; border-radius:0; clip-path:polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px); }
.account-modal .modal-heading .modal-close::before { content:'×'; font-size:25px; font-weight:400; }
.account-modal .modal-content { padding:24px; }
.account-modal .modal-heading { margin-bottom:24px; }
.import-design-sheet .modal-content { padding:24px; }
.import-design-sheet,.account-modal { background:linear-gradient(rgba(245,246,251,.62),rgba(245,246,251,.62)),url('/assets/ui/FigmaIceBackground.png') center/cover; }
.import-design-sheet .modal-heading { justify-content:flex-start; padding:0; margin:0 0 18px; min-height:32px; }
.import-design-sheet .modal-heading h2 { font-size:20px; font-weight:700; text-align:left; }
.import-design-sheet .sheet-grabber,.import-design-sheet .modal-close { display:none; }
.design-input:focus-within > svg { color:var(--accent); }
.parameter-card input[type='range'] { appearance:none; -webkit-appearance:none; height:6px; border:0; border-radius:4px; background:linear-gradient(to right,var(--accent) var(--range-progress,50%),#e4e4e7 var(--range-progress,50%)); }
.parameter-card input[type='range']::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:36px; height:24px; border-radius:18px; border:0; background:#fff; box-shadow:0 1px 12px rgba(0,0,0,.12); }
.parameter-card input[type='range']::-moz-range-thumb { width:36px; height:24px; border-radius:18px; border:0; background:#fff; box-shadow:0 1px 12px rgba(0,0,0,.12); }
.parameter-card { display:flex; flex-direction:column; gap:12px; border-radius:16px; }
.parameter-card .parameter-heading { margin-bottom:0; font-size:15px; }
.parameter-card input[type='range'] { height:44px; margin:0; background:none; }
.parameter-card input[type='range']::-webkit-slider-runnable-track { height:6px; border-radius:4px; background:linear-gradient(to right,var(--accent) var(--range-progress,35%),#e4e4e7 var(--range-progress,35%)); }
.parameter-card input[type='range']::-moz-range-track { height:6px; border-radius:4px; background:linear-gradient(to right,var(--accent) var(--range-progress,35%),#e4e4e7 var(--range-progress,35%)); }
.parameter-card input[type='range']::-webkit-slider-thumb { margin-top:-9px; }
.parameter-card .parameter-range-labels { margin:0; }
.parameter-card > hr { height:1px; margin:0; border:0; background:var(--line); }
.parameter-card .parameter-material { min-height:44px; margin:0; padding:0; border:0; font-size:15px; }
.parameter-card .parameter-material .dropdown-trigger { min-height:44px; }
[data-theme='dark'] .import-design-sheet,[data-theme='dark'] .account-modal { background:linear-gradient(rgba(7,9,18,.7),rgba(7,9,18,.7)),url('/assets/ui/FigmaDarkBackground.png') center/cover; }

@media (min-width:700px) {
  .app-header { height:120px; }
  .page-products { width:100%; max-width:none; padding-top:40px; }
  .page-products .hero { width:min(1180px,100%); height:260px; margin:0 auto 28px; }
  .page-products .section-heading { width:min(1180px,100%); height:52px; margin:0 auto 22px; }
  .page-products .category-tabs { min-height:56px; padding:6px 0 0; background:linear-gradient(transparent,var(--category-track)); }
  .page-products .category-tabs button { min-height:50px; border-radius:0; font-weight:500; color:var(--category-label); --tab-shoulder:16px; --tab-crown:14px; }
  .page-products .category-tabs button.active { font-weight:600; color:var(--accent); background:none; isolation:isolate; }
  .page-products .category-tabs button.active::before { inset:0 var(--tab-shoulder); width:auto; height:auto; border-radius:var(--tab-crown) var(--tab-crown) 0 0; background:var(--category-surface); box-shadow:none; z-index:-1; }
  .page-products .category-tabs button.active::after { inset:auto 0 0; width:auto; height:var(--tab-shoulder); border-radius:0; box-shadow:none; z-index:-1; background:radial-gradient(circle at top left,transparent calc(var(--tab-shoulder) - .5px),var(--category-surface) var(--tab-shoulder)) left bottom/var(--tab-shoulder) var(--tab-shoulder) no-repeat,radial-gradient(circle at top right,transparent calc(var(--tab-shoulder) - .5px),var(--category-surface) var(--tab-shoulder)) right bottom/var(--tab-shoulder) var(--tab-shoulder) no-repeat; }
  .page-products > .template-grid { padding:16px 20px; background:var(--category-panel); }
  .floating-create { min-height:62px; height:62px; padding:0 22px; bottom:40px; right:32px; font-size:17px; background:linear-gradient(135deg,#755cf5,#473bbf); }
  .floating-create > svg { width:28px; height:28px; }
  .hero-copy { width:54%; padding:0 28px; height:100%; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:15px; }
  .hero h1 { margin:0; font-size:35.4px; font-weight:500; line-height:1.3; }
  .hero p { margin:0; font-size:22px; line-height:1.3; }
  .hero .hero-cta { padding:10px 14px; min-height:36px; }
  .hero-shell { clip-path:polygon(52px 0,100% 0,100% calc(100% - 52px),calc(100% - 52px) 100%,0 100%,0 52px); }
  .hero-corner { width:52px; height:52px; }
  .hero-product { width:45%; top:-24px; height:calc(100% + 54px); right:0; }
}
@media (min-width:700px) and (orientation:portrait) {
  .page-products { padding-top:72px; }
  .page-products .hero { height:max(250px,min(calc((100vw - 64px) * .277778),327.78px)); margin-bottom:36px; }
  .page-products .section-heading { margin-bottom:30px; }
}
.hero-shell { background:linear-gradient(90deg,#000,#06080a,#181a20); }
.hero-shell::before { content:''; position:absolute; inset:0; background:url('/assets/ui/FigmaHeroDecoration.svg') right center/67% 100% no-repeat; z-index:1; pointer-events:none; }
.hero-shell::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,rgba(0,0,0,.94),rgba(0,0,0,.64) 36%,transparent 74%); pointer-events:none; }
.hero-dots { z-index:2; opacity:.38; background:radial-gradient(rgba(220,223,237,.8) .675px,transparent .75px) 0 0/9px 9px; }
.hero-echo { right:12%; top:12px; width:64%; height:128%; opacity:.36; filter:blur(5px) saturate(.35); }
.hero-corner { clip-path:none; filter:none; background:url('/assets/ui/FigmaHeroCornerTopLeft.svg') center/contain no-repeat; }
.hero-corner.top-left { top:0; left:0; }
.hero-corner.bottom-right { bottom:0; right:0; rotate:0deg; background-image:url('/assets/ui/FigmaHeroCornerBottomRight.svg'); }
.desktop-nav button.active,.ios-generation .output-tabs button.active { background:rgba(202,202,221,.42); }
.dropdown-option[aria-selected='true'] { background:rgba(202,202,221,.52); clip-path:polygon(9px 0,100% 0,100% calc(100% - 9px),calc(100% - 9px) 100%,0 100%,0 9px); }
.segmented { display:flex; border-radius:0; padding:4px; gap:4px; background:rgba(220,222,227,.22); border:.7px solid rgba(31,31,31,.13); clip-path:polygon(14px 0,100% 0,100% calc(100% - 14px),calc(100% - 14px) 100%,0 100%,0 14px); }
.segmented button { flex:1; min-height:40px; border-radius:0; font-size:15px; font-weight:500; }
.segmented button.active { color:#3a3496; font-weight:600; background:rgba(202,202,221,.68); box-shadow:inset 0 0 0 .8px rgba(58,52,150,.35); clip-path:polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px); }
.account-mode button { font-size:15px; }

/* QuietPageTabs, ImagesAllGallery, ImportDesignView, and ProfileSettingsView. */
.app-header > .search-field { margin-left:auto; }
@media (min-width:1100px) {
  .app-header {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    width:100%;
    padding-inline:32px;
  }
  .app-header > .desktop-nav { grid-column:2; justify-self:center; }
  .app-header > .search-field { grid-column:3; justify-self:end; margin-left:0; }
}
.loading-state { min-height:220px; display:flex; align-items:center; justify-content:center; gap:10px; color:var(--muted); font-size:15px; }
.page-inspiration,.page-works { padding-top:24px; }
body:has(.page-inspiration)::before,body:has(.page-works)::before { background:#f2f2f7; }
[data-theme='dark'] body:has(.page-inspiration)::before,[data-theme='dark'] body:has(.page-works)::before { background:#000; }
.page-inspiration .readable-page { max-width:none; }
.page-works .readable-page { max-width:796px; }
.page-inspiration { width:min(1680px,100%); }
.page-inspiration .inspiration-composer { max-width:796px; }
.page-inspiration .page-heading { margin:0 0 26px; }
.page-inspiration .page-heading h1 { font-size:34px; font-weight:600; margin:0 0 10px; }
.page-inspiration .page-heading p { font-size:15px; }
.inspiration-composer { padding:20px; border-radius:24px; background:#fff; border:1px solid rgba(0,0,0,.06); box-shadow:none; backdrop-filter:none; margin:0 0 32px; }
.inspiration-composer textarea { font-size:17px; line-height:1.5; min-height:54px; padding:0; background:none; resize:none; }
.inspiration-composer .composer-bottom { gap:12px; margin-top:12px; align-items:center; }
.inspiration-submit { margin-left:auto; display:flex; align-items:center; justify-content:center; width:44px; height:44px; flex:0 0 44px; border-radius:50%; background:var(--accent); color:#fff; }
.inspiration-composer .segmented,.collection-toolbar .segmented { clip-path:none; border:0; background:none; padding:0; border-radius:0; }
.inspiration-composer .segmented { gap:20px; }
.inspiration-composer .segmented button,.collection-toolbar .segmented button { position:relative; min-height:44px; padding:0; font-size:15px; background:none; color:var(--muted); border:0; clip-path:none; box-shadow:none; font-weight:400; }
.inspiration-composer .segmented button { font-size:12px; flex:none; }
.inspiration-composer .segmented button.active,.collection-toolbar .segmented button.active { color:var(--ink); background:none; box-shadow:none; clip-path:none; font-weight:500; }
.inspiration-composer .segmented button.active::after,.collection-toolbar .segmented button.active::after { content:''; width:24px; height:2px; background:var(--accent); border-radius:2px; position:absolute; bottom:0; left:calc(50% - 12px); }
.inspiration-composer .segmented button.active::after { width:18px; left:calc(50% - 9px); }
.cloud-gallery { display:flex; flex-direction:column; gap:18px; }
.cloud-gallery .section-heading { min-height:26px; margin:0; }
.cloud-gallery .section-heading h2 { padding:0; font-size:17px; font-family:inherit; }
.cloud-gallery .section-heading h2::before,.cloud-gallery .heading-line { display:none; }
.cloud-gallery .section-heading > .muted { margin-left:auto; font-size:12px; }
.gallery-categories { display:flex; overflow:auto; gap:8px; padding:0 1px; scrollbar-width:none; }
.gallery-categories button { flex:0 0 auto; min-height:40px; padding:0 16px; white-space:nowrap; border-radius:22px; font-size:15px; background:#fff; }
.gallery-categories button.active { background:var(--accent); color:#fff; font-weight:600; }
.design-card-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px 18px; }
@media (min-width:700px) and (max-width:999px) { .design-card-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
.gallery-more { margin:0 auto; width:100%; }
.profile-heading { margin:0 0 32px; gap:20px; align-items:flex-start; }
.profile-heading > div { flex:1; }
.profile-heading h1 { font-size:28px; font-weight:600; line-height:1.3; }
.profile-heading p { font-size:15px; margin-top:8px; line-height:1.5; }
.profile-heading .avatar { width:56px; height:56px; background:none; }
.profile-heading .avatar > svg { width:56px; height:56px; color:var(--accent); }
.profile-heading > .icon-button { width:44px; height:44px; color:var(--muted); background:rgba(0,0,0,.04); box-shadow:none; border:0; backdrop-filter:none; }
.profile-login { margin-top:18px; min-height:44px; padding:12px 22px; border-radius:24px; clip-path:none; font-size:15px; font-weight:600; background:var(--accent); color:white; }
.profile-cloud-actions { display:flex; gap:24px; margin:-4px 0 32px; }
.profile-cloud-actions button { color:var(--muted); font-size:15px; }
.collection-toolbar { gap:16px; margin-bottom:18px; padding-bottom:18px; }
.collection-toolbar .segmented { flex:1; }
.collection-toolbar > .icon-button { color:var(--muted); }
.settings-account-row { display:flex; align-items:center; gap:12px; width:100%; min-height:44px; text-align:left; font-size:15px; }
.settings-account-row > svg { color:var(--accent); }
.settings-account-row > span:first-of-type { flex:1; }
.settings-account-row > .muted { font-size:12px; }
.settings-account-row > svg:last-child { color:var(--muted); }
.settings-account-row + .settings-account-row { border-top:1px solid var(--line); }
.appearance-segmented { display:flex; margin-top:12px; }
.import-form { gap:18px; }
.import-design-sheet .upload-zone { height:210px; min-height:210px; padding:0; border-radius:0; border:1px solid var(--line); clip-path:polygon(26px 0,100% 0,100% calc(100% - 26px),calc(100% - 26px) 100%,0 100%,0 26px); background:rgba(255,255,255,.5); }
.import-design-sheet .upload-button { width:100%; height:100%; gap:10px; }
.import-design-sheet .upload-button > svg { color:var(--accent); width:62px; height:62px; padding:16px; background:var(--surface); border-radius:19px; }
.import-design-sheet .upload-button > img { width:100%; height:100%; max-height:none; object-fit:contain; padding:12px; }
.import-source-actions { display:flex; gap:12px; }
.import-source-actions > .button { flex:1; min-height:44px; font-size:17px; padding:10px 6px; }
.import-form .dialog-actions { display:flex; flex-wrap:nowrap; gap:12px; margin:0 -24px -24px; padding:16px 24px; background:rgba(255,255,255,.22); }
.import-form .dialog-actions > .secondary { max-width:150px; }
.import-form .dialog-actions > .primary { flex:1; }
.ios-generation { padding:12px 36px 24px; }
.ios-generation-cost { font-size:12px; color:var(--muted); }
.ios-generate-button { margin-left:auto; display:flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:8px 16px; border-radius:26px; background:var(--accent); color:#fff; font-size:16px; font-weight:600; }
.ios-generate-button > svg { width:18px; }
.parameter-material { display:flex; align-items:center; justify-content:space-between; gap:16px; border-top:1px solid var(--line); padding-top:16px; margin-top:12px; font-size:16px; }
.parameter-material .dropdown-trigger { border:0; padding:0; min-height:36px; background:none; color:var(--accent); }
.parameter-input { display:flex; gap:11px; align-items:flex-start; width:100%; min-height:44px; padding:10px 16px; margin-top:7px; background:rgba(255,255,255,.44); border:1px solid var(--line); clip-path:polygon(15px 0,100% 0,100% calc(100% - 15px),calc(100% - 15px) 100%,0 100%,0 15px); }
.parameter-input > svg { color:var(--muted); width:22px; height:24px; }
.parameter-input input,.parameter-input textarea { width:100%; min-width:0; border:0; background:none; padding:0; font-size:17px; outline-offset:2px; }
@media (min-width:700px) {
  .ios-generation.ios-portrait { padding:14px 36px 20px; }
  .ios-portrait .studio-workspace { display:block; height:calc(100% - 126px); position:relative; }
  .ios-portrait .studio-stage { position:absolute; inset:0 -36px; height:calc(100% - 100px); border:0; border-radius:0; background:none; }
  .ios-portrait .studio-side-panel { position:absolute; bottom:0; left:0; width:100%; }
  .ios-portrait .studio-composer { height:230px; min-height:230px; padding:18px; border-radius:22px; }
}
.ios-generation.ios-portrait .studio-stage { height:100%; }
.ios-generation.ios-portrait .studio-workspace:has(.studio-side-panel) .studio-stage { height:calc(100% - 246px); }
.ios-generation.ios-portrait .studio-workspace:has(.studio-side-panel) .stage-image-wrap { position:fixed; inset:0; width:100%; height:100%; border:0; border-radius:0; }
.ios-generation.ios-portrait .studio-workspace:has(.studio-side-panel) .stage-artwork { opacity:0; }
.ios-generation.ios-portrait .stage-image-wrap:has(.compare-image) .stage-artwork { opacity:1; }
.ios-generation .studio-side-panel { z-index:3; }
@media (min-width:700px) {
  .ios-generation.ios-portrait .output-tabs { width:449px; height:54px; margin:14px auto; }
  .ios-generation.ios-portrait .output-tabs button { min-height:46px; }
}
@media (max-width:699px) {
  .page-inspiration,.page-works { padding:24px 24px 110px; }
  .page-inspiration .page-heading h1 { font-size:28px; }
  .design-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 12px; }
  .profile-heading h1 { font-size:22px; }
  .profile-heading .avatar { width:56px; height:56px; }
  .profile-heading .avatar > svg { width:56px; height:56px; }
  .profile-cloud-actions { gap:24px; }
  .import-design-sheet .upload-zone { height:190px; min-height:190px; }
  .import-source-actions > .button { font-size:15px; }
  .ios-generation { padding:8px 14px max(8px,env(safe-area-inset-bottom)); }
  .ios-generation .studio-stage { left:-14px; right:-14px; }
  .ios-generation-cost { display:none; }
  .ios-generate-button { min-height:42px; padding:8px 15px; font-size:15px; }
  .ios-generation.ios-portrait .studio-workspace:has(.studio-side-panel) .studio-stage { height:calc(100% - 204px); }
}
[data-theme='dark'] .inspiration-composer,[data-theme='dark'] .gallery-categories button { background:#1c1c1e; }
[data-theme='dark'] .gallery-categories button.active { background:var(--accent); color:#151827; }
[data-theme='dark'] .ios-generation.ios-portrait::after { background:linear-gradient(to bottom,rgba(0,0,0,.38) 0%,transparent 30%,transparent 62%,rgba(0,0,0,.44) 100%); }
.share-popover .modal-heading,.suggestion-popover .modal-heading { display:none; }
.share-popover .modal-content,.suggestion-popover .modal-content { padding:6px 0; }
.ios-share-menu,.ios-suggestion-menu { display:flex; flex-direction:column; }
.ios-share-menu > button,.ios-suggestion-menu > button { display:flex; align-items:center; gap:12px; width:100%; min-height:44px; padding:12px 18px; border-radius:0; background:none; text-align:left; font-size:15px; line-height:1.45; }
.ios-share-menu > button > svg { flex:0 0 auto; width:19px; height:19px; color:var(--ink); }
.ios-share-menu > hr { height:1px; margin:4px 0; border:0; background:var(--line); }
.ios-suggestion-menu > button + button { border-top:1px solid var(--line); }
.ios-share-menu > button:hover,.ios-suggestion-menu > button:hover { background:var(--accent-soft); }
@media (orientation:landscape) and (max-height:499px) {
  .ios-generation { padding:6px 12px 8px; }
  .ios-generation .ios-immersive-backdrop { display:block; }
  .ios-generation::after { content:''; position:absolute; inset:0; z-index:0; pointer-events:none; background:linear-gradient(to bottom,rgba(0,0,0,.24) 0%,transparent 30%,transparent 62%,rgba(0,0,0,.30) 100%); }
  .ios-generation .output-tabs { width:min(390px,100%); height:42px; margin:8px auto; }
  .ios-generation .output-tabs button { min-height:34px; font-size:15px; }
  .ios-generation .studio-workspace { display:block; position:relative; }
  .ios-generation .studio-workspace:has(.studio-side-panel) .studio-stage { position:absolute; inset:0; width:100%; height:100%; border:0; border-radius:0; background:none; }
  .ios-generation .studio-workspace:has(.studio-side-panel) .stage-image-wrap { position:fixed; inset:0; width:100%; height:100%; border:0; border-radius:0; }
  .ios-generation .studio-workspace:has(.studio-side-panel) .stage-artwork { opacity:0; }
  .ios-generation .stage-image-wrap:has(.compare-image) .stage-artwork { opacity:1; }
  .ios-generation .studio-side-panel { position:absolute; left:auto; right:0; bottom:0; width:min(430px,48vw); }
  .ios-generation .studio-composer { height:clamp(116px,48dvh,210px); min-height:116px; padding:12px; gap:8px; }
  .ios-generation .composer-input { min-height:24px; font-size:15px; }
  .ios-generation:is(.ios-portrait,.ios-landscape,.ios-compact-landscape) .ios-revision-controls { top:auto; left:0; right:auto; bottom:0; max-width:calc(52vw - 36px); justify-content:flex-start; align-items:center; gap:10px; }
  .ios-generation:is(.ios-portrait,.ios-landscape,.ios-compact-landscape) .ios-revision-controls > .ios-compare-button { position:static; }
  .ios-generation > .studio-notice { top:114px; max-width:calc(100% - 28px); }
}
@media (max-width:699px) {
  .app-header { height:56px; padding:10px 14px 0; }
  .app-header:not(:has(.search-field)) { display:none; }
  .page-products .hero { margin:45px 0 12px; }
  .page-products .section-heading { height:42px; margin-bottom:15px; background:rgba(245,246,251,.92); }
  .page-products .category-tabs { margin:0 0 15px; padding:2px 5px; min-height:48px; }
  .page-products .category-tabs button { background:var(--category-track); color:var(--category-label); }
  .page-products .category-tabs button.active { background:#fff; color:#3a3496; }
}

.search-field .mobile-search-microphone { display:none; }
@media(max-width:699px) { .search-field .mobile-search-microphone { display:grid; place-items:center; } }
.settings-modal .modal-heading .modal-close { font-size:0; width:44px; padding:0; border-radius:50%; }
.settings-modal .modal-heading .modal-close::before { content:'×'; font-size:25px; font-weight:400; }
.inspiration-composer textarea { display:block; }

/* ResizeObserver spans keep async cloud images in a compact, responsive masonry. */
.masonry-grid {
  --masonry-columns: 2;
  --masonry-gap: 16px;
  display: grid;
  grid-template-columns: repeat(var(--masonry-columns), minmax(0, 1fr));
  grid-auto-rows: 1px;
  grid-auto-flow: dense;
  column-gap: var(--masonry-gap);
  row-gap: 0;
  align-items: start;
}
.masonry-item {
  min-width: 0;
  align-self: start;
  padding-bottom: var(--masonry-gap);
}
.masonry-content {
  min-width: 0;
  display: flow-root;
}
.masonry-grid .template-card { aspect-ratio:auto; }
@media (min-width:700px) {
  .masonry-grid { --masonry-columns:3; }
}
@media (min-width:900px) {
  .masonry-grid { --masonry-columns:4; }
}
@media (min-width:1100px) {
  .masonry-grid { --masonry-columns:5; }
}
@media (min-width:1280px) {
  .masonry-grid { --masonry-columns:6; }
}
@media (min-width:1600px) {
  .masonry-grid { --masonry-columns:8; }
}
/* Account collections have a narrower reading area than the full-width gallery. */
@media (min-width:900px) {
  .page-works .masonry-grid { --masonry-columns:4; }
}
@media (max-width:699px) {
  .masonry-grid { --masonry-gap:12px; }
}

/* Navigation and search share one frosted material. */
.desktop-nav,
.app-header > .search-field {
  background: rgba(236, 237, 242, .46);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}
[data-theme='dark'] .desktop-nav,
[data-theme='dark'] .app-header > .search-field { background: rgba(38, 40, 52, .46); }
.subcategory-tabs { display: flex; align-items: center; gap: 8px; padding: 10px 20px; overflow-x: auto; scrollbar-width: none; background: var(--category-panel); }
.subcategory-tabs button { flex: 0 0 auto; min-height: 44px; padding: 0 18px; border-radius: 999px; color: var(--ink); font-size: 15px; white-space: nowrap; }
.subcategory-tabs button.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
@media (max-width: 699px) { .subcategory-tabs { padding: 0 0 12px; background: transparent; } }
@media (prefers-reduced-transparency: reduce) {
  .desktop-nav, .app-header > .search-field,
  [data-theme='dark'] .desktop-nav, [data-theme='dark'] .app-header > .search-field { background: var(--solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
