:root {
  color: #263047;
  background: #eef3f8;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #eef3f8;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app {
  position: relative;
  width: min(430px, 100vw);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #fff7fb 62%, #fff7fb 100%);
  box-shadow: 0 0 0 1px rgba(38, 48, 71, 0.08), 0 24px 80px rgba(38, 48, 71, 0.18);
}

.screen {
  min-height: 100vh;
  padding: 14px 14px 104px;
}

.top-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 2px 16px;
}

.top-title h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.small-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #effaf3;
  color: #176a58;
  font-size: 13px;
  font-weight: 800;
}

.card {
  border: 1px solid rgba(76, 83, 112, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 32px rgba(48, 36, 86, 0.08);
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 850;
}

.primary {
  background: #263047;
  color: #fff;
}

.secondary {
  border: 1px solid rgba(38, 48, 71, 0.16);
  background: #fff;
  color: #263047;
}

.section-title {
  margin: 22px 2px 12px;
  font-size: 19px;
  font-weight: 900;
}

.tabbar {
  position: fixed;
  right: calc((100vw - min(430px, 100vw)) / 2 + 14px);
  bottom: 14px;
  left: calc((100vw - min(430px, 100vw)) / 2 + 14px);
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  height: 72px;
  padding: 7px;
  border: 1px solid #000;
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 16px;
  background: transparent;
  color: #000;
  font-size: 13px;
  font-weight: 850;
}

.tab .tab-head {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  transition: transform 160ms ease;
}

.tab-icon-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tab.active {
  color: #000;
}

.tab.active .tab-head {
  transform: translateY(-3px) scale(1.08);
}

.home-hero {
  position: relative;
  min-height: 432px;
  padding: 12px 4px 0;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  background: #f8fbff;
}

.home-hero.with-carousel {
  background: #21162c;
}

.home-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.home-carousel::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 248, 255, 0.2) 0%, rgba(255, 248, 255, 0.04) 52%, rgba(255, 247, 251, 0.16) 100%);
  content: "";
}

.home-carousel-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.home-carousel-video {
  opacity: 0;
}

.home-carousel-still {
  opacity: 1;
}

.home-carousel.is-video .home-carousel-video {
  opacity: 1;
}

.home-carousel.is-video .home-carousel-still {
  opacity: 0;
}

.home-carousel.is-still .home-carousel-video {
  opacity: 0;
}

.home-carousel.is-still .home-carousel-still {
  opacity: 1;
}

.home-hero > :not(.home-carousel) {
  position: relative;
  z-index: 1;
}

.home-hero.with-carousel .pet-name,
.home-hero.with-carousel .profile-line {
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.72);
}

.identity-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 72px;
  height: 72px;
  padding: 4px;
  border: 3px solid rgba(134, 116, 146, 0.34);
  border-radius: 50%;
  background: #fde2ea;
  object-fit: cover;
}

.pet-name {
  display: block;
  font-size: 29px;
  font-weight: 950;
  color: #111936;
}

.profile-line {
  display: block;
  max-width: 285px;
  margin-top: 4px;
  overflow: hidden;
  color: #727a8f;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mood-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 12px 16px;
  border-radius: 22px;
  background: rgba(144, 128, 156, 0.72);
  color: #fff;
}

.mood-card strong {
  display: block;
  font-size: 22px;
}

.kitty-main {
  display: block;
  width: 100%;
  height: 300px;
  margin-top: -4px;
  object-fit: contain;
}

.status-card {
  margin-top: -8px;
  padding: 16px 12px;
}

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

.stat-title {
  display: block;
  font-size: 13px;
  font-weight: 900;
}

.stat-value {
  display: block;
  margin: 7px 0;
  color: #77556b;
  font-size: 12px;
  text-align: center;
}

.bar {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #f1e6e8;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.level-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(58, 49, 69, 0.1);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.level-row div {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 0 6px;
}

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

.feature {
  display: flex;
  gap: 12px;
  min-height: 88px;
  padding: 14px;
  border-radius: 14px;
  color: #263047;
  text-align: left;
}

.feature b {
  display: block;
  font-size: 18px;
}

.feature small {
  display: block;
  margin-top: 5px;
  color: #677089;
  line-height: 1.35;
}

.feature-icon {
  flex: 0 0 40px;
  font-size: 30px;
  font-weight: 950;
}

.blue {
  background: #e9f7ff;
}

.pink {
  background: #fff0f5;
}

.violet {
  background: #f0ecff;
}

.green {
  background: #effaf3;
}

.growth-cat {
  width: 100%;
  height: 310px;
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
}

.growth-cat.is-juvenile {
  object-fit: cover;
  object-position: center 60%;
}

.growth-hero {
  padding: 16px;
  text-align: center;
}

.stage {
  display: block;
  margin-top: 12px;
  font-size: 24px;
  font-weight: 950;
}

.persona {
  display: block;
  margin-top: 4px;
  color: #647087;
  font-size: 14px;
}

.next-stage {
  display: inline-flex;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #effaf3;
  color: #176a58;
  font-size: 13px;
  font-weight: 850;
}

.care-card,
.mbti-card,
.timeline,
.tarot-box,
.summary-box,
.profile-card,
.astro-card,
.zodiac-card,
.chat-head {
  padding: 16px;
}

.care-head,
.mbti-card,
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.care-head strong,
.mbti-type {
  display: block;
  font-size: 18px;
  font-weight: 950;
}

.care-head small,
.mbti-title,
.branch-copy {
  display: block;
  margin-top: 5px;
  color: #737b92;
  line-height: 1.45;
}

.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.action {
  min-height: 86px;
  padding: 10px 6px;
  border: 1px solid rgba(38, 48, 71, 0.1);
  border-radius: 12px;
  background: #fff;
}

.action.done {
  background: #effaf3;
  color: #176a58;
}

.action b,
.action small {
  display: block;
}

.action b {
  font-size: 14px;
}

.action small {
  margin-top: 6px;
  color: #737b92;
  font-size: 11px;
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.branch {
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(38, 48, 71, 0.1);
  border-radius: 12px;
  background: #fff;
}

.branch.active {
  background: #263047;
  color: #fff;
}

.branch b,
.branch small {
  display: block;
}

.branch small {
  margin-top: 6px;
  color: #737b92;
  line-height: 1.35;
}

.branch.active small {
  color: rgba(255, 255, 255, 0.72);
}

.milestone {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  min-height: 72px;
  color: #8a90a0;
}

.dot {
  width: 20px;
  height: 20px;
  border: 4px solid #dce1eb;
  border-radius: 50%;
  background: #fff;
}

.milestone.active {
  color: #263047;
}

.milestone.active .dot {
  border-color: #263047;
  background: #ffe3ef;
}

.spread-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.spread {
  min-height: 70px;
  padding: 10px;
  border: 1px solid rgba(38, 48, 71, 0.12);
  border-radius: 12px;
  background: #fff;
  color: #263047;
  text-align: left;
}

.spread.active {
  background: #263047;
  color: #fff;
}

.spread b,
.spread small {
  display: block;
}

.spread small {
  margin-top: 5px;
  color: #737b92;
}

.spread.active small {
  color: rgba(255, 255, 255, 0.72);
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid rgba(38, 48, 71, 0.12);
  border-radius: 12px;
  background: #fff;
  color: #263047;
  outline: 0;
}

textarea {
  min-height: 116px;
  margin: 14px 0;
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

.shuffle {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  color: #505a73;
}

.deck {
  position: relative;
  width: 80px;
  height: 100px;
}

.deck i {
  position: absolute;
  top: 8px;
  left: 18px;
  width: 52px;
  height: 76px;
  border-radius: 9px;
  background: linear-gradient(160deg, #2a2342, #7055a6);
  box-shadow: 0 10px 20px rgba(48, 36, 86, 0.18);
}

.deck i:nth-child(1) {
  transform: rotate(-12deg) translateX(-10px);
}

.deck i:nth-child(2) {
  transform: rotate(3deg);
}

.deck i:nth-child(3) {
  transform: rotate(14deg) translateX(10px);
}

.reading-cards {
  display: grid;
  gap: 10px;
}

.tarot-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  padding: 12px;
  align-items: start;
}

.card-art-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.card-art-image {
  width: 108px;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.tarot-card.reversed .card-art-image {
  transform: rotate(180deg);
}

.card-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  min-height: 154px;
  padding-top: 4px;
}

.card-position {
  color: #555;
  font-size: 13px;
  font-weight: 700;
}

.card-copy strong {
  color: #111;
  font-size: 24px;
  line-height: 1.2;
}

.card-orientation {
  color: #111;
  font-size: 15px;
  font-weight: 700;
}

.card-keyword {
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}

.card-guide {
  color: #333;
  font-size: 13px;
  line-height: 1.7;
}

.usage-hint {
  margin-top: 8px;
  color: rgba(0, 0, 0, 0.42);
  font-size: 12px;
  text-align: center;
}

.history-item {
  margin-top: 8px;
  padding: 12px;
}

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

.field label {
  display: block;
  margin-bottom: 7px;
  color: #465067;
  font-size: 14px;
  font-weight: 850;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.result-grid {
  display: grid;
  gap: 10px;
}

.placement,
.fortune-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(38, 48, 71, 0.08);
}

.astro-svg {
  display: block;
  width: min(330px, 100%);
  margin: 8px auto 14px;
}

.zodiac-ring {
  fill: #fff7fb;
  stroke: rgba(38, 48, 71, 0.18);
  stroke-width: 2;
}

.inner-ring {
  fill: none;
  stroke: rgba(38, 48, 71, 0.12);
  stroke-width: 1;
}

.inner-ring.soft {
  stroke: rgba(113, 85, 166, 0.2);
}

.house-line {
  stroke: rgba(38, 48, 71, 0.1);
  stroke-width: 1;
}

.aspect {
  stroke: rgba(113, 85, 166, 0.32);
  stroke-width: 1.2;
}

.aspect-1 {
  stroke: rgba(95, 185, 92, 0.28);
}

.aspect-2 {
  stroke: rgba(244, 84, 162, 0.24);
}

.zodiac-text {
  fill: #4c3d70;
  font-size: 18px;
  text-anchor: middle;
  dominant-baseline: middle;
}

.planet-dot,
.chart-core {
  fill: #263047;
}

.planet-label,
.core-sign,
.core-label {
  fill: #fff;
  text-anchor: middle;
  font-weight: 800;
}

.planet-label {
  font-size: 12px;
}

.core-sign {
  font-size: 21px;
}

.core-label {
  font-size: 10px;
}

.placement:last-child,
.fortune-row:last-child {
  border-bottom: 0;
}

.periods {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin: 12px 0;
}

.period {
  flex: 0 0 auto;
  min-width: 64px;
  min-height: 36px;
  border: 1px solid rgba(38, 48, 71, 0.12);
  border-radius: 12px;
  background: #fff;
}

.period.active {
  background: #263047;
  color: #fff;
}

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

.mbti-question {
  padding: 12px;
}

.answer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.axis-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
  color: #737b92;
  font-size: 12px;
  line-height: 1.4;
}

.axis-pair span {
  padding: 8px;
  border-radius: 10px;
  background: #f8fbff;
}

.answer {
  min-height: 52px;
  padding: 8px;
  border: 1px solid rgba(38, 48, 71, 0.12);
  border-radius: 10px;
  background: #fff;
  color: #4c556f;
  text-align: left;
}

.answer.active {
  background: #263047;
  color: #fff;
}

.chat-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.msg {
  max-width: 84%;
  padding: 11px 13px;
  border-radius: 14px;
  line-height: 1.55;
}

.msg.cat {
  background: #fff;
  box-shadow: 0 10px 24px rgba(48, 36, 86, 0.08);
}

.msg.user {
  justify-self: end;
  background: #263047;
  color: #fff;
}

.chat-compose {
  position: sticky;
  bottom: 88px;
  display: grid;
  grid-template-columns: 1fr 76px;
  gap: 8px;
  margin-top: 16px;
}

.toast {
  position: fixed;
  right: calc((100vw - min(430px, 100vw)) / 2 + 26px);
  bottom: 102px;
  left: calc((100vw - min(430px, 100vw)) / 2 + 26px);
  z-index: 50;
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(38, 48, 71, 0.92);
  color: #fff;
  text-align: center;
}

.toast.show {
  display: block;
}

.opening-screen {
  position: fixed;
  inset: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #000;
  overflow: hidden;
}

.opening-video {
  position: absolute;
  inset: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
}

.opening-play {
  position: absolute;
  right: 32px;
  bottom: 48px;
  display: none;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  background: #fff;
  color: #000;
  font-weight: 900;
}

.opening-play.show {
  display: block;
}

.opening-play:disabled {
  opacity: 0.7;
}

.opening-loader {
  position: absolute;
  right: 26px;
  bottom: 112px;
  left: 26px;
  z-index: 2;
  display: grid;
  gap: 8px;
  color: #111;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.opening-loader-label,
.opening-loader small {
  color: #111;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.opening-progress {
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.opening-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #000;
  transition: width 0.18s ease;
}

body,
.app,
.screen,
.home-page,
.home-hero,
.card,
.status-card,
.feature,
.feature.blue,
.feature.pink,
.feature.violet,
.feature.green,
.profile-card,
.zodiac-card,
.fortune-card,
.tarot-box,
.tarot-card,
.history-item,
.question-card,
.mbti-question,
.test-head,
.chat-head,
.msg.cat,
.axis-pair span,
.period,
.spread,
.answer,
input,
textarea,
select {
  border-color: #000 !important;
  background: #fff !important;
  color: #000 !important;
  box-shadow: none !important;
}

.home-hero.with-carousel,
.home-carousel,
.home-carousel::after {
  background: transparent !important;
}

.primary,
.mood-card,
.stage-pill,
.period.active,
.spread.active,
.answer.active,
.msg.user,
.chart-core,
.planet-dot,
.wheel-core,
.primary-button {
  border-color: #000 !important;
  background: #000 !important;
  color: #fff !important;
}

.secondary,
.tabbar,
.bar,
.level-row,
.small-pill,
.pill,
.dimension-bar {
  border-color: #000 !important;
  background: #f2f2f2 !important;
  color: #000 !important;
  box-shadow: none !important;
}

.bar i,
.dimension-fill {
  background: #000 !important;
}

.feature-icon,
.pet-name,
.section-title,
.tab,
.tab .tab-head,
.tab.active,
.tab.active .tab-head,
.stat-title,
.stat-value,
.profile-line,
.muted,
.feature small,
.card-guide,
.basis,
.lucky-label,
.planet-label,
.zodiac-text,
.core-sign,
.core-label {
  color: #000 !important;
  fill: #000 !important;
}

.tab .tab-head,
.tab.active .tab-head {
  border-color: transparent !important;
  background: transparent !important;
  color: #000 !important;
}

.tab.active .tab-head {
  border-color: transparent !important;
}

.zodiac-ring,
.inner-ring {
  fill: #fff !important;
  stroke: #000 !important;
}

.house-line,
.aspect,
.aspect-0,
.aspect-1,
.aspect-2 {
  stroke: #000 !important;
}

.tabbar {
  border-color: #000 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08) !important;
}

.tab,
.tab .tab-head {
  color: #000 !important;
  fill: #000 !important;
}

.tab.active {
  color: #000 !important;
  fill: #000 !important;
}
