.color-app {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 340px;
  min-height: 100vh;
}

.model-studio {
  background: var(--model-studio-bg);
}

.tool-rail,
.palette-panel {
  border-color: var(--color-line);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(16px);
}

.tool-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem;
  border-right: 1px solid var(--color-line);
}

.model-ui .tool-rail {
  gap: 0.7rem;
  border-right: 1px solid var(--model-border);
  background: color-mix(in srgb, var(--model-bg) 82%, transparent);
}

.tool-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-card);
  color: var(--color-ink);
  font-size: 1.35rem;
}

.model-ui .tool-btn {
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.model-ui .tool-btn svg {
  width: 1rem;
  height: 1rem;
}

.tool-btn.active {
  background: var(--color-lemon);
  box-shadow: 0 6px 0 rgba(36, 49, 79, 0.12);
}

.canvas-zone {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
}

.model-ui .canvas-zone {
  background:
    radial-gradient(circle at 50% 0%, var(--model-soft), transparent 32%),
    color-mix(in srgb, var(--model-panel-2) 42%, transparent);
}

.canvas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.8rem var(--space-3);
  border-bottom: 1px solid var(--color-line);
}

.model-ui .canvas-head {
  min-height: 78px;
  padding: 0.95rem clamp(1rem, 3vw, 2rem);
}

.canvas-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  padding: var(--space-3);
  touch-action: none;
}

.model-ui .canvas-stage {
  padding: clamp(1rem, 4vw, 3rem);
}

.svg-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(760px, 100%);
  aspect-ratio: 1 / 0.76;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-pop);
  transform-origin: center;
}

.model-ui .svg-frame {
  width: min(820px, 100%);
  aspect-ratio: 1 / 0.72;
  border: 0;
  border-radius: 26px;
  box-shadow: none;
}

.svg-frame svg {
  width: 88%;
  height: 88%;
}

.raster-stack {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 88%;
  max-width: 88%;
  max-height: 88%;
}

.svg-frame .raster-overlay {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.raster-canvas {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 1;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.region-svg {
  cursor: crosshair;
}

.svg-frame [data-fillable] {
  cursor: crosshair;
  transition: filter 140ms ease, opacity 140ms ease;
}

.svg-frame [data-fillable]:hover {
  filter: drop-shadow(0 0 5px rgba(105, 210, 255, 0.75));
}

.palette-panel {
  display: grid;
  align-content: start;
  gap: 0.9rem;
  padding: var(--space-3);
  border-left: 1px solid var(--color-line);
  overflow-y: auto;
  max-height: calc(100vh - 74px);
}

.model-ui .palette-panel {
  gap: 1rem;
  border-left: 1px solid var(--model-border);
  background: color-mix(in srgb, var(--model-bg) 92%, transparent);
}

.color-strip {
  display: grid;
  grid-template-columns: 34px 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 0.42rem;
}

.carousel-wrap {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 0.42rem;
}

.carousel-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  border: 1px solid var(--model-border);
  border-radius: 999px;
  background: var(--model-soft);
  color: var(--model-text);
  font-size: 1.1rem;
  line-height: 1;
}

.carousel-arrow:active {
  transform: scale(0.94);
}

.free-color-dot {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background:
    conic-gradient(from 90deg, #ff4f7b, #ffe66d, #26d6a0, #69d2ff, #8b5cf6, #ff4f7b);
  box-shadow: none;
  cursor: pointer;
}

.free-color-dot::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.free-color-dot input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.color-grid {
  display: flex;
  gap: 0.36rem;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.22rem 0.2rem 0.42rem;
  scrollbar-width: none;
}

.color-grid::-webkit-scrollbar {
  display: none;
}

.swatch,
.tone-swatch,
.gradient-swatch,
.mini-swatch {
  width: 100%;
  flex: 0 0 28px;
  width: 28px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  transition: transform 160ms ease, box-shadow 160ms ease, outline 160ms ease;
}

.swatch.active,
.tone-swatch.active,
.gradient-swatch.active,
.mini-swatch.active {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  transform: scale(1.12);
  box-shadow: none;
}

.palette-current {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.46);
}

.model-ui .palette-current {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.palette-current [data-current-preview] {
  display: block;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
}

.palette-current p {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
}

.icon-btn.active {
  background: var(--color-lemon);
}

.palette-section {
  display: grid;
  gap: 0.5rem;
  background: transparent;
}

.tone-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.tone-swatch {
  border-radius: 999px;
}

.gradient-grid {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.22rem 0.2rem 0.42rem;
  scrollbar-width: none;
}

.gradient-grid::-webkit-scrollbar {
  display: none;
}

.gradient-swatch {
  flex: 0 0 30px;
  width: 30px;
  aspect-ratio: 1;
  border-radius: 999px;
}

.mini-swatch-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.4rem;
  min-height: 34px;
  align-items: center;
}

.mini-swatch {
  border-radius: 999px;
  border-width: 0;
  box-shadow: none;
}

.palette-carousel {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.45rem;
  scrollbar-width: none;
}

.palette-carousel::-webkit-scrollbar {
  display: none;
}

.palette-chip {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto 5px;
  align-items: center;
  gap: 0.22rem 0.45rem;
  flex: 0 0 118px;
  min-height: 54px;
  border: 1px solid var(--model-border);
  border-radius: 18px;
  padding: 0.45rem;
  background: var(--model-soft);
  color: var(--model-text);
  text-align: left;
}

.palette-chip.active {
  background: color-mix(in srgb, var(--model-text) 10%, transparent);
  box-shadow: inset 0 0 0 1px var(--model-border-strong);
}

.palette-chip-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fff;
  color: #09090b;
  font-size: 0.68rem;
}

.palette-chip > span:not(.palette-chip-icon) {
  overflow: hidden;
  font-size: 0.68rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-chip i {
  grid-column: 1 / -1;
  display: block;
  height: 5px;
  border-radius: 999px;
}

.tone-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--model-border);
  border-radius: 999px;
  padding: 0 0.9rem;
  background: var(--model-soft);
  color: var(--model-text);
}

.tone-popover {
  position: fixed;
  left: 50%;
  bottom: 10.2rem;
  z-index: 95;
  width: min(360px, calc(100vw - 24px));
  border: 1px solid var(--model-border);
  border-radius: 24px;
  padding: 0.75rem;
  background: color-mix(in srgb, var(--model-bg) 94%, transparent);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

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

.tone-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.tone-popover-head button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--model-border);
  border-radius: 999px;
  background: var(--model-soft);
  color: var(--model-text);
}

.small {
  font-size: 0.82rem;
}

.progress-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(36, 49, 79, 0.1);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-coral), var(--color-lemon), var(--color-mint));
}

.social-app {
  grid-template-columns: 300px 82px minmax(0, 1fr) 340px 300px;
  gap: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 210, 237, 0.92), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(207, 237, 255, 0.95), transparent 28%),
    linear-gradient(135deg, #fff7fb 0%, #eefbff 45%, #fff8e6 100%);
}

.social-app[data-audience="menino"] {
  background:
    radial-gradient(circle at 14% 8%, rgba(199, 232, 255, 0.95), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(221, 245, 255, 0.92), transparent 30%),
    linear-gradient(135deg, #f5fbff 0%, #e4f5ff 52%, #fff9e7 100%);
}

.social-app[data-audience="menina"] {
  background:
    radial-gradient(circle at 13% 8%, rgba(255, 210, 237, 0.95), transparent 28%),
    radial-gradient(circle at 86% 14%, rgba(246, 225, 255, 0.9), transparent 29%),
    linear-gradient(135deg, #fff7fc 0%, #ffeaf6 48%, #effbff 100%);
}

.social-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  max-height: calc(100vh - 74px);
  overflow-y: auto;
  padding: 1rem;
  color: #101424;
}

.social-feed-panel,
.social-profile-panel {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(24px);
}

.social-feed-panel {
  border-right: 1px solid rgba(36, 49, 79, 0.1);
}

.social-profile-panel {
  border-left: 1px solid rgba(36, 49, 79, 0.1);
}

.phone-status,
.social-top,
.social-section-head,
.feed-body,
.feed-actions,
.profile-cover {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.phone-status {
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0.75;
}

.social-top h1 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1;
}

.social-kicker,
.social-section-head span,
.feed-body span,
.feed-actions span,
.profile-card p {
  color: #68728a;
}

.social-kicker {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.social-round {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #111827;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(44, 54, 92, 0.12);
}

.social-search input {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 14px 34px rgba(44, 54, 92, 0.09);
}

.audience-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  padding: 0.35rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
}

.audience-switch button {
  border: 0;
  border-radius: 17px;
  padding: 0.65rem;
  background: transparent;
  color: #1f2937;
  font-weight: 900;
}

.audience-switch button span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.68rem;
  color: #6b7280;
}

.audience-switch button.active {
  background: #fff;
  box-shadow: 0 8px 20px rgba(44, 54, 92, 0.12);
}

.social-section-head {
  margin-bottom: 0.75rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.social-section-head a,
.social-section-head button {
  border: 0;
  background: transparent;
  color: #111827;
  font-weight: 900;
}

.story-row {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.4rem;
}

.story-bubble {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  width: 64px;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 0.72rem;
  font-weight: 800;
}

.story-bubble span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd7eb, #d9efff);
  box-shadow: 0 9px 22px rgba(44, 54, 92, 0.12);
}

.story-bubble img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}

.story-bubble.create span {
  color: #fff;
  background: #121827;
  font-size: 1.5rem;
}

.feed-list {
  display: grid;
  gap: 0.9rem;
}

.feed-card,
.profile-card,
.profile-comment {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 18px 45px rgba(44, 54, 92, 0.11);
}

.feed-card {
  overflow: hidden;
}

.feed-card.current {
  outline: 3px solid rgba(255, 122, 144, 0.48);
}

.feed-art {
  display: grid;
  place-items: center;
  height: 190px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.62);
}

.feed-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feed-body,
.feed-actions {
  padding: 0.85rem 0.95rem;
}

.feed-body {
  align-items: flex-start;
}

.feed-body strong {
  display: block;
  line-height: 1.1;
}

.feed-body span,
.feed-actions {
  font-size: 0.78rem;
}

.like-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #94a3b8;
  font-size: 1.1rem;
  box-shadow: 0 8px 18px rgba(44, 54, 92, 0.12);
}

.like-btn.active {
  color: #ff4778;
}

.feed-actions {
  padding-top: 0;
}

.feed-actions a {
  color: #111827;
  font-weight: 900;
}

.profile-cover {
  min-height: 112px;
  align-items: flex-start;
  padding: 0.7rem;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 207, 232, 0.9), rgba(213, 238, 255, 0.9));
}

.profile-card {
  margin-top: -58px;
  padding: 1rem;
  text-align: center;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto 0.7rem;
  border: 4px solid #fff;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffd3ec, #cdefff);
  color: #111827;
  font-weight: 1000;
  box-shadow: 0 16px 30px rgba(44, 54, 92, 0.16);
}

.profile-card h2,
.profile-card p {
  margin: 0;
}

.profile-card h2 {
  font-size: 1.25rem;
}

.profile-card [data-profile-handle] {
  margin-top: 0.15rem;
  font-weight: 800;
}

.profile-card [data-profile-bio] {
  margin-top: 0.7rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-top: 1rem;
}

.profile-stats > *,
.profile-stats button {
  border: 0;
  border-radius: 18px;
  padding: 0.7rem 0.35rem;
  background: rgba(17, 24, 39, 0.06);
  color: #111827;
}

.profile-stats strong,
.profile-stats span {
  display: block;
}

.profile-stats span {
  font-size: 0.66rem;
  color: #64748b;
  text-transform: uppercase;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

.profile-tags span {
  border-radius: 999px;
  padding: 0.32rem 0.55rem;
  background: rgba(255, 255, 255, 0.72);
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
}

.profile-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.profile-gallery a {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 0.35rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.profile-gallery img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-comment {
  padding: 0.8rem;
  margin-bottom: 0.55rem;
}

.profile-comment p {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.82rem;
}

.mobile-social-dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: min(320px, calc(100vw - 32px));
  padding: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(10, 14, 26, 0.78);
  box-shadow: 0 18px 44px rgba(10, 14, 26, 0.36);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.mobile-social-dock button {
  display: grid;
  place-items: center;
  width: 54px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-size: 1.3rem;
}

.mobile-social-dock button.active,
.mobile-social-dock .dock-paint {
  background: #fff;
  color: #111827;
}

.mobile-social-dock .dock-paint {
  width: 58px;
  height: 58px;
  margin-top: -18px;
  box-shadow: 0 12px 24px rgba(255, 255, 255, 0.18);
}

.story-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(12, 16, 30, 0.46);
  opacity: 0;
  backdrop-filter: blur(10px);
  transition: opacity 180ms ease;
}

.story-modal.open {
  opacity: 1;
}

.story-card {
  position: relative;
  display: grid;
  gap: 0.7rem;
  width: min(380px, 100%);
  min-height: 620px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 36px;
  background: linear-gradient(160deg, rgba(255, 233, 246, 0.94), rgba(220, 241, 255, 0.94));
  box-shadow: 0 30px 80px rgba(10, 14, 26, 0.34);
}

.story-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.12);
}

.story-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #111827;
  transition: width 5s linear;
}

.story-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

.story-preview {
  display: grid;
  place-items: center;
  min-height: 410px;
  margin-top: 1rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.6);
}

.story-preview img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.story-card h2,
.story-card p {
  margin: 0;
}

.story-card p {
  color: #64748b;
}

@media (max-width: 1040px) and (min-width: 921px) {
  .topbar {
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(18px);
  }

  .social-feed-panel {
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.56);
  }

  .canvas-head {
    background: rgba(255, 255, 255, 0.34);
    backdrop-filter: blur(12px);
  }

  .canvas-zone,
  .palette-panel {
    background: rgba(255, 255, 255, 0.2);
  }

  .tool-btn {
    width: 50px;
    height: 50px;
  }

  .svg-frame {
    width: min(620px, 100%);
  }
}

@media (max-width: 920px) {
  .color-app {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .tool-rail {
    position: sticky;
    top: 74px;
    z-index: 20;
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--color-line);
  }

  .palette-panel {
    border-left: 0;
    border-top: 1px solid var(--color-line);
    max-height: none;
  }

  .color-grid {
    grid-template-columns: repeat(8, minmax(40px, 1fr));
  }
}

@media (max-width: 1320px) {
  .social-app {
    grid-template-columns: 280px 76px minmax(0, 1fr) 320px;
  }

  .social-profile-panel {
    display: none;
  }
}

@media (max-width: 1040px) {
  .social-app {
    grid-template-columns: 260px 68px minmax(0, 1fr) 300px;
  }

  .social-panel {
    padding: 0.85rem;
  }

  .feed-art {
    height: 160px;
  }

  .palette-panel {
    padding: 1rem;
  }
}

@media (max-width: 920px) {
  body.has-social-app {
    background: #fff7fc;
  }

  body.has-social-app .topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(18px);
  }

  body.has-social-app .nav {
    min-height: 62px;
  }

  body.has-social-app .nav-links a {
    display: none;
  }

  .social-app {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: calc(100vh - 74px);
    padding-bottom: 92px;
  }

  .mobile-social-dock {
    display: flex;
  }

  .social-app .social-panel,
  .social-app .tool-rail,
  .social-app .canvas-zone,
  .social-app .palette-panel {
    display: none;
  }

  .social-app[data-social-view="feed"] .social-feed-panel,
  .social-app[data-social-view="paint"] .tool-rail,
  .social-app[data-social-view="paint"] .canvas-zone,
  .social-app[data-social-view="paint"] .palette-panel,
  .social-app[data-social-view="profile"] .social-profile-panel {
    display: flex;
  }

  .social-app[data-social-view="paint"] .canvas-zone {
    display: grid;
  }

  .social-app[data-social-view="paint"] .palette-panel {
    display: grid;
  }

  .social-panel {
    max-height: none;
    min-height: calc(100vh - 166px);
    padding: 1rem 1rem 0;
  }

  .social-feed-panel,
  .social-profile-panel {
    border: 0;
    background: transparent;
  }

  .feed-art {
    height: 230px;
  }

  .feed-card,
  .profile-card,
  .profile-comment {
    border-radius: 30px;
  }

  .canvas-head {
    border-bottom: 0;
    padding: 0.9rem 1rem;
    background: transparent;
  }

  .canvas-stage {
    padding: 0.75rem;
  }

  .svg-frame {
    width: 100%;
    border-radius: 18px;
  }

  .palette-panel {
    padding-bottom: 1rem;
  }

  .story-card {
    min-height: min(680px, calc(100vh - 32px));
  }
}

/* Modelo HTML parity layer: dark social paint phone UI */
.social-app {
  grid-template-columns: 375px 82px minmax(0, 1fr) 340px 375px;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.12), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(168, 85, 247, 0.14), transparent 28%),
    linear-gradient(135deg, #ededf2 0%, #f5f5f8 100%);
}

.social-app[data-audience="menino"] {
  background:
    radial-gradient(circle at 14% 8%, rgba(186, 230, 253, 0.58), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(59, 130, 246, 0.16), transparent 30%),
    linear-gradient(135deg, #edf7ff 0%, #e8eef7 52%, #f7f7fb 100%);
}

.social-app[data-audience="menina"] {
  background:
    radial-gradient(circle at 13% 8%, rgba(251, 207, 232, 0.64), transparent 28%),
    radial-gradient(circle at 86% 14%, rgba(216, 180, 254, 0.24), transparent 29%),
    linear-gradient(135deg, #fff0f8 0%, #f7edf8 48%, #f4f5f9 100%);
}

.social-feed-panel,
.social-profile-panel {
  margin: 1rem;
  border: 10px solid #27272a;
  border-radius: 50px;
  background: rgba(6, 7, 9, 0.9);
  color: #fff;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.28);
  overflow: hidden auto;
}

.model-phone-view::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 0% 8%, rgba(6, 182, 212, 0.18), transparent 34%),
    radial-gradient(circle at 100% 35%, rgba(168, 85, 247, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.95));
}

.model-island {
  position: sticky;
  top: 0.5rem;
  z-index: 4;
  width: 112px;
  height: 18px;
  margin: 0 auto -0.4rem;
  border: 1px solid rgba(39, 39, 42, 0.8);
  border-radius: 999px;
  background: #000;
}

.phone-status {
  color: #fff;
  opacity: 0.92;
}

.social-top h1 {
  color: #fff;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
}

.social-top p {
  margin: 0.16rem 0 0;
  color: #71717a;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.social-kicker,
.social-section-head,
.social-section-head span,
.feed-body span,
.feed-actions span,
.profile-card p {
  color: #71717a;
}

.social-round {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.social-search input {
  background: rgba(255, 255, 255, 0.94);
}

.audience-switch {
  background: rgba(255, 255, 255, 0.08);
}

.audience-switch button {
  color: #d4d4d8;
}

.audience-switch button.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.social-section-head a,
.social-section-head button {
  color: #fff;
}

.story-bubble {
  color: #d4d4d8;
}

.story-bubble span {
  background: #18181b;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.35);
}

.story-bubble.create span {
  background: #fff;
  color: #000;
}

.feed-card,
.profile-card,
.profile-comment {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(9, 9, 11, 0.9);
  color: #fff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.feed-art {
  position: relative;
  height: 260px;
  padding: 0;
  background: #09090b;
  overflow: hidden;
}

.feed-art > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.feed-card:hover .feed-art > img {
  transform: scale(1.04);
}

.feed-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.58), transparent 35%, rgba(0, 0, 0, 0.9));
}

.feed-artist {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 72%;
  padding: 0.25rem 0.55rem 0.25rem 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.feed-artist img {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
}

.feed-body strong,
.profile-card h2 {
  color: #fff;
}

.like-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #d4d4d8;
}

.like-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.24);
}

.feed-actions a {
  color: #fff;
}

.profile-cover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    url("https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?auto=format&fit=crop&sat=-100&q=80&w=600") center/cover;
}

.profile-avatar {
  background: #111;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-stats > *,
.profile-stats button {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.profile-tags span,
.profile-gallery a {
  background: rgba(255, 255, 255, 0.08);
  color: #d4d4d8;
}

.profile-gallery span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff007f, #04d9ff);
  color: #fff;
  font-weight: 1000;
}

.profile-comment {
  position: relative;
  padding-left: 3.4rem;
}

.profile-comment img {
  position: absolute;
  top: 0.82rem;
  left: 0.82rem;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

.profile-comment strong,
.profile-comment span {
  display: block;
}

.profile-comment span {
  color: #71717a;
  font-size: 0.72rem;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.template-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 92px;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(9, 9, 11, 0.95), rgba(39, 39, 42, 0.9));
  color: #fff;
}

.template-card strong {
  font-size: 0.72rem;
  line-height: 1.1;
}

.template-card span {
  color: #71717a;
  font-size: 0.62rem;
}

.template-card div {
  display: flex;
  gap: 0.2rem;
}

.template-card i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.mobile-social-dock {
  width: min(390px, calc(100vw - 24px));
}

.mobile-social-dock button {
  width: 46px;
}

.mobile-social-dock .dock-music {
  width: 44px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 1320px) {
  .social-app {
    grid-template-columns: 360px 76px minmax(0, 1fr) 320px;
  }
}

@media (max-width: 1040px) and (min-width: 921px) {
  .social-app {
    grid-template-columns: 330px 68px minmax(0, 1fr) 300px;
  }

  .social-feed-panel {
    margin: 0.75rem;
  }
}

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

  .social-feed-panel,
  .social-profile-panel {
    margin: 0.75rem auto 0;
    width: min(375px, calc(100vw - 18px));
    min-height: calc(100vh - 154px);
  }

  .social-app[data-social-view="feed"] .social-feed-panel,
  .social-app[data-social-view="profile"] .social-profile-panel {
    display: flex;
  }

  .feed-art {
    height: 278px;
  }
}

/* Mobile-first studio redesign */
.model-ui .canvas-zone,
.model-ui .palette-panel,
.model-ui .tool-rail {
  background: color-mix(in srgb, var(--model-bg) 72%, transparent);
  color: var(--model-text);
  border-color: var(--model-border);
}

.model-ui .canvas-head {
  background: transparent;
  color: var(--model-text);
  border-bottom: 0;
}

.model-ui .canvas-head .btn.secondary {
  background: var(--model-inverse);
  color: var(--model-inverse-text);
  min-height: 38px;
  border-radius: 16px;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.model-ui .svg-frame {
  border: 0;
  border-radius: 24px;
  box-shadow: none;
}

.model-ui .tool-btn {
  border-color: var(--model-border);
  background: var(--model-card-bg);
  color: var(--model-text);
}

.model-ui .tool-btn.active {
  background: var(--model-inverse);
  color: var(--model-inverse-text);
  box-shadow: none;
}

.model-ui .palette-current,
.model-ui .palette-section,
.model-ui .field input {
  border-color: var(--model-border);
  background: transparent;
  color: var(--model-text);
}

.model-ui .palette-current .icon-btn {
  width: 34px;
  min-height: 34px;
  border-radius: 999px;
  background: var(--model-soft);
}

.model-ui [data-action="export-png"],
.model-ui [data-action="publish-feed"],
.model-ui [data-action="publish-story"],
.model-ui [data-action="share-png"] {
  background: var(--model-inverse);
  color: var(--model-inverse-text);
}

.studio-share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.studio-share-grid .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 48px;
  border-radius: 14px;
  padding: 0.72rem 0.65rem;
  white-space: nowrap;
}

.studio-share-grid .btn.secondary {
  border: 1px solid var(--model-border);
  background: var(--model-soft);
  color: var(--model-text);
}

.studio-share-grid .btn svg {
  width: 1rem;
  height: 1rem;
}

.model-ui .palette-panel h2,
.model-ui .palette-panel strong {
  color: var(--model-text);
}

@media (max-width: 920px) {
  .model-ui .tool-rail {
    position: fixed;
    left: 50%;
    top: auto;
    right: auto;
    bottom: 5.3rem;
    z-index: 30;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    width: min(375px, calc(100vw - 18px));
    height: 54px;
    min-height: 0;
    max-height: 54px;
    border: 1px solid var(--model-border);
    border-radius: 999px;
    padding: 0.35rem;
    background: color-mix(in srgb, var(--model-bg) 88%, transparent);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    transform: translateX(-50%);
    grid-column: auto;
    grid-row: auto;
    align-self: auto;
  }

  .model-ui .tool-rail::-webkit-scrollbar {
    display: none;
  }

  .model-ui .tool-btn {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
  }

  .model-ui .canvas-zone {
    margin: 0.5rem auto 0.75rem;
    width: min(375px, calc(100vw - 18px));
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background:
      radial-gradient(circle at 50% 0%, var(--model-soft), transparent 30%),
      transparent;
  }

  .model-ui .canvas-stage {
    min-height: 430px;
    padding: 0.75rem;
  }

  .model-ui .svg-frame {
    width: 100%;
    aspect-ratio: 1 / 1.22;
    border-radius: 24px;
  }

  .model-ui .palette-panel {
    margin: 0 auto 7.6rem;
    width: min(375px, calc(100vw - 18px));
    max-height: none;
    border: 0;
    border-radius: 0;
    padding: 0.75rem 0;
    background: transparent;
  }

  .model-ui .color-grid {
    display: flex;
  }

  .model-ui .gradient-grid {
    display: flex;
  }
}

.model-ui :where(p, small, span, label, input, select, textarea, li) {
  font-family: var(--font-body);
  font-weight: 200 !important;
}

.model-ui :where(a, button, strong, b, .btn, .badge, .tool-btn, .model-action-pill, .model-post-open) {
  font-family: var(--font-body);
  font-weight: 500 !important;
}

.model-ui :where(h1, h2, h3, .section-title, .model-section-head h2, .model-post-card h3) {
  font-family: var(--font-display);
  font-weight: 400 !important;
}
