:root {
  --ink: #171918;
  --muted: #6b6f7a;
  --paper: #f8f1f4;
  --panel: rgba(255, 255, 255, 0.78);
  --line: rgba(30, 32, 38, 0.12);
  --charcoal: #050706;
  --teal: #2f7f85;
  --cold-light: #7ccadb;
  --rose: #d989ae;
  --gold: #b8a36f;
  --green: #4c8b62;
  --shadow: 0 20px 60px rgba(25, 28, 35, 0.16);
  --radius: 8px;
}

.app-shell .main[data-view="home"],
.app-shell .main[data-view="agenda"],
.app-shell .main[data-view="actions"],
.app-shell .main[data-view="tarot"] {
  padding: 0 0 76px;
}

.app-shell .main[data-view="home"] .topbar,
.app-shell .main[data-view="agenda"] .topbar,
.app-shell .main[data-view="actions"] .topbar,
.app-shell .main[data-view="tarot"] .topbar {
  display: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 14% 8%, rgba(217, 137, 174, 0.26), transparent 28rem),
    radial-gradient(circle at 86% 12%, rgba(124, 202, 219, 0.18), transparent 24rem),
    linear-gradient(135deg, #fbf7f1 0%, #f5e7ee 44%, #e8f0f1 100%);
  color: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

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

.rail {
  min-height: 100vh;
  padding: 24px 18px;
  background:
    radial-gradient(circle at 16% 10%, rgba(217, 137, 174, 0.22), transparent 13rem),
    radial-gradient(circle at 90% 0%, rgba(124, 202, 219, 0.16), transparent 11rem),
    linear-gradient(165deg, rgba(5, 7, 6, 0.98), rgba(10, 15, 13, 0.97) 54%, rgba(16, 20, 18, 0.96));
  color: #fffaf3;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 22%, rgba(124, 202, 219, 0.86), transparent 17%),
    radial-gradient(circle at 17% 48%, rgba(217, 137, 174, 0.9), transparent 38%),
    linear-gradient(145deg, #050706 0%, #101412 48%, #050706 100%);
  color: #f5efe8;
  box-shadow:
    inset 0 0 0 1px rgba(184, 163, 111, 0.48),
    inset 0 -12px 24px rgba(0, 0, 0, 0.46),
    0 14px 34px rgba(0, 0, 0, 0.32),
    0 0 24px rgba(217, 137, 174, 0.18);
}

.brand-mark::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 16px;
  width: 14px;
  height: 7px;
  background: linear-gradient(90deg, #8c774a, #eadca6 52%, #b8a36f);
  clip-path: polygon(0 100%, 12% 35%, 32% 68%, 50% 0, 68% 68%, 88% 35%, 100% 100%);
  z-index: 1;
}

.brand-mark::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 9px;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--cold-light);
  box-shadow: 0 0 10px rgba(124, 202, 219, 0.88);
  transform: rotate(45deg);
  z-index: 1;
}

.brand-letter {
  position: absolute;
  top: 16px;
  left: 0;
  z-index: 2;
  width: 100%;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(184, 163, 111, 0.68),
    0 0 12px rgba(217, 137, 174, 0.36);
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 2px;
  color: rgba(255, 250, 243, 0.65);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 250, 243, 0.74);
  text-align: left;
  position: relative;
}

.nav-badge {
  position: absolute;
  top: 5px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: #d9415d;
  color: white;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(24, 27, 33, 0.94);
}

.nav-badge[hidden] {
  display: none;
}

.nav-item svg,
.wallet svg,
.meta svg,
.mini-stat svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
  flex: 0 0 auto;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.14);
}

.main {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.main[data-view="chat"] .topbar {
  display: none;
}

.main[data-view="home"],
.main[data-view="agenda"],
.main[data-view="actions"],
.main[data-view="tarot"] {
  padding: 0;
}

.main[data-view="home"] .topbar,
.main[data-view="agenda"] .topbar,
.main[data-view="actions"] .topbar,
.main[data-view="tarot"] .topbar {
  display: none;
}

.main[data-view="liangtuan"] .topbar,
.main[data-view="liangtuanStore"] .topbar,
.main[data-view="liangtuanOrder"] .topbar {
  display: none;
}

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

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

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

h2 {
  font-size: 22px;
  line-height: 1.18;
}

h3 {
  font-size: 16px;
}

.wallet {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.wallet span,
.pill,
.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(24, 27, 33, 0.08);
  color: var(--ink);
  white-space: nowrap;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 18px;
  align-items: start;
}

.home-dashboard {
  grid-template-columns: 1fr;
  gap: 0;
}

.home-content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.home-content-grid > .panel:nth-child(5),
.home-content-grid > .tarot-studio-panel {
  grid-column: span 2;
}

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.86fr);
  gap: 18px;
}

.home-character-hero {
  min-height: min(560px, calc(100vh - 168px));
  grid-template-columns: 1fr;
  position: relative;
  overflow: hidden;
  background: #181b21;
}

.home-character-hero .hero-art,
.home-character-hero .hero-copy {
  grid-area: 1 / 1;
}

.home-character-hero .hero-art {
  height: 100%;
  min-height: inherit;
  background: #181b21;
}

.home-character-hero .hero-art img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: var(--image-focus, 50% 8%);
}

.home-character-hero .hero-art::after {
  background:
    linear-gradient(90deg, rgba(16, 18, 23, 0.22) 0%, rgba(16, 18, 23, 0.08) 40%, transparent 72%),
    linear-gradient(180deg, transparent 58%, rgba(16, 18, 23, 0.24) 100%);
}

.home-character-hero .hero-copy {
  width: min(480px, 50%);
  min-height: inherit;
  position: relative;
  z-index: 2;
  color: #fffaf3;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.24);
}

.home-character-hero .hero-copy h2 {
  color: #fffaf3;
}

.home-character-hero .lead {
  max-width: 420px;
  color: rgba(255, 250, 243, 0.84);
}

.home-character-hero .mini-stat {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(18, 21, 27, 0.52);
  color: #fffaf3;
}

.home-character-hero .mini-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.home-character-hero .mini-stat svg {
  width: 14px;
  height: 14px;
}

.home-character-hero .mini-stat strong {
  margin: 0;
  font-size: 15px;
}

.home-character-hero .mini-stat span {
  color: rgba(255, 250, 243, 0.72);
  font-size: 12px;
  white-space: nowrap;
}

.home-character-hero .character-plaque {
  left: auto;
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(18, 21, 27, 0.42);
  backdrop-filter: blur(12px);
}

.home-vn-stage {
  min-height: 100svh;
  background: #11151a;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.home-vn-stage.hero-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.home-vn-stage .home-vn-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.08) brightness(1.2);
  transform-origin: center;
}

.home-vn-stage .home-vn-character-image {
  object-fit: cover;
  object-position: var(--image-focus, 50% 8%);
}

.home-vn-stage .hero-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  background: transparent;
}

.home-vn-stage.has-home-video .home-vn-bg {
  object-position: center 18%;
  filter: saturate(1.08) brightness(1.16);
  transform: none;
}

.home-vn-stage.has-home-video .home-vn-video {
  animation: none;
  object-fit: contain;
  object-position: center top;
  background: #756d66;
}

.home-vn-stage .hero-art img {
  object-fit: contain;
  object-position: center bottom;
  filter: brightness(1.28) saturate(1.08);
  transform: translateX(-7%) scale(1.08);
  transform-origin: center bottom;
}

.home-vn-stage .hero-art img.identity-master-portrait {
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center top;
  box-shadow: none;
  filter: brightness(1.12) saturate(1.04);
  transform: none;
}

.home-vn-stage::before,
.home-vn-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-vn-stage::before {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(11, 13, 18, 0.02), transparent 32%),
    linear-gradient(90deg, rgba(11, 13, 18, 0.04), transparent 42%, rgba(11, 13, 18, 0.02));
}

.home-vn-stage::after {
  z-index: 3;
  background: linear-gradient(180deg, transparent 54%, rgba(11, 13, 18, 0.04) 72%, rgba(11, 13, 18, 0.2));
}

.home-vn-dialogue {
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 5;
  max-width: 760px;
  margin: 0 auto;
}

.story-dialogue-panel.home-vn-dialogue {
  padding: 12px 14px;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 250, 243, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
}

@media (prefers-reduced-motion: no-preference) {
  .home-vn-stage .home-vn-bg {
    animation: homeSceneBreath 11s ease-in-out infinite alternate;
  }

  .home-vn-stage .hero-art img {
    animation: homeCharacterBreath 8s ease-in-out infinite alternate;
  }

  .home-vn-stage .hero-art img.identity-master-portrait {
    animation: none;
  }
}

@keyframes homeSceneBreath {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.035) translate3d(-0.8%, -0.6%, 0);
  }
}

@keyframes homeCharacterBreath {
  from {
    transform: translateX(-7%) translateY(0) scale(1.08);
  }

  to {
    transform: translateX(-7%) translateY(-0.7%) scale(1.095);
  }
}

.home-vn-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.home-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.home-entry-card {
  min-height: 58px;
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 8px 10px;
  border: 1px solid rgba(118, 90, 160, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  color: #24201a;
  text-align: left;
}

.home-entry-card span {
  color: #765aa0;
  font-size: 12px;
  font-weight: 900;
}

.home-entry-card strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.25;
}

.home-weather-card {
  display: grid;
  gap: 10px;
  margin: 14px;
  padding: 16px;
  border: 1px solid rgba(118, 90, 160, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 252, 247, 0.94);
  box-shadow: var(--shadow);
}

.home-weather-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.home-weather-main div {
  display: grid;
  gap: 4px;
}

.home-weather-main strong {
  font-size: 24px;
}

.home-weather-main span,
.home-weather-card small {
  color: var(--muted);
}

.home-weather-card p {
  margin: 0;
}

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

.fitness-video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.fitness-video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #171a1f;
}

.fitness-video-card div {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.fitness-video-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.subpage {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 12px 18px 18px;
}

.subpage-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.subpage-header h2,
.subpage-header p {
  margin-bottom: 0;
}

.subpage-header h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.subpage-header p {
  color: var(--muted);
  line-height: 1.45;
}

.subpage-back-btn {
  min-height: 38px;
  white-space: nowrap;
}

.subpage .panel {
  padding: 14px;
}

.subpage .profile-card {
  gap: 12px;
  align-items: center;
}

.subpage .profile-card h2,
.subpage .panel h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.08;
}

.subpage .panel .eyebrow {
  margin-bottom: 6px;
}

.subpage .important-form,
.subpage .schedule-form {
  margin-top: 8px;
}

.subpage .important-list,
.subpage .schedule-list,
.subpage .task-list {
  gap: 8px;
}

.hero-panel,
.panel,
.card,
.modal-body {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.hero-copy h2 {
  max-width: 720px;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 0.98;
  margin-bottom: 16px;
}

.lead {
  color: #3f454e;
  font-size: 17px;
  line-height: 1.75;
  max-width: 620px;
}

.hero-art {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #1d2026;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: var(--image-focus, 50% 8%);
  display: block;
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(17, 19, 23, 0.72));
}

.character-plaque {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  color: #fffaf3;
}

.character-plaque h3 {
  margin-bottom: 6px;
  font-size: 28px;
}

.character-plaque p {
  margin: 0;
  color: rgba(255, 250, 243, 0.78);
}

.quick-actions,
.grid,
.task-list,
.schedule-list,
.important-list,
.card-grid,
.settings-grid,
.choice-list {
  display: grid;
  gap: 12px;
}

.quick-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.quick-actions.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.chip-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 0 14px;
}

.primary-btn {
  background: var(--charcoal);
  color: #fffaf3;
}

.ghost-btn,
.chip-btn {
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

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

.focus-grid.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: visible;
}

.focus-chip {
  min-height: 74px;
  display: grid;
  justify-items: start;
  align-content: center;
  text-align: left;
  white-space: normal;
}

.focus-chip.compact {
  min-height: 28px;
  flex: 0 0 auto;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
  text-align: center;
}

.focus-chip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.focus-chip.selected {
  border-color: rgba(31, 138, 138, 0.55);
  background: rgba(31, 138, 138, 0.1);
}

.profile-settings-disclosure summary,
.settings-compact-note summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.profile-settings-disclosure {
  grid-column: 1 / -1;
}

.profile-settings-disclosure summary::-webkit-details-marker,
.settings-compact-note summary::-webkit-details-marker {
  display: none;
}

.profile-settings-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-settings-summary .eyebrow {
  flex: 0 0 auto;
  margin: 0;
}

.profile-settings-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-settings-edit {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
}

.profile-settings-edit svg {
  width: 15px;
  height: 15px;
}

.profile-settings-form {
  margin-top: 16px;
}

.settings-compact-note {
  grid-column: 1 / -1;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
}

.settings-compact-body {
  margin-top: 10px;
}

.settings-compact-danger {
  width: max-content;
  min-height: 34px;
  font-size: 12px;
}

.danger-btn {
  background: #7b2635;
  color: white;
}

.panel {
  padding: 18px;
}

.profile-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.my-page {
  display: grid;
  gap: 16px;
}

.my-profile {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  text-align: left;
}

.my-profile:hover {
  border-color: rgba(217, 137, 174, 0.34);
}

.my-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(217, 137, 174, 0.26);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 250, 243, 0.96), transparent 18%),
    linear-gradient(145deg, rgba(217, 137, 174, 0.86), rgba(124, 202, 219, 0.5));
  color: #fffaf3;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(64, 42, 54, 0.18);
}

.my-profile-copy {
  min-width: 0;
}

.my-profile-edit {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

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

.my-profile p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.45;
}

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

.my-entry {
  min-height: 132px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 10px 12px;
  padding: 16px;
  border: 1px solid rgba(30, 32, 38, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 32px rgba(24, 27, 33, 0.08);
}

.my-entry svg {
  width: 22px;
  height: 22px;
  padding: 10px;
  box-sizing: content-box;
  border-radius: var(--radius);
  background: rgba(31, 138, 138, 0.09);
  color: var(--teal);
}

.my-entry span {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.my-entry strong {
  font-size: 18px;
}

.my-entry small {
  color: var(--muted);
  line-height: 1.45;
}

.my-entry em {
  grid-column: 2;
  color: #a35c00;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.mood-circle-page {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
  align-items: start;
}

.mood-form {
  display: grid;
  gap: 10px;
}

.mood-form textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  line-height: 1.6;
}

.mood-feed {
  display: grid;
  gap: 12px;
}

.mood-post {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(30, 32, 38, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 32px rgba(24, 27, 33, 0.08);
}

.mood-post-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.mood-avatar {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.mood-post-head strong,
.mood-post-head small {
  display: block;
}

.mood-post-head small {
  color: var(--muted);
  font-size: 12px;
}

.mood-post > p {
  margin: 0;
  color: var(--ink);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mood-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mood-reactions span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a35c00;
  font-size: 13px;
  font-weight: 800;
}

.mood-reactions svg {
  width: 15px;
  height: 15px;
}

.mood-comments {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 248, 229, 0.62);
}

.mood-comments p {
  margin: 0;
  color: #49505a;
  line-height: 1.55;
}

.period-page {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.period-overview {
  background: rgba(255, 252, 247, 0.82);
}

.period-status {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(200, 95, 114, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 244, 247, 0.76);
}

.period-status strong {
  color: #9f3f54;
  font-size: 24px;
}

.period-status span,
.period-status small {
  color: var(--muted);
  line-height: 1.45;
}

.period-boundary,
.period-symptoms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.period-boundary span,
.period-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 13px;
}

.period-form,
.period-form-grid,
.period-share {
  display: grid;
  gap: 12px;
}

.period-share {
  gap: 8px;
}

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

.period-chip {
  cursor: pointer;
}

.period-chip input {
  width: 14px;
  height: 14px;
  accent-color: var(--rose);
}

.period-chip.selected {
  border-color: rgba(200, 95, 114, 0.42);
  background: rgba(255, 238, 242, 0.86);
  color: #9f3f54;
}

.home-content-grid > .profile-card {
  order: 1;
}

.home-content-grid > .panel:nth-child(2) {
  order: 2;
}

.home-content-grid > .panel:nth-child(3) {
  order: 3;
}

.home-content-grid > .panel:nth-child(5) {
  order: 5;
}

.home-content-grid > .panel:nth-child(6) {
  order: 6;
}

.home-content-grid > .tarot-studio-panel {
  order: 7;
}

.tarot-studio-panel {
  border-color: rgba(189, 139, 63, 0.36);
  background:
    linear-gradient(135deg, rgba(32, 36, 43, 0.96), rgba(49, 43, 36, 0.88)),
    var(--charcoal);
  color: #fffaf3;
  overflow: hidden;
}

.tarot-studio-panel h2,
.tarot-studio-panel h3 {
  color: #fffaf3;
}

.tarot-studio-panel .lead,
.tarot-studio-panel p,
.tarot-studio-panel small,
.tarot-studio-panel .empty-note {
  color: rgba(255, 250, 243, 0.74);
}

.tarot-studio-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
  align-items: stretch;
}

.tarot-studio-scene {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(circle, rgba(64, 94, 154, 0.28), rgba(13, 18, 32, 0.96) 68%);
}

.tarot-studio-scene img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}

.tarot-studio-scene img.tarot-studio-card {
  width: min(100%, 240px);
  height: auto;
  min-height: 0;
  object-fit: contain;
  clip-path: inset(3px round 12px);
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.42));
}

.tarot-card-readable-label {
  position: absolute;
  bottom: 12px;
  left: 50%;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 12px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 220, 110, 0.36);
  border-radius: 999px;
  background: rgba(10, 15, 28, 0.9);
  color: #fffaf3;
  white-space: nowrap;
}

.tarot-card-readable-label strong {
  font-size: 20px;
}

.tarot-card-readable-label span {
  color: #ffdc6e;
  font-size: 14px;
}

.tarot-studio-copy {
  display: grid;
  gap: 14px;
  align-content: start;
}

.tarot-optin {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
}

.tarot-optin .field span {
  color: rgba(255, 250, 243, 0.72);
}

.tarot-result,
.tarot-ready {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.tarot-card-face,
.tarot-choice-card {
  min-height: 164px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 220, 110, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(255, 250, 243, 0.1), rgba(189, 139, 63, 0.18)),
    #15181d;
  color: #ffdc6e;
  text-align: center;
}

.tarot-ready {
  grid-template-columns: 1fr;
}

.tarot-card-face {
  align-content: center;
  gap: 8px;
}

.tarot-card-face span {
  font-size: 13px;
  font-weight: 900;
}

.tarot-card-face strong {
  color: #fffaf3;
  font-size: 22px;
}

.tarot-choice-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.tarot-result h3,
.tarot-ready h3 {
  margin-bottom: 6px;
}

.tarot-result small {
  display: block;
  margin-top: 8px;
}

.tarot-choice-row {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.tarot-choice-card {
  width: min(30%, 104px);
  min-height: 0;
  aspect-ratio: 928 / 1532;
  padding: 0;
  font-size: 48px;
  font-weight: 900;
}

.tarot-choice-card span {
  display: inline-block;
  animation: tarotFloat 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.35s);
}

.tarot-draw-dialog {
  width: min(720px, calc(100vw - 24px));
  height: min(820px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  margin: 0;
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  background: transparent;
  color: #fffaf3;
}

.tarot-draw-dialog::backdrop {
  background: rgba(5, 7, 6, 0.74);
  backdrop-filter: blur(14px);
}

.tarot-ritual-stage {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 220, 110, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(5, 7, 6, 0.98), rgba(24, 22, 19, 0.96) 44%, rgba(45, 31, 39, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 220, 110, 0.05) 0 1px, transparent 1px 86px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.tarot-ritual-stage::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: -1;
  border: 1px solid rgba(255, 220, 110, 0.16);
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(255, 220, 110, 0.13) 50%, transparent 52%),
    linear-gradient(0deg, transparent 0 48%, rgba(124, 202, 219, 0.1) 50%, transparent 52%);
  opacity: 0.8;
  animation: tarotRitualPulse 4s ease-in-out infinite;
}

.tarot-ritual-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.12);
  color: #fffaf3;
  font-size: 24px;
  line-height: 1;
}

.tarot-ritual-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 220, 110, 0.14);
  border-radius: 50%;
  transform: translate(-50%, -42%);
}

.tarot-ritual-orbit::before,
.tarot-ritual-orbit::after {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px solid rgba(124, 202, 219, 0.12);
  border-radius: 50%;
}

.tarot-ritual-orbit::after {
  inset: 78px;
  border-color: rgba(217, 137, 174, 0.14);
}

.tarot-ritual-copy {
  max-width: 480px;
  display: grid;
  gap: 10px;
  align-self: start;
}

.tarot-ritual-copy .eyebrow {
  color: #ffdc6e;
}

.tarot-ritual-copy h2 {
  margin: 0;
  color: #fffaf3;
  font-size: 42px;
  line-height: 1.08;
}

.tarot-ritual-copy p {
  margin: 0;
  color: rgba(255, 250, 243, 0.72);
  line-height: 1.65;
}

.tarot-ritual-guide {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: fit-content;
  max-width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(255, 220, 110, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 250, 243, 0.08);
  color: rgba(255, 250, 243, 0.82);
}

.tarot-ritual-guide strong {
  color: #ffdc6e;
  white-space: nowrap;
}

.tarot-ritual-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: center;
  gap: 14px;
}

.tarot-ritual-row .tarot-choice-card {
  position: relative;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border-color: rgba(255, 220, 110, 0.5);
  background: #15181d;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
  animation: tarotDealIn 520ms ease both, tarotCardGlow 3.4s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 120ms), calc(var(--i, 0) * -420ms);
}

.tarot-choice-art {
  opacity: 0.78;
  filter: saturate(0.9) brightness(0.74);
  transform: scale(1.05);
}

.tarot-ritual-row .tarot-choice-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  border: 1px solid rgba(255, 220, 110, 0.28);
  border-radius: calc(var(--radius) - 2px);
}

.tarot-ritual-row .tarot-choice-card::after {
  content: "";
  position: absolute;
  inset: -40% -70%;
  z-index: 2;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 250, 243, 0.22), transparent 60%);
  animation: tarotSweep 3.2s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.5s);
}

.tarot-ritual-row .tarot-choice-card:hover,
.tarot-ritual-row .tarot-choice-card:focus-visible {
  border-color: #ffdc6e;
}

.tarot-ritual-row .tarot-choice-card:hover .tarot-choice-art,
.tarot-ritual-row .tarot-choice-card:focus-visible .tarot-choice-art {
  opacity: 0.95;
  filter: saturate(1.05) brightness(0.9);
}

.tarot-ritual-row .tarot-choice-card span {
  position: relative;
  z-index: 1;
  color: #ffdc6e;
  text-shadow: 0 0 24px rgba(255, 220, 110, 0.52);
}

.tarot-ritual-skip {
  justify-self: center;
  min-width: 132px;
  background: rgba(255, 250, 243, 0.12);
  color: #fffaf3;
}

.tarot-result-stage {
  display: block;
  overflow: hidden;
}

.tarot-result-stage .story-character-image.tarot-result-hero-card {
  top: clamp(54px, 8vh, 72px);
  left: 50%;
  right: auto;
  bottom: auto;
  width: min(34vw, 260px);
  height: auto;
  padding: 0;
  object-fit: contain;
  object-position: center;
  transform: translateX(-50%);
  filter: drop-shadow(0 22px 42px rgba(12, 14, 22, 0.44));
}

.tarot-result-page {
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.tarot-result-copy {
  display: grid;
  gap: 9px;
}

.tarot-result-copy h2,
.tarot-result-copy p {
  margin: 0;
}

.tarot-result-stage .tarot-result-copy h2 {
  color: #49345f;
}

.tarot-result-stage .tarot-result-copy > p:not(.eyebrow),
.tarot-result-stage .tarot-reader-reading p,
.tarot-result-stage .tarot-reader-guide p {
  color: #343c48;
}

.tarot-reader-reading {
  padding: 12px;
  border: 1px solid rgba(255, 220, 110, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 250, 243, 0.08);
}

.tarot-reader-reading summary {
  cursor: pointer;
  color: #ffdc6e;
  font-weight: 900;
}

.tarot-reader-reading p {
  margin-top: 10px;
  color: rgba(255, 250, 243, 0.86);
  line-height: 1.62;
}

.tarot-reader-reading small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 250, 243, 0.68);
  line-height: 1.5;
}

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

.tarot-domain-reading {
  padding: 10px 12px;
  border: 1px solid rgba(118, 90, 160, 0.16);
  border-radius: var(--radius);
  background: rgba(118, 90, 160, 0.06);
}

.tarot-domain-reading summary {
  cursor: pointer;
  color: #765aa0;
  font-weight: 900;
}

.tarot-domain-reading .tarot-reading-grid {
  margin-top: 10px;
}

.tarot-reading-grid section {
  padding: 10px;
  border: 1px solid rgba(118, 90, 160, 0.16);
  border-radius: 10px;
  background: rgba(118, 90, 160, 0.06);
}

.tarot-reading-grid section:last-child {
  grid-column: 1 / -1;
}

.tarot-reading-grid strong {
  color: #765aa0;
  font-size: 13px;
}

.tarot-reading-grid p {
  margin-top: 5px;
  color: #343c48;
  font-size: 12px;
  line-height: 1.55;
}

.tarot-result-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.unlock-story-modal {
  width: min(430px, calc(100% - 24px));
  max-height: min(760px, calc(100vh - 24px));
  overflow: hidden;
}

.unlock-event-stage .story-character-image,
.tarot-vn-stage .story-character-image {
  object-fit: cover;
}

.tarot-vn-stage {
  min-height: 100%;
}

.tarot-vn-stage .story-scene-image {
  filter: saturate(1.08) brightness(0.78);
}

.tarot-vn-stage .tarot-ritual-orbit {
  z-index: 2;
  opacity: 0.7;
}

.tarot-vn-dialogue {
  max-height: 52%;
  overflow: auto;
}

.tarot-result-stage .tarot-vn-dialogue {
  bottom: calc(16px + env(safe-area-inset-bottom));
  max-height: min(42vh, 380px);
  background: rgba(255, 250, 243, 0.93);
}

.tarot-result-stage .tarot-reader-reading small {
  color: rgba(61, 52, 72, 0.68);
}

.tarot-result-stage .tarot-reader-guide strong {
  color: #765aa0;
}

.tarot-vn-dialogue .tarot-ritual-guide {
  background: rgba(88, 65, 112, 0.14);
  color: #3f334d;
}

.tarot-vn-dialogue .tarot-ritual-guide strong,
.tarot-vn-dialogue .tarot-reader-reading summary {
  color: #765aa0;
}

.tarot-vn-dialogue .tarot-ritual-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.tarot-vn-card-row {
  position: absolute;
  left: 54px;
  right: 54px;
  bottom: 286px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tarot-vn-dialogue .tarot-choice-card {
  min-height: 132px;
  opacity: 1;
  border-color: rgba(255, 220, 110, 0.72);
  background:
    radial-gradient(circle at 50% 56%, rgba(255, 220, 110, 0.28), transparent 24%),
    linear-gradient(160deg, rgba(49, 55, 70, 0.98), rgba(18, 21, 31, 0.98));
  color: #ffdc6e;
  box-shadow: 0 14px 28px rgba(18, 21, 31, 0.22);
}

.tarot-vn-dialogue .tarot-choice-card span {
  color: #ffdc6e;
  font-size: 48px;
  text-shadow: 0 0 18px rgba(255, 220, 110, 0.64);
}

.tarot-vn-card-row .tarot-choice-card {
  width: 100%;
  min-height: 0;
  animation: none;
  opacity: 1;
  filter: none;
}

.tarot-draw-stage .tarot-vn-card-row {
  top: clamp(116px, 18vh, 164px);
  right: auto;
  bottom: auto;
  left: 50%;
  width: min(86%, 640px);
  transform: translateX(-50%);
}

.tarot-draw-stage .tarot-vn-dialogue {
  max-height: 34%;
}

.tarot-vn-dialogue .tarot-result-page {
  grid-template-columns: 1fr;
}

.tarot-vn-dialogue .tarot-reader-reading,
.tarot-vn-dialogue .tarot-reader-guide {
  border-color: rgba(118, 90, 160, 0.18);
  background: rgba(118, 90, 160, 0.08);
}

@keyframes tarotDealIn {
  from {
    opacity: 0.34;
    filter: blur(10px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes tarotCardGlow {
  0%,
  100% {
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
  }

  50% {
    box-shadow: 0 22px 54px rgba(184, 163, 111, 0.28);
  }
}

@keyframes tarotSweep {
  0%,
  38% {
    transform: translateX(-28%);
    opacity: 0;
  }

  54% {
    opacity: 1;
  }

  76%,
  100% {
    transform: translateX(28%);
    opacity: 0;
  }
}

@keyframes tarotRitualPulse {
  0%,
  100% {
    opacity: 0.56;
  }

  50% {
    opacity: 0.92;
  }
}

.tarot-reader-guide {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-left: 3px solid rgba(255, 220, 110, 0.58);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255, 250, 243, 0.08);
}

.tarot-reader-guide strong {
  color: #ffdc6e;
}

.tarot-reader-guide p {
  margin: 0;
  color: rgba(255, 250, 243, 0.82);
  line-height: 1.55;
}

.tarot-reflection-form {
  display: grid;
  gap: 8px;
}

.tarot-reflection-form .field span {
  color: rgba(255, 250, 243, 0.72);
}

.tarot-reflection-form textarea {
  min-height: 86px;
  resize: vertical;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 250, 243, 0.92);
  color: #24201a;
}

@keyframes tarotFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

.tarot-history {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.tarot-history-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 243, 0.08);
}

.tarot-history-card {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  border: 1px solid rgba(255, 220, 110, 0.34);
  border-radius: 7px;
  background: #11182e;
}

.tarot-history-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tarot-history-row span {
  color: rgba(255, 250, 243, 0.68);
  font-size: 13px;
}

.tarot-studio-actions .primary-btn {
  grid-column: 1 / -1;
}

.button-row.tarot-studio-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.mini-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mini-stat {
  min-height: 68px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mini-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.mini-stat span {
  color: var(--muted);
  font-size: 13px;
}

.home-care-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.home-care-pills span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(31, 138, 138, 0.09);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.task-item,
.character-card,
.outfit-card,
.story-card,
.room-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.interlude-section {
  margin-top: 22px;
}

.interlude-card {
  border-style: dashed;
  background: rgba(250, 246, 238, 0.78);
}

.task-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.schedule-form {
  display: grid;
  grid-template-columns: 150px 118px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.important-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.schedule-form input,
.important-form input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.schedule-item {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.important-item {
  min-height: 76px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(31, 138, 138, 0.22);
  border-radius: var(--radius);
}

.important-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--charcoal);
  color: #fffaf3;
  font-weight: 800;
}

.important-item div:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.important-item span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.important-item.done {
  opacity: 0.72;
}

.schedule-item div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.schedule-item span {
  overflow-wrap: anywhere;
}

.schedule-item.done {
  opacity: 0.7;
}

.empty-note {
  margin: 0;
  color: var(--muted);
}

.task-item p,
.character-card p,
.story-card p,
.room-card p,
.outfit-card p {
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.5;
}

.progress {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(32, 36, 43, 0.12);
}

.progress > span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
}

.chat-layout.unified-chat {
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
  align-items: start;
}

.message-hub {
  display: grid;
  grid-template-columns: minmax(240px, 0.74fr) minmax(0, 1.26fr);
  gap: 16px;
}

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

.message-hub .chat-window {
  grid-template-rows: auto auto 1fr auto;
}

.wechat-window {
  grid-template-rows: auto auto minmax(280px, 1fr) auto auto;
  overflow: hidden;
}

.live-chat-window {
  display: block;
  min-height: 0;
  padding: 0;
  background: #0d1017;
  overflow: visible;
}

.live-stage {
  position: relative;
  min-height: min(760px, calc(100vh - 154px));
  overflow: hidden;
  border-radius: var(--radius);
  background: #0d1017;
  box-shadow: var(--shadow);
}

.live-stage::before,
.live-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.live-stage::before {
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.38) 0%, rgba(7, 9, 13, 0.1) 24%, transparent 44%),
    linear-gradient(90deg, rgba(7, 9, 13, 0.24) 0%, transparent 34%, rgba(7, 9, 13, 0.12) 100%);
}

.live-stage::after {
  background: linear-gradient(180deg, transparent 54%, rgba(7, 9, 13, 0.32) 76%, rgba(7, 9, 13, 0.78) 100%);
}

.live-character {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--image-focus, 50% 8%);
}

.live-character-video {
  object-fit: contain;
  object-position: center top;
  background: #756d66;
}

.live-stage[data-stage-state="breathing"] {
  background: #756d66;
}

.live-stage[data-stage-state="breathing"] .live-stage-atmosphere {
  display: none;
}

.live-stage-atmosphere {
  position: absolute;
  inset: -18%;
  z-index: 2;
  pointer-events: none;
}

.live-stage[data-stage-context="rain"] .live-stage-atmosphere {
  background: repeating-linear-gradient(102deg, transparent 0 28px, rgba(195, 220, 235, 0.16) 29px, transparent 31px 54px);
  animation: live-rain-drift 1.8s linear infinite;
}

.live-stage[data-stage-context="post-workout"] .live-stage-atmosphere {
  background: radial-gradient(circle at 58% 34%, rgba(255, 190, 130, 0.12), transparent 30%);
  animation: live-recovery-pulse 4.8s ease-in-out infinite alternate;
}

.live-character-static {
  transform: none;
}

@keyframes live-rain-drift {
  from { transform: translate3d(-1%, -8%, 0); }
  to { transform: translate3d(3%, 8%, 0); }
}

@keyframes live-recovery-pulse {
  from { opacity: 0.38; }
  to { opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
  .live-stage-atmosphere {
    animation: none;
  }
}

.live-chat-head {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 4;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.live-character-caption {
  max-width: min(210px, calc(100% - 150px));
  padding: 8px 10px 8px 12px;
  border-left: 3px solid rgba(255, 220, 110, 0.82);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(90deg, rgba(15, 17, 24, 0.66), rgba(15, 17, 24, 0.2));
  color: #fffaf3;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.live-character-caption span,
.live-character-caption strong,
.live-character-caption small {
  display: block;
  overflow: hidden;
  color: #fffaf3;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-character-caption span,
.live-character-caption small {
  color: rgba(255, 250, 243, 0.72);
  font-size: 12px;
  line-height: 1.25;
}

.live-character-caption strong {
  margin: 2px 0;
  font-size: 20px;
  line-height: 1.05;
}

.live-character-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-duty-btn {
  width: 26px;
  height: 26px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 220, 110, 0.46);
  border-radius: 50%;
  background: rgba(15, 17, 24, 0.5);
  color: #ffdc6e;
  pointer-events: auto;
}

.live-duty-btn svg {
  width: 14px;
  height: 14px;
}

.live-head-btn,
.live-select {
  pointer-events: auto;
}

.live-select {
  width: 76px;
  padding: 3px 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 17, 24, 0.58);
  backdrop-filter: blur(14px);
}

.live-select select {
  min-height: 24px;
  border-color: rgba(255, 255, 255, 0.18);
  background: #10141a;
  color: #fffaf3;
}

.live-select option {
  background: #10141a;
  color: #fffaf3;
}

.live-select option:disabled {
  background: #10141a;
  color: rgba(255, 250, 243, 0.36);
}

.live-conversation-strip {
  position: absolute;
  top: 64px;
  right: 14px;
  z-index: 3;
  margin: 0;
}

.live-conversation-scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: none;
  scroll-snap-type: y mandatory;
  touch-action: pan-y;
}

.live-conversation-scroll::-webkit-scrollbar {
  display: none;
}

.live-thread-more {
  width: 44px;
  height: 24px;
  margin-top: 4px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(15, 17, 24, 0.64);
  color: #fffaf3;
  font-size: 18px;
  line-height: 1;
  backdrop-filter: blur(14px);
}

.live-thread-tab {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: visible;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(15, 17, 24, 0.5);
  color: #fffaf3;
  backdrop-filter: blur(14px);
  scroll-snap-align: start;
}

.live-thread-tab.active {
  border-color: rgba(255, 220, 110, 0.68);
  background: rgba(36, 31, 22, 0.62);
  box-shadow: 0 0 0 2px rgba(255, 220, 110, 0.18);
}

.live-thread-tab img,
.live-thread-tab > span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center;
}

.live-thread-tab > span {
  display: grid;
  place-items: center;
  background: rgba(255, 250, 243, 0.14);
  color: #ffdc6e;
  font-weight: 900;
}

.live-thread-tab b {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.live-messages {
  position: absolute;
  left: 18px;
  right: 104px;
  bottom: 174px;
  z-index: 3;
  height: min(20%, 170px);
  max-height: min(20%, 170px);
  padding: 24px 6px 2px 0;
  overflow: auto;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.86) 22%, #000 40%, #000 100%);
}

.live-messages .message {
  max-width: 78%;
  font-size: 14px;
  line-height: 1.42;
}

.live-messages .message.with-avatar {
  grid-template-columns: 32px minmax(0, auto);
  gap: 6px;
  max-width: min(84%, 620px);
}

.live-messages .message-bubble-avatar {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.chat-mood-prompt {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 74px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 17, 24, 0.58);
  color: rgba(255, 250, 243, 0.86);
  font-size: 12px;
  backdrop-filter: blur(16px);
}

.chat-mood-prompt div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.chat-mood-prompt button {
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 250, 243, 0.9);
  color: #191c21;
  font-size: 12px;
  font-weight: 800;
}

.sticker-picker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 17, 24, 0.92);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  max-height: min(58svh, 424px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sticker-picker[hidden] {
  display: none;
}

.sticker-toggle {
  width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fffaf3;
  font-size: 20px;
  line-height: 1;
}

.sticker-toggle svg {
  width: 18px;
  height: 18px;
}

.sticker-pick {
  width: 100%;
  min-height: 52px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 250, 243, 0.94);
  color: #191c21;
  font-size: 10px;
  font-weight: 900;
}

.sticker-pick-art {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
  border-radius: 10px;
}

.sticker-pick span {
  max-width: 100%;
  overflow: hidden;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-messages .message.with-avatar {
  box-shadow: none;
}

.live-messages .message.with-avatar .message-copy {
  padding: 8px 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
}

.live-messages .message.butler {
  background: rgba(255, 255, 255, 0.9);
}

.live-messages .message.butler.with-avatar {
  background: transparent;
}

.live-messages .message.butler.with-avatar .message-copy {
  background: rgba(255, 255, 255, 0.9);
}

.live-messages .message.user {
  background: rgba(20, 23, 32, 0.86);
}

.chat-form.live-chat-form {
  grid-template-columns: auto minmax(0, 1fr) auto;
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 4;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 17, 24, 0.62);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
  overflow: visible;
}

.chat-form.live-chat-form input {
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.12);
  color: #fffaf3;
}

.chat-form.live-chat-form .primary-btn {
  min-height: 34px;
  padding: 0 10px;
}

.live-chat-form input::placeholder {
  color: rgba(255, 250, 243, 0.58);
}

.chat-side-panel {
  position: sticky;
  top: 22px;
}

.message-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.42fr);
  gap: 16px;
  align-items: start;
}

.message-title {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.message-avatar,
.friend-avatar,
.locked-avatar,
.message-bubble-avatar {
  object-fit: cover;
  object-position: center;
  display: block;
  border: 1px solid var(--line);
  background: rgba(32, 36, 43, 0.08);
}

.message-avatar {
  width: 74px;
  height: 74px;
  border-radius: 8px;
}

.relationship-meter {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.friend-list,
.feature-list,
.locked-friends {
  display: grid;
  gap: 10px;
}

.friend-card,
.locked-friend,
.feature-chip {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  text-align: left;
}

.friend-card {
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
}

.friend-avatar {
  width: 54px;
  height: 54px;
  border-radius: 8px;
}

.locked-friend.with-avatar {
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
}

.locked-avatar {
  width: 46px;
  height: 46px;
  border-radius: 8px;
}

.locked-friend small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.friend-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.friend-card.active,
.feature-chip.unlocked {
  border-color: rgba(31, 138, 138, 0.5);
  box-shadow: 0 0 0 2px rgba(31, 138, 138, 0.12);
}

.friend-card span,
.locked-friend span,
.feature-chip span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.friend-card strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.conversation-strip {
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 0.72fr);
  overflow-x: auto;
  padding: 0 0 10px;
  margin-bottom: 10px;
}

.conversation-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  text-align: left;
}

.conversation-card.active {
  border-color: rgba(31, 138, 138, 0.5);
  background: rgba(235, 249, 247, 0.78);
  box-shadow: 0 0 0 2px rgba(31, 138, 138, 0.12);
}

.conversation-avatar {
  width: 50px;
  height: 50px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  background: rgba(32, 36, 43, 0.08);
}

.conversation-avatar.fallback {
  display: grid;
  place-items: center;
  background: var(--charcoal);
  color: #ffdc6e;
  font-weight: 900;
}

.conversation-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.conversation-copy strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.conversation-copy small,
.conversation-copy em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-secondary {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.chat-context,
.profile-guide {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 252, 247, 0.72);
}

.wechat-chat-head {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid rgba(31, 138, 138, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.wechat-recipient {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wechat-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  object-fit: cover;
  background: rgba(32, 36, 43, 0.08);
}

.wechat-avatar.fallback {
  display: grid;
  place-items: center;
  background: var(--charcoal);
  color: #ffdc6e;
  font-weight: 900;
}

.wechat-recipient p,
.wechat-recipient h2 {
  margin: 0;
}

.wechat-recipient p,
.chat-recipient-select span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.wechat-recipient h2 {
  margin-top: 2px;
}

.wechat-recipient span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.chat-recipient-select {
  flex: 0 0 210px;
  display: grid;
  gap: 5px;
}

.chat-recipient-select select {
  width: 100%;
}

.wechat-chat-head.live-chat-head {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.chat-recipient-select.live-select {
  flex: 0 0 76px;
}

.chat-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.chat-context div {
  display: grid;
  gap: 4px;
}

.chat-context span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.chat-archive-note {
  align-self: center;
  max-width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 12px;
}

.unread-badge {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--rose);
  color: white;
  font-size: 12px;
  line-height: 1;
}

.locked-friend {
  opacity: 0.62;
}

.live-head-actions,
.message-header-actions,
.gift-picker-head,
.gift-picker-head > div {
  display: flex;
  align-items: center;
}

.live-head-actions,
.message-header-actions {
  gap: 8px;
}

.live-head-actions {
  pointer-events: auto;
}

.message-header-actions {
  justify-content: flex-end;
}

.live-gift-btn {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(15, 17, 24, 0.62);
  color: #ffdc6e;
  backdrop-filter: blur(12px);
}

.live-gift-btn svg {
  width: 17px;
  height: 17px;
}

.gift-picker-dialog {
  width: min(420px, calc(100vw - 24px));
  max-height: min(72svh, 640px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: #171918;
  color: #fffaf3;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.gift-picker-dialog::backdrop {
  background: rgba(8, 10, 12, 0.58);
  backdrop-filter: blur(5px);
}

.gift-picker-sheet {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.gift-picker-head {
  justify-content: space-between;
  gap: 12px;
}

.gift-picker-head > div {
  gap: 8px;
}

.gift-picker-head small {
  color: rgba(255, 250, 243, 0.6);
}

.gift-picker-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fffaf3;
}

.gift-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: 340px;
  overflow: auto;
}

.gift-picker-item {
  min-width: 0;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 8px 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: #fffaf3;
  text-align: center;
}

.gift-picker-item svg {
  width: 24px;
  height: 24px;
  color: #ffdc6e;
}

.gift-picker-item span {
  width: 100%;
  min-height: 30px;
  overflow: hidden;
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.gift-picker-item small {
  color: rgba(255, 250, 243, 0.58);
  font-size: 10px;
}

.gift-picker-item:disabled {
  opacity: 0.4;
}

.gift-liangtuan-btn {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 220, 110, 0.4);
  border-radius: 10px;
  background: rgba(255, 220, 110, 0.12);
  color: #ffdc6e;
}

.gift-liangtuan-btn svg {
  width: 18px;
  height: 18px;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.npc-thread {
  margin-top: 14px;
}

.message {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: var(--radius);
  line-height: 1.55;
  position: relative;
}

.message.with-avatar {
  display: grid;
  grid-template-columns: 36px minmax(0, auto);
  gap: 8px;
  align-items: start;
  max-width: min(92%, 680px);
}

.message-bubble-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.message-copy {
  min-width: 0;
}

.message-media {
  display: block;
  width: min(260px, 100%);
  margin-top: 8px;
  border-radius: 12px;
  background: #fff7df;
  object-fit: cover;
}

.message-media.active {
  aspect-ratio: 1;
  object-position: center;
}

.message-media.delivered {
  aspect-ratio: 2 / 3;
  object-position: 50% 20%;
}

.message.butler {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.message.message-attention {
  border-color: rgba(238, 173, 34, 0.92);
  box-shadow: 0 0 0 3px rgba(255, 220, 110, 0.36), 0 14px 34px rgba(66, 47, 16, 0.14);
}

.message.user {
  align-self: flex-end;
  background: var(--charcoal);
  color: #fffaf3;
}

.message.butler.with-avatar {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.message.with-avatar .message-copy {
  padding: 10px 12px;
  border-radius: var(--radius);
}

.message.butler.with-avatar .message-copy {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.message.sticker-message .message-copy {
  padding: 6px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.message.sticker-message.butler.with-avatar .message-copy {
  background: transparent;
  border: 0;
}

.sticker-card {
  width: 124px;
  min-height: 140px;
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  padding: 13px 10px 10px;
  border: 2px solid rgba(32, 36, 43, 0.08);
  border-radius: 20px;
  background: #fffdf8;
  color: #24201a;
  box-shadow: 0 12px 28px rgba(24, 27, 33, 0.14);
  overflow: hidden;
}

.sticker-card::before {
  content: "";
  position: absolute;
  inset: auto -18px -26px;
  height: 58px;
  background: #ffd7e3;
  opacity: 0.18;
  border-radius: 999px 999px 0 0;
}

.sticker-card b {
  position: relative;
  z-index: 3;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.15;
  text-align: center;
}

.sticker-art {
  position: relative;
  z-index: 2;
  width: 104px;
  height: 104px;
  object-fit: contain;
  display: block;
}

.sticker-has-image {
  width: 136px;
  min-height: 136px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sticker-has-image::before,
.sticker-has-image b {
  display: none;
}

.sticker-has-image .sticker-art {
  width: 136px;
  height: 136px;
  border-radius: 14px;
}

.sticker-tired {
  background: #f5f8ff;
}

.sticker-calm,
.sticker-cool {
  background: #f5fbfa;
}

.sticker-firm {
  background: #fff8ea;
}

.sticker-happy {
  background: #fffaf0;
}

.sticker-soft {
  background: #fff7fb;
}

.message.with-avatar.message-attention {
  border: 0;
  box-shadow: none;
}

.message.with-avatar.message-attention .message-copy {
  border-color: rgba(238, 173, 34, 0.92);
  box-shadow: 0 0 0 3px rgba(255, 220, 110, 0.36), 0 14px 34px rgba(66, 47, 16, 0.14);
}

.report-btn {
  display: inline-flex;
  opacity: 0;
  min-height: 24px;
  margin-top: 8px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  transition: opacity 160ms ease;
}

.message:hover .report-btn,
.message:focus-within .report-btn,
.report-btn:focus-visible {
  opacity: 1;
}

.source-card {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.source-card span {
  color: var(--muted);
  font-size: 13px;
}

.source-card p {
  margin: 0;
  color: var(--muted);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 14px;
}

.chat-form input,
.field input,
.field select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.card-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  align-items: start;
}

.empty-state {
  max-width: 720px;
}

.character-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.character-card.locked {
  filter: grayscale(0.8);
  opacity: 0.62;
}

.character-card-art,
.room-preview {
  height: auto;
  aspect-ratio: 4 / 5;
  margin: -14px -14px 14px;
  overflow: hidden;
  background: rgba(32, 36, 43, 0.08);
  border-bottom: 1px solid var(--line);
}

.character-card-art img,
.room-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.character-card-art img {
  object-position: var(--image-focus, 50% 8%);
}

.room-preview {
  height: 150px;
  aspect-ratio: auto;
}

.manor-hero-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(32, 36, 43, 0.08);
}

.manor-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.meta,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  min-height: 26px;
  font-size: 12px;
  box-shadow: none;
}

.outfit-card.active,
.room-card.active {
  border-color: rgba(31, 138, 138, 0.5);
  box-shadow: 0 0 0 2px rgba(31, 138, 138, 0.12);
}

.voice-samples {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(31, 138, 138, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 250, 243, 0.68);
}

.voice-samples.locked {
  border-color: rgba(32, 36, 43, 0.12);
  background: rgba(255, 255, 255, 0.5);
}

.voice-coverage {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.voice-sample-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.voice-sample-btn {
  min-height: 32px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(31, 138, 138, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--charcoal);
  font-size: 12px;
  white-space: normal;
}

.voice-sample-btn svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  stroke-width: 2;
}

.voice-sample-btn.playing,
.voice-sample-btn:hover {
  border-color: rgba(31, 138, 138, 0.55);
  background: rgba(31, 138, 138, 0.1);
}

.voice-detail {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.liangtuan-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.38fr);
  gap: 18px;
  align-items: start;
}

.liangtuan-app {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: #fffaf0;
  box-shadow: var(--shadow);
}

.lt-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 240px);
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: #261d12;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.46), transparent 28%),
    linear-gradient(135deg, rgba(245, 192, 82, 0.97), rgba(255, 230, 164, 0.94)),
    linear-gradient(90deg, rgba(31, 138, 138, 0.18), transparent);
}

.lt-brand,
.lt-location,
.lt-search,
.lt-alert,
.lt-stats,
.lt-service-bar,
.lt-cart-summary,
.lt-filter-row,
.lt-total,
.lt-order-head {
  display: flex;
  align-items: center;
}

.lt-brand {
  gap: 12px;
}

.lt-logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #24201a;
  color: #ffd44e;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(47, 37, 16, 0.2);
}

.lt-brand p,
.lt-brand h2,
.lt-section-title h2,
.lt-section-title p {
  margin: 0;
}

.lt-brand p,
.lt-location,
.lt-item-title p,
.lt-store-card small,
.lt-order small,
.lt-cart-line small {
  color: rgba(38, 29, 18, 0.66);
  font-size: 13px;
}

.lt-brand h2 {
  font-size: 34px;
  line-height: 1;
}

.lt-location {
  align-self: flex-start;
  min-height: 36px;
  gap: 7px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.lt-location svg,
.lt-search svg,
.lt-standalone-actions svg,
.lt-store-card svg,
.lt-order-head svg,
.lt-submit svg,
.lt-add-btn svg,
.lt-cart-line svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.lt-search {
  width: 100%;
  max-width: 240px;
  justify-self: end;
  min-height: 40px;
  gap: 10px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(60, 47, 21, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #8b7350;
  box-shadow: 0 12px 30px rgba(84, 62, 20, 0.08);
}

.lt-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #261d12;
  font: inherit;
}

.lt-search input::placeholder {
  color: #8b7350;
}

.lt-standalone-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 0 20px 12px;
  padding: 12px;
  border: 1px solid rgba(54, 43, 24, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.lt-standalone-card div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.lt-standalone-card strong {
  color: #30261a;
}

.lt-standalone-card span {
  color: #6e604d;
  font-size: 13px;
  line-height: 1.45;
}

.lt-standalone-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}

.lt-standalone-actions .ghost-btn,
.lt-standalone-actions .primary-btn {
  min-height: 38px;
  padding: 0 12px;
}

.lt-alert {
  gap: 10px;
  margin: 0 20px 12px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 138, 138, 0.22);
  border-radius: var(--radius);
  background: rgba(31, 138, 138, 0.08);
  color: #2d4b4e;
  line-height: 1.45;
}

.lt-alert span {
  color: #48676a;
  font-size: 13px;
}

.lt-stats {
  gap: 8px;
  padding: 0 20px 10px;
  overflow-x: auto;
}

.lt-stats span {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(226, 167, 46, 0.35);
  border-radius: 999px;
  background: rgba(255, 232, 165, 0.62);
  color: #5e4620;
  font-size: 13px;
}

.lt-service-bar {
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 12px;
}

.lt-service-bar span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(31, 138, 138, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #48676a;
  font-size: 12px;
  font-weight: 700;
}

.lt-service-bar svg {
  width: 14px;
  height: 14px;
}

.lt-cart-summary {
  justify-content: space-between;
  gap: 10px;
  margin: 0 20px 14px;
  padding: 10px 12px;
  border: 1px solid rgba(36, 32, 26, 0.1);
  border-radius: var(--radius);
  background: #24201a;
  color: #fff7df;
  box-shadow: 0 12px 26px rgba(42, 32, 17, 0.14);
}

.lt-cart-summary span {
  min-width: 0;
  font-size: 13px;
}

.lt-cart-summary strong {
  color: #ffdc6e;
}

.lt-cart-summary.pulse,
.lt-mobile-checkout.pulse {
  animation: lt-cart-pulse 620ms ease-out;
}

@keyframes lt-cart-pulse {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(255, 198, 66, 0.62), 0 12px 26px rgba(42, 32, 17, 0.14);
  }
  45% {
    transform: translateY(-2px) scale(1.012);
    box-shadow: 0 0 0 8px rgba(255, 198, 66, 0.18), 0 16px 30px rgba(42, 32, 17, 0.18);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(255, 198, 66, 0), 0 12px 26px rgba(42, 32, 17, 0.14);
  }
}

.lt-cart-jump {
  flex: 0 0 auto;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: #ffdc6e;
  color: #24201a;
  font-weight: 900;
}

.lt-post-order {
  display: grid;
  gap: 8px;
  margin: 0 20px 14px;
  padding: 14px;
  border: 1px solid rgba(31, 138, 138, 0.22);
  border-radius: var(--radius);
  background: #f4fffb;
  box-shadow: 0 12px 26px rgba(31, 138, 138, 0.1);
}

.lt-post-order-head,
.lt-post-order-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lt-post-order-head span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1f8a72;
  font-weight: 900;
}

.lt-post-order h3,
.lt-post-order p {
  margin: 0;
}

.lt-courier-card {
  position: relative;
  display: grid;
  margin: 4px 0;
  overflow: hidden;
  border: 1px solid rgba(54, 43, 24, 0.12);
  border-radius: 14px;
  background: #fff7df;
}

.lt-courier-card img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.lt-courier-card.active img {
  aspect-ratio: 16 / 10;
  object-position: 50% 0;
}

.lt-courier-card.delivered img {
  aspect-ratio: 2 / 3;
  object-position: 50% 20%;
}

.lt-courier-card figcaption {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.92);
}

.lt-courier-card figcaption small {
  color: var(--muted);
}

.lt-post-order h3 {
  font-size: 22px;
}

.lt-post-order small {
  color: var(--muted);
  line-height: 1.4;
}

.lt-post-order-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.lt-categories {
  display: grid;
  grid-template-columns: repeat(5, minmax(78px, 1fr));
  gap: 8px;
  padding: 0 20px 14px;
}

.lt-category {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid rgba(54, 43, 24, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  color: #4b3b21;
}

.lt-category svg {
  width: 18px;
  height: 18px;
}

.lt-category span {
  font-size: 12px;
}

.lt-category.active {
  border-color: rgba(238, 173, 34, 0.68);
  background: #24201a;
  color: #ffdc6e;
}

.lt-deals,
.lt-store-strip {
  display: flex;
  gap: 10px;
  padding: 0 20px 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.lt-deal {
  flex: 0 0 220px;
  min-height: 122px;
  display: grid;
  align-content: space-between;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(200, 95, 114, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff8e5, #ffe6eb);
  color: #30261a;
  text-align: left;
  scroll-snap-align: start;
}

.lt-deal span,
.lt-deal em {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(200, 95, 114, 0.12);
  color: #9a3f52;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.lt-deal small {
  color: #765c43;
  line-height: 1.4;
}

.lt-store-card {
  flex: 0 0 268px;
  min-height: 132px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(54, 43, 24, 0.12);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  scroll-snap-align: start;
}

.lt-store-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.lt-store-card.all {
  grid-template-columns: minmax(0, 1fr);
  flex-basis: 210px;
  background: #24201a;
  color: #fff8e5;
}

.lt-store-card.active {
  border-color: rgba(238, 173, 34, 0.86);
  box-shadow: 0 0 0 2px rgba(238, 173, 34, 0.16);
}

.lt-store-card img {
  width: 86px;
  height: 112px;
  object-fit: cover;
  border-radius: var(--radius);
  background: rgba(32, 36, 43, 0.08);
}

.lt-store-card span {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: center;
}

.lt-store-card strong,
.lt-cart-line strong {
  overflow-wrap: anywhere;
}

.lt-store-card small {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lt-store-card .lt-store-rating {
  color: #6f4a00;
  font-weight: 800;
}

.lt-store-rating b,
.lt-store-review-head b,
.lt-store-review-list header span {
  color: #ffb300;
  letter-spacing: 1px;
}

.lt-store-card .lt-store-terms {
  color: #7d725f;
  font-size: 12px;
}

.lt-store-card .lt-store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.lt-store-badges b {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(31, 138, 138, 0.08);
  color: #327074;
  font-size: 11px;
}

.lt-store-card.all small {
  color: rgba(255, 248, 229, 0.72);
}

.lt-store-card em {
  color: #a35c00;
  font-size: 12px;
  font-style: normal;
}

.lt-store-card.all em {
  color: #ffdc6e;
}

.lt-review-btn {
  min-height: 30px;
  border: 1px solid rgba(31, 138, 138, 0.16);
  border-radius: 999px;
  background: rgba(31, 138, 138, 0.08);
  color: #2f6d72;
  font-size: 12px;
  font-weight: 900;
}

.lt-store-reviews {
  display: grid;
  gap: 10px;
  margin: 0 20px 16px;
  padding: 12px;
  border: 1px solid rgba(54, 43, 24, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

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

.lt-store-review-head div {
  display: grid;
  gap: 4px;
}

.lt-store-review-head span,
.lt-store-review-list small {
  color: var(--muted);
  font-size: 12px;
}

.lt-store-review-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.lt-store-review-list article {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(54, 43, 24, 0.1);
  border-radius: var(--radius);
  background: #fff;
}

.lt-store-review-list header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.lt-store-review-list p {
  margin: 0;
  color: #5b5360;
  font-size: 13px;
  line-height: 1.45;
}

.lt-feed {
  display: grid;
  gap: 12px;
  padding: 0 20px 22px;
}

.lt-section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.lt-section-title span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.lt-filter-row {
  gap: 8px;
  overflow-x: auto;
}

.lt-filter-row span {
  flex: 0 0 auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(54, 43, 24, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #5b5360;
  font-size: 12px;
  font-weight: 700;
}

.lt-item {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  min-height: 156px;
  padding: 12px;
  border: 1px solid rgba(54, 43, 24, 0.12);
  border-radius: var(--radius);
  background: #fff;
}

.lt-item-media {
  position: relative;
  width: 128px;
  height: 132px;
  min-width: 0;
}

.lt-item-media > img {
  width: 128px;
  height: 132px;
  object-fit: cover;
  border-radius: var(--radius);
  background: rgba(32, 36, 43, 0.08);
}

.lt-item-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  max-width: calc(100% - 12px);
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 246, 251, 0.94);
  color: #b13f63;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  box-shadow: 0 4px 12px rgba(54, 43, 24, 0.14);
}

.lt-item-main,
.lt-item-main > div,
.lt-cart-line span,
.lt-order,
.lt-review-list {
  min-width: 0;
}

.lt-item-main {
  display: grid;
  gap: 8px;
}

.lt-item-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.lt-item-title h3 {
  margin-bottom: 0;
  font-size: 17px;
}

.lt-item-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.lt-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: #746953;
  font-size: 12px;
}

.lt-item-meta span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle;
  border-radius: 999px;
  background: rgba(116, 105, 83, 0.42);
}

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

.lt-tags span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(31, 138, 138, 0.08);
  color: #327074;
  font-size: 12px;
}

.lt-item-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.lt-item-foot div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.lt-item-foot strong {
  color: #d47800;
  font-size: 18px;
  line-height: 1.15;
  white-space: nowrap;
}

.lt-item-foot del,
.lt-item-foot small {
  color: var(--muted);
  font-size: 12px;
}

.lt-add-btn {
  min-width: 62px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: #ffc642;
  color: #24201a;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(207, 139, 0, 0.22);
}

.lt-add-btn span {
  font-size: 12px;
  line-height: 1;
}

.lt-add-btn.added {
  background: #24201a;
  color: #ffdc6e;
}

.lt-review-list p {
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(54, 43, 24, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: #5b5360;
  line-height: 1.45;
  font-size: 13px;
}

.liangtuan-side {
  display: grid;
  gap: 14px;
  align-content: start;
  position: sticky;
  top: 20px;
}

.lt-mobile-checkout {
  display: none;
}

.liangtuan-subpage {
  display: grid;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
}

.lt-subpage-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.lt-store-detail {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(54, 43, 24, 0.12);
  border-radius: var(--radius);
  background: #fff;
}

.lt-store-detail > img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
}

.lt-store-detail > div {
  display: grid;
  gap: 8px;
  align-content: center;
}

.lt-store-detail h2,
.lt-store-detail p {
  margin: 0;
}

.lt-store-detail strong b {
  color: #ffb300;
  letter-spacing: 1px;
}

.lt-order-panel {
  border-color: rgba(238, 173, 34, 0.26);
  background: rgba(255, 251, 239, 0.86);
}

.lt-growth-panel {
  border-color: rgba(31, 138, 138, 0.18);
}

.lt-share-card {
  padding: 12px;
  border: 1px dashed rgba(31, 138, 138, 0.28);
  border-radius: var(--radius);
  background: rgba(31, 138, 138, 0.06);
}

.lt-share-card p {
  margin: 0;
  color: #31565a;
  line-height: 1.5;
}

.lt-growth-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.lt-growth-metrics span {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
}

.lt-growth-metrics strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.lt-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.lt-cart {
  display: grid;
  gap: 8px;
}

.lt-cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.lt-cart-line span {
  display: grid;
  gap: 3px;
}

.lt-cart-line .ghost-btn {
  width: 38px;
  min-height: 38px;
  padding: 0;
}

.lt-total {
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border: 1px dashed rgba(212, 120, 0, 0.32);
  border-radius: var(--radius);
  background: rgba(255, 230, 158, 0.32);
}

.lt-total strong {
  color: #d47800;
  font-size: 22px;
}

.lt-total small {
  color: var(--green);
  font-weight: 800;
}

.lt-submit {
  width: 100%;
}

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

.lt-order {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.lt-order-head {
  justify-content: space-between;
  gap: 10px;
}

.lt-order-head span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94630b;
  font-size: 13px;
  font-weight: 800;
}

.lt-order p {
  margin: 0;
  line-height: 1.45;
}

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

.lt-route span {
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(32, 36, 43, 0.08);
  color: var(--muted);
  font-size: 12px;
}

.lt-route span.done {
  background: #24201a;
  color: #ffdc6e;
}

.lt-review-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.lt-review-form input {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.lt-review-list {
  display: grid;
  gap: 8px;
}

.lt-review-list.public p {
  background: rgba(255, 248, 229, 0.68);
}

.modal {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  border: 0;
  padding: 0;
  margin: 0;
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  overflow: auto;
}

.modal::backdrop {
  background: rgba(20, 22, 28, 0.56);
  backdrop-filter: blur(8px);
}

.modal-body {
  padding: 24px;
}

.story-modal {
  width: min(430px, calc(100% - 24px));
  max-height: min(760px, calc(100vh - 24px));
  overflow: hidden;
}

.story-event-stage {
  position: relative;
  min-height: min(740px, calc(100vh - 24px));
  overflow: hidden;
  border-radius: var(--radius);
  background: #0d1017;
  box-shadow: var(--shadow);
}

.story-event-stage::before,
.story-event-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.story-event-stage::before {
  background:
    linear-gradient(180deg, rgba(12, 13, 18, 0.56) 0%, rgba(12, 13, 18, 0.1) 32%, transparent 54%),
    linear-gradient(90deg, rgba(12, 13, 18, 0.38) 0%, transparent 42%, rgba(12, 13, 18, 0.22) 100%);
}

.story-event-stage::after {
  background: linear-gradient(180deg, transparent 34%, rgba(12, 13, 18, 0.2) 62%, rgba(12, 13, 18, 0.72) 100%);
}

.story-scene-image,
.story-character-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.story-scene-image {
  object-fit: cover;
  object-position: center;
}

.story-character-image {
  z-index: 2;
  object-fit: cover;
  object-position: var(--story-focus, 50% 8%);
}

.story-close-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #2f343b;
  font-size: 24px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.story-dialogue-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 18px;
  z-index: 3;
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.story-dialogue-panel .eyebrow {
  margin: 0 0 6px;
  color: rgba(88, 76, 54, 0.78);
  overflow-wrap: anywhere;
}

.story-dialogue-panel h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.18;
}

.story-dialogue-panel p {
  margin: 0;
  color: #3f454e;
  line-height: 1.58;
}

.unlock-dialogue-lines {
  display: grid;
  gap: 6px;
}

.story-dialogue-panel .unlock-dialogue-lines p {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
}

.story-dialogue-panel .unlock-dialogue-lines strong {
  color: #7b5b2f;
  white-space: nowrap;
}

.story-dialogue-panel .unlock-dialogue-lines span {
  overflow-wrap: anywhere;
}

.story-choice-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.story-choice-list .choice-card {
  min-height: 44px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.78);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

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

.dialog-copy {
  display: grid;
  gap: 12px;
  color: #3f454e;
  line-height: 1.65;
}

.dialog-copy ul {
  margin: 0;
  padding-left: 18px;
}

.dialog-copy li + li {
  margin-top: 4px;
}

.choice-list {
  margin-top: 16px;
}

.choice-card {
  width: 100%;
  justify-content: flex-start;
  min-height: 54px;
  text-align: left;
}

.interlude-line {
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  line-height: 1.55;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(120%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  max-width: min(520px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: var(--radius);
  background: rgba(27, 29, 34, 0.94);
  color: white;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, opacity 180ms ease, visibility 180ms ease;
  z-index: 10;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  visibility: visible;
  opacity: 1;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 13px;
  color: var(--muted);
}

.fine-print {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  html {
    scroll-padding-bottom: 116px;
  }

  button,
  input,
  select {
    scroll-margin-bottom: 116px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding-bottom: calc(49px + env(safe-area-inset-bottom));
  }

  .rail {
    min-height: 0;
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 5px 10px calc(5px + env(safe-area-inset-bottom));
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    overflow: hidden;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .toast {
    bottom: calc(61px + env(safe-area-inset-bottom));
  }

  .brand {
    display: none;
  }

  .nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
    overflow: visible;
  }

  .nav-item {
    flex: 1 1 0;
    min-width: 0;
    min-height: 38px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 0 6px;
    text-align: center;
  }

  .nav-badge {
    top: 3px;
    right: 10px;
  }

  .nav-item span {
    font-size: 11px;
  }

  .nav-item svg {
    width: 15px;
    height: 15px;
  }

  .main {
    padding: 18px 18px 116px;
  }

  .main[data-view="home"],
  .main[data-view="agenda"],
  .main[data-view="actions"],
  .main[data-view="tarot"] {
    padding: 0 0 76px;
  }

  .main[data-view="home"] {
    padding-bottom: 0;
  }

  .main[data-view="home"] .topbar,
  .main[data-view="agenda"] .topbar,
  .main[data-view="actions"] .topbar,
  .main[data-view="tarot"] .topbar {
    display: none;
  }

  .main[data-view="chat"] {
    padding: 0 0 76px;
  }

  .main:not([data-view="chat"]) .topbar {
    position: relative;
    display: block;
    padding-top: 18px;
    margin-bottom: 16px;
  }

  .main[data-view="liangtuan"] .topbar,
  .main[data-view="liangtuanStore"] .topbar,
  .main[data-view="liangtuanOrder"] .topbar {
    display: none;
  }

  .main:not([data-view="chat"]) .wallet {
    position: absolute;
    top: 0;
    right: 0;
    gap: 4px;
    justify-content: flex-end;
  }

  .main:not([data-view="chat"]) .wallet span {
    min-height: 20px;
    padding: 0 6px;
    gap: 3px;
    font-size: 10px;
    line-height: 1;
  }

  .main:not([data-view="chat"]) .wallet svg {
    width: 12px;
    height: 12px;
  }

  .topbar,
  .dashboard,
  .home-content-grid,
  .my-grid,
  .mood-circle-page,
  .period-page,
  .period-form-grid,
  .hero,
  .chat-layout,
  .message-hub,
  .message-header,
  .chat-context,
  .tarot-studio-layout,
  .tarot-optin,
	  .liangtuan-page,
	  .lt-store-detail,
	  .lt-store-review-list {
	    grid-template-columns: 1fr;
	  }

  .liangtuan-side {
    position: static;
  }

	  .my-profile {
	    grid-template-columns: auto minmax(0, 1fr) auto;
	  }

	  .home-content-grid > .panel:nth-child(5),
	  .home-content-grid > .tarot-studio-panel {
	    grid-column: auto;
  }

  .home-character-hero {
    min-height: 540px;
  }

  .home-character-hero .hero-copy {
    width: 100%;
    justify-content: flex-end;
    padding-top: 210px;
  }

  .home-character-hero .character-plaque {
    display: none;
  }

  .wechat-chat-head {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-layout.unified-chat {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .wechat-window {
    min-height: auto;
    grid-template-rows: auto auto minmax(140px, 180px) auto auto;
  }

  .live-chat-window {
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .live-stage {
    min-height: calc(100vh - 52px - env(safe-area-inset-bottom));
    border-radius: 0;
    box-shadow: none;
  }

  .story-modal {
    width: 100%;
    max-height: 100vh;
  }

  .story-event-stage {
    min-height: 100vh;
    border-radius: 0;
  }

  .story-dialogue-panel {
    left: 8px;
    right: 8px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    padding: 12px;
  }

  .story-dialogue-panel h2 {
    font-size: 18px;
  }

  .story-choice-list .choice-card {
    min-height: 40px;
    padding: 8px 10px;
  }

  .tarot-draw-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
  }

  .tarot-ritual-stage {
    border-radius: 0;
    padding: 28px 16px calc(18px + env(safe-area-inset-bottom));
  }

  .tarot-ritual-copy h2 {
    font-size: 30px;
  }

  .tarot-ritual-row {
    gap: 8px;
  }

  .tarot-ritual-row .tarot-choice-card {
    min-height: 0;
    font-size: 42px;
  }

  .tarot-result-page {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tarot-reading-grid {
    grid-template-columns: 1fr;
  }

  .tarot-reading-grid section:last-child {
    grid-column: auto;
  }

  .tarot-result-stage .story-character-image.tarot-result-hero-card {
    top: 36px;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(58vw, 270px);
    height: auto;
    padding: 0;
  }

  .tarot-ritual-orbit {
    width: 280px;
    height: 280px;
  }

  .live-chat-head {
    top: 10px;
    left: 10px;
    right: 10px;
    flex-direction: row;
    align-items: flex-start;
  }

  .live-character-caption {
    max-width: calc(100% - 104px);
  }

  .live-select {
    width: 72px;
    flex-basis: 72px;
    height: auto;
    min-height: 0;
  }

  .live-select select {
    min-height: 24px;
    height: 24px;
    font-size: 12px;
  }

  .live-conversation-strip {
    right: 10px;
    top: 60px;
  }

	  .live-messages {
	    left: 12px;
	    right: 12px;
	    bottom: 102px;
	    height: min(60%, 480px);
	    max-height: min(60%, 480px);
	    padding-top: 16px;
	  }

	  .chat-mood-prompt {
	    display: none;
	  }

  .live-chat-form {
    left: 10px;
    right: 10px;
    bottom: 8px;
    padding: 5px;
  }

  .wechat-window .messages {
    min-height: 140px;
    max-height: 180px;
  }

  .wechat-window .live-messages {
    min-height: 0;
    max-height: min(60%, 480px);
  }

  .conversation-strip {
    grid-auto-columns: minmax(232px, 86vw);
  }

  .chat-side-panel {
    display: none;
  }

  .wechat-window .chat-form:not(.live-chat-form) {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .chat-recipient-select {
    flex: 0 0 auto;
  }

  .liangtuan-app {
    display: flex;
    flex-direction: column;
  }

  .liangtuan-app .lt-cart-summary {
    display: none;
  }

  .liangtuan-app .lt-standalone-card {
    order: 4;
  }

  .liangtuan-app .lt-feed {
    order: 1;
  }

  .liangtuan-app .lt-deals {
    order: 2;
  }

  .liangtuan-app .lt-store-strip {
    order: 3;
  }

  .chat-layout > aside {
    order: 2;
  }

  .chat-layout > .chat-window {
    order: 1;
  }

  .lt-mobile-checkout {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    z-index: 19;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius);
    background: #24201a;
    color: #fff7df;
    box-shadow: 0 16px 42px rgba(24, 20, 14, 0.28);
  }

  .lt-mobile-checkout span {
    min-width: 0;
    font-size: 12px;
    font-weight: 800;
  }

  .lt-mobile-checkout strong {
    color: #ffdc6e;
  }

  .lt-mobile-checkout button {
    flex: 0 0 auto;
    min-height: 32px;
    border: 0;
    border-radius: 999px;
    padding: 0 12px;
    background: #ffdc6e;
    color: #24201a;
    font-weight: 900;
  }

  .main[data-view="chat"] .topbar {
    display: none;
  }

  .hero,
  .hero-art {
    min-height: auto;
  }

  .home-vn-stage {
    min-height: 100svh;
  }

  .hero-art {
    aspect-ratio: 4 / 5;
  }

  .quick-actions,
  .mini-stat-row,
  .profile-card,
  .schedule-form,
  .important-form,
  .focus-grid,
  .lt-categories,
  .card-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

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

  .lt-category {
    flex: 0 0 92px;
  }

  .quick-actions.compact {
    grid-template-columns: 1fr;
  }

  .subpage {
    padding: 10px 10px 92px;
  }

  .subpage.stack {
    gap: 10px;
  }

  .subpage-header {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .subpage-back-btn {
    justify-self: start;
    min-height: 34px;
    padding: 0 10px;
  }

  .subpage-header h2 {
    font-size: 28px;
  }

  .subpage-header p {
    font-size: 14px;
  }

  .subpage .panel {
    padding: 12px;
  }

  .subpage .profile-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .subpage .profile-card h2,
  .subpage .panel h2 {
    font-size: 24px;
  }

  .subpage .profile-card .fine-print {
    display: none;
  }

  .subpage .important-form {
    grid-template-columns: 1fr 1fr;
  }

  .subpage .important-form .primary-btn {
    grid-column: 1 / -1;
  }

  .subpage .schedule-form {
    grid-template-columns: 1fr 1fr;
  }

  .subpage .schedule-form input[id="scheduleTitleInput"],
  .subpage .schedule-form .primary-btn {
    grid-column: 1 / -1;
  }

  .subpage .important-form input,
  .subpage .schedule-form input {
    min-height: 38px;
  }

  .subpage .important-list,
  .subpage .schedule-list,
  .subpage .task-list {
    font-size: 14px;
  }

  .app-shell .main[data-view="home"],
  .app-shell .main[data-view="chat"],
  .app-shell .main[data-view="tarot"],
  .app-shell .main[data-view="my"] {
    height: calc(100svh - 49px - env(safe-area-inset-bottom));
    padding: 0;
    overflow: hidden;
  }

  #view-home,
  #view-chat,
  #view-tarot,
  #view-my {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  #view-home .home-dashboard,
  #view-home .home-character-hero,
  #view-chat .chat-layout.unified-chat,
  #view-chat .live-chat-window,
  #view-chat .live-stage,
  #view-tarot .subpage,
  #view-tarot .tarot-studio-panel {
    height: 100%;
    min-height: 0;
  }

  #view-home .home-dashboard {
    position: relative;
    overflow: hidden;
  }

  #view-home .home-character-hero {
    min-height: 0;
  }

  #view-home .home-weather-card {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 6;
    width: fit-content;
    max-width: calc(100% - 20px);
    gap: 0;
    margin: 0;
    padding: 4px 6px 4px 10px;
    border-color: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(9, 16, 24, 0.28);
    box-shadow: none;
    backdrop-filter: blur(6px);
  }

  #view-home .home-weather-main {
    gap: 8px;
  }

  #view-home .home-weather-main div {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  #view-home .home-weather-main strong {
    color: #fff;
    font-size: 14px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  }

  #view-home .home-weather-card .eyebrow {
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  }

  #view-home .weather-live-label {
    display: none;
  }

  #view-home .home-weather-main span,
  #view-home .home-weather-card > p,
  #view-home .home-weather-card > small {
    display: none;
  }

  #view-home .home-weather-card .ghost-btn {
    width: 44px;
    min-height: 44px;
    padding: 0;
    border-color: transparent;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 50%;
  }

  #view-home .home-weather-card .ghost-btn svg {
    width: 16px;
    height: 16px;
  }

  #view-chat .chat-layout.unified-chat,
  #view-chat .live-chat-window {
    overflow: hidden;
  }

  #view-chat .live-stage {
    overflow: hidden;
  }

  #view-chat .thread-secondary {
    display: none;
  }

  .app-shell .main[data-view="my"] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .main[data-view="my"] .topbar {
    margin: 0;
    padding: 12px 12px 8px;
  }

  #view-my {
    height: auto;
    padding: 0 12px 12px;
  }

  #view-my .my-page,
  #view-my .my-grid {
    gap: 8px;
  }

  #view-my .my-entry {
    min-height: 100px;
    padding: 10px;
  }

  #view-tarot .subpage {
    padding: 10px;
  }

  #view-tarot .tarot-studio-panel {
    padding: 10px;
  }

  #view-tarot .tarot-studio-layout {
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(320px, 62%) minmax(0, 1fr);
    gap: 8px;
  }

  #view-tarot .tarot-studio-scene {
    height: 100%;
    min-height: 0;
    padding: 8px;
  }

  #view-tarot .tarot-studio-scene img.tarot-studio-card {
    width: auto;
    max-width: 100%;
    height: 100%;
  }

  #view-tarot .tarot-studio-copy {
    min-height: 0;
    gap: 8px;
    overflow-y: auto;
  }

  #view-tarot .tarot-studio-copy > *,
  #view-tarot .tarot-ready h3,
  #view-tarot .tarot-ready p {
    margin: 0;
  }

  #view-tarot .tarot-studio-copy .eyebrow {
    font-size: 13px;
  }

  #view-tarot .tarot-studio-copy h2 {
    font-size: 28px;
  }

  #view-tarot .tarot-studio-copy .lead {
    font-size: 16px;
    line-height: 1.5;
  }

  #view-tarot .tarot-ready {
    gap: 4px;
    padding: 8px;
  }

  #view-tarot .tarot-ready h3 {
    font-size: 18px;
  }

  #view-tarot .tarot-ready p,
  #view-tarot .tarot-ready small,
  #view-tarot .fine-print {
    font-size: 14px;
    line-height: 1.45;
  }

  #view-tarot .tarot-studio-actions {
    gap: 6px;
  }

  #view-tarot .tarot-studio-actions button {
    min-height: 36px;
    padding: 0 8px;
    font-size: 13px;
  }

  #view-tarot .tarot-history {
    display: none;
  }
}

@media (max-width: 560px) {
  .main {
    padding: 12px;
  }

  .main[data-view="home"],
  .main[data-view="agenda"],
  .main[data-view="actions"],
  .main[data-view="tarot"] {
    padding: 0 0 76px;
  }

  .hero-copy {
    padding: 18px;
  }

  .home-character-hero {
    min-height: calc(100svh - 50px - env(safe-area-inset-bottom));
  }

  .home-weather-main {
    align-items: center;
    flex-direction: row;
  }

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

  .home-character-hero .hero-copy {
    padding: 180px 18px 18px;
  }

  .message {
    max-width: 94%;
  }

  .report-btn {
    display: none;
  }

  .task-item,
  .important-item,
  .schedule-item,
  .chat-form,
  .message-header,
  .lt-item,
  .tarot-result,
  .tarot-ready,
  .lt-review-form {
    grid-template-columns: 1fr;
  }

  .chat-form.live-chat-form {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .live-chat-form .sticker-picker {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    max-height: min(36svh, 300px);
    padding: 4px;
  }

  .live-chat-form .sticker-pick {
    min-height: 50px;
  }

  .live-chat-form .sticker-pick-art {
    width: 30px;
    height: 30px;
  }

  .gift-picker-dialog {
    width: auto;
    max-height: 54svh;
    margin: 0 8px calc(54px + env(safe-area-inset-bottom));
    inset: auto 0 0;
  }

  .gift-picker-grid {
    max-height: 30svh;
  }

  .subpage .task-item,
  .subpage .important-item,
  .subpage .schedule-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
  }

  .subpage .task-item .primary-btn,
  .subpage .important-item .primary-btn,
  .subpage .schedule-item .primary-btn,
  .subpage .task-item .ghost-btn,
  .subpage .important-item .ghost-btn,
  .subpage .schedule-item .ghost-btn {
    min-width: 78px;
    min-height: 36px;
    padding: 0 10px;
  }

  .lt-header,
  .lt-standalone-card,
  .lt-section-title,
  .lt-item-title,
  .lt-item-foot,
  .lt-total {
    align-items: stretch;
    flex-direction: column;
  }

  .lt-header {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .lt-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .lt-brand h2 {
    font-size: 32px;
  }

  .lt-location {
    min-height: 32px;
    padding: 0 8px;
  }

  .lt-search {
    width: min(100%, 220px);
    min-height: 38px;
  }

  .lt-standalone-card {
    align-items: stretch;
    margin: 0 12px 10px;
    padding: 10px;
  }

  .lt-standalone-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .liangtuan-app .lt-alert {
    margin-bottom: 8px;
    padding: 8px 10px;
  }

  .liangtuan-app .lt-stats,
  .liangtuan-app .lt-service-bar {
    padding-bottom: 8px;
  }

  .liangtuan-app .lt-category {
    min-height: 50px;
  }

  .liangtuan-app .lt-feed {
    gap: 8px;
  }

  .liangtuan-app .lt-section-title {
    display: none;
  }

  .lt-item-media,
  .lt-item-media > img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .lt-store-card {
    flex-basis: 246px;
  }

  .liangtuan-app .lt-store-main {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .liangtuan-app .lt-store-card img {
    width: 76px;
    height: 102px;
  }

  .liangtuan-app .lt-service-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .liangtuan-app .lt-cart-summary {
    margin-right: 12px;
    margin-left: 12px;
  }

  .liangtuan-app .lt-item {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    min-height: auto;
    padding: 10px;
  }

  .liangtuan-app .lt-item-media,
  .liangtuan-app .lt-item-media > img {
    width: 96px;
    height: 96px;
    aspect-ratio: auto;
  }

  .liangtuan-app .lt-item-title,
  .liangtuan-app .lt-item-foot {
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
  }

  .liangtuan-app .lt-item-title h3 {
    font-size: 15px;
  }

  .liangtuan-app .lt-item-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
  }

  .liangtuan-app .lt-item-meta {
    gap: 5px 8px;
    font-size: 11px;
  }

  .liangtuan-app .lt-item-meta span:nth-child(n+3),
  .liangtuan-app .lt-tags {
    display: none;
  }

  .liangtuan-app .lt-item-foot strong {
    font-size: 14px;
  }

  .liangtuan-app .lt-item-foot del,
  .liangtuan-app .lt-item-foot small {
    font-size: 11px;
  }

  .liangtuan-app .lt-add-btn {
    min-width: 54px;
    height: 32px;
    padding: 0 8px;
  }

  .liangtuan-app .lt-add-btn span {
    font-size: 11px;
  }

  .message-title {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .message-avatar {
    width: 58px;
    height: 58px;
  }
}
