:root {
  color-scheme: dark;
  --bg: var(--ds-color-bg);
  --surface: var(--ds-color-surface);
  --surface-2: var(--ds-color-surface-raised);
  --surface-3: #222226;
  --line: var(--ds-color-line);
  --muted: var(--ds-color-muted);
  --text: var(--ds-color-text);
  --accent: var(--ds-color-accent);
  --accent-2: var(--ds-focus);
  --accent-soft: rgba(255, 106, 26, 0.14);
  --success: #8ed77e;
  --sidebar: 76px;
  --topbar: 72px;
  --content-width: var(--ds-content-max);
  --layout-gutter: var(--ds-gutter);
  --layout-readable: var(--ds-readable-max);
  --control-height-sm: var(--ds-control-sm);
  --control-height-md: var(--ds-control-md);
  --control-height-lg: var(--ds-control-lg);
  --radius-sm: var(--ds-radius-sm);
  --radius-md: var(--ds-radius-md);
  --radius-lg: var(--ds-radius-lg);
  --motion-fast: var(--ds-motion-fast);
  --motion-normal: var(--ds-motion-normal);
  --motion-ease: var(--ds-motion-ease);
  --dashboard-edge: 85px;
  --dashboard-content-max: var(--ds-content-max);
  --dashboard-rail-gap: 20px;
  --dashboard-rail-columns: 5;
  --dashboard-card-info-height: 99.8px;
  font-family: var(--ds-font-sans);
}

.studio-video-locale-variants {
  display: grid;
  gap: 18px;
}

.studio-video-locale-variant-list {
  display: grid;
  gap: 12px;
}

.studio-video-locale-variant-card {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line, #31343d);
  border-radius: 14px;
  background: var(--surface-raised, #15171d);
}

.studio-video-locale-variant-card video,
.studio-video-locale-variant-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #090a0d;
  object-fit: contain;
}

.studio-video-locale-variant-placeholder {
  display: grid;
  place-items: center;
  padding: 10px;
  color: var(--text-muted, #969ba8);
  text-align: center;
}

.studio-video-locale-variant-card > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.studio-video-locale-variant-card > div small {
  color: var(--text-muted, #969ba8);
}

.studio-video-locale-variant-card > b {
  color: var(--accent, #ff6b2c);
}

@media (max-width: 720px) {
  .studio-video-locale-variant-card {
    grid-template-columns: 1fr auto;
  }

  .studio-video-locale-variant-card video,
  .studio-video-locale-variant-placeholder {
    grid-column: 1 / -1;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 130, 67, 0.09), transparent 34rem),
    var(--bg);
  color: var(--text);
}

button,
select,
textarea,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  align-items: center;
  border-right: 1px solid var(--line);
  background: rgba(8, 8, 9, 0.96);
  backdrop-filter: blur(18px);
}

.brand,
.mobile-brand {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand {
  display: grid;
  height: var(--topbar);
  place-items: center;
}

.sidebar-logo-mini,
.brand-symbol-image {
  border-radius: 10px;
  object-fit: cover;
}

.sidebar-logo-full,
.site-footer-logo,
.auth-official-brand-image {
  object-fit: cover;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 12px 12px 12px 4px;
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.06em;
  box-shadow: 0 0 24px rgba(255, 106, 26, 0.2);
}

.side-nav,
.side-bottom {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.side-nav {
  padding-top: 16px;
}

.side-bottom {
  margin-top: auto;
  padding-bottom: 20px;
}

.nav-item {
  position: relative;
  display: grid;
  width: 48px;
  min-height: 48px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #717178;
  cursor: pointer;
  transition: 160ms ease;
}

.nav-item:hover,
.nav-item.active {
  background: var(--surface-3);
  color: var(--text);
  transform: translateY(-1px);
}

.nav-item.active::before {
  position: absolute;
  left: -14px;
  width: 3px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.nav-item.reward {
  color: var(--accent);
}

.nav-icon {
  font-size: 24px;
  line-height: 1;
}

.icon-chat {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 22px;
  color: currentColor;
  font-size: 0;
}

.icon-chat::before,
.icon-chat::after {
  position: absolute;
  width: 15px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 5px;
  content: "";
}

.icon-chat::before { top: 1px; left: 1px; }
.icon-chat::after { right: 1px; bottom: 1px; background: var(--surface-3); }
.nav-item:not(.active) .icon-chat::after { background: #080809; }

.bell-icon {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 15px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 9px 9px 4px 4px;
}

.bell-icon::before {
  position: absolute;
  right: -4px;
  bottom: -3px;
  left: -4px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.bell-icon::after {
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  transform: translateX(-50%);
}

.nav-label {
  position: absolute;
  left: 58px;
  z-index: 10;
  display: none;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #222226;
  color: #e8e8eb;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.nav-item:hover .nav-label {
  display: block;
}

.avatar-button {
  width: 38px;
  height: 38px;
  overflow: hidden;
  padding: 0;
  border: 2px solid #3e3e44;
  border-radius: 50%;
  background: #222;
  cursor: pointer;
}

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

.topbar {
  position: fixed;
  inset: 0 0 auto var(--sidebar);
  z-index: 30;
  display: flex;
  height: var(--topbar);
  align-items: center;
  justify-content: flex-end;
  padding: 0 32px;
  background: linear-gradient(to bottom, rgba(10, 10, 11, 0.9), rgba(10, 10, 11, 0));
  pointer-events: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.icon-button,
.auth-button,
.wallet-button,
.ticket-button {
  display: inline-flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(20, 20, 23, 0.65);
  color: #d7d7da;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: 160ms ease;
}

.icon-button:hover,
.auth-button:hover,
.wallet-button:hover,
.ticket-button:hover {
  border-color: var(--line);
  background: var(--surface-3);
  color: white;
}

.icon-button {
  width: 38px;
  font-size: 21px;
}

.wallet-button,
.ticket-button {
  padding: 0 12px;
  font-size: 12px;
}

.auth-button {
  padding: 0 14px;
  border-color: rgba(255, 106, 26, 0.3);
  background: rgba(255, 106, 26, 0.1);
  color: #ffc09e;
  font-size: 12px;
  font-weight: 800;
}

.coin {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffbd62, #ff6819);
  color: white;
  font-size: 11px;
  font-weight: 900;
}

.ticket-button span {
  color: #ff8f59;
}

.notification {
  position: relative;
}

.notice-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border: 1px solid #111;
  border-radius: 50%;
  background: var(--accent);
}

.mobile-brand,
.mobile-nav {
  display: none;
}

#app {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.page {
  min-height: 100vh;
}

body.route-transition #app > .page {
  animation: page-in 320ms ease both;
}

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

.content-wrap {
  width: min(calc(100% - 72px), var(--content-width));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-section {
  position: relative;
  min-height: 490px;
  overflow: hidden;
  padding: 68px 0 22px;
  background: var(--hero-bg, #39302c);
  transition: background 500ms ease;
}

.hero-section::after {
  position: absolute;
  inset: auto 0 0;
  height: 220px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  content: "";
  pointer-events: none;
}

.hero-ambient {
  position: absolute;
  inset: 0;
  background-position: center 28%;
  background-size: cover;
  opacity: 0.18;
  filter: blur(60px) saturate(0.8);
  transform: scale(1.12);
}

.hero-carousel {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 90px), 1560px);
  height: 400px;
  margin: 0 auto;
  overflow: hidden;
}

.hero-track {
  display: flex;
  width: max-content;
  height: 100%;
  align-items: center;
  gap: var(--hero-slide-gap, 18px);
  will-change: transform;
}

.hero-card {
  position: relative;
  width: var(--hero-slide-width, 520px);
  height: 310px;
  flex: 0 0 var(--hero-slide-width, 520px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: #1b1b1d;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  opacity: 0.5;
  cursor: pointer;
  transform: scale(0.93);
  transition: height 420ms ease, opacity 420ms ease, transform 420ms ease, border-color 420ms ease;
}

.hero-card.active {
  height: 400px;
  border-color: rgba(255, 255, 255, 0.16);
  opacity: 1;
  transform: scale(1);
}

.hero-card img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.hero-card::after {
  position: absolute;
  inset: 34% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.82));
  content: "";
}

.hero-copy {
  position: absolute;
  z-index: 2;
  inset: auto 26px 24px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 260ms ease 120ms, transform 260ms ease 120ms;
}

.hero-card.active .hero-copy { opacity: 1; transform: translateY(0); }

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 11px;
}

.badge {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(5, 5, 6, 0.72);
  color: #eee;
  font-size: 10px;
  font-weight: 800;
}

.badge.hot { color: #ff8f65; }
.badge.new { color: #9fe18d; }

.hero-copy h1 {
  margin: 0 0 7px;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0;
  color: #dedee0;
  font-size: 15px;
}

.slide-count {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  font-size: 11px;
  opacity: 0;
  transition: opacity 220ms ease 140ms;
}

.hero-card.active .slide-count { opacity: 1; }

.carousel-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(8, 8, 9, 0.64);
  font-size: 25px;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.carousel-arrow.prev { left: 8px; }
.carousel-arrow.next { right: 8px; }

.announcement {
  position: relative;
  z-index: 3;
  display: flex;
  width: min(calc(100% - 72px), 1200px);
  min-height: 48px;
  margin: -3px auto 28px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid rgba(255, 106, 26, 0.16);
  border-radius: 10px;
  background: rgba(65, 29, 14, 0.72);
  color: #f5dfd4;
  font-size: 13px;
}

.announcement-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 106, 26, 0.7);
}

.home-content {
  padding-bottom: 100px;
}

.content-tabs {
  display: flex;
  gap: 26px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.content-tab {
  position: relative;
  padding: 0 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.content-tab.active { color: white; }
.content-tab.active::after {
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.rail-section {
  margin-bottom: 56px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(21px, 2.4vw, 28px);
  letter-spacing: -0.04em;
}

.section-heading p {
  display: none;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.text-button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #aaaab0;
  font-size: 13px;
  cursor: pointer;
}

.text-button:hover { color: white; }

.card-rail {
  display: grid;
  grid-auto-columns: 224px;
  grid-auto-flow: column;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 16px;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: #38383d transparent;
}

.character-card {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  cursor: pointer;
  transition: 200ms ease;
}

.character-card:hover {
  border-color: rgba(255, 106, 26, 0.42);
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.character-card img {
  width: 100%;
  height: 225px;
  object-fit: cover;
  transition: 300ms ease;
}

.character-card:hover img { transform: scale(1.025); }

.card-body {
  padding: 14px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-title-row h3 {
  overflow: hidden;
  margin: 0;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tiny-status {
  color: var(--accent-2);
  font-size: 11px;
}

.card-body p {
  overflow: hidden;
  margin: 7px 0 10px;
  color: #a9a9af;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  padding: 4px 6px;
  border: 1px solid rgba(255, 106, 26, 0.18);
  border-radius: 6px;
  background: rgba(255, 106, 26, 0.08);
  color: #d79979;
  font-size: 10px;
}

.detail-page {
  padding: 88px 0 110px;
}

.detail-copy .eyebrow {
  display: none;
}

.detail-hero {
  display: grid;
  grid-template-columns: 448px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.detail-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.38);
}

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

.detail-cover::after {
  position: absolute;
  inset: 60% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.55));
  content: "";
}

.cover-label {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 18px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #eee;
  font-size: 11px;
  backdrop-filter: blur(10px);
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 4vw, 48px);
  letter-spacing: -0.055em;
}

.detail-copy {
  padding-top: 10px;
}

.creator-row,
.stat-row,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.creator-row {
  gap: 10px;
  margin: 17px 0 22px;
  color: #9c9ca2;
  font-size: 13px;
}

.follow-button {
  padding: 7px 12px;
  border: 1px solid rgba(255, 106, 26, 0.35);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  cursor: pointer;
}

.detail-subtitle {
  margin: 0 0 16px;
  color: #dadade;
  font-size: clamp(18px, 2vw, 23px);
}

.stat-row {
  gap: 18px;
  margin: 18px 0;
  color: #a5a5ac;
  font-size: 13px;
}

.detail-tags {
  margin-bottom: 29px;
}

.detail-tags .tag {
  padding: 6px 9px;
  font-size: 11px;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  color: #b8b8bd;
  font-size: 13px;
  font-weight: 700;
}

.episode-select {
  width: 100%;
  height: 54px;
  margin-bottom: 13px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: white;
  cursor: pointer;
}

.detail-actions {
  gap: 10px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: 180ms ease;
}

.primary-button {
  flex: 1;
  border: 0;
  background: linear-gradient(110deg, #ff741f, #c74305);
  color: white;
  box-shadow: 0 12px 30px rgba(220, 73, 7, 0.18);
}

.primary-button:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: #d8d8db;
}

.secondary-button:hover { background: var(--surface-3); }

.gallery-section,
.profile-section {
  margin-top: 88px;
}

.gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.gallery-head h2,
.profile-section h2 {
  margin: 0;
  font-size: 25px;
}

.gallery-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.progress-label {
  min-width: 180px;
  color: #b5b5ba;
  font-size: 12px;
  text-align: right;
}

.progress-bar {
  width: 180px;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #2b2b2f;
}

.progress-bar span {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ffc36e);
}

.tier-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 15px;
  padding-bottom: 5px;
}

.tier-pill {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #aaaab0;
  font-size: 11px;
}

.tier-pill.active {
  border-color: rgba(255, 106, 26, 0.4);
  color: #ffc1a0;
  box-shadow: inset 0 0 0 1px rgba(255, 106, 26, 0.08);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 0.72 / 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  margin-top: 18px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(140deg, rgba(27, 27, 30, 0.95), rgba(15, 15, 17, 0.95));
}

.profile-card p {
  margin: 0;
  color: #b8b8bd;
  line-height: 1.8;
}

.trait-list {
  display: grid;
  gap: 14px;
}

.trait {
  display: grid;
  grid-template-columns: 70px 1fr 34px;
  align-items: center;
  gap: 10px;
  color: #bcbcc0;
  font-size: 12px;
}

.trait-meter {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #333338;
}

.trait-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7a2a, #ffbc80);
}

.back-button,
.round-action {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.46);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.message-row {
  display: flex;
  gap: 11px;
  margin: 0 0 22px;
  align-items: flex-end;
}

.message-row.user {
  justify-content: flex-end;
}

.message-avatar {
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
}

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

.speaker {
  display: block;
  margin-bottom: 7px;
  color: #d3d3d7;
  font-size: 12px;
  font-weight: 700;
}

.message {
  max-width: min(560px, 78%);
  padding: 13px 16px;
  border-radius: 6px 17px 17px 17px;
  background: #242427;
  color: #f1f1f2;
  font-size: 14px;
  line-height: 1.65;
}

.user .message {
  border-radius: 17px 17px 6px 17px;
  background: linear-gradient(135deg, #8b3411, #5e220c);
}

.narration {
  margin: 30px 0;
  padding-left: 15px;
  border-left: 2px solid rgba(255, 106, 26, 0.55);
  color: #97979d;
  font-size: 13px;
  font-style: italic;
  line-height: 1.7;
}

.typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 2px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9c9ca1;
  animation: typing 900ms infinite alternate;
}

.typing-dots span:nth-child(2) { animation-delay: 150ms; }
.typing-dots span:nth-child(3) { animation-delay: 300ms; }

@keyframes typing {
  to { opacity: 0.25; transform: translateY(-3px); }
}

.empty-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 100px 30px;
}

.empty-card {
  width: min(540px, 100%);
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  text-align: center;
}

.empty-card h1 { margin: 0 0 10px; }
.empty-card p { margin: 0 0 24px; color: var(--muted); line-height: 1.7; }

.toast-region {
  position: fixed;
  z-index: var(--ds-layer-toast);
  top: calc(var(--ds-safe-top) + 16px);
  left: 50%;
  display: grid;
  width: min(calc(100% - 32px), 460px);
  gap: 10px;
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(34, 34, 38, 0.95);
  color: #ededee;
  font-size: 13px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  animation: toast-in 220ms ease both;
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.toast.error {
  border-color: rgba(255, 106, 26, .72);
  background: rgba(48, 25, 19, .98);
}

.auth-official-form [aria-invalid="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 106, 26, .32);
}

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

.route-page {
  min-height: 100vh;
  padding: 104px 0 110px;
}

.route-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.route-header h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.055em;
}

.route-header p {
  max-width: 540px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.search-bar {
  display: grid;
  width: min(420px, 100%);
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.search-bar input,
.modal-field input,
.modal-field textarea,
.modal-field select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
}

.modal-field select {
  color: #f2f2f4;
}

.modal-field > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.search-bar input {
  padding: 0 8px;
}

.search-submit {
  min-width: 78px;
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.filter-row,
.period-tabs,
.library-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 24px;
  padding-bottom: 5px;
}

.filter-chip,
.period-tab,
.library-tab {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #a8a8ae;
  cursor: pointer;
}

.filter-chip:hover,
.period-tab:hover,
.library-tab:hover,
.filter-chip.active,
.period-tab.active,
.library-tab.active {
  border-color: rgba(255, 106, 26, 0.46);
  background: var(--accent-soft);
  color: #ffd4bc;
}

.result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 15px;
  color: #a4a4aa;
  font-size: 13px;
}

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

.character-grid .character-card {
  min-width: 0;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 72px 24px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
  text-align: center;
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 62px 74px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(110deg, rgba(28, 28, 31, 0.96), rgba(15, 15, 17, 0.96));
  cursor: pointer;
  transition: 180ms ease;
}

.ranking-item:hover {
  border-color: rgba(255, 106, 26, 0.38);
  transform: translateX(4px);
}

.rank-number {
  color: #77777e;
  font-size: 25px;
  font-weight: 900;
  text-align: center;
}

.ranking-item:nth-child(-n+3) .rank-number {
  color: #ffad75;
}

.ranking-thumb {
  width: 74px;
  height: 74px;
  overflow: hidden;
  border-radius: 12px;
}

.ranking-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-copy h3 {
  margin: 0 0 7px;
}

.ranking-copy p,
.ranking-stat span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.ranking-stat {
  text-align: right;
}

.ranking-stat strong {
  display: block;
  margin-bottom: 5px;
  color: #efefef;
}

.profile-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
}

.profile-panel,
.settings-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.profile-panel {
  padding: 30px;
  text-align: center;
}

.profile-avatar-large {
  width: 94px;
  height: 94px;
  overflow: hidden;
  margin: 0 auto 17px;
  border: 3px solid #3c3c41;
  border-radius: 50%;
}

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

.profile-panel h2 {
  margin: 0 0 6px;
}

.profile-panel > p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.profile-stats span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.stack-buttons {
  display: grid;
  gap: 8px;
}

.settings-panel {
  overflow: hidden;
}

.settings-title {
  margin: 0;
  padding: 23px 24px 15px;
  font-size: 16px;
}

.setting-row {
  display: grid;
  width: 100%;
  min-height: 68px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: white;
  text-align: left;
  cursor: pointer;
}

.setting-row:hover { background: rgba(255, 255, 255, 0.025); }
.setting-row small { display: block; margin-top: 4px; color: var(--muted); }
.setting-row > span:last-child { color: #77777d; }

.detail-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.favorite-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: #a5a5aa;
  cursor: pointer;
}

.favorite-button.active {
  border-color: rgba(255, 106, 26, 0.45);
  background: var(--accent-soft);
  color: var(--accent-2);
}

.modal-root:empty { display: none; }

.modal-root {
  position: fixed;
  z-index: 200;
  inset: 0;
}

.modal-root:not(:empty) {
  animation: modal-root-fade 160ms ease both;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  opacity: 1;
}

@keyframes modal-root-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-panel {
  position: relative;
  width: min(100%, 520px);
  max-height: min(780px, calc(100dvh - 48px));
  overflow-y: auto;
  overflow-anchor: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: #151517;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.58);
  animation: modal-up 220ms ease both;
}

.modal-root[data-continuity-update="true"] .modal-panel {
  animation: none;
}

.modal-panel.wide { width: min(100%, 700px); }

@keyframes modal-up {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 16px;
}

.modal-header h2 {
  margin: 0;
  font-size: 21px;
}

.modal-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: #bbb;
  cursor: pointer;
}

.modal-body {
  padding: 8px 24px 24px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: 11px;
  background: #0d0d0e;
}

.auth-tab {
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.auth-tab.active {
  background: var(--surface-3);
  color: white;
  font-weight: 800;
}

.modal-form {
  display: grid;
  gap: 13px;
}

.account-profile-settings {
  display: grid;
  gap: 14px;
}

.account-profile-settings > section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111113;
}

.account-profile-settings h3 {
  margin: 0;
  font-size: 14px;
}

.account-profile-settings .status-note { margin-top: 0; }

.modal-field {
  display: grid;
  gap: 7px;
}

.modal-field label,
.modal-field > span {
  color: #bbbcc1;
  font-size: 12px;
  font-weight: 700;
}

.modal-field input,
.modal-field textarea {
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f0f11;
}

.modal-field textarea {
  min-height: 96px;
  padding-top: 12px;
  resize: vertical;
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #aaaab0;
  font-size: 11px;
  line-height: 1.55;
}

.checkbox-line input { margin-top: 2px; accent-color: var(--accent); }
.inline-link { padding: 0; border: 0; background: transparent; color: var(--accent-2); cursor: pointer; }

.modal-submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(110deg, #ff771f, #cb4305);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 19px 0;
  color: #66666c;
  font-size: 10px;
}

.divider::before,
.divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.social-button,
.option-card,
.notice-item,
.scene-card,
.menu-action {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: #d9d9dc;
  cursor: pointer;
}

.social-button {
  min-height: 44px;
  border-radius: 10px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.option-card {
  min-height: 96px;
  padding: 13px;
  border-radius: 12px;
  text-align: left;
}

.option-card strong,
.option-card span {
  display: block;
}

.option-card strong { margin-bottom: 7px; }
.option-card span { color: var(--muted); font-size: 11px; }
.option-card.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(255, 106, 26, 0.18); }

.balance-card {
  margin-bottom: 15px;
  padding: 20px;
  border: 1px solid rgba(255, 106, 26, 0.2);
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(255, 106, 26, 0.13), rgba(255, 106, 26, 0.025));
}

.balance-card span,
.balance-card strong { display: block; }
.balance-card span { color: #cda58f; font-size: 11px; }
.balance-card strong { margin-top: 7px; font-size: 28px; }

.notice-list,
.menu-list {
  display: grid;
  gap: 8px;
}

.notice-item,
.menu-action {
  width: 100%;
  padding: 14px;
  border-radius: 11px;
  text-align: left;
}

.notice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.notice-copy { min-width: 0; }
.notice-state { flex: 0 0 auto; color: #77777e; font-size: 10px; font-weight: 800; }
.notice-item.unread .notice-state { color: var(--accent-2); }
.notice-item.read { opacity: 0.72; }

.notice-item strong,
.notice-item small {
  display: block;
}

.notice-item small { margin-top: 6px; color: var(--muted); }
.notice-item.unread { border-color: rgba(255, 106, 26, 0.28); background: rgba(255, 106, 26, 0.07); }

.modal-footer {
  display: flex;
  gap: 8px;
  padding: 0 24px 24px;
}

.modal-footer > button { flex: 1; }

.reward-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 14px 0 20px;
}

.reward-day {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #101011;
  color: #808087;
  font-size: 11px;
}

.reward-day.done { color: #a7d999; background: rgba(92, 180, 87, 0.11); }
.reward-day.today { border-color: var(--accent); color: #ffc4a5; background: var(--accent-soft); }

.preview-copy {
  color: #c5c5ca;
  line-height: 1.9;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.scene-card {
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
  text-align: left;
}

.scene-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.scene-card span {
  display: block;
  padding: 10px;
  font-size: 11px;
}

.scene-card.active { border-color: var(--accent); }

.status-note {
  margin-top: 14px;
  padding: 12px;
  border-left: 2px solid var(--accent);
  background: rgba(255, 106, 26, 0.06);
  color: #aaaab0;
  font-size: 11px;
  line-height: 1.6;
}

.studio-page,
.studio-editor-page {
  min-height: 100vh;
  padding: 92px 0 110px;
  animation-fill-mode: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 106, 26, 0.08), transparent 34%),
    radial-gradient(circle at 90% 18%, rgba(118, 76, 255, 0.08), transparent 30%),
    #0b0b0c;
}

.studio-landing,
.studio-editor-shell {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.studio-hero,
.studio-editor-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.studio-hero {
  margin-bottom: 25px;
}

.studio-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #ff9459;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.studio-brand::before {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(255, 106, 26, 0.5);
  border-radius: 8px;
  content: "M";
  font-size: 11px;
}

.studio-hero h1,
.studio-editor-header h1 {
  margin: 0;
  letter-spacing: -0.055em;
}

.studio-hero h1 { font-size: clamp(36px, 5vw, 58px); }
.studio-editor-header h1 { font-size: clamp(27px, 3vw, 38px); }

.studio-hero p,
.studio-editor-header p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.studio-utility-actions,
.editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.studio-mini-button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: #d6d6d9;
  font-weight: 750;
  cursor: pointer;
}

.studio-mini-button:hover,
.studio-mini-button.active {
  border-color: rgba(255, 106, 26, 0.42);
  background: var(--accent-soft);
  color: #ffd5bf;
}

.studio-access-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 106, 26, 0.22);
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(255, 106, 26, 0.1), rgba(255, 106, 26, 0.025));
}

.access-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 106, 26, 0.16);
  color: #ffad7c;
  font-size: 20px;
}

.studio-access-banner strong,
.studio-access-banner small { display: block; }
.studio-access-banner small { margin-top: 5px; color: #aaaab0; line-height: 1.45; }

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

.mode-card {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: #151517;
  isolation: isolate;
}

.mode-card::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(9, 9, 10, 0.82) 58%, #0e0e10 100%);
  content: "";
}

.mode-card.easy { background: linear-gradient(145deg, #522d1c, #171314 62%); }
.mode-card.custom { background: linear-gradient(145deg, #27213d, #111118 62%); }

.mode-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.mode-card h2 { margin: 0; font-size: 28px; letter-spacing: -0.04em; }

.mode-ribbon {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 106, 26, 0.16);
  color: #ffad7a;
  font-size: 10px;
  font-weight: 900;
}

.mode-card.custom .mode-ribbon { background: rgba(141, 108, 255, 0.16); color: #b8a4ff; }

.mode-visual {
  position: relative;
  height: 230px;
  margin: 18px -28px 18px;
  overflow: hidden;
}

.mode-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 26%;
  opacity: 0.88;
  filter: saturate(0.86);
}

.mode-card.custom .mode-visual img { filter: hue-rotate(20deg) saturate(0.76) brightness(0.8); }

.mode-visual-bubble {
  position: absolute;
  right: 22px;
  bottom: 18px;
  max-width: 240px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px 14px 4px 14px;
  background: rgba(16, 16, 18, 0.76);
  color: white;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  backdrop-filter: blur(12px);
}

.mode-copy { margin: 0 0 15px; color: #c4c4c9; line-height: 1.7; }

.mode-features {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  color: #9c9ca3;
  font-size: 12px;
  list-style: none;
}

.mode-features li::before { margin-right: 8px; color: #ff9a62; content: "✓"; }
.mode-card.custom .mode-features li::before { color: #ab94ff; }

.mode-button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(115deg, #ff781f, #d14909);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

.mode-card.custom .mode-button { background: linear-gradient(115deg, #795cff, #5733c5); }

.studio-work-section { margin-top: 50px; }
.studio-work-section .section-heading { margin-bottom: 16px; }

.studio-work-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.studio-work-filter {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid #34353b;
  border-radius: 999px;
  background: #17181d;
  color: #a4a5ac;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.studio-work-filter em {
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #24262d;
  color: #868991;
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.studio-work-filter:hover,
.studio-work-filter:focus-visible {
  border-color: rgba(255, 112, 55, .7);
  color: #fff;
}

.studio-work-filter.active {
  border-color: #ff6c27;
  background: rgba(255, 108, 39, .15);
  color: #ffb184;
}

.studio-work-filter.active em { background: #ff6c27; color: #fff; }

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

.studio-work-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: white;
  text-align: left;
}

.studio-work-main { display: grid; min-width: 0; grid-column: 1 / -1; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 13px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.studio-work-card img { width: 74px; height: 74px; object-fit: cover; border-radius: 10px; }
.studio-work-thumb-fallback { display: grid; width: 74px; height: 74px; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #33231e, #17181d); color: #ff9b68; font-size: 28px; font-weight: 900; }
.studio-work-card strong,
.studio-work-card small { display: block; }
.studio-work-card small { overflow: hidden; margin-top: 6px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.studio-work-progress { display: grid; min-width: 0; gap: 6px; }
.studio-work-progress > span { display: flex; align-items: center; justify-content: space-between; color: #ffc178; font-size: 10px; }
.studio-work-progress > span b { font-size: 10px; }
.studio-work-progress > span em { color: #92949a; font-style: normal; }
.studio-work-progress > i { display: block; height: 5px; overflow: hidden; border-radius: 999px; background: #303139; }
.studio-work-progress > i > b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#ff6c27,#ffa25f); }
.studio-work-card.complete .studio-work-progress > span { color: #9fd99a; }
.studio-work-card.complete .studio-work-progress > i > b { background: linear-gradient(90deg,#4baa65,#91db8c); }
.studio-work-actions { display: flex; align-self: end; gap: 6px; }
.studio-work-edit,
.studio-work-delete { min-width: 60px; min-height: 31px; padding: 0 9px; border-radius: 8px; font-size: 10px; font-weight: 800; cursor: pointer; }
.studio-work-edit { border: 1px solid rgba(255,112,55,.5); background: rgba(255,98,40,.08); color: #ff9b70; }
.studio-work-edit:hover,
.studio-work-edit:focus-visible { border-color: #ff7040; background: rgba(255,98,40,.18); color: #fff; }
.studio-work-delete { border: 1px solid rgba(224,77,77,.48); background: rgba(224,77,77,.08); color: #f09a9a; }
.studio-work-delete:hover,
.studio-work-delete:focus-visible { border-color: #e95d5d; background: rgba(224,77,77,.18); color: #fff; }
.studio-work-actions button:disabled { opacity: .45; cursor: not-allowed; }
.studio-work-state { grid-column: 1 / -1; display: grid; min-height: 108px; place-items: center; align-content: center; gap: 8px; padding: 20px; border: 1px dashed #34353b; border-radius: 12px; color: #a4a5ac; text-align: center; }
.studio-work-state.error { border-color: rgba(255, 101, 45, .45); color: #ffab83; }
.studio-work-state .secondary-button { margin-top: 5px; }
.studio-new-work { width: 100%; margin-top: 12px; }

.studio-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.studio-breadcrumb button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #ff9d68;
  cursor: pointer;
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #85858b;
  font-size: 11px;
}

.save-state::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #63b85e;
  content: "";
}
.save-state[data-state="saving"]::before { animation: studio-save-pulse 900ms ease-in-out infinite alternate; background: #ff9a58; }
.save-state[data-state="error"] { color: #ff8b76; }
.save-state[data-state="error"]::before { background: #ff6257; }
@keyframes studio-save-pulse { to { opacity: .35; transform: scale(.7); } }

.studio-progress-tabs {
  position: sticky;
  z-index: 5;
  top: 62px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: 24px 0 18px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 13, 14, 0.92);
  backdrop-filter: blur(16px);
}

.studio-progress-tab {
  display: inline-flex;
  min-width: max-content;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #85858c;
  font-size: 12px;
  cursor: pointer;
}

.studio-progress-tab::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #424247;
  content: "";
}

.studio-progress-tab.active { background: var(--surface-2); color: white; font-weight: 850; }
.studio-progress-tab.active::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.studio-progress-tab.done::before { background: #62b45d; }

.studio-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 18px;
}

.studio-form-card,
.studio-preview-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.studio-form-card { overflow: hidden; }

.studio-form-head {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.studio-form-head h2 { margin: 0; font-size: 20px; }
.studio-form-head p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.studio-form-body {
  display: grid;
  gap: 22px;
  padding: 24px;
}

.studio-form-section {
  display: grid;
  gap: 12px;
}

.studio-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.studio-section-title h3 { margin: 0; font-size: 14px; }
.studio-section-title small { color: #73737a; }
.studio-creation-routing-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.studio-image-model-selector {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(220px, 1.3fr);
  gap: 10px 12px;
  padding: 12px;
  border: 1px solid rgba(255, 122, 31, 0.42);
  border-radius: 12px;
  background: rgba(255, 122, 31, 0.08);
}
.studio-image-model-selector label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.studio-image-model-selector label > span {
  color: #d8d8dc;
  font-size: 12px;
  font-weight: 700;
}
.studio-image-model-selector select {
  width: 100%;
  min-height: 40px;
  padding: 8px 34px 8px 10px;
  border: 1px solid #393941;
  border-radius: 9px;
  background: #111216;
  color: #f4f4f6;
}
.studio-image-model-selector > small {
  grid-column: 1 / -1;
  color: #aaaab2;
  line-height: 1.45;
}
.studio-image-model-selector.compact {
  display: flex;
  align-items: end;
  padding: 8px;
}
.studio-image-model-selector.compact label { min-width: 132px; }
.studio-image-model-selector.compact label:nth-child(2) { min-width: 220px; }
.studio-image-model-selector.compact > small {
  max-width: 280px;
}

@media (max-width: 760px) {
  .studio-image-model-selector,
  .studio-image-model-selector.compact {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .studio-image-model-selector.compact label,
  .studio-image-model-selector.compact label:nth-child(2) { min-width: 0; }
  .studio-image-model-selector > small { grid-column: 1; }
}

.studio-field {
  display: grid;
  gap: 7px;
}

.studio-field > span,
.studio-field label {
  color: #bcbcc1;
  font-size: 11px;
  font-weight: 800;
}

.studio-field input,
.studio-field textarea,
.studio-field select,
.studio-inline-input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: #0e0e10;
  color: white;
}

.studio-field textarea { min-height: 120px; padding-top: 12px; line-height: 1.6; resize: vertical; }
.studio-field textarea.tall { min-height: 220px; }

.studio-two-cols,
.studio-three-cols {
  display: grid;
  gap: 12px;
}

.studio-two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.studio-three-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.studio-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.studio-choice {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #101012;
  color: #96969c;
  font-size: 11px;
  cursor: pointer;
}

.studio-choice.active {
  border-color: rgba(255, 106, 26, 0.48);
  background: var(--accent-soft);
  color: #ffd2b9;
}

.studio-upload-zone {
  display: grid;
  min-height: 190px;
  place-items: center;
  padding: 24px;
  border: 1px dashed #444449;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent);
  color: #99999f;
  text-align: center;
  cursor: pointer;
}

.studio-upload-zone:hover { border-color: rgba(255, 106, 26, 0.5); color: #d0d0d4; }
.studio-upload-zone strong { display: block; margin: 8px 0 5px; color: white; }
.studio-upload-zone small { display: block; line-height: 1.5; }
.upload-symbol { font-size: 28px; color: #ff9962; }

.studio-preview-panel {
  position: sticky;
  top: 132px;
  overflow: hidden;
}

.studio-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.studio-preview-head strong { font-size: 13px; }
.preview-live { color: #70c56b; font-size: 10px; }

.studio-preview-cover {
  position: relative;
  height: 315px;
  overflow: hidden;
}

.studio-preview-cover:not(.pending) { height: auto; }
.studio-preview-cover:not(.pending) img { display: block; width: 100%; height: auto; }
.studio-preview-cover::after { position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(10, 10, 11, 0.94)); content: ""; }
.studio-preview-cover.pending { background: radial-gradient(circle at 50% 30%, rgba(255, 106, 26, .11), transparent 42%), #111216; }
.studio-preview-cover.pending::after { inset: 55% 0 0; }
.studio-preview-media-pending {
  position: absolute;
  z-index: 1;
  top: 22px;
  right: 22px;
  left: 22px;
  display: grid;
  min-height: 150px;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 18px;
  border: 1px dashed #3a3b42;
  border-radius: 14px;
  color: #8f9098;
  text-align: center;
}
.studio-preview-media-pending > span { color: #ff8e53; font-size: 25px; line-height: 1; }
.studio-preview-media-pending strong { color: #d5d5d9; font-size: 13px; }
.studio-preview-media-pending small { font-size: 10px; line-height: 1.55; }

.studio-preview-copy {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 16px;
  left: 18px;
}

.studio-preview-copy h3 { margin: 0 0 6px; font-size: 23px; }
.studio-preview-copy p { margin: 0; color: #d0d0d5; font-size: 12px; line-height: 1.55; }

.studio-preview-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.studio-preview-tags span { padding: 4px 7px; border-radius: 999px; background: rgba(255, 106, 26, 0.16); color: #ffc7a8; font-size: 9px; }

.studio-preview-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.studio-preview-meta div { padding: 13px 8px; background: #121214; text-align: center; }
.studio-preview-meta strong,
.studio-preview-meta span { display: block; }
.studio-preview-meta strong { font-size: 12px; }
.studio-preview-meta span { margin-top: 4px; color: #77777d; font-size: 9px; }

.studio-callout {
  padding: 14px;
  border: 1px solid rgba(255, 106, 26, 0.18);
  border-radius: 12px;
  background: rgba(255, 106, 26, 0.055);
  color: #aaaab0;
  font-size: 11px;
  line-height: 1.65;
}

.studio-bottom-actions {
  display: flex;
  gap: 9px;
  padding: 20px 24px;
  border-top: 1px solid var(--line);
}

.studio-bottom-actions > button { flex: 1; }

.modal-panel.studio-media-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1120px, calc(100vw - 48px));
  height: min(820px, calc(100dvh - 48px));
  max-height: min(820px, calc(100dvh - 48px));
  overflow: hidden;
}

.studio-media-modal .modal-header {
  border-bottom: 1px solid var(--line);
  background: rgba(21, 21, 23, .98);
}

.studio-media-modal .modal-body {
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.studio-media-shell {
  display: grid;
  min-height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
}

.studio-media-source-panel { min-width: 0; }
.studio-media-generator { gap: 18px; }
.studio-media-generator > section { display: grid; gap: 9px; }

.studio-media-generation-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #111216;
}

.studio-media-generation-tabs button {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9c9ca3;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.studio-media-generation-tabs button.active {
  background: #292b30;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.studio-creation-use-library,
.studio-creation-use-group,
.studio-creation-use-list {
  display: grid;
  gap: 12px;
}

.studio-creation-use-group {
  padding-top: 6px;
}

.studio-creation-use-group > header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.studio-creation-use-group > header small {
  color: var(--muted);
}

.studio-creation-use-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #13151a;
}

.studio-creation-use-card.selected {
  border-color: var(--orange);
}

.studio-creation-use-card .studio-media-preview-trigger {
  width: 64px;
  height: 64px;
}

.studio-creation-use-card > div:not(.studio-creation-use-actions) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.studio-creation-use-card > div:not(.studio-creation-use-actions) small {
  color: var(--muted);
}

.studio-creation-use-actions {
  display: flex;
  gap: 6px;
}

.studio-creation-use-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1b1d23;
  color: #fff;
}

.studio-creation-use-actions button.danger {
  color: #ff8f76;
}

.studio-contextual-deployment-picker {
  margin: 0;
}

.studio-contextual-inline-status {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
}

.studio-contextual-inline-status.error {
  border-color: rgba(255, 99, 91, .58);
  color: #ffa59e;
}

.studio-contextual-inline-card {
  align-items: start;
}

.studio-contextual-inline-main,
.studio-contextual-inline-main label {
  display: grid;
  gap: 5px;
}

.studio-contextual-title > span,
.studio-contextual-axis-grid label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

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

.studio-contextual-match-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.studio-contextual-match-summary > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.studio-contextual-match-summary b { color: var(--text); }

.studio-media-character-selector,
.studio-world-character-roster {
  display: grid;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #13151a;
  gap: 12px;
}

.studio-media-character-selector {
  grid-template-columns: minmax(0, 1fr) minmax(220px, .6fr) auto;
  align-items: end;
}

.studio-media-character-selector > div,
.studio-media-character-selector label,
.studio-world-character-roster > header > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.studio-media-character-selector > div:last-child,
.studio-world-character-roster > header,
.studio-world-character-card > footer,
.studio-appearance-anchor-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.studio-media-character-selector select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0f1014;
  color: #fff;
}

.studio-media-character-filter {
  display: grid;
  min-width: 180px;
  gap: 5px;
}

.studio-media-character-filter span { color: var(--muted); font-size: 11px; }
.studio-media-character-filter select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1014;
  color: #fff;
}

.studio-media-batch-checkbox {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 145, 88, .55);
  border-radius: 8px;
  background: rgba(12, 13, 16, .92);
  color: #ffd2ba;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.studio-media-batch-checkbox input { accent-color: var(--orange); }

.studio-media-batch-actions {
  position: sticky;
  z-index: 8;
  top: calc(var(--topbar) + 78px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(240, 91, 91, .55);
  border-radius: 10px;
  background: rgba(31, 15, 18, .96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .38);
  color: #ffd0d0;
}

.studio-media-modal .studio-media-batch-actions { top: 8px; }

.studio-media-batch-actions button { min-height: 38px; }

.studio-world-character-roster > header {
  align-items: flex-start;
  justify-content: space-between;
}

.studio-world-character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.studio-world-character-card {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0f1014;
  gap: 10px;
}

.studio-world-character-card.selected { border-color: var(--orange); }
.studio-world-character-card > div { display: grid; gap: 4px; }
.studio-world-character-card > div > span { color: var(--orange); font-size: 10px; font-weight: 800; }
.studio-world-character-card > div > small { color: var(--muted); }
.studio-world-character-card dl { display: grid; margin: 0; gap: 7px; }
.studio-world-character-card dl > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; }
.studio-world-character-card dt { color: var(--muted); font-size: 10px; }
.studio-world-character-card dd { min-width: 0; margin: 0; font-size: 11px; overflow-wrap: anywhere; }

.studio-contextual-inline-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.studio-contextual-inline-heading small,
.studio-contextual-inline-main label span {
  color: var(--muted);
  font-size: 11px;
}

.studio-contextual-inline-main input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1014;
  color: #fff;
}

.studio-contextual-inline-main input:disabled {
  color: #aaaab2;
  opacity: .72;
}

.studio-contextual-inline-card .studio-creation-use-actions {
  max-width: 210px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.studio-media-generator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .42fr);
  align-items: start;
  gap: 16px;
  min-height: 0;
}

.studio-media-generator-layout.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.studio-opening-candidate-picker {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.studio-horizontal-media-picker .studio-creation-use-list {
  display: flex;
  gap: 10px;
  padding: 2px 2px 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
}

.studio-horizontal-media-picker .studio-creation-use-card {
  flex: 0 0 min(360px, 82vw);
  min-width: 0;
  scroll-snap-align: start;
}

.studio-title-media-picker {
  margin-block: 4px 2px;
  padding: 12px;
  border: 1px solid rgba(255, 106, 26, .24);
  border-radius: 13px;
  background: rgba(255, 106, 26, .035);
}

.studio-title-media-picker .studio-title-media-card {
  flex: 0 0 430px;
  min-width: 430px;
  grid-template-columns: 128px minmax(104px, 1fr) 148px;
  grid-template-areas: "preview copy actions";
  align-items: center;
}

.studio-title-media-picker .studio-title-media-card .studio-media-preview-trigger {
  grid-area: preview;
  width: 128px;
  height: 80px;
}

.studio-title-media-picker .studio-title-media-card > div:nth-child(2) {
  grid-area: copy;
}

.studio-title-media-picker .studio-title-media-card > div:nth-child(2) strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
}

.studio-title-media-picker .studio-title-media-card .studio-creation-use-actions {
  grid-area: actions;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
}

.studio-title-media-picker .studio-title-media-card .studio-creation-use-actions button {
  width: 100%;
  min-height: 38px;
  white-space: normal;
  word-break: keep-all;
}

.studio-title-media-library {
  display: grid;
  gap: 12px;
  margin-block: 14px;
  padding: 14px;
  border: 1px solid #303139;
  border-radius: 14px;
  background: #101115;
}

.studio-media-result-panel {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 420px;
  height: min(620px, calc(100dvh - 220px));
  gap: 10px;
  max-height: none;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(34, 35, 41, .92), rgba(16, 17, 20, .96));
  overflow: hidden;
}

.studio-generation-activity {
  position: fixed; right: max(20px, var(--ds-safe-right)); bottom: max(20px, var(--ds-safe-bottom)); z-index: var(--ds-layer-toast);
  width: min(360px, calc(100vw - 40px)); max-height: 45vh; overflow: auto;
  padding: 16px; border: 1px solid var(--ds-color-line); border-radius: 14px;
  background: var(--ds-color-surface-raised); color: var(--ds-color-text);
  box-shadow: 0 8px 28px #0004;
}
.studio-generation-activity section + section { border-top: 1px solid var(--ds-color-line); margin-top: 12px; padding-top: 12px; }
.studio-generation-activity p { margin: 8px 0; font-size: 13px; }
.studio-generation-document-previews { max-height: 36vh; overflow: auto; padding: 12px 20px; }
.studio-generation-document-previews details { padding: 10px 0; }
.studio-generation-document-previews p { white-space: pre-wrap; line-height: 1.7; }
.studio-media-progress {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 52px auto;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid #303137;
  border-radius: 10px;
  background: #15161a;
}
.studio-media-cancel-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 99, 91, .72);
  border-radius: 8px;
  background: rgba(255, 99, 91, .12);
  color: #ffb0aa;
  font-size: 11px;
  font-weight: 700;
}
.studio-media-cancel-button:hover { background: rgba(255, 99, 91, .22); }
.studio-media-cancel-button:disabled { cursor: wait; opacity: .62; }
.studio-media-progress-previews {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 7px;
  max-height: 238px;
  overflow-y: auto;
}
.studio-media-progress-previews:empty { display: none; }
.studio-media-progress-previews figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #35363d;
  border-radius: 8px;
  background: #0e0f12;
}
.studio-media-progress-previews img { display: block; width: 100%; height: 92px; object-fit: contain; background: #090a0c; }
.studio-live-preview-trigger { display: block; width: 100%; height: 100%; padding: 0; overflow: hidden; border: 0; border-radius: inherit; background: transparent; cursor: zoom-in; }
.studio-media-progress-previews .studio-live-preview-trigger { height: auto; }
.studio-live-preview-trigger:focus-visible { outline: 2px solid var(--color-accent, #ff6b1a); outline-offset: -2px; }
.studio-media-progress-previews figcaption {
  padding: 4px 5px;
  overflow: hidden;
  color: #aaaab1;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-media-progress.generating { border-color: rgba(255, 112, 51, .62); }
.studio-media-progress.completed { border-color: rgba(113, 202, 137, .4); }
.studio-media-progress.error { border-color: rgba(255, 99, 91, .58); }
.studio-media-progress-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #292a30;
  color: #c4c4ca;
  font-weight: 800;
}
.studio-media-progress.completed .studio-media-progress-icon { background: rgba(101, 191, 126, .18); color: #93e69f; }
.studio-media-progress.error .studio-media-progress-icon { background: rgba(255, 99, 91, .16); color: #ffa59e; }
.studio-media-progress strong,
.studio-media-progress small { display: block; }
.studio-media-progress strong { color: #f0f0f2; font-size: 11px; }
.studio-media-progress small { margin-top: 3px; color: #96969d; font-size: 10px; line-height: 1.35; }
.studio-media-progress-meter { display: grid; justify-items: end; gap: 6px; align-self: stretch; align-content: center; }
.studio-media-progress-meter b { color: #f5b08e; font-size: 12px; font-variant-numeric: tabular-nums; }
.studio-media-progress-meter i { display: block; width: 52px; height: 4px; overflow: hidden; border-radius: 999px; background: #34353d; }
.studio-media-progress-meter i span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff985e, #ff5f16); transition: width .22s ease; }
.studio-media-progress.completed .studio-media-progress-meter b { color: #93e69f; }
.studio-media-progress.completed .studio-media-progress-meter i span { background: #70ca89; }
.studio-media-progress.error .studio-media-progress-meter b { color: #ffa59e; }

.studio-media-result-groups {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.studio-media-result-group {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #2d2e34;
  border-radius: 11px;
  background: rgba(10, 11, 14, .42);
}

.studio-media-result-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.studio-media-result-group > header strong { color: #dedee2; font-size: 11px; }
.studio-media-result-group > header small { color: #85868d; font-size: 9px; }
.studio-media-result-list { display: grid; gap: 8px; }
.studio-media-result-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 38px 7px 7px;
  border: 1px solid #2b2c32;
  border-radius: 10px;
  background: #101115;
  overflow: hidden;
}
.studio-media-result-card.selected { border-color: rgba(255, 110, 40, .65); box-shadow: inset 0 0 0 1px rgba(255, 110, 40, .12); }
.studio-media-result-card img,
.studio-media-result-card video,
.studio-media-result-icon {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  object-fit: cover;
}
.studio-media-preview-trigger {
  display: block;
  width: 38px;
  height: 38px;
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #292a30;
  cursor: zoom-in;
}
.studio-media-preview-trigger:hover,
.studio-media-preview-trigger:focus-visible { border-color: #ff8a51; outline: none; }
.studio-media-result-icon { display: grid; place-items: center; background: #292a30; color: #ffae7f; font-size: 15px; }
.studio-media-result-card strong,
.studio-media-result-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-media-result-card strong { color: #ededf0; font-size: 10px; }
.studio-media-result-card small { margin-top: 3px; color: #898990; font-size: 9px; }
.studio-media-result-card b { color: #ff9d68; font-size: 9px; white-space: nowrap; }
.studio-reference-grounding {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(66, 133, 244, .28);
}
.studio-reference-grounding header { display: grid; gap: 5px; }
.studio-reference-grounding header strong { color: #d9e7ff; font-size: 10px; }
.studio-reference-grounding header span { display: flex; flex-wrap: wrap; gap: 4px; }
.studio-reference-grounding header i {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(66, 133, 244, .12);
  color: #a9c7ff;
  font-size: 9px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.studio-reference-grounding iframe {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 7px;
  background: #fff;
}
.studio-media-result-actions {
  grid-column: 1 / -1;
  display: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  width: 100%;
  box-sizing: border-box;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 132, 72, .28);
}
.studio-media-result-card.has-media-actions:hover .studio-media-result-actions,
.studio-media-result-card.has-media-actions:focus-within .studio-media-result-actions { display: grid; }
.studio-media-result-actions button,
.studio-video-use-actions button {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 132, 72, .72);
  border-radius: 8px;
  background: rgba(35, 24, 20, .96);
  color: #ffe5d7;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  cursor: pointer;
}
.studio-media-result-actions button.danger,
.studio-video-use-actions button.danger { border-color: rgba(244, 96, 96, .72); background: rgba(39, 18, 21, .96); color: #ffc6c6; }
.studio-video-use-actions {
  grid-column: 1 / -1;
  display: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  width: 100%;
  box-sizing: border-box;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 132, 72, .28);
}
.studio-media-result-card.has-video-actions:hover .studio-video-use-actions,
.studio-media-result-card.has-video-actions:focus-within .studio-video-use-actions { display: grid; }
.studio-video-use-actions button {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
}
@media (hover: none) {
  .studio-media-result-card.has-media-actions .studio-media-result-actions,
  .studio-media-result-card.has-video-actions .studio-video-use-actions { display: grid; }
}
.studio-media-result-empty { margin: 0; padding: 13px; border: 1px dashed #3b3c43; border-radius: 10px; color: #8c8d94; font-size: 10px; line-height: 1.55; }

.studio-media-preview-overlay {
  position: fixed;
  z-index: 360;
  inset: 0;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  padding: 28px 76px 28px 28px;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(12px);
  cursor: zoom-out;
}
.studio-media-preview-stage {
  position: relative;
  display: grid;
  width: auto;
  max-width: calc(100vw - 104px);
  max-height: 92dvh;
  place-items: center;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: default;
}
.studio-media-preview-close {
  position: absolute;
  z-index: 3;
  top: 0;
  right: -48px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .58);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 3px 16px rgba(0, 0, 0, .34);
  cursor: pointer;
}
.studio-media-preview-image {
  display: grid;
  padding: 0;
  place-items: center;
  overflow: visible;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}
.studio-media-preview-image img,
.studio-media-preview-stage > video {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 104px);
  max-height: 92dvh;
  margin: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.studio-media-preview-stage > video { background: #000; }
.studio-reference-picker {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 111, 42, .48);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(255, 101, 31, .10), rgba(17, 18, 22, .9));
}
.studio-reference-picker > div:first-child { display: grid; gap: 4px; }
.studio-reference-picker strong { color: #f4f4f6; font-size: 13px; }
.studio-reference-picker small { color: #a6a7ae; font-size: 11px; line-height: 1.55; }
.studio-reference-picker.selected { grid-template-columns: minmax(0, 1fr) 48px auto; align-items: center; border-color: rgba(79, 190, 112, .55); }
.studio-reference-picker.selected > img { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; }
.studio-reference-picker.selected > span { color: #8fd9a5; font-size: 11px; font-weight: 800; }
.studio-reference-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 9px; }
.studio-reference-options button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px;
  border: 1px solid #34353d;
  border-radius: 10px;
  background: #111216;
  color: #dedee3;
  text-align: left;
  cursor: pointer;
}
.studio-reference-options button:hover,
.studio-reference-options button:focus-visible { border-color: #ff7836; outline: none; }
.studio-reference-options img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.studio-reference-options b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.studio-media-preview-nav {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  display: flex;
  width: 28%;
  align-items: center;
  gap: 8px;
  padding: 18px;
  border: 0;
  color: #fff;
  opacity: 0;
  transition: opacity 160ms ease, background 160ms ease;
  cursor: pointer;
}
.studio-media-preview-nav.previous {
  left: 0;
  justify-content: flex-start;
  background: linear-gradient(90deg, rgba(0, 0, 0, .62), transparent);
  text-align: left;
}
.studio-media-preview-nav.next {
  right: 0;
  justify-content: flex-end;
  background: linear-gradient(270deg, rgba(0, 0, 0, .62), transparent);
  text-align: right;
}
.studio-media-preview-nav:hover,
.studio-media-preview-nav:focus-visible { opacity: 1; }
.studio-media-preview-nav span { font-size: clamp(42px, 5vw, 72px); font-weight: 200; line-height: 1; text-shadow: 0 2px 12px #000; }
.studio-media-preview-nav small { font-size: 13px; font-weight: 700; text-shadow: 0 1px 8px #000; }

.studio-appearance-graph {
  display: grid;
  gap: 14px;
  padding: 15px;
  border: 1px solid rgba(255, 108, 42, .34);
  border-radius: 14px;
  background: radial-gradient(circle at top left, rgba(255, 104, 39, .12), transparent 42%), #111216;
}

.studio-appearance-graph.locked {
  border-color: rgba(151, 153, 161, .22);
  background: #17181c;
  filter: grayscale(.72);
  opacity: .7;
}
.studio-appearance-graph-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.studio-appearance-graph-head strong,
.studio-appearance-graph-head small { display: block; }
.studio-appearance-graph-head strong { color: #f4f4f6; font-size: 12px; }
.studio-appearance-graph-head small { margin-top: 4px; color: #92939a; font-size: 9px; line-height: 1.5; }
.studio-appearance-graph-head > span { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: rgba(255, 104, 39, .14); color: #ffad7e; font-size: 9px; font-weight: 800; }
.studio-appearance-graph.locked .studio-appearance-graph-head > span { background: rgba(94, 185, 120, .14); color: #9be0aa; }
.studio-style-reference.locked { opacity: .68; }
.studio-style-reference.locked input:disabled { cursor: not-allowed; background: #1b1c20; color: #777980; }
.studio-appearance-axis-list { display: grid; gap: 13px; }
.studio-appearance-axis { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.studio-rendering-style-axis { min-width: 0; margin: 0; padding: 0; border: 0; }
.studio-rendering-style-axis legend { padding: 0 0 5px; }
.studio-appearance-axis-title { color: #d7d7dc; font-size: 10px; font-weight: 800; }
.studio-appearance-axis-labels { display: flex; justify-content: space-between; gap: 12px; color: #aaaab1; font-size: 9px; }
.studio-appearance-axis-labels b { font-weight: 600; }
.studio-appearance-axis input[type="range"] {
  width: 100%;
  height: 5px;
  margin: 3px 0;
  border-radius: 999px;
  appearance: none;
  background: linear-gradient(90deg, #ff7434 0 var(--axis-position), #383940 var(--axis-position) 100%);
  cursor: pointer;
}
.studio-appearance-axis input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #15161a;
  border-radius: 50%;
  appearance: none;
  background: #ff8a51;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35);
}
.studio-appearance-axis input[type="range"]:disabled { cursor: not-allowed; filter: saturate(.45); opacity: .7; }
.studio-appearance-axis output { color: #808188; font-size: 9px; line-height: 1.35; }
.studio-appearance-summary { margin: 0; padding: 10px 11px; border-radius: 10px; background: #0c0d10; color: #8f9097; font-size: 9px; line-height: 1.55; }
.studio-appearance-summary strong,
.studio-appearance-summary span { display: block; }
.studio-appearance-summary strong { margin-bottom: 3px; color: #d9d9de; }
.studio-media-contract-note { margin: 0; }

/* Studio asset modal uses a dedicated +20% type scale without enlarging the
   layout boxes themselves, so the fixed desktop/mobile frame stays stable. */
.studio-media-modal .modal-header h2 { font-size: 25px; }
.studio-media-modal .modal-header p { font-size: 14px; }
.studio-media-modal .upload-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-media-modal .upload-tabs button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #34353b;
  border-radius: 9px;
  background: #18191d;
  color: #aaaab2;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.studio-media-modal .upload-tabs button.active { border-color: rgba(255, 108, 42, .72); background: rgba(255, 102, 31, .13); color: #fff; }
.studio-media-modal .studio-media-generation-tabs button { font-size: 13px; }
.studio-media-modal .studio-model-separation strong { font-size: 16px; }
.studio-media-modal .studio-model-separation span { font-size: 12px; }
.studio-media-modal .studio-section-title h3 { font-size: 17px; }
.studio-media-modal .studio-section-title small { font-size: 12px; }
.studio-media-modal .modal-field > span { font-size: 14px; }
.studio-media-modal .modal-field > small,
.studio-media-modal .modal-field textarea,
.studio-media-modal .modal-field input { font-size: 14px; }
.studio-media-modal .status-note { font-size: 13px; }
.studio-media-modal .studio-bottom-actions button { font-size: 14px; }
.studio-media-modal .studio-media-progress strong { font-size: 13px; }
.studio-media-modal .studio-media-progress small { font-size: 12px; }
.studio-media-modal .studio-media-result-group > header strong { font-size: 13px; }
.studio-media-modal .studio-media-result-group > header small { font-size: 11px; }
.studio-media-modal .studio-media-result-card strong { font-size: 12px; }
.studio-media-modal .studio-media-result-card small,
.studio-media-modal .studio-media-result-card b { font-size: 11px; }
.studio-media-modal .studio-media-result-empty { font-size: 12px; }
.studio-media-modal .studio-appearance-graph-head strong { font-size: 14px; }
.studio-media-modal .studio-appearance-graph-head small,
.studio-media-modal .studio-appearance-graph-head > span { font-size: 11px; }
.studio-media-modal .studio-appearance-axis-title { font-size: 12px; }
.studio-media-modal .studio-appearance-axis-labels,
.studio-media-modal .studio-appearance-axis output,
.studio-media-modal .studio-appearance-summary { font-size: 11px; }

.studio-video-planner { display: grid; gap: 14px; }
.studio-title-media-sequence { display: grid; gap: 18px; }
.studio-title-media-sequence > .studio-image-planner,
.studio-title-media-sequence > .studio-video-generator { display: grid; gap: 14px; }
.studio-video-requirements { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-video-requirements span {
  padding: 6px 8px;
  border: 1px solid #3a3b41;
  border-radius: 999px;
  color: #999aa1;
  font-size: 9px;
}
.studio-video-requirements span.ready { border-color: rgba(90, 190, 116, .5); background: rgba(90, 190, 116, .1); color: #a9e9b6; }
.studio-video-plan-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.studio-video-audio-plan { display: grid; gap: 10px; padding: 16px; border: 1px solid rgba(255, 107, 38, .35); border-radius: 14px; background: rgba(255, 107, 38, .06); }
.studio-video-audio-plan header,
.studio-video-audio-plan label { display: flex; align-items: center; gap: 10px; }
.studio-video-audio-plan header { justify-content: space-between; flex-wrap: wrap; }
.studio-video-audio-plan header small { color: var(--text-muted, #8d8e95); }
.studio-video-audio-plan > input { width: 100%; }
.studio-video-audio-plan > input:disabled { opacity: .45; }
.studio-video-audio-plan > .modal-field { display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.studio-video-audio-plan textarea { width: 100%; min-height: 76px; resize: vertical; box-sizing: border-box; }
.studio-video-audio-plan textarea:disabled { opacity: .5; }
.studio-video-audio-plan .modal-field > small { color: var(--text-muted, #8d8e95); }
.studio-plan-suggestion-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 13px; border: 1px solid #303137; border-radius: 10px; background: #15161a; }
.studio-plan-suggestion-row > div { display: grid; min-width: 0; gap: 4px; }
.studio-plan-suggestion-row strong { color: #f1f1f3; font-size: 11px; }
.studio-plan-suggestion-row small { color: #8d8e95; font-size: 9px; line-height: 1.45; }
.studio-plan-suggestion-row .secondary-button { flex: 0 0 auto; min-height: 32px; padding: 0 10px; font-size: 10px; }
.studio-dialogue-proposal { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #303137; border-radius: 10px; background: #15161a; }
.studio-dialogue-proposal strong,
.studio-dialogue-proposal small { display: block; }
.studio-dialogue-proposal strong { color: #f1f1f3; font-size: 11px; }
.studio-dialogue-proposal small { margin-top: 3px; color: #8d8e95; font-size: 9px; line-height: 1.45; }
.studio-dialogue-proposal .secondary-button { flex: 0 0 auto; min-height: 32px; padding: 0 10px; font-size: 10px; }
.studio-dialogue-suggestions { display: grid; gap: 7px; }
.studio-dialogue-suggestions button {
  padding: 9px 11px;
  border: 1px solid #35363c;
  border-radius: 9px;
  background: #111216;
  color: #c8c8ce;
  font-size: 10px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}
.studio-dialogue-suggestions button.selected { border-color: rgba(255, 101, 31, .72); background: rgba(255, 101, 31, .11); color: #fff; }

.studio-plan-suggestion-row.needs-reference { border-color: rgba(255, 151, 95, .45); background: rgba(255, 104, 33, .06); }

@media (prefers-reduced-motion: reduce) {
  body.route-transition #app > .page,
  .modal-root:not(:empty),
  .modal-panel { animation: none; }
}

@media (max-width: 900px) {
  .modal-panel.studio-media-modal {
    width: min(100%, calc(100vw - 24px));
    height: min(92dvh, 820px);
    max-height: 92dvh;
  }
  .studio-media-generator-layout { grid-template-columns: minmax(0, 1fr); }
  .studio-media-result-panel { position: static; min-height: 360px; height: auto; max-height: none; }
}

@media (max-width: 560px) {
  .modal-panel.studio-media-modal {
    width: 100%;
    height: 92dvh;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
  }
  .studio-media-modal .modal-header { padding: 17px 16px 13px; }
  .studio-media-modal .modal-body { padding: 10px 14px calc(18px + env(safe-area-inset-bottom)); }
  .studio-media-generation-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .studio-media-generation-tabs button:last-child { grid-column: 1 / -1; }
  .studio-creation-use-card { grid-template-columns: 54px minmax(0, 1fr); }
  .studio-creation-use-card .studio-media-preview-trigger { width: 54px; height: 54px; }
  .studio-creation-use-actions { grid-column: 1 / -1; }
  .studio-creation-use-actions button { flex: 1; }
  .studio-title-media-picker .studio-title-media-card {
    flex-basis: min(360px, calc(100vw - 56px));
    min-width: min(360px, calc(100vw - 56px));
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-areas:
      "preview copy"
      "actions actions";
  }
  .studio-title-media-picker .studio-title-media-card .studio-media-preview-trigger {
    width: 104px;
    height: 66px;
  }
  .studio-title-media-picker .studio-title-media-card .studio-creation-use-actions {
    grid-column: auto;
  }
  .studio-contextual-inline-card .studio-creation-use-actions { max-width: none; }
  .studio-contextual-axis-grid,
  .studio-contextual-match-summary,
  .studio-media-character-selector { grid-template-columns: minmax(0, 1fr); }
  .studio-media-character-selector > div:last-child > button,
  .studio-world-character-card > footer > button,
  .studio-appearance-anchor-history-actions > button { min-height: 44px; flex: 1 1 auto; }
  .studio-world-character-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-appearance-anchor-version { grid-template-columns: 54px minmax(0, 1fr); }
  .studio-appearance-anchor-history-actions { grid-column: 1 / -1; }
  .studio-video-plan-fields { grid-template-columns: minmax(0, 1fr); }
  .studio-dialogue-proposal,
  .studio-plan-suggestion-row { align-items: stretch; flex-direction: column; }
  .studio-dialogue-proposal .secondary-button { width: 100%; }
  .studio-plan-suggestion-row .secondary-button { width: 100%; }
  .studio-appearance-graph-head { align-items: stretch; flex-direction: column; }
  .studio-appearance-graph-head > span { align-self: start; }
  .studio-media-preview-overlay { padding: max(10px, env(safe-area-inset-top)) 54px max(10px, env(safe-area-inset-bottom)) 10px; }
  .studio-media-preview-stage { max-width: calc(100vw - 64px); max-height: calc(100dvh - 20px); }
  .studio-media-preview-image img,
  .studio-media-preview-stage > video { max-width: calc(100vw - 64px); max-height: calc(100dvh - 20px); }
  .studio-media-preview-close { right: -44px; }
  .studio-media-preview-nav { width: 32%; padding: 10px; }
  .studio-media-preview-nav small { display: none; }
  .studio-reference-picker.selected { grid-template-columns: minmax(0, 1fr) 44px; }
  .studio-reference-picker.selected > span { grid-column: 1 / -1; }
}
.studio-model-separation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 106, 26, .28);
  border-radius: 12px;
  background: linear-gradient(110deg, rgba(255, 87, 34, .13), rgba(255, 106, 26, .025));
}
.studio-model-separation strong { color: #fff; font-size: 13px; }
.studio-model-separation span { color: #a5a5ab; font-size: 10px; text-align: right; }
.studio-item-list { display: grid; gap: 10px; }

.studio-item-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #101012;
}
.studio-opening-generation-pending,
.studio-opening-generated-editor { display: grid; gap: 14px; padding: 16px; border: 1px solid #34343a; border-radius: 14px; background: #101012; }
.studio-opening-inline-media { display: grid; gap: 14px; padding-top: 16px; border-top: 1px solid #34343a; }
.studio-opening-inline-media > .secondary-button { width: 100%; min-height: 42px; }
.studio-opening-generation-pending p { margin: 0; color: #c9c9ce; line-height: 1.65; }
.studio-opening-generation-pending small { color: #85858c; line-height: 1.55; }
.studio-opening-timing-summary { padding: 11px 13px; border: 1px solid rgba(255,106,26,.28); border-radius: 10px; background: rgba(255,106,26,.09); color: #ffc19e; font-size: 11px; line-height: 1.55; }
.studio-opening-block.dialogue-readonly { border-color: rgba(255,106,26,.32); }
.studio-opening-block.dialogue-readonly textarea[readonly] { color: #d8d8dc; background: #17171a; cursor: not-allowed; opacity: .82; }
.studio-opening-block input[readonly] { color: #a9a9af; background: #17171a; cursor: not-allowed; }
.studio-opening-generated-head > div { display: grid; gap: 4px; }
.studio-field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.studio-regenerate-button { min-height: 30px; padding: 0 11px; border: 1px solid rgba(255,106,26,.38); border-radius: 8px; background: rgba(255,106,26,.1); color: #ffb58d; font-size: 11px; font-weight: 800; cursor: pointer; }
.studio-regenerate-button:hover:not(:disabled) { border-color: rgba(255,106,26,.7); background: rgba(255,106,26,.18); color: #fff; }
.studio-regenerate-button:disabled { cursor: wait; opacity: .55; }
.studio-opening-lock-label { color: #8b8b92; font-size: 11px; font-weight: 700; }

.studio-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.studio-item-title { display: flex; align-items: center; gap: 9px; }
.studio-item-title strong { font-size: 13px; }
.drag-handle { color: #55555b; letter-spacing: -3px; }

.studio-icon-action {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: #88888f;
  cursor: pointer;
}

.studio-icon-action:hover { color: #ff9c68; border-color: rgba(255, 106, 26, 0.4); }

.studio-add-button {
  width: 100%;
  min-height: 45px;
  border: 1px dashed #444449;
  border-radius: 11px;
  background: transparent;
  color: #aaaab0;
  cursor: pointer;
}

.studio-add-button:hover { border-color: rgba(255, 106, 26, 0.45); color: #ffc29f; }

.studio-checklist { display: grid; gap: 9px; }

.studio-check {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #101012;
}

.studio-check-icon { color: #68c263; }
.studio-check strong,
.studio-check small { display: block; }
.studio-check small { margin-top: 4px; color: var(--muted); }
.studio-check > span:last-child { color: #77777d; font-size: 10px; }

.studio-publish-box {
  padding: 18px;
  border: 1px solid rgba(117, 90, 240, 0.26);
  border-radius: 14px;
  background: linear-gradient(125deg, rgba(117, 90, 240, 0.1), transparent);
}

.studio-publish-box h3 { margin: 0 0 8px; }
.studio-publish-box p { margin: 0; color: #aaaab0; line-height: 1.65; font-size: 12px; }

.studio-easy-progress {
  position: sticky;
  z-index: 5;
  top: calc(var(--topbar) + 8px);
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  margin: 24px 0 18px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0d0d0e;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .36);
}

.studio-easy-progress button {
  display: grid;
  min-width: 0;
  min-height: 54px;
  place-items: center;
  gap: 3px;
  padding: 7px 4px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #77777e;
  cursor: pointer;
}

.studio-easy-progress button b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #3a3a3f;
  border-radius: 50%;
  font-size: 10px;
}

.studio-easy-progress button span { overflow: hidden; max-width: 100%; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.studio-easy-progress button.active { background: #222225; color: #fff; }
.studio-easy-progress button.active b { border-color: #ff6a1a; background: #ff6a1a; color: #fff; box-shadow: 0 0 0 4px rgba(255,106,26,.14); }
.studio-easy-progress button.done { color: #bdbdc2; }
.studio-easy-progress button.done b { border-color: #52934f; background: #386c37; color: #d8ffd4; }

.studio-easy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 18px;
}

.studio-easy-preview { position: sticky; top: 142px; display: grid; gap: 12px; min-width: 0; }
.studio-easy-preview .studio-preview-panel { position: static; }
.studio-easy-next { width: 100%; min-height: 48px; border: 1px dashed rgba(255,106,26,.46); border-radius: 12px; background: rgba(255,106,26,.07); color: #ff9f6d; font-weight: 900; cursor: pointer; }
.studio-easy-next:hover { border-style: solid; background: rgba(255,106,26,.13); color: #fff; }

.studio-creation-guide,
.studio-creation-derived {
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid rgba(255, 106, 26, .28);
  border-radius: 13px;
  background: linear-gradient(120deg, rgba(255, 106, 26, .1), rgba(255, 106, 26, .025));
}
.studio-creation-guide.complete { border-color: rgba(105, 199, 128, .4); background: rgba(83, 167, 106, .08); }
.studio-creation-guide strong,
.studio-creation-derived strong { color: #f1f1f3; font-size: 12px; }
.studio-creation-guide p,
.studio-creation-derived small { margin: 0; color: #94959c; font-size: 10px; line-height: 1.6; }
.studio-appearance-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(140px, .55fr); gap: 9px; }
.studio-appearance-options > label {
  display: flex;
  min-width: 0;
  min-height: 72px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #34353c;
  border-radius: 11px;
  background: #121318;
}
.studio-appearance-options input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 auto; accent-color: #ff712a; }
.studio-appearance-options span,
.studio-appearance-options strong,
.studio-appearance-options small { display: block; min-width: 0; }
.studio-appearance-options strong { color: #e8e8eb; font-size: 11px; }
.studio-appearance-options small { margin-top: 4px; color: #8d8e95; font-size: 9px; line-height: 1.45; }
.studio-appearance-options .subject-count { justify-content: space-between; }
.studio-appearance-options input[type="number"] { width: 60px; min-height: 38px; padding: 0 8px; border: 1px solid #44454d; border-radius: 9px; background: #0d0e11; color: #fff; text-align: center; }
.studio-appearance-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 10px;
}
.studio-appearance-source-card {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 9px;
  padding: 14px;
  border: 1px solid #34353c;
  border-radius: 12px;
  background: #121318;
}
.studio-appearance-source-card > strong { color: #f0f0f2; font-size: 12px; }
.studio-appearance-source-card > small { color: #92939a; font-size: 10px; line-height: 1.5; }
.studio-appearance-source-card input,
.studio-appearance-source-card textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #3a3b42;
  border-radius: 9px;
  outline: 0;
  background: #0d0e11;
  color: #f5f5f7;
}
.studio-appearance-source-card textarea { min-height: 116px; resize: vertical; }
.studio-appearance-source-card input:focus,
.studio-appearance-source-card textarea:focus { border-color: #ff6a20; box-shadow: 0 0 0 3px rgba(255,106,32,.12); }
.studio-appearance-ai-source { grid-column: 1 / -1; }
.studio-appearance-choice-list { display: grid; min-width: 0; gap: 10px; padding: 14px; border: 1px solid #303139; border-radius: 13px; background: #101115; }
.studio-appearance-choice-list > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.studio-appearance-choice-list > header strong,
.studio-appearance-choice-list > header small { display: block; }
.studio-appearance-choice-list > header strong { color: #f0f0f2; font-size: 12px; }
.studio-appearance-choice-list > header small,
.studio-appearance-choice-list > header > span { color: #92939a; font-size: 10px; line-height: 1.5; }
.studio-appearance-choice-list > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.studio-appearance-choice {
  display: grid;
  grid-template-columns: minmax(76px, .32fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #31323a;
  border-radius: 11px;
  background: #111216;
}
.studio-appearance-choice.selected { border-color: rgba(100, 194, 124, .62); box-shadow: inset 0 0 0 1px rgba(100, 194, 124, .1); }
.studio-appearance-pair { grid-template-columns: minmax(0, 1fr); }
.studio-appearance-pair-previews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.studio-appearance-pair-previews figure { min-width: 0; margin: 0; }
.studio-appearance-pair-previews .studio-appearance-choice-preview { aspect-ratio: 9 / 16; }
.studio-appearance-pair-previews img { object-fit: contain; }
.studio-appearance-pair-previews figcaption { margin-top: 5px; text-align: center; color: #b7b8bf; font-size: 11px; }
.studio-appearance-pair.selected figcaption { color: #8fdca1; }
.studio-appearance-choice-preview { overflow: hidden; width: 100%; aspect-ratio: 2 / 3; padding: 0; border: 0; border-radius: 9px; background: #090a0d; cursor: zoom-in; }
.studio-appearance-choice-preview img,
.studio-appearance-choice-preview video { width: 100%; height: 100%; object-fit: cover; }
.studio-appearance-choice > div:not(.studio-appearance-choice-actions) { min-width: 0; }
.studio-appearance-choice > div > strong,
.studio-appearance-choice > div > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-appearance-choice > div > strong { color: #eeeeef; font-size: 11px; }
.studio-appearance-choice > div > small { margin-top: 4px; color: #8f9097; font-size: 9px; }
.studio-appearance-choice-actions { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 7px; }
.studio-appearance-choice-actions > button { flex: 1 1 auto; }
.studio-appearance-choice-actions > span { display: inline-flex; align-items: center; color: #9be0aa; font-size: 10px; font-weight: 800; }
.studio-video-creator-prompt textarea { min-height: 112px; resize: vertical; }
.studio-creation-actions,
.studio-creation-derived > div:last-child,
.studio-creation-asset-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-creation-actions > button { flex: 1 1 180px; }
.studio-creation-assets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 10px; }
.studio-creation-media-library { display: grid; gap: 16px; margin-top: 14px; padding: 14px; border: 1px solid #303139; border-radius: 14px; background: #101115; }
.studio-creation-title-library { display: grid; gap: 12px; padding: 14px; border: 1px solid #303139; border-radius: 14px; background: #101115; }
.studio-creation-media-library-head,
.studio-creation-asset-group > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.studio-creation-media-library-head > div:first-child,
.studio-creation-asset-group > header { min-width: 0; }
.studio-creation-media-library-head strong,
.studio-creation-media-library-head small { display: block; }
.studio-creation-media-library-head strong,
.studio-creation-asset-group > header strong { color: #eeeef1; font-size: 12px; }
.studio-creation-media-library-head small,
.studio-creation-asset-group > header small { color: #8e9098; font-size: 10px; }
.studio-creation-media-library-head > div:last-child { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.studio-creation-asset-group { display: grid; min-width: 0; gap: 9px; }
.studio-creation-asset-group + .studio-creation-asset-group { padding-top: 14px; border-top: 1px solid #27282f; }
.studio-creation-asset {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  min-width: 0;
  min-height: 134px;
  padding: 42px 10px 10px;
  border: 1px solid #31323a;
  border-radius: 12px;
  background: #111216;
}
.studio-creation-asset.selected { border-color: rgba(100, 194, 124, .62); box-shadow: inset 0 0 0 1px rgba(100, 194, 124, .1); }
.studio-creation-asset > .studio-media-preview-trigger,
.studio-creation-asset > img,
.studio-creation-asset > video,
.studio-creation-asset > .studio-media-result-icon { width: 112px; height: 128px; border-radius: 10px; object-fit: cover; }
.studio-creation-asset > .studio-media-preview-trigger img,
.studio-creation-asset > .studio-media-preview-trigger video { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.studio-creation-asset-copy { display: flex; min-width: 0; justify-content: center; flex-direction: column; }
.studio-creation-asset strong,
.studio-creation-asset small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-creation-asset strong { color: #eeeef1; font-size: 12px; }
.studio-creation-asset small { margin-top: 6px; color: #b1b2b8; font-size: 10px; }
.studio-creation-asset-copy span { margin-top: 10px; color: #777980; font-size: 9px; line-height: 1.55; }
.studio-creation-asset > b { position: absolute; top: 8px; right: 8px; padding: 4px 7px; border-radius: 999px; background: rgba(84, 172, 108, .18); color: #98e8a8; font-size: 9px; }
.studio-creation-asset-actions { grid-column: 1 / -1; align-self: start; align-items: stretch; justify-content: flex-start; flex-direction: row; }
.studio-creation-asset-actions > * { flex: 1 1 148px; min-width: 0; }
.studio-creation-asset-actions button { min-height: 38px; padding: 7px 11px; border: 1px solid rgba(255, 122, 58, .55); border-radius: 8px; background: rgba(44, 27, 20, .88); color: #ffd8c3; font-size: 10px; font-weight: 800; line-height: 1.35; cursor: pointer; }
.studio-creation-asset-actions button.danger { border-color: rgba(240, 91, 91, .55); background: rgba(42, 19, 22, .88); color: #ffc4c4; }
.studio-character-anchor-modal .modal-card { width: min(980px, calc(100vw - 32px)); }
.studio-character-anchor-set { display: grid; gap: 16px; }
.studio-character-anchor-set > header { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 14px; padding: 12px; border: 1px solid #303139; border-radius: 12px; background: #101115; }
.studio-character-anchor-set > header > div { display: grid; min-width: 0; gap: 5px; }
.studio-character-anchor-set > header strong { color: #f1f2f5; font-size: 14px; }
.studio-character-anchor-set > header small { color: #9296a0; line-height: 1.55; }
.studio-character-anchor-source { position: relative; display: grid; overflow: hidden; width: 112px; height: 128px; padding: 0; border: 1px solid #40424a; border-radius: 10px; background: #17181d; cursor: pointer; }
.studio-character-anchor-source img { width: 100%; height: 100%; object-fit: cover; }
.studio-character-anchor-source span { position: absolute; right: 6px; bottom: 6px; left: 6px; padding: 4px 6px; border-radius: 6px; color: #fff; background: rgba(0, 0, 0, .7); font-size: 9px; font-weight: 800; text-align: center; }
.studio-character-anchor-source.pending { place-items: center; color: #8e9098; font-size: 10px; text-align: center; }
.studio-character-anchor-view-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.studio-character-anchor-group { display: grid; gap: 10px; }
.studio-character-anchor-group > h4 { margin: 0; color: #d9dbe1; font-size: 12px; }
.studio-character-anchor-view { display: grid; overflow: hidden; border: 1px solid #303139; border-radius: 12px; background: #101115; }
.studio-character-anchor-view > button,
.studio-character-anchor-view > .pending { display: grid; width: 100%; aspect-ratio: 2 / 3; padding: 0; place-items: center; overflow: hidden; border: 0; border-radius: 0; color: #8e9098; background: #17181d; cursor: pointer; }
.studio-character-anchor-view img { width: 100%; height: 100%; object-fit: cover; }
.studio-character-anchor-view > div:last-child { display: grid; gap: 3px; padding: 10px; }
.studio-character-anchor-view strong { color: #eeeef1; font-size: 12px; }
.studio-character-anchor-view small { color: #858993; font-size: 9px; }
.studio-character-anchor-view > div:last-child button { margin-top: 5px; padding: 7px 9px; border: 1px solid #34363e; border-radius: 8px; color: #c7c9d0; background: #1a1b20; font-size: 10px; }
.studio-anchor-generation-live { display: grid; gap: 12px; padding: 14px; border: 1px solid rgba(255, 106, 32, .45); border-radius: 14px; background: rgba(255, 106, 32, .06); }
.studio-anchor-generation-live > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.studio-anchor-generation-live > header > div { display: grid; gap: 4px; min-width: 0; }
.studio-anchor-generation-live > header strong { color: #f4f4f6; font-size: 13px; }
.studio-anchor-generation-live > header small { overflow: hidden; color: #aaaeb7; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.studio-anchor-generation-live > header button { flex: 0 0 auto; padding: 8px 11px; border: 1px solid rgba(255, 106, 32, .5); border-radius: 9px; color: #ffd1bd; background: rgba(255, 106, 32, .12); font-size: 11px; font-weight: 800; }
.studio-character-anchor-live-preview { display: grid; width: 100%; aspect-ratio: 2 / 3; place-items: center; overflow: hidden; background: #fff; }
.studio-character-anchor-live-preview > img,
.studio-character-anchor-live-preview > .studio-live-preview-trigger > img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.studio-character-anchor-live-preview > .pending { display: grid; gap: 9px; place-items: center; color: #64666d; }
.studio-character-anchor-generating .studio-media-progress { margin: 0; }
.studio-face-anchor-workspace { display: grid; min-width: 0; gap: 14px; padding: 14px; border: 1px solid rgba(82, 184, 120, .46); border-radius: 14px; background: rgba(82, 184, 120, .055); }
.studio-face-anchor-workspace > header,
.studio-character-anchor-front-workspace > header { display: flex; align-items: center; justify-content: space-between; min-width: 0; gap: 12px; }
.studio-face-anchor-workspace > header > div,
.studio-character-anchor-front-workspace > header > div { display: grid; min-width: 0; gap: 4px; }
.studio-face-anchor-workspace > header strong,
.studio-character-anchor-front-workspace > header strong { color: #f0f1f4; font-size: 13px; }
.studio-face-anchor-workspace > header small,
.studio-character-anchor-front-workspace > header small { color: #9699a2; font-size: 10px; line-height: 1.5; }
.studio-face-anchor-workspace > header > button,
.studio-character-anchor-front-workspace > header > button { flex: 0 0 auto; }
.studio-face-anchor-workspace > header { flex-wrap: wrap; justify-content: flex-start; }
.studio-face-anchor-workspace > header > div { width: 100%; flex-shrink: 0; }
.studio-face-anchor-workspace > header > button { max-width: 100%; white-space: normal; }
.studio-face-anchor-prompt-field { display: grid; min-width: 0; gap: 6px; }
.studio-face-anchor-prompt-field > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #e9eaed; font-size: 11px; font-weight: 800; }
.studio-face-anchor-prompt-field > span small { color: #7fd29b; font-size: 9px; font-weight: 800; }
.studio-face-anchor-prompt-field textarea { width: 100%; min-height: 82px; padding: 10px 12px; resize: vertical; border: 1px solid #34363e; border-radius: 10px; color: #f0f1f4; background: #101115; font: inherit; font-size: 11px; line-height: 1.55; }
.studio-face-anchor-prompt-field textarea:focus { outline: 2px solid rgba(82, 184, 120, .28); border-color: rgba(82, 184, 120, .78); }
.studio-face-anchor-prompt-field > small { color: #898d96; font-size: 9px; line-height: 1.5; }
.studio-face-anchor-grid { display: grid; min-width: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.studio-face-anchor-grid > .studio-media-result-empty { grid-column: 1 / -1; }
.studio-face-anchor-candidate { display: grid; min-width: 0; overflow: hidden; border: 1px solid #303139; border-radius: 12px; background: #101115; }
.studio-face-anchor-candidate.selected { border-color: var(--ds-color-accent, #ff762b); box-shadow: 0 0 0 2px rgba(255, 118, 43, .4); }
.studio-face-anchor-candidate > .studio-media-preview-trigger,
.studio-face-anchor-candidate > .pending { display: grid; width: 100%; aspect-ratio: 1 / 1; padding: 0; place-items: center; overflow: hidden; border: 0; border-radius: 0; color: #8e9098; background: #fff; }
.studio-face-anchor-candidate img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.studio-face-anchor-candidate > div { display: grid; min-width: 0; gap: 5px; padding: 10px; }
.studio-face-anchor-candidate strong { color: #eeeef1; font-size: 12px; }
.studio-face-anchor-candidate small { color: #858993; font-size: 9px; }
.studio-face-anchor-candidate > div button { width: 100%; min-height: 38px; margin-top: 3px; padding: 8px 10px; border: 1px solid rgba(82, 184, 120, .55); border-radius: 8px; color: #d7f7e1; background: rgba(23, 48, 31, .88); font-size: 10px; font-weight: 800; }
.studio-face-anchor-candidate.selected > div button[data-action="studio-select-character-face-anchor"] { border-color: var(--ds-color-accent, #ff762b); color: #fff; background: #e85f16; }
.studio-face-anchor-generating .studio-character-anchor-view-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.studio-face-anchor-live-card .studio-character-anchor-live-preview { aspect-ratio: 1 / 1; }
.studio-character-anchor-front-workspace { display: grid; gap: 14px; padding: 14px; border: 1px solid rgba(255, 122, 58, .42); border-radius: 14px; background: rgba(255, 122, 58, .055); }
.studio-character-anchor-front-workspace textarea { min-height: 104px; resize: vertical; }
.studio-character-anchor-front-list { display: grid; gap: 10px; }
.studio-character-anchor-front-list > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.studio-character-anchor-front-list > header > div { display: grid; gap: 4px; }
.studio-character-anchor-front-list > header strong { color: #f0f1f4; font-size: 13px; }
.studio-character-anchor-front-list > header small { color: #9699a2; font-size: 10px; }
.studio-character-anchor-front-list > header > span { color: #ffb38c; font-size: 11px; font-weight: 800; }
.studio-character-anchor-front-list > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.studio-character-anchor-front-candidate { display: grid; overflow: hidden; border: 1px solid #303139; border-radius: 12px; background: #101115; }
.studio-character-anchor-front-candidate.complete { border-color: rgba(84, 172, 108, .65); }
.studio-character-anchor-front-candidate > button,
.studio-character-anchor-front-candidate > .pending { display: grid; width: 100%; aspect-ratio: 2 / 3; padding: 0; place-items: center; overflow: hidden; border: 0; border-radius: 0; color: #8e9098; background: #fff; }
.studio-character-anchor-front-candidate img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.studio-character-anchor-front-candidate > div { display: grid; gap: 5px; padding: 10px; }
.studio-character-anchor-front-candidate strong { color: #eeeef1; font-size: 12px; }
.studio-character-anchor-front-candidate small { color: #858993; font-size: 9px; }
.studio-character-anchor-front-candidate > div button { min-height: 38px; margin-top: 3px; padding: 8px 10px; border: 1px solid rgba(255, 122, 58, .5); border-radius: 8px; color: #ffd8c3; background: rgba(44, 27, 20, .88); font-size: 10px; font-weight: 800; }
@media (max-width: 760px) {
  .studio-face-anchor-workspace,
  .studio-character-anchor-front-workspace { margin-right: -2px; margin-left: -2px; padding: 11px; }
  .studio-face-anchor-workspace > header,
  .studio-character-anchor-front-workspace > header { align-items: stretch; flex-direction: column; }
  .studio-face-anchor-workspace > header > button,
  .studio-character-anchor-front-workspace > header > button { width: 100%; min-height: 44px; }
  .studio-face-anchor-grid,
  .studio-face-anchor-generating .studio-character-anchor-view-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .studio-face-anchor-candidate > div { padding: 9px; }
  .studio-face-anchor-candidate > div button { min-height: 42px; }
  .studio-character-anchor-front-list > div { grid-template-columns: 1fr; }
}
.studio-creation-empty { display: grid; gap: 5px; padding: 18px; border: 1px dashed #3a3b42; border-radius: 12px; color: #909198; text-align: center; }
.studio-creation-empty strong { color: #d4d4d8; font-size: 11px; }
.studio-creation-empty small { font-size: 10px; line-height: 1.5; }
.studio-creation-derived { grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-color: #33343b; background: #121318; }

.studio-completion { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #151517; }
.studio-completion > div { display: flex; align-items: center; justify-content: space-between; color: #aaaab0; font-size: 12px; }
.studio-completion strong { color: #ff9d69; font-size: 18px; }
.studio-completion > i { display: block; height: 6px; margin: 10px 0; overflow: hidden; border-radius: 999px; background: #303035; }
.studio-completion > i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff6a1a, #ffad5c); }
.studio-completion p { margin: 0; color: #74747b; font-size: 10px; line-height: 1.5; }

.studio-upload-preview { display: block; width: 110px; height: 146px; margin: 0 auto 10px; object-fit: cover; border-radius: 10px; }
.studio-timeline-ruler { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto 1fr auto; align-items: center; gap: 8px; color: #73737a; font-size: 9px; }
.studio-timeline-ruler i { height: 1px; background: linear-gradient(90deg, #4a4a50, #27272b); }
.studio-adult-status { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 14px; border: 1px solid #36363b; border-radius: 12px; background: #111113; }
.studio-adult-status > span { padding: 5px 9px; border-radius: 999px; background: #35353a; color: #bdbdc3; font-size: 10px; font-weight: 900; }
.studio-adult-status > span.active { background: rgba(255,106,26,.15); color: #ff9d69; }
.studio-adult-status strong,
.studio-adult-status small { display: block; }
.studio-adult-status small { margin-top: 4px; color: #77777e; line-height: 1.5; }

.studio-easy-result-card,
.studio-creator-detail { width: min(780px, 100%); margin: 28px auto 0; }
.studio-easy-result-card { display: grid; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #171719; }
.studio-result-callout { padding: 18px; border: 1px solid rgba(255,106,26,.26); border-radius: 13px; background: linear-gradient(110deg, rgba(255,106,26,.13), rgba(255,106,26,.025)); text-align: center; }
.studio-result-callout strong { font-size: 16px; }
.studio-result-callout p { margin: 7px 0 0; color: #99999f; font-size: 12px; }
.studio-result-cover { width: min(360px, 100%); aspect-ratio: 3 / 4; margin: 0 auto; object-fit: cover; border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.studio-result-image-actions,
.studio-result-final-actions { display: flex; gap: 9px; }
.studio-result-image-actions > *,
.studio-result-final-actions > * { flex: 1; }
.studio-result-next { width: 100%; }

.studio-intro-preview { overflow: hidden; border: 1px solid #303035; border-radius: 14px; background: #0f0f11; }
.studio-intro-switch { display: flex; gap: 6px; padding: 8px; border-bottom: 1px solid #2b2b30; }
.studio-intro-switch span { padding: 7px 11px; border-radius: 8px; color: #707077; font-size: 11px; font-weight: 800; }
.studio-intro-switch span.active { background: #29292d; color: #fff; }
.studio-intro-row { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #242428; }
.studio-intro-row:last-child { border-bottom: 0; }
.studio-intro-time { color: #ff8d51; font-size: 10px; font-weight: 900; }
.studio-intro-row small { color: #77777e; font-size: 9px; }
.studio-intro-row p { margin: 5px 0 0; color: #d9d9dc; line-height: 1.65; }
.studio-reply-preview { display: grid; gap: 7px; }
.studio-reply-preview > strong { font-size: 12px; }
.studio-reply-preview > span { padding: 12px 14px; border: 1px solid rgba(255,106,26,.25); border-radius: 12px; background: linear-gradient(100deg, rgba(255,106,26,.16), rgba(255,106,26,.05)); color: #e3c2b1; font-size: 11px; }

.studio-creator-detail { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #141416; }
.studio-detail-hero { position: relative; height: 410px; overflow: hidden; }
.studio-detail-hero > img,
.studio-detail-hero > video { width: 100%; height: 100%; object-fit: cover; }
.studio-detail-gradient { position: absolute; inset: 45% 0 0; display: flex; justify-content: end; flex-direction: column; padding: 28px; background: linear-gradient(transparent, rgba(12,12,13,.96)); }
.studio-detail-gradient h1 { margin: 0; font-size: 34px; }
.studio-detail-gradient p { margin: 8px 0 0; color: #d0d0d4; }
.studio-detail-owner { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.studio-detail-owner > span:first-child { flex: 1; color: #99999f; }
.studio-review-badge { display: inline-flex; min-height: 28px; align-items: center; padding: 0 10px; border: 1px solid #8c5e23; border-radius: 999px; background: rgba(255,173,78,.1); color: #ffc078; font-size: 10px; font-weight: 900; }
.studio-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 16px 22px 0; }
.studio-detail-tags span { padding: 5px 8px; border-radius: 999px; background: rgba(255,106,26,.12); color: #ff9d69; font-size: 10px; }
.studio-detail-section { display: grid; gap: 14px; padding: 22px; border-top: 1px solid var(--line); }
.studio-detail-section h2 { margin: 0; font-size: 18px; }
.studio-detail-section p { margin: 0; color: #aaaab0; line-height: 1.7; }
.studio-review-notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid rgba(255,173,78,.23); border-radius: 12px; background: rgba(255,173,78,.055); }
.studio-review-notice p { margin: 2px 0 0; color: #a4a4aa; font-size: 11px; line-height: 1.6; }
.studio-prompt-inserts,
.studio-scenario-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.studio-prompt-inserts button,
.studio-scenario-tabs button { min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #111113; color: #99999f; font-size: 10px; font-weight: 800; cursor: pointer; }
.studio-prompt-inserts button:hover,
.studio-scenario-tabs button.active { border-color: rgba(255,106,26,.42); background: rgba(255,106,26,.1); color: #ffad7d; }
.studio-upload-zone.compact { min-height: 120px; }
.studio-intro-switch.edit-mode { border: 1px solid #303035; border-radius: 10px; background: #101012; }
.studio-asset-policy { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 14px; border: 1px solid rgba(197,143,40,.3); border-radius: 12px; background: linear-gradient(110deg, rgba(197,143,40,.13), rgba(197,143,40,.025)); }
.studio-asset-policy > span { padding: 6px 9px; border-radius: 999px; background: #6f5018; color: #ffe2a2; font-size: 10px; font-weight: 900; }
.studio-asset-policy strong,
.studio-asset-policy small { display: block; }
.studio-asset-policy small { margin-top: 4px; color: #9a927f; font-size: 10px; line-height: 1.5; }
.studio-toggle-row { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #101012; cursor: pointer; }
.studio-toggle-row input { margin-top: 3px; accent-color: #ff6a1a; }
.studio-toggle-row strong,
.studio-toggle-row small { display: block; }
.studio-toggle-row small { margin-top: 5px; color: #77777e; line-height: 1.5; }

.access-steps { display: grid; gap: 10px; }
.access-step { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.access-step-number { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: var(--accent-soft); color: #ff9d69; font-weight: 900; }
.access-step strong,
.access-step small { display: block; }
.access-step small { margin-top: 5px; color: var(--muted); line-height: 1.55; }
.route-code { display: inline-block; margin-top: 7px; padding: 6px 8px; border-radius: 7px; background: #09090a; color: #ffad7c; font: 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }

.upload-source-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.upload-source-tab { flex: 1; min-height: 39px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.upload-source-tab.active { border-color: rgba(255,106,26,.4); color: #ffd0b6; background: var(--accent-soft); }

.draft-list { display: grid; gap: 9px; }
.draft-row-shell { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 8px; }
.draft-row { display: grid; width: 100%; min-width: 0; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: inherit; text-align: left; cursor: pointer; }
.draft-row img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.draft-row strong,
.draft-row small { display: block; }
.draft-row small { overflow: hidden; margin-top: 4px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.draft-row-delete { min-width: 62px; padding: 0 11px; border: 1px solid rgba(224,77,77,.48); border-radius: 11px; background: rgba(224,77,77,.08); color: #f09a9a; font-size: 11px; font-weight: 800; cursor: pointer; }
.draft-row-delete:hover,
.draft-row-delete:focus-visible { border-color: #e95d5d; background: rgba(224,77,77,.18); color: #fff; }
.draft-row-delete:disabled,
.draft-row:disabled { opacity: .45; cursor: not-allowed; }

.conversations-page { background: #0d0d0e; }
.conversations-wrap { width: min(calc(100% - 60px), 1200px); }
.conversation-page-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 32px; }
.conversation-page-header h1 { margin: 0; font-size: 30px; letter-spacing: -0.04em; }
.conversation-page-header p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.conversation-back { display: grid; width: 34px; height: 34px; place-items: center; margin-top: 20px; border: 0; background: transparent; color: #d8d8dc; font-size: 30px; cursor: pointer; }
.conversation-list { display: grid; gap: 18px; }
.conversation-card { position: relative; display: grid; min-height: 178px; grid-template-columns: 76px minmax(0, 1fr) 190px; align-items: start; gap: 18px; padding: 28px 26px; border: 1px solid rgba(255,255,255,.06); border-radius: 19px; background: #1a1a1c; }
.conversation-avatar { width: 76px; height: 76px; object-fit: cover; border-radius: 50%; }
.conversation-summary { min-width: 0; padding-top: 2px; }
.conversation-title { display: flex; align-items: center; gap: 10px; }
.conversation-title h2 { margin: 0; color: #f1f1f2; font-size: 16px; }
.conversation-title span { color: #6f6f75; font-size: 11px; }
.conversation-summary p { display: -webkit-box; overflow: hidden; margin: 10px 0 0; color: #a7a7ad; font-size: 13px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.conversation-more { position: absolute; top: 22px; right: 22px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #77777e; font-size: 22px; cursor: pointer; }
.conversation-more:hover { background: #252528; color: white; }
.conversation-actions { display: grid; gap: 10px; align-self: center; padding-top: 18px; }
.conversation-actions button { min-height: 48px; border: 1px solid rgba(255,255,255,.08); border-radius: 5px; background: #101011; color: #bdbdc1; font-weight: 800; cursor: pointer; }
.conversation-actions button:hover { border-color: rgba(255,106,26,.32); color: white; }
.conversation-start-feature { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid rgba(255, 106, 26, .22); border-radius: 14px; background: linear-gradient(115deg, rgba(255, 106, 26, .13), rgba(20, 20, 23, .94) 56%); }
.conversation-start-feature > img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.conversation-start-feature strong { display: block; color: #fff; font-size: 17px; }
.conversation-start-feature p { margin: 5px 0 0; color: #a7a7ad; font-size: 13px; }
.conversation-persona { display: grid; gap: 12px; }
.conversation-persona-card { display: grid; width: 100%; min-height: 82px; grid-template-columns: 54px minmax(0,1fr) 28px; align-items: center; gap: 12px; padding: 12px; border: 1px solid #ff6a1a; border-radius: 14px; background: linear-gradient(110deg,rgba(112,41,14,.38),rgba(24,24,27,.98)); color: #f6f6f7; text-align: left; }
.conversation-persona-card img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; background: #2c2c30; }
.conversation-persona-card span { display: grid; min-width: 0; gap: 5px; }
.conversation-persona-card strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-persona-card small { color: #aaaab0; font-size: 12px; line-height: 1.45; }
.conversation-persona-card b { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #ff5b18; color: #fff; }
.conversation-persona > p { margin: 0; color: #919197; font-size: 12px; line-height: 1.55; }
.conversation-start-config { margin-top: 18px; }
.conversation-start-config h3 { margin: 0 0 10px; color: #f2f2f4; font-size: 14px; }
.conversation-active-room { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: #111216; }
.conversation-active-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 999px; background: #5dda83; box-shadow: 0 0 0 5px rgba(93,218,131,.1); }
.conversation-active-room small, .conversation-active-room strong, .conversation-active-room p { display: block; margin: 0; }
.conversation-active-room small { color: #71df92; font-size: 11px; font-weight: 800; }
.conversation-active-room strong { margin-top: 3px; color: #fff; }
.conversation-active-room p { margin-top: 4px; color: #888b94; font-size: 12px; }
.conversation-policy-actions { display: grid; gap: 11px; }
.conversation-policy-actions button { display: grid; gap: 5px; width: 100%; padding: 17px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: #111216; color: #fff; text-align: left; cursor: pointer; }
.conversation-policy-actions button:last-child { border-color: rgba(255,106,26,.42); background: linear-gradient(120deg, rgba(255,106,26,.16), #111216 62%); }
.conversation-policy-actions strong { font-size: 15px; }
.conversation-policy-actions small { color: #92949c; line-height: 1.5; }
.conversation-start-combobox { display: grid; grid-template-columns: 38px minmax(0, 1fr) 20px; align-items: center; min-height: 64px; gap: 11px; padding: 9px 13px 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: #dedee1; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.conversation-start-combobox:hover,
.conversation-start-combobox:focus-within { border-color: rgba(255, 106, 26, .65); background: linear-gradient(96deg, rgba(255, 85, 23, .12), rgba(33, 33, 36, .96)); }
.conversation-start-combobox-thumb { width: 38px; height: 38px; overflow: hidden; border-radius: 50%; }
.conversation-start-combobox-thumb img { width: 100%; height: 100%; object-fit: cover; }
.conversation-start-combobox-copy { min-width: 0; }
.conversation-start-combobox-copy small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.conversation-start-combobox select { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; appearance: none; background: transparent; color: #f4f4f5; font: inherit; font-size: 14px; font-weight: 750; text-overflow: ellipsis; cursor: pointer; }
.conversation-start-combobox select option { background: var(--surface-2); color: #f4f4f5; }
.conversation-start-combobox-chevron { color: #cacacf; font-size: 20px; line-height: 1; pointer-events: none; }
.conversation-start-config > p { margin: 11px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

button:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 760px) {
  html:has(body[data-current-route="ranking"]) { scrollbar-width: thin; }
  html:has(body[data-current-route="ranking"])::-webkit-scrollbar { width: 10px; }
  body[data-current-route="ranking"] { padding-bottom: 0; }
  .auth-button { width: 38px; padding: 0; }
  .auth-button span { font-size: 0; }
  .auth-button span::before { content: "♙"; font-size: 18px; }
  .route-page { padding: 84px 0 86px; }
  .route-header { align-items: flex-start; flex-direction: column; margin-bottom: 24px; }
  .route-header h1 { font-size: 36px; }
  .conversations-wrap { width: min(calc(100% - 24px), 1200px); }
  .conversation-page-header { margin-bottom: 22px; }
  .conversation-card { min-height: 0; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; padding: 18px 16px; }
  .conversation-avatar { width: 58px; height: 58px; }
  .conversation-summary { padding-right: 20px; }
  .conversation-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; padding-top: 2px; }
  .conversation-actions button { min-height: 42px; }
  .conversation-more { top: 12px; right: 10px; }
  .search-bar { width: 100%; }
  .character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .character-grid .character-card img { height: 190px; }
  .ranking-item { grid-template-columns: 36px 58px 1fr; gap: 10px; padding: 10px; }
  .ranking-thumb { width: 58px; height: 58px; }
  .ranking-stat { display: none; }
  .profile-layout { grid-template-columns: 1fr; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal-panel,
  .modal-panel.wide { width: 100%; max-height: 88vh; border-radius: 22px 22px 0 0; }
  .option-grid { grid-template-columns: 1fr; }
  .scene-grid { grid-template-columns: repeat(3, 1fr); }
  .studio-page,
  .studio-editor-page { padding: 78px 0 86px; }
  .studio-landing,
  .studio-editor-shell { width: min(100% - 28px, 1200px); }
  .studio-hero,
  .studio-editor-header { align-items: flex-start; flex-direction: column; }
  .studio-hero h1 { font-size: 38px; }
  .studio-utility-actions,
  .editor-actions { width: 100%; justify-content: flex-start; }
  .studio-access-banner { grid-template-columns: auto 1fr; }
  .studio-access-banner > button { grid-column: 1 / -1; width: 100%; }
  .mode-grid,
  .studio-editor-grid,
  .studio-work-grid { grid-template-columns: 1fr; }
  .mode-card { min-height: 500px; padding: 22px; }
  .mode-visual { margin-right: -22px; margin-left: -22px; }
  .studio-work-card { grid-template-columns: minmax(0,1fr) auto; }
  .studio-work-main { grid-template-columns: 64px minmax(0,1fr); }
  .studio-work-card img,
  .studio-work-thumb-fallback { width: 64px; height: 64px; }
  .studio-progress-tabs { top: 61px; margin-right: -14px; margin-left: -14px; border-right: 0; border-left: 0; border-radius: 0; }
  .studio-editor-grid { display: flex; flex-direction: column; }
  .studio-form-card,
  .studio-preview-panel { width: 100%; }
  .studio-preview-panel { position: static; order: -1; }
  .studio-preview-cover { height: 270px; }
  .studio-form-body { padding: 19px; }
  .studio-two-cols,
  .studio-three-cols { grid-template-columns: 1fr; }
  .studio-bottom-actions { padding: 17px 19px; }
  .studio-model-separation { align-items: flex-start; flex-direction: column; }
  .studio-model-separation span { text-align: left; }
  .studio-easy-progress { grid-template-columns: repeat(10, 76px); overflow-x: auto; margin-right: -14px; margin-left: -14px; border-right: 0; border-left: 0; border-radius: 0; scrollbar-width: none; }
  .studio-creation-assets { grid-template-columns: 1fr; }
  .studio-creation-media-library { padding: 11px; }
  .studio-creation-title-library { padding: 11px; }
  .studio-creation-media-library-head { align-items: stretch; flex-direction: column; }
  .studio-creation-media-library-head > div:last-child { width: 100%; }
  .studio-creation-media-library-head > div:last-child > button { flex: 1 1 0; }
  .studio-creation-asset { grid-template-columns: 86px minmax(0, 1fr); min-height: 112px; gap: 10px; }
  .studio-creation-asset > .studio-media-preview-trigger,
  .studio-creation-asset > img,
  .studio-creation-asset > video,
  .studio-creation-asset > .studio-media-result-icon { width: 86px; height: 104px; }
  .studio-creation-asset-actions { grid-column: 1 / -1; flex-direction: row; }
  .studio-creation-asset-actions button { flex: 1 1 0; }
  .studio-media-batch-actions { align-items: stretch; flex-direction: column; }
  .studio-media-batch-actions button { width: 100%; }
  .studio-character-anchor-set > header { grid-template-columns: 82px minmax(0, 1fr); }
  .studio-character-anchor-source { width: 82px; height: 102px; }
  .studio-character-anchor-view-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .studio-creation-derived { grid-template-columns: 1fr; }
  .studio-appearance-options { grid-template-columns: 1fr; }
  .studio-easy-layout { display: flex; flex-direction: column; }
  .studio-easy-layout > *,
  .studio-easy-preview { width: 100%; }
  .studio-easy-preview { position: static; order: -1; }
  .studio-result-image-actions,
  .studio-result-final-actions { flex-direction: column; }
  .studio-easy-result-card { padding: 16px; }
  .studio-detail-hero { height: min(110vw, 420px); }
  .studio-detail-gradient { padding: 20px; }
  .studio-detail-owner { align-items: flex-start; flex-wrap: wrap; }
  .studio-review-notice { flex-direction: column; }
  body[data-current-route="studio-easy"],
  body[data-current-route="studio-custom"] { padding-bottom: 98px; }
}

/* 2026-08-05 공식 채팅 전체 열 실측: 장면·대화·캐릭터/갤러리 패널 */
.chat-mode {
  --chat-sidebar-width: 85px;
  --chat-shell-max: 1200px;
  --chat-aside-width: 350px;
  --chat-model-width: 460px;
  --chat-model-height: 690px;
  --chat-management-width: 350px;
  padding-bottom: 0;
  overflow: hidden;
  background: #19191b;
}

.chat-mode .sidebar {
  display: flex;
  width: var(--chat-sidebar-width);
}

.chat-mode .topbar,
.chat-mode .mobile-nav { display: none; }
.chat-mode #app { margin-left: var(--chat-sidebar-width); }

.chat-rail-tooltip {
  position: fixed;
  z-index: 420;
  max-width: 220px;
  padding: 7px 10px;
  border: 1px solid #303034;
  border-radius: 7px;
  background: #202024;
  color: #f3f3f5;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px) scale(.98);
  transform-origin: left center;
  transition: opacity .14s ease, transform .14s ease;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .42);
}

.chat-rail-tooltip.is-visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

@media (max-width: 760px), (hover: none) {
  .chat-rail-tooltip { display: none; }
}

.chat-page {
  position: relative;
  display: grid;
  width: 100%;
  max-width: none;
  height: 100vh;
  margin: 0;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  background: #19191b;
}

.chat-page-loading {
  place-items: center;
  background: #0b0b0c;
}

.chat-loading-screen,
.chat-scene-loading {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #f2f2f3;
  text-align: center;
}

.chat-loading-screen small { color: #8e9096; font-size: 12px; }
.chat-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255,255,255,.18);
  border-top-color: #ff6327;
  border-radius: 50%;
  animation: chat-loading-spin .7s linear infinite;
}

.chat-scene-loading {
  position: absolute;
  z-index: 470;
  inset: 0;
  background: #0b0b0c;
  opacity: 1;
  pointer-events: auto;
  transition: opacity .16s ease;
}

.chat-page.is-scene-ready .chat-scene-loading {
  opacity: 0;
  pointer-events: none;
}

.chat-stage {
  display: flex;
  min-width: 0;
  justify-content: center;
  overflow: hidden;
}

.chat-conversation-shell {
  display: grid;
  width: min(var(--chat-shell-max), 100%);
  min-width: 0;
  height: 100vh;
  grid-template-columns: 44.083333% 55.916667%;
  overflow: hidden;
  background: #0d0d0e;
}

.chat-page {
  animation: none;
}

.chat-mode .chat-page.is-chat-fullscreen {
  position: fixed;
  z-index: 470;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  margin: 0;
}

.chat-mode .chat-page.is-chat-fullscreen .chat-conversation-shell {
  width: 100%;
  max-width: none;
  height: 100dvh;
}

.chat-visual {
  display: grid;
  min-width: 0;
  grid-template-rows: 60px minmax(0, 1fr);
  overflow: hidden;
  padding: 0 5px 5px;
  border: 0;
  background: #111214;
}

.chat-scene-header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 4px;
}

.chat-titlebar { display: flex; align-items: center; gap: 11px; }
.chat-character-info-trigger { padding: 4px 0; border: 0; background: transparent; color: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.chat-character-info-trigger:hover,
.chat-character-info-trigger:focus-visible { color: #ff8a43; }
.chat-titlebar .back-button { width: 36px; height: 36px; }
.chat-scene-progress { display: flex; align-items: center; gap: 8px; }
.chat-mobile-floating-controls { display: none; }
.chat-scene-progress > span { color: #ff8a28; font-size: 11px; font-weight: 800; }
.chat-scene-progress > i { width: 102px; height: 5px; overflow: hidden; border-radius: 999px; background: #303033; }
.chat-scene-progress > i b { display: block; height: 100%; background: #bfc1cc; }
.chat-scene-progress .round-action { width: 28px; height: 28px; border: 0; background: #292a2d; }

.chat-scene-frame {
  --grade-rgb: 243, 193, 80;
  --frame-glow: .88;
  --frame-dur: 6.5s;
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #0f0f0f;
}

.chat-scene-frame > .chat-scene-image-layer {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0s linear 500ms, transform 500ms cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform, filter;
}

.chat-scene-frame > .chat-scene-image-layer.is-active {
  z-index: 2;
  opacity: 1;
  transform: none;
  transition: opacity 500ms ease, transform 500ms cubic-bezier(.16,1,.3,1);
  animation: chat-scene-cut-flash 500ms ease-out;
}

@keyframes chat-scene-cut-flash {
  0% { filter: brightness(1.2) contrast(1.02); }
  100% { filter: brightness(1); }
}

.chat-tier-aura {
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  opacity: var(--aura-strength, 0);
  pointer-events: none;
  animation: chat-tier-aura-breathe var(--aura-dur, 8s) ease-in-out infinite;
}

@keyframes chat-tier-aura-breathe {
  0%, 100% { box-shadow: inset 0 0 80px -6px rgba(var(--grade-rgb), .55); }
  50% { box-shadow: inset 0 0 150px 8px rgba(var(--grade-rgb), .82); }
}

.chat-ambient-flow {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.chat-ambient-particle {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  background: rgb(var(--grade-rgb));
  box-shadow: 0 0 var(--glow, 10px) rgba(var(--grade-rgb), .9);
  opacity: 0;
  animation-name: chat-ambient-inflow;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

@keyframes chat-ambient-inflow {
  0% { opacity: 0; transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(.55); }
  15%, 72% { opacity: var(--peak, .6); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.1); }
}

.chat-converge-core {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: var(--core-size, 200px);
  height: var(--core-size, 200px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--grade-rgb), calc(var(--core-strength, .6) * .6)) 0, rgba(var(--grade-rgb), calc(var(--core-strength, .6) * .28)) 32%, rgba(var(--grade-rgb), calc(var(--core-strength, .6) * .1)) 55%, transparent 72%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: chat-converge-core-pulse 3.6s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes chat-converge-core-pulse {
  0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(.8); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

.chat-rarity-frame,
.chat-rarity-glow {
  position: absolute;
  inset: 7px;
  overflow: hidden;
  border-radius: 14px;
  mix-blend-mode: screen;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.chat-rarity-frame { z-index: 4; padding: 3px; filter: drop-shadow(0 0 5px rgba(var(--grade-rgb), calc(var(--frame-glow, .5) * .6))); }
.chat-rarity-glow { z-index: 3; padding: 9px; opacity: .9; filter: blur(6px); }
.chat-rarity-frame::before,
.chat-rarity-glow::before { position: absolute; inset: -60%; content: ""; animation: chat-rarity-rotate var(--frame-dur, 7s) linear infinite; }
.chat-rarity-frame::before { background: conic-gradient(from 0deg, rgba(var(--grade-rgb), calc(var(--frame-glow, .5) * .42)) 0deg 46%, rgba(var(--grade-rgb), calc(var(--frame-glow, .5) * 1)) 62%, rgba(255,255,255,calc(var(--frame-glow, .5) * 1)), rgba(var(--grade-rgb), calc(var(--frame-glow, .5) * 1)) 82%, rgba(var(--grade-rgb), calc(var(--frame-glow, .5) * .42)) 96% 100%); }
.chat-rarity-glow::before { background: conic-gradient(from 0deg, transparent 0deg, transparent 58%, rgba(var(--grade-rgb), calc(var(--frame-glow, .5) * .9)) 67%, rgba(255,255,255,calc(var(--frame-glow, .5) * .95)) 73%, rgba(var(--grade-rgb), calc(var(--frame-glow, .5) * .9)) 79%, transparent 88%, transparent 100%); }

@keyframes chat-rarity-rotate { to { transform: rotate(1turn); } }

.chat-rarity-corners { position: absolute; z-index: 5; inset: 7px; pointer-events: none; }
.chat-rarity-corners i { position: absolute; width: 28px; height: 28px; border: 3px solid rgba(var(--grade-rgb), calc(var(--frame-glow, .5) * .95)); filter: drop-shadow(0 0 7px rgba(var(--grade-rgb), calc(var(--frame-glow, .5) * .8))); animation: chat-rarity-corner-breathe var(--frame-dur, 7s) ease-in-out infinite; }
.chat-rarity-corners .tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.chat-rarity-corners .tr { top: 0; right: 0; border-bottom: 0; border-left: 0; border-top-right-radius: 12px; }
.chat-rarity-corners .bl { bottom: 0; left: 0; border-top: 0; border-right: 0; border-bottom-left-radius: 12px; }
.chat-rarity-corners .br { right: 0; bottom: 0; border-top: 0; border-left: 0; border-bottom-right-radius: 12px; }

@keyframes chat-rarity-corner-breathe { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }

.chat-grade-badge {
  position: absolute;
  z-index: 6;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  border: 1px solid rgba(var(--grade-rgb), .5);
  border-radius: 999px;
  background: rgba(20,20,20,.7);
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
  backdrop-filter: blur(8px);
}
.chat-grade-badge img { width: 16px; height: 16px; flex-shrink: 0; }
.chat-grade-badge b { color: rgb(var(--grade-rgb)); font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: .02em; }
.chat-scene-frame[data-scene-grade="bronze"] { --grade-rgb: 209, 131, 81; }
.chat-scene-frame[data-scene-grade="silver"] { --grade-rgb: 192, 192, 192; }
.chat-scene-frame[data-scene-grade="gold"] { --grade-rgb: 243, 193, 80; }
.chat-scene-frame[data-scene-grade="platinum"] { --grade-rgb: 133, 162, 226; }

.chat-scene-controls { position: absolute; z-index: 7; top: 10px; right: 10px; display: flex; width: 104px; height: 34px; align-items: center; justify-content: center; gap: 3px; padding: 3px 6px; border-radius: 999px; background: rgba(20,20,22,.68); }
.chat-scene-controls button { display: grid; width: 24px; height: 24px; flex: 0 0 auto; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #aaa; }
.chat-scene-controls button:hover { color: #fff; }
.chat-scene-controls button:nth-child(2) { width: 28px; height: 28px; }
.chat-scene-controls button.active { background: rgba(255,102,31,.18); color: #ff6b28; }
.chat-scene-controls svg { width: 16px; height: 16px; }
.chat-visual.background-off .chat-scene-frame > .chat-scene-image-layer { opacity: 0; }
.chat-scene-frame.is-scene-locked > .chat-scene-image-layer { filter: blur(18px) brightness(.48); transform: scale(1.08); }
.chat-scene-unlock { position: absolute; z-index: 6; top: 50%; left: 50%; display: flex; align-items: center; flex-direction: column; gap: 12px; padding: 0; border: 0; background: transparent; transform: translate(-50%,-50%); }
.chat-scene-unlock[hidden],
.chat-grade-badge[hidden] { display: none; }
.chat-scene-frame:not(.is-scene-locked) .chat-tier-aura,
.chat-scene-frame:not(.is-scene-locked) .chat-converge-core,
.chat-scene-frame:not(.is-scene-locked) .chat-ambient-flow,
.chat-scene-frame:not(.is-scene-locked) .chat-rarity-glow,
.chat-scene-frame:not(.is-scene-locked) .chat-rarity-frame,
.chat-scene-frame:not(.is-scene-locked) .chat-rarity-corners { opacity: 0; pointer-events: none; }
.chat-lock-icon-circle { position: relative; display: flex; width: 62px; height: 62px; align-items: center; justify-content: center; border: 1.5px solid rgba(var(--grade-rgb), .4); border-radius: 50%; background: rgba(var(--grade-rgb), .12); box-shadow: 0 6px 24px rgba(0,0,0,.45), 0 0 12px rgba(var(--grade-rgb), .18); transition: transform .4s cubic-bezier(.34,1.56,.64,1), border-color .35s, box-shadow .4s, background .35s; }
.chat-lock-glyph { position: relative; z-index: 2; display: flex; color: #fff; font-size: 22px; line-height: 1; }
.chat-lock-pulse-ring { position: absolute; z-index: 0; inset: -4px; border: 1.5px solid rgba(var(--grade-rgb), .4); border-radius: 50%; opacity: 0; pointer-events: none; animation: chat-lock-pulse 2.8s ease-out infinite; }
.chat-lock-pulse-ring.delayed { animation-delay: 1.4s; }
.chat-scene-unlock:hover .chat-lock-icon-circle { border-color: rgba(var(--grade-rgb), .6); background: rgba(var(--grade-rgb), .18); box-shadow: 0 8px 28px rgba(0,0,0,.5), 0 0 0 4px rgba(var(--grade-rgb), .1), 0 0 18px rgba(var(--grade-rgb), .28); }
.chat-scene-unlock b { display: inline-flex; padding: 7px 14px 7px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: rgba(29,29,29,.85); color: #fff; font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; backdrop-filter: blur(8px); }
.chat-scene-empty { position: absolute; z-index: 6; top: 50%; left: 50%; display: flex; align-items: center; flex-direction: column; gap: 6px; width: min(78%, 320px); padding: 18px 20px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(14,14,17,.72); color: #fff; text-align: center; transform: translate(-50%,-50%); backdrop-filter: blur(12px); }
.chat-scene-empty strong { font-size: 14px; }
.chat-scene-empty span { color: #a8a8af; font-size: 12px; line-height: 1.45; }
.chat-grade-badge.is-empty { display: none; }
.chat-scene-controls.is-disabled { opacity: .35; }

@keyframes chat-lock-pulse {
  0% { opacity: 0; transform: scale(.92); }
  25% { opacity: .45; }
  100% { opacity: 0; transform: scale(1.6); }
}

@media (prefers-reduced-motion: reduce) {
  .chat-scene-frame > .chat-scene-image-layer { transform: none; transition: opacity 0s linear 500ms; }
  .chat-scene-frame > .chat-scene-image-layer.is-active { animation: none; transition: opacity 500ms ease; }
  .chat-tier-aura,
  .chat-ambient-particle,
  .chat-converge-core,
  .chat-rarity-frame::before,
  .chat-rarity-glow::before,
  .chat-rarity-corners i,
  .chat-lock-pulse-ring { animation: none; }
  .chat-ambient-particle { opacity: .45; transform: translate(-50%, -50%) scale(.45); }
}

/* OPENING-006: scene media remains in the left visual panel; story and dialogue stay in the right transcript. */
.chat-opening-visual-media {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: var(--ds-color-bg);
  opacity: 0;
  transform: scale(1);
  transition: opacity .28s ease, transform .7s cubic-bezier(.22,.61,.36,1);
}
.chat-opening-sound-start { position: absolute; z-index: 12; bottom: 24px; left: 50%; min-height: 40px; padding: 0 17px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(12,12,14,.86); color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 8px 28px rgba(0,0,0,.45); transform: translateX(-50%); backdrop-filter: blur(10px); }
.chat-opening-sound-start[hidden] { display: none; }
.chat-scene-frame.opening-media-active .chat-opening-visual-media { opacity: 1; transform: none; }
.chat-opening-preroll-cover { z-index: 7; transition: opacity .24s ease; }
.chat-scene-frame.opening-media-active .chat-opening-preroll-cover.is-finished { opacity: 0; pointer-events: none; }
.chat-scene-frame.opening-media-active .chat-tier-aura,
.chat-scene-frame.opening-media-active .chat-converge-core,
.chat-scene-frame.opening-media-active .chat-ambient-flow,
.chat-scene-frame.opening-media-active .chat-rarity-glow,
.chat-scene-frame.opening-media-active .chat-rarity-frame,
.chat-scene-frame.opening-media-active .chat-rarity-corners,
.chat-scene-frame.opening-media-active .chat-grade-badge,
.chat-scene-frame.opening-media-active .chat-scene-unlock,
.chat-scene-frame.opening-media-active .chat-scene-empty { opacity: 0; pointer-events: none; }

.chat-opening-sequence { display: grid; width: min(100%, 560px); gap: 22px; margin: 0 0 34px; }
.chat-opening-narration { width: calc(100% - 60px); margin: 0 0 0 60px; padding: 0; border-left: 0; background: none; }
.chat-opening-narration p { margin: 0; color: #d4d4d6; font-size: var(--chat-copy-size); font-weight: 650; line-height: 1.75; }
.chat-opening-narration.event { padding-left: 15px; border-left: 2px solid #f35c26; background: linear-gradient(90deg, rgba(255, 88, 26, .12), rgba(255, 88, 26, 0) 72%); }
.chat-opening-narration.event p { color: #a9a9af; }
.chat-opening-dialogue { display: grid; grid-template-columns: 39px minmax(0, 1fr); align-items: start; gap: 11px; }
.chat-opening-dialogue > img { width: 39px; height: 39px; border-radius: 50%; object-fit: cover; }
.chat-opening-dialogue > div { min-width: 0; }
.chat-opening-dialogue strong { display: block; margin: 1px 0 8px; color: #fafafa; font-size: 13px; }
.chat-opening-dialogue p { width: fit-content; max-width: min(100%, 470px); margin: 0; padding: 13px 16px; border-radius: 4px 18px 18px 18px; background: linear-gradient(110deg, #2b2c30 0%, #25262a 52%, #1f2024 100%); color: #f2f2f3; font-size: var(--chat-copy-size); font-weight: 600; line-height: 1.62; overflow-wrap: break-word; }
.chat-opening-sequence[data-opening-timeline="video"] [data-opening-cue],
.chat-opening-sequence[data-opening-timeline="timed-static"] [data-opening-cue] { display: none; }
.chat-opening-sequence[data-opening-timeline="video"] .chat-opening-narration.is-visible,
.chat-opening-sequence[data-opening-timeline="timed-static"] .chat-opening-narration.is-visible { display: block; }
.chat-opening-sequence[data-opening-timeline="video"] .chat-opening-dialogue.is-visible,
.chat-opening-sequence[data-opening-timeline="timed-static"] .chat-opening-dialogue.is-visible { display: grid; }
.chat-opening-sequence[data-opening-timeline="video"] [data-opening-cue].is-visible,
.chat-opening-sequence[data-opening-timeline="timed-static"] [data-opening-cue].is-visible { animation: chat-opening-cue-in .22s ease-out both; }
.chat-opening-sequence[data-opening-timeline="video"] [data-opening-cue].is-active,
.chat-opening-sequence[data-opening-timeline="timed-static"] [data-opening-cue].is-active { filter: brightness(1.12); }
.chat-opening-sequence[data-opening-timeline="video"] .chat-opening-narration.is-active,
.chat-opening-sequence[data-opening-timeline="timed-static"] .chat-opening-narration.is-active { border-left-color: #ff7a35; box-shadow: -9px 0 18px -16px rgba(255, 93, 27, .96); }
.chat-opening-sequence[data-opening-timeline="video"] .chat-opening-dialogue.is-active p,
.chat-opening-sequence[data-opening-timeline="timed-static"] .chat-opening-dialogue.is-active p { background: linear-gradient(110deg, #34363b 0%, #292b30 54%, #232428 100%); box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.chat-opening-skip { position: absolute; z-index: 42; right: 20px; bottom: 132px; min-width: 82px; height: 34px; padding: 0 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(9,9,10,.72); color: #f2f2f3; font-size: 12px; font-weight: 800; backdrop-filter: blur(10px); }
@keyframes chat-opening-cue-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .chat-opening-sequence { width: 100%; gap: 18px; margin-bottom: 25px; }
  .chat-opening-narration { width: 100%; margin-left: 0; padding-left: 0; }
  .chat-opening-narration.event { padding-left: 12px; }
  .chat-opening-dialogue { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; }
  .chat-opening-dialogue > img { width: 34px; height: 34px; }
}

.chat-panel {
  --chat-copy-size: 14px;
  position: relative;
  display: grid;
  min-width: 0;
  height: 100vh;
  grid-template-rows: 60px minmax(0, 1fr) auto auto;
  overflow: hidden;
  padding: 0;
  border-left: 0;
  background: #0d0d0e;
}
.chat-panel[data-chat-font-size="xs"] { --chat-copy-size: 12px; }
.chat-panel[data-chat-font-size="sm"] { --chat-copy-size: 13px; }
.chat-panel[data-chat-font-size="md"] { --chat-copy-size: 14px; }
.chat-panel[data-chat-font-size="lg"] { --chat-copy-size: 16px; }
.chat-panel[data-chat-font-size="xl"] { --chat-copy-size: 18px; }
.chat-panel[data-message-style="fade"] .assistant-sequence { animation: none; }

.chat-header { display: flex; min-height: 60px; align-items: center; justify-content: space-between; padding: 0 20px 0 1px; border: 0; }
.chat-header > div { display: flex; align-items: center; }
.chat-display-switch { overflow: hidden; border: 1px solid #2b2b2e; border-radius: 999px; background: #18181a; }
.chat-display-switch button { width: 76px; height: 32px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: #7f7f84; font-size: 12px; font-weight: 750; cursor: pointer; }
.chat-display-switch button.active { background: linear-gradient(100deg,#ff4f18,#ff6928); color: #fff; box-shadow: 0 0 14px rgba(255,79,24,.24); }
.chat-header-actions { gap: 10px; }
.chat-header-actions button { height: 31px; padding: 0 10px; border: 1px solid #2f3033; border-radius: 999px; background: #18181a; color: #eee; font-size: 11px; }
.chat-header-actions button:last-child { width: 31px; padding: 0; border: 0; background: transparent; font-size: 18px; }

.chat-scroll { min-height: 0; overflow-y: auto; padding: 24px 40px 20px 30px; scrollbar-color: #35353a transparent; }
.chat-scroll .story-note { display: none; }
.chat-scroll .message-row { margin-bottom: 20px; }
.chat-scroll .narration { margin: 30px 0; font-style: normal; }
.chat-scroll .message-block { min-width: 0; max-width: 84%; overflow-wrap: break-word; word-break: normal; }
.chat-scroll .message { max-width: 470px; padding: 13px 16px; border-radius: 17px; background: #242426; font-size: 13px; overflow-wrap: break-word; word-break: normal; }
.chat-scroll .user .message-block { display: flex; flex: 0 1 470px; justify-content: flex-end; }
.chat-scroll .user .message {
  position: relative;
  width: fit-content;
  max-width: 100%;
  padding: 16px 20px;
  border-radius: 20px 3px 20px 20px;
  background: linear-gradient(279.32deg, rgba(162,38,0,.32) 3.3%, rgba(255,98,0,.32) 96.7%), #161616;
  box-shadow: 0 0 10px 5px rgba(0,0,0,.03);
  color: #eee;
  font-family: Pretendard, "Noto Sans KR", sans-serif;
  font-size: calc(var(--chat-copy-size) + 2px);
  font-weight: 600;
  line-height: 26px;
}

.assistant-sequence { display: block; width: min(100%,542px); overflow-wrap: break-word; word-break: normal; }
.assistant-sequence .assistant-scene-flow { display: grid; width: 100%; gap: 0; }
.assistant-sequence .narration-flow { display: flex; width: 100%; align-items: flex-start; gap: 4px; }
.assistant-sequence .narration-text { position: relative; width: calc(100% - 75px); margin: 16px 0 16px 75px; padding: 2px 0 2px 16px; color: #aaa; font-size: 14px; font-weight: 900; line-height: 24px; white-space: pre-wrap; }
.assistant-sequence .narration-text::before { position: absolute; top: 3px; bottom: 3px; left: 0; width: 2px; background: linear-gradient(rgba(255,99,44,.9),rgba(255,99,44,.06)); box-shadow: 0 0 8px rgba(255,77,23,.3); content: ""; }
.chat-scroll .user .message.user-situation { display: grid; gap: 8px; border: 1px solid rgba(255,103,49,.35); background: linear-gradient(135deg,rgba(115,48,22,.94),rgba(62,28,17,.94)); text-align: left; }
.chat-user-situation-label { color: #ffb092; font-size: 11px; font-weight: 900; line-height: 1; letter-spacing: .08em; }
.chat-user-situation-text { color: #f2e8e3; white-space: pre-wrap; }
.assistant-sequence .message-wrapper { display: flex; width: 100%; align-items: flex-start; gap: 25px; }
.assistant-sequence .message-img-box { width: 50px; height: 50px; flex: 0 0 50px; overflow: hidden; border-radius: 50%; }
.assistant-sequence .message-img { width: 50px; height: 50px; object-fit: cover; }
.assistant-sequence .message-area { display: flex; width: calc(100% - 75px); min-width: 0; align-items: flex-start; flex-direction: column; gap: 8px; padding-top: 10px; }
.assistant-sequence .message-name { margin: 0; color: #eee; font-size: 14px; font-weight: 600; line-height: 20px; }
.assistant-sequence .segment-message { display: block; width: 100%; }
.assistant-sequence .character-reaction-flow { display: grid; align-items: start; gap: 0; }
.assistant-sequence .dialogue-box { width: 100%; margin: 10px 0 0; padding: 15px; border-radius: 3px 20px 20px; background: rgba(50,50,50,.6); box-shadow: 0 0 10px 5px rgba(0,0,0,.03); color: #eee; font-size: 14px; font-weight: 600; line-height: 21px; word-break: break-word; -webkit-backdrop-filter: blur(2.5px); backdrop-filter: blur(2.5px); }
.assistant-sequence .dialogue-speaker-label { display: block; margin: 0 0 5px; color: var(--accent, #ff6b35); font-size: 11px; font-weight: 800; line-height: 1.2; letter-spacing: .02em; }
.assistant-sequence .segment-dialogue,
.assistant-sequence .segment-narration { margin: 0; }
.assistant-sequence .segment-dialogue { color: #eee; font-size: 14px; font-weight: 600; line-height: 28px; white-space: pre-wrap; word-break: break-word; }
.assistant-sequence .segment-narration { margin: 16px 0; color: #aaa; font-size: 14px; font-weight: 900; line-height: 24px; white-space: pre-wrap; word-break: break-word; }
.assistant-sequence .character-reaction-narration { color: #b8b8ba; font-weight: 650; line-height: 1.78; letter-spacing: -.012em; }
.chat-pending-response { animation: none !important; }
.chat-stream-response {
  --chat-stream-step-offset: clamp(10px,2vw,18px);
  --chat-stream-step-duration: var(--motion-normal);
}
.chat-stream-response .chat-stream-stack { gap: clamp(4px,.8vw,8px); }
.chat-stream-response .character-reaction-flow { gap: clamp(8px,1.2vw,14px); }
.chat-stream-response .character-reaction-flow > .chat-stream-step { margin-top: 0; margin-bottom: 0; }
.chat-stream-step {
  animation: chat-stream-step-in var(--chat-stream-step-duration) var(--motion-ease) both;
  transform-origin: 50% 100%;
  will-change: opacity,transform;
}
@keyframes chat-stream-step-in {
  from { opacity: 0; transform: translate3d(0,var(--chat-stream-step-offset),0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}
.assistant-sequence .chat-scene-thread { display: grid; gap: 8px; margin: 4px 0 14px; padding: 0; }
.assistant-sequence .chat-scene-thread.parallel { margin-top: 18px; padding: 14px 14px 12px; border: 1px solid rgba(255,137,74,.24); border-radius: 14px; background: linear-gradient(135deg,rgba(69,32,18,.34),rgba(24,24,27,.5)); }
.assistant-sequence .chat-scene-thread-label { margin: 0 0 2px; color: #ff9a66; font-size: 11px; font-weight: 900; line-height: 1.4; letter-spacing: .06em; }
.assistant-sequence .supporting-actor-avatar { display: grid; place-items: center; border: 1px solid rgba(255,137,74,.32); background: #252228; }
.assistant-sequence .participant-dialogue-thread { margin-left: clamp(18px,8vw,72px); }
.assistant-sequence .participant-actor-avatar { display: grid; place-items: center; border: 1px solid rgba(110,164,255,.38); background: #1f2938; }
.assistant-sequence .participant-dialogue-thread .dialogue-box { border-color: rgba(110,164,255,.28); background: rgba(37,57,82,.34); }
.assistant-sequence .message-actor-initial { color: #ffb08a; font-size: 18px; font-weight: 900; }
.chat-panel[data-display-mode="novel"] .assistant-sequence .message-wrapper { display: block; }
.chat-panel[data-display-mode="novel"] .assistant-sequence .message-img-box,
.chat-panel[data-display-mode="novel"] .assistant-sequence .message-name { display: none; }
.chat-panel[data-display-mode="novel"] .assistant-sequence .message-area { width: 100%; padding-top: 0; }
.chat-panel[data-display-mode="novel"] .assistant-sequence .dialogue-box { margin: 6px 0; border-radius: 10px; background: rgba(34,34,36,.58); }
.chat-panel[data-display-mode="novel"] .assistant-sequence .segment-narration { margin: 12px 0; }
.chat-dialogue-branches { display: grid; gap: 8px; margin: 18px 0 0 75px; }
.chat-dialogue-branches button { display: flex; width: 100%; min-height: 44px; align-items: center; gap: 10px; padding: 9px 13px; border: 1px solid #55230f; border-radius: 12px; background: #30150d; color: #eee; text-align: left; line-height: 1.45; }
.chat-dialogue-branches button:hover,
.chat-dialogue-branches button:focus-visible { border-color: #ff6a1a; background: #4a1e0d; }
.chat-dialogue-branches button span { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #ff5b14; font-size: 11px; font-weight: 800; }

.chat-current-scene-context { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 30px; padding: 8px 11px; border: 1px solid rgba(255,123,59,.22); border-radius: 12px; background: rgba(31,22,19,.72); color: #d7d7dc; }
.chat-current-scene-context > b { margin-right: 2px; color: #ff9a65; font-size: 11px; }
.chat-current-scene-context > div { display: inline-flex; min-width: 0; align-items: center; gap: 4px; }
.chat-current-scene-context small { color: #888a91; font-size: 10px; }
.chat-current-scene-context span { padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.07); color: #ececf0; font-size: 10px; white-space: nowrap; }
.chat-current-scene-context em { margin-left: auto; color: #9c9da4; font-size: 10px; font-style: normal; white-space: nowrap; }

.chat-session-ended { display: flex; width: 100%; min-width: 0; order: -3; align-items: center; gap: 8px 12px; padding: 10px 13px; border: 1px solid color-mix(in srgb,var(--accent) 34%,transparent); border-radius: var(--radius-md); background: color-mix(in srgb,var(--accent) 9%,var(--surface)); color: var(--text); }
.chat-session-ended strong { flex: 0 0 auto; color: #ff9a65; font-size: 12px; }
.chat-session-ended span { min-width: 0; color: var(--muted); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }

.composer {
  position: relative;
  display: flex;
  width: auto;
  min-height: 0;
  margin: 8px 30px 25px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 13px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#chat-composer-overlays { position: absolute; inset: 0; pointer-events: none; }
#chat-composer-overlays > * { pointer-events: auto; }
.composer-input-box { display: flex; width: 100%; min-width: 0; min-height: 60px; box-sizing: border-box; align-items: center; gap: 10px; padding: 11px 22px 11px 31px; border: 1px solid #3a3a3a; border-radius: 100px; background: #0b0b0c; }
.composer-textarea-area { display: flex; min-width: 0; min-height: 36px; flex: 1 1 auto; align-items: center; }
.composer textarea { width: 100%; min-height: 26px; max-height: 122px; overflow-y: hidden; resize: none; padding: 1px; border: 0; outline: 0; background: transparent; color: #eee; font: 600 16px/24px Pretendard, sans-serif; }
.composer textarea::placeholder { color: #999; }
.chat-user-media-strip { display: flex; min-width: 0; flex-wrap: wrap; gap: 6px; padding-bottom: 2px; }
.chat-user-media-chip { display: inline-flex; max-width: min(100%, 240px); align-items: center; gap: 7px; padding: 6px 7px 6px 8px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; background: rgba(27,30,35,.94); color: #e9eaec; }
.chat-user-media-chip.ready { border-color: rgba(255,121,49,.55); background: linear-gradient(110deg,rgba(99,39,18,.9),rgba(31,26,27,.96)); }
.chat-user-media-chip.rejected { border-color: rgba(245,91,91,.5); opacity: .8; }
.chat-user-media-chip-icon { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border-radius: 7px; background: rgba(255,115,35,.18); color: #ff8a4c; font-size: 15px; }
.chat-user-media-chip > span:nth-child(2) { display: grid; min-width: 0; gap: 1px; }
.chat-user-media-chip strong { overflow: hidden; color: inherit; font-size: 11px; line-height: 15px; text-overflow: ellipsis; white-space: nowrap; }
.chat-user-media-chip small { overflow: hidden; color: #a5a7ad; font-size: 10px; line-height: 13px; text-overflow: ellipsis; white-space: nowrap; }
.chat-user-media-chip button { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #aaa; font-size: 17px; cursor: pointer; }
.chat-user-media-chip button:hover { background: rgba(255,255,255,.12); color: #fff; }
.chat-user-media-uploading { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border: 1px solid rgba(255,142,74,.4); border-radius: 10px; color: #ffb170; font-size: 12px; }
.composer-actions { display: flex; min-width: 0; order: -1; align-items: center; justify-content: flex-start; }
.composer-modes { display: flex; min-width: 0; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.composer-modes::-webkit-scrollbar { display: none; }
.composer-mode { position: relative; display: inline-flex; height: 30px; min-height: 30px; max-height: 30px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 5px; padding: 0 10px 0 7px; border: 1px solid #222; border-radius: 17px; background: #171717; color: #999; font-size: 14px; line-height: 21px; cursor: pointer; }
.composer-mode:disabled,
.send-button:disabled { cursor: not-allowed; filter: grayscale(.35); opacity: .42; }
.composer-mode > span { white-space: nowrap; }
.composer-mode:hover,
.composer-mode.active { border-color: #d2613e; background: #240800; }
.composer-mode:hover > span:not(.composer-model-fallback),
.composer-mode.active > span:not(.composer-model-fallback) { background: linear-gradient(12.04deg,#ff4d17 4.99%,#ffb84d 92.71%); background-clip: text; color: transparent; }
.composer-quick { width: 44px; padding: 0 12px; color: #ccc; }
.composer-quick svg { width: 18px; height: 18px; }
.composer-mode[data-tool="narration"],
.composer-mode[data-tool="suggest"] { width: 88.40625px; }
.composer-model { --chat-tier-accent: #ff6a21; --chat-tier-surface: #240800; display: inline-flex; width: 120px; min-width: 120px; align-items: center; gap: 5px; padding-right: 8px; }
.composer-model-icon { display: block; width: 16px; height: 16px; flex: 0 0 16px; object-fit: contain; }
.composer-model-fallback { display: inline-grid; place-items: center; border-radius: 5px; background: #ff5574; color: #fff; font-size: 9px; }
.composer-model-tier-icon { display: inline-grid; place-items: center; border-radius: 5px; background: var(--chat-tier-accent); color: #0c0c0d; font-size: 9px; font-weight: 900; }
.composer-model-label { min-width: 0; overflow: hidden; color: var(--chat-tier-accent); font-size: 11px; font-weight: 850; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.composer-model > i { display: flex; width: 14px; color: #666; font-size: 14px; line-height: 1; }
.composer-model[data-model-tier="bronze"] { --chat-tier-accent: #cd7f32; --chat-tier-surface: #28180d; }
.composer-model[data-model-tier="silver"] { --chat-tier-accent: #c0c7d1; --chat-tier-surface: #1d222a; }
.composer-model[data-model-tier="gold"] { --chat-tier-accent: #f4c542; --chat-tier-surface: #292008; }
.composer-model[data-model-tier="platinum"] { --chat-tier-accent: #94a8c7; --chat-tier-surface: #192131; }
.composer-model[data-model-tier="diamond"] { --chat-tier-accent: #62dcff; --chat-tier-surface: #10252d; }
.composer-model[data-model-tier]:hover,
.composer-model[data-model-tier].active { border-color: var(--chat-tier-accent); background: var(--chat-tier-surface); }
.composer-model[data-model-tier]:hover > .composer-model-label,
.composer-model[data-model-tier].active > .composer-model-label { background: none; color: var(--chat-tier-accent); }
.composer-model[data-model-tier]:hover > .composer-model-tier-icon,
.composer-model[data-model-tier].active > .composer-model-tier-icon { background: var(--chat-tier-accent); background-clip: border-box; color: #0c0c0d; }
.composer-tool-icon { width: 16px; height: 16px; flex: 0 0 16px; object-fit: contain; }
.composer-mode .action-icon-active { display: none; }
.composer-mode:hover .action-icon-default,
.composer-mode.active .action-icon-default { display: none; }
.composer-mode:hover .action-icon-active,
.composer-mode.active .action-icon-active { display: block; }
.send-button { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; padding: 10px; border: 0; border-radius: 50%; background: linear-gradient(180deg,#ff4d17,#f70); color: #fff; cursor: pointer; }
.send-button img { display: block; width: 16px; height: 16px; }
.composer-send { display: grid; }
.chat-send-cancel { position: static; display: inline-flex; width: auto; min-width: 68px; height: var(--control-height-sm); min-height: var(--control-height-sm); flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid color-mix(in srgb,var(--accent) 46%,#3a3a3d); border-radius: var(--radius-lg); background: color-mix(in srgb,var(--accent) 12%,#232326); color: #f2f2f3; font-size: 12px; font-weight: 800; line-height: 1; white-space: nowrap; cursor: pointer; }
.chat-send-cancel > span { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 2px; background: currentColor; }
.chat-send-cancel:hover:not(:disabled),
.chat-send-cancel:focus-visible { border-color: var(--accent); background: color-mix(in srgb,var(--accent) 20%,#232326); outline: none; }
.chat-send-cancel[hidden] { display: none !important; }
.chat-send-cancel:disabled { cursor: wait; opacity: .55; }

.chat-tool-popover {
  position: absolute;
  z-index: 24;
  bottom: calc(100% + 8px);
  left: 0;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 126, 64, .26);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(43, 23, 18, .99), rgba(20, 20, 23, .995) 44%);
  box-shadow: 0 24px 70px rgba(0,0,0,.62), inset 0 1px rgba(255,255,255,.05);
}
.chat-tool-popover-head { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
.chat-tool-popover-head.compact { padding-bottom: 13px; }
.chat-tool-popover-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: rgba(255, 91, 27, .14); color: #ff6b28; font-size: 18px; }
.chat-tool-popover-head > div { min-width: 0; }
.chat-tool-popover-head strong { display: block; color: #fff; font-size: 17px; line-height: 24px; }
.chat-tool-popover-head p { margin: 4px 0 0; color: #a9a9ae; font-size: 12px; line-height: 1.55; word-break: keep-all; }
.chat-tool-popover-head p b { color: #ff7a38; }
.chat-tool-popover-close { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; margin: -3px -3px 0 auto; padding: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; background: rgba(10,10,12,.58); color: #c9c9ce; font-size: 20px; line-height: 1; cursor: pointer; }
.chat-tool-popover-close:hover,
.chat-tool-popover-close:focus-visible { border-color: rgba(255,122,50,.65); color: #fff; }
.chat-opening-choice-layer {
  left: 50%;
  width: min(520px, calc(100vw - 30px));
  max-height: min(520px, calc(100dvh - 160px));
  grid-template-rows: auto minmax(0, 1fr);
  transform: translateX(-50%);
}
.chat-opening-choice-options { display: grid; gap: 9px; overflow-y: auto; padding: 14px 16px 16px; scrollbar-width: thin; }
.chat-opening-choice-option { display: flex; width: 100%; min-height: 48px; align-items: center; gap: 12px; padding: 11px 13px 11px 15px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(17,17,20,.8); color: #eee; font: 700 13px/1.55 Pretendard,sans-serif; text-align: left; cursor: pointer; }
.chat-opening-choice-option span { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.chat-opening-choice-option i { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 50%; background: rgba(255,91,27,.13); color: #ff7a38; font-size: 22px; font-style: normal; line-height: 1; }
.chat-opening-choice-option:hover,
.chat-opening-choice-option:focus-visible { border-color: rgba(255,122,50,.68); background: rgba(74,31,19,.88); outline: none; }
.chat-opening-choice-option:hover i,
.chat-opening-choice-option:focus-visible i { background: #ff5b1b; color: #fff; }
.chat-tool-popover-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 18px 18px; border-top: 1px solid rgba(255,255,255,.07); background: rgba(9,9,11,.25); }
.chat-tool-popover-actions button { min-height: 42px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; background: #111216; color: #a9a9ae; font-weight: 800; }
.chat-tool-popover-actions button:first-child { border-color: transparent; background: linear-gradient(90deg,#ff701d,#ff4e12); color: #fff; }
.chat-situation-guide {
  width: min(460px, calc(100vw - 30px));
  max-height: min(620px, calc(100dvh - 160px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.chat-situation-examples { display: grid; gap: 10px; overflow-y: auto; padding: 14px 18px; scrollbar-width: thin; }
.chat-situation-examples article { display: grid; gap: 10px; padding: 13px; border: 1px solid rgba(255, 115, 55, .25); border-radius: 12px; background: rgba(17, 17, 20, .72); }
.chat-situation-example-input,
.chat-situation-example-result { display: grid; gap: 6px; min-width: 0; }
.chat-situation-example-result { padding-top: 9px; border-top: 1px solid rgba(255,255,255,.07); }
.chat-situation-examples span { width: max-content; padding: 3px 7px; border-radius: 999px; background: rgba(255, 91, 27, .13); color: #ff8043; font-size: 9px; font-weight: 850; }
.chat-situation-examples strong,
.chat-situation-examples p { margin: 0; overflow-wrap: anywhere; }
.chat-situation-examples strong { color: #f2f2f4; font-size: 12px; line-height: 1.55; }
.chat-situation-examples p { color: #b9b9be; font-size: 11px; line-height: 1.6; }
.chat-quick-settings { left: 15px; width: min(240px, calc(100vw - 30px)); padding: 8px 0; }
.chat-quick-section { display: grid; gap: 8px; padding: 9px 14px; }
.chat-quick-section + .chat-quick-section { padding-top: 2px; }
.chat-quick-section > strong { color: #d8d8dc; font-size: 12px; }
.chat-quick-segments { display: grid; min-height: 40px; grid-template-columns: 1fr 1fr; gap: 8px; }
.chat-quick-segments button { min-height: 40px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: #26262a; color: #aaa; font-size: 12px; font-weight: 750; }
.chat-quick-segments button.active { border-color: #ff5b1b; background: rgba(255, 91, 27, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,91,27,.16); }
.chat-quick-fonts { position: relative; display: grid; min-height: 54px; grid-template-columns: repeat(5,1fr); }
.chat-quick-fonts::before { position: absolute; top: 11px; right: 16px; left: 16px; height: 2px; background: #3a3a3f; content: ""; }
.chat-quick-fonts button { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: #777; font-size: 10px; }
.chat-quick-fonts button i { width: 9px; height: 9px; margin-top: 7px; border: 2px solid #1a1a1d; border-radius: 50%; background: #555; box-shadow: 0 0 0 1px #555; }
.chat-quick-fonts button.active { color: #fff; }
.chat-quick-fonts button.active i { background: #ff5b1b; box-shadow: 0 0 0 3px rgba(255,91,27,.22); }
.chat-quick-fullscreen { height: 42px; margin-top: 2px; padding: 0 14px; border-top: 1px solid rgba(255,255,255,.07); font-size: 12px; }

.chat-suggestion-loading { display: flex; min-height: 58px; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 24px; color: #aaa; font-size: 12px; }
.chat-suggestion-loading span { width: 16px; height: 16px; border: 2px solid #4a4a4a; border-top-color: #ff5b1b; border-radius: 50%; animation: chat-loading-spin .7s linear infinite; }
@keyframes chat-loading-spin { to { transform: rotate(360deg); } }
.chat-suggestions { display: grid; gap: 10px; width: 100%; margin-top: 24px; }
.chat-suggestion-item { display: flex; width: 100%; align-items: flex-end; justify-content: flex-end; gap: 8px; }
.chat-suggestion-edit { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid rgba(0,0,0,.35); border-radius: 50%; background: rgba(0,0,0,.45); color: #bbb; }
.chat-suggestion-bubble { max-width: calc(100% - 43px); min-height: 58px; padding: 16px 20px; border: 0; border-radius: 17px 17px 6px 17px; background: linear-gradient(135deg,#75351c,#582312); color: #eee; font-size: 16px; line-height: 24px; text-align: left; }
.chat-suggestion-bubble i { color: #d2b9ae; font-style: italic; }
.chat-scroll .user .message .chat-message-description { color: #d2b9ae; font-style: italic; }

.chat-pending-response { margin-top: 6px; }
.chat-pending-response .chat-pending-bubble { display: flex; min-width: 64px; min-height: 42px; align-items: center; gap: 10px; padding: 10px 15px; border-radius: 3px 18px 18px; background: rgba(50,50,50,.6); box-shadow: 0 0 10px 5px rgba(0,0,0,.03); }
.chat-pending-response .typing-dots { padding: 0; }
.chat-pending-response .chat-pending-status { color: var(--text-secondary, #b9b9be); font-size: 12px; line-height: 1.4; white-space: nowrap; }

.chat-character-panel { display: none; width: var(--chat-aside-width); min-width: 0; height: 100vh; overflow: hidden auto; background: #202024; scrollbar-width: none; }
.chat-character-panel::-webkit-scrollbar { display: none; }
.chat-character-cover { display: block; width: 100%; height: 350px; object-fit: cover; }
.chat-character-copy { padding: 14px 18px 16px; }
.chat-character-copy h2 { margin: 0 0 13px; font-size: 34px; font-weight: 800; line-height: 1.15; overflow-wrap: break-word; }
.chat-character-stats { display: flex; gap: 14px; color: #97979c; font-size: 11px; }
.chat-character-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.chat-character-tags span { padding: 3px 6px; border-radius: 4px; background: #4b1b09; color: #d86835; font-size: 9px; }
.chat-character-copy p { margin: 15px 0 0; color: #a6a6aa; font-size: 11px; line-height: 1.45; }
.chat-character-gallery { padding: 20px 18px; overflow: hidden; border-top: 1px solid #323237; }
.chat-character-gallery > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.chat-character-gallery > header > strong { color: #ff7030; font-size: 13px; }
.chat-character-gallery > header button { height: 28px; padding: 0 10px; border: 1px solid #8e3b17; border-radius: 999px; background: #27130b; color: #d76c35; font-size: 10px; }
.chat-character-gallery > header button b { color: #ff8a43; }
.chat-character-gallery > header button em { margin-left: 5px; color: #ff6a1d; font-style: normal; font-weight: 900; }
.chat-character-gallery-grid { display: flex; width: 100%; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-snap-type: x proximity; }
.chat-character-gallery-grid::-webkit-scrollbar { display: none; }
.chat-character-gallery-grid > button { position: relative; width: 104px; min-width: 104px; height: 162px; flex: 0 0 104px; aspect-ratio: auto; overflow: hidden; padding: 0; border: 2px solid #b99227; border-radius: 6px; background: #101011; box-shadow: 0 8px 22px rgba(0,0,0,.18); scroll-snap-align: start; }
.chat-character-gallery-grid img { width: 100%; height: 100%; object-fit: cover; }
.chat-character-gallery-grid > button:hover,
.chat-character-gallery-grid > button:focus-visible { border-color: #ff8c4a; box-shadow: 0 0 0 2px rgba(255,104,42,.18), 0 10px 26px rgba(0,0,0,.32); }
.chat-new-badge { position: absolute; z-index: 2; top: 5px; left: 5px; padding: 2px 5px; border-radius: 3px; background: #ff5a16; color: white; font-size: 8px; font-weight: 900; }
.chat-gallery-progress { height: 4px; margin: 10px 0 20px; overflow: hidden; border-radius: 999px; background: #333337; }
.chat-gallery-progress span { display: block; height: 100%; background: #d29d31; }
.chat-collection-link { width: 100%; height: 38px; border: 0; border-radius: 6px; background: #171719; color: #ff9a32; font-size: 11px; font-weight: 800; }

.chat-management-layer { position: fixed; z-index: 480; inset: 0; }
.chat-mode .modal-root:not(:empty) { z-index: 520; }
.chat-management-dismiss { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(0,0,0,.54); cursor: default; }
.chat-management-panel { position: absolute; top: 0; right: 0; width: min(var(--chat-management-width), 100vw); height: 100vh; overflow: hidden; background: #1d1d1d; color: #e1e1e1; box-shadow: -16px 0 42px rgba(0,0,0,.32); }
.chat-management-panel > header { position: relative; display: grid; height: 56px; place-items: center; border-bottom: 1px solid #292929; }
.chat-management-panel > header h2 { margin: 0; font-size: 16px; }
.chat-management-panel > header button { position: absolute; top: 12px; right: 20px; width: 32px; height: 32px; padding: 0; border: 0; background: transparent; color: #fafafa; font-size: 22px; }
.chat-management-scroll { height: calc(100vh - 56px); overflow-y: auto; padding: 8px 20px 34px; scrollbar-color: #555 transparent; }
.chat-management-currency { position: relative; display: grid; gap: 10px; }
.chat-management-currency > button,
.chat-management-currency > div > button { display: flex; height: 52px; align-items: center; justify-content: space-between; padding: 0 18px; border: 1px solid #262626; border-radius: 16px; background: #141414; color: #eee; }
.chat-management-currency > div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chat-management-currency button span { color: #aaa; font-size: 12px; }
.chat-management-currency button span { display: flex; min-width: 0; align-items: center; gap: 7px; }
.chat-management-currency button span i { display: flex; flex: 0 0 auto; color: #f4b24e; font-size: 15px; }
.chat-management-currency button b { font-size: 18px; }
.chat-bonus-tooltip { position: absolute; z-index: 30; top: 121px; right: -5px; width: 300px; margin: 0; padding: 15px 17px; border: 1px solid #ff6969; border-radius: 12px; background: #fafafa; color: #333; font-size: 12px; line-height: 1.55; box-shadow: 0 12px 30px rgba(0,0,0,.32); }
.chat-management-section { margin-top: 24px; padding-top: 16px; border-top: 1px solid #2c2c2c; }
.chat-management-section h3 { margin: 0 0 9px; color: #aaa; font-size: 12px; }
.chat-management-row { display: flex; width: 100%; min-height: 43px; align-items: center; justify-content: space-between; padding: 0; border: 0; background: transparent; color: #e1e1e1; font-size: 14px; text-align: left; }
.chat-management-row b { color: #777; font-size: 11px; }
.chat-management-row.collection { min-height: 50px; }
.chat-management-gallery { display: grid; height: 154px; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; overflow: hidden; }
.chat-management-gallery > span { position: relative; overflow: hidden; border-radius: 5px; background: #101010; }
.chat-management-gallery img { width: 100%; height: 100%; object-fit: cover; }
.chat-management-gallery b { position: absolute; right: 4px; bottom: 5px; left: 4px; padding: 3px 1px; border-radius: 99px; background: rgba(0,0,0,.75); color: #eee; font-size: 7px; text-align: center; }
.chat-management-switch { display: flex; width: 100%; height: 48px; align-items: center; justify-content: space-between; padding: 0; border: 0; background: transparent; color: #eee; font-size: 14px; }
.chat-management-switch i { position: relative; width: 42px; height: 24px; border-radius: 99px; background: #454545; }
.chat-management-switch i::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; content: ""; transition: transform .16s ease; }
.chat-management-switch[aria-pressed="true"] i { background: #ff5b1b; }
.chat-management-switch[aria-pressed="true"] i::after { transform: translateX(18px); }
.chat-management-options h4 { margin: 16px 0 9px; color: #aaa; font-size: 11px; }
.chat-management-options .two,
.chat-management-options .five { display: grid; gap: 6px; }
.chat-management-options .two { grid-template-columns: 1fr 1fr; }
.chat-management-options .five { grid-template-columns: repeat(5,minmax(0,1fr)); }
.chat-management-options button:not(.chat-management-switch) { min-width: 0; height: 40px; padding: 0 4px; border: 1px solid transparent; border-radius: 10px; background: #262626; color: #999; font-size: 10px; }
.chat-management-options button.active { border-color: #ff4d17; color: #fff; }
.chat-management-leave { width: 100%; height: 44px; margin-top: 28px; border: 0; border-top: 1px solid #343434; background: transparent; color: #eee; }

.chat-room-picker-backdrop { align-items: stretch; justify-content: center; padding: 0; background: rgba(0,0,0,.82); }
.chat-room-picker { display: grid; width: min(520px,100vw); height: 100dvh; grid-template-rows: 56px minmax(0,1fr); overflow: hidden; background: #171719; color: #f3f3f4; }
.chat-room-picker > header { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid #2d2d31; }
.chat-room-picker > header strong { overflow: hidden; font-size: 16px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.chat-room-picker > header button { min-height: 36px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: #f3f3f4; font-size: 13px; }
.chat-room-picker > header button:first-child { width: 36px; padding: 0; font-size: 20px; }
.chat-room-picker > header button:last-child { color: #ff7840; font-weight: 850; }
.chat-room-picker-list { display: grid; align-content: start; gap: 10px; overflow-y: auto; padding: 16px 14px calc(24px + env(safe-area-inset-bottom)); }
.chat-room-card { display: grid; width: 100%; min-height: 86px; grid-template-columns: 58px minmax(0,1fr) 18px; align-items: center; gap: 12px; padding: 12px; border: 1px solid #303034; border-radius: 12px; background: #202023; color: #f1f1f3; text-align: left; }
.chat-room-card.current { border-color: rgba(255,106,26,.72); background: linear-gradient(110deg,rgba(110,42,16,.34),#202023); }
.chat-room-card > img { width: 58px; height: 58px; border-radius: 9px; object-fit: cover; }
.chat-room-card > span { display: grid; min-width: 0; gap: 3px; }
.chat-room-card small { color: #ff8350; font-size: 10px; }
.chat-room-card strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.chat-room-card em { overflow: hidden; color: #929298; font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.chat-room-card > b { color: #77777d; font-size: 18px; }

.chat-new-confirm-backdrop { align-items: center; padding: 20px; }
.chat-new-confirm-dialog { width: min(330px,100%); padding: 26px 22px 20px; border: 1px solid #323238; border-radius: 16px; background: #1b1b1e; color: #f7f7f8; text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,.58); }
.chat-new-confirm-dialog h2 { margin: 0; font-size: 19px; }
.chat-new-confirm-dialog p { margin: 12px 0 22px; color: #aaaab0; font-size: 13px; }
.chat-new-confirm-dialog > div { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.chat-new-confirm-dialog button { min-height: 44px; }

.chat-note-selector { display: grid; gap: 10px; }
.chat-note-choice { display: grid; width: 100%; min-height: 74px; grid-template-columns: 46px minmax(0,1fr) 24px; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid #333338; border-radius: 12px; background: #1c1c1f; color: #f2f2f3; text-align: left; }
.chat-note-choice.selected { border-color: #ff681f; background: linear-gradient(110deg,rgba(112,41,14,.34),#1c1c1f); }
.chat-note-choice-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: #2b2b30; color: #d8d8dc; }
.chat-note-choice > span:nth-child(2) { display: grid; min-width: 0; gap: 4px; }
.chat-note-choice strong,
.chat-note-choice small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-note-choice strong { font-size: 14px; }
.chat-note-choice small { color: #98989f; font-size: 11px; }
.chat-note-choice > b { color: #ff681f; }
.chat-note-add { display: flex; min-height: 46px; align-items: center; justify-content: space-between; padding: 0 14px; border: 1px dashed rgba(255,106,26,.55); border-radius: 11px; background: rgba(255,106,26,.06); color: #e8e8ea; font-weight: 800; }
.chat-note-add b { color: #ff681f; font-size: 20px; }

.chat-model-backdrop { position: fixed; z-index: 500; inset: 0 0 0 calc(-1 * var(--chat-sidebar-width)); display: grid; place-items: center; padding: 12px 16px; background: rgba(3,3,5,.78); backdrop-filter: blur(8px); }
.chat-model-dialog { display: grid; width: min(var(--chat-model-width),calc(100vw - 32px)); max-height: min(var(--chat-model-height),calc(100dvh - 24px)); min-height: 0; grid-template-rows: auto minmax(0,1fr); overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 22px; background: linear-gradient(155deg,#202126 0%,#17181c 55%,#141518 100%); box-shadow: 0 34px 100px rgba(0,0,0,.72),0 1px 0 rgba(255,255,255,.06) inset; }
.chat-model-dialog > header { position: relative; padding: 22px 62px 18px 24px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: left; }
.chat-model-dialog > header > span { display: block; margin-bottom: 5px; color: #ff7a32; font-size: 9px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.chat-model-dialog h2 { margin: 0; color: #f7f7f8; font-size: 18px; letter-spacing: -.025em; }
.chat-model-dialog > header p { margin: 7px 0 0; color: #93969e; font-size: 11px; line-height: 1.45; }
.chat-model-dialog > header button { position: absolute; top: 20px; right: 20px; display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; background: #111216; color: #b7bac1; font-size: 20px; line-height: 1; cursor: pointer; }
.chat-model-dialog > header button:hover,
.chat-model-dialog > header button:focus-visible { border-color: rgba(255,122,50,.55); color: #fff; }
.chat-model-body { display: grid; min-height: 0; grid-template-rows: minmax(0,1fr) auto; gap: 14px; padding: 16px; }
.chat-model-list { display: grid; min-height: 0; gap: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #4b4e56 transparent; scrollbar-width: thin; }
.chat-model-state { display: grid; min-height: 280px; place-items: center; padding: 24px; border: 1px solid #303136; border-radius: 12px; background: #141519; color: #a9abb2; font-size: 13px; text-align: center; }
.chat-model-state.error { gap: 14px; color: #ffb29a; }
.chat-model-state button { min-width: 120px; height: 38px; border: 1px solid #ff5b1b; border-radius: 10px; background: #29150f; color: #fff; font-weight: 800; }
.chat-model-card { --chat-tier-accent: #ff6a21; --chat-tier-surface: #24110b; position: relative; display: grid; width: 100%; min-height: 66px; grid-template-columns: 36px minmax(0,1fr) 28px; align-items: center; gap: 11px; padding: 10px 13px; border: 1px solid rgba(255,255,255,.07); border-radius: 14px; background: linear-gradient(145deg,rgba(31,33,39,.98),rgba(22,23,27,.98)); color: #f3f3f5; text-align: left; box-shadow: 0 8px 22px rgba(0,0,0,.16); transition: border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease; }
.chat-model-card.tier-bronze { --chat-tier-accent: #cd7f32; --chat-tier-surface: #28180d; }
.chat-model-card.tier-silver { --chat-tier-accent: #c0c7d1; --chat-tier-surface: #1d222a; }
.chat-model-card.tier-gold { --chat-tier-accent: #f4c542; --chat-tier-surface: #292008; }
.chat-model-card.tier-platinum { --chat-tier-accent: #94a8c7; --chat-tier-surface: #192131; }
.chat-model-card.tier-diamond { --chat-tier-accent: #62dcff; --chat-tier-surface: #10252d; }
.chat-model-card:hover { border-color: color-mix(in srgb,var(--chat-tier-accent) 48%,transparent); transform: translateY(-1px); }
.chat-model-card.active { border-color: var(--chat-tier-accent); background: linear-gradient(110deg,var(--chat-tier-surface),rgba(25,26,31,.98) 72%); box-shadow: 0 0 0 1px color-mix(in srgb,var(--chat-tier-accent) 24%,transparent),0 12px 28px rgba(0,0,0,.25); }
.chat-model-card > em { position: absolute; top: 0; right: 0; padding: 4px 9px; background: #4b6ef5; color: white; font-size: 9px; font-style: normal; font-weight: 900; }
.chat-model-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: linear-gradient(145deg,color-mix(in srgb,var(--chat-tier-accent) 88%,white),var(--chat-tier-accent)); color: #0c0c0d; font-size: 11px; font-weight: 950; box-shadow: 0 5px 14px color-mix(in srgb,var(--chat-tier-accent) 18%,transparent); }
.chat-model-copy { display: grid; min-width: 0; gap: 4px; }
.chat-model-title { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 12px; }
.chat-model-copy b { overflow: hidden; font-size: 12px; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.chat-model-copy i { flex: 0 0 auto; color: var(--chat-tier-accent); font-size: 10px; font-style: normal; font-weight: 800; }
.chat-model-copy s { color: #95604c; }
.chat-model-copy small { overflow: hidden; color: #91949b; font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.chat-model-copy mark { width: max-content; padding: 4px 8px; border-radius: 999px; background: #ff5727; color: white; font-size: 9px; }
.chat-model-check { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid #454851; border-radius: 50%; background: #17181c; color: transparent; font-size: 12px; font-weight: 950; }
.chat-model-card.active .chat-model-check { border-color: var(--chat-tier-accent); background: var(--chat-tier-accent); color: #0c0c0d; box-shadow: 0 0 18px color-mix(in srgb,var(--chat-tier-accent) 28%,transparent); }
.chat-model-footer { display: grid; gap: 9px; }
.chat-model-footer > small { color: #777b84; font-size: 10px; text-align: center; }
.chat-model-confirm { width: 100%; height: 46px; border: 0; border-radius: 13px; background: linear-gradient(100deg,#ff5b16,#ff7b31); color: white; font-size: 13px; font-weight: 900; box-shadow: 0 10px 24px rgba(255,83,19,.2); cursor: pointer; }
.chat-model-confirm:hover,
.chat-model-confirm:focus-visible { filter: brightness(1.08); }
.chat-model-confirm:disabled { cursor: not-allowed; filter: grayscale(.8); opacity: .45; }

@media (max-height: 620px) {
  .chat-model-dialog > header { padding-top: 16px; padding-bottom: 13px; }
  .chat-model-dialog > header button { top: 14px; }
  .chat-model-body { gap: 10px; padding: 12px; }
  .chat-model-list { gap: 6px; }
  .chat-model-card { min-height: 58px; padding-block: 7px; }
  .chat-model-footer > small { display: none; }
  .chat-model-confirm { height: 42px; }
}

@media (max-width: 520px) {
  .chat-model-backdrop { inset: 0; padding: 10px; }
  .chat-model-dialog { width: min(340px,calc(100vw - 32px)); max-height: calc(100dvh - 20px); border-radius: 18px; }
  .chat-model-dialog > header { padding-left: 18px; }
  .chat-model-title { gap: 8px; }
}

@media (min-width: 1536px) {
  .chat-page { grid-template-columns: minmax(0,1fr) calc(var(--chat-aside-width) + 30px); }
  .chat-character-panel { display: block; justify-self: end; }
}

/* 2026-08-05 로그인 실화면 기준 대시보드 정밀 재구성 */
@media (min-width: 761px) {
  :root {
    --sidebar: 72px;
    --topbar: 100px;
  }

  .sidebar {
    z-index: 60;
    width: 72px;
    overflow: hidden;
    align-items: center;
    border-right: 1px solid #1d1d1d;
    background: #020202;
    backdrop-filter: none;
  }

  .brand {
    display: flex;
    width: 72px;
    height: 100px;
    flex: 0 0 100px;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .sidebar-logo-mini {
    width: 42px;
    height: 42px;
    max-width: none;
  }

  .side-nav {
    display: flex;
    width: 100%;
    padding: 0;
    gap: 8px;
  }

  .sidebar .nav-item {
    display: flex;
    width: 56px;
    min-height: 45px;
    height: 45px;
    flex: 0 0 45px;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    color: #666;
    transform: none;
  }

  .sidebar .nav-item::before { display: none; }
  .sidebar .nav-item:hover,
  .sidebar .nav-item.active {
    background: #1d1d1d;
    color: #fafafa;
    transform: none;
  }

  .sidebar .nav-icon {
    width: 24px;
    height: 24px;
    max-width: none;
    flex: 0 0 24px;
    object-fit: contain;
  }

  .sidebar .nav-label {
    position: static;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 16px;
    line-height: 24px;
    opacity: 0;
    box-shadow: none;
  }

  .sidebar .nav-item:hover .nav-label,
  .sidebar .app-download-nav:hover .nav-label { display: block; }

  .app-download-nav {
    position: relative;
    display: flex;
    width: 56px;
    height: 45px;
    flex: 0 0 45px;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 4px;
    padding: 0 6px;
    border: 0;
    border-radius: 12px;
    background: #101010;
    color: #666;
    cursor: pointer;
  }

  .app-download-nav > img { width: 42px; height: 42px; max-width: none; flex: 0 0 42px; }
  .app-download-nav.active { background: #351207; box-shadow: 0 0 18px rgba(255, 83, 31, .7); }
  .app-download-nav.active img { filter: saturate(1.3) brightness(1.15); }

  .sidebar-divider {
    width: 28px;
    height: 1px;
    flex: 0 0 1px;
    margin-top: 34px;
    background: #333;
  }

  .sidebar-recents {
    display: flex;
    width: 72px;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 42px;
  }

  .sidebar-recent-chat {
    position: relative;
    display: flex;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    align-items: center;
    gap: 16px;
    padding: 0;
    border: 1px solid #4a4a4a;
    border-radius: 50%;
    background: #111;
    color: white;
    cursor: pointer;
  }

  .sidebar-recent-chat img { width: 33px; height: 33px; max-width: none; border-radius: 50%; object-fit: cover; }
  .sidebar-recent-chat span { position: absolute; left: 48px; opacity: 0; white-space: nowrap; }

  .topbar {
    inset: 0 0 auto 0;
    z-index: 50;
    height: 100px;
    padding: 0 32px 0 96px;
    background: rgba(15, 15, 15, .35);
    backdrop-filter: blur(14px) saturate(1.6);
    border-bottom: 1px solid rgba(255,255,255,.06);
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    transition: background var(--motion-fast) ease, backdrop-filter var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease;
  }

  .topbar:not(.header-solid) {
    background: transparent;
    backdrop-filter: none;
    border-bottom-color: transparent;
    box-shadow: none;
  }

  .topbar.header-solid {
    background: rgba(15,15,15,.35);
    backdrop-filter: blur(14px) saturate(1.6);
    border-bottom-color: rgba(255,255,255,.06);
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
  }

  .top-actions { gap: 20px; }
  .top-action-button,
  .top-profile-button {
    position: relative;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .top-action-button img { width: 24px; height: 24px; max-width: none; }
  .top-action-button.ticket-action { width: 30px; height: 30px; margin: 0 1px; }
  .top-action-button.ticket-action img { width: 30px; height: 30px; }
  .ticket-action > span {
    position: absolute;
    top: -4px;
    right: -4px;
    display: grid;
    min-width: 16px;
    height: 16px;
    place-items: center;
    padding: 0 4px;
    border-radius: 999px;
    background: #ff5a2a;
    color: white;
    font-size: 9px;
    font-weight: 800;
  }

  .top-profile-button { width: 34px; height: 34px; margin-left: 2px; border-radius: 50%; background: #020203; }
  .top-profile-button img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; opacity: 0; }
  .top-action-button .notice-dot { top: -2px; right: -3px; width: 7px; height: 7px; border-color: #111; }

  .home-dashboard #app { margin-left: 0; }
  .home-dashboard .topbar { pointer-events: none; }
  .home-dashboard .top-actions { pointer-events: auto; }
  .cp-home-page { min-height: 100vh; padding-bottom: 0; background: #0c0c0c; animation: none; }

  .cp-banner-wrapper {
    position: relative;
    height: 500px;
    margin-top: -10px;
    overflow: hidden;
    background: var(--hero-bg, #201713);
  }

  .cp-banner-wrapper::before,
  .cp-banner-wrapper::after {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    left: 0;
    content: "";
    pointer-events: none;
  }

  .cp-banner-wrapper::before { top: 0; background: rgba(0, 0, 0, .28); }
  .cp-banner-wrapper::after { height: 150px; background: linear-gradient(transparent, #0c0c0c); }

  .cp-banner-bg {
    position: absolute;
    top: -62px;
    left: -10%;
    width: 120%;
    height: 600px;
    object-fit: cover;
    opacity: .32;
    filter: blur(54px) saturate(.82);
    transform: scale(1.04);
  }

  .cp-banner-container {
    position: absolute;
    z-index: 2;
    top: 80px;
    right: 0;
    left: var(--dashboard-edge);
    height: 420px;
    overflow: hidden;
  }

  .cp-banner-carousel { position: relative; width: 100%; height: 420px; overflow: hidden; outline: 0; }
  .cp-banner-track {
    display: flex;
    width: max-content;
    height: 400px;
    gap: var(--cp-slide-gap, 0px);
    will-change: transform;
  }

  .cp-banner-track.is-rebasing .cp-slide-content { transition: none; }

  .cp-banner-slide {
    position: relative;
    z-index: 1;
    width: var(--cp-slide-width, 500px);
    height: 400px;
    flex: 0 0 var(--cp-slide-width, 500px);
    cursor: pointer;
  }

  .cp-banner-slide.active { z-index: 4; }
  .cp-slide-content {
    position: relative;
    top: 46px;
    width: 100%;
    height: 308px;
    overflow: hidden;
    border-radius: 20px;
    background: #111;
    transform: translateX(0) scale(1);
    transition: transform 460ms cubic-bezier(.22,.76,.24,1), filter 300ms ease;
  }

  .cp-banner-slide.before-active .cp-slide-content { transform: translateX(-13px); }
  .cp-banner-slide.after-active .cp-slide-content { transform: translateX(13px); }
  .cp-banner-slide.active .cp-slide-content { top: 46px; transform: scale(1.3); }
  .cp-banner-slide:not(.active) .cp-slide-content { filter: brightness(.48); }
  .cp-slide-media { width: 100%; height: 100%; object-fit: cover; }
  .cp-slide-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 44%, rgba(0,0,0,.9)); }
  .cp-slide-info { position: absolute; right: 26px; bottom: 28px; left: 26px; color: white; }
  .cp-slide-badges { display: flex; gap: 5px; margin-bottom: 8px; }
  .cp-slide-badge { padding: 2px 7px; border: 1px solid #fe4a68; border-radius: 4px; background: #000; color: #fe4a68; font-size: 10px; font-weight: 800; }
  .cp-slide-badge.secondary { border-color: #ff6c40; color: #ff6c40; }
  .cp-slide-title { margin: 0 0 8px; font-size: 21px; font-weight: 800; line-height: 1; }
  .cp-slide-desc { overflow: hidden; margin: 0; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .cp-banner-arrow {
    position: absolute;
    z-index: 8;
    top: 200px;
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    padding: 0 0 3px;
    border: 0;
    border-radius: 50%;
    background: rgba(30,30,30,.85);
    color: #fafafa;
    font-size: 31px;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,.5);
    cursor: pointer;
    transform: translateY(-50%);
  }

  .cp-banner-arrow.prev { left: calc(50% - 395px); }
  .cp-banner-arrow.next { right: calc(50% - 395px); }

  .cp-notice-banner,
  .cp-main-tabs {
    width: min(var(--dashboard-content-max), calc(100% - var(--dashboard-edge)));
    margin-left: calc(var(--dashboard-edge) + max(0px, (100% - (var(--dashboard-content-max) + var(--dashboard-edge))) / 2));
  }

  .cp-notice-banner {
    display: flex;
    height: 50px;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    background: #39170d;
    color: #f2efee;
    cursor: pointer;
  }

  .cp-notice-banner > span { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: #ff5121; }
  .cp-notice-banner strong { overflow: hidden; font-size: 15px; font-weight: 700; text-align: left; text-overflow: ellipsis; white-space: nowrap; }

  .cp-main-tabs {
    display: flex;
    height: 43px;
    align-items: flex-end;
    gap: 20px;
    margin-top: 20px;
    padding-bottom: 8px;
  }

  .cp-main-tabs button {
    position: relative;
    height: 35px;
    padding: 6px 2px;
    border: 0;
    background: transparent;
    color: #888;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
  }

  .cp-main-tabs button.active { color: #fafafa; }
  .cp-main-tabs button.active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 999px; background: #ff5121; content: ""; }

  .cp-dashboard-sections { margin-left: var(--dashboard-edge); }
  .cp-curation-section { width: 100%; height: auto; margin: 30px 0 28px; overflow: hidden; }
  .cp-curation-section.first { margin-top: 0; }
  .cp-curation-inner { width: min(var(--dashboard-content-max), 100%); margin: 0 auto; }
  .cp-section-header { display: flex; width: 100%; height: 64px; align-items: center; justify-content: space-between; padding: 22px 0; }
  .cp-section-header h2 { margin: 0; color: #eee; font-size: 26px; font-weight: 700; line-height: 20px; letter-spacing: -.035em; }
  .cp-section-header h2 small { margin-left: 6px; color: #8b8b8b; font-size: .58em; font-weight: 700; letter-spacing: 0; }
  .cp-section-header button { padding: 0 15px 0 0; border: 0; background: transparent; color: #999; font-size: 14px; font-weight: 500; cursor: pointer; }

  .cp-curation-carousel {
    --cp-rail-columns: var(--dashboard-rail-columns);
    --cp-rail-gap: var(--dashboard-rail-gap);
    --cp-card-height: calc(var(--cp-card-width, 221px) + var(--dashboard-card-info-height));
    position: relative;
    width: 100%;
    height: var(--cp-card-height);
    overflow: visible;
  }
  .cp-curation-viewport { width: 100%; height: var(--cp-card-height); overflow: hidden; }
  .cp-curation-track { display: flex; width: max-content; height: var(--cp-card-height); gap: var(--cp-rail-gap); will-change: transform; }
  .cp-curation-item {
    display: flex;
    width: var(--cp-card-width, 221px);
    height: var(--cp-card-height);
    flex: 0 0 var(--cp-card-width, 221px);
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: #1a1a1a;
    color: #e1e1e1;
    text-align: left;
    cursor: pointer;
  }

  .cp-curation-thumb { position: relative; display: block; width: 100%; height: var(--cp-card-width, 221px); flex: 0 0 var(--cp-card-width, 221px); overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: #222; }
  .cp-curation-thumb > img:first-child { width: 100%; height: 100%; object-fit: cover; transition: transform 260ms ease; }
  .cp-curation-item:hover .cp-curation-thumb > img:first-child { transform: scale(1.025); }
  .cp-adult-badge { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; }
  .cp-card-badge { position: absolute; top: 12px; left: 12px; padding: 3px 8px; border: 1px solid #ff6c40; border-radius: 4px; background: rgb(9 9 9 / 88%); color: #ff6c40; font-size: 11px; font-weight: 800; }
  .cp-challenge-badge { position: absolute; right: 0; bottom: 0; padding: 3px 8px; background: #5f42f3; color: white; font-size: 11px; font-weight: 800; }
  .cp-curation-info { display: flex; width: 100%; height: var(--dashboard-card-info-height); flex-direction: column; gap: 6px; overflow: hidden; padding: 15px 12px 20px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); background: #090909; }
  .cp-curation-info > strong { overflow: hidden; color: #eee; font-size: 16px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
  .cp-curation-novel { overflow: hidden; color: #999; font-size: 16px; font-weight: 500; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
  .cp-hashtags { display: flex; height: 21px; gap: 5px; overflow: hidden; }
  .cp-hashtags > span { padding: 2px 6px; border-radius: 5px; background: #240800; color: #d2613e; font-size: 12px; font-weight: 500; line-height: 17px; white-space: nowrap; }

  .cp-rail-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 0 3px;
    border: 0;
    border-radius: 50%;
    background: rgba(30,30,30,.85);
    color: #fafafa;
    font-size: 29px;
    line-height: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,.5);
    cursor: pointer;
    transform: translateY(-50%);
    transition: opacity var(--motion-fast) ease;
  }

  .cp-rail-arrow.prev { left: -60px; }
  .cp-rail-arrow.next { right: -60px; }
  .cp-rail-arrow.is-hidden { opacity: 0; pointer-events: none; }

  .cp-main-ranking { width: min(1200px, 100%); height: 515px; margin: 0 auto; padding-top: 24px; }
  .cp-main-ranking h2 { margin: 0 0 24px; color: #eee; font-size: 26px; }
  .cp-ranking-container { display: grid; height: 430px; grid-template-columns: 430px 1fr; gap: 32px; }
  .cp-ranking-list { display: flex; flex-direction: column; gap: 8px; }
  .cp-ranking-item { display: grid; height: 70px; grid-template-columns: 32px 48px 1fr auto; align-items: center; gap: 12px; padding: 8px 14px; border: 0; border-radius: 12px; background: transparent; color: #eee; text-align: left; cursor: pointer; }
  .cp-ranking-item.active { background: #1d1d1d; }
  .cp-ranking-item b { color: #ff5121; font-size: 22px; }
  .cp-ranking-item img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
  .cp-ranking-item span { overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .cp-ranking-item em { color: #999; font-size: 12px; font-style: normal; }
  .cp-ranking-detail { position: relative; overflow: hidden; border-radius: 20px; background: #171717; }
  .cp-ranking-detail > img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.45); }
  .cp-ranking-detail > div { position: absolute; right: 30px; bottom: 30px; left: 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
  .cp-ranking-detail strong { font-size: 24px; }
  .cp-ranking-detail span { color: #ccc; }
  .cp-ranking-detail button { height: 45px; padding: 0 24px; border: 0; border-radius: 9px; background: #ff5121; color: white; font-weight: 800; cursor: pointer; }

  .cp-all-characters { width: min(var(--dashboard-content-max),100%); margin: 0 auto; }
  .cp-all-card-grid { display: grid; grid-template-columns: repeat(var(--dashboard-rail-columns),minmax(0,1fr)); gap: var(--dashboard-rail-gap); }
  .cp-all-card-grid .cp-curation-item { width: 100%; height: auto; min-height: 0; flex-basis: auto; }
  .cp-all-card-grid .cp-curation-thumb { width: 100%; height: auto; aspect-ratio: 1; flex-basis: auto; }
  .cp-all-card-grid .cp-curation-info { width: 100%; height: var(--dashboard-card-info-height); }
  .cp-list-controls { display: flex; align-items: center; gap: 6px; }
  .cp-section-header .cp-list-controls button { min-height: 34px; padding: 0 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: #141414; color: #aaa; font-size: 12px; }
  .cp-section-header .cp-list-controls button.active { border-color: rgba(255,106,26,.55); background: rgba(255,106,26,.12); color: #ff8650; }
  .cp-section-header .cp-list-controls button b { font: inherit; }
  .cp-all-characters.view-compact .cp-all-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-all-characters.view-compact .cp-curation-item { display: grid; min-height: 112px; grid-template-columns: 112px minmax(0, 1fr); align-items: stretch; }
  .cp-all-characters.view-compact .cp-curation-thumb { width: 112px; height: 112px; aspect-ratio: auto; border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
  .cp-all-characters.view-compact .cp-curation-info { height: 112px; justify-content: center; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }

}

.cp-curation-section,
.cp-main-ranking,
.cp-all-characters,
.site-footer.home-site-footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

.cp-dashboard-sections .cp-curation-item { border: 1px solid transparent; transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.cp-dashboard-sections.emphasis-on .cp-curation-item.is-emphasized { border-color: rgba(255, 106, 26, .42); box-shadow: 0 0 0 1px rgba(255, 106, 26, .08), 0 14px 34px rgba(0, 0, 0, .25); }

@media (min-width: 761px) and (max-width: 900px) {
  :root {
    --dashboard-rail-columns: 3;
    --dashboard-rail-gap: 14px;
  }
  .cp-rail-arrow.prev { left: 8px; }
  .cp-rail-arrow.next { right: 8px; }
}

@media (min-width: 901px) and (max-width: 1100px) {
  :root {
    --dashboard-rail-columns: 4;
    --dashboard-rail-gap: 16px;
  }
  .cp-rail-arrow.prev { left: -20px; }
  .cp-rail-arrow.next { right: -20px; }
}

.event-hero-card,
.app-install-card {
  display: grid;
  gap: 28px;
  margin-bottom: 34px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #151515;
}

.event-hero-card { grid-template-columns: 1fr 340px; align-items: center; }
.event-hero-card > img { width: 100%; height: 220px; border-radius: 16px; object-fit: cover; }
.event-hero-card h2, .app-install-card h2 { margin: 10px 0; font-size: 32px; }
.event-hero-card p, .app-install-card p { color: #aaa; line-height: 1.7; }
.app-install-card { grid-template-columns: minmax(0, 1fr) 360px; align-items: center; }
.app-install-icon { width: 64px; height: 64px; object-fit: cover; }
.app-install-actions { display: flex; gap: 10px; margin-top: 22px; }
.app-phone-preview { height: 660px; overflow: hidden; border: 8px solid #050505; border-radius: 34px; box-shadow: 0 22px 60px rgba(0,0,0,.5); }
.app-phone-preview iframe { width: 100%; height: 100%; border: 0; background: #0c0c0c; }

@media (max-width: 760px) {
  :root {
    --dashboard-edge: 0px;
    --dashboard-rail-gap: 10px;
  }
  .cp-home-page { padding: 64px 0 86px; background: #0c0c0c; animation: none; }
  .cp-banner-wrapper { height: 310px; overflow: hidden; background: #151515; }
  .cp-banner-bg { position: absolute; inset: -30px; width: calc(100% + 60px); height: 370px; object-fit: cover; opacity: .25; filter: blur(34px); }
  .cp-banner-container { position: absolute; inset: 16px 0 0; height: 294px; overflow: hidden; }
  .cp-banner-carousel { position: relative; height: 294px; overflow: hidden; }
  .cp-banner-track { display: flex; width: max-content; height: 270px; gap: var(--cp-slide-gap, 12px); }
  .cp-banner-slide { width: var(--cp-slide-width); height: 270px; flex: 0 0 var(--cp-slide-width); }
  .cp-slide-content { position: relative; height: 270px; overflow: hidden; border-radius: 18px; background: #111; transition: transform 460ms ease; }
  .cp-banner-slide.active .cp-slide-content { transform: scale(1); }
  .cp-banner-slide:not(.active) .cp-slide-content { filter: brightness(.55); }
  .cp-slide-media { width: 100%; height: 100%; object-fit: cover; }
  .cp-slide-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0,0,0,.9)); }
  .cp-slide-info { position: absolute; right: 18px; bottom: 18px; left: 18px; }
  .cp-slide-badges { display: flex; gap: 4px; }
  .cp-slide-badge { padding: 2px 5px; border: 1px solid #fe4a68; border-radius: 4px; background: #000; color: #fe4a68; font-size: 9px; }
  .cp-slide-title { margin: 7px 0 3px; font-size: 20px; font-weight: 800; }
  .cp-slide-desc { overflow: hidden; margin: 0; color: white; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .cp-banner-arrow { display: none; }
  .cp-notice-banner { display: flex; width: calc(100% - 24px); height: 50px; align-items: center; gap: 12px; margin: 12px; padding: 0 14px; border: 0; border-radius: 10px; background: #39170d; color: white; }
  .cp-notice-banner > span { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #ff5121; }
  .cp-notice-banner strong { overflow: hidden; font-size: 12px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
  .cp-main-tabs { display: flex; height: 58px; align-items: flex-end; gap: 20px; padding: 0 18px 8px; }
  .cp-main-tabs button { position: relative; height: 34px; padding: 5px 2px; border: 0; background: transparent; color: #777; font-weight: 800; }
  .cp-main-tabs button.active { color: white; }
  .cp-main-tabs button.active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: #ff5121; content: ""; }
  .cp-dashboard-sections { margin: 0; }
  .cp-curation-section { height: 314px; margin: 24px 0; overflow: hidden; }
  .cp-curation-section.first { margin-top: 0; }
  .cp-curation-inner { width: 100%; }
  .cp-section-header { display: flex; height: 52px; align-items: center; justify-content: space-between; padding: 0 18px; }
  .cp-section-header h2 { overflow: hidden; margin: 0; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
  .cp-section-header button { border: 0; background: transparent; color: #999; }
  .cp-curation-carousel { --cp-rail-columns: 0; --cp-rail-gap: var(--dashboard-rail-gap); position: relative; height: 262px; overflow: hidden; }
  .cp-curation-viewport { width: 100%; height: 262px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .cp-curation-viewport::-webkit-scrollbar { display: none; }
  .cp-curation-track { display: flex; width: max-content; gap: var(--cp-rail-gap); padding-left: 18px; }
  .cp-curation-item { display: flex; width: 174px; height: 252px; flex: 0 0 174px; flex-direction: column; overflow: hidden; padding: 0; border: 0; border-radius: 14px; background: #101010; color: white; text-align: left; }
  .cp-curation-item { scroll-snap-align: start; }
  .cp-curation-thumb { position: relative; display: block; width: 174px; height: 174px; overflow: hidden; }
  .cp-curation-thumb > img:first-child { width: 100%; height: 100%; object-fit: cover; }
  .cp-adult-badge { position: absolute; top: 8px; right: 8px; width: 21px; height: 21px; }
  .cp-card-badge { top: 8px; left: 8px; padding: 2px 6px; font-size: 10px; }
  .cp-challenge-badge { position: absolute; right: 0; bottom: 0; padding: 2px 6px; background: #5f42f3; font-size: 10px; }
  .cp-curation-info { display: flex; height: 78px; flex-direction: column; gap: 4px; padding: 10px; }
  .cp-curation-info > strong, .cp-curation-novel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cp-curation-info > strong { font-size: 13px; }
  .cp-curation-novel { color: #999; font-size: 11px; }
  .cp-hashtags { display: flex; gap: 4px; overflow: hidden; }
  .cp-hashtags span { padding: 2px 5px; border-radius: 4px; background: #240800; color: #d2613e; font-size: 9px; }
  .cp-rail-arrow, .cp-main-ranking { display: none; }
  .cp-all-characters { width: 100%; }
  .cp-all-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 0 12px; }
  .cp-all-card-grid .cp-curation-item { width: 100%; height: auto; }
  .cp-all-card-grid .cp-curation-thumb { width: 100%; height: auto; aspect-ratio: 1; }
  .cp-catalog-header { height: auto; min-height: 52px; }
  .cp-list-controls { display: flex; gap: 7px; }
  .cp-section-header .cp-list-controls button { min-height: 34px; padding: 0 8px; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: #141414; color: #aaa; font-size: 10px; }
  .cp-all-characters.view-compact .cp-all-card-grid { grid-template-columns: 1fr; }
  .cp-all-characters.view-compact .cp-curation-item { display: grid; min-height: 88px; grid-template-columns: 88px minmax(0, 1fr); }
  .cp-all-characters.view-compact .cp-curation-thumb { width: 88px; height: 88px; aspect-ratio: auto; border-radius: 12px 0 0 12px; }
  .cp-all-characters.view-compact .cp-curation-info { height: 88px; justify-content: center; border-radius: 0 12px 12px 0; }
  .event-hero-card, .app-install-card { grid-template-columns: 1fr; padding: 20px; }
  .event-hero-card > img { height: 180px; }
  .app-phone-preview { height: 620px; }
}

@media (max-width: 1000px) {
  .detail-hero {
    grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
    gap: 30px;
  }

  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 760px) {
  :root {
    --sidebar: 0px;
    --topbar: 60px;
  }

  body { padding-bottom: 70px; }

  .sidebar { display: none; }

  .topbar {
    z-index: 90;
    left: 0;
    justify-content: space-between;
    padding: 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent;
    backdrop-filter: none;
    border-bottom-color: transparent;
    box-shadow: none;
  }

  .topbar.header-solid { background: rgba(15,15,15,.92); backdrop-filter: blur(14px) saturate(1.35); border-bottom-color: rgba(255,255,255,.06); box-shadow: 0 4px 20px rgba(0,0,0,.25); }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0;
    color: white;
    font-size: 14px;
    font-weight: 900;
    pointer-events: auto;
  }

  .mobile-brand:not(.mobile-route-title) > img { width: 112px; height: 42px; max-width: none; object-fit: cover; }
  .mobile-brand.mobile-route-title { gap: 12px; color: #fafafa; font-size: 20px; letter-spacing: -.04em; }
  .mobile-brand.mobile-route-title > img { width: 24px; height: 24px; object-fit: contain; }
  .mobile-brand.mobile-route-title > strong { font-size: 20px; line-height: 30px; }

  .top-actions { gap: 20px; }
  .top-action-button,
  .top-profile-button {
    position: relative;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  .top-action-button img { width: 20px; height: 20px; max-width: none; object-fit: contain; }
  .top-action-button.ticket-action { display: none; }
  .top-profile-button { width: 30px; height: 30px; overflow: hidden; border-radius: 50%; background: #020203; }
  .top-profile-button img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; opacity: 1; }
  .top-action-button .notice-dot { top: -2px; right: -3px; width: 7px; height: 7px; border-color: #111; }

  .mobile-brand .brand-mark {
    width: 29px;
    height: 29px;
    border-radius: 10px 10px 10px 3px;
    font-size: 14px;
  }

  .wallet-button strong,
  .ticket-button { display: none; }

  .wallet-button { width: 38px; padding: 0; }

  .mobile-nav {
    position: fixed;
    z-index: 50;
    inset: auto 0 0;
    display: grid;
    height: 70px;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line);
    background: #0f0f0f;
    backdrop-filter: none;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: #77777e;
    font-size: 10px;
  }

  .mobile-nav-item img { width: 24px; height: 24px; opacity: .48; object-fit: contain; }
  .mobile-nav-item.active { color: #f7f7f7; }
  .mobile-nav-item.active img { opacity: 1; filter: brightness(1.6); }

  .content-wrap { width: min(calc(100% - 30px), var(--content-width)); }

  .hero-section {
    min-height: 500px;
    padding-top: 79px;
  }

  .hero-carousel {
    width: calc(100% - 30px);
    height: 368px;
  }

  .hero-card { height: 322px; }
  .hero-card.active { height: 368px; }
  .carousel-arrow { width: 38px; height: 38px; }
  .carousel-arrow.prev { left: 4px; }
  .carousel-arrow.next { right: 4px; }
  .hero-copy { inset: auto 20px 20px; }

  .mobile-nav .icon-chat::after { background: #0a0a0b; }
  .mobile-nav-item.active .icon-chat::after { background: #0a0a0b; }

  .announcement {
    width: calc(100% - 30px);
    margin-top: -4px;
    font-size: 12px;
  }

  .home-content { padding-bottom: 30px; }
  .content-tabs { margin-bottom: 28px; }
  .rail-section { margin-bottom: 42px; }
  .card-rail { grid-auto-columns: minmax(160px, 47vw); }
  .character-card { min-height: 286px; }
  .character-card img { height: 200px; }

  .detail-page { padding-top: 82px; }

  .detail-hero {
    grid-template-columns: 1fr;
    gap: 27px;
  }

  .detail-cover {
    width: calc(100% + 30px);
    margin-left: -15px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .detail-copy h1 { font-size: 42px; }
  .detail-actions { display: grid; grid-template-columns: 1fr 0.72fr; }
  .primary-button { width: 100%; }

  .gallery-section,
  .profile-section { margin-top: 56px; }

  .gallery-head { align-items: flex-start; flex-direction: column; }
  .progress-label { min-width: 0; text-align: left; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-card { grid-template-columns: 1fr; }

  .message { max-width: 86%; }

  .toast-region { top: calc(var(--ds-safe-top) + 12px); width: calc(100% - 24px); }
}

/* 2026-08-05 공식 로그인 UI 실측: 해금권·상점·알림·ID 패널 */
.ticket-backdrop,
.shop-backdrop { z-index: 200; background: rgba(0, 0, 0, .78); backdrop-filter: blur(2px); }

.ticket-modal {
  position: relative;
  display: flex;
  width: min(800px, calc(100vw - 40px));
  height: min(800px, calc(100vh - 40px));
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 30px;
  background: #1d1d1d;
  color: #e1e1e1;
  box-shadow: 0 0 10px 5px rgba(0, 0, 0, .25);
}
.ticket-close { position: absolute; top: 26px; right: 28px; z-index: 2; display: grid; width: 36px; height: 36px; place-items: center; border: 0; background: transparent; color: #aaa; font-size: 32px; font-weight: 200; line-height: 1; cursor: pointer; }
.ticket-content { display: flex; min-height: 0; flex: 1; flex-direction: column; padding: 40px 30px 0; }
.ticket-content > h2 { margin: 0; color: #fff; font-size: 24px; font-weight: 800; line-height: 1; }
.ticket-content > p { margin: 12px 0 0; color: #c8c8c8; font-size: 16px; font-weight: 600; }
.ticket-search { position: relative; display: flex; height: 50px; flex: 0 0 50px; margin-top: 20px; }
.ticket-search input { width: 100%; height: 50px; padding: 0 48px 0 20px; border: 1px solid #482112; border-radius: 15px; background: #0f0f0f; color: #eee; font: inherit; font-size: 14px; outline: 0; }
.ticket-search input::placeholder { color: #5b5b5b; }
.ticket-search input:focus { border-color: #ff4d17; }
.ticket-search button { position: absolute; top: 0; right: 5px; width: 45px; height: 50px; border: 0; background: transparent; color: #888; font-size: 25px; cursor: pointer; }
.ticket-grid { display: grid; min-height: 0; flex: 1; grid-template-columns: repeat(4, 1fr); align-content: start; gap: 10px; margin-top: 20px; padding-right: 4px; overflow-y: auto; scrollbar-color: #555 transparent; scrollbar-width: thin; }
.ticket-cell { display: flex; min-width: 0; height: 156px; flex-direction: column; align-items: center; padding: 15px 6px; border: 0; border-radius: 25px; background: #0f0f0f; color: #fafafa; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.ticket-cell:hover { background: #151515; transform: translateY(-1px); }
.ticket-cell > img { width: 50px; height: 50px; flex: 0 0 50px; border-radius: 50%; background: #1a1a1a; object-fit: cover; }
.ticket-cell > span { display: flex; width: 100%; min-width: 0; flex-direction: column; align-items: center; gap: 4px; margin-top: 14px; }
.ticket-cell strong { display: block; width: 100%; overflow: hidden; padding: 0 8px; color: #fafafa; font-size: 16px; font-weight: 800; line-height: 20px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.ticket-cell small { display: -webkit-box; width: 100%; overflow: hidden; padding: 0 12px; color: #aaa; font-size: 14px; line-height: 19px; text-align: center; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ticket-empty { grid-column: 1 / -1; padding: 80px 20px; color: #777; text-align: center; }
.ticket-footer { display: flex; height: 80px; flex: 0 0 80px; align-items: center; justify-content: center; background: #1d1d1d; box-shadow: 0 -12px 18px #1d1d1d; }
.ticket-footer button { padding: 8px 22px; border: 1px solid #3a3a3a; border-radius: 999px; background: transparent; color: #ccc; font-size: 13px; font-weight: 700; cursor: pointer; }
.ticket-footer button:not(:disabled):hover { border-color: #ff4d17; color: #fff; }
.ticket-footer button:disabled { border-color: transparent; color: #777; cursor: default; }

.shop-modal { position: relative; display: flex; width: min(490px, calc(100vw - 32px)); max-height: 85vh; flex-direction: column; overflow: hidden; border: 1px solid #202020; border-radius: 20px; background: #0f0f0f; color: #e1e1e1; box-shadow: 0 10px 40px rgba(0,0,0,.55); }
.shop-head { position: relative; display: flex; height: 48px; flex: 0 0 48px; align-items: center; justify-content: center; padding: 18px 24px 12px; }
.shop-head h2 { margin: 0; color: #e8e8e8; font-size: 18px; font-weight: 800; }
.shop-head button { position: absolute; top: 13px; right: 17px; width: 36px; height: 36px; border: 0; background: transparent; color: #aaa; font-size: 29px; font-weight: 200; cursor: pointer; }
.shop-scroll { padding: 4px 20px 24px; overflow-y: auto; scrollbar-color: #555 transparent; scrollbar-width: thin; }
.shop-balance { margin-bottom: 20px; }
.shop-balance-head { display: flex; height: 34px; align-items: flex-start; justify-content: space-between; }
.shop-balance-head strong { font-size: 16px; line-height: 30px; }
.shop-balance-head button { height: 34px; padding: 0 16px; border: 2px solid #555; border-radius: 10px; background: transparent; color: #aaa; font-size: 13px; font-weight: 700; cursor: pointer; }
.shop-balance-values { display: grid; height: 62px; grid-template-columns: 1fr 1px 1fr; align-items: center; gap: 16px; margin-top: 12px; padding: 18px 15px; border-radius: 15px; background: #1d1d1d; }
.shop-balance-values > span,
.shop-balance-values > button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: #fafafa; font-size: 18px; cursor: pointer; }
.shop-balance-values img { width: 26px; height: 26px; }
.shop-balance-values > i { width: 1px; height: 24px; background: #383838; }
.shop-hold-summary { display: flex; min-height: 36px; align-items: center; justify-content: flex-end; margin-top: 6px; color: #8f9298; font-size: 12px; }
.shop-hold-summary > button { display: flex; min-height: 34px; align-items: center; gap: 8px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: #a4a6aa; cursor: pointer; }
.shop-hold-summary > button:hover,
.shop-hold-summary > button:focus-visible { background: #1b1c1f; color: #fff; outline: none; }
.shop-hold-summary b { color: #ff8756; font-weight: 700; }
.shop-hold-loading { padding: 0 10px; }
.shop-section-title { margin: 8px 0 16px; color: #eee; font-size: 18px; font-weight: 800; }
.shop-products { display: flex; flex-direction: column; gap: 14px; }
.shop-product { position: relative; display: flex; min-height: 94px; overflow: hidden; padding: 0; border: 2px solid #303030; border-radius: 16px; background: #0f0f0f; color: #fff; text-align: left; cursor: pointer; }
.shop-product.popular { border-color: #4056b7; }
.shop-product.best { border-color: #a31f2c; background: #210607; }
.shop-product.selected { box-shadow: 0 0 0 1px rgba(91,111,229,.5); }
.shop-product-banner { position: absolute; inset: 0 0 auto; display: grid; height: 32px; place-items: center; padding: 9px 16px; background: linear-gradient(90deg,#3b4d9d,#5369c6); font-size: 14px; font-weight: 800; }
.shop-product.best .shop-product-banner { background: linear-gradient(90deg,#7c101a,#c12b3a); }
.shop-product-body { display: flex; width: 100%; min-height: 90px; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 10px 12px 15px; }
.shop-product:has(.shop-product-banner) .shop-product-body { padding-top: 44px; }
.shop-product-info { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 8px; }
.shop-product-amount { display: flex; align-items: center; gap: 7px; font-size: 19px; }
.shop-product-amount img { width: 24px; height: 24px; }
.shop-product-bonus { display: inline-flex; width: max-content; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: #282828; color: #ddd; font-size: 12px; font-weight: 700; }
.shop-product-bonus span { display: flex; align-items: center; gap: 4px; }
.shop-product-bonus img { width: 16px; height: 16px; }
.shop-product-bonus span:last-child { color: #f3b135; }
.shop-price { display: flex; width: 130px; height: 56px; flex: 0 0 130px; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 8px 12px; border-radius: 10px; background: linear-gradient(180deg,#df603c,#bd3514); color: #fff; }
.shop-price small { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.shop-price em { color: #5dffda; font-style: normal; font-weight: 900; }
.shop-price s { color: rgba(255,255,255,.38); }
.shop-price strong { font-size: 16px; font-weight: 900; }
.shop-guide { margin-top: 18px; padding: 10px 15px; border-radius: 15px; background: #2c2c2c; }
.shop-guide > button { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 4px 0; border: 0; background: transparent; color: #eee; cursor: pointer; }
.shop-guide > button span { display: flex; align-items: center; gap: 7px; font-weight: 700; }
.shop-guide > button i { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid #aaa; border-radius: 50%; font-size: 11px; font-style: normal; }
.shop-guide > div { padding: 10px 0 2px; color: #aaa; font-size: 12px; line-height: 1.55; }
.shop-guide p { margin: 5px 0; }

.notification-page { min-height: 100vh; padding-top: 100px; background: #0f0f0f; }
.notification-shell { width: min(720px, calc(100% - 40px)); min-height: 516px; margin: 0 auto; padding: 30px 20px 60px; }
.notification-head { margin-bottom: 10px; }
.notification-title { display: flex; width: 100%; height: 36px; align-items: center; gap: 12px; margin: 0 0 24px; padding: 0; border: 0; background: transparent; color: #fafafa; font-size: 24px; font-weight: 800; cursor: pointer; }
.notification-title img { width: 24px; height: 24px; }
.notification-tabs { display: flex; height: 36px; align-items: center; gap: 8px; }
.notification-tab { height: 36px; padding: 0 18px; border: 1px solid #313131; border-radius: 18px; background: #121315; color: #666; font-size: 14px; font-weight: 700; cursor: pointer; }
.notification-tab.active { border-color: #fafafa; background: #fafafa; color: #1d1d1d; }
.notification-setting { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; margin-left: auto; border: 1px solid #313131; border-radius: 50%; background: #121315; cursor: pointer; }
.notification-setting img { width: 20px; height: 20px; }
.notification-list { display: flex; min-height: 310px; flex-direction: column; margin-top: 20px; }
.notification-empty { display: flex; width: 100%; min-height: 301px; flex-direction: column; align-items: center; padding: 100px 20px; color: #666; font-size: 14px; }
.notification-empty span { display: flex; width: 64px; height: 64px; align-items: center; justify-content: center; margin-bottom: 16px; border-radius: 50%; background: #1d1d1d; }
.notification-empty img { width: 24px; height: 24px; opacity: .42; }
.notification-empty p { margin: 0; }
.notification-empty.compact { min-height: 120px; padding: 44px 20px; }
.notification-empty .primary-button,
.notification-empty .secondary-button { width: auto; min-width: 128px; margin-top: 20px; }
.notification-spinner { width: 30px !important; height: 30px !important; border: 3px solid #303033; border-top-color: #ff5d20; background: transparent !important; animation: notification-spin .8s linear infinite; }
@keyframes notification-spin { to { transform: rotate(360deg); } }
.notification-page-tools { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: 0 4px 10px; color: #929298; font-size: 13px; }
.notification-page-tools button,
.notification-more { min-height: 34px; padding: 0 16px; border: 1px solid #36363a; border-radius: 18px; background: #17181b; color: #eee; font-weight: 700; cursor: pointer; }
.notification-page-tools button:disabled,
.notification-more:disabled { cursor: default; opacity: .45; }
.notification-page-items { display: grid; border-top: 1px solid #292a2e; }
.notification-page-item { position: relative; display: grid; min-width: 0; min-height: 94px; grid-template-columns: 42px minmax(0,1fr) 8px; align-items: center; gap: 14px; padding: 16px 12px; border: 0; border-bottom: 1px solid #292a2e; background: transparent; color: #e8e8ea; text-align: left; cursor: pointer; }
.notification-page-item.unread { background: rgba(255,92,31,.055); }
.notification-page-item.read { opacity: .66; }
.notification-page-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: #222329; color: #ff6a2c; font-size: 13px; font-weight: 900; }
.notification-page-copy { min-width: 0; }
.notification-page-copy > span { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.notification-page-copy em { color: #ff6a2c; font-size: 11px; font-style: normal; font-weight: 800; }
.notification-page-copy time { color: #74747a; font-size: 11px; }
.notification-page-copy strong,
.notification-page-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-page-copy strong { font-size: 15px; }
.notification-page-copy small { margin-top: 6px; color: #929298; font-size: 13px; }
.notification-page-item > i { width: 7px; height: 7px; border-radius: 50%; background: #ff5d20; }
.notification-more { align-self: center; margin-top: 20px; }
.notification-settings-state { display: flex; min-height: 180px; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: #999; text-align: center; }
.notification-settings-state p { margin: 0; }

.account-panel-layer { position: fixed; z-index: 190; inset: 0; pointer-events: none; }
.account-panel-dismiss { position: absolute; inset: 0; border: 0; background: transparent; pointer-events: auto; cursor: default; }
.account-panel { position: absolute; top: 100px; right: 30px; width: 420px; height: 601px; overflow: hidden; border-radius: 30px 30px 25px 25px; color: #fafafa; pointer-events: auto; box-shadow: 0 14px 36px rgba(0,0,0,.34); }
.account-panel-upper { height: 215px; padding: 20px 30px; border-radius: 30px 30px 0 0; background: #1d1d1d; }
.account-panel-upper > header { display: flex; height: 30px; align-items: center; }
.account-back { width: 30px; height: 30px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.account-back img { width: 24px; height: 24px; }
.adult-switch { display: flex; height: 30px; align-items: center; gap: 6px; margin-left: auto; padding: 2px 6px 2px 10px; border: 0; border-radius: 20px; background: #3b3b3b; color: #fff; cursor: pointer; }
.adult-switch.active { background: linear-gradient(#ff4d17,#ff7700); }
.adult-switch span { display: flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 800; }
.adult-switch span img { width: 16px; height: 16px; }
.adult-switch i { width: 15px; height: 15px; border-radius: 50%; background: #fff; }
.account-card-stack { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.account-card { height: 65px; padding: 0 20px; border-radius: 15px; background: #272727; }
.account-profile-row,.account-pling-row { display: flex; width: 100%; height: 65px; align-items: center; border: 0; background: transparent; color: #fafafa; }
.account-profile-row { gap: 10px; padding: 0; cursor: pointer; }
.account-profile-row .account-avatar-dot { width: 24px; height: 24px; border-radius: 50%; background: #05070b; }
.account-profile-row strong { font-size: 16px; }
.account-profile-row b { margin-left: auto; color: #666; font-size: 22px; font-weight: 400; }
.account-pling-row { justify-content: space-between; }
.account-pling-row > span { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.account-pling-row img { width: 24px; height: 24px; }
.account-pling-row > span:last-child { gap: 12px; }
.account-pling-row button { height: 30px; padding: 0 12px; border: 0; border-radius: 5px; background: #fa4b22; color: #fff; font-size: 13px; font-weight: 800; cursor: pointer; }
.account-panel-lower { display: flex; height: 386px; flex-direction: column; padding: 0 30px; border-radius: 0 0 25px 25px; background: #1d1d1d; }
.account-panel-lower h3 { margin: 10px 0 15px; padding: 0 20px; color: #aaa; font-size: 14px; font-weight: 700; }
.account-panel-lower nav { display: flex; flex-direction: column; gap: 29px; padding: 0 20px; }
.account-panel-lower nav button { display: flex; height: 24px; align-items: center; gap: 14px; padding: 0; border: 0; background: transparent; color: #fafafa; font-size: 16px; font-weight: 700; cursor: pointer; }
.account-panel-lower nav img { width: 24px; height: 24px; }
.account-app-download { display: none; }
.account-panel-lower footer { margin-top: auto; padding: 20px 0; border-top: 1px solid #444; }
.account-panel-lower footer button { display: flex; width: 100%; height: 24px; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; color: #666; font-size: 16px; font-weight: 700; cursor: pointer; }
.account-panel-lower footer img { width: 24px; height: 24px; opacity: .45; }

@media (max-width: 760px) {
  .ticket-modal { width: calc(100vw - 32px); height: min(760px, calc(100vh - 24px)); border-radius: 22px; }
  .ticket-content { padding: 26px 20px 0; }
  .ticket-content > h2 { display: none; }
  .ticket-content > p { margin: 14px 38px 0; text-align: center; }
  .ticket-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .ticket-cell { height: 132px; border-radius: 18px; }
  .ticket-cell > span { margin-top: 8px; gap: 2px; }
  .ticket-cell strong { padding: 0 2px; font-size: 13px; }
  .ticket-cell small { padding: 0 2px; font-size: 11px; line-height: 15px; }
  .account-panel { top: 66px; right: 8px; left: 8px; width: auto; }
  .notification-page { padding-top: 72px; }
  .notification-shell { width: 100%; padding: 20px 14px 44px; }
  .notification-tabs { overflow-x: auto; scrollbar-width: none; }
  .notification-tab { flex: 0 0 auto; padding: 0 14px; }
  .notification-setting { flex: 0 0 36px; }
  .notification-page-item { grid-template-columns: 38px minmax(0,1fr) 7px; gap: 10px; padding-inline: 6px; }
  .notification-page-icon { width: 38px; height: 38px; }
}

/* 2026-08-05 공식 웹 동작값: 72px -> 260px hover 확장형 사이드바 */
@media (min-width: 761px) {
  .sidebar { z-index: 130; width: 72px; align-items: center; transition: width .32s cubic-bezier(.22, .61, .36, 1); }
  .sidebar.sidebar-open { width: 260px; align-items: stretch; }
  .sidebar .brand { position: relative; display: block; width: 72px; overflow: hidden; transition: width .32s cubic-bezier(.22, .61, .36, 1); }
  .sidebar-logo-mini { position: absolute; top: 50%; left: 36px; opacity: 1; transform: translate(-50%, -50%); transition: opacity .16s ease; }
  .sidebar-logo-full { position: absolute; top: 50%; left: 16px; width: 136px; height: 48px; max-width: none; opacity: 0; object-fit: cover; transform: translateY(-50%); transition: opacity .16s ease .08s; }
  .sidebar-open .brand { width: 260px; }
  .sidebar-open .sidebar-logo-mini { opacity: 0; }
  .sidebar-open .sidebar-logo-full { opacity: 1; }

  .sidebar .side-nav { align-items: center; }
  .sidebar .nav-item { transition: width .32s cubic-bezier(.22, .61, .36, 1), background-color .16s ease, color .16s ease; }
  .sidebar-open .nav-item { width: 244px; }
  .sidebar .nav-label { display: block; overflow: hidden; opacity: 0; white-space: nowrap; transition: opacity .16s ease .14s; }
  .sidebar-open .nav-label { opacity: 1; }

  .app-download-nav { align-self: flex-start; justify-content: center; margin: 4px 0 0 8px; padding: 0 6px; border: 1px solid #ff5a1f; background: #1c0f08; color: #ff6a26; box-shadow: 0 0 18px rgba(255, 83, 31, .26); overflow: hidden; transition: width .32s cubic-bezier(.22, .61, .36, 1), padding .32s cubic-bezier(.22, .61, .36, 1); }
  .sidebar:not(.sidebar-open) .app-download-nav > img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
  .app-download-label { flex: 1; overflow: hidden; color: #f7f7f7; font-size: 15px; font-weight: 700; line-height: 20px; text-align: left; opacity: 0; white-space: nowrap; transition: opacity .16s ease .14s; }
  .app-download-arrow { flex: 0 0 16px; opacity: 0; transition: opacity .16s ease .14s; }
  .sidebar-open .app-download-nav { width: 244px; justify-content: flex-start; padding: 0 8px; gap: 10px; }
  .sidebar-open .app-download-label,
  .sidebar-open .app-download-arrow { opacity: 1; }
  .sidebar-open .sidebar-divider { opacity: 0; }

  .sidebar-recents { width: 72px; gap: 0; transition: width .32s cubic-bezier(.22, .61, .36, 1), margin .32s cubic-bezier(.22, .61, .36, 1), padding .32s cubic-bezier(.22, .61, .36, 1); }
  .sidebar-recents-header { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-bottom: 0; padding-top: 0; border-top: 1px solid transparent; opacity: 0; transition: opacity .16s ease .14s, margin .32s ease, padding .32s ease; }
  .sidebar-recents-header h3 { margin: 0; color: #f7f7f7; font-size: 16px; font-weight: 600; }
  .sidebar-recents-header button { border: 0; background: transparent; color: #d2613e; font-size: 14px; cursor: pointer; }
  .sidebar-recents-list { display: flex; width: 100%; flex-direction: column; align-items: center; gap: 25px; }
  .sidebar-chat-item { position: relative; display: flex; width: 35px; height: 35px; align-items: center; justify-content: center; margin-inline: auto; }
  .sidebar-open .sidebar-recents { width: 260px; align-items: stretch; margin-top: 0; padding: 20px 18px; }
  .sidebar-open .sidebar-recents-header { margin-bottom: 15px; padding-top: 20px; border-top-color: #1d1d1d; opacity: 1; }
  .sidebar-open .sidebar-recents-list { align-items: stretch; gap: 0; }
  .sidebar-open .sidebar-chat-item { width: 224px; height: 65px; justify-content: flex-start; margin-inline: 0; padding: 15px 0; }

  .sidebar-recent-chat { overflow: visible; transition: width .32s cubic-bezier(.22, .61, .36, 1), border-color .16s ease; }
  .sidebar-recent-chat:hover { border-color: #ff641f; }
  .sidebar-chat-info { position: absolute; left: 48px; display: flex; width: 145px; flex-direction: column; gap: 3px; overflow: hidden; text-align: left; opacity: 0; white-space: nowrap; transition: opacity .16s ease .14s; }
  .sidebar-chat-info strong { color: #f4f4f4; font-size: 14px; font-weight: 600; line-height: 18px; }
  .sidebar-chat-info small { overflow: hidden; color: #777; font-size: 12px; line-height: 16px; text-overflow: ellipsis; }
  .sidebar-chat-menu { position: absolute; right: 0; z-index: 2; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #888; font-size: 20px; line-height: 28px; opacity: 0; cursor: pointer; transition: opacity .16s ease .14s, background .16s ease; }
  .sidebar-chat-menu:hover { background: #1d1d1d; color: #fff; }
  .sidebar-open .sidebar-recent-chat { width: 196px; border-color: transparent; border-radius: 0; background: transparent; }
  .sidebar-open .sidebar-recent-chat img { outline: 2px solid #d2613e; outline-offset: 1px; }
  .sidebar-open .sidebar-chat-info,
  .sidebar-open .sidebar-chat-menu { opacity: 1; }

  .sidebar:not(.sidebar-open) .sidebar-logo-full,
  .sidebar:not(.sidebar-open) .nav-label,
  .sidebar:not(.sidebar-open) .app-download-label,
  .sidebar:not(.sidebar-open) .app-download-arrow,
  .sidebar:not(.sidebar-open) .sidebar-recents-header,
  .sidebar:not(.sidebar-open) .sidebar-chat-info,
  .sidebar:not(.sidebar-open) .sidebar-chat-menu { pointer-events: none; }
  .sidebar.transitioning .nav-label,
  .sidebar.transitioning .app-download-label,
  .sidebar.transitioning .app-download-arrow,
  .sidebar.transitioning .sidebar-recents-header,
  .sidebar.transitioning .sidebar-chat-info,
  .sidebar.transitioning .sidebar-chat-menu { transition-delay: 0s; }

  .topbar::before { position: fixed; inset: 0 auto auto 0; z-index: -1; width: 0; height: 100px; background: #020202; content: ""; transition: width .32s cubic-bezier(.22, .61, .36, 1); }
  body.sidebar-expanded .topbar::before { width: 260px; }

  body.chat-mode .sidebar,
  body.chat-mode .sidebar.sidebar-open {
    width: var(--chat-sidebar-width);
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-color: #3c3c3f transparent;
    scrollbar-width: thin;
  }
  body.chat-mode .sidebar::-webkit-scrollbar { width: 4px; }
  body.chat-mode .sidebar::-webkit-scrollbar-thumb { border-radius: 999px; background: #3c3c3f; }
  body.chat-mode .sidebar > .brand,
  body.chat-mode .sidebar > .side-nav,
  body.chat-mode .sidebar > .sidebar-divider,
  body.chat-mode .sidebar > .sidebar-recents { flex-shrink: 0; }
  body.chat-mode .sidebar.sidebar-open .brand { width: 72px; }
  body.chat-mode .sidebar.sidebar-open .sidebar-logo-mini { opacity: 1; }
  body.chat-mode .sidebar.sidebar-open .sidebar-logo-full { opacity: 0; }
  body.chat-mode .sidebar.sidebar-open .nav-item { width: 48px; }
  body.chat-mode .sidebar.sidebar-open .nav-label,
  body.chat-mode .sidebar.sidebar-open .app-download-label,
  body.chat-mode .sidebar.sidebar-open .app-download-arrow,
  body.chat-mode .sidebar.sidebar-open .sidebar-recents-header,
  body.chat-mode .sidebar.sidebar-open .sidebar-chat-info,
  body.chat-mode .sidebar.sidebar-open .sidebar-chat-menu { opacity: 0; pointer-events: none; }
  body.chat-mode .sidebar.sidebar-open .app-download-nav { width: 56px; justify-content: center; padding: 0 6px; gap: 0; }
  body.chat-mode .sidebar.sidebar-open .app-download-nav > img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
  body.chat-mode .sidebar.sidebar-open .sidebar-divider { opacity: 1; }
  body.chat-mode .sidebar.sidebar-open .sidebar-recents { width: 72px; align-items: center; margin-top: 0; padding: 0; }
  body.chat-mode .sidebar.sidebar-open .sidebar-recents-list { align-items: center; gap: 25px; }
  body.chat-mode .sidebar.sidebar-open .sidebar-chat-item { width: 35px; height: 35px; justify-content: center; margin-inline: auto; padding: 0; }
  body.chat-mode .sidebar.sidebar-open .sidebar-recent-chat { width: 35px; border-radius: 50%; }
}

/* 2026-08-05 공식 탐색·대화·라이브러리·랭킹·이벤트 연결 화면 */
.official-route-page { min-height: 100vh; padding: 0 0 90px; background: #0c0c0c; animation: none; }
.official-feed-shell { width: 100%; padding: 100px 10px 80px 13px; }
.official-standard-shell { width: calc(100% - 24px); margin: 0 auto; padding-top: 100px; }
.official-ranking-shell { width: min(calc(100% - 64px), 1145px); margin: 0 auto; padding-top: 100px; }
.official-event-detail-shell { width: min(calc(100% - 64px), 1040px); margin: 0 auto; padding-top: 100px; }
.official-page-title { display: flex; height: 36px; align-items: center; gap: 12px; margin: 0; color: #f4f4f4; font-size: 24px; font-weight: 800; letter-spacing: -.04em; line-height: 36px; }
.official-page-title button { display: grid; width: 24px; height: 36px; place-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.official-page-title button img { width: 9px; height: 16px; object-fit: contain; }

.official-feed-tabs { display: flex; height: 35px; align-items: flex-end; gap: 20px; margin: 14px 4px 0; }
.official-feed-tab { position: relative; height: 29px; padding: 0 0 7px; border: 0; background: transparent; color: #747474; font-size: 17px; font-weight: 700; cursor: pointer; }
.official-feed-tab::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: transparent; content: ""; }
.official-feed-tab:hover { color: #d8d8d8; }
.official-feed-tab.active { color: #f5f5f5; }
.official-feed-tab.active::after { background: #ff5121; }
.official-search-result { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: 0 12px; border-top: 1px solid #232323; background: #121212; color: #aaa; font-size: 13px; }
.official-search-result button { border: 0; background: transparent; color: #ff6a31; cursor: pointer; }
.official-feed-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.official-feed-card { position: relative; display: block; height: 395px; min-width: 0; overflow: hidden; padding: 0; border: 0; border-radius: 0; background: #171717; color: #fff; text-align: left; cursor: pointer; }
.official-feed-card::after { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 35%, rgba(0,0,0,.08) 50%, rgba(0,0,0,.92) 100%); content: ""; pointer-events: none; }
.official-feed-card > img { width: 100%; height: 100%; object-fit: cover; transition: transform .24s ease, filter .24s ease; }
.official-feed-card:hover > img { filter: brightness(1.06); transform: scale(1.025); }
.official-live-badge { position: absolute; z-index: 2; top: 13px; right: 12px; display: flex; height: 27px; align-items: center; gap: 5px; padding: 0 10px; border-radius: 999px; background: rgba(34,34,34,.72); color: #f5f5f5; font-size: 12px; font-weight: 800; backdrop-filter: blur(7px); }
.official-live-badge i { width: 5px; height: 5px; border-radius: 50%; background: #ff3232; }
.official-card-overlay { position: absolute; z-index: 2; right: 18px; bottom: 16px; left: 18px; display: flex; flex-direction: column; align-items: flex-start; }
.official-card-overlay > strong { display: block; overflow: hidden; width: 100%; color: #fff; font-size: 17px; line-height: 24px; text-overflow: ellipsis; white-space: nowrap; }
.official-card-desc { display: -webkit-box; overflow: hidden; width: 100%; margin-top: 5px; color: #e3e3e3; font-size: 14px; line-height: 19px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.official-card-tags { display: flex; max-width: 100%; gap: 7px; overflow: hidden; margin-top: 5px; color: #dbdbdb; font-size: 12px; white-space: nowrap; }
.official-card-tags em { font-style: normal; }
.official-card-stats { display: flex; gap: 12px; margin-top: 12px; color: #bbb; font-size: 12px; }

.official-ranking-banner { display: block; height: 191px; overflow: hidden; margin-top: 15px; border-radius: 15px; background: #241100; }
.official-ranking-banner img { width: 100%; height: 100%; object-fit: cover; }
.official-ranking-tabs { display: flex; gap: 10px; margin-top: 24px; }
.official-ranking-tab { height: 39px; padding: 0 20px; border: 0; border-radius: 999px; background: #222; color: #aaa; font-size: 15px; font-weight: 800; cursor: pointer; }
.official-ranking-tab:hover { color: #fff; }
.official-ranking-tab.active { background: #ff5121; color: #fff; }
.official-ranking-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; margin-top: 15px; }
.official-ranking-card { position: relative; height: 284px; overflow: hidden; padding: 0; border: 0; border-radius: 12px; background: #191919; color: white; text-align: left; cursor: pointer; }
.official-ranking-card::after { position: absolute; inset: 0; background: linear-gradient(transparent 46%, rgba(0,0,0,.9)); content: ""; }
.official-ranking-card > img { width: 100%; height: 100%; object-fit: cover; transition: transform .24s ease; }
.official-ranking-card:hover > img { transform: scale(1.03); }
.official-ranking-overlay { position: absolute; z-index: 2; right: 12px; bottom: 16px; left: 12px; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: end; gap: 9px; }
.official-ranking-overlay > b { color: #ff5523; font-size: 35px; font-style: italic; line-height: 36px; text-shadow: 0 2px 7px #000; }
.official-ranking-overlay > span { min-width: 0; }
.official-ranking-overlay strong,
.official-ranking-overlay em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.official-ranking-overlay strong { font-size: 15px; }
.official-ranking-overlay em { margin-top: 5px; color: #c9c9c9; font-size: 11px; font-style: normal; }

.official-event-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; margin-top: 30px; }
.official-event-card { position: relative; height: 172px; overflow: hidden; padding: 0; border: 0; border-radius: 13px; background: #181818; cursor: pointer; }
.official-event-card img { width: 100%; height: 100%; object-fit: cover; transition: filter .2s ease, transform .2s ease; }
.official-event-card:hover img { filter: brightness(1.08); transform: scale(1.015); }
.official-event-card.ended img { filter: brightness(.42); }
.official-event-card.ended:hover img { filter: brightness(.52); }
.official-event-card > span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 18px; font-weight: 800; }

.official-empty-state { display: flex; min-height: 520px; align-items: center; justify-content: center; flex-direction: column; color: #777; text-align: center; }
.official-empty-state img { width: 90px; height: 90px; margin-bottom: 28px; object-fit: contain; }
.official-empty-state strong { color: #efefef; font-size: 22px; }
.official-empty-state p { margin: 14px 0 0; color: #777; font-size: 15px; }
.official-empty-state button { margin-top: 24px; padding: 11px 18px; border: 1px solid #333; border-radius: 8px; background: #181818; color: #ddd; cursor: pointer; }
.official-empty-state.compact { min-height: 360px; grid-column: 1/-1; }
.official-library-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-top: 30px; }
.official-list-more { display: flex; justify-content: center; padding: 28px 0 8px; }
.official-list-more button {
  min-height: var(--ds-control-md);
  padding: 0 var(--ds-space-6);
  border: 1px solid var(--ds-color-border);
  border-radius: var(--ds-radius-sm);
  background: var(--ds-color-surface-raised);
  color: var(--ds-color-text);
  font-weight: 700;
  cursor: pointer;
}
.official-list-more button:disabled { cursor: wait; opacity: .55; }

.conversations-page { background: #0c0c0c; }
.conversations-wrap { width: calc(100% - 24px); }
.conversations-wrap > .official-page-title { margin-bottom: 30px; }
.conversation-list { display: grid; gap: 20px; }
.conversation-card { min-height: 200px; grid-template-columns: 76px minmax(0,1fr) 190px; gap: 18px; padding: 26px 16px 26px 26px; border: 0; border-radius: 18px; background: #1a1a1a; }
.conversation-avatar { width: 76px; height: 76px; }
.conversation-title h2 { font-size: 16px; }
.conversation-summary p { max-width: 760px; color: #aaa; font-size: 13px; line-height: 1.65; }
.conversation-more { top: 25px; right: 16px; }
.conversation-actions { width: 190px; gap: 10px; padding-top: 40px; }
.conversation-actions button { width: 190px; min-height: 50px; border: 0; border-radius: 4px; background: #0e0e0f; }

.event-detail-banner { width: 100%; max-height: 370px; margin-top: 24px; border-radius: 18px; object-fit: cover; }
.event-detail-content { margin-top: 20px; padding: 28px; border: 1px solid #272727; border-radius: 18px; background: #151515; }
.event-detail-content h2 { margin: 12px 0 8px; font-size: 30px; }
.event-detail-content > p { margin: 0; color: #aaa; line-height: 1.7; }
.event-state { display: inline-flex; height: 26px; align-items: center; padding: 0 10px; border-radius: 999px; background: #432014; color: #ff8a51; font-size: 12px; font-weight: 800; }
.event-state.ended { background: #292929; color: #aaa; }
.event-detail-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 24px; }
.event-detail-meta > div { padding: 16px; border-radius: 11px; background: #1d1d1d; }
.event-detail-meta small,
.event-detail-meta strong { display: block; }
.event-detail-meta small { color: #777; font-size: 11px; }
.event-detail-meta strong { margin-top: 7px; font-size: 13px; }
.event-primary-action { width: 100%; margin-top: 18px; }
.attendance-hero { display: grid; grid-template-columns: 420px 1fr; align-items: center; gap: 28px; margin-top: 24px; padding: 20px; border-radius: 18px; background: #171717; }
.attendance-hero img { width: 100%; border-radius: 13px; }
.attendance-hero span { color: #ff7a3c; font-size: 13px; font-weight: 800; }
.attendance-hero h2 { margin: 8px 0; font-size: 28px; }
.attendance-hero p { margin: 0; color: #999; line-height: 1.65; }
.attendance-calendar { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; margin-top: 18px; }
.attendance-day { min-height: 90px; padding: 14px; border: 1px solid #292929; border-radius: 12px; background: #151515; color: #777; }
.attendance-day span,
.attendance-day strong { display: block; }
.attendance-day strong { margin-top: 13px; color: #bbb; font-size: 12px; }
.attendance-day.done { border-color: #423026; background: #1d1612; }
.attendance-day.done::after { color: #ff6a2b; content: "✓ 수령"; font-size: 11px; }
.attendance-day.today { border-color: #ff5d20; box-shadow: inset 0 0 0 1px #ff5d20; }
.attendance-action { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 18px; border-radius: 13px; background: #1b1b1b; }
.attendance-action small,
.attendance-action strong { display: block; }
.attendance-action small { color: #888; }
.attendance-action strong { margin-top: 5px; }
.friend-invite-official h3 { margin: 0 0 13px; font-size: 14px; }
.friend-invite-stats { display: grid; grid-template-columns: repeat(3,1fr); margin-bottom: 25px; padding: 18px 0; border: 1px solid #2f3034; border-radius: 12px; background: #17181b; }
.friend-invite-stats div { display: grid; place-items: center; gap: 7px; border-right: 1px solid #303136; }
.friend-invite-stats div:last-child { border-right: 0; }
.friend-invite-stats strong { color: #ff622b; font-size: 25px; }
.friend-invite-stats span { color: #85878c; font-size: 11px; }
.friend-invite-code { display: flex; height: 48px; align-items: center; justify-content: space-between; margin-bottom: 25px; padding: 0 12px 0 16px; border: 1px solid #303136; border-radius: 9px; background: #17181b; }
.friend-invite-code strong { letter-spacing: .08em; }
.friend-invite-code button { height: 30px; padding: 0 13px; border: 0; border-radius: 6px; background: #ff5d27; color: #fff; font-weight: 700; cursor: pointer; }
.friend-invite-official > p { display: grid; min-height: 90px; place-items: center; margin: 0; border: 1px solid #292a2e; border-radius: 10px; color: #77797e; font-size: 12px; }
.settings-toggle-list { display: grid; gap: 8px; }
.settings-toggle-row { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 14px; padding: 15px; border: 1px solid #2c2c2f; border-radius: 11px; background: #19191b; color: #e9e9eb; text-align: left; cursor: pointer; }
.settings-toggle-row strong,
.settings-toggle-row small { display: block; }
.settings-toggle-row small { margin-top: 5px; color: #85858b; }
.settings-toggle-row i { position: relative; width: 42px; height: 24px; flex: 0 0 42px; border-radius: 999px; background: #36363a; transition: background .18s ease; }
.settings-toggle-row i::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #aaa; content: ""; transition: transform .18s ease, background .18s ease; }
.settings-toggle-row.active i { background: #ff5b22; }
.settings-toggle-row.active i::after { background: #fff; transform: translateX(18px); }
.notice-item.danger-line { color: #ff8a8a; }

/* Original page audit: login, content detail, profile, inquiry and policy */
.auth-official-backdrop { padding: 24px; background: rgba(0,0,0,.78); }
.auth-official-modal { position: relative; width: 446px; max-width: 100%; max-height: calc(100vh - 48px); overflow-y: auto; padding: 28px 28px 30px; border: 1px solid #292c30; border-radius: 20px; background: #1b1e21; box-shadow: 0 22px 70px rgba(0,0,0,.56); color: #f5f5f5; }
.auth-official-close-bar { position: sticky; top: 0; height: 0; z-index: 5; }
.auth-official-close { position: absolute; top: 0; right: -14px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #292c30; border-radius: 50%; background: #17191c; color: #9b9da2; font-size: 24px; line-height: 1; cursor: pointer; }
.auth-official-brand { display: flex; height: 48px; align-items: center; justify-content: center; }
.auth-official-brand-image { display: block; width: 112px; height: 40px; }
.auth-official-tabs { display: grid; grid-template-columns: 1fr 1fr; height: 48px; margin: 2px 0 27px; padding: 4px; border-radius: 999px; background: #292c30; }
.auth-official-tabs button { border: 0; border-radius: 999px; background: transparent; color: #989ba0; font-size: 14px; font-weight: 700; cursor: pointer; }
.auth-official-tabs button.active { background: #171a1d; color: #f3f3f3; box-shadow: 0 1px 5px rgba(0,0,0,.25); }
.auth-official-modal h3 { margin: 0 0 11px; text-align: center; font-size: 14px; }
.auth-social-row { display: flex; justify-content: center; gap: 16px; margin: 0 0 25px; }
.auth-social { display: grid; width: 52px; height: 52px; place-items: center; border: 0; border-radius: 50%; cursor: pointer; font-weight: 900; }
.auth-social.google { background: #fff; color: #4285f4; font-size: 22px; }
.auth-social.naver { background: #03cf5d; color: #fff; font-size: 24px; }
.auth-social.kakao { background: #fee500; color: #281c1c; font-size: 9px; }
.auth-official-form { display: grid; gap: 11px; }
.auth-locale-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-locale-grid label { display: grid; gap: 6px; color: #c6c7ca; font-size: 12px; font-weight: 700; }
.auth-locale-grid select { width: 100%; height: 44px; padding: 0 11px; border: 1px solid #373a3f; border-radius: 8px; background: #292c30; color: #fff; }
.auth-official-form > input,
.auth-password-field { width: 100%; height: 52px; border: 1px solid #373a3f; border-radius: 8px; background: #292c30; color: #fff; }
.auth-official-form > input { padding: 0 16px; }
.auth-official-form input::placeholder { color: #92959b; }
.auth-password-field { display: grid; grid-template-columns: minmax(0,1fr) 48px; align-items: center; }
.auth-password-field input { height: 100%; min-width: 0; padding: 0 0 0 16px; border: 0; outline: 0; background: transparent; color: #fff; }
.auth-password-field button { height: 100%; border: 0; background: transparent; color: #96999e; font-size: 19px; cursor: pointer; }
.auth-options { display: flex; gap: 15px; margin: 1px 0 6px; }
.auth-options label,
.auth-consent { display: flex; align-items: center; gap: 8px; color: #d6d7da; font-size: 12px; }
.auth-options input,
.auth-consent input { width: 18px; height: 18px; margin: 0; accent-color: #ff5b25; }
.auth-consent button { padding: 0; border: 0; background: none; color: #ff7b4d; text-decoration: underline; cursor: pointer; }
.auth-birth-field { display: grid; gap: 7px; color: #d6d7da; font-size: 12px; font-weight: 700; }
.auth-birth-field input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid #36393e; border-radius: 8px; background: #272a2e; color: #f4f4f4; color-scheme: dark; }
.auth-age-note, .auth-password-note { margin: -4px 0 2px; color: #92959b; font-size: 11px; line-height: 1.45; }
.auth-policy-state { display: flex; min-height: 58px; align-items: center; justify-content: center; padding: 12px; border: 1px solid #34373b; border-radius: 8px; background: #24272b; color: #afb1b5; font-size: 12px; text-align: center; }
.auth-policy-state.error { flex-direction: column; gap: 8px; border-color: rgba(255,87,36,.42); color: #ff9570; }
.auth-policy-state button { border: 0; background: none; color: #ff7742; font-weight: 700; text-decoration: underline; cursor: pointer; }
.identity-onboarding-form { gap: 12px; }
.identity-status-card { display: grid; gap: 7px; padding: 18px; border: 1px solid #36393e; border-radius: 12px; background: #17191c; }
.identity-status-card.verified { border-color: rgba(255,101,45,.52); box-shadow: inset 0 0 26px rgba(255,78,28,.06); }
.identity-status-card strong { color: #f4f4f4; font-size: 15px; }
.identity-status-card small { color: #92959b; line-height: 1.5; }
.identity-adult-consent { margin: 16px 0; padding: 14px; border: 1px solid #34373b; border-radius: 10px; background: #202327; }
.identity-ready { margin-top: 16px; padding: 15px; border: 1px solid rgba(255,101,45,.5); border-radius: 10px; background: rgba(255,81,28,.09); color: #ff8a5d; font-size: 13px; font-weight: 700; }
.auth-official-submit { height: 56px; margin-top: 5px; border: 0; border-radius: 8px; background: linear-gradient(90deg,#ff4e1c,#ff7445); color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; }
.auth-spam-notice { margin-bottom: 14px; padding: 14px 16px; border: 1px solid rgba(255, 174, 65, .38); border-radius: 10px; background: rgba(255, 174, 65, .1); color: #f4d39b; }
.auth-spam-notice strong { display: block; margin-bottom: 5px; color: #ffd28d; }
.auth-spam-notice p { margin: 0; color: inherit; font-size: 13px; line-height: 1.55; }
.auth-verification-code { letter-spacing: .38em; text-align: center; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.auth-find-account { display: block; margin: 18px auto 0; border: 0; background: transparent; color: #8f9298; font-size: 12px; cursor: pointer; }
.provider-auth-card { display: grid; justify-items: center; gap: 12px; padding: 28px; border: 1px solid #303237; border-radius: 14px; background: #17191c; text-align: center; }
.provider-auth-card > span { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 50%; background: #fff; color: #4285f4; font-weight: 900; }
.provider-auth-card.naver > span { background: #03cf5d; color: #fff; }
.provider-auth-card.kakao > span { background: #fee500; color: #281c1c; font-size: 10px; }
.provider-auth-card p { margin: 0; color: #989ba0; line-height: 1.6; }
.provider-auth-card > button { width: 100%; height: 48px; border: 0; border-radius: 8px; background: #ff5a22; color: #fff; font-weight: 800; cursor: pointer; }
.find-account-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.find-account-tabs button { height: 42px; border: 1px solid #34363b; border-radius: 8px; background: #181a1d; color: #a4a7ac; cursor: pointer; }
.find-account-tabs button.active { border-color: #ff5a22; color: #fff; }

.official-detail-page { min-height: 100vh; padding: 96px 0 0; background: #090a0b; }
.official-detail-page .content-wrap { width: min(1120px,calc(100% - 56px)); margin: 0 auto; }
.detail-hero { display: grid; grid-template-columns: 365px minmax(0,1fr); gap: 34px; align-items: center; padding-bottom: 74px; }
.detail-cover { position: relative; height: 365px; overflow: hidden; border-radius: 20px; background: #111; box-shadow: 0 30px 48px rgba(0,0,0,.35); }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-label { position: absolute; right: 14px; bottom: 14px; padding: 7px 9px; border-radius: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 10px; }
.detail-title-line { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.detail-title-line h1 { margin: 0; font-size: 43px; letter-spacing: -.05em; }
.detail-title-actions { display: flex; gap: 8px; }
.favorite-button,
.detail-menu-button { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #353638; border-radius: 50%; background: #171719; color: #f5f5f5; cursor: pointer; }
.favorite-button { color: #ff743b; font-size: 25px; }
.creator-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.creator-link { padding: 0; border: 0; background: transparent; color: #8c8e93; cursor: pointer; }
.follow-button { padding: 7px 12px; border: 1px solid #743113; border-radius: 999px; background: #271409; color: #ff7b41; cursor: pointer; }
.detail-subtitle { margin: 25px 0 15px; color: #dadadd; font-size: 21px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 18px; color: #909196; font-size: 12px; }
.detail-tags { margin: 17px 0; }
.detail-tags .tag { border-color: #5b2a15; background: #1e120d; color: #c9764d; }
.view-all-gallery-button { display: flex; width: 100%; min-height: 50px; align-items: center; justify-content: space-between; margin: 18px 0 12px; padding: 0 16px; border: 1px solid #2b2c30; border-radius: 9px; background: #151619; color: #d8d9dc; cursor: pointer; }
.view-all-gallery-button strong { color: #ff7337; }
.field-label { display: block; margin: 9px 0 8px; color: #b8b9bd; font-size: 12px; font-weight: 700; }
.episode-trigger { display: flex; width: 100%; height: 48px; align-items: center; justify-content: space-between; padding: 0 16px; border: 1px solid #33353a; border-radius: 9px; background: #18191d; color: #f2f2f2; cursor: pointer; }
.detail-chat-button { width: 100%; height: 49px; margin-top: 10px; border: 0; border-radius: 9px; background: linear-gradient(90deg,#ff6a20,#df4507); color: #fff; font-weight: 800; cursor: pointer; }
.official-gallery-section { margin-bottom: 74px; }
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.gallery-head h2 { margin: 0 0 7px; font-size: 25px; }
.gallery-head p { margin: 0; color: #818388; font-size: 12px; }
.progress-label { width: 180px; text-align: right; }
.progress-label strong { font-size: 12px; }
.progress-bar { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: #28292d; }
.progress-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#ff6525,#ffb06b); }
.tier-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.tier-pill { height: 34px; padding: 0 13px; border: 1px solid #303136; border-radius: 999px; background: #151619; color: #8b8d92; font-size: 11px; cursor: pointer; }
.tier-pill.active { border-color: #a5471e; background: #22140e; color: #ff8b53; }
.tier-pill b,
.tier-pill em { font-style: normal; }
.gallery-slider-shell { position: relative; }
.gallery-horizontal-list { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 10px; overflow: hidden; }
.gallery-start-card,
.gallery-item { position: relative; height: 233px; overflow: hidden; border: 1px solid #323338; border-radius: 10px; background: #111; color: #e8e8ea; cursor: pointer; }
.gallery-start-card { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 10px; padding: 10px; text-align: center; }
.gallery-start-card img { width: 44px; height: 44px; }
.gallery-start-card span { font-size: 11px; line-height: 1.45; }
.gallery-start-card b { color: #ff7e43; font-size: 11px; }
.detail-gallery-empty { display: flex; align-items: center; flex: 1 0 300px; flex-direction: column; justify-content: center; gap: 6px; min-height: 180px; padding: 24px; border: 1px dashed #34343a; border-radius: 16px; color: #f0f0f2; text-align: center; }
.detail-gallery-empty span { color: #8d8d95; font-size: 12px; line-height: 1.5; }
.chat-character-gallery-empty { display: flex; min-height: 112px; flex-direction: column; justify-content: center; gap: 6px; padding: 16px; border: 1px dashed #34343a; border-radius: 10px; color: #ececef; text-align: center; }
.chat-character-gallery-empty span { color: #8d8d95; font-size: 11px; line-height: 1.45; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav { position: absolute; z-index: 2; top: 50%; display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 50%; background: #24262b; color: #fff; font-size: 27px; transform: translateY(-50%); cursor: pointer; }
.gallery-nav.prev { left: -20px; }
.gallery-nav.next { right: -20px; }
.gallery-nav:disabled { display: none; }
.profile-section { margin: 0 0 72px; }
.profile-section h2 { margin: 0 0 18px; font-size: 24px; }
.profile-card { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(300px,.8fr); gap: 42px; padding: 31px 34px; border: 1px solid #2b2c30; border-radius: 18px; background: linear-gradient(135deg,#17181b,#111214); }
.profile-card > p { margin: 0; color: #b6b7bb; line-height: 1.9; }
.detail-opening-section { margin: 0 0 72px; }
.detail-opening-section h2 { margin: 0 0 18px; font-size: 24px; }
.detail-opening-event { margin: 0 0 16px; padding-left: 14px; border-left: 2px solid #ff5b22; color: #c6c6ca; line-height: 1.75; white-space: pre-line; }
.detail-opening-card { display: grid; gap: 14px; padding: 24px; border: 1px solid #2b2c30; border-radius: 18px; background: linear-gradient(135deg,#17181b,#111214); }
.detail-opening-narration { margin: 0; color: #b6b7bb; line-height: 1.8; white-space: pre-line; }
.detail-opening-dialogue { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; align-items: start; }
.detail-opening-dialogue > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: #4a3028; color: #fff; font-weight: 800; }
.detail-opening-dialogue p { margin: 0; padding: 13px 15px; border-radius: 4px 16px 16px; background: #252528; color: #ececef; line-height: 1.7; white-space: pre-line; }
.detail-opening-dialogue b { display: block; margin-bottom: 5px; font-size: 11px; }
.trait-list { display: grid; gap: 14px; }
.trait { display: grid; grid-template-columns: 65px minmax(0,1fr) 40px; align-items: center; gap: 10px; font-size: 11px; color: #aaa; }
.trait-meter { height: 5px; overflow: hidden; border-radius: 99px; background: #34353a; }
.trait-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#ff702e,#ffc08e); }
.detail-sticky-action { position: sticky; z-index: 5; bottom: 14px; display: grid; grid-template-columns: minmax(170px,1fr) 42px 42px minmax(210px,.8fr) 180px; gap: 8px; align-items: center; margin: 0 0 50px; padding: 10px 12px; border: 1px solid #33343a; border-radius: 14px; background: rgba(24,25,29,.95); backdrop-filter: blur(16px); }
.detail-sticky-action > div { display: flex; align-items: center; gap: 10px; }
.detail-sticky-action img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.detail-sticky-action strong,
.detail-sticky-action small { display: block; }
.detail-sticky-action small { margin-top: 3px; color: #8d8e93; }
.detail-sticky-action > button:not(.episode-trigger):not(.detail-chat-button) { height: 42px; border: 1px solid #34353a; border-radius: 9px; background: #16171a; color: #ff7942; cursor: pointer; }
.detail-sticky-action .compact { height: 42px; margin: 0; }
.comment-section { max-width: 860px; margin: 0 auto 80px; }
.comment-heading { display: flex; align-items: center; justify-content: space-between; }
.comment-heading h2 { font-size: 24px; }
.comment-heading h2 span { color: #ff6a2b; }
.comment-sort-button { border: 0; background: transparent; color: #aaa; cursor: pointer; }
.comment-form { overflow: hidden; border: 1px solid #313238; border-radius: 12px; background: #16171a; }
.comment-form textarea { width: 100%; min-height: 94px; padding: 16px; border: 0; outline: 0; resize: vertical; background: transparent; color: #fff; }
.comment-form > div { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-top: 1px solid #292a2f; }
.comment-form span { color: #777; font-size: 11px; }
.comment-form button { padding: 8px 18px; border: 0; border-radius: 7px; background: #ff5b20; color: #fff; cursor: pointer; }
.comment-item { padding: 23px 2px; border-bottom: 1px solid #292a2d; }
.comment-item header { display: flex; align-items: center; gap: 10px; }
.comment-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: #2c2d31; color: #ddd; }
.comment-item header span { min-width: 0; flex: 1; }
.comment-item header strong,
.comment-item header small { display: block; }
.comment-item header small { margin-top: 4px; color: #76787d; font-size: 10px; }
.comment-item header button { border: 0; background: transparent; color: #888; cursor: pointer; }
.comment-item p { margin: 15px 0; color: #c2c3c6; line-height: 1.6; }
.comment-item footer { display: flex; gap: 16px; }
.comment-item footer button { border: 0; background: transparent; color: #8f9196; cursor: pointer; }
.comment-more-button { display: block; width: 100%; height: 46px; margin-top: 18px; border: 1px solid #33343a; border-radius: 9px; background: #16171a; color: #ccc; cursor: pointer; }
.site-footer { padding: 32px 0 38px; border-top: 1px solid #252629; color: #77797e; font-size: 11px; }
.site-footer-links { display: flex; min-height: 14px; flex-wrap: wrap; gap: 22px; line-height: 14px; }
.site-footer button { border: 0; background: transparent; color: inherit; cursor: pointer; }
.site-footer-links button { height: 14px; padding: 0; line-height: 14px; }
.site-footer-links button:nth-child(2) { color: #ccc; font-weight: 700; }
.site-footer-notice,
.site-footer-copyright { min-height: 14px; margin: 25px 0 0; line-height: 14px; }
.site-footer-bottom { display: flex; height: 40px; align-items: center; justify-content: space-between; gap: 24px; margin-top: 50px; }
.site-footer-logo { width: 112px; height: 40px; }
.play-store-link { display: grid; width: 40px; height: 40px; place-items: center; padding: 0; }
.play-store-link img { width: 20px; height: 20px; }
@media (min-width: 761px) {
  .site-footer.home-site-footer { width: 100%; height: auto; min-height: 321px; margin-top: 80px; padding: 50px max(calc(var(--dashboard-edge) + 35px),calc((100% - var(--dashboard-content-max))/2 + var(--dashboard-edge))) 50px; border-top: 0; background: #191919; box-sizing: border-box; }
}
@media (max-width: 760px) {
  .site-footer.home-site-footer { height: auto; min-height: 321px; margin-top: 48px; padding: 36px 18px calc(36px + var(--ds-safe-bottom)); }
}
.official-profile-shell > .site-footer { height: 321px; margin-top: 124px; padding: 50px 36px 0; border-top: 0; }
.collection-modal { width: min(540px,calc(100vw - 32px)); max-height: min(750px,calc(100vh - 32px)); overflow-y: auto; padding: 28px 24px; border: 1px solid #303136; border-radius: 18px; background: #1b1c1f; box-shadow: 0 22px 70px rgba(0,0,0,.65); }
.collection-modal header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.collection-modal h2 { margin: 0 0 6px; font-size: 21px; }
.collection-modal header p { margin: 0; color: #85878c; }
.collection-modal header > button { border: 0; background: transparent; color: #aaa; font-size: 26px; cursor: pointer; }
.collection-modal-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.collection-modal-grid .gallery-item { height: 210px; }
.unlock-condition { padding: 20px; border: 1px solid #313238; border-radius: 12px; background: #17181b; }
.unlock-condition span,
.unlock-condition strong { display: block; }
.unlock-condition span { color: #ff7338; font-size: 11px; }
.unlock-condition strong { margin-top: 8px; }
.unlock-condition p { margin: 12px 0 0; color: #8d8f94; line-height: 1.6; }
.episode-option-list { display: grid; gap: 9px; }
.episode-option-list button { display: grid; grid-template-columns: 52px minmax(0,1fr) 50px; align-items: center; gap: 12px; min-height: 62px; padding: 10px 14px; border: 1px solid #303136; border-radius: 10px; background: #17181b; color: #dfe0e2; text-align: left; cursor: pointer; }
.episode-option-list button.active { border-color: #ff6525; background: #24150f; }
.episode-option-list span,
.episode-option-list b { color: #ff7e46; font-size: 11px; }
.creator-profile-modal,
.profile-character-modal { display: flex; align-items: center; gap: 15px; padding: 16px; border: 1px solid #303136; border-radius: 12px; background: #17181b; }
.creator-profile-modal img,
.profile-character-modal img { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; }
.creator-profile-modal p,
.profile-character-modal p { margin: 7px 0; color: #9a9ca1; }

.chat-character-info-backdrop { align-items: stretch; justify-content: center; padding: 0; background: rgba(0,0,0,.78); }
.chat-character-info-dialog { position: relative; display: grid; width: min(520px,100vw); height: 100vh; height: 100dvh; grid-template-rows: minmax(0,1fr); overflow: hidden; background: #171719; color: #f5f5f6; box-shadow: 0 0 60px rgba(0,0,0,.5); }
.chat-character-info-dialog > header { position: absolute; z-index: 3; top: 0; right: 0; left: 0; display: flex; height: 58px; align-items: center; justify-content: space-between; padding: 0 14px 0 18px; background: linear-gradient(180deg,rgba(0,0,0,.72),transparent); }
.chat-character-info-dialog > header strong { font-size: 14px; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.chat-character-info-dialog > header button { width: 36px; height: 36px; padding: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(8,8,10,.48); color: #fff; font-size: 25px; backdrop-filter: blur(8px); }
.chat-character-info-scroll { overflow-y: auto; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.chat-character-info-hero { height: min(54vh,520px); overflow: hidden; background: #0b0b0c; }
.chat-character-info-cover { display: block; width: 100%; height: 100%; object-fit: cover; }
.chat-character-info-copy { padding: 22px 20px 18px; }
.chat-character-info-copy h2 { margin: 0; font-size: 26px; }
.chat-character-info-copy > p { margin: 11px 0 0; color: #b0b0b5; line-height: 1.6; }
.chat-character-info-stats { display: flex; gap: 14px; margin-top: 15px; color: #d1d1d5; font-size: 12px; }
.chat-character-info-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chat-character-info-tags span { padding: 5px 8px; border-radius: 999px; background: rgba(255,91,24,.16); color: #ff975f; font-size: 11px; }
.chat-character-info-gallery { padding: 18px 20px 24px; border-top: 1px solid #303036; }
.chat-character-info-gallery > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.chat-character-info-gallery > header button { min-height: 32px; padding: 0 12px; border: 1px solid #8e3b17; border-radius: 999px; background: #27130b; color: #ff8a43; }
.chat-character-info-gallery > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.chat-character-info-gallery > div > button { position: relative; aspect-ratio: 2/3; overflow: hidden; padding: 0; border: 0; border-radius: 7px; background: #0e0e10; }
.chat-character-info-gallery img { width: 100%; height: 100%; object-fit: cover; }
.chat-character-info-gallery span { position: absolute; right: 5px; bottom: 5px; left: 5px; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.7); color: #ddd; font-size: 9px; }
.creator-profile-modal span { color: #777a80; font-size: 11px; }
.coupon-warnings { color: #8a8c91; font-size: 12px; line-height: 1.5; }
.profile-photo-editor { display: grid; justify-items: center; gap: 9px; margin-bottom: 5px; }
.profile-photo-editor img,
.profile-photo-placeholder { width: 82px; height: 82px; border: 2px solid #ff641f; border-radius: 50%; background: #020305; object-fit: cover; }
.profile-photo-editor button { border: 0; background: transparent; color: #ff7540; cursor: pointer; }
.profile-history-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 15px; border-bottom: 1px solid #303136; }
.profile-history-tabs button { height: 43px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #86888d; cursor: pointer; }
.profile-history-tabs button.active { border-bottom-color: #ff6428; color: #fff; }
.wallet-hold-list { display: grid; gap: 10px; }
.wallet-hold-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid #2e3035; border-radius: 12px; background: #17181b; }
.wallet-hold-item > div { display: grid; min-width: 0; gap: 5px; }
.wallet-hold-item strong { overflow: hidden; color: #f0f1f2; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.wallet-hold-item small,
.wallet-hold-item p { margin: 0; color: #898d94; font-size: 11px; }
.wallet-hold-state { width: fit-content; padding: 3px 7px; border: 1px solid #4a4d54; border-radius: 999px; color: #aeb1b7; font-size: 10px; font-weight: 800; }
.wallet-hold-item.pending { border-color: rgba(255, 99, 35, .48); background: rgba(255, 92, 32, .07); }
.wallet-hold-item.pending .wallet-hold-state { border-color: rgba(255, 99, 35, .55); color: #ff8756; }
.wallet-hold-item.committed .wallet-hold-state { border-color: rgba(52, 180, 112, .5); color: #72d5a2; }

@media (max-width: 560px) {
  .wallet-hold-item { grid-template-columns: 1fr; }
  .wallet-hold-item strong { white-space: normal; }
}

.official-profile-page { min-height: 100vh; padding: 100px 0 0; background: #0f0f0f; }
.official-profile-shell { width: min(1185px,calc(100% - 24px)); margin: 0 auto; }
.mypage-header { display: flex; height: 24px; align-items: center; gap: 12px; margin-bottom: 20px; }
.mypage-header button { display: grid; width: 24px; height: 24px; place-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.mypage-header img { width: 20px; height: 20px; }
.mypage-header h1 { margin: 0; font-size: 22px; line-height: 24px; }
.mypage-card { border: 1px solid #262626; border-radius: 14px; background: #161719; }
.mypage-glow { border: 2px solid rgba(255,107,53,.35); background: linear-gradient(115deg,rgba(82,31,16,.48),#1a1110 44%,#181517); box-shadow: inset 0 0 32px rgba(255,78,21,.08); }
.mypage-profile-card { display: grid; min-height: 140px; grid-template-columns: 68px minmax(0,1fr) auto; align-items: center; gap: 20px; margin-bottom: 16px; padding: 20px 24px; }
.mypage-avatar { width: 68px; height: 68px; border: 2px solid #ff6a1a; border-radius: 50%; background: #020305; }
.mypage-identity h2 { margin: 0 0 4px; font-size: 21px; line-height: 26px; }
.mypage-identity p { margin: 0; color: #87888c; font-size: 14px; }
.mypage-member-uuid { display: flex; max-width: min(100%, 520px); align-items: baseline; gap: 8px; margin-top: 7px !important; color: #a8abb1 !important; font-size: 11px !important; line-height: 1.45; }
.mypage-member-uuid > span { flex: 0 0 auto; color: #73767c; font-weight: 700; }
.mypage-member-uuid code { min-width: 0; overflow-wrap: anywhere; color: #d9dbdf; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: inherit; }
.mypage-member-uuid.pending em { color: #777980; font-style: normal; }
.mypage-verification { display: inline-flex; height: 24px; align-items: center; margin-top: 9px; padding: 0 10px; border: 1px solid #45474c; border-radius: 999px; background: #24262a; color: #aaaeb3; font-size: 11px; font-weight: 700; }
.mypage-verification.verified { border-color: rgba(255,102,51,.45); background: rgba(255,91,35,.12); color: #ff7742; }
.mypage-profile-actions { display: grid; justify-items: end; gap: 5px; }
.mypage-profile-actions button { height: 30px; padding: 0 9px; border: 1px solid #4a4b4f; border-radius: 7px; background: #17181b; color: #e8e8e9; font-size: 12px; cursor: pointer; }
.mypage-profile-actions button:last-child { border-color: transparent; background: transparent; color: #8b8c90; }
.mypage-profile-actions button:disabled { cursor: not-allowed; opacity: .45; }
.mypage-profile-actions span { margin-right: 4px; }
.mypage-resource-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.mypage-pling-card { height: 128px; padding: 19px 24px; }
.mypage-pling-card header,
.mypage-small-resource header { display: flex; align-items: center; justify-content: space-between; }
.mypage-pling-card h2,
.mypage-small-resource h2 { display: flex; align-items: center; gap: 7px; margin: 0; color: #e8e8e9; font-size: 15px; }
.mypage-pling-card header button,
.mypage-small-resource header > button { height: 25px; padding: 0 9px; border: 1px solid #44464b; border-radius: 6px; background: transparent; color: #9a9b9f; font-size: 11px; cursor: pointer; }
.mypage-pling-body,
.mypage-small-resource > div { display: flex; align-items: center; justify-content: space-between; margin-top: 21px; }
.mypage-currency-parts { display: flex; align-items: center; gap: 22px; }
.mypage-currency-parts > span,
.mypage-bonus-part { display: flex; align-items: center; gap: 7px; }
.mypage-currency-parts img { width: 25px; height: 25px; }
.mypage-currency-parts b { font-size: 25px; line-height: 30px; }
.mypage-currency-parts > i { width: 1px; height: 24px; background: #3a3b3f; }
.mypage-bonus-part { position: relative; padding: 0; border: 0; background: transparent; color: #f2d19f; cursor: help; }
.mypage-bonus-tooltip { position: absolute; z-index: 7; top: 38px; left: -40px; display: none; width: 375px; padding: 14px 16px; border: 1px solid #ff6a37; border-radius: 10px; background: #f7f4f2; color: #3d332e; font-size: 12px; font-weight: 500; line-height: 21px; text-align: left; box-shadow: 0 10px 35px rgba(0,0,0,.45); }
.mypage-bonus-tooltip::before { position: absolute; top: -7px; left: 68px; width: 12px; height: 12px; border-top: 1px solid #ff6a37; border-left: 1px solid #ff6a37; background: #f7f4f2; content: ""; transform: rotate(45deg); }
.mypage-bonus-part:hover .mypage-bonus-tooltip,
.mypage-bonus-part:focus-visible .mypage-bonus-tooltip { display: block; }
.mypage-outline-action { height: 34px; padding: 0 15px; border: 1px solid #ff5f27; border-radius: 999px; background: transparent; color: #ff6d36; font-size: 12px; font-weight: 700; cursor: pointer; }
.mypage-resource-right { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mypage-small-resource { height: 128px; padding: 19px 22px; }
.mypage-small-resource h2 img { width: 20px; height: 20px; }
.mypage-small-resource strong { font-size: 25px; }
.mypage-small-resource strong small { margin-left: 6px; color: #a3a4a8; font-size: 13px; font-weight: 600; }
.mypage-status-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.mypage-persona-card { display: flex; height: 140px; align-items: center; justify-content: space-between; padding: 20px 28px; }
.mypage-persona-card h2 { display: flex; align-items: center; gap: 9px; margin: 0; color: #d9dadc; font-size: 15px; }
.mypage-persona-card h2 img { width: 20px; height: 20px; }
.mypage-persona-card strong { display: block; margin-top: 19px; color: #ff5b28; font-size: 15px; }
.mypage-persona-card > button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #34363b; border-radius: 50%; background: #202125; color: #8f9094; cursor: pointer; }
.mypage-stats-card { display: grid; height: 140px; grid-template-columns: repeat(3,1fr); padding: 25px 20px; }
.mypage-stats-card > div { display: grid; place-items: center; align-content: center; gap: 8px; }
.mypage-stats-card strong { color: #ff5d27; font-size: 31px; line-height: 32px; }
.mypage-stats-card span { display: flex; align-items: center; gap: 6px; color: #7e8085; font-size: 12px; }
.mypage-stats-card img { width: 16px; height: 16px; opacity: .85; }
.mypage-settings-row { display: grid; grid-template-columns: 1fr 1fr .86fr; gap: 16px; margin-bottom: 32px; }
.mypage-locale-card { display: grid; min-height: 80px; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 12px; margin: -16px 0 32px; padding: 0 28px; }
.mypage-locale-card > span b, .mypage-locale-card > span small { display: block; }
.mypage-locale-card > span small { overflow: hidden; margin-top: 4px; color: #74767b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mypage-locale-icon { color: #ff6a1a; font-size: 18px; }
.mypage-setting-card { display: grid; height: 80px; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 0 28px; }
.mypage-setting-card > img { width: 20px; height: 20px; }
.mypage-setting-card span b,
.mypage-setting-card span small { display: block; }
.mypage-setting-card span b { font-size: 15px; }
.mypage-setting-card span small { overflow: hidden; margin-top: 4px; color: #74767b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mypage-switch { position: relative; width: 46px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: #3b3d42; cursor: pointer; }
.mypage-switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #f1f1f2; transition: 160ms ease; }
.mypage-switch.active { background: #ff5d25; }
.mypage-switch.active i { transform: translateX(20px); }
.mypage-primary-action { height: 34px; padding: 0 18px; border: 0; border-radius: 999px; background: #ff5b29; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.mypage-referral-card { height: 80px; overflow: hidden; padding: 0; border: 1px solid #262626; border-radius: 12px; background: #161719; cursor: pointer; }
.mypage-referral-card img { width: 100%; height: 100%; object-fit: cover; }
.mypage-frequent-section { min-height: 185px; margin-bottom: 32px; }
.mypage-frequent-section > header,
.mypage-created-section > header { display: flex; align-items: center; justify-content: space-between; }
.mypage-frequent-section > header { height: 18px; }
.mypage-frequent-section h2 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; }
.mypage-frequent-section h2 img { width: 18px; height: 18px; }
.mypage-frequent-section header > div { display: none; gap: 6px; }
.mypage-frequent-section header > div button { width: 28px; height: 28px; border: 1px solid #303136; border-radius: 50%; background: #17181b; color: #66686c; cursor: pointer; }
.mypage-frequent-section header > div button:disabled { visibility: hidden; }
.mypage-frequent-list { display: flex; gap: 16px; margin-top: 18px; }
.mypage-frequent-list > button { width: 120px; min-width: 120px; padding: 0; border: 0; background: transparent; color: #e7e7e8; text-align: left; cursor: pointer; }
.mypage-frequent-list img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.mypage-frequent-list strong { display: block; overflow: hidden; margin-top: 10px; font-size: 12px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.mypage-frequent-list > button.is-suspended { cursor: not-allowed; }
.mypage-suspended-visual { display: grid; place-items: center; overflow: hidden; border: 1px solid #34363b; background: linear-gradient(145deg,#211712,#111216); color: #ff8b5b; text-align: center; }
.mypage-suspended-visual span { max-width: 80%; font-size: 12px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.mypage-suspended-visual.frequent { width: 120px; height: 120px; border-radius: 50%; }
.mypage-suspended-status { display: block; width: fit-content; margin-top: 6px; color: #ff7442; font-size: 11px; font-weight: 800; line-height: 1.3; }
.mypage-frequent-list .mypage-suspended-status { margin-right: auto; margin-left: auto; }
.mypage-created-section { position: relative; min-height: 189px; margin-bottom: 40px; }
.mypage-created-section > header { height: 34px; border-bottom: 1px solid #252629; }
.mypage-created-section h2 { align-self: stretch; margin: 0; border-bottom: 2px solid #ff5c27; font-size: 19px; line-height: 32px; }
.mypage-created-actions { display: flex; align-items: center; gap: 8px; }
.creator-studio-entry { display: inline-flex; height: 34px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid rgba(255, 98, 40, .72); border-radius: 7px; background: rgba(255, 91, 35, .1); color: #ff8052; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer; transition: border-color 140ms ease, background 140ms ease, color 140ms ease; }
.creator-studio-entry:hover,
.creator-studio-entry:focus-visible { border-color: #ff6a30; background: rgba(255, 91, 35, .2); color: #ffd9c8; }
.mypage-sort { position: relative; align-self: flex-start; }
.mypage-sort > button { display: flex; width: 112px; height: 34px; align-items: center; justify-content: space-between; padding: 0 12px; border: 1px solid #34353a; border-radius: 7px; background: #151619; color: #c7c8cb; font-size: 12px; cursor: pointer; }
.mypage-sort-menu { position: absolute; z-index: 8; top: 38px; right: 0; display: grid; width: 112px; overflow: hidden; padding: 4px; border: 1px solid #34353a; border-radius: 8px; background: #191a1d; box-shadow: 0 14px 35px rgba(0,0,0,.45); }
.mypage-sort-menu button { height: 32px; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; color: #aaa; font-size: 12px; text-align: left; cursor: pointer; }
.mypage-sort-menu button:hover,
.mypage-sort-menu button.active { background: #27282c; color: #fff; }
.mypage-created-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding-top: 16px; }
.mypage-created-card { display: grid; min-width: 0; grid-template-columns: 72px minmax(0,1fr); gap: 10px 14px; padding: 12px; border: 1px solid #2b2c31; border-radius: 12px; background: #16171a; }
.mypage-created-card > img,
.mypage-created-thumb-fallback { grid-row: 1 / span 3; width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }
.mypage-created-thumb-fallback { display: grid; place-items: center; background: linear-gradient(145deg,#33231e,#17181d); color: #ff9b68; font-size: 26px; font-weight: 900; }
.mypage-suspended-visual.created { width: 72px; height: 72px; grid-row: 1 / span 3; border-radius: 10px; }
.mypage-created-card.is-suspended { border-color: #3a2a24; }
.mypage-created-card.is-hidden { border-color: #303238; background: #141518; }
.mypage-created-copy { min-width: 0; align-self: center; }
.mypage-created-title { display: flex; min-width: 0; align-items: center; gap: 7px; }
.mypage-created-title strong { min-width: 0; }
.mypage-created-copy strong,
.mypage-created-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mypage-created-copy strong { color: #f3f3f4; font-size: 14px; }
.mypage-created-copy small { margin-top: 6px; color: #7f8187; font-size: 11px; }
.mypage-created-status,
.mypage-created-title .mypage-suspended-status { display: inline-flex; min-height: 20px; flex: 0 0 auto; align-items: center; margin: 0; padding: 0 7px; border: 1px solid #3c4048; border-radius: 999px; color: #b9bdc7; font-size: 10px; font-weight: 800; line-height: 1; }
.mypage-created-status.published { border-color: rgba(73, 177, 104, .46); background: rgba(73, 177, 104, .1); color: #8fd7a5; }
.mypage-created-status.archived { background: #1d1f24; color: #a5a8b0; }
.mypage-created-title .mypage-suspended-status { border-color: rgba(255, 116, 66, .45); background: rgba(255, 116, 66, .08); color: #ff8a60; }
.mypage-created-card-actions { display: flex; align-items: end; gap: 7px; }
.mypage-created-card-actions button { min-height: 30px; flex: 1; padding: 0 9px; border: 1px solid #393a40; border-radius: 7px; background: #202126; color: #d8d8da; font-size: 11px; font-weight: 700; cursor: pointer; }
.mypage-created-card-actions button:last-child { border-color: rgba(255,98,40,.55); background: rgba(255,91,35,.12); color: #ff956c; }
.mypage-created-card-actions.management { align-items: stretch; }
.mypage-created-card-actions.management button { min-width: 0; padding-right: 6px; padding-left: 6px; }
.mypage-created-card-actions.management button.danger { border-color: rgba(224, 77, 77, .48); background: rgba(224, 77, 77, .08); color: #f09a9a; }
.mypage-created-card-actions button:hover,
.mypage-created-card-actions button:focus-visible { border-color: #ff6a30; color: #fff; }
.mypage-created-card-actions button:disabled { border-color: #34353a; background: #1b1c20; color: #676970; cursor: not-allowed; }
.mypage-created-empty { display: grid; height: 141px; place-items: center; color: #77797e; font-size: 13px; }
.mypage-created-empty p { margin: 0; }
.profile-created-archive-summary { display: grid; gap: 10px; padding: 16px; border: 1px solid #34363c; border-radius: 10px; background: #17181c; }
.profile-created-archive-summary strong { color: #f1f1f3; font-size: 14px; line-height: 1.45; }
.profile-created-archive-summary p { margin: 0; color: #92959d; font-size: 12px; line-height: 1.6; }
.mypage-withdraw-row { display: flex; height: 21px; justify-content: flex-end; margin: 8px 0 24px; }
.mypage-withdraw-row button { border: 0; background: transparent; color: #77797e; font-size: 12px; text-decoration: underline; cursor: pointer; }

.settlement-page { min-height: 100vh; padding: 100px 0 0; background: #0f0f0f; }
.settlement-shell { width: min(820px,calc(100% - 48px)); margin: 0 auto; }
.settlement-header { display: flex; align-items: center; gap: 10px; }
.settlement-header button { width: 28px; height: 28px; padding: 4px; border: 0; background: transparent; cursor: pointer; }
.settlement-header h1 { margin: 0; font-size: 23px; }
.settlement-tabs { display: flex; gap: 8px; margin-top: 28px; border-bottom: 1px solid #28292d; }
.settlement-tabs button { min-width: 105px; height: 46px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #7f8186; cursor: pointer; }
.settlement-tabs button.active { border-bottom-color: #ff5e25; color: #fff; }
.settlement-empty { display: grid; min-height: 450px; place-items: center; align-content: center; gap: 18px; color: #77797e; }
.settlement-empty .settlement-creator-entry { height: 38px; padding: 0 18px; border: 0; border-radius: 8px; background: #ff5d27; color: #fff; }
.settlement-empty .settlement-creator-entry:hover,
.settlement-empty .settlement-creator-entry:focus-visible { background: #ff794a; color: #fff; }

.inquiry-page,
.policy-page { min-height: 100vh; padding: 82px 0 0; background: #0b0c0d; }
.inquiry-shell,
.policy-shell { width: min(820px,calc(100% - 48px)); margin: 0 auto; }
.inquiry-shell { min-height: calc(100vh - 82px); }
.inquiry-tabs { display: flex; gap: 5px; margin-bottom: 24px; border-bottom: 1px solid #292a2e; }
.inquiry-tabs button { min-width: 112px; height: 48px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #85878c; font-weight: 700; cursor: pointer; }
.inquiry-tabs button.active { border-bottom-color: #ff5e25; color: #fff; }
.inquiry-content { height: clamp(454px,calc(100dvh - 352px),560px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.notice-board { display: grid; border-top: 1px solid #33343a; }
.notice-board > button { display: flex; min-height: 68px; align-items: center; justify-content: space-between; padding: 0 17px; border: 0; border-bottom: 1px solid #292a2e; background: transparent; color: #ddd; text-align: left; cursor: pointer; }
.notice-board strong,
.notice-board small { display: block; }
.notice-board small { margin-top: 7px; color: #77797e; }
.faq-categories,
.my-inquiry-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.faq-categories button,
.my-inquiry-filters button { min-height: 36px; padding: 0 14px; border: 1px solid #303136; border-radius: 999px; background: #17181b; color: #85878c; cursor: pointer; }
.faq-categories button.active,
.my-inquiry-filters button.active { border-color: #ff6327; color: #fff; }
.faq-list { border-top: 1px solid #313238; }
.faq-list article { border-bottom: 1px solid #292a2e; }
.faq-list article > button { display: flex; width: 100%; min-height: 67px; align-items: center; justify-content: space-between; padding: 12px 15px; border: 0; background: transparent; color: #ddd; text-align: left; cursor: pointer; }
.faq-list small,
.faq-list strong { display: block; }
.faq-list small { margin-bottom: 5px; color: #ff7841; }
.faq-list article > p { margin: 0; padding: 18px 20px; background: #151619; color: #aaa; line-height: 1.65; }
.faq-pagination { display: flex; justify-content: center; gap: 5px; margin: 22px 0; }
.faq-pagination button { min-width: 34px; height: 34px; border: 1px solid #303136; border-radius: 7px; background: #17181b; color: #888; cursor: pointer; }
.faq-pagination button.active { border-color: #ff6327; color: #fff; }
.support-contact { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding: 19px; border: 1px solid #2e2f33; border-radius: 11px; background: #17181b; }
.support-contact span { color: #85878c; font-size: 11px; }
.inquiry-compose-button { margin-left: auto; border-color: #ff6327 !important; border-radius: 7px !important; background: #ff6327 !important; color: #fff !important; }
.inquiry-empty { display: grid; min-height: 370px; place-items: center; align-content: center; color: #74767b; text-align: center; }
.inquiry-empty span { display: grid; width: 62px; height: 62px; place-items: center; margin-bottom: 14px; border-radius: 50%; background: #1b1c20; font-size: 23px; }
.inquiry-empty p { margin: 7px 0; }
.policy-shell > article { margin-bottom: 60px; padding: 35px; border: 1px solid #2e2f34; border-radius: 14px; background: #17181b; }
.policy-shell article h2 { margin: 32px 0 11px; }
.policy-shell article p { color: #a4a6ab; line-height: 1.85; }
.policy-shell article > button { height: 43px; margin-top: 24px; padding: 0 21px; border: 0; border-radius: 8px; background: #ff5d23; color: #fff; cursor: pointer; }
.policy-updated { color: #77797e !important; font-size: 12px; }

@media (max-width: 1000px) {
  .official-feed-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .official-ranking-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .official-event-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .official-library-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .official-feed-shell,
  .official-standard-shell,
  .official-event-detail-shell { width: 100%; padding: 78px 12px 90px; }
  .official-ranking-page { padding-bottom: 0; }
  .official-ranking-shell { width: 100%; padding: 60px 16px 0; }
  .official-ranking-page .official-page-title { display: none; }
  .official-page-title { height: 32px; font-size: 22px; line-height: 32px; }
  .official-feed-tabs { gap: 18px; overflow-x: auto; margin-right: -12px; margin-left: 0; }
  .official-feed-tab { font-size: 15px; }
  .official-feed-grid,
  .official-library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px; }
  .official-feed-card { height: 280px; border-radius: 8px; }
  .official-card-overlay { right: 11px; bottom: 11px; left: 11px; }
  .official-card-overlay > strong { font-size: 14px; }
  .official-card-desc { font-size: 11px; line-height: 15px; -webkit-line-clamp: 1; }
  .official-card-tags { gap: 4px; font-size: 10px; }
  .official-card-stats { margin-top: 7px; }
  .official-live-badge { top: 8px; right: 8px; height: 23px; padding: 0 7px; font-size: 10px; }
  .official-ranking-banner { width: 100%; height: auto; aspect-ratio: 3.75/1; margin-top: 0; border-radius: 12px; }
  .official-ranking-tabs { height: 79px; align-items: flex-start; gap: 10px; overflow-x: auto; margin-top: 0; padding-top: 24px; scrollbar-width: none; }
  .official-ranking-tabs::-webkit-scrollbar { display: none; }
  .official-ranking-tab { height: 35px; flex: 0 0 auto; padding: 0 16px; font-size: 14px; }
  .official-ranking-tab:focus-visible { outline: none; }
  .official-ranking-grid { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 14px; row-gap: 14px; margin-top: 0; }
  .official-ranking-card { height: auto; aspect-ratio: 3/4; border-radius: 10px; }
  .official-ranking-overlay { right: 10px; bottom: 12px; left: 10px; gap: 7px; }
  .official-ranking-overlay > b { font-size: 38px; line-height: 38px; }
  .official-ranking-overlay strong { font-size: 14px; }
  .official-ranking-overlay em { margin-top: 3px; font-size: 11px; }
  .official-ranking-page .site-footer { position: relative; left: -16px; width: calc(100% + 32px); min-height: 366px; margin-top: 80px; padding: 32px 16px 38px; }
  .official-event-grid { grid-template-columns: 1fr; gap: 12px; }
  .official-event-card { height: auto; aspect-ratio: 2.22/1; }
  .official-empty-state { min-height: 430px; }
  .conversation-card { min-height: 0; grid-template-columns: 56px minmax(0,1fr); padding: 18px; }
  .conversation-avatar { width: 56px; height: 56px; }
  .conversation-more { top: 12px; right: 10px; }
  .conversation-actions { width: auto; grid-column: 1/-1; grid-template-columns: 1fr 1fr; padding-top: 2px; }
  .conversation-actions button { width: auto; min-height: 44px; }
  .event-detail-meta { grid-template-columns: 1fr; }
  .attendance-hero { grid-template-columns: 1fr; }
  .attendance-calendar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .attendance-action { align-items: stretch; flex-direction: column; gap: 14px; }
  .auth-official-backdrop { align-items: flex-end; padding: 0; }
  .auth-official-modal { width: 100%; max-height: 94vh; padding: 24px 20px 28px; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 22px 22px 0 0; }
  .official-detail-page { padding-top: 74px; }
  .official-detail-page .content-wrap,
  .official-profile-shell,
  .inquiry-shell,
  .policy-shell { width: calc(100% - 24px); }
  .detail-hero { grid-template-columns: 1fr; gap: 22px; padding-bottom: 45px; }
  .detail-cover { height: auto; aspect-ratio: 1/1; }
  .detail-title-line h1 { font-size: 34px; }
  .gallery-head { align-items: flex-start; flex-direction: column; gap: 15px; }
  .progress-label { width: 100%; }
  .gallery-horizontal-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
  .gallery-start-card,
  .gallery-item { width: 142px; min-width: 142px; height: 218px; scroll-snap-align: start; }
  .gallery-nav { display: none; }
  .profile-card { grid-template-columns: 1fr; gap: 23px; }
  .detail-sticky-action { grid-template-columns: minmax(0,1fr) 42px 42px; bottom: 72px; }
  .detail-sticky-action .episode-trigger { grid-column: 1/3; }
  .detail-sticky-action .detail-chat-button { grid-column: 3; grid-row: 2; }
  .official-profile-page { padding-top: 78px; }
  .mypage-profile-card { height: auto; min-height: 140px; grid-template-columns: 58px minmax(0,1fr); gap: 14px; padding: 18px; }
  .mypage-avatar { width: 58px; height: 58px; }
  .mypage-identity { min-width: 0; }
  .mypage-identity h2,
  .mypage-identity > p { overflow-wrap: anywhere; }
  .mypage-profile-actions { grid-column: 1/-1; grid-template-columns: 1fr; }
  .mypage-profile-actions button { width: 100%; }
  .mypage-resource-row,
  .mypage-status-row { grid-template-columns: 1fr; }
  .mypage-resource-row { gap: 12px; }
  .mypage-pling-card { height: auto; }
  .mypage-pling-body { align-items: stretch; flex-direction: column; gap: 14px; margin-top: 16px; }
  .mypage-pling-body > .mypage-outline-action { width: 100%; }
  .mypage-currency-parts { justify-content: space-between; gap: 10px; }
  .mypage-currency-parts b { font-size: clamp(20px,6vw,25px); white-space: nowrap; }
  .mypage-settings-row { grid-template-columns: 1fr; }
  .mypage-locale-card { min-height: 74px; margin: -16px 0 24px; padding: 0 20px; }
  .mypage-setting-card,
  .mypage-referral-card { height: 74px; }
  .mypage-resource-right { grid-template-columns: 1fr; gap: 12px; }
  .mypage-small-resource { height: auto; min-height: 104px; }
  .mypage-frequent-list { overflow-x: auto; padding-bottom: 5px; }
  .mypage-frequent-list > button { width: 104px; min-width: 104px; }
  .mypage-frequent-list img,
  .mypage-suspended-visual.frequent { width: 104px; height: 104px; }
  .mypage-created-actions { gap: 6px; }
  .mypage-created-actions .creator-studio-entry { padding: 0 9px; font-size: 11px; }
  .mypage-created-grid { grid-template-columns: 1fr; }
  .mypage-created-card { grid-template-columns: 64px minmax(0,1fr); }
  .mypage-created-card > img,
  .mypage-created-thumb-fallback { grid-row: 1; width: 64px; height: 64px; }
  .mypage-suspended-visual.created { width: 64px; height: 64px; grid-row: 1; }
  .mypage-created-card-actions { grid-column: 1 / -1; }
  .mypage-created-card-actions button { min-width: 0; overflow-wrap: anywhere; }
  .settlement-shell { width: calc(100% - 24px); }
  .support-contact { align-items: flex-start; flex-direction: column; gap: 8px; }
  .site-footer-bottom { align-items: center; flex-direction: row; }
}

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

/* /content 상세: 공식 1280px 데스크톱 실측 기준 */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; margin: -1px !important; padding: 0 !important; border: 0 !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; }
.official-detail-page { position: relative; min-height: 100vh; overflow-x: clip; overflow-y: visible; padding: 90px 0 0; background: #090a0b; }
.official-detail-page .detail-background { position: absolute; z-index: 0; top: 0; left: 13px; width: calc(100% - 13px); height: 340px; overflow: hidden; pointer-events: none; }
.official-detail-page .detail-background > img,
.official-detail-page .detail-background > video { display: block; width: 100%; height: 100%; object-fit: cover; filter: blur(36px) brightness(.58); opacity: .58; transform: scale(1.13); }
.official-detail-page .detail-background > span { position: absolute; inset: 0; background: linear-gradient(180deg,rgba(9,10,11,.24) 0%,rgba(9,10,11,.38) 48%,#090a0b 100%); }
.official-detail-page .content-wrap { position: relative; z-index: 1; width: calc(100% - 13px); margin: 0 0 0 13px; }
body:has(.official-detail-page) .topbar:not(.header-solid) { background: transparent; backdrop-filter: none; }
.official-detail-page .detail-hero { display: grid; height: 474px; grid-template-columns: 450px minmax(0,1fr); gap: 40px; align-items: start; padding: 0; }
.official-detail-page .detail-cover { position: relative; width: 450px; height: 450px; overflow: hidden; border-radius: 20px; background: #111; box-shadow: none; }
.official-detail-page .detail-cover img,
.official-detail-page .detail-cover video { display: block; width: 100%; height: 100%; object-fit: cover; }
.official-detail-page .detail-copy { width: 100%; height: 474px; padding-top: 20px; }
.official-detail-page .detail-title-line { display: flex; height: 48px; align-items: center; justify-content: flex-start; gap: 16px; }
.official-detail-page .detail-title-line h1 { margin: 0; font-size: 43px; font-weight: 800; line-height: 48px; letter-spacing: -.045em; }
.official-detail-page .detail-title-actions { display: flex; align-items: center; gap: 8px; }
.official-detail-page .favorite-button,
.official-detail-page .detail-menu-button { display: grid; width: 48px; height: 48px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #242426; cursor: pointer; }
.official-detail-page .detail-menu-button { width: 46px; height: 46px; }
.official-detail-page .favorite-button img { width: 26px; height: 26px; }
.official-detail-page .detail-menu-button img { width: 20px; height: 20px; }
.official-detail-page .creator-row { display: flex; height: 32px; align-items: center; gap: 20px; margin-top: 14px; }
.official-detail-page .creator-link { padding: 0; border: 0; background: transparent; color: #8a8a8c; font-size: 16px; cursor: pointer; }
.official-detail-page .follow-button { width: 76px; height: 32px; padding: 0; border: 0; border-radius: 999px; background: #ff5a25; color: #fff; font-size: 14px; font-weight: 800; cursor: pointer; }
.official-detail-page .detail-subtitle { height: 29px; margin: 19px 0 10px; color: #ededee; font-size: 21px; line-height: 29px; }
.official-detail-page .stat-row { display: flex; height: 22px; align-items: center; gap: 22px; color: #858588; font-size: 16px; }
.official-detail-page .stat-row span { display: inline-flex; align-items: center; gap: 5px; }
.official-detail-page .detail-view-all-gallery { display: inline-flex; height: 22px; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: #a0a0a3; font-size: 15px; cursor: pointer; }
.official-detail-page .detail-view-all-gallery img { width: 18px; height: 18px; opacity: .85; }
.official-detail-page .detail-tags { display: flex; min-height: 61px; flex-wrap: wrap; align-content: flex-start; gap: 8px 12px; margin: 13px 0 0; }
.official-detail-page .detail-tags .tag { height: 22px; padding: 0 8px; border: 0; border-radius: 5px; background: #181818; color: #9c9c9e; font-size: 14px; font-weight: 700; line-height: 22px; }
.detail-start-block { position: relative; margin-top: 18px; }
.detail-start-block > .field-label,
.detail-floating-info > .field-label { display: block; height: 20px; margin-bottom: 20px; color: #e6e6e7; font-size: 17px; font-weight: 800; line-height: 20px; }
.detail-episode-picker { position: relative; z-index: 7; width: 100%; }
.detail-episode-picker .episode-trigger { display: flex; width: 100%; height: 52px; align-items: center; justify-content: space-between; padding: 0 14px; border: 1px solid #313131; border-radius: 10px; background: #121315; color: #fafafa; font-size: 16px; text-align: left; cursor: pointer; }
.detail-episode-picker .episode-trigger-thumb { display: none; width: 34px; height: 34px; overflow: hidden; border-radius: 50%; }
.detail-episode-picker .episode-trigger-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-episode-picker .episode-trigger-title { flex: 1; }
.detail-episode-picker .episode-trigger[aria-expanded="true"] { border-color: #ff4d17; }
.detail-episode-picker .episode-trigger i { color: #777; font-style: normal; }
.detail-episode-list { position: absolute; z-index: 15; top: 60px; left: 0; display: grid; width: 100%; height: 112px; gap: 2px; padding: 4px; border: 1px solid #303030; border-radius: 8px; background: #1d1d1d; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.detail-episode-list > button { display: grid; height: 50px; grid-template-columns: 32px minmax(0,1fr) 20px; align-items: center; gap: 10px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: #eee; font-size: 14px; text-align: left; cursor: pointer; }
.detail-episode-list > button.active { color: #ff4d17; }
.detail-episode-list .episode-avatar { display: block; width: 32px; height: 32px; overflow: hidden; border-radius: 50%; }
.detail-episode-list .episode-avatar img { width: 100%; height: 100%; object-fit: cover; }
.detail-episode-list > button b { color: #ff4d17; font-size: 17px; text-align: right; }
.detail-action-row { display: grid; grid-template-columns: minmax(0,58fr) minmax(0,40fr); gap: 10px; margin-top: 20px; }
.detail-action-row .detail-chat-button,
.detail-action-row .detail-original-button { display: flex; width: 100%; height: 60px; align-items: center; justify-content: center; gap: 9px; margin: 0; border: 0; border-radius: 15px; color: #fff; font-size: 17px; font-weight: 800; cursor: pointer; }
.detail-action-row .detail-chat-button { background: linear-gradient(90deg,#ff6416,#d93900); }
.detail-action-row .detail-chat-button img { width: 20px; height: 20px; }
.detail-action-row .detail-original-button { background: linear-gradient(100deg,#321713,#271111); }
.detail-action-row .detail-original-button span { font-size: 10px; }
.official-detail-page .official-gallery-section { height: 392px; margin: 40px 0 30px; padding-top: 30px; box-sizing: border-box; }
.official-detail-page .gallery-head { display: block; height: 20px; margin: 0 0 20px; }
.official-detail-page .gallery-head h2 { margin: 0; color: #ff6130; font-size: 21px; line-height: 20px; }
.detail-grade-pills { display: flex; min-height: 38px; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.detail-grade-pill { display: inline-flex; height: 30px; align-items: center; gap: 4px; padding: 0 12px; border: 1.5px solid transparent; border-radius: 100px; color: #929294; font-size: 14px; font-weight: 700; white-space: nowrap; overflow-wrap: normal; opacity: .6; cursor: pointer; transition: opacity .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease; }
.detail-grade-pill > * { flex-shrink: 0; white-space: nowrap; overflow-wrap: normal; }
.detail-grade-pill:hover { opacity: .85; }
.detail-grade-pill.active { opacity: 1; transform: translateY(-1px); }
.detail-grade-pill.grade-bronze { width: 131px; justify-content: center; }
.detail-grade-pill.grade-silver { width: 121px; justify-content: center; }
.detail-grade-pill.grade-gold { width: 118px; justify-content: center; }
.detail-grade-pill.grade-platinum { width: 145px; justify-content: center; }
.detail-grade-pill.grade-all { width: 142px; justify-content: center; gap: 6px; padding: 0 10px; }
.detail-grade-pill .gg-pill-icon { width: 16px; height: 16px; }
.detail-grade-pill .gg-pill-name { margin-right: 2px; line-height: 1; }
.detail-grade-pill .gg-pill-count,
.detail-grade-pill .gg-pill-total { font-size: 14px; font-weight: 600; line-height: 1; }
.detail-grade-pill .gg-pill-total { color: #666; }
.detail-grade-pill.grade-bronze { background: #211b18; box-shadow: inset 0 0 8.6px rgba(163,110,72,.3); }
.detail-grade-pill.grade-bronze .gg-pill-name,
.detail-grade-pill.grade-bronze .gg-pill-count { color: #d18351; }
.detail-grade-pill.grade-silver { background: #1a1a1a; box-shadow: inset 0 0 8.6px #484848; }
.detail-grade-pill.grade-silver .gg-pill-name { color: #a5a5a5; }
.detail-grade-pill.grade-silver .gg-pill-count { color: #c5c5c5; }
.detail-grade-pill.grade-gold { background: #111006; box-shadow: inset 0 0 8.6px #453513; }
.detail-grade-pill.grade-gold .gg-pill-name,
.detail-grade-pill.grade-gold .gg-pill-count { color: #f3c150; }
.detail-grade-pill.grade-platinum { background: #160c1b; box-shadow: inset 0 0 8.6px rgba(181,204,248,.4); }
.detail-grade-pill.grade-platinum .gg-pill-name,
.detail-grade-pill.grade-platinum .gg-pill-count { color: #85a2e2; }
.detail-grade-pill.grade-all { background: #160500; box-shadow: inset 0 0 8.6px #4a332c; }
.detail-grade-pill .gg-total-label,
.detail-grade-pill.grade-all .gg-pill-count { color: #d2613e; font-size: 12px; font-weight: 500; line-height: 1; }
.detail-grade-pill.grade-all .gg-pill-count { font-size: 14px; font-weight: 600; }
.detail-grade-pill .gg-total-separator { width: 1px; height: 14px; margin: 0 2px; background: #4a281e; }
.detail-grade-pill .gg-total-percent { background: linear-gradient(180deg,#ff4d17,#f70); background-clip: text; color: transparent; font-size: 14px; font-weight: 700; line-height: 1; }
.detail-grade-pill.grade-bronze.active { border-color: rgba(209,131,81,.7); box-shadow: inset 0 0 8.6px rgba(163,110,72,.3), 0 0 12px rgba(209,131,81,.35); }
.detail-grade-pill.grade-silver.active { border-color: rgba(165,165,165,.7); box-shadow: inset 0 0 8.6px #484848, 0 0 12px rgba(197,197,197,.35); }
.detail-grade-pill.grade-gold.active { border-color: rgba(243,193,80,.7); box-shadow: inset 0 0 8.6px #453513, 0 0 12px rgba(243,193,80,.35); }
.detail-grade-pill.grade-platinum.active { border-color: rgba(133,162,226,.7); box-shadow: inset 0 0 8.6px rgba(181,204,248,.4), 0 0 12px rgba(133,162,226,.35); }
.detail-grade-pill.grade-all.active { border-color: rgba(255,77,23,.6); box-shadow: inset 0 0 8.6px #4a332c, 0 0 12px rgba(255,77,23,.3); }
.official-detail-page .gallery-slider-shell { position: relative; height: 233px; margin-top: 20px; }
.official-detail-page .gallery-horizontal-list { display: flex; height: 233px; gap: 5px; overflow: hidden; }
.official-detail-page .gallery-start-card,
.official-detail-page .gallery-item { position: relative; width: 150px; min-width: 150px; height: 233px; overflow: hidden; padding: 0; border: 1px solid #242424; border-radius: 10px; background: #121315; color: #e8e8ea; cursor: pointer; }
.official-detail-page .gallery-start-card { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 9px; padding: 15px 8px; text-align: center; }
.official-detail-page .gallery-start-card img { width: 96px; height: 77px; object-fit: contain; }
.official-detail-page .gallery-start-card span { font-size: 14px; font-weight: 700; line-height: 20px; }
.official-detail-page .gallery-start-card b { width: 134px; height: 34px; border-radius: 999px; background: #b63a08; color: #fff; font-size: 13px; line-height: 34px; }
.official-detail-page .gallery-item > img { width: 100%; height: 100%; object-fit: cover; }
.official-detail-page .gallery-nav { position: absolute; z-index: 3; top: 50%; display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #202226; color: #fff; font-size: 25px; transform: translateY(-50%); cursor: pointer; }
.official-detail-page .gallery-nav.prev { left: -16px; }
.official-detail-page .gallery-nav.next { right: -16px; }
.official-detail-page .gallery-nav:disabled { visibility: hidden; }
.detail-section-title { height: 20px; color: #d2613e; font-size: 20px; font-weight: 800; line-height: 20px; }
.detail-introduction-section { height: 1948px; padding: 0; }
.detail-introduction-copy { height: 1918px; margin-top: 30px; overflow: hidden; color: #fafafa; font-size: 15px; line-height: 26.25px; }
.detail-introduction-copy > img { display: block; width: 80%; height: auto; margin: 0 auto 52px; }
.detail-introduction-text { display: grid; gap: 0; }
.detail-introduction-text span { display: block; min-height: 26px; }
.detail-personality-section { display: flex; min-height: 0; flex-direction: column; margin-top: 30px; padding-bottom: 30px; border-bottom: 1px solid #252525; }
.detail-personality-card { display: flex; min-height: 0; flex-direction: column; gap: 16px; margin-top: 30px; padding: 22px 22px 24px; border: 1px solid #2a2a2a; border-radius: 14px; background: #161616; }
.studio-detail-section .detail-personality-card,
.studio-saved-description .detail-personality-card { margin-top: 4px; }
.detail-personality-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.detail-personality-tags span { display: block; padding: 5px 12px; border: 1px solid #333; border-radius: 999px; background: #262626; font-size: 13px; font-weight: 600; line-height: 16px; }
.detail-personality-rows { display: grid; gap: 10px; }
.detail-personality-row { display: grid; height: 23px; grid-template-columns: 80px minmax(0,1fr) 48px; align-items: center; gap: 12px; }
.detail-personality-row > span { color: #cfcfcf; font-size: 15px; font-weight: 500; }
.detail-personality-row > i { position: relative; display: block; height: 10px; overflow: hidden; border-radius: 999px; background: #2b2b2b; }
.detail-personality-row > i > b { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg,#ff4b19,#ff8b55); }
.detail-personality-row > strong { color: #aaa; font-size: 13px; text-align: right; }
.detail-prologue-row { position: relative; display: grid; height: 796px; grid-template-columns: minmax(0,1fr) 500px; gap: 30px; margin-top: 30px; }
.detail-prologue-left { min-width: 0; height: 794px; }
.detail-prologue-scroll { position: relative; height: 750px; margin-top: 24px; overflow: hidden; border-radius: 20px; background: #222; }
.detail-prologue-messages { height: 750px; overflow-y: auto; padding: 30px; }
.detail-prologue-messages::-webkit-scrollbar { width: 0; }
.detail-narration { margin: 16px 0; color: #d8d8da; font-size: 15px; font-weight: 800; line-height: 24px; }
.detail-dialogue { display: grid; min-height: 96px; grid-template-columns: 50px minmax(0,1fr); gap: 25px; align-items: start; margin: 10px 0; }
.detail-dialogue > img,
.detail-dialogue > span { display: block; width: 50px; height: 50px; overflow: hidden; border-radius: 50%; object-fit: cover; }
.detail-dialogue > div > strong { display: block; margin: 10px 0 8px; font-size: 15px; line-height: 20px; }
.detail-dialogue p { min-height: 58px; margin: 0; padding: 15px; border-radius: 3px 20px 20px; background: rgba(50,50,50,.6); color: #fafafa; font-size: 16px; font-weight: 600; line-height: 28px; }
.detail-dialogue.grouped { min-height: 58px; }
.detail-dialogue.grouped > span { visibility: hidden; }
.detail-prologue-start { display: flex; width: 100%; height: 55px; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; border: 1px solid #3a1a00; border-radius: 999px; background: #1a0a00; color: #fafafa; font-size: 16px; font-weight: 700; cursor: pointer; }
.detail-prologue-start img { width: 20px; height: 20px; }
.detail-prologue-scroll-hint { position: absolute; right: 0; bottom: 0; left: 0; display: flex; height: 80px; align-items: flex-end; justify-content: center; padding-bottom: 12px; border-radius: 0 0 20px 20px; background: linear-gradient(transparent,#111); color: #fafafa; font-size: 28px; pointer-events: none; }
.detail-floating-info { display: flex; width: 500px; height: 753px; align-self: start; flex-direction: column; gap: 30px; margin-top: 44px; padding: 40px 30px; border: 1px solid #303030; border-radius: 20px; background: #222; }
.detail-floating-info > video { display: block; width: 300px; height: 300px; margin: 0 auto; border-radius: 30px; object-fit: cover; }
.detail-floating-copy { display: flex; height: 94px; flex-direction: column; gap: 20px; }
.detail-floating-title { display: flex; height: 46px; align-items: center; justify-content: flex-start; gap: 8px; }
.detail-floating-title h2 { margin: 0 auto 0 120px; font-size: 32px; line-height: 46px; }
.detail-floating-title button { display: grid; width: 46px; height: 46px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #2b2b2d; cursor: pointer; }
.detail-floating-title button img { width: 24px; height: 24px; }
.detail-floating-copy > p { margin: 0; color: #ddd; font-size: 18px; text-align: center; }
.detail-floating-setting { position: relative; display: flex; height: 100px; flex-direction: column; gap: 20px; margin-top: 7px; }
.detail-floating-setting > .field-label { height: 20px; margin: 0; font-size: 17px; font-weight: 800; }
.detail-floating-info .detail-episode-picker .episode-trigger { height: 60px; }
.detail-floating-info .detail-episode-picker .episode-trigger-thumb { display: block; flex: 0 0 34px; margin-right: 8px; }
.detail-floating-info .detail-episode-list { top: 68px; }
.detail-floating-info .detail-action-row { width: 438px; margin-top: -10px; }
.detail-action-row.compact { grid-template-columns: minmax(0,252px) minmax(0,176px); }
.detail-action-row.compact .detail-chat-button,
.detail-action-row.compact .detail-original-button { border-radius: 15px; }
.official-detail-page .comment-section { position: relative; width: 100%; max-width: none; margin: 50px 0; padding: 0; }
.official-detail-page .comment-heading { display: flex; height: 50px; align-items: flex-start; }
.official-detail-page .comment-heading h2 { margin: 0; font-size: 20px; line-height: 30px; }
.official-detail-page .comment-heading h2 span { margin-left: 6px; color: #777; }
.official-detail-page .comment-form { position: relative; display: block; width: 100%; height: 134px; padding: 28px 28px 18px; border: 2px solid #666; border-radius: 20px; background: #0f0f0f; }
.official-detail-page .comment-form textarea { width: calc(100% - 96px); height: 75px; padding: 0; resize: none; border: 0; outline: 0; background: transparent; color: #eee; font: 500 16px/25.6px inherit; }
.official-detail-page .comment-form > button { position: absolute; right: 20px; bottom: 20px; width: 64px; height: 32px; border: 0; border-radius: 8px; background: #ff5b25; color: #fff; font-weight: 700; cursor: pointer; }
.official-detail-page .comment-form > button:disabled { background: #39393a; color: #666; cursor: default; }
.comment-sort-wrap { position: relative; display: flex; height: 74px; align-items: center; justify-content: flex-end; }
.official-detail-page .comment-sort-button { display: flex; height: 24px; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: #666; font-size: 16px; cursor: pointer; }
.comment-sort-menu { position: absolute; z-index: 6; top: 49px; right: 0; display: grid; width: 100px; overflow: hidden; padding: 5px 1px 4px; border: 1px solid #2a2a2a; border-radius: 8px; background: #1a1a1a; }
.comment-sort-menu button { width: 98px; height: 36px; padding: 0 14px; border: 0; background: transparent; color: #aaa; font-size: 13px; text-align: left; cursor: pointer; }
.comment-sort-menu button.active { background: #252525; color: #fafafa; }
.official-detail-page .comment-list { display: flex; flex-direction: column; padding: 30px; border-radius: 30px; background: #1a1a1a; }
.official-detail-page .comment-item { min-height: 132px; margin: 0 0 30px; padding: 0 0 30px; border: 0; border-bottom: 1px solid #292929; background: transparent; }
.official-detail-page .comment-item.size-medium { min-height: 172px; }
.official-detail-page .comment-item.size-long { min-height: 192px; }
.official-detail-page .comment-item.has-replies.reply-count-2 { height: 414px; }
.official-detail-page .comment-item.has-replies.reply-count-3 { height: 599px; }
.official-detail-page .comment-item.has-replies.reply-count-4 { height: 753px; }
.official-detail-page .comment-item:last-child { margin-bottom: 0; }
.official-detail-page .comment-row { width: 100%; }
.official-detail-page .comment-meta { display: flex; height: 30px; align-items: center; gap: 10px; margin-bottom: 10px; }
.official-detail-page .comment-avatar { display: grid; width: 30px; height: 30px; place-items: center; overflow: hidden; border-radius: 50%; background: #2a2a2a; color: #aaa; font-size: 11px; }
.official-detail-page .comment-avatar.small { width: 26px; height: 26px; }
.official-detail-page .comment-meta strong { font-size: 16px; }
.official-detail-page .comment-meta small { color: #777; font-size: 14px; }
.official-detail-page .comment-row > p { margin: 0 0 20px; color: #fafafa; line-height: 20px; white-space: pre-line; }
.official-detail-page .comment-actions { display: flex; height: 21px; gap: 20px; }
.official-detail-page .comment-actions button { display: flex; height: 21px; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: #aaa; font-size: 14px; cursor: pointer; }
.official-detail-page .comment-actions img { width: 18px; height: 18px; }
.comment-replies { display: grid; gap: 15px; margin: 20px 0 0 90px; }
.official-detail-page .comment-replies .comment-row--reply { min-height: 139px; padding: 20px; border-radius: 20px; background: #222; }
.official-detail-page .comment-replies .comment-row--reply > p { margin: 10px 0 20px; }
.official-detail-page .comment-reply-form { width: calc(100% - 90px); margin: 0 0 30px 90px; }
.official-detail-page .comment-more-button { display: block; width: 109px; height: 42px; margin: 16px auto 0; padding: 10px 24px; border: 1px solid #2a2a2a; border-radius: 8px; background: #1a1a1a; color: #fafafa; font-size: 13px; cursor: pointer; }
.official-detail-page .site-footer { position: relative; left: calc(-1 * var(--dashboard-edge)); width: calc(100% + var(--dashboard-edge)); height: 321px; margin-top: 110px; padding: 50px max(var(--dashboard-edge),calc((100% - var(--dashboard-content-max))/2 + var(--dashboard-edge))) 0; border-top: 0; background: #1a1a1a; box-sizing: border-box; }

.detail-full-gallery-backdrop,
.gallery-view-backdrop { padding: 0; }
.detail-full-gallery-backdrop { display: flex; overflow: visible; align-items: center; justify-content: center; }
.gallery-view-backdrop { position: fixed; inset: 0; overflow: hidden; background: rgba(0,0,0,.92); backdrop-filter: blur(12px); }
.collection-modal { position: relative; width: 540px; min-width: 540px; height: 750px; max-height: 750px; overflow: hidden; padding: 50px 40px; border: 1px solid #202020; border-radius: 20px; background: #111; box-shadow: none; }
.collection-modal header { display: flex; height: 22px; align-items: center; justify-content: center; margin: 0; }
.collection-modal header strong { display: flex; align-items: center; gap: 8px; font-size: 22px; }
.collection-modal header strong > i { display: flex; color: #eee; font-size: 20px; }
.collection-modal header > button { position: absolute; top: 25px; right: 25px; display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 0; background: transparent; color: #aaa; font-size: 12px; cursor: pointer; }
.collection-modal header > button i { display: flex; }
.collection-modal-filter { margin: 20px 0 16px; }
.collection-modal .modal-grade-pills { min-height: 66px; justify-content: center; align-content: flex-start; gap: 6px; margin: 0; }
.collection-modal-scroll { height: 524px; overflow-y: auto; padding-right: 4px; }
.collection-modal-scroll::-webkit-scrollbar { width: 6px; }
.collection-modal-scroll::-webkit-scrollbar-thumb { border-radius: 999px; background: #444; }
.collection-modal-grid { display: grid; width: 444px; grid-template-columns: repeat(3,138px); gap: 8px; padding: 7px; box-sizing: border-box; }
.collection-modal-grid .gallery-item { position: relative; width: 138px; height: 240px; overflow: hidden; padding: 0; border: 0; border-radius: 10px; background: #121315; cursor: pointer; }
.collection-modal-grid .gallery-item::after { position: absolute; z-index: 3; inset: 0; padding: 3px; border-radius: inherit; background: linear-gradient(135deg, rgba(var(--card-grade-rgb),1) 0, rgba(255,255,255,.6) 16%, rgba(var(--card-grade-rgb),.75) 38%, rgba(var(--card-grade-rgb),1) 66%, rgba(255,255,255,.45) 86%, rgba(var(--card-grade-rgb),1)); content: ""; pointer-events: none; -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.collection-modal-grid .gallery-item > img { width: 100%; height: 100%; object-fit: cover; }
.gallery-new-badge { position: absolute; top: 4px; left: 4px; padding: 3px 6px; border-radius: 999px; background: #ff4d17; color: #fff; font-size: 10px; font-weight: 800; }
.gallery-unlock-backdrop { display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,.84); backdrop-filter: blur(14px); }
.gallery-unlock-dialog { position: relative; display: grid; width: min(860px,calc(100vw - 48px)); max-height: min(720px,calc(100vh - 48px)); grid-template-columns: minmax(260px,.9fr) minmax(320px,1.1fr); overflow: hidden auto; border: 1px solid rgba(255,255,255,.12); border-radius: 24px; background: #171719; box-shadow: 0 34px 110px rgba(0,0,0,.62); }
.gallery-unlock-close { position: absolute; z-index: 6; top: 16px; right: 16px; display: grid; width: 40px; height: 40px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(20,20,22,.76); color: #fff; font-size: 24px; cursor: pointer; backdrop-filter: blur(8px); }
.gallery-unlock-preview { position: relative; min-height: 520px; overflow: hidden; background: #0b0b0d; }
.gallery-unlock-preview > img { width: 100%; height: 100%; object-fit: cover; filter: blur(22px) brightness(.5); transform: scale(1.16); }
.gallery-unlock-lock { position: absolute; z-index: 3; top: 50%; left: 50%; display: grid; width: 62px; height: 62px; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: rgba(20,20,22,.72); color: #fff; font-size: 24px; transform: translate(-50%,-50%); box-shadow: 0 14px 38px rgba(0,0,0,.4); backdrop-filter: blur(10px); }
.gallery-unlock-lock i { display: flex; }
.gallery-unlock-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 62px 44px 38px; }
.gallery-unlock-copy .eyebrow { margin: 0 0 10px; color: #ff8b50; font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.gallery-unlock-copy h2 { margin: 0; color: #fff; font-size: 28px; line-height: 1.25; overflow-wrap: anywhere; }
.gallery-unlock-copy > p:not(.eyebrow) { margin: 14px 0 24px; color: #b8b8be; font-size: 14px; line-height: 1.65; }
.gallery-unlock-copy .unlock-condition { display: grid; gap: 7px; padding: 18px; border: 1px solid #303036; border-radius: 16px; background: #111113; }
.gallery-unlock-copy .unlock-condition span { color: #8f8f96; font-size: 11px; }
.gallery-unlock-copy .unlock-condition strong { color: #fff; font-size: 16px; }
.gallery-unlock-copy .unlock-condition small { color: #85858c; font-size: 11px; line-height: 1.5; }
.gallery-unlock-actions { display: grid; gap: 9px; margin-top: 22px; }
.gallery-unlock-actions button { min-height: 46px; border-radius: 10px; }
.gallery-locked-backdrop { display: flex; align-items: center; justify-content: center; padding: 0; background: rgba(0,0,0,.72); backdrop-filter: none; }
.gallery-locked-dialog { display: flex; width: 420px; min-width: 420px; height: 203px; flex-direction: column; justify-content: flex-start; padding: 50px 40px 30px; border-radius: 20px; background: #1d1d1d; box-shadow: 0 0 10px 5px rgba(0,0,0,.25); }
.gallery-locked-dialog h2 { height: 28px; margin: 0; color: #eee; font-size: 20px; font-weight: 800; line-height: 28px; text-align: center; word-break: keep-all; }
.gallery-locked-dialog button { width: 340px; height: 55px; margin-top: 40px; border: 0; border-radius: 5px; background: #050609; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }

@media (max-width: 760px) {
  .official-detail-page { padding-top: 74px; }
  .official-detail-page .detail-background { left: 0; width: 100%; height: 300px; }
  .official-detail-page .content-wrap { width: calc(100% - 24px); margin: 0 12px; }
  .official-detail-page .detail-hero { height: auto; grid-template-columns: 1fr; gap: 22px; }
  .official-detail-page .detail-cover,
  .official-detail-page .detail-copy { width: 100%; height: auto; }
  .official-detail-page .detail-cover { aspect-ratio: 1/1; }
  .official-detail-page .detail-copy { padding-top: 0; }
  .official-detail-page .creator-row { height: auto; min-height: 32px; flex-wrap: nowrap; align-items: flex-start; }
  .official-detail-page .creator-link { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; text-align: left; }
  .official-detail-page .follow-button { flex: 0 0 76px; }
  .official-detail-page .detail-subtitle { height: auto; min-height: 29px; }
  .official-detail-page .detail-title-line h1 { font-size: 34px; }
  .detail-action-row { grid-template-columns: 1fr; }
  .official-detail-page .official-gallery-section { height: auto; margin-top: 48px; }
  .official-detail-page .gallery-horizontal-list { overflow-x: auto; }
  .official-detail-page .gallery-nav { display: none; }
  .studio-saved-gallery-nav { display: none; }
  .detail-introduction-section { height: auto; min-height: 0; margin-top: 38px; }
  .detail-personality-section { height: auto; min-height: 0; }
  .detail-personality-card { padding: 18px 16px 20px; }
  .detail-personality-row { grid-template-columns: 68px minmax(0,1fr) 40px; gap: 8px; }
  .detail-personality-row > span { overflow-wrap: anywhere; font-size: 13px; }
  .detail-introduction-image img { width: 100%; }
  .detail-prologue-row { height: auto; min-height: 0; grid-template-columns: 1fr; margin-top: 60px; }
  .detail-prologue-copy > button { width: calc(100% - 24px); margin: 20px 12px; }
  .detail-floating-info { padding: 20px; }
  .detail-action-row.compact { grid-template-columns: 1fr; }
  .official-detail-page .comment-reply-form { width: calc(100% - 36px); margin-left: 36px; }
  .gallery-locked-dialog { width: calc(100vw - 56px); min-width: 0; height: auto; min-height: 183px; padding: 45px 20px 20px; }
  .gallery-locked-dialog button { width: 100%; height: 44px; margin-top: 15px; }
  .gallery-unlock-backdrop { padding: 12px; }
  .gallery-unlock-dialog { width: 100%; max-height: calc(100dvh - 24px); grid-template-columns: 1fr; border-radius: 18px; }
  .gallery-unlock-preview { min-height: 280px; height: min(42dvh,360px); }
  .gallery-unlock-copy { padding: 26px 20px 20px; }
  .gallery-unlock-copy h2 { padding-right: 36px; font-size: 23px; }
  .gallery-unlock-close { top: 10px; right: 10px; }
}

/* 채팅 모바일 최종 우선순위: 구형 상세/공통 미디어 규칙보다 뒤에서 표준 적용 */
.catalog-load-state {
  min-height: min(640px, calc(100dvh - 180px));
}

.catalog-load-state button {
  min-width: 132px;
  min-height: var(--ds-control-md);
  border: 1px solid color-mix(in srgb, var(--ds-color-accent) 70%, transparent);
  border-radius: var(--ds-radius-sm);
  background: var(--ds-color-accent);
  color: var(--ds-color-text);
  font-weight: 800;
}

/* CHAT-RESPONSIVE-001: switch before either desktop pane falls below its readable minimum. */
@media (max-width: 980px) {
  html:has(body.chat-mode),
  body.chat-mode { width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
  body.chat-mode { padding-bottom: 0; background: #080809; }
  .chat-mode .sidebar { display: none; }
  .chat-mode #app { width: 100%; height: 100%; margin-left: 0; }
  .chat-mode .chat-page { position: relative; display: block; width: 100%; height: 100vh; height: 100dvh; min-height: 100svh; overflow: hidden; }
  .chat-mode .chat-stage { position: absolute; inset: 0; display: block; overflow: hidden; }
  .chat-mode .chat-conversation-shell { position: relative; display: block; width: 100%; height: 100%; min-height: 0; overflow: hidden; }
  .chat-mode .chat-visual { position: absolute; z-index: auto; inset: 0; display: block; width: 100%; height: 100%; min-height: 0; overflow: hidden; padding: 0; border: 0; background: #080809; }
  .chat-mode .chat-scene-frame { position: absolute; inset: 0; border-radius: 0; }
  .chat-mode .chat-scene-frame > .chat-scene-image-layer { inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
  .chat-mode .chat-opening-visual-media { inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; }
  .chat-mode .chat-scene-frame > .chat-scene-image-layer.is-active { opacity: 1; filter: brightness(1.02) saturate(1.02); }
  .chat-mode .chat-visual.background-off .chat-scene-frame > .chat-scene-image-layer { opacity: 0; }
  .chat-mode .chat-scene-header { position: absolute; z-index: 60; top: 0; right: 0; left: 0; height: calc(60px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 154px 0 8px; background: linear-gradient(180deg,rgba(5,5,6,.8),rgba(5,5,6,.36) 68%,transparent); pointer-events: none; transition: opacity .24s ease, transform .32s cubic-bezier(.22,.61,.36,1); }
  .chat-mode .chat-scene-header button { pointer-events: auto; }
  .chat-mode .chat-titlebar { min-width: 0; gap: 7px; }
  .chat-mode .chat-titlebar .back-button { width: 38px; height: 38px; flex: 0 0 38px; }
  .chat-mode .chat-character-info-trigger { min-width: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .chat-mode .chat-scene-progress { display: none; }
  .chat-mode .chat-panel { position: absolute; z-index: 30; inset: 0; display: grid; width: 100%; height: 100%; min-height: 0; grid-template-rows: calc(60px + var(--ds-control-md) + var(--ds-space-2) + env(safe-area-inset-top)) minmax(0,1fr) auto auto; overflow: hidden; padding: 0; border: 0; background: transparent; transition: transform .42s cubic-bezier(.22,.61,.36,1), opacity .3s ease; }
  .chat-mode .chat-header { position: absolute; z-index: 61; top: env(safe-area-inset-top); right: 6px; width: auto; min-height: 60px; justify-content: flex-end; padding: 0; background: transparent; transition: opacity .24s ease, transform .32s cubic-bezier(.22,.61,.36,1); }
  .chat-mode .chat-display-switch { display: none; }
  .chat-mode .chat-header-actions { gap: 4px; }
  .chat-mode .chat-header-actions button { height: 29px; padding: 0 7px; background: rgba(14,14,16,.66); backdrop-filter: blur(9px); }
  .chat-mode .chat-scroll { grid-row: 2; width: 100%; min-height: 0; max-height: none; overflow: hidden auto; padding: var(--ds-space-4) 14px 34px; background: linear-gradient(180deg,transparent 0%,rgba(4,4,5,.04) 30%,rgba(4,4,5,.22) 56%,rgba(4,4,5,.66) 100%); scrollbar-width: none; overscroll-behavior: contain; }
  .chat-mode .chat-scroll::-webkit-scrollbar { display: none; }
  .chat-mode .chat-scroll > *,
  .chat-mode .chat-opening-sequence,
  .chat-mode .assistant-sequence .assistant-scene-flow,
  .chat-mode .assistant-sequence .narration-flow,
  .chat-mode .assistant-sequence .message-wrapper,
  .chat-mode .assistant-sequence .message-area,
  .chat-mode .assistant-sequence .segment-message { min-width: 0; max-width: 100%; }
  .chat-mode .chat-scroll .user .message-block { flex-basis: 100%; }
  .chat-mode .assistant-sequence { width: 100%; }
  .chat-mode .assistant-sequence .narration-flow { width: 100%; margin-left: 0; }
  .chat-mode .assistant-sequence .narration-text { width: 100%; max-width: 100%; margin: 12px 0; padding: 8px 10px; color: #fff; font-size: var(--chat-copy-size); font-style: italic; font-weight: 750; line-height: 1.7; overflow-wrap: anywhere; word-break: normal; text-shadow: 0 2px 5px rgba(0,0,0,.95),0 0 12px rgba(0,0,0,.82); }
  .chat-mode .assistant-sequence .narration-text::before { display: none; }
  .chat-mode .assistant-sequence .scene-opener-line .narration-text { margin: 12px 0; padding: 8px 10px; background: none; }
  .chat-mode .assistant-sequence .scene-opener-line .narration-text::before { display: none; }
  .chat-mode .chat-opening-narration { width: 100%; margin: 12px 0; padding: 8px 10px; }
  .chat-mode .chat-opening-narration.event { border-left: 0; background: none; }
  .chat-mode .chat-opening-narration p { max-width: 100%; color: #fff; font-size: var(--chat-copy-size); font-style: italic; font-weight: 750; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; text-shadow: 0 2px 5px rgba(0,0,0,.95),0 0 12px rgba(0,0,0,.82); }
  .chat-mode .assistant-sequence .message-wrapper { display: block; }
  .chat-mode .assistant-sequence .message-img-box,
  .chat-mode .assistant-sequence .assistant-avatar,
  .chat-mode .assistant-sequence .message-img,
  .chat-mode .assistant-sequence .message-name { display: none; }
  .chat-mode .assistant-sequence .message-area { width: 100%; padding-top: 0; }
  .chat-mode .assistant-sequence .segment-narration { max-width: 100%; margin: 12px 0; padding: 6px 10px; color: #fff; font-size: var(--chat-copy-size); font-style: italic; font-weight: 720; line-height: 1.72; overflow-wrap: anywhere; word-break: normal; text-shadow: 0 2px 5px rgba(0,0,0,.95),0 0 12px rgba(0,0,0,.78); }
  .chat-mode .assistant-sequence .dialogue-box { width: fit-content; max-width: 92%; margin: 12px 0; padding: 14px 16px; border: 1px solid rgba(255,255,255,.09); border-radius: 18px; background: rgba(19,19,21,.7); box-shadow: 0 8px 26px rgba(0,0,0,.24); backdrop-filter: blur(10px); }
  .chat-mode .assistant-sequence .segment-dialogue { font-size: var(--chat-copy-size); line-height: 1.65; }
  .chat-mode .assistant-sequence .chat-scene-thread { margin-bottom: 10px; }
  .chat-mode .assistant-sequence .chat-scene-thread.parallel { padding: 11px 12px 10px; border-color: rgba(255,166,112,.35); background: rgba(12,12,14,.62); backdrop-filter: blur(10px); }
  .chat-mode .assistant-sequence .chat-scene-thread-label { color: #ffc19f; text-shadow: 0 2px 8px rgba(0,0,0,.85); }
  .chat-mode .chat-panel[data-display-mode="novel"] .assistant-sequence .dialogue-box { max-width: 100%; border-color: transparent; background: rgba(8,8,10,.48); }
  .chat-mode .chat-dialogue-branches { margin-left: 0; }
  .chat-mode .chat-current-scene-context { display: flex; grid-row: 3; max-width: calc(100% - 20px); margin: 0 10px 7px; overflow: visible; flex-wrap: wrap; align-items: center; gap: 6px 8px; background: rgba(11,11,13,.78); backdrop-filter: blur(10px); }
  .chat-mode .chat-current-scene-context > b { flex: 0 0 auto; }
  .chat-mode .chat-current-scene-context > div { max-width: 100%; flex: 0 1 auto; flex-wrap: wrap; }
  .chat-mode .chat-current-scene-context em { min-width: min-content; flex: 1 1 max-content; margin-left: auto; white-space: normal; text-align: right; }
  .chat-mode .composer { position: relative; z-index: 80; grid-row: 4; width: calc(100% - 15px); min-width: 0; max-width: none; min-height: 0; margin: 0 5px calc(10px + env(safe-area-inset-bottom)) 10px; gap: 13px; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .chat-mode .composer-actions { order: -1; width: 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .chat-mode .composer-actions::-webkit-scrollbar { display: none; }
  .chat-mode .composer-modes { min-width: max-content; }
  .chat-mode .composer-input-box { width: 100%; min-width: 0; min-height: 56px; box-sizing: border-box; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 16px 9px 20px; border: 1px solid #3a3a3a; border-radius: 100px; background: rgba(0,0,0,.72); box-shadow: 0 0 5px 5px rgba(0,0,0,.22); backdrop-filter: blur(10px); }
  .chat-mode .composer-textarea-area { min-height: 34px; }
  .chat-mode .composer textarea { min-width: 0; min-height: 26px; background: transparent; color: #fff; }
  .chat-mode .chat-user-media-strip { order: -2; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; padding: 0 2px; scrollbar-width: none; }
  .chat-mode .chat-user-media-strip::-webkit-scrollbar { display: none; }
  .chat-mode .chat-user-media-chip { max-width: min(210px,calc(100vw - 40px)); }
  .chat-mode .composer-mode { height: 26px; min-height: 26px; max-height: 26px; }
  .chat-mode .composer-send { width: 36px; height: 36px; flex-basis: 36px; padding: 10px; }
  .chat-mode .composer-send img { width: 16px; height: 16px; }
  .chat-mode .chat-send-cancel { min-width: 64px; height: var(--control-height-sm); min-height: var(--control-height-sm); padding: 0 10px; }
  .chat-mode .chat-mobile-floating-controls { position: absolute; z-index: 70; top: calc(60px + var(--ds-space-1) + env(safe-area-inset-top)); right: 14px; display: flex; align-items: center; gap: var(--ds-space-2); height: var(--ds-control-md); transition: opacity .24s ease, transform .32s cubic-bezier(.22,.61,.36,1); }
  .chat-mode .chat-mobile-floating-controls button { position: relative; display: grid; width: 44px; min-height: 44px; place-items: center; gap: 1px; overflow: hidden; padding: 4px 3px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: rgba(12,12,14,.62); color: #f4f4f5; backdrop-filter: blur(10px); }
  .chat-mode .chat-mobile-floating-controls span,
  .chat-mode .chat-mobile-floating-controls i,
  .chat-mode .chat-mobile-floating-controls svg { width: 17px; height: 17px; font-size: 16px; line-height: 17px; }
  .chat-mode .chat-mobile-floating-controls b { font-size: 9px; line-height: 12px; }
  .chat-mode .chat-opening-skip { position: absolute; z-index: 75; top: calc(60px + var(--ds-space-1) + env(safe-area-inset-top)); right: auto; bottom: auto; left: 14px; height: var(--ds-control-md); }
  .chat-mode .chat-tool-popover { position: fixed; z-index: 90; top: auto; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); left: 12px; width: auto; max-height: calc(100dvh - 120px - env(safe-area-inset-bottom)); transform: none; }
  .chat-mode .chat-quick-settings { right: auto; left: 12px; width: min(240px,calc(100vw - 24px)); }
  .chat-mode .chat-situation-examples { min-height: 0; }
  .chat-mode .chat-suggestion-bubble { max-width: calc(100vw - 82px); font-size: 14px; line-height: 22px; }
  .chat-mode .chat-mobile-scene-next { height: var(--ds-control-md); }
  .chat-mode .chat-mobile-scene-next img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
  .chat-mode .chat-mobile-scene-next b { position: absolute; right: 3px; bottom: 3px; left: 3px; padding: 2px; border-radius: 999px; background: rgba(0,0,0,.72); color: #fff; }
  .chat-mode .chat-scene-controls { display: none; }
  .chat-mode .chat-management-panel { width: min(380px,calc(100vw - 10px)); height: 100dvh; }
  .chat-mode .chat-management-panel > header { height: 52px; }
  .chat-mode .chat-management-scroll { height: calc(100dvh - 52px); }
  .chat-mode .chat-management-gallery { display: flex; height: 132px; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .chat-mode .chat-management-gallery::-webkit-scrollbar { display: none; }
  .chat-mode .chat-management-gallery > span { flex: 0 0 86px; aspect-ratio: 2/3; }
  .chat-mode .chat-character-panel { display: none; }
  .chat-mode .chat-page.is-chat-hidden .chat-panel { transform: translateY(calc(100% + env(safe-area-inset-bottom))); opacity: 0; pointer-events: none; }
  .chat-mode .chat-page.is-chat-hidden .chat-scene-header,
  .chat-mode .chat-page.is-chat-hidden .chat-mobile-floating-controls { opacity: 0; transform: translateY(-18px); pointer-events: none; }
  .chat-mode .chat-page.is-chat-hidden .chat-scene-frame { cursor: pointer; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-loading-spinner { animation-duration: 1.8s; }
  .chat-scene-loading { transition: none; }
}

/* SUPPORT-001: API-backed FAQ, inquiry, reply and attachment states */
.support-state {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--ds-color-text-muted, #85878c);
  text-align: center;
}
.support-state > span:not(.support-spinner) {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: #1b1c20;
  color: #ff6327;
  font-size: 22px;
  font-weight: 800;
}
.support-state button,
.support-load-more button {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid #3a3b40;
  border-radius: 8px;
  background: #1a1b1f;
  color: #f2f2f3;
  font-weight: 700;
  cursor: pointer;
}
.support-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #2f3035;
  border-top-color: #ff6327;
  border-radius: 50%;
  animation: support-spin .8s linear infinite;
}
@keyframes support-spin { to { transform: rotate(360deg); } }
.support-load-more { display: flex; justify-content: center; padding: 22px 0; }
.support-inquiry-list { overflow: hidden; border: 1px solid #2b2c31; border-radius: 12px; background: #121316; }
.support-inquiry-row {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 86px;
  grid-template-columns: 88px minmax(0,1fr) 20px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid #292a2e;
  background: transparent;
  color: #e4e4e6;
  text-align: left;
  cursor: pointer;
}
.support-inquiry-row:last-child { border-bottom: 0; }
.support-inquiry-row:hover { background: #18191d; }
.support-inquiry-row > span:nth-child(2) { min-width: 0; }
.support-inquiry-row small,
.support-inquiry-row strong,
.support-inquiry-row time { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-inquiry-row small,
.support-inquiry-row time { color: #85878c; font-size: 12px; }
.support-inquiry-row strong { margin: 6px 0; font-size: 15px; }
.support-inquiry-row > b { color: #72747a; font-size: 22px; }
.support-status { display: inline-flex; min-height: 28px; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid #44464c; border-radius: 999px; color: #b9bbc0; font-size: 11px; font-weight: 800; white-space: nowrap; }
.support-status.waiting { border-color: #a84723; background: rgba(255,99,39,.1); color: #ff8b5e; }
.support-status.answered { border-color: #3e7355; background: rgba(71,164,108,.1); color: #7bd19e; }
.support-status.closed { color: #85878c; }
.support-inquiry-detail { overflow: hidden; border: 1px solid #2b2c31; border-radius: 14px; background: #111215; }
.support-inquiry-detail > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #292a2e; }
.support-inquiry-detail > header > button { min-height: 36px; border: 0; background: transparent; color: #bbbcc1; font-weight: 700; cursor: pointer; }
.support-detail-heading { padding: 24px 24px 20px; }
.support-detail-heading small { color: #ff7841; }
.support-detail-heading h2 { margin: 9px 0 7px; overflow-wrap: anywhere; font-size: 22px; }
.support-detail-heading time { color: #77797e; font-size: 12px; }
.support-thread { display: grid; gap: 14px; padding: 4px 24px 24px; }
.support-thread article { width: min(88%, 620px); padding: 16px 18px; border-radius: 12px; background: #202126; }
.support-thread article.user { justify-self: end; background: #4a2115; }
.support-thread article header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.support-thread article time { color: #888a90; font-size: 11px; }
.support-thread article p { margin: 0; overflow-wrap: anywhere; color: #dedee0; line-height: 1.65; white-space: pre-wrap; }
.support-attachments { display: grid; gap: 7px; margin: 0 24px 22px; padding-top: 18px; border-top: 1px solid #292a2e; }
.support-attachments h3 { margin: 0 0 6px; font-size: 14px; }
.support-attachments button { display: grid; min-width: 0; min-height: 44px; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid #303137; border-radius: 8px; background: #17181b; color: #ddd; text-align: left; cursor: pointer; }
.support-attachments strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-attachments small { color: #7e8085; }
.support-reply-form { display: grid; gap: 12px; padding: 22px 24px 24px; border-top: 1px solid #292a2e; }
.support-reply-form label > span { display: block; margin-bottom: 8px; color: #a8a9ad; font-size: 13px; font-weight: 700; }
.support-reply-form textarea { width: 100%; min-height: 110px; resize: vertical; padding: 14px; border: 1px solid #35363b; border-radius: 10px; background: #17181b; color: #eee; font: inherit; line-height: 1.55; }
.support-reply-form button { min-height: 44px; justify-self: end; padding: 0 22px; border: 0; border-radius: 8px; background: #ff6327; color: #fff; font-weight: 800; cursor: pointer; }
.support-reply-form button:disabled,
.support-compose-form button:disabled { opacity: .55; cursor: wait; }
.support-closed-note { margin: 0; padding: 20px 24px; border-top: 1px solid #292a2e; color: #85878c; text-align: center; }
.support-file-field small { color: #77797e; font-size: 11px; }
.support-file-field input[type="file"] { padding: 10px; border: 1px dashed #414249; border-radius: 8px; background: #17181b; color: #aaa; }
.support-submit-state { min-height: 20px; color: #ff9a73; font-size: 12px; line-height: 20px; }

.chat-transcript-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: min(42vh, 360px);
  padding: 32px 20px;
  color: #8e9096;
  text-align: center;
}
.chat-transcript-state strong { color: #e9e9eb; font-size: 15px; }
.chat-transcript-state span { max-width: 360px; font-size: 12px; line-height: 1.6; }
.chat-transcript-state button {
  min-height: 38px;
  margin-top: 6px;
  padding: 0 18px;
  border: 1px solid #3a3b40;
  border-radius: 999px;
  background: #1c1d20;
  color: #efeff0;
  cursor: pointer;
}
.chat-transcript-state.error strong { color: #ff8a62; }
.sidebar-recents-empty { margin: 4px 12px; color: #777a80; font-size: 11px; line-height: 1.5; }
.sidebar:not(.sidebar-open) .sidebar-recents-empty,
body.chat-mode .sidebar-recents-empty { display: none; }
.composer[aria-busy="true"] { opacity: .78; }
.composer textarea:disabled,
.composer button:disabled { cursor: wait; }

@media (prefers-reduced-motion: reduce) { .support-spinner { animation-duration: 1.8s; } }

@media (max-width: 760px) {
  .inquiry-page { padding-top: 72px; }
  .inquiry-shell { min-height: calc(100vh - 142px); }
  .inquiry-content { height: clamp(360px,calc(100dvh - 310px),520px); }
  .inquiry-tabs { overflow-x: auto; scrollbar-width: none; }
  .inquiry-tabs button { min-width: 96px; }
  .faq-categories,
  .my-inquiry-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .faq-categories button,
  .my-inquiry-filters button { flex: 0 0 auto; }
  .inquiry-compose-button { margin-left: 0; }
  .support-inquiry-row { grid-template-columns: 74px minmax(0,1fr) 14px; gap: 9px; padding: 13px 11px; }
  .support-detail-heading,
  .support-thread { padding-right: 14px; padding-left: 14px; }
  .support-thread article { width: 94%; padding: 14px; }
  .support-thread article header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .support-attachments { margin-right: 14px; margin-left: 14px; }
  .support-reply-form { padding-right: 14px; padding-left: 14px; }
  .support-reply-form button { width: 100%; }
}

/* 2026-08-07 공식 Android Studio 실제 제작·저장 흐름 기준 */
.studio-media-source .studio-upload-zone { cursor: default; }
.studio-media-source .studio-upload-zone > span { display: grid; gap: 9px; }
.studio-media-source .studio-upload-zone > span > div { display: flex; justify-content: center; gap: 8px; }
.studio-media-source .studio-upload-zone button { min-width: 112px; }
.studio-profile-media { display: grid; grid-template-columns: 144px minmax(0,1fr); align-items: center; gap: 16px; padding: 14px; border: 1px solid #303035; border-radius: 14px; background: #111113; }
.studio-profile-media .studio-upload-preview { width: 144px; height: 144px; margin: 0; aspect-ratio: 1; }
.studio-profile-media > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.studio-profile-media > div small { grid-column: 1 / -1; color: #77777e; line-height: 1.5; }
.studio-profile-media.compact { grid-template-columns: 96px minmax(0,1fr); }
.studio-profile-media.compact .studio-upload-preview { width: 96px; height: 96px; }
.studio-asset-character-tabs { display: flex; gap: 8px; overflow-x: auto; }
.studio-asset-character-tabs button { min-height: 35px; padding: 0 12px; border: 1px solid #34343a; border-radius: 999px; background: #111113; color: #8d8d94; white-space: nowrap; cursor: pointer; }
.studio-asset-character-tabs button.active { border-color: rgba(255,106,26,.45); background: rgba(255,106,26,.1); color: #ff9d69; }
.studio-empty-state { display: grid; min-height: 150px; place-items: center; align-content: center; gap: 7px; padding: 24px; border: 1px dashed #38383e; border-radius: 14px; background: #101012; text-align: center; }
.studio-empty-state p { max-width: 360px; margin: 0; color: #797980; font-size: 11px; line-height: 1.6; }
.studio-generating { display: grid; width: min(620px,100%); min-height: 520px; margin: 28px auto 0; place-items: center; align-content: center; gap: 12px; padding: 40px; text-align: center; }
.studio-generating-mascot { position: relative; display: grid; width: 104px; height: 104px; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(255,126,53,.28), transparent 68%); }
.studio-generating-mascot span { color: #ff762c; font-size: 46px; animation: studio-mascot-pulse 1.25s ease-in-out infinite; }
.studio-generating-mascot i { position: absolute; inset: 2px; border: 2px solid transparent; border-top-color: #ff6a1a; border-radius: 50%; animation: studio-spin 1.1s linear infinite; }
.studio-generating h2 { margin: 8px 0 0; font-size: 24px; }
.studio-generating p,
.studio-generating small { margin: 0; color: #85858c; }
.studio-generating-progress { width: min(340px,100%); height: 7px; overflow: hidden; border-radius: 999px; background: #2b2b30; }
.studio-generating-progress i { display: block; width: 58%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#ff4f1f,#ff9a45); animation: studio-progress 1.5s ease-in-out infinite alternate; }
@keyframes studio-spin { to { transform: rotate(1turn); } }
@keyframes studio-mascot-pulse { 50% { opacity: .58; transform: scale(.9); } }
@keyframes studio-progress { from { width: 18%; } to { width: 88%; } }
.studio-result-cover { aspect-ratio: 1; }
.studio-save-success { display: grid; place-items: center; gap: 12px; text-align: center; }
.studio-save-success > span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; background: #ff5a22; color: white; font-size: 28px; }
.studio-save-success p { margin: 0; color: #aaaab0; line-height: 1.65; }
.studio-saved-page { min-height: 100vh; padding: 0 0 90px; background: #0d0d0e; }
.studio-saved-shell { width: min(100%, 760px); margin: 0 auto; }
.studio-saved-hero { position: relative; min-height: 760px; overflow: hidden; background: #111; }
.studio-saved-hero > img,
.studio-saved-hero > video { width: 100%; height: 760px; object-fit: cover; }
.studio-saved-hero::after { position: absolute; inset: 42% 0 0; content: ""; background: linear-gradient(transparent,rgba(10,10,11,.98)); pointer-events: none; }
.studio-saved-top-actions { position: absolute; z-index: 2; top: 18px; right: 18px; left: 18px; display: grid; grid-template-columns: 42px 1fr 42px 42px; gap: 8px; }
.studio-saved-top-actions button { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; background: rgba(12,12,13,.72); color: white; font-size: 21px; backdrop-filter: blur(10px); cursor: pointer; }
.studio-saved-top-actions button.active { border-color: #ff6a1a; color: #ff7d3e; }
.studio-saved-identity { position: absolute; z-index: 2; right: 26px; bottom: 28px; left: 26px; }
.studio-saved-identity h1 { margin: 0 0 7px; font-size: 42px; }
.studio-saved-identity > div { display: flex; align-items: center; gap: 8px; }
.studio-saved-identity > div > span { color: #aaaab0; }
.studio-saved-identity > div > b { padding: 5px 9px; border-radius: 999px; background: rgba(255,106,26,.18); color: #ff9e6b; font-size: 10px; }
.studio-saved-identity > div > button { padding: 5px 10px; border: 1px solid #55555c; border-radius: 7px; background: rgba(12,12,13,.66); color: #eee; cursor: pointer; }
.studio-saved-identity > p { margin: 13px 0; color: #e1e1e4; font-size: 16px; }
.studio-saved-stats button,
.studio-saved-stats span { border: 0; background: transparent; color: #a3a3aa; font-size: 11px; }
.studio-saved-stats button { cursor: pointer; }
.studio-saved-start,
.studio-saved-bottom-start { display: grid; grid-template-columns: minmax(0,1fr) 180px; gap: 10px; padding: 18px 22px; border-bottom: 1px solid #27272b; background: #111113; }
.studio-saved-start label { display: grid; gap: 7px; }
.studio-saved-start label span { color: #898990; font-size: 10px; }
.studio-saved-start select,
.studio-saved-bottom-start select { min-height: 48px; padding: 0 14px; border: 1px solid #36363c; border-radius: 9px; background: #18181b; color: white; }
.studio-saved-start > button,
.studio-saved-bottom-start > button { border: 0; border-radius: 9px; background: linear-gradient(100deg,#ff641f,#d53c0b); color: white; font-weight: 900; cursor: pointer; }
.studio-saved-gallery-section,
.studio-saved-description,
.studio-saved-intro { padding: 28px 22px; border-bottom: 1px solid #242428; }
.studio-saved-gallery-section {
  --detail-gallery-card-min: 7rem;
  --detail-gallery-card-max: 9.375rem;
  --detail-gallery-card-ratio: 150 / 233;
  --detail-gallery-gap: 5px;
  --detail-gallery-inline-gutter: clamp(10px, 2.5vw, 22px);
  --detail-gallery-slide-count: 2;
  padding-inline: var(--detail-gallery-inline-gutter);
}
.studio-saved-gallery-section header { display: flex; align-items: center; justify-content: space-between; }
.studio-saved-gallery-section h2,
.studio-saved-description h2,
.studio-saved-intro h2 { margin: 0 0 16px; font-size: 21px; }
.studio-saved-gallery-section header button { border: 0; background: transparent; color: #929299; cursor: pointer; }
.studio-saved-grade-pills { display: flex; gap: 7px; overflow-x: auto; }
.studio-saved-grade-pills span { padding: 7px 10px; border: 1px solid #36363b; border-radius: 999px; color: #85858c; font-size: 10px; white-space: nowrap; }
.studio-saved-grade-pills span.active { border-color: #9f592e; color: #ffad78; }
.studio-saved-gallery-slider { position: relative; margin-top: 14px; }
.studio-saved-gallery-row {
  display: flex;
  gap: var(--detail-gallery-gap);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.studio-saved-gallery-row::-webkit-scrollbar { display: none; }
.studio-saved-gallery-row > button {
  position: relative;
  width: clamp(var(--detail-gallery-card-min), calc((100% - var(--detail-gallery-gap) - var(--detail-gallery-gap)) / 3), var(--detail-gallery-card-max));
  min-width: clamp(var(--detail-gallery-card-min), calc((100% - var(--detail-gallery-gap) - var(--detail-gallery-gap)) / 3), var(--detail-gallery-card-max));
  height: auto;
  min-height: 0;
  flex: 0 0 auto;
  overflow: hidden;
  aspect-ratio: var(--detail-gallery-card-ratio);
  border: 1px solid #343439;
  border-radius: 10px;
  background: #151517;
  color: white;
  scroll-snap-align: start;
  cursor: pointer;
}
.studio-saved-gallery-row img,
.studio-saved-gallery-row video { width: 100%; height: 100%; object-fit: cover; }
.studio-saved-gallery-row > .gallery-card > img { object-fit: cover; }
.studio-saved-gallery-row > button > span { position: absolute; right: 7px; bottom: 7px; padding: 4px 7px; border-radius: 999px; background: rgba(0,0,0,.72); font-size: 9px; }
.studio-saved-unlock-card { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 9px; padding: 12px 8px; text-align: center; }
.studio-saved-unlock-card > img { width: min(64%, 96px); height: auto; object-fit: contain; }
.studio-saved-unlock-card strong { font-size: 12px; line-height: 1.5; }
.studio-saved-unlock-card span { position: static !important; width: 100%; padding: 8px !important; background: #b63a08 !important; font-weight: 800; }
.studio-saved-gallery-nav { width: 32px; height: 32px; font-size: 25px; }
.studio-saved-gallery-nav.prev { left: -16px; }
.studio-saved-gallery-nav.next { right: -16px; }
.studio-saved-gallery-nav:disabled { visibility: hidden; }
.studio-saved-description > p { color: #b0b0b6; line-height: 1.85; white-space: pre-line; }
.studio-saved-intro-card { display: grid; gap: 14px; padding: 18px; border: 1px solid #303035; border-radius: 15px; background: #131315; }
.studio-saved-narration { margin: 0; padding-left: 13px; border-left: 2px solid #ff5b22; color: #c6c6ca; line-height: 1.7; }
.studio-saved-dialogue { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 10px; align-items: start; }
.studio-saved-dialogue > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: #4a3028; }
.studio-saved-dialogue p { margin: 0; padding: 12px 14px; border-radius: 4px 16px 16px; background: #252528; line-height: 1.65; }
.studio-saved-dialogue b { display: block; margin-bottom: 5px; font-size: 10px; }
.studio-saved-bottom-start { position: sticky; z-index: 5; bottom: 0; border-top: 1px solid #2a2a2f; border-bottom: 0; }
.studio-saved-gallery-modal { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; max-height: 62vh; overflow-y: auto; }
.studio-saved-gallery-modal button { display: grid; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.studio-saved-gallery-modal img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; }
.studio-saved-gallery-modal span { color: #ff9d69; font-size: 11px; }

.studio-creation-character-assets,
.studio-publication-settings { display: grid; gap: 16px; margin-top: 24px; padding-top: 24px; border-top: 1px solid #2d2d32; }
.studio-creation-character-assets .studio-section-title,
.studio-publication-settings .studio-section-title { margin-bottom: 0; }

@media (max-width: 760px) {
  body[data-current-route="studio"],
  body[data-current-route="studio-easy"],
  body[data-current-route="studio-custom"],
  body[data-current-route="studio-detail"] { padding-bottom: 70px; background: #0e0e0f; }
  body[data-current-route="studio"] .topbar,
  body[data-current-route="studio-easy"] .topbar,
  body[data-current-route="studio-custom"] .topbar,
  body[data-current-route="studio-detail"] .topbar { height: 58px; }
  body[data-current-route="studio"] .topbar.header-solid,
  body[data-current-route="studio-easy"] .topbar.header-solid,
  body[data-current-route="studio-custom"] .topbar.header-solid,
  body[data-current-route="studio-detail"] .topbar.header-solid { background: rgba(17,17,19,.94); }
  .studio-page,
  .studio-editor-page { padding-top: 58px; }
  .studio-landing,
  .studio-editor-shell { width: 100%; }
  .studio-landing { display: flex; flex-direction: column; }
  .studio-landing > .studio-hero { order: 1; }
  .studio-landing > .studio-work-section { order: 2; margin-top: 0; margin-bottom: 24px; }
  .studio-landing > .studio-access-banner { order: 3; }
  .studio-landing > .mode-grid { order: 4; }
  .studio-hero,
  .studio-editor-header { padding: 18px 16px; border-bottom: 1px solid #26262a; }
  .studio-editor-header > div:first-child p,
  .studio-editor-header h1,
  .studio-editor-header .save-state,
  .studio-editor-header [data-action="studio-preview"] { display: none; }
  .studio-breadcrumb { margin: 0; }
  .studio-breadcrumb button { font-size: 0; }
  .studio-breadcrumb button::before { content: "‹"; font-size: 28px; }
  .studio-breadcrumb span:last-child { color: #f1f1f3; font-size: 16px; font-weight: 900; }
  .editor-actions { width: auto; margin-left: auto; }
  .editor-actions .studio-mini-button { min-width: 38px; padding: 0 9px; font-size: 0; }
  .editor-actions [data-action="studio-guide"]::before { content: "?"; font-size: 15px; }
  .editor-actions [data-action="studio-drafts"]::before { content: "▣"; font-size: 15px; }
  .mode-grid { padding: 0 14px 20px; }
  .studio-access-banner,
  .studio-work-section { margin-right: 14px; margin-left: 14px; }
  .studio-easy-progress,
  .studio-progress-tabs { top: 58px; margin: 0; padding: 8px 12px; border-radius: 0; background: #111113; }
  .studio-easy-progress { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
  .studio-easy-progress button { flex: 0 0 54px; min-height: 42px; scroll-snap-align: nearest; }
  .studio-easy-progress button span { display: none; }
  .studio-easy-progress button.active { flex-basis: 126px; grid-template-columns: 22px minmax(0,1fr); }
  .studio-easy-progress button.active span { display: block; }
  .studio-progress-tabs { display: flex; overflow-x: auto; }
  .studio-progress-tab { flex: 0 0 auto; min-height: 38px; padding: 0 13px; }
  .studio-editor-grid,
  .studio-easy-layout { gap: 0; }
  .studio-form-card { border: 0; border-radius: 0; }
  .studio-form-head { padding: 20px 16px 12px; }
  .studio-form-body { padding: 14px 16px 24px; }
  .studio-preview-panel,
  .studio-easy-preview { display: none; }
  .studio-form-card > .studio-bottom-actions { position: static; z-index: auto; bottom: auto; padding: 12px 16px; background: #111113; backdrop-filter: none; }
  .studio-profile-media { grid-template-columns: 104px minmax(0,1fr); }
  .studio-profile-media .studio-upload-preview { width: 104px; height: 104px; }
  .studio-profile-media > div { grid-template-columns: 1fr; }
  .studio-profile-media > div small { grid-column: auto; }
  .studio-generating { min-height: calc(100vh - 128px); padding: 30px 18px; }
  .studio-easy-result-card { width: 100%; margin: 0; border: 0; border-radius: 0; }
  .studio-result-cover { width: 100%; max-width: 390px; }
  .studio-saved-page { padding-top: 58px; }
  .studio-saved-hero { min-height: calc(100vw + 210px); }
  .studio-saved-hero > img,
  .studio-saved-hero > video { height: min(100vw,430px); }
  .studio-saved-hero::after { inset: 30% 0 0; }
  .studio-saved-identity h1 { font-size: 31px; }
  .studio-saved-start,
  .studio-saved-bottom-start { grid-template-columns: 1fr; }
  .studio-saved-start > button,
  .studio-saved-bottom-start > button { min-height: 48px; }
  .studio-saved-bottom-start { bottom: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .studio-generating-mascot span,
  .studio-generating-mascot i,
  .studio-generating-progress i { animation-duration: 3s; }
}
/* LOCALE-SUPPORT-002: text comes from the shared i18n/content locale layer.
   CSS only owns writing direction and resilient layout for translated copy. */
html[lang] :where(button, input, select, textarea) { font: inherit; }
html[lang] :where(.page, .modal, .modal-panel, .official-standard-shell, .studio-editor-shell) {
  text-rendering: optimizeLegibility;
}
html[lang] :where(.official-page-title, .official-empty-state, .detail-page, .conversation-card, .studio-form-card) {
  min-inline-size: 0;
}
html:lang(de) :where(button, .tag, .official-feed-tab, .official-ranking-tab, .conversation-actions),
html:lang(fr) :where(button, .tag, .official-feed-tab, .official-ranking-tab, .conversation-actions),
html:lang(es) :where(button, .tag, .official-feed-tab, .official-ranking-tab, .conversation-actions),
html:lang(ru) :where(button, .tag, .official-feed-tab, .official-ranking-tab, .conversation-actions) {
  white-space: normal;
  overflow-wrap: anywhere;
}
html[dir="rtl"] :where(.page, .modal-panel, .studio-editor-shell) { direction: rtl; }
html[dir="rtl"] :where(input, textarea, select) { text-align: start; }
.studio-world-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 10px;
}

.studio-world-library {
  display: grid;
  gap: 20px;
  margin-top: 18px;
}

.studio-world-library-tabs {
  display: flex;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  gap: 4px;
}

.studio-world-library-tabs button {
  min-width: 104px;
  padding: 9px 18px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.studio-world-library-tabs button.active {
  background: var(--surface-1);
  color: var(--accent);
  box-shadow: 0 4px 14px rgba(53, 37, 95, .12);
}

.studio-scenario-contract,
.studio-scenario-section,
.studio-scenario-goal {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.studio-scenario-contract { gap: 20px; }

.studio-scenario-hero,
.studio-scenario-goal,
.studio-scenario-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-1);
}

.studio-scenario-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, rgba(110, 77, 218, .12), var(--surface-1) 68%);
}

.studio-scenario-hero > div:first-child { display: grid; min-width: 0; gap: 8px; }
.studio-scenario-hero span,
.studio-scenario-section > header span { color: var(--accent); font-size: 12px; font-weight: 800; }
.studio-scenario-hero h4 { margin: 0; font-size: clamp(20px, 3vw, 30px); overflow-wrap: anywhere; }
.studio-scenario-hero p,
.studio-scenario-goal p,
.studio-scenario-section p { margin: 0; color: var(--muted); line-height: 1.65; }
.studio-scenario-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.studio-scenario-actions:has([data-studio-scenario-reference]) { flex: 1 1 100%; min-width: 0; }
.studio-scenario-actions > .studio-field:has([data-studio-scenario-reference]) { flex: 1 1 100%; min-width: 0; }
.studio-scenario-influences { display: grid; padding-top: 12px; border-top: 1px solid var(--line); gap: 8px; }
.studio-scenario-influences ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; gap: 8px; }
.studio-scenario-influences li { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 999px; background: var(--surface-2); gap: 7px; }
.studio-scenario-influences li b { color: var(--accent); font-size: 11px; }
.studio-scenario-influences li span { color: var(--muted); font-size: 11px; }
.studio-scenario-section > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.studio-scenario-visuals > header > div:first-child,
.studio-scenario-visual-batch { display: grid; gap: 4px; }
.studio-scenario-visuals > header small,
.studio-scenario-visual-batch span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.studio-scenario-visual-batch { justify-items: end; }
.studio-scenario-visual-list { display: grid; gap: 14px; }
.studio-scenario-visual-card {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.studio-scenario-visual-card.complete { border-color: rgba(110, 77, 218, .42); }
.studio-scenario-visual-preview,
.studio-scenario-visual-placeholder {
  min-height: 260px;
  border: 0;
  border-right: 1px solid var(--line);
  background: rgba(110, 77, 218, .07);
}
.studio-scenario-visual-preview { display: block; padding: 0; cursor: zoom-in; }
.studio-scenario-visual-preview img { display: block; width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.studio-scenario-visual-placeholder { display: grid; place-content: center; justify-items: center; color: var(--muted); gap: 8px; }
.studio-scenario-visual-placeholder span { color: var(--accent); font-size: 34px; }
.studio-scenario-visual-editor { display: grid; min-width: 0; padding: 16px; gap: 12px; }
.studio-scenario-visual-editor > header { display: grid; gap: 4px; }
.studio-scenario-visual-editor > header span { color: var(--accent); font-size: 11px; font-weight: 800; }
.studio-scenario-visual-editor > header small { color: var(--muted); font-size: 11px; }
.studio-scenario-visual-context {
  display: grid;
  padding: 13px;
  border: 1px solid rgba(255, 106, 26, .2);
  border-radius: 11px;
  background: rgba(255, 106, 26, .055);
  gap: 9px;
}
.studio-scenario-visual-context > header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
.studio-scenario-visual-context > header span { color: var(--accent); font-size: 11px; font-weight: 800; }
.studio-scenario-visual-context > header strong { font-size: 12px; }
.studio-scenario-visual-context > p { color: var(--text); font-size: 12px; line-height: 1.65; }
.studio-scenario-visual-context dl { display: grid; margin: 0; gap: 6px; }
.studio-scenario-visual-context dl > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 9px; }
.studio-scenario-visual-context dt { color: var(--muted); font-size: 10px; font-weight: 800; }
.studio-scenario-visual-context dd { min-width: 0; margin: 0; color: var(--text); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.studio-gallery-prompt-recommendation { display: grid; gap: 12px; }
.studio-gallery-prompt-recommendation > header { display: grid; gap: 4px; }
.studio-gallery-prompt-recommendation > header p { margin: 0; }
.studio-gallery-scenario-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; }
.studio-gallery-scenario-picker label { display: grid; min-width: 0; gap: 5px; }
.studio-gallery-scenario-picker label > span { color: var(--muted); font-size: 10px; font-weight: 800; }
.studio-gallery-scenario-picker select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-1);
  color: var(--text);
  font: inherit;
}
.studio-gallery-scenario-picker > button { min-height: 42px; }
.studio-scenario-visual-axis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.studio-scenario-visual-axis-grid label,
.studio-scenario-visual-prompt,
.studio-scenario-visual-negative { display: grid; min-width: 0; gap: 5px; }
.studio-scenario-visual-axis-grid label > span,
.studio-scenario-visual-prompt > span,
.studio-scenario-visual-negative > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.studio-scenario-visual-axis-grid input,
.studio-scenario-visual-prompt textarea,
.studio-scenario-visual-negative textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-1);
  color: var(--text);
  font: inherit;
}
.studio-scenario-visual-axis-grid input { min-height: 38px; padding: 8px 10px; }
.studio-scenario-visual-prompt textarea,
.studio-scenario-visual-negative textarea { min-height: 112px; padding: 10px; line-height: 1.55; resize: vertical; }
.studio-scenario-visual-negative textarea { min-height: 70px; }
.studio-scenario-visual-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.studio-scenario-act-grid,
.studio-scenario-ending-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.studio-scenario-act-grid > article,
.studio-scenario-ending-grid > article,
.studio-scenario-branch-list > article {
  display: grid;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  gap: 9px;
}
.studio-scenario-act-grid span,
.studio-scenario-ending-grid span,
.studio-scenario-branch-list span { color: var(--accent); font-size: 11px; font-weight: 800; }
.studio-scenario-act-grid dl { display: grid; margin: 0; gap: 7px; }
.studio-scenario-act-grid dl > div { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
.studio-scenario-act-grid dt { color: var(--muted); font-size: 11px; }
.studio-scenario-act-grid dd { margin: 0; font-size: 12px; line-height: 1.55; }
.studio-scenario-branch-list { display: grid; gap: 10px; }
.studio-scenario-episode-list { display: grid; gap: 10px; }
.studio-scenario-episode-list > article { display: grid; grid-template-columns: minmax(130px, .35fr) minmax(0, 1fr) auto; align-items: start; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); gap: 14px; }
.studio-scenario-episode-list article > header { display: grid; gap: 5px; }
.studio-scenario-episode-list header span { color: var(--accent); font-size: 11px; font-weight: 800; }
.studio-scenario-episode-list dl { display: grid; margin: 0; gap: 7px; }
.studio-scenario-episode-list dl > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; }
.studio-scenario-episode-list dt { color: var(--muted); font-size: 11px; }
.studio-scenario-episode-list dd { margin: 0; font-size: 12px; line-height: 1.55; }
.studio-scenario-episode-list article > small { color: var(--muted); font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.studio-scenario-branch-list > article { grid-template-columns: minmax(0, 1fr) minmax(240px, .85fr); }
.studio-scenario-branch-list > article > div { display: grid; gap: 6px; }
.studio-scenario-branch-list ul { display: grid; margin: 0; padding-left: 20px; gap: 7px; }
.studio-scenario-branch-list li { line-height: 1.45; }
.studio-scenario-branch-list li small { display: block; color: var(--muted); font-family: ui-monospace, monospace; }
.studio-scenario-ending-grid > article > small { color: var(--muted); overflow-wrap: anywhere; }
.studio-scenario-ending-grid > article.happy { border-color: rgba(38, 157, 95, .38); }
.studio-scenario-ending-grid > article.bad { border-color: rgba(201, 56, 83, .42); }
.studio-scenario-ending-grid footer { padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.55; }
.studio-scenario-penalty ol { display: grid; margin: 0; padding: 0; list-style: none; gap: 8px; }
.studio-scenario-penalty li { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: start; padding: 12px; border-radius: 12px; background: var(--surface-2); gap: 12px; }
.studio-scenario-penalty li > b { color: #c93853; font-size: 18px; }
.studio-scenario-penalty li div { display: grid; gap: 4px; }
.studio-scenario-terminal { padding: 15px; border: 1px solid rgba(201, 56, 83, .42); border-radius: 13px; background: rgba(201, 56, 83, .07); }
.studio-world-document-editor.scenario-editor textarea[name="content"] { min-height: 52vh; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.55; tab-size: 2; }

.studio-world-category {
  display: grid;
  gap: 10px;
}

.studio-world-category > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.studio-world-category > header h4 {
  margin: 0;
  font-size: 15px;
}

.studio-world-category > header span {
  color: var(--muted, #777);
  font-size: 12px;
}

.studio-world-document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.studio-world-document-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e8e8ee;
  border-radius: 14px;
  background: #fff;
}

.studio-world-document-card.complete {
  border-color: #d9d0ff;
}

.studio-world-document-main {
  display: grid;
  width: 100%;
  min-height: 154px;
  padding: 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  gap: 8px;
}

.studio-world-document-main > span {
  width: max-content;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f3f0ff;
  color: #6c4ed8;
  font-size: 11px;
  font-weight: 700;
}

.studio-world-document-main strong {
  overflow-wrap: anywhere;
  color: #000;
  font-size: 15px;
}

.studio-world-document-main p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: #666672;
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.studio-world-document-main small {
  color: #9995a4;
}

.studio-world-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 12px;
  border-top: 1px solid #f0eff4;
}

.studio-world-document-actions button {
  padding: 7px 9px;
  border: 1px solid #e2e0e8;
  border-radius: 8px;
  background: #faf9fc;
  color: #55515e;
  font-size: 11px;
  cursor: pointer;
}

.studio-world-document-actions button:first-child {
  flex: 1 1 100%;
}

.studio-world-document-actions button.danger {
  color: #b93f55;
}

.modal-child-layer {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 4;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: inherit;
  background: #151517;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.58);
  flex-direction: column;
}

.modal-child-layer > .modal-body {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 0;
}

.modal-child-layer > .modal-footer {
  flex: 0 0 auto;
}

.auth-official-modal.has-modal-child-layer { overflow: hidden; }
.auth-official-modal > .identity-policy-layer {
  position: fixed;
  inset: 24px auto;
  left: 50%;
  transform: translateX(-50%);
  width: min(446px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  border: 1px solid #292c30;
  border-radius: 20px;
}
.identity-policy-layer > .modal-body {
  display: block;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 24px 20px;
}
.identity-policy-layer .policy-article { overflow-wrap: anywhere; line-height: 1.7; }
.identity-policy-layer .policy-article h2 { margin: 20px 0 8px; font-size: 16px; }
.identity-policy-layer .policy-article p { margin: 8px 0; }
.identity-policy-layer {
  background: #fff;
  color: #111;
}
.identity-policy-layer .modal-header h2,
.identity-policy-layer .modal-header p,
.identity-policy-layer .policy-article,
.identity-policy-layer .policy-article h2,
.identity-policy-layer .policy-article p { color: #111; }
.identity-policy-layer .modal-close {
  background: #f0f0f0;
  border-color: #ccc;
  color: #111;
}
.identity-policy-layer .modal-header,
.identity-policy-layer .modal-footer { background: #fff; border-color: #ddd; }

.modal-panel.studio-document-library-modal {
  display: flex;
  width: min(96vw, 1440px);
  height: min(92vh, 980px);
  max-height: 92vh;
  flex-direction: column;
}

.modal-panel.studio-document-library-modal .modal-body {
  min-height: 0;
  overflow: auto;
}

.studio-document-library-panel {
  display: grid;
  min-width: 0;
  padding: clamp(16px, 2.5vw, 32px);
  gap: 18px;
}

.studio-document-library-controls {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.studio-document-library-controls.locked {
  opacity: .48;
  pointer-events: none;
  user-select: none;
}

.studio-document-sync-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  gap: 14px;
}

.studio-document-anchor-preview {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.studio-document-anchor-preview > img,
.studio-document-anchor-preview > span {
  width: 76px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--surface-3), var(--surface-1));
  color: var(--accent);
  font-size: 28px;
  font-weight: 900;
  object-fit: cover;
}

.studio-document-anchor-preview > span {
  display: grid;
  place-items: center;
}

.studio-document-anchor-preview > div,
.studio-document-snapshot-empty {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.studio-document-anchor-preview strong,
.studio-document-snapshot-empty strong { color: var(--text); }
.studio-document-anchor-preview small,
.studio-document-snapshot-empty small { color: var(--muted); line-height: 1.55; }

.studio-document-snapshot-preview {
  display: grid;
  min-width: 150px;
  place-items: center;
  gap: 7px;
}

.studio-document-snapshot-locale-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: #c99b64;
  font-size: 10px;
  cursor: pointer;
}

.studio-document-snapshot-locale-action:hover,
.studio-document-snapshot-locale-action:focus-visible { color: #f0bd7b; }

.studio-document-snapshot-empty {
  width: min(260px, 100%);
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

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

.studio-world-bootstrap-lanes > header {
  grid-column: 1 / -1;
}

.studio-world-bootstrap-lanes > header > div {
  display: grid;
  gap: 4px;
}

.studio-world-bootstrap-lanes > header small { color: var(--muted); }

.studio-world-bootstrap-lane {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  gap: 12px;
}

.studio-world-bootstrap-lane > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.studio-world-bootstrap-lane strong { color: var(--text); }
.studio-world-bootstrap-lane small { color: var(--muted); line-height: 1.45; }
.studio-world-bootstrap-lane > b { color: var(--muted); font-size: 12px; white-space: nowrap; }
.studio-world-bootstrap-lane.ready { border-color: rgb(72 171 100 / 55%); }
.studio-world-bootstrap-lane.ready > b { color: #62c77d; }
.studio-world-bootstrap-lane.error { border-color: rgb(224 86 99 / 58%); }
.studio-world-bootstrap-lane.error > b { color: #f07d87; }

.studio-world-bootstrap-lane-icon {
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.studio-world-bootstrap-lane.generating .studio-world-bootstrap-lane-icon {
  border-color: rgb(255 116 37 / 24%);
  border-top-color: var(--accent);
  animation: studio-world-snapshot-spin .8s linear infinite;
}

.studio-world-bootstrap-lane.ready .studio-world-bootstrap-lane-icon {
  border-color: #62c77d;
  background: #62c77d;
}

.studio-world-bootstrap-lane.error .studio-world-bootstrap-lane-icon { border-color: #f07d87; }

.studio-world-bootstrap-lane > button {
  grid-column: 2 / -1;
  justify-self: start;
}

.studio-world-bootstrap-confirmation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface-2));
  gap: 16px;
}

.studio-world-bootstrap-confirmation > header,
.studio-world-bootstrap-setup-actions {
  grid-column: 1 / -1;
}

.studio-world-bootstrap-confirmation > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.studio-world-bootstrap-confirmation > header > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.studio-world-bootstrap-confirmation strong,
.studio-appearance-anchor-history strong { color: var(--text); }
.studio-world-bootstrap-confirmation small,
.studio-appearance-anchor-history small { color: var(--muted); line-height: 1.5; }
.studio-world-bootstrap-confirmation > header > span,
.studio-appearance-anchor-history > header > span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-3));
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.studio-world-generation-hint { grid-column: 1 / -1; }

.studio-prose-anchor {
  display: grid;
  grid-column: 1 / -1;
  min-width: 0;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-1);
  gap: 14px;
}

.studio-prose-anchor > header > div,
.studio-prose-anchor-result > header > div { display: grid; min-width: 0; gap: 4px; }
.studio-prose-anchor > header small,
.studio-prose-anchor-result small { color: var(--muted); line-height: 1.5; }
.studio-prose-anchor-modes { display: flex; min-width: 0; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.studio-prose-anchor-modes > button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 750;
}
.studio-prose-anchor-modes > button.active {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
  color: var(--accent);
}
.studio-prose-anchor textarea { min-height: clamp(150px, 24vh, 280px); resize: vertical; }
.studio-prose-anchor-file input { padding: 10px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2); }
.studio-prose-anchor-actions { display: flex; justify-content: flex-end; }
.studio-prose-anchor-result { display: grid; padding: 14px; border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--accent) 5%, var(--surface-2)); gap: 12px; }
.studio-prose-anchor-result > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.studio-prose-anchor-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.studio-prose-anchor-result article { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-1); }
.studio-prose-anchor-result p { margin: 7px 0 0; color: var(--text); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.studio-prose-anchor-result details > summary { cursor: pointer; color: var(--text); font-weight: 800; }
.studio-prose-anchor-card-plan { display: grid; margin-top: 10px; gap: 8px; }

.studio-world-bootstrap-setup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.studio-world-bootstrap-start { min-height: 48px; }

.studio-appearance-anchor-history {
  display: grid;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  gap: 12px;
}

.studio-appearance-anchor-history > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.studio-appearance-anchor-history > header > div,
.studio-appearance-anchor-history > div,
.studio-appearance-anchor-version > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.studio-appearance-anchor-version {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-1);
  gap: 12px;
}

.studio-appearance-anchor-version.current {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface-1));
}

.studio-appearance-anchor-version > img,
.studio-appearance-anchor-version > span {
  display: grid;
  width: 58px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
  object-fit: cover;
  place-items: center;
}

.studio-appearance-anchor-confirm {
  display: grid;
  width: min(100%, 620px);
  gap: 18px;
}

.studio-appearance-anchor-confirm > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.studio-appearance-anchor-confirm figure {
  display: grid;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.studio-appearance-anchor-confirm figure > img,
.studio-appearance-anchor-confirm figure > span {
  display: grid;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 330px;
  background: var(--surface-3);
  color: var(--accent);
  font-size: 34px;
  font-weight: 900;
  object-fit: contain;
  place-items: center;
}

.studio-appearance-anchor-confirm figcaption {
  padding: 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.studio-appearance-anchor-confirm > div > b { color: var(--muted); }
.studio-appearance-anchor-confirm ul { display: grid; margin: 0; padding-left: 20px; color: var(--muted); gap: 8px; }
.studio-appearance-anchor-clear-confirm > div { grid-template-columns: minmax(0, 320px); justify-content: center; }
.studio-current-selection-label {
  display: inline-flex;
  min-height: 34px;
  padding: 0 10px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 52%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.studio-domain-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  gap: 16px;
}

.studio-domain-entry > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.studio-domain-entry strong { color: var(--text); }
.studio-domain-entry small { color: var(--muted); line-height: 1.5; }
.studio-domain-entry > button { flex: 0 0 auto; }

.studio-world-document-editor {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: 100%;
  min-height: 0;
  padding: 22px clamp(18px, 4vw, 64px) 28px;
  background: #f7f7fa;
  gap: 16px;
}

.studio-world-document-editor-meta {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(240px, 1.4fr) minmax(210px, .8fr);
  gap: 12px;
}

.studio-world-document-workspace {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 22vw);
  gap: 16px;
}

.studio-world-document-editor-fields {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
}

.studio-world-document-editor-body {
  display: grid;
  min-height: 0;
  padding: clamp(18px, 3vw, 36px);
  border: 1px solid #dddde5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 30px rgb(28 24 45 / 7%);
  grid-template-rows: auto minmax(0, 1fr);
}

.studio-world-document-editor-body textarea {
  width: min(100%, 960px);
  min-height: 100%;
  margin: 0 auto;
  padding: 18px 10px 40vh;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #272431;
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.85;
}

.studio-world-document-knowledge-cache {
  padding: 16px 18px;
  border: 1px solid #dddde5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 30px rgb(28 24 45 / 5%);
}

.studio-world-document-knowledge-cache textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.65;
}

.studio-world-document-knowledge-cache > small {
  color: var(--muted);
  line-height: 1.5;
}

.studio-world-version-history {
  display: grid;
  min-width: 0;
  min-height: 0;
  padding: 14px;
  border: 1px solid #dddde5;
  border-radius: 10px;
  background: #fff;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.studio-world-version-history > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.studio-world-version-history > header strong {
  color: #000;
}

.studio-world-version-history > header small,
.studio-world-version-item small {
  color: #6f6b78;
}

.studio-world-version-list {
  display: grid;
  min-height: 0;
  padding-right: 2px;
  overflow-x: hidden;
  overflow-y: auto;
  align-content: start;
  gap: 10px;
}

.studio-world-version-item {
  display: grid;
  padding: 12px;
  border: 1px solid #e2e0e8;
  border-radius: 9px;
  background: #faf9fc;
  gap: 10px;
}

html.studio-world-generation-locked,
body.studio-world-generation-locked {
  overflow: hidden;
}

.studio-world-generation-overlay {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  padding: clamp(16px, 4vw, 56px);
  overflow: auto;
  background: rgb(4 7 6 / 94%);
  color: #fff8e8;
  place-items: center;
}

.studio-world-generation-stage {
  display: grid;
  grid-template-columns: minmax(260px, 410px) minmax(320px, 620px);
  width: min(100%, 1080px);
  min-height: min(760px, calc(100vh - 64px));
  overflow: hidden;
  border: 1px solid rgb(190 145 68 / 48%);
  border-radius: 24px;
  background: #08100c;
  box-shadow: 0 34px 100px rgb(0 0 0 / 65%);
}

.studio-world-generation-stage.bootstrap {
  min-height: 0;
  max-height: calc(100vh - clamp(32px, 8vw, 112px));
}

.studio-world-generation-stage.world-only {
  grid-template-columns: minmax(320px, 760px);
  width: min(100%, 760px);
}

.studio-world-generation-overlay[data-terminal="true"] .studio-world-generation-stage {
  cursor: pointer;
}

.studio-world-generation-overlay[data-terminal="true"] button,
.studio-world-generation-overlay[data-terminal="true"] a {
  cursor: pointer;
}

.studio-world-generation-stage.bootstrap .studio-world-generation-progress {
  justify-content: flex-start;
  padding: clamp(98px, 9vw, 118px) clamp(24px, 3.2vw, 42px) clamp(24px, 3.2vw, 42px);
  overflow-x: hidden;
  overflow-y: auto;
}

.studio-world-generation-poster {
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #07100b;
  place-items: stretch;
}

.studio-world-generation-character-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center top;
}

.studio-world-generation-image-pending {
  display: grid;
  min-height: 650px;
  padding: 28px;
  align-content: center;
  background: linear-gradient(145deg, #17231c, #07100b 70%);
  color: #c8c1b4;
  text-align: center;
  gap: 8px;
}

.studio-world-generation-image-pending strong {
  color: #fff5dc;
  font-size: 18px;
}

.studio-world-generation-image-pending span {
  font-size: 12px;
  line-height: 1.6;
}

.studio-world-generation-progress {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  padding: clamp(28px, 5vw, 68px);
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 85% 10%, rgb(173 125 43 / 18%), transparent 36%),
    linear-gradient(145deg, #111b16, #070b09);
}

.studio-world-generation-progress .eyebrow {
  margin: 0 0 10px;
  color: #d9ab5d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .24em;
}

.studio-world-generation-progress h1 {
  margin: 0;
  color: #fff5dc;
  font-size: clamp(27px, 4vw, 48px);
  letter-spacing: -.04em;
}

.studio-world-generation-progress h1.completed {
  max-width: 18ch;
  color: #ffe6a8;
  font-size: clamp(25px, 3.4vw, 42px);
  line-height: 1.22;
  text-wrap: balance;
  text-shadow: 0 12px 36px rgb(218 169 86 / 22%);
}

.studio-world-generation-progress > div > p:last-child {
  min-height: 3em;
  margin: 18px 0 0;
  color: #d3c8b2;
  font-size: clamp(14px, 1.7vw, 18px);
  line-height: 1.7;
}

.studio-world-generation-spinner {
  width: 42px;
  height: 42px;
  margin-bottom: 24px;
  border: 2px solid rgb(218 171 91 / 24%);
  border-top-color: #dda956;
  border-radius: 50%;
  animation: studio-world-snapshot-spin .8s linear infinite;
}

@keyframes studio-world-snapshot-spin {
  to { transform: rotate(360deg); }
}

.studio-world-generation-progress ol {
  display: grid;
  max-height: 330px;
  margin: 28px 0 20px;
  padding: 0;
  overflow: auto;
  list-style: none;
  gap: 10px;
}

.studio-world-generation-progress li {
  display: grid;
  padding: 12px 14px;
  border-left: 2px solid #c79442;
  background: rgb(255 255 255 / 4%);
  animation: studio-world-snapshot-fact-in .3s ease both;
  gap: 5px;
}

.studio-world-generation-progress li strong { color: #f0cf91; font-size: 12px; }
.studio-world-generation-progress li span { color: #c8c1b4; font-size: 12px; line-height: 1.55; }
.studio-world-generation-progress > small { color: #8f988f; font-size: 11px; }

.studio-world-generation-total-progress {
  position: absolute;
  z-index: 4;
  top: clamp(22px, 3vw, 34px);
  right: clamp(24px, 3.2vw, 42px);
  display: grid;
  width: min(240px, calc(100% - 48px));
  padding: 12px 14px;
  border: 1px solid rgb(240 207 145 / 24%);
  border-radius: 14px;
  background: rgb(4 10 7 / 72%);
  box-shadow: 0 12px 34px rgb(0 0 0 / 22%);
  backdrop-filter: blur(12px);
  gap: 8px;
}

.studio-world-generation-total-progress > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.studio-world-generation-total-progress span,
.studio-world-generation-total-progress small {
  color: #bdb6a9;
  font-size: 11px;
}

.studio-world-generation-total-progress strong {
  color: #ffe6a8;
  font-size: 22px;
  line-height: 1;
}

.studio-world-generation-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
}

.studio-world-generation-progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b6782d, #f0cf91);
  transition: width .24s ease;
}

.studio-world-generation-lanes,
.studio-world-generation-results {
  display: grid;
  margin-top: 18px;
  gap: 9px;
}

.studio-world-generation-results {
  margin-top: 24px;
}

.studio-world-generation-lane,
.studio-world-generation-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 11px;
  background: rgb(255 255 255 / 4%);
  gap: 10px;
}

.studio-world-generation-lane > span:first-child {
  width: 10px;
  height: 10px;
  border: 2px solid #696f69;
  border-radius: 50%;
}

.studio-world-generation-lane.generating > span:first-child {
  border-color: rgb(218 169 86 / 24%);
  border-top-color: #dda956;
  animation: studio-world-snapshot-spin .8s linear infinite;
}

.studio-world-generation-lane.ready > span:first-child { border-color: #62c77d; background: #62c77d; }
.studio-world-generation-lane.error > span:first-child { border-color: #f07d87; }
.studio-world-generation-lane > div,
.studio-world-generation-result { min-width: 0; }
.studio-world-generation-lane > div { display: grid; gap: 3px; }
.studio-world-generation-lane strong,
.studio-world-generation-result strong { color: #fff5dc; font-size: 12px; }
.studio-world-generation-lane small,
.studio-world-generation-result span { color: #bdb6a9; font-size: 11px; line-height: 1.45; }
.studio-world-generation-lane > b { color: #d9ab5d; font-size: 11px; white-space: nowrap; }
.studio-world-generation-result { grid-template-columns: minmax(0, 1fr); align-items: start; }
.studio-world-generation-result.pending { border-style: dashed; }

.studio-world-generation-points {
  display: grid;
  padding: 18px;
  border: 1px solid rgb(218 169 86 / 24%);
  border-radius: 14px;
  background: rgb(218 169 86 / 7%);
  gap: 12px;
}

.studio-world-generation-points > strong {
  color: #f0cf91;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.studio-world-generation-points > div,
.studio-world-snapshot-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.studio-world-generation-points > div > span,
.studio-world-snapshot-points > span {
  display: inline-flex;
  min-height: 30px;
  padding: 6px 11px;
  align-items: center;
  border: 1px solid rgb(255 229 171 / 18%);
  border-radius: 999px;
  background: rgb(255 255 255 / 6%);
  color: #fff3d8;
  font-size: 12px;
  line-height: 1.35;
}

.studio-world-generation-points > div > span.pending {
  border-style: dashed;
  color: #bdb6a9;
}

.studio-world-snapshot-points {
  margin-top: auto;
  padding-top: 18px;
}

.studio-world-generation-close-confirmation {
  z-index: 8;
  padding: 24px;
  background: rgb(0 0 0 / 72%);
}

.studio-world-generation-close-confirmation .modal-panel {
  width: min(100%, 480px);
  cursor: default;
}

.studio-world-generation-close-confirmation .studio-callout {
  margin: 0;
}

.studio-world-generation-close-confirmation .studio-callout p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.studio-world-generation-actions {
  position: sticky;
  z-index: 3;
  bottom: -1px;
  display: flex;
  margin: 22px -6px -8px;
  padding: 14px 6px 8px;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid rgb(255 255 255 / 10%);
  background: linear-gradient(to bottom, transparent, #090f0c 22%);
  gap: 10px;
}

.studio-world-generation-actions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-world-generation-actions button { min-height: 42px; }

@keyframes studio-world-snapshot-fact-in {
  from { opacity: 0; transform: translateY(8px); }
}

.studio-world-snapshot-poster {
  position: relative;
  isolation: isolate;
  width: min(100%, 499px);
  aspect-ratio: 499 / 867;
  overflow: hidden;
  border: 1px solid #9a7336;
  border-radius: 18px;
  background: #06100a;
  color: #fff5dc;
  box-shadow: inset 0 0 0 5px rgb(4 12 8 / 72%);
}

.studio-world-snapshot-media,
.studio-world-snapshot-shade {
  position: absolute;
  z-index: -2;
  inset: 0;
}

.studio-world-snapshot-media img,
.studio-world-snapshot-media-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-world-snapshot-media-fallback {
  display: grid;
  background:
    radial-gradient(circle at 34% 30%, rgb(209 158 74 / 24%), transparent 26%),
    linear-gradient(145deg, #18271d, #06100a 62%);
  color: rgb(226 184 109 / 34%);
  font-family: Georgia, serif;
  font-size: clamp(90px, 24vw, 190px);
  place-items: center;
}

.studio-world-snapshot-shade {
  z-index: -1;
  background:
    linear-gradient(180deg, rgb(1 7 4 / 22%) 0%, rgb(2 8 5 / 55%) 45%, rgb(2 8 5 / 96%) 78%),
    linear-gradient(90deg, transparent 35%, rgb(2 8 5 / 56%));
}

.studio-world-snapshot-copy {
  display: flex;
  height: 100%;
  padding: clamp(24px, 6%, 40px);
  flex-direction: column;
  justify-content: flex-end;
}

.studio-world-snapshot-copy header > span {
  display: inline-block;
  padding-bottom: 7px;
  border-bottom: 1px solid rgb(226 176 88 / 60%);
  color: #d7a958;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .2em;
}

.studio-world-snapshot-copy h2 {
  margin: 12px 0 6px;
  color: #fff4d9;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 8vw, 62px);
  font-weight: 600;
  line-height: 1;
  text-shadow: 0 3px 18px #000;
}

.studio-world-snapshot-copy header p {
  margin: 0;
  color: #f1d39a;
  font-size: 13px;
  line-height: 1.55;
}

.studio-world-snapshot-copy blockquote {
  margin: 18px 0;
  padding: 12px 0;
  border-block: 1px solid rgb(213 167 87 / 35%);
  color: #f7ead1;
  font-size: 13px;
  line-height: 1.65;
}

.studio-world-snapshot-copy dl {
  display: grid;
  margin: 0;
  gap: 0;
}

.studio-world-snapshot-copy dl > div {
  display: grid;
  grid-template-columns: minmax(58px, .34fr) minmax(0, 1fr);
  padding: 8px 0;
  border-bottom: 1px solid rgb(217 174 96 / 22%);
  gap: 12px;
}

.studio-world-snapshot-copy dt { color: #d8a958; font-size: 10px; font-weight: 900; }
.studio-world-snapshot-copy dd { margin: 0; color: #eee5d5; font-size: 10px; line-height: 1.5; }
.studio-world-snapshot-copy footer { display: flex; margin-top: 14px; color: #cfad71; font-size: 9px; justify-content: space-between; gap: 10px; }
.studio-world-snapshot-copy footer small { color: #918773; }

.studio-world-snapshot-poster.compact {
  width: 112px;
  height: 128px;
  border-radius: 10px;
  box-shadow: none;
}

.studio-world-snapshot-poster.compact .studio-world-snapshot-copy { padding: 10px; }
.studio-world-snapshot-poster.compact .studio-world-snapshot-copy h2 { margin: 5px 0 3px; font-size: 17px; }
.studio-world-snapshot-poster.compact .studio-world-snapshot-copy header > span { padding-bottom: 3px; font-size: 6px; }
.studio-world-snapshot-poster.compact .studio-world-snapshot-copy header p { display: -webkit-box; overflow: hidden; font-size: 7px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.studio-world-snapshot-poster.compact .studio-world-snapshot-copy dl,
.studio-world-snapshot-poster.compact .studio-world-snapshot-copy footer { display: none; }

.studio-world-snapshot-open {
  width: 112px;
  height: 128px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.studio-world-snapshot-open:focus-visible { outline: 2px solid #dda956; outline-offset: 2px; }
.modal-panel.studio-world-snapshot-modal-shell { width: min(94vw, 860px); }
.studio-world-snapshot-modal { display: block; max-width: 100%; padding: 8px; overflow: auto; text-align: center; }
.studio-world-snapshot-modal .studio-world-snapshot-poster {
  width: 499px;
  min-width: 499px;
  height: 867px;
  margin-inline: auto;
  aspect-ratio: auto;
  text-align: left;
}

.studio-world-snapshot-locales,
.studio-world-snapshot-locale-list { display: grid; gap: 14px; }

.studio-world-snapshot-locale-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  gap: 16px;
}

.studio-world-snapshot-locale-card > div { display: grid; min-width: 0; gap: 4px; }
.studio-world-snapshot-locale-card strong { color: var(--text); }
.studio-world-snapshot-locale-card small { color: var(--muted); line-height: 1.5; }
.studio-world-snapshot-locale-card > b { color: var(--accent); font-size: 12px; }
.studio-world-snapshot-locale-card.failed > b { color: #f07d87; }

@media (max-width: 760px) {
  .studio-world-generation-overlay { padding: 0; align-items: start; }
  .studio-world-generation-stage { position: relative; grid-template-columns: 1fr; grid-template-rows: minmax(280px, 42vh) minmax(0, 1fr); width: 100%; min-height: 100dvh; border: 0; border-radius: 0; }
  .studio-world-generation-stage.bootstrap { min-height: 100dvh; max-height: none; overflow-y: auto; }
  .studio-world-generation-stage.world-only { grid-template-rows: minmax(0, 1fr); width: 100%; }
  .studio-world-generation-poster { position: relative; min-height: 280px; opacity: 1; }
  .studio-world-generation-character-image { min-height: 280px; max-height: 42vh; }
  .studio-world-generation-image-pending { min-height: 280px; }
  .studio-world-generation-progress { min-height: 0; padding: 34px 22px; background: linear-gradient(145deg, #111b16, #070b09); }
  .studio-world-generation-stage.bootstrap .studio-world-generation-progress { height: auto; min-height: 58dvh; padding: 26px 18px 0; overflow: visible; }
  .studio-world-generation-total-progress { position: relative; top: auto; right: auto; width: 100%; margin-bottom: 18px; }
  .studio-world-generation-progress ol { max-height: 42vh; }
  .studio-world-generation-stage.bootstrap .studio-world-generation-progress ol { max-height: none; }
  .studio-world-generation-actions {
    bottom: 0;
    margin: 20px -18px 0;
    padding: 18px;
    align-items: stretch;
    flex-direction: column;
  }
  .studio-world-generation-actions > div { flex-direction: column; }
  .studio-world-generation-actions button { width: 100%; }
  .studio-world-generation-close-confirmation { padding: 18px; }
  .studio-world-generation-close-confirmation .modal-panel { max-height: calc(100vh - 36px); }
  .studio-world-snapshot-poster.compact,
  .studio-world-snapshot-open { width: 86px; height: 104px; }
  .studio-prose-anchor { padding: 12px; }
  .studio-prose-anchor-result > header { align-items: stretch; flex-direction: column; }
  .studio-prose-anchor-result > header > button,
  .studio-prose-anchor-actions > button { width: 100%; }
  .studio-prose-anchor-result-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .studio-world-generation-spinner,
  .studio-world-generation-progress li { animation: none; }
}

.studio-world-version-item.active {
  border-color: #7857e5;
  background: #f5f1ff;
}

.studio-world-version-item strong {
  display: block;
  color: #000;
}

.studio-world-version-item p {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  color: #34313b;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.studio-world-version-item > button {
  width: 100%;
}

.studio-world-document-editor-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #777380;
  font-size: 12px;
}

.studio-world-document-editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  justify-self: end;
  width: min(560px, 100%);
}

.studio-world-document-editor-actions > button {
  width: 100%;
}

@media (max-width: 760px) {
  .studio-world-document-editor-meta {
    grid-template-columns: 1fr;
  }

  .studio-world-document-editor-status {
    flex-direction: column;
  }

  .studio-world-document-editor {
    padding: 14px;
  }

  .studio-world-document-editor-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .modal-panel.studio-document-library-modal {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .studio-document-sync-preview,
  .studio-world-bootstrap-lanes {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-world-bootstrap-lanes > header { grid-column: auto; }

  .studio-world-document-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-world-document-editor-body {
    min-height: 52vh;
  }

  .studio-world-version-list {
    display: flex;
    max-height: 190px;
    padding-right: 0;
    padding-bottom: 2px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .studio-world-version-item {
    flex: 0 0 min(340px, 82vw);
  }
}

@media (max-width: 760px) {
  .studio-document-library-panel { padding: 14px; }
  .studio-document-sync-preview { grid-template-columns: minmax(0, 1fr); }
  .studio-world-bootstrap-confirmation { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .studio-world-bootstrap-confirmation > header { align-items: stretch; flex-direction: column; }
  .studio-world-bootstrap-confirmation > header > span { align-self: flex-start; }
  .studio-world-bootstrap-setup-actions { position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr; padding-top: 10px; background: var(--surface-2); }
  .studio-world-bootstrap-setup-actions > button { width: 100%; }
  .studio-document-snapshot-preview { justify-items: stretch; }
  .studio-document-snapshot-empty { width: 100%; }
  .studio-world-bootstrap-lane { grid-template-columns: auto minmax(0, 1fr); }
  .studio-world-bootstrap-lane > b { grid-column: 2; }
  .studio-appearance-anchor-version { grid-template-columns: 52px minmax(0, 1fr); }
  .studio-appearance-anchor-version > img,
  .studio-appearance-anchor-version > span { width: 52px; height: 64px; }
  .studio-appearance-anchor-version > button { grid-column: 1 / -1; width: 100%; }
  .studio-appearance-anchor-confirm > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .studio-appearance-anchor-confirm > div > b { display: none; }
  .studio-appearance-anchor-confirm figure > img,
  .studio-appearance-anchor-confirm figure > span { max-height: 270px; }
  .studio-domain-entry { align-items: stretch; flex-direction: column; }
  .studio-domain-entry > button { width: 100%; }
  .studio-world-library-tabs { width: 100%; }
  .studio-world-library-tabs button { flex: 1; min-width: 0; }
  .studio-scenario-hero { align-items: stretch; flex-direction: column; }
  .studio-scenario-actions > button { flex: 1 1 100%; }
  .studio-scenario-visuals > header { align-items: stretch; flex-direction: column; }
  .studio-scenario-visual-batch { justify-items: stretch; }
  .studio-scenario-visual-card { grid-template-columns: minmax(0, 1fr); }
  .studio-scenario-visual-preview,
  .studio-scenario-visual-placeholder { min-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .studio-scenario-visual-preview img { min-height: 220px; max-height: 420px; }
  .studio-scenario-visual-axis-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-scenario-visual-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .studio-gallery-scenario-picker { grid-template-columns: minmax(0, 1fr); }
  .studio-scenario-visual-context dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .studio-scenario-act-grid,
  .studio-scenario-ending-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-scenario-branch-list > article { grid-template-columns: minmax(0, 1fr); }
  .studio-scenario-episode-list > article { grid-template-columns: minmax(0, 1fr); }
}

/* AUTH-001 / CHAT-001: account gender and per-character conversation profiles. */
button.top-profile-button.guest-signup {
  width: auto;
  min-width: 72px;
  height: 34px;
  padding: 0 14px;
  overflow: visible;
  border: 1px solid rgba(255, 91, 24, .68);
  border-radius: 999px;
  background: rgba(20, 20, 22, .9);
  color: #ff7440;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

button.top-profile-button.member-initial {
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  background: #020203;
}

.top-profile-initial {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.auth-signup-profile-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: #c6c7ca;
  font-size: 12px;
  font-weight: 700;
}

.auth-signup-profile-field select {
  width: 100%;
  height: 44px;
  padding: 0 11px;
  border: 1px solid #373a3f;
  border-radius: 8px;
  background: #292c30;
  color: #fff;
}

.conversation-persona-card {
  border-color: rgba(255, 255, 255, .1);
  background: #1a1a1d;
  cursor: pointer;
}

.conversation-persona-card.selected {
  border-color: #ff6a1a;
  background: linear-gradient(110deg, rgba(112, 41, 14, .38), rgba(24, 24, 27, .98));
}

.conversation-persona-card b:empty { background: transparent; }

.conversation-persona-card .conversation-profile-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: #2c2c30;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.conversation-profile-add {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border: 1px dashed rgba(255, 106, 26, .48);
  border-radius: 12px;
  background: rgba(255, 106, 26, .06);
  color: #e8e8ea;
  font-weight: 800;
  cursor: pointer;
}

.conversation-profile-add b {
  color: #ff6a1a;
  font-size: 20px;
}

@media (max-width: 760px) {
  button.top-profile-button.guest-signup { min-width: 66px; height: 30px; padding: 0 11px; }
  button.top-profile-button.member-initial { width: 30px; height: 30px; }
}

/* Chat collection: one persistent collection modal with a nested media viewer. */
.detail-full-gallery-backdrop {
  background:
    radial-gradient(circle at 50% 12%, rgba(133, 51, 21, .24), transparent 38%),
    rgba(2, 2, 3, .82);
  backdrop-filter: blur(11px);
}

.collection-modal {
  width: min(580px, calc(100vw - 32px));
  min-width: min(580px, calc(100vw - 32px));
  height: min(812px, calc(100dvh - 40px));
  max-height: min(812px, calc(100dvh - 40px));
  border-color: rgba(221, 107, 50, .3);
  background:
    radial-gradient(circle at 48% -8%, rgba(199, 74, 28, .28), transparent 42%),
    linear-gradient(158deg, rgba(70, 27, 16, .985) 0%, rgba(29, 16, 14, .99) 29%, rgba(13, 13, 15, .995) 68%),
    #111;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .7), inset 0 1px rgba(255, 168, 110, .09);
}

.collection-modal::before {
  position: absolute;
  inset: 0 0 auto;
  height: 160px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(158, 54, 21, .18), transparent);
  content: "";
  pointer-events: none;
}

.collection-modal > * { position: relative; z-index: 1; }
.collection-modal header strong { color: #fff3e9; letter-spacing: -.02em; }
.collection-modal header strong > i { color: #ff8c52; }
.collection-modal-scroll::-webkit-scrollbar-thumb { background: linear-gradient(#a64a28, #eb793f); }

.collection-modal-scroll { height: calc(100% - 108px); }
.collection-modal-grid { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.collection-modal-grid .gallery-item { width: 100%; min-width: 0; height: auto; aspect-ratio: 115 / 200; }

.collection-modal header > .collection-modal-back {
  top: -5px;
  right: auto;
  left: 25px;
  font-size: 21px;
}

.collection-modal header > .collection-modal-close { top: -5px; right: 25px; }
.collection-modal header > .collection-modal-back i,
.collection-modal header > .collection-modal-close i { display: flex; }

.collection-modal-grid .gallery-item {
  border: 1px solid rgba(var(--card-grade-rgb), .72);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .32), 0 0 14px rgba(var(--card-grade-rgb), .12);
}

.collection-modal-grid .gallery-item::after {
  padding: 2px;
  background: linear-gradient(145deg, rgba(255, 160, 105, .95), rgba(var(--card-grade-rgb), .85) 48%, rgba(255, 214, 174, .65));
}

.gallery-card.locked > img,
.chat-management-gallery .locked img {
  /* The API serves an irreversible protected preview; this keeps the subject roughly 30% recognizable without stacking an opaque second blur. */
  opacity: .72;
  filter: blur(2.5px) brightness(.72) saturate(.78);
  transform: scale(1.035);
}

.lock-badge,
.chat-gallery-lock-badge {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(24, 24, 26, .66);
  color: #fff;
  font-size: 16px;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .34);
  backdrop-filter: blur(7.5px);
  pointer-events: none;
}

.chat-gallery-lock-badge {
  width: 38px;
  height: 38px;
}

.lock-badge i,
.chat-gallery-lock-badge i { display: flex; }

.gallery-new-badge,
.chat-new-badge {
  position: absolute;
  z-index: 6;
  top: 7px;
  left: 7px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 5px;
  background: linear-gradient(135deg, #ff4b16, #ff7b24);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 14px rgba(255, 76, 22, .38);
}

.gallery-card-play {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 50%;
  background: rgba(15, 12, 13, .72);
  color: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .48);
  backdrop-filter: blur(7px);
  pointer-events: none;
}

.gallery-card-play i { display: flex; margin-left: 2px; font-size: 15px; }
.gallery-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #111214;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .32);
}
.gallery-card::after {
  position: absolute;
  z-index: 7;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 157, 100, .96), rgba(var(--card-grade-rgb), .88) 46%, rgba(255, 226, 190, .76));
  content: "";
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.gallery-card > img { display: block; width: 100%; height: 100%; background: #080809; object-fit: contain; }
.gallery-card-rail,
.gallery-card-info,
.gallery-card-detail,
.gallery-card-collection { aspect-ratio: 2 / 3; }
.gallery-card > img,
.gallery-card-hover-video { transition: opacity .18s ease, transform .22s ease; }
.gallery-card-hover-video {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #0b0b0c;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
}
.gallery-card[data-gallery-video-card="true"]:hover .gallery-card-hover-video,
.gallery-card[data-gallery-video-card="true"]:focus-visible .gallery-card-hover-video { opacity: 1; }
.gallery-card[data-gallery-video-card="true"]:hover .gallery-card-play,
.gallery-card[data-gallery-video-card="true"]:focus-visible .gallery-card-play { opacity: 0; }

.gallery-view-backdrop,
.gallery-view-layer {
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .74);
  backdrop-filter: blur(10px);
}

.gallery-view-layer {
  position: absolute;
  z-index: 20;
  inset: 0;
  border-radius: 20px;
}

.gallery-view-stage {
  position: relative;
  display: block;
  width: auto;
  height: min(960px, calc(100% - 24px), calc(100dvh - 48px));
  aspect-ratio: 2 / 3;
  max-width: min(640px, calc(100% - 72px));
  min-width: 0;
  min-height: 0;
  overflow: visible;
  padding: 0;
  border: 1px solid rgba(255, 151, 92, .28);
  border-radius: 22px;
  background: #080809;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .72), inset 0 1px rgba(255, 255, 255, .08);
}

.gallery-view-media {
  position: absolute;
  inset: 0;
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: inherit;
  background: #080809;
}

.gallery-view-media > img,
.gallery-view-media > video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: #080809;
  object-fit: contain;
}
.gallery-view-close,
.gallery-view-nav,
.gallery-view-counter,
.gallery-view-replay,
.gallery-view-sound { position: absolute; z-index: 8; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); background: rgba(18,18,20,.78); color: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.36); backdrop-filter: blur(10px); }
.gallery-view-close { top: 12px; right: 12px; width: 42px; height: 42px; padding: 0; border-radius: 50%; font-size: 25px; cursor: pointer; }
.gallery-view-nav { top: 50%; width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; transform: translateY(-50%); }
.gallery-view-nav.prev { left: 12px; }
.gallery-view-nav.next { right: 12px; }
.gallery-view-nav:disabled { visibility: hidden; pointer-events: none; }
.gallery-view-counter { right: 12px; bottom: 12px; display: flex; height: 34px; align-items: center; gap: 6px; padding: 0 13px; border-radius: 18px; }
.gallery-view-counter > span { color: #fff; font-size: 12px; }
.gallery-view-counter > b { color: #ff6a24; font-size: 14px; }
.gallery-view-counter > strong { color: #eee; font-size: 14px; }
.gallery-view-replay { top: 50%; left: 50%; width: 58px; height: 58px; padding: 0; border-radius: 50%; font-size: 21px; cursor: pointer; transform: translate(-50%,-50%); }
.gallery-view-replay i { display: flex; margin-left: 3px; }
.gallery-view-replay[hidden] { display: none; }
.gallery-view-sound { bottom: 12px; left: 12px; width: 38px; height: 38px; padding: 0; border-radius: 50%; font-size: 15px; cursor: pointer; }
.gallery-view-sound i { display: flex; }

@media (max-width: 760px) {
  .chat-mode .modal-backdrop:has(.chat-persona-modal),
  .chat-mode .modal-backdrop:has(.chat-note-selector-modal) { align-items: center; padding: 20px; }
  .chat-mode .modal-panel.chat-persona-modal,
  .chat-mode .modal-panel.chat-note-selector-modal { width: min(350px,100%); max-height: calc(100dvh - 40px); border-radius: 16px; }
  .chat-character-info-dialog { width: 100vw; }
  .chat-character-info-hero { height: 270px; }
  .detail-full-gallery-backdrop { align-items: stretch; }
  .collection-modal { width: 100vw; min-width: 0; height: 100dvh; max-height: 100dvh; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; }
  .collection-modal header { justify-content: flex-start; padding-left: 22px; }
  .collection-modal header strong { font-size: 17px; }
  .collection-modal header > .collection-modal-back { top: -6px; left: -12px; }
  .collection-modal header > .collection-modal-close { top: -6px; right: -2px; }
  .collection-modal-filter { margin: 14px 0 8px; overflow: hidden; }
  .collection-modal .modal-grade-pills { min-height: 30px; flex-wrap: nowrap; justify-content: flex-start; align-content: center; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .collection-modal .modal-grade-pills::-webkit-scrollbar { display: none; }
  .collection-modal .modal-grade-pills .detail-grade-pill { width: auto; min-width: 104px; flex: 0 0 auto; padding: 0 10px; }
  .collection-modal .modal-grade-pills .grade-bronze { min-width: 112px; }
  .collection-modal .modal-grade-pills .grade-silver { min-width: 108px; }
  .collection-modal .modal-grade-pills .grade-platinum { min-width: 128px; }
  .collection-modal-scroll { height: calc(100% - 66px); padding-right: 0; scrollbar-width: none; }
  .collection-modal-scroll::-webkit-scrollbar { display: none; }
  .collection-modal-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; padding: 0; }
  .collection-modal-grid .gallery-item { width: 100%; height: auto; aspect-ratio: 115/200; }
  .gallery-view-backdrop,
  .gallery-view-layer { padding: 12px; }
  .gallery-view-layer { border-radius: 18px; }
  .gallery-view-stage {
    width: auto;
    height: min(calc(100dvh - 24px), calc((100vw - 48px) * 1.5));
    aspect-ratio: 2 / 3;
    max-width: calc(100% - 24px);
    padding: 0;
    border-radius: 17px;
  }
  .gallery-view-media { border-radius: 12px; }
}

/* STUDIO-CREATION-NORMALIZATION-001: custom values, honest empty media, mobile-safe creation. */
.studio-custom-choice-input {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 106, 32, .42);
  border-radius: 11px;
  background: rgba(255, 106, 32, .06);
}
.studio-custom-choice-input > span { color: #e9e9ed; font-size: 11px; font-weight: 800; }
.studio-custom-choice-input > span small { margin-left: 5px; color: #8e8f96; font-size: 9px; font-weight: 600; }
.studio-custom-choice-input input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #3a3b42;
  border-radius: 9px;
  outline: 0;
  background: #101115;
  color: #f5f5f7;
}
.studio-custom-choice-input input:focus { border-color: #ff6a20; box-shadow: 0 0 0 3px rgba(255,106,32,.12); }
.studio-choice-custom { border-style: dashed; }
.studio-media-placeholder,
.draft-row-placeholder {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #222328, #121317);
  color: #8b8c93;
  text-align: center;
}
.studio-media-placeholder { min-height: 160px; gap: 5px; padding: 16px; border: 1px dashed #414249; border-radius: 11px; }
.studio-media-placeholder span { color: #c2c3c8; font-size: 12px; font-weight: 800; }
.studio-media-placeholder small { font-size: 10px; line-height: 1.45; }
.draft-row-placeholder { width: 54px; height: 54px; border-radius: 8px; font-size: 18px; font-weight: 900; }
.studio-form-card,
.studio-form-body,
.studio-form-section,
.studio-field,
.studio-media-source-panel,
.studio-video-generator,
.studio-video-planner { min-width: 0; }
.studio-form-body,
.studio-callout,
.studio-model-separation,
.studio-reference-picker { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  body[data-current-route="studio-easy"],
  body[data-current-route="studio-custom"] { padding-bottom: calc(92px + env(safe-area-inset-bottom)); overflow-x: clip; }
  .studio-form-card > .studio-bottom-actions { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .studio-choice,
  .studio-mini-button,
  .studio-add-button,
  .studio-easy-next,
  .studio-media-generation-tabs button,
  .studio-media-modal .upload-tabs button { min-height: 44px; }
  .studio-field input,
  .studio-field textarea,
  .studio-field select,
  .modal-field input,
  .modal-field textarea,
  .modal-field select,
  .studio-custom-choice-input input { max-width: 100%; font-size: 16px; }
  .studio-form-body { padding-right: 14px; padding-bottom: calc(30px + env(safe-area-inset-bottom)); padding-left: 14px; }
  .studio-choice-row { max-width: 100%; }
  .studio-choice-row.dense { gap: 7px; }
  .studio-profile-media { align-items: stretch; }
  .studio-profile-media .studio-media-placeholder { width: 104px; min-height: 104px; padding: 9px; }
  .studio-media-generation-tabs {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }
  .studio-media-generation-tabs button { flex: 0 0 auto; scroll-snap-align: start; }
  .studio-media-generation-tabs button:last-child { grid-column: auto; }
  .studio-reference-picker.empty { align-items: stretch; }
  .studio-reference-picker.empty button { width: 100%; min-height: 44px; }
}

@media (max-width: 560px) {
  .modal-backdrop:has(.studio-media-modal) { align-items: stretch; }
  .modal-panel.studio-media-modal {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .studio-media-modal .modal-header { padding-top: max(14px, env(safe-area-inset-top)); }
  .studio-media-modal .modal-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .studio-media-shell { gap: 11px; }
  .studio-media-modal .upload-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .studio-media-modal .upload-tabs button { flex: 1 0 auto; }
  .studio-reference-picker.selected { grid-template-columns: minmax(0, 1fr) 44px; }
  .studio-video-audio-plan { padding: 13px; }
  .studio-video-audio-plan header { align-items: flex-start; flex-direction: column; }
}
/* Studio character and prose anchor v1.2 */
.studio-anchor-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(12, 16, 24, 0.72);
}

.studio-anchor-section + .studio-anchor-section { margin-top: 16px; }
.studio-anchor-section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.studio-anchor-section > header > div:first-child { display: grid; gap: 4px; }
.studio-anchor-section > header strong { color: #f7f8fb; font-size: 15px; }
.studio-anchor-section > header small,
.studio-anchor-picker-actions small,
.studio-anchor-empty small { color: #8d97aa; line-height: 1.5; }
.studio-anchor-intensity { min-width: 132px; margin: 0; }
.studio-anchor-intensity > span { font-size: 12px; }
.studio-anchor-intensity select { min-height: 38px; }
.studio-anchor-section > .studio-anchor-section-header {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) minmax(132px, auto);
  align-items: end;
  gap: 12px;
}
.studio-anchor-section-heading { align-self: center; }
.studio-anchor-section-selected { display: flex; min-width: 0; align-items: center; justify-content: flex-end; }
.studio-anchor-selected-title-empty { width: 0; height: 0; }
.studio-anchor-selected-title {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 122, 47, 0.5);
  border-radius: 999px;
  color: #f5f6f8;
  background: rgba(255, 122, 47, 0.1);
  cursor: pointer;
}
.studio-anchor-selected-title:hover,
.studio-anchor-selected-title:focus-visible { border-color: #ff8b4a; background: rgba(255, 122, 47, 0.18); outline: 0; }
.studio-anchor-selected-title span { flex: 0 0 auto; color: #ffad7d; font-size: 10px; font-weight: 850; }
.studio-anchor-selected-title strong { min-width: 0; overflow: hidden; font-size: 12px !important; text-overflow: ellipsis; white-space: nowrap; }
.studio-anchor-selected-title b { flex: 0 0 auto; color: #ffad7d; font-size: 17px; line-height: 1; }

.studio-anchor-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-anchor-chip {
  display: inline-flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #c8cfdb;
  background: #171d29;
}
.studio-anchor-chip > span { display: inline-flex; align-items: center; gap: 6px; }
.studio-anchor-chip > small { color: #7f899d; font-size: 10px; font-weight: 500; }
.studio-anchor-chip b { color: #8d97aa; font-size: 11px; }
.studio-anchor-chip em { padding: 2px 7px; border-radius: 999px; color: #111; background: #ff9a61; font-size: 10px; font-style: normal; font-weight: 900; }
.studio-anchor-chip.active { border-color: #ff7a2f; color: #fff; background: rgba(255, 122, 47, 0.16); box-shadow: 0 0 0 1px rgba(255, 122, 47, 0.08) inset; }
.studio-anchor-chip.active b { color: #ffad7d; }
.studio-anchor-selection-summary,
.studio-anchor-card-guide { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 14px; padding: 11px 13px; margin-bottom: 12px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 11px; background: rgba(255, 255, 255, 0.025); }
.studio-anchor-selection-summary strong,
.studio-anchor-card-guide strong { color: #dfe4ed; font-size: 12px; }
.studio-anchor-selection-summary span,
.studio-anchor-card-guide small { color: #98a2b3; line-height: 1.5; }
.studio-anchor-selection-summary.has-selection { border-color: rgba(255, 122, 47, 0.62); background: rgba(255, 122, 47, 0.11); }
.studio-anchor-selection-summary.has-selection span { color: #ffb58c; font-weight: 900; }
.studio-anchor-speech-filter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr); align-items: center; gap: 10px 14px; margin: 2px 0 12px; }
.studio-anchor-speech-tabs { display: flex; min-width: 0; gap: 7px; overflow-x: auto; scrollbar-width: thin; }
.studio-anchor-speech-tabs button { flex: 0 0 auto; min-height: 38px; padding: 7px 14px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; color: #aeb6c5; background: rgba(255, 255, 255, 0.025); font-weight: 800; }
.studio-anchor-speech-tabs button.active,
.studio-anchor-speech-tabs button[aria-selected="true"] { border-color: #ff7a2f; color: #fff; background: rgba(255, 122, 47, 0.16); }
.studio-anchor-speech-search { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 5px 9px 5px 12px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; background: rgba(7, 10, 16, 0.65); }
.studio-anchor-speech-search span { color: #9ca6b6; font-size: 11px; font-weight: 850; white-space: nowrap; }
.studio-anchor-speech-search input { min-width: 0; min-height: 30px; padding: 0 5px; border: 0; color: #f3f5f8; background: transparent; outline: 0; }
.studio-anchor-speech-search b { color: #ffad7d; font-size: 11px; white-space: nowrap; }
.studio-anchor-preset-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.studio-anchor-preset-card { display: grid; align-content: start; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.1); border-radius: 13px; background: rgba(255, 255, 255, 0.025); }
.studio-anchor-preset-card.active { border-color: #ff7a2f; background: linear-gradient(145deg, rgba(255, 122, 47, 0.18), rgba(255, 122, 47, 0.06)); box-shadow: 0 0 0 2px rgba(255, 122, 47, 0.24) inset, 0 0 0 1px rgba(255, 154, 97, 0.32); }
.studio-anchor-preset-card-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; border-bottom: 1px solid rgba(255, 255, 255, 0.08); background: rgba(9, 13, 20, 0.5); }
.studio-anchor-preset-card-select { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; padding: 12px; color: inherit; background: transparent; cursor: pointer; }
.studio-anchor-preset-card.active .studio-anchor-preset-card-header { background: rgba(255, 122, 47, 0.13); }
.studio-anchor-preset-card-detail { align-self: center; min-height: 30px; margin: 8px 10px 8px 0; padding: 5px 9px; border: 1px solid rgba(255, 154, 97, 0.5); border-radius: 8px; color: #ffb58c; background: rgba(255, 122, 47, 0.08); font-size: 11px; font-weight: 850; white-space: nowrap; }
.studio-anchor-preset-card-detail:hover,
.studio-anchor-preset-card-detail:focus-visible { border-color: #ff8b4a; color: #fff; background: rgba(255, 122, 47, 0.18); outline: 0; }
.studio-anchor-preset-card-select input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.studio-anchor-preset-card-check { display: grid; width: 22px; height: 22px; place-items: center; border: 2px solid rgba(255, 255, 255, 0.32); border-radius: 6px; color: transparent; background: rgba(0, 0, 0, 0.22); font-size: 13px; font-weight: 950; transition: border-color 140ms ease, color 140ms ease, background 140ms ease, box-shadow 140ms ease; }
.studio-anchor-preset-card-select input:checked + .studio-anchor-preset-card-check { border-color: #ff9a61; color: #17100c; background: #ff9a61; box-shadow: 0 0 0 3px rgba(255, 122, 47, 0.2); }
.studio-anchor-preset-card-select input:focus-visible + .studio-anchor-preset-card-check { outline: 2px solid #fff; outline-offset: 2px; }
.studio-anchor-preset-card-toggle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0; color: inherit; background: rgba(9, 13, 20, 0.5); text-align: left; }
.studio-anchor-preset-card.active .studio-anchor-preset-card-toggle { background: rgba(255, 122, 47, 0.11); }
.studio-anchor-preset-card-code { display: grid; min-width: 36px; height: 28px; padding: 0 7px; place-items: center; border-radius: 8px; color: #aeb7c7; background: #202735; font-size: 11px; font-weight: 900; }
.studio-anchor-preset-card.active .studio-anchor-preset-card-code { color: #1a100b; background: #ff9a61; }
.studio-anchor-preset-card-title { display: grid; gap: 3px; min-width: 0; }
.studio-anchor-preset-card-title strong { color: #f4f6fa; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.studio-anchor-preset-card-title small { color: #8f99aa; line-height: 1.4; }
.studio-anchor-preset-card-state { padding: 5px 8px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; color: #9aa4b4; font-size: 10px; font-weight: 900; white-space: nowrap; }
.studio-anchor-preset-card.active .studio-anchor-preset-card-state { border-color: #ff9a61; color: #1a100b; background: #ff9a61; }
.studio-scene-template-card.cached { border-color: rgba(70, 211, 160, 0.3); }
.studio-scene-template-card.cached .studio-anchor-preset-card-state { border-color: rgba(70, 211, 160, 0.5); color: #72e6bd; background: rgba(70, 211, 160, 0.08); }
.studio-scene-template-card-header { cursor: default; }
.studio-anchor-preset-card-body { display: grid; gap: 12px; padding: 12px; }
.studio-anchor-preset-card-rule { display: grid; gap: 5px; }
.studio-anchor-preset-card-rule strong,
.studio-anchor-preset-card-utterances > strong,
.studio-scene-template-card-body strong { color: #ffb58c; font-size: 11px; }
.studio-anchor-preset-card-rule p,
.studio-scene-template-card-body p { margin: 0; color: #d8dde6; line-height: 1.6; white-space: pre-wrap; }
.studio-anchor-example-flow { display: grid; gap: 9px; min-width: 0; }
.studio-anchor-example-narration { margin: 0; color: #aeb6c3 !important; font-style: italic; font-weight: 650; line-height: 1.68 !important; }
.studio-anchor-example-dialogue { width: fit-content; max-width: 100%; padding: 11px 13px; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 4px 16px 16px 16px; background: linear-gradient(110deg, #2b2c30 0%, #25262a 52%, #1f2024 100%); box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18); }
.studio-anchor-example-dialogue p { margin: 0; color: #f2f2f3; font-weight: 650; line-height: 1.65; overflow-wrap: anywhere; }
.studio-anchor-selected-detail { display: grid; gap: 14px; min-width: 0; }
.studio-anchor-selected-detail-example,
.studio-anchor-selected-detail-rules { display: grid; gap: 9px; padding: 14px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; background: rgba(255, 255, 255, 0.025); }
.studio-anchor-selected-detail-example > strong,
.studio-anchor-selected-detail-rules > strong { color: #ffb58c; font-size: 12px; }
.studio-anchor-selected-detail-rules p { margin: 0; color: #cbd1db; line-height: 1.65; overflow-wrap: anywhere; }
.studio-anchor-selected-detail-modal { width: min(620px, calc(100vw - 32px)); }
.studio-anchor-selected-detail-modal .modal-body { min-height: 0; overflow-y: auto; }
.studio-anchor-selected-detail-layer { z-index: 6; }
.studio-anchor-selected-detail-layer > .modal-body { display: block; min-height: 0; padding: 8px 24px 24px; overflow-y: auto; }
.studio-anchor-preset-card-utterances { display: grid; gap: 8px; }
.studio-anchor-preset-utterance { position: relative; display: grid; gap: 4px; }
.studio-anchor-preset-utterance > span { color: #7f899d; font-size: 10px; font-weight: 800; }
.studio-anchor-preset-utterance textarea { min-height: 66px; resize: vertical; }
.studio-anchor-preset-utterance textarea:disabled { opacity: 1; color: #b9c0cc; background: rgba(0, 0, 0, 0.2); cursor: default; }
.studio-anchor-preset-utterance > button { justify-self: end; min-height: 28px; padding: 4px 8px; }
.studio-anchor-preset-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.studio-anchor-preset-card > footer small { color: #8f99aa; line-height: 1.45; }
.studio-scene-template-grid { grid-template-columns: minmax(0, 1fr); }
.studio-scene-template-card-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 12px; padding: 13px; }
.studio-scene-template-card-body section { display: grid; align-content: start; gap: 6px; padding: 11px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 10px; background: rgba(0, 0, 0, 0.15); }
.studio-anchor-genre-context,
.studio-genre-module-summary { display: grid; gap: 5px; padding: 12px 14px; margin-bottom: 12px; border: 1px solid rgba(255, 122, 47, 0.28); border-radius: 12px; background: rgba(255, 122, 47, 0.07); }
.studio-anchor-genre-context strong,
.studio-genre-module-summary strong { color: #ffb184; }
.studio-anchor-genre-context small,
.studio-genre-module-summary small { color: #9da7b8; }
.studio-genre-module-summary p { margin: 0; color: #e4e8ef; }
.studio-anchor-picker-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.studio-anchor-picker-actions small { margin-right: auto; }

.studio-anchor-example-list { display: grid; gap: 10px; }
.studio-anchor-example {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}
.studio-anchor-example.selected { border-color: rgba(255, 122, 47, 0.75); background: rgba(255, 122, 47, 0.08); }
.studio-anchor-example.edited header small { color: #ffad7d; }
.studio-anchor-example header,
.studio-anchor-example footer { display: flex; align-items: center; gap: 8px; }
.studio-anchor-example header { justify-content: space-between; }
.studio-anchor-example header label { display: inline-flex; align-items: center; gap: 8px; color: #e8ebf1; }
.studio-anchor-example header small { color: #7f899d; }
.studio-anchor-example textarea { min-height: 72px; resize: vertical; }
.studio-anchor-example footer { justify-content: flex-end; }
.studio-anchor-example footer button { min-width: 36px; min-height: 32px; padding: 5px 9px; }
.studio-world-prose-highlight-preview { display: grid; gap: 10px; padding: 14px; border: 1px solid rgba(255, 122, 47, 0.42); border-radius: 12px; background: rgba(255, 122, 47, 0.06); }
.studio-world-prose-highlight-preview header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.studio-world-prose-highlight-preview header small { color: #9da7b8; text-align: right; }
.studio-world-prose-highlight-preview p { margin: 0; color: #e4e8ef; line-height: 1.85; white-space: pre-wrap; }
.studio-world-prose-highlight-preview mark { padding: 2px 4px; border-radius: 4px; color: #fff2e9; background: rgba(255, 122, 47, 0.32); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.studio-scene-expression-example-flow .studio-anchor-example-flow { gap: 8px; }
.studio-scene-expression-example-flow .studio-anchor-example-narration { margin: 0; color: #d9dee7; line-height: 1.7; }
.studio-scene-expression-example-flow .studio-anchor-example-dialogue { width: fit-content; max-width: min(90%, 680px); padding: 9px 12px; border: 1px solid rgba(255, 122, 47, 0.32); border-radius: 14px 14px 14px 4px; background: rgba(255, 122, 47, 0.12); }
.studio-scene-expression-example-flow .studio-anchor-example-dialogue p { margin: 0; color: #f4f6fa; line-height: 1.55; }
.studio-anchor-empty { display: grid; gap: 4px; padding: 14px; border: 1px dashed rgba(255, 255, 255, 0.12); border-radius: 12px; }
.studio-anchor-empty strong { color: #dce1ea; }
.studio-anchor-auto-toggle { display: flex; align-items: center; gap: 9px; color: #dce1ea; }
.studio-anchor-matrix-preview { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 12px; }
.studio-anchor-matrix-preview summary { cursor: pointer; color: #cfd5df; }
.studio-anchor-matrix-preview > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.studio-anchor-matrix-preview article { display: grid; gap: 6px; padding: 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.035); }
.studio-anchor-matrix-preview p { margin: 0; color: #e2e6ed; line-height: 1.55; }
.studio-anchor-matrix-preview small { color: #7f899d; line-height: 1.45; }
.studio-anchor-matrix-preview article > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.studio-anchor-matrix-preview article > header small { color: #ff9a61; white-space: nowrap; }
.studio-anchor-matrix-preview .studio-scenario-template { margin-top: 4px; color: #f1f3f7; line-height: 1.65; }
.studio-anchor-matrix-preview article > details { margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 8px; }
.studio-anchor-matrix-preview article > details > summary { color: #9ba5b7; cursor: pointer; font-size: 12px; }
.studio-anchor-matrix-preview article > details > p { margin-top: 8px; color: #aeb6c6; line-height: 1.65; }
.studio-anchor-editor { display: grid; gap: 16px; }
.studio-anchor-editor-actions { display: flex; justify-content: space-between; gap: 10px; }
.studio-anchor-modal .modal-card { width: min(940px, calc(100vw - 32px)); }

@media (max-width: 640px) {
  .studio-anchor-section { padding: 14px; border-radius: 14px; }
  .studio-anchor-section > header { display: grid; }
  .studio-anchor-section > .studio-anchor-section-header { grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 10px; }
  .studio-anchor-section-selected { justify-content: flex-end; }
  .studio-anchor-selected-title { min-height: 36px; padding: 6px 9px; }
  .studio-anchor-intensity { grid-column: 1 / -1; }
  .studio-anchor-intensity { width: 100%; }
  .studio-anchor-picker-actions { align-items: stretch; flex-wrap: wrap; }
  .studio-anchor-picker-actions small { flex-basis: 100%; }
  .studio-anchor-picker-actions button { flex: 1 1 auto; }
  .studio-anchor-speech-filter { grid-template-columns: minmax(0, 1fr); }
  .studio-anchor-speech-tabs { padding-bottom: 2px; }
  .studio-anchor-speech-search { width: 100%; }
  .studio-anchor-example header { align-items: flex-start; }
  .studio-anchor-example footer { flex-wrap: wrap; }
  .studio-world-prose-highlight-preview header { align-items: flex-start; flex-direction: column; }
  .studio-world-prose-highlight-preview header small { text-align: left; }
  .studio-anchor-editor-actions { display: grid; }
  .studio-anchor-matrix-preview > div { grid-template-columns: 1fr; }
  .studio-anchor-preset-card-grid,
  .studio-scene-template-card-body { grid-template-columns: minmax(0, 1fr); }
  .studio-anchor-preset-card-toggle { grid-template-columns: auto minmax(0, 1fr); }
  .studio-anchor-preset-card-state { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
  .studio-anchor-preset-card > footer { align-items: stretch; flex-direction: column; }
  .studio-anchor-preset-card > footer button { width: 100%; }
  .modal-backdrop:has(.studio-anchor-selected-detail-modal) { align-items: center; padding: 16px; }
  .studio-anchor-selected-detail-modal { width: 100%; max-height: calc(100dvh - 32px); border-radius: 16px; }
  .studio-anchor-selected-detail-layer > .modal-body { padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); }
}
.studio-reference-anchor-selector {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 113, 34, 0.34);
  border-radius: 12px;
  background: rgba(255, 113, 34, 0.06);
}

.studio-reference-anchor-selector > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.studio-reference-anchor-selector > header div,
.studio-reference-anchor-selector.fixed {
  display: grid;
  gap: 4px;
}

.studio-reference-anchor-selector span,
.studio-reference-anchor-selector small {
  color: var(--muted);
  font-size: 12px;
}

.studio-reference-anchor-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.studio-reference-anchor-options :where(button, span) {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
}

.studio-reference-anchor-options :where(button, span).selected {
  border-color: var(--orange);
  background: rgba(255, 113, 34, 0.16);
  color: var(--orange-soft);
}
.studio-reference-anchor-bundles { display: grid; gap: 9px; padding-top: 4px; border-top: 1px solid rgba(255,255,255,.08); }
.studio-reference-anchor-bundles > header { display: grid; gap: 3px; }
.studio-reference-anchor-bundle { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.studio-reference-anchor-bundle.selected { border-color: var(--orange); background: rgba(255, 113, 34, .1); }
.studio-reference-anchor-bundle-preview { width: 64px; min-height: 76px; padding: 0 !important; overflow: hidden; border-radius: 8px !important; }
.studio-reference-anchor-bundle-preview img { display: block; width: 100%; height: 76px; object-fit: cover; }
.studio-reference-anchor-bundle > div { display: grid; gap: 4px; min-width: 0; }
.studio-reference-anchor-bundle > div:last-child { grid-template-columns: repeat(2, minmax(0, auto)); }
.studio-reference-anchor-bundle > div:last-child button { min-height: 34px; }
/* Shared Studio/Admin body and creator-authored pose-anchor viewer. */
.studio-mannequin-workspace { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--border, #30343b); border-radius: 14px; background: #111318; }
.studio-mannequin-workspace > header strong, .studio-mannequin-workspace > header small { display: block; }
.studio-mannequin-workspace > header small { margin-top: 5px; color: #999fa8; line-height: 1.5; }
.ipt-mannequin-studio { display: grid; grid-template-columns: minmax(210px, 29%) minmax(0, 1fr); gap: 14px; }
.ipt-mannequin-controls { display: grid; align-content: start; gap: 10px; }
.ipt-mannequin-controls > label, .ipt-mannequin-controls fieldset label { display: grid; gap: 5px; color: #cfd4db; font-size: 12px; font-weight: 700; }
.ipt-mannequin-controls select, .ipt-mannequin-controls input { min-width: 0; min-height: 36px; padding: 0 9px; border: 1px solid #353b45; border-radius: 9px; background: #0d1015; color: #f0f2f5; }
.ipt-mannequin-controls input[type="range"] { min-height: 24px; padding: 0; accent-color: #ff711f; }
.ipt-mannequin-graph input[type="range"] { width: 100%; background: linear-gradient(90deg, rgba(255,113,31,.18), rgba(255,113,31,.92)); }
.ipt-mannequin-graph-scale { display: flex; justify-content: space-between; gap: 10px; color: #aeb5bf; font-size: 10px; }
.ipt-mannequin-controls output { color: #ff9f63; font-size: 10px; }
.ipt-mannequin-controls fieldset { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 10px; border: 1px solid #303640; border-radius: 11px; }
.ipt-mannequin-controls legend { padding: 0 5px; color: #f2f4f7; font-size: 11px; font-weight: 800; }
.ipt-mannequin-controls small, .ipt-mannequin-controls p { margin: 0; color: #9098a4; font-size: 10px; line-height: 1.5; }
.ipt-mannequin-levels, .ipt-mannequin-view-buttons, .ipt-pose-save-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ipt-mannequin-controls button { min-height: 34px; padding: 0 10px; border: 1px solid #363d47; border-radius: 9px; background: #141820; color: #c8cdd5; cursor: pointer; }
.ipt-mannequin-controls button.active, .ipt-pose-anchor-list button.active { border-color: #ff711f; background: rgba(255, 113, 31, .14); color: #ffad78; }
.ipt-mannequin-levels button { min-width: 34px; padding: 0; }
.ipt-mannequin-view-buttons button { flex: 1 1 88px; font-size: 10px; }
.ipt-pose-save-actions button { flex: 1 1 130px; }
.ipt-pose-anchor-list { display: grid; gap: 6px; max-height: 210px; overflow: auto; }
.ipt-pose-anchor-list button { display: grid; gap: 3px; width: 100%; height: auto; padding: 9px; text-align: left; }
.ipt-pose-anchor-list strong, .ipt-pose-anchor-list small { display: block; }
.ipt-mannequin-preview { position: sticky; top: 16px; min-width: 0; height: fit-content; overflow: hidden; border: 1px solid #303640; border-radius: 14px; background: #fff; }
.ipt-mannequin-preview canvas { display: block; width: 100%; touch-action: none; }
.ipt-mannequin-preview > div { position: absolute; right: 10px; bottom: 10px; display: grid; gap: 2px; padding: 8px 10px; border-radius: 9px; background: rgba(8, 11, 15, .78); color: #fff; pointer-events: none; }
.ipt-mannequin-preview > div span { color: #c5cbd4; font-size: 9px; }
@media (max-width: 760px) {
  .ipt-mannequin-studio { grid-template-columns: 1fr; }
  .ipt-mannequin-preview { position: static; grid-row: 1; }
  .studio-reference-anchor-bundle { grid-template-columns: 56px minmax(0, 1fr); }
  .studio-reference-anchor-bundle-preview { width: 56px; min-height: 68px; }
  .studio-reference-anchor-bundle-preview img { height: 68px; }
  .studio-reference-anchor-bundle > div:last-child { grid-column: 1 / -1; grid-template-columns: 1fr; }
}
/* Native horizontal character groups: preserve card and compact presentations. */
.cp-all-characters .cp-character-group { margin-block: 24px; min-width: 0; }
.cp-all-characters .cp-character-group h3 { margin: 0; font-size: 18px; }
.cp-all-characters .cp-character-group small { font-size: 13px; color: var(--text-secondary, #999); }
.cp-all-characters .cp-character-group-rail { display: flex; gap: var(--dashboard-rail-gap, 16px); overflow-x: auto; overscroll-behavior-x: contain; padding-block: 4px 12px; cursor: grab; scrollbar-width: none; scroll-snap-type: x mandatory; }
.cp-character-group-rail::-webkit-scrollbar { display: none; }
.cp-character-group-rail > .cp-curation-item { scroll-snap-align: start; }
.cp-all-characters .cp-character-group-rail.is-dragging { scroll-snap-type: none; }
.cp-all-characters .cp-character-group-rail > .cp-curation-item { flex: 0 0 calc((100% - 64px) / 5); min-width: 0; }
.cp-curation-item .cp-hashtags > span { flex: 0 0 auto; white-space: nowrap; }
.cp-character-group-carousel:has(.cp-curation-item:only-child) .cp-group-scroll-controls { display: none; }
.cp-all-characters.view-compact .cp-character-group-rail > .cp-curation-item { flex-basis: calc((100% - 16px) / 2); }
.cp-character-group-rail.is-dragging, .cp-character-group-rail.is-dragging * { cursor: grabbing; user-select: none; }
.cp-character-group-rail img { -webkit-user-drag: none; }
.cp-group-scroll-controls { display: flex; gap: 8px; justify-content: flex-end; }
.cp-group-scroll-controls button { width: 36px; height: 36px; border: 1px solid var(--border-color, #333); border-radius: 50%; color: inherit; background: var(--surface, #171717); }
.cp-group-empty { color: var(--text-secondary, #999); padding: 16px 0; }
@media (max-width: 767px) {
  .cp-all-characters .cp-character-group > .cp-section-header { padding-inline: 12px; }
  .cp-all-characters .cp-character-group-rail > .cp-curation-item { flex-basis: 44%; }
  .cp-all-characters.view-compact .cp-character-group-rail > .cp-curation-item { flex-basis: 85%; }
  .cp-group-scroll-controls { padding-inline: 12px; }
}
/* One-sentence Studio authoring uses the shared controls and responsive flow. */
.studio-story-seed, .studio-story-result { display: grid; gap: 14px; padding: 20px; margin-block: 0 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); min-width: 0; }
.studio-story-seed p, .studio-story-result p { margin: 0; line-height: 1.7; overflow-wrap: anywhere; }
.studio-story-seed textarea { min-height: 112px; width: 100%; box-sizing: border-box; }
.studio-story-seed > small, .studio-story-result header span { color: var(--muted); line-height: 1.6; }
.studio-story-seed > button { justify-self: start; max-width: 100%; white-space: normal; }
.studio-story-result header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.studio-story-result dl { display: grid; gap: 8px; margin: 0; }
.studio-story-result dt { font-weight: 600; }
.studio-story-result dd { margin: 0 0 8px; overflow-wrap: anywhere; }
.studio-story-result details { min-width: 0; }
.studio-story-result summary { cursor: pointer; padding-block: 10px; }
.studio-story-cast { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.studio-story-cast article { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px; min-width: 0; }
.studio-story-result .studio-story-sample { white-space: pre-wrap; }
@media (max-width: 600px) { .studio-story-seed, .studio-story-result { padding: 14px; } .studio-story-seed > button { width: 100%; } }
@media (min-width: 601px) and (max-width: 1100px) {
  .studio-easy-layout:has(.studio-story-seed), .studio-easy-layout:has(.studio-story-result) { grid-template-columns: minmax(0, 1fr); }
  .studio-easy-layout:has(.studio-story-seed) > .studio-easy-preview, .studio-easy-layout:has(.studio-story-result) > .studio-easy-preview { position: static; }
}

/* MOBILE-CHATPLE-POLISH-001: shared controls, no duplicate mobile action/API path. */
.detail-start-controls { display: contents; }
.detail-action-row:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 760px) {
  :root {
    --mobile-nav-base: 64px;
    --mobile-nav-height: calc(var(--mobile-nav-base) + var(--ds-safe-bottom));
    --topbar: calc(60px + var(--ds-safe-top));
    --mobile-hero-height: clamp(200px, 64vw, 270px);
    --detail-start-space: 156px;
  }
  body:not(.chat-mode) { padding-bottom: var(--mobile-nav-height); }
  .topbar { height: var(--topbar); padding: var(--ds-safe-top) calc(var(--ds-space-3) + var(--ds-safe-right)) 0 calc(var(--ds-space-3) + var(--ds-safe-left)); }
  .topbar .mobile-brand { min-width: 0; height: var(--ds-control-md); flex: 0 1 auto; }
  .topbar .mobile-brand:not(.mobile-route-title) > img { width: clamp(88px, 28vw, 112px); height: var(--ds-control-md); object-fit: contain; }
  .topbar .mobile-brand.mobile-route-title { gap: var(--ds-space-2); max-width: calc(100% - 194px); }
  .topbar .mobile-route-title > img { flex: 0 0 20px; width: 20px; height: 20px; }
  .topbar .mobile-route-title > strong { min-width: 0; overflow: hidden; font-size: 16px; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
  .topbar .top-actions { gap: 0; flex-shrink: 0; }
  .topbar .top-action-button { width: var(--ds-control-md); height: var(--ds-control-md); }
  .topbar .top-profile-button { min-width: var(--ds-control-md); height: var(--ds-control-md); margin: 0; }
  .topbar .top-profile-button.guest-signup { min-width: 62px; height: var(--ds-control-md); padding: 0 var(--ds-space-2); font-size: 11px; }
  .topbar .top-profile-button.member-initial { width: var(--ds-control-md); height: var(--ds-control-md); }
  .topbar .top-action-button .notice-dot { top: 9px; right: 9px; }
  .mobile-nav { height: var(--mobile-nav-height); padding: 0 var(--ds-safe-right) var(--ds-safe-bottom) var(--ds-safe-left); grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .mobile-nav .mobile-nav-item { min-width: 0; min-height: var(--ds-control-md); padding: var(--ds-space-2) 2px; gap: var(--ds-space-1); font-size: 11px; line-height: 1.3; white-space: nowrap; overflow-wrap: normal; }
  .mobile-nav .mobile-nav-item img { flex-shrink: 0; }
  body:has(.mobile-route-title) .official-page-title { display: none; }
  .official-feed-shell,
  .official-library-page .official-standard-shell,
  .conversations-page .official-standard-shell,
  .official-ranking-shell { padding-top: calc(var(--topbar) + var(--ds-space-3)); }
  .official-feed-tabs { overflow-x: auto; scrollbar-width: none; }
  .official-feed-tabs::-webkit-scrollbar { display: none; }
  .official-feed-tabs .official-feed-tab { flex: 0 0 auto; min-height: var(--ds-control-md); padding-inline: var(--ds-space-2); font-size: 13px; white-space: nowrap; }
  .cp-home-page { padding-top: var(--topbar); }
  .cp-home-page .cp-banner-wrapper { position: relative; height: calc(var(--mobile-hero-height) + 2 * var(--ds-space-3)); margin: 0; }
  .cp-home-page .cp-banner-container { inset: var(--ds-space-3) 0 auto; height: var(--mobile-hero-height); }
  .cp-home-page .cp-banner-carousel,
  .cp-home-page .cp-banner-track,
  .cp-home-page .cp-banner-slide,
  .cp-home-page .cp-slide-content { height: var(--mobile-hero-height); }
  .cp-home-page .cp-slide-content,
  .cp-home-page .cp-banner-slide.active .cp-slide-content { top: 0; }
  .cp-home-page .cp-banner-bg { height: 100%; }
  .cp-home-page .cp-curation-viewport { scroll-padding-inline: var(--ds-space-3); }
  .cp-home-page .cp-curation-track { padding-inline: var(--ds-space-3); }
  .cp-section-header > button { min-height: var(--ds-control-md); padding-inline: var(--ds-space-2); font-size: 12px; }
  .cp-section-header .cp-list-controls button { min-height: var(--ds-control-md); }
  .cp-character-group > .cp-section-header { height: auto; min-height: var(--ds-control-lg); flex-wrap: wrap; gap: var(--ds-space-1); }
  .cp-all-characters .cp-character-group h3 { font-size: 17px; }
  .cp-home-page .cp-hashtags { min-height: 18px; }

  body.route-transition #app > .official-detail-page { animation: none; }
  .official-detail-page { padding-top: calc(var(--topbar) + var(--ds-space-3)); padding-bottom: var(--detail-start-space); }
  .official-detail-page .detail-cover { margin: 0; border-radius: var(--ds-radius-lg); }
  .official-detail-page .detail-title-line { height: auto; align-items: flex-start; gap: var(--ds-space-2); }
  .official-detail-page .detail-title-line h1 { min-width: 0; flex: 1; font-size: 26px; line-height: 1.25; overflow-wrap: anywhere; }
  .official-detail-page .detail-title-actions { flex-shrink: 0; gap: var(--ds-space-1); }
  .official-detail-page .favorite-button,
  .official-detail-page .detail-menu-button { width: var(--ds-control-md); height: var(--ds-control-md); }
  .official-detail-page .creator-row { align-items: center; gap: var(--ds-space-2); }
  .official-detail-page .creator-link { font-size: 13px; line-height: 1.5; min-height: var(--ds-control-md); }
  .official-detail-page .follow-button { height: var(--ds-control-md); }
  .official-detail-page .detail-subtitle { font-size: 16px; line-height: 1.6; }
  .official-detail-page .detail-tags { min-height: 0; }
  .official-detail-page .detail-view-all-gallery { min-height: var(--ds-control-md); }
  .detail-start-controls {
    position: fixed; z-index: 80; inset: auto 0 var(--mobile-nav-height);
    display: grid; gap: var(--ds-space-2);
    padding: var(--ds-space-2) calc(var(--ds-space-3) + var(--ds-safe-right)) var(--ds-space-3) calc(var(--ds-space-3) + var(--ds-safe-left));
    border-top: 1px solid var(--ds-color-line); background: var(--ds-color-surface);
    box-shadow: 0 -8px 24px rgba(0,0,0,.2);
  }
  .detail-start-controls .detail-start-block { margin: 0; }
  .detail-start-controls .field-label { height: auto; margin: 0 0 var(--ds-space-1); font-size: 12px; line-height: 16px; }
  .detail-start-controls .episode-trigger { height: var(--ds-control-md); font-size: 14px; }
  .detail-start-controls .episode-trigger-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .detail-start-controls .detail-episode-list { top: auto; bottom: calc(100% + var(--ds-space-2)); height: auto; max-height: min(40dvh, 280px); overflow-y: auto; overscroll-behavior-y: contain; }
  .detail-start-controls .detail-episode-list > button { min-height: var(--ds-control-md); height: auto; }
  .detail-start-controls .detail-action-row { margin: 0; grid-template-columns: minmax(0, 1fr); }
  .detail-start-controls .detail-action-row:has(.detail-original-button) { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .detail-start-controls .detail-chat-button,
  .detail-start-controls .detail-original-button { height: 48px; border-radius: var(--ds-radius-md); font-size: 15px; }
  .detail-start-controls .detail-original-button { font-size: 13px; }
  .official-detail-page .site-footer { margin-bottom: var(--ds-space-4); }
  .chat-mode .chat-management-currency > div > button { align-items: flex-start; flex-direction: column; gap: var(--ds-space-2); }
  .chat-mode .chat-management-currency > div > button b { font-size: clamp(15px, 4.8vw, 20px); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .account-panel { top: calc(var(--topbar) + var(--ds-space-2)); height: auto; max-height: calc(100dvh - var(--topbar) - var(--ds-safe-bottom) - var(--ds-space-4)); overflow-y: auto; overscroll-behavior-y: contain; background: var(--ds-color-surface-raised); }
  .account-panel .account-panel-upper { height: auto; padding: var(--ds-space-4); }
  .account-panel .account-panel-upper > header { height: var(--ds-control-md); }
  .account-panel .account-back { width: var(--ds-control-md); height: var(--ds-control-md); }
  .account-panel .account-panel-lower { height: auto; padding-inline: var(--ds-space-4); }
  .account-panel .account-panel-lower nav { gap: var(--ds-space-2); }
  .account-panel .account-panel-lower nav button,
  .account-panel .account-panel-lower footer button { min-height: var(--ds-control-md); }
  .account-panel .account-panel-lower footer { margin-top: var(--ds-space-3); }
}
@media (max-width: 760px) and (max-height: 700px) {
  .official-detail-page .detail-cover { height: 40dvh; aspect-ratio: auto; }
}
@media (max-width: 760px) and (max-height: 480px) {
  .detail-start-controls .field-label { display: none; }
  .detail-start-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  .detail-start-controls .detail-episode-list { max-height: 40dvh; }
}

/* DETAIL-GALLERY-MOBILE-001: bounded preview, native flick rail and stable collection layers. */
.official-detail-page .official-gallery-section { height: auto; margin: 32px 0 36px; padding-top: 0; }
.official-gallery-section .gallery-head { display: flex; flex-direction: row; height: auto; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.official-detail-page .gallery-head h2 { margin: 0; color: var(--ds-color-text); }
.detail-gallery-more { min-height: 44px; padding: 0 4px 0 12px; border: 0; background: transparent; color: var(--ds-color-muted); font: inherit; cursor: pointer; white-space: nowrap; }
.detail-gallery-more span { margin-left: 4px; font-size: 22px; }
.official-gallery-section .detail-grade-pills,
.collection-modal .modal-grade-pills { display: flex; flex-wrap: nowrap; justify-content: flex-start; align-items: center; gap: 6px; width: 100%; min-height: 44px; margin: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
.official-gallery-section .detail-grade-pills::-webkit-scrollbar,
.collection-modal .modal-grade-pills::-webkit-scrollbar { display: none; }
.official-gallery-section .detail-grade-pill,
.collection-modal .modal-grade-pills .detail-grade-pill { flex: 0 0 auto; width: auto; min-width: max-content; height: 44px; padding: 0 10px; margin: 0; font-size: 12px; }
.official-gallery-section .gallery-slider-shell { height: auto; margin-top: 14px; }
.official-gallery-section .gallery-horizontal-list { display: flex; height: auto; gap: 8px; padding: 2px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; }
.official-gallery-section .gallery-horizontal-list::-webkit-scrollbar { display: none; }
.official-gallery-section .gallery-horizontal-list.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.official-gallery-section .gallery-horizontal-list > button { flex: 0 0 auto; width: 150px; min-width: 150px; height: auto; min-height: 0; aspect-ratio: 150 / 233; scroll-snap-align: start; overflow: hidden; border-radius: var(--ds-radius-md); }
.official-gallery-section .gallery-horizontal-list > button img { -webkit-user-drag: none; user-select: none; }
.official-gallery-section .gallery-start-card { justify-content: center; gap: 10px; padding: 12px 6px; }
.official-gallery-section .gallery-start-card > img { flex: 0 0 auto; width: 76px; height: 60px; margin: 0; }
.official-gallery-section .gallery-start-card > span { font-size: 12px; line-height: 1.5; }
.official-gallery-section .gallery-start-card > b { width: 100%; height: auto; min-height: 34px; margin: 0; display: grid; place-items: center; padding: 5px; font-size: 12px; }
.gallery-more-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--ds-color-line); background: var(--ds-color-surface); color: var(--ds-color-text); cursor: pointer; }
.gallery-more-card > span { font-size: 36px; }
.gallery-more-card > small { color: var(--ds-color-muted); }
.official-gallery-section .detail-gallery-empty { flex: 1 0 100%; min-width: 0; min-height: 210px; padding: 20px; text-align: center; }
.official-gallery-section .detail-gallery-empty button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--ds-color-line); border-radius: var(--ds-radius-md); background: var(--ds-color-surface); color: var(--ds-color-text); }
.official-gallery-section .gallery-nav { width: 44px; height: 44px; }
.official-gallery-section .gallery-nav:disabled { visibility: hidden; pointer-events: none; }
.collection-modal { display: flex; flex-direction: column; }
.collection-modal header { flex: 0 0 auto; min-height: 44px; }
.collection-modal-filter { flex: 0 0 auto; }
.collection-modal-scroll { flex: 1 1 auto; height: auto; min-height: 0; overscroll-behavior: contain; }
.gallery-unlock-layer { position: absolute; z-index: 20; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.78); }
.gallery-unlock-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.gallery-view-media > img { touch-action: pan-y pinch-zoom; }
.gallery-view-stage[data-media-type="video"] .gallery-view-counter { top: 12px; right: 64px; bottom: auto; }
.gallery-view-stage[data-media-type="video"] .gallery-view-sound { top: 12px; bottom: auto; }
@media (max-width: 760px) {
  .official-gallery-section .gallery-horizontal-list > button { width: clamp(120px, 36vw, 150px); min-width: clamp(120px, 36vw, 150px); }
  body[data-current-route="detail"] { min-width: 0; }
  html:has(body[data-current-route="detail"]) { min-width: 0; }
  .official-gallery-section .gallery-nav { display: none; }
  .collection-modal { padding-top: max(12px, env(safe-area-inset-top)); }
  .collection-modal header { padding-left: 30px; padding-right: 34px; }
  .collection-modal header > .collection-modal-back,
  .collection-modal header > .collection-modal-close { top: 0; width: 44px; height: 44px; }
  .collection-modal header strong { font-size: 17px; }
  .collection-modal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .collection-modal-grid .gallery-item { aspect-ratio: 2 / 3; }
  .gallery-unlock-layer { padding: 12px; }
}
/* Unified character creation: preserve optional editors without crowding the main path. */
.studio-creation-entry, .studio-current-anchor-status {
  padding: var(--ds-space-6); margin-block: var(--ds-space-4);
  border: 1px solid var(--ds-color-line); border-radius: var(--ds-radius-md);
  background: var(--ds-color-surface);
}
.studio-creation-entry p, .studio-current-anchor-status p { color: var(--ds-color-muted); line-height: 1.6; }
.studio-unified-detail { min-width: 0; margin-block: var(--ds-space-4); border: 1px solid var(--ds-color-line); border-radius: var(--ds-radius-md); }
.studio-unified-detail > summary { cursor: pointer; padding: var(--ds-space-4); min-height: var(--ds-control-md); color: var(--ds-color-text); font-weight: 600; }
.studio-unified-detail[open] { padding-bottom: var(--ds-space-4); }
.studio-unified-detail[open] > :not(summary) { margin-inline: var(--ds-space-3); }
.studio-easy-progress { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.studio-face-anchor-candidate { grid-template-rows: auto auto; align-content: start; }
.studio-face-anchor-candidate > .studio-media-preview-trigger { height: auto; min-height: 0; position: relative; }
.studio-face-anchor-candidate > .studio-media-preview-trigger img { position: static; aspect-ratio: 1; height: auto; object-fit: contain; }
@media (max-width: 760px) {
  .studio-easy-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-inline: 0; }
  .studio-easy-progress button, .studio-easy-progress button.active { display: grid; grid-template-columns: 1fr; min-width: 0; padding: var(--ds-space-2) var(--ds-space-1); }
  .studio-easy-progress button span { display: block; font-size: 11px; white-space: normal; }
  .studio-face-anchor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-creation-entry, .studio-current-anchor-status { padding: var(--ds-space-4); }
}

.studio-generation-progress-button { position:relative; overflow:hidden; isolation:isolate; min-height:44px; }
.studio-generation-progress-button:disabled { opacity:1; cursor:wait; }
.studio-generation-button-fill { position:absolute; inset:0 auto 0 0; background:var(--accent,#ff6a1a); opacity:.32; z-index:-1; }
.studio-generation-button-label { position:relative; display:block; white-space:normal; overflow-wrap:anywhere; }
.studio-independent-anchor-selector{display:grid;gap:18px}.studio-independent-anchor-selector>section{display:grid;gap:12px;padding:16px;border:1px solid rgba(148,163,184,.24);border-radius:16px;background:rgba(15,23,42,.34)}.studio-independent-anchor-selector>section>header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.studio-independent-anchor-selector>section>header div{display:grid;gap:4px}.studio-independent-anchor-selector>section>header small{color:#94a3b8}.studio-independent-anchor-selector>section>header>span{white-space:nowrap;color:#c4b5fd}.studio-independent-anchor-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.studio-independent-anchor-card{display:grid;gap:8px;text-align:left;padding:14px;border:1px solid rgba(148,163,184,.25);border-radius:12px;background:rgba(15,23,42,.62);color:inherit}.studio-independent-anchor-card:hover{border-color:rgba(167,139,250,.7)}.studio-independent-anchor-card.selected{border-color:#8b5cf6;background:rgba(91,33,182,.2);box-shadow:0 0 0 1px rgba(139,92,246,.32)}.studio-independent-anchor-card>span{display:flex;justify-content:space-between;gap:8px}.studio-independent-anchor-card em{font-style:normal;color:#c4b5fd;font-size:12px}.studio-independent-anchor-card p,.studio-independent-anchor-card small,.studio-independent-anchor-card q{margin:0;line-height:1.5}.studio-independent-anchor-card small{color:#94a3b8}.studio-independent-anchor-card q{padding-top:8px;border-top:1px solid rgba(148,163,184,.16);color:#dbeafe}.studio-independent-anchor-selector details>summary{cursor:pointer;color:#c4b5fd;padding:8px 0}.studio-independent-anchor-selector details[open] .studio-independent-anchor-grid{margin-top:10px}
