:root {
  color-scheme: light;
  --ink: #2f2a27;
  --ink-soft: #5f5750;
  --muted: #958a82;
  --cream: #fbf6ee;
  --cream-2: #f6efe6;
  --glass: rgba(255, 252, 246, 0.74);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(66, 57, 50, 0.1);
  --blush: #b8b1aa;
  --blush-soft: #e2ddd6;
  --lavender: #c5c7d6;
  --mist-blue: #c8d5da;
  --mint: #cbd8d2;
  --sage: #8aa99a;
  --taupe: #c9b9a7;
  --accent: #9f8f82;
  --shadow: 0 26px 80px rgba(87, 72, 60, 0.14);
  --shadow-soft: 0 16px 44px rgba(87, 72, 60, 0.09);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --theme-bg:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.32) 1px, transparent 1px),
    linear-gradient(135deg, #f5f1ea 0%, #f4f3ee 42%, #edf2f2 76%, #f8f6f1 100%);
  --chat-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 245, 238, 0.92)),
    linear-gradient(135deg, #fbf7f0, #f3eee7);
  --bubble-out: linear-gradient(135deg, rgba(48, 48, 48, 0.94), rgba(128, 134, 138, 0.84));
  --bubble-out-text: #ffffff;
  --bubble-in: rgba(255, 255, 255, 0.88);
  --card-style: rgba(255, 252, 246, 0.74);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Sans SC", sans-serif;
  background: var(--theme-bg);
  background-size: 34px 34px, 34px 34px, auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.28), transparent 42%),
    repeating-linear-gradient(128deg, transparent 0 58px, rgba(255, 255, 255, 0.22) 58px 59px);
}

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

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  display: grid;
  grid-template-columns: 78px minmax(300px, 354px) minmax(380px, 460px) minmax(420px, 1fr);
  align-items: start;
  gap: 16px;
  min-height: calc(100vh - 28px);
  margin: 14px;
}

.brand-rail,
.home-panel,
.chat-device,
.studio-panel {
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.brand-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 14px 10px;
  border-radius: 30px;
}

.brand-rail,
.home-panel,
.chat-panel,
.studio-panel {
  height: calc(100vh - 28px);
}

.brand-logo,
.rail-button,
.icon-button,
.tool-button,
.send-button,
.save-theme-button,
.category-chip,
.home-tab,
.theme-card,
.custom-tile,
.entrance-card,
.privacy-row,
.agent-card,
.story-card {
  border: 0;
  color: var(--ink);
}

.brand-logo {
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
}

.logo-glass {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  color: #fff;
  font-family: "Fraunces", serif;
  font-size: 30px;
  font-weight: 800;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 42%),
    linear-gradient(145deg, #2c2b29, #8f8b84 58%, #eef1ee);
  box-shadow: 0 14px 34px rgba(83, 70, 60, 0.2);
}

.logo-glass::after {
  position: absolute;
  right: 9px;
  bottom: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f4eadf;
  content: "";
}

.rail-nav {
  display: grid;
  gap: 10px;
}

.rail-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 18px;
  color: #6e6259;
  background: rgba(255, 255, 255, 0.64);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.rail-button:hover,
.rail-button.active {
  transform: translateY(-2px);
  color: #fff;
  background: #3c3631;
}

.rail-button.ghost {
  margin-top: auto;
}

.home-panel,
.studio-panel {
  overflow: auto;
  border-radius: var(--radius-xl);
  padding: 22px;
}

.home-header,
.chat-head,
.studio-header,
.zone-title,
.theme-store-head,
.custom-head,
.story-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.icon-button,
.tool-button,
.send-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.icon-button {
  width: 42px;
  height: 42px;
}

.icon-button.subtle {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.56);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 15px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 19px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
}

.search-field input,
.chat-compose input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.home-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 15px;
}

.home-tab {
  border-radius: 999px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.home-tab.active {
  color: #fff;
  background: #3c3631;
}

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

.conversation-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  transition: transform 0.18s ease, background 0.18s ease;
}

.conversation-item:hover,
.conversation-item.active {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.76);
}

.avatar-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 19px;
  color: #fff;
  background: var(--avatar-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-weight: 800;
}

.avatar-shell::after {
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  content: "";
}

.conversation-item strong,
.conversation-item p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item p,
.conversation-item small,
.zone-title span,
.studio-header p,
.theme-card p,
.theme-detail p,
.custom-tile p,
.entrance-card p,
.privacy-row p,
.agent-card p,
.story-card p {
  color: var(--muted);
  font-size: 14px;
}

.conversation-item small {
  text-align: right;
}

.function-zone {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.zone-title {
  margin-bottom: 12px;
}

.zone-title strong {
  font-size: 16px;
}

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

.function-card {
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.58);
}

.function-card svg {
  color: var(--icon-color, var(--accent));
}

.function-card span {
  font-size: 13px;
  font-weight: 800;
}

.chat-panel {
  display: grid;
  align-items: center;
}

.chat-device {
  overflow: hidden;
  border-radius: 42px;
}

.chat-head {
  padding: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.chat-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.chat-wallpaper {
  display: flex;
  flex-direction: column;
  min-height: 570px;
  padding: 18px;
  background: var(--chat-bg);
}

.date-chip {
  align-self: center;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.message-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-row {
  display: grid;
  max-width: 80%;
  gap: 5px;
}

.message-row.in {
  align-self: flex-start;
}

.message-row.out {
  align-self: flex-end;
}

.message-row b {
  color: var(--muted);
  font-size: 12px;
}

.message-bubble {
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--bubble-radius, 20px);
  line-height: 1.58;
  box-shadow: var(--shadow-soft);
}

.message-row.in .message-bubble {
  background: var(--bubble-in);
}

.message-row.out .message-bubble {
  color: var(--bubble-out-text);
  background: var(--bubble-out);
}

.read-mark {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  text-align: right;
}

.inline-play-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.inline-play-card svg {
  color: var(--sage);
}

.inline-play-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-compose {
  display: grid;
  grid-template-columns: 42px 1fr 48px;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.tool-button,
.send-button {
  width: 42px;
  height: 42px;
}

.send-button {
  color: #fff;
  background: #3c3631;
}

.studio-panel {
  overflow-y: auto;
}

.studio-header {
  align-items: flex-start;
  margin-bottom: 20px;
}

.save-theme-button {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 11px 16px;
  color: #fff;
  background: #3c3631;
}

.panel-stack {
  display: grid;
  gap: 18px;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.category-chip {
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.category-chip.active {
  color: #fff;
  background: #3c3631;
}

.theme-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.theme-grid,
.custom-grid,
.entry-grid,
.agent-grid,
.play-grid,
.privacy-list {
  display: grid;
  gap: 13px;
}

.theme-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.theme-card {
  display: grid;
  grid-template-columns: 44% 1fr;
  overflow: hidden;
  min-height: 190px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 27px;
  text-align: left;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow-soft);
}

.theme-card.active {
  outline: 2px solid #3c3631;
}

.theme-cover {
  position: relative;
  min-height: 100%;
  padding: 14px;
  background: var(--cover);
}

.theme-cover::before,
.theme-cover::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.32);
  content: "";
}

.theme-cover::before {
  right: 18px;
  bottom: 18px;
  width: 74px;
  height: 44px;
  border-radius: 18px 18px 18px 8px;
}

.theme-cover::after {
  left: 18px;
  bottom: 25px;
  width: 58px;
  height: 34px;
  border-radius: 16px 16px 8px 16px;
}

.package-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  color: #fff;
  background: rgba(55, 48, 43, 0.68);
  backdrop-filter: blur(12px);
}

.theme-body {
  padding: 15px;
}

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

.theme-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.palette-row {
  display: flex;
  gap: 6px;
  margin-top: 13px;
}

.palette-dot {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: var(--dot);
}

.theme-detail,
.custom-panel,
.entry-hero,
.privacy-summary {
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
}

.theme-detail {
  display: grid;
  grid-template-columns: minmax(210px, 0.62fr) 1fr;
  gap: 18px;
}

.theme-preview-phone {
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 25px;
  background: var(--preview-bg);
}

.preview-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.56);
}

.preview-avatar {
  width: 28px;
  height: 28px;
  border-radius: 11px;
  background: var(--preview-icon);
}

.preview-lines {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.preview-bubble {
  height: 34px;
  border-radius: var(--preview-radius);
  background: rgba(255, 255, 255, 0.76);
}

.preview-bubble.out {
  justify-self: end;
  width: 66%;
  background: var(--preview-bubble);
}

.package-list {
  display: grid;
  gap: 9px;
  margin: 14px 0;
}

.package-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 14px;
}

.package-list svg {
  width: 17px;
  height: 17px;
  color: var(--sage);
}

.custom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.custom-tile,
.entrance-card,
.privacy-row,
.agent-card,
.story-card {
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
}

.custom-tile {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-align: left;
}

.tile-icon,
.entry-icon,
.agent-icon,
.privacy-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  color: var(--icon-color, var(--sage));
  background: rgba(255, 255, 255, 0.66);
}

.custom-tile strong,
.entrance-card strong,
.agent-card strong,
.story-card strong {
  display: block;
  margin-bottom: 4px;
}

.slider-line {
  width: 52px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blush-soft), var(--mint));
}

.entry-grid,
.agent-grid,
.play-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entrance-card,
.agent-card,
.story-card {
  display: grid;
  min-height: 170px;
  padding: 18px;
  text-align: left;
}

.entrance-card .entry-icon,
.agent-card .agent-icon {
  margin-bottom: 22px;
}

.story-card {
  min-height: 220px;
}

.story-screen {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdf8, #f2ece4);
}

.story-line {
  max-width: 76%;
  padding: 9px 11px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.story-line.out {
  justify-self: end;
  color: #fff;
  background: #4a423c;
}

.privacy-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.switch {
  position: relative;
  width: 48px;
  height: 27px;
}

.switch input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.switch i {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 999px;
  background: #e6ddd4;
  pointer-events: none;
  transition: background 0.18s ease;
}

.switch i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(61, 52, 45, 0.18);
  content: "";
  transition: transform 0.18s ease;
}

.switch input:checked + i {
  background: #8ea99d;
}

.switch input:checked + i::after {
  transform: translateX(21px);
}

body[data-panel="theme"] .app-shell,
body[data-panel="custom"] .app-shell {
  grid-template-columns: 72px minmax(280px, 310px) minmax(0, 1fr);
}

body[data-panel="theme"] .chat-panel,
body[data-panel="custom"] .chat-panel {
  display: none;
}

body[data-panel="theme"] .studio-panel,
body[data-panel="custom"] .studio-panel {
  grid-column: 3 / -1;
}

body[data-panel="theme"] .studio-panel {
  overflow: hidden;
}

body[data-panel="theme"] #panelContent {
  height: calc(100% - 126px);
  min-height: 0;
}

.beauty-store {
  display: grid;
  grid-template-columns: 136px minmax(520px, 1fr) minmax(310px, 340px);
  gap: 16px;
  height: 100%;
  min-height: 0;
}

.beauty-categories,
.beauty-grid,
.live-preview {
  min-height: 0;
  overflow: auto;
}

.beauty-categories {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.46);
}

.mini-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.beauty-category {
  border: 0;
  border-radius: 16px;
  padding: 10px 11px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.55);
  text-align: left;
}

.beauty-category.active {
  color: #fff;
  background: #302d29;
}

.beauty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(235px, 1fr));
  align-content: start;
  gap: 14px;
  padding-right: 4px;
}

.beauty-card {
  position: relative;
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
}

.beauty-card.active {
  outline: 2px solid #302d29;
}

.theme-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: transparent;
}

.asset-cover,
.beauty-info {
  pointer-events: none;
}

.asset-cover {
  position: relative;
  display: grid;
  align-content: space-between;
  padding: 14px;
  background: var(--asset-bg);
}

.asset-cover::before {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 22px;
  content: "";
}

.mini-phone {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 148px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.mini-wallpaper {
  position: relative;
  overflow: hidden;
  margin: 10px;
  border-radius: 18px;
  background: var(--asset-bg);
}

.mini-bubble {
  position: absolute;
  height: 25px;
  border-radius: var(--asset-radius);
  box-shadow: 0 8px 20px rgba(40, 35, 30, 0.1);
}

.mini-bubble.in {
  left: 13px;
  top: 44px;
  width: 58%;
  background: var(--asset-in);
}

.mini-bubble.out {
  right: 13px;
  top: 78px;
  width: 64%;
  background: var(--asset-bubble);
}

.mini-input {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
}

.mini-widget {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
}

.mini-widget.paper-fold::after,
.preview-decor.paper-fold::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  height: 42%;
  border-top-left-radius: 8px;
  background: rgba(40, 40, 40, 0.12);
  content: "";
}

.mini-widget.night-line,
.preview-decor.night-line {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.mini-widget.moon,
.preview-decor.moon {
  border-radius: 999px;
}

.mini-widget.rabbit-original,
.preview-decor.rabbit-original {
  border-radius: 50% 50% 44% 44%;
}

.mini-widget.star-original,
.preview-decor.star-original {
  clip-path: polygon(50% 0, 62% 34%, 98% 35%, 68% 55%, 79% 90%, 50% 69%, 21% 90%, 32% 55%, 2% 35%, 38% 34%);
}

.icon-pack {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 7px;
}

.icon-pack span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  color: var(--asset-ink);
  background: rgba(255, 255, 255, 0.56);
}

.icon-pack svg {
  width: 16px;
  height: 16px;
}

.beauty-info {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 16px;
}

.beauty-titleline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-tag {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--asset-ink);
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.favorite-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  color: var(--asset-ink);
  background: rgba(255, 255, 255, 0.62);
}

.beauty-info h3 {
  margin-bottom: 0;
  font-size: 20px;
}

.beauty-info p {
  margin-bottom: 0;
}

.asset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.asset-row span {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.font-sample {
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 14px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.44);
  font-size: 13px;
}

.card-actions {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: auto;
}

.card-actions span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}

.card-actions button {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.7);
}

.card-actions button:last-child {
  color: #fff;
  background: #302d29;
}

.live-preview {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-soft);
}

.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.preview-head h3 {
  margin-bottom: 0;
}

.preview-stage {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
}

.preview-home,
.preview-chat {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 24px;
  background: var(--asset-bg);
}

.preview-home {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 300px;
  padding: 12px;
}

.preview-app-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: var(--asset-ink);
  background: rgba(255, 255, 255, 0.62);
}

.preview-list-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.preview-list-card.muted {
  opacity: 0.82;
}

.preview-list-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.preview-avatar-frame {
  display: block;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 13px;
  background: var(--asset-bubble);
  box-shadow: 0 8px 18px rgba(40, 35, 30, 0.08);
}

.preview-avatar-frame.small {
  opacity: 0.65;
}

.preview-bottom-icons {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
}

.preview-bottom-icons svg {
  color: var(--asset-ink);
}

.preview-chat {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 300px;
}

.preview-chat-top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.46);
}

.preview-chat-wall {
  position: relative;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 14px;
}

.preview-decor {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
}

.preview-chat-bubble {
  position: relative;
  z-index: 1;
  max-width: 78%;
  border-radius: var(--asset-radius);
  padding: 10px 12px;
  font-size: 13px;
}

.preview-chat-bubble.in {
  background: var(--asset-in);
}

.preview-chat-bubble.out {
  justify-self: end;
  color: #fff;
  background: var(--asset-bubble);
}

.preview-chat-bubble i {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 10px;
  opacity: 0.82;
  text-align: right;
}

.preview-input {
  display: grid;
  grid-template-columns: 22px 1fr 22px;
  gap: 8px;
  align-items: center;
  margin: 12px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  color: var(--asset-ink);
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.preview-input svg {
  width: 16px;
  height: 16px;
}

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

.asset-manifest div {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.48);
}

.asset-manifest strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.asset-manifest span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 76px minmax(300px, 350px) minmax(380px, 1fr);
  }

  .studio-panel {
    grid-column: 2 / -1;
  }
}

@media (max-width: 860px) {
  body {
    padding-bottom: 82px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0;
  }

  .brand-rail {
    position: fixed;
    z-index: 20;
    right: 10px;
    bottom: 10px;
    left: 10px;
    flex-direction: row;
    justify-content: space-between;
    padding: 8px;
    border-radius: 24px;
    height: auto;
  }

  .brand-logo,
  .rail-button.ghost {
    display: none;
  }

  .rail-nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
  }

  .rail-button {
    width: 42px;
    height: 42px;
  }

  .home-panel {
    height: auto;
    border-radius: 0 0 30px 30px;
    margin: 0 14px;
  }

  .chat-panel {
    height: auto;
    padding: 0 14px;
  }

  .chat-device {
    border-radius: 34px;
  }

  .chat-wallpaper {
    min-height: 500px;
  }

  .studio-panel {
    grid-column: auto;
    height: auto;
    border-radius: 30px 30px 0 0;
    margin: 0 14px 14px;
  }

  .studio-header,
  .theme-layout,
  .theme-detail {
    grid-template-columns: 1fr;
  }

  .studio-header {
    display: grid;
  }

  .save-theme-button {
    width: fit-content;
  }

  h2 {
    font-size: 30px;
  }

  .theme-grid,
  .custom-grid,
  .entry-grid,
  .agent-grid,
  .play-grid {
    grid-template-columns: 1fr;
  }

  .theme-card {
    grid-template-columns: 1fr;
  }

  .theme-cover {
    min-height: 118px;
  }

  body[data-panel="theme"] .app-shell,
  body[data-panel="custom"] .app-shell {
    grid-template-columns: 1fr;
  }

  body[data-panel="theme"] .studio-panel,
  body[data-panel="custom"] .studio-panel {
    grid-column: auto;
  }

  body[data-panel="theme"] #panelContent {
    height: auto;
  }

  .beauty-store {
    grid-template-columns: 1fr;
    height: auto;
  }

  .beauty-categories {
    display: flex;
    overflow-x: auto;
  }

  .beauty-category {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .beauty-grid,
  .asset-manifest,
  .preview-stage {
    grid-template-columns: 1fr;
  }

  .beauty-card {
    grid-template-columns: 1fr;
  }

  .asset-cover {
    min-height: 188px;
  }
}
