:root {
  --bg-ink: #060607;
  --bg-deep: #0d0a08;
  --bg-panel: rgba(19, 13, 10, 0.86);
  --bg-panel-soft: rgba(33, 22, 16, 0.76);
  --bg-tile: rgba(26, 18, 13, 0.84);
  --line-copper: rgba(197, 130, 70, 0.56);
  --line-copper-soft: rgba(197, 130, 70, 0.26);
  --line-gold: rgba(230, 178, 112, 0.78);
  --text-main: #f2d7b1;
  --text-soft: #d5b894;
  --text-muted: #9f8466;
  --accent-main: #ff9d57;
  --accent-hot: #ff7e41;
  --accent-glow: rgba(255, 153, 84, 0.38);
  --good: #48d077;
  --bad: #ff5f55;
  --neutral: #d0b089;
  --hoa-loc: #e7b548;
  --hoa-quyen: #ff5a48;
  --hoa-khoa: #4ccf73;
  --hoa-ky: #b4b8c0;
  --menh-bg: linear-gradient(165deg, rgba(90, 56, 31, 0.42), rgba(27, 18, 12, 0.86));
  --than-bg: linear-gradient(165deg, rgba(35, 92, 58, 0.34), rgba(19, 29, 23, 0.86));
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 11px;
  --shadow-panel: 0 22px 40px rgba(0, 0, 0, 0.48);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background-color: #070608;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  font-family: "Charm", cursive;
  color: var(--text-main);
  background:
    radial-gradient(circle at 10% 14%, rgba(255, 133, 76, 0.16), transparent 32%),
    radial-gradient(circle at 92% 18%, rgba(201, 122, 66, 0.14), transparent 38%),
    radial-gradient(circle at 50% 110%, rgba(255, 135, 82, 0.1), transparent 42%),
    linear-gradient(150deg, #08080a 0%, #110d0a 42%, #070608 100%);
  letter-spacing: 0.01em;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(214, 156, 102, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(214, 156, 102, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.11;
}

.cosmos-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.cosmos-bg::before,
.cosmos-bg::after {
  content: "";
  position: absolute;
  inset: 0;
}

.cosmos-bg::before {
  background-image:
    radial-gradient(circle at 16% 21%, rgba(255, 201, 140, 0.38) 1px, transparent 1.6px),
    radial-gradient(circle at 72% 31%, rgba(255, 201, 140, 0.3) 1px, transparent 1.5px),
    radial-gradient(circle at 34% 74%, rgba(255, 222, 188, 0.26) 1px, transparent 1.6px),
    radial-gradient(circle at 87% 72%, rgba(255, 198, 144, 0.24) 1px, transparent 1.5px);
  background-size: 220px 220px;
  opacity: 0.18;
}

.cosmos-bg::after {
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 157, 90, 0.14), transparent 28%),
    radial-gradient(circle at 78% 32%, rgba(255, 138, 76, 0.12), transparent 30%);
  filter: blur(18px);
}

.nebula {
  position: absolute;
  border-radius: 999px;
  filter: blur(46px);
  opacity: 0.27;
  animation: drift 16s ease-in-out infinite;
}

.nebula.n1 {
  width: 340px;
  height: 340px;
  left: -88px;
  top: 18%;
  background: radial-gradient(circle at 45% 45%, rgba(255, 161, 93, 0.46), transparent 68%);
}

.nebula.n2 {
  width: 390px;
  height: 390px;
  right: -120px;
  top: 2%;
  background: radial-gradient(circle at 55% 42%, rgba(205, 126, 71, 0.39), transparent 66%);
  animation-delay: 4s;
}

.nebula.n3 {
  width: 420px;
  height: 420px;
  left: 28%;
  bottom: -210px;
  background: radial-gradient(circle at 50% 40%, rgba(235, 151, 87, 0.34), transparent 68%);
  animation-delay: 8s;
}

.orbital {
  position: absolute;
  border: 1px solid rgba(211, 149, 94, 0.2);
  border-radius: 999px;
  transform-origin: center;
  animation: spin 52s linear infinite;
}

.orbital::before {
  content: "";
  position: absolute;
  top: 18%;
  left: 48%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #ffd6a3, #ca844a);
  box-shadow: 0 0 12px rgba(255, 169, 106, 0.45);
}

.orbital.o1 {
  width: 660px;
  height: 660px;
  left: -240px;
  top: -240px;
}

.orbital.o2 {
  width: 720px;
  height: 720px;
  right: -340px;
  top: -220px;
  animation-direction: reverse;
  animation-duration: 64s;
}

.page.app-shell {
  width: min(1360px, 100%);
  margin: 0 auto;
  min-height: 100svh;
  padding:
    calc(1.5rem + env(safe-area-inset-top))
    1rem
    calc(2rem + env(safe-area-inset-bottom));
  display: grid;
  gap: 1rem;
  position: relative;
}

@supports not (height: 100svh) {
  .page.app-shell {
    min-height: 100vh;
  }
}

.panel {
  position: relative;
  border: 1px solid var(--line-copper);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background:
    linear-gradient(150deg, rgba(255, 164, 90, 0.06), rgba(255, 164, 90, 0) 40%),
    linear-gradient(25deg, rgba(17, 12, 9, 0.95), rgba(26, 18, 13, 0.88));
  backdrop-filter: blur(3px);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  animation: rise 0.65s ease both;
}

.panel:hover {
  border-color: rgba(232, 170, 107, 0.65);
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.panel::before {
  inset: 8px;
  border-radius: calc(var(--radius-lg) - 6px);
  border: 1px solid rgba(255, 170, 98, 0.16);
}

.panel::after {
  width: 280px;
  height: 280px;
  right: -150px;
  top: -120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 163, 96, 0.18), transparent 70%);
  filter: blur(8px);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Charm", cursive;
  color: #ffd6a1;
  letter-spacing: 0.03em;
}

h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.78rem);
}

h3 {
  font-size: clamp(1.18rem, 1.7vw, 1.5rem);
}

p,
li,
span,
label,
select,
button {
  font-size: clamp(1.04rem, 1.24vw, 1.14rem);
}

p {
  font-family: "Charm", cursive;
}

.masthead {
  text-align: center;
  padding-top: 1.35rem;
  padding-bottom: 1.2rem;
  background:
    radial-gradient(circle at 50% -6%, rgba(255, 177, 106, 0.22), transparent 48%),
    linear-gradient(180deg, rgba(28, 19, 13, 0.9), rgba(14, 10, 8, 0.92));
}

.masthead-home {
  display: block;
  color: inherit;
  text-decoration: none;
}

.masthead-home:focus-visible {
  outline: 2px solid rgba(255, 188, 126, 0.8);
  outline-offset: 6px;
  border-radius: 10px;
}

.sigil {
  width: 54px;
  height: 54px;
  margin: 0 auto 0.55rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 181, 113, 0.36);
  color: #ffd9ad;
  font-family: "Charm", cursive;
  font-size: 1.58rem;
  text-shadow: 0 0 14px rgba(255, 171, 103, 0.5);
  background: radial-gradient(circle, rgba(255, 170, 103, 0.22), rgba(36, 25, 18, 0.2));
}

.kicker {
  margin: 0;
  color: var(--text-muted);
  font-family: "Charm", cursive;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.masthead h1 {
  margin-top: 0.26rem;
  font-size: clamp(2rem, 4.6vw, 3rem);
  text-shadow: 0 0 24px rgba(255, 149, 84, 0.2);
}

.subtitle {
  margin: 0.45rem auto 0;
  max-width: 760px;
  color: var(--text-soft);
  line-height: 1.58;
}

.form-panel h2,
.chart-panel h2 {
  margin-bottom: 0.2rem;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.section-heading::before {
  content: "✦";
  color: #ffc88d;
  font-size: 0.88rem;
  text-shadow: 0 0 11px rgba(255, 165, 98, 0.4);
}

.section-heading::after {
  content: "";
  flex: 1;
  border-top: 1px solid rgba(225, 164, 102, 0.22);
  margin-top: 0.08rem;
}

.form-note {
  margin: 0 0 0.8rem;
  color: var(--text-muted);
  line-height: 1.38;
}

.form-note strong {
  color: #ffd29b;
  font-weight: 600;
}

.seo-panel {
  margin-top: 0.82rem;
  background:
    radial-gradient(circle at 18% -12%, rgba(255, 178, 108, 0.12), transparent 35%),
    linear-gradient(165deg, rgba(34, 23, 17, 0.9), rgba(17, 12, 10, 0.93));
}

.seo-intro {
  margin: 0 0 0.72rem;
  color: #dfc09a;
  line-height: 1.58;
}

.seo-link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem;
}

.seo-link-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(231, 172, 111, 0.5);
  background: rgba(48, 32, 23, 0.62);
  color: #f5d6af;
  text-decoration: none;
  padding: 0.14rem 0.6rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.seo-link-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(246, 188, 126, 0.76);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.seo-topic-grid {
  margin-top: 0.78rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.56rem;
}

.seo-topic {
  border-radius: 12px;
  border: 1px solid rgba(231, 172, 111, 0.32);
  background: linear-gradient(160deg, rgba(255, 170, 98, 0.06), rgba(26, 18, 14, 0.82));
  padding: 0.62rem 0.68rem;
}

.seo-topic h3 {
  margin: 0 0 0.2rem;
  font-size: 1.18rem;
  color: #ffe3bf;
}

.seo-topic p {
  margin: 0;
  color: #d7b692;
  line-height: 1.48;
}

.seo-faq {
  margin-top: 0.78rem;
}

.seo-faq h3 {
  margin: 0 0 0.44rem;
  color: #ffdcb2;
  font-size: 1.32rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  align-items: start;
}

.form-grid label {
  display: grid;
  gap: 0.26rem;
}

.form-grid span {
  color: var(--text-muted);
  font-size: 0.83rem;
  letter-spacing: 0.03em;
}

select,
.birth-date-input,
button {
  font: inherit;
}

select,
.birth-date-input {
  width: 100%;
  min-height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(219, 157, 94, 0.42);
  background:
    linear-gradient(180deg, rgba(45, 31, 22, 0.9), rgba(22, 15, 11, 0.92));
  color: #f7d8ad;
  padding: 0.5rem 0.62rem;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

select:focus,
.birth-date-input:focus {
  outline: none;
  border-color: rgba(255, 178, 108, 0.86);
  box-shadow: 0 0 0 3px rgba(255, 159, 84, 0.2);
}

.field-hint {
  display: block;
  margin-top: 0.1rem;
  color: #b99a72;
  font-size: 0.8rem;
  line-height: 1.35;
}

.btn-cast {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 178, 108, 0.56);
  padding: 0.52rem 1rem;
  color: #fff1dc;
  font-family: "Charm", cursive;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  background:
    linear-gradient(180deg, #ffab67 0%, #ee7d44 55%, #dc6739 100%);
  box-shadow:
    0 10px 22px rgba(238, 124, 66, 0.32),
    inset 0 1px 0 rgba(255, 223, 184, 0.36);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.btn-cast:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 13px 24px rgba(238, 124, 66, 0.36),
    inset 0 1px 0 rgba(255, 232, 198, 0.42);
}

.btn-cast:active {
  transform: translateY(0);
}

a.btn-cast {
  text-decoration: none;
  text-align: center;
}


body.is-submitting .btn-cast {
  cursor: wait;
  filter: grayscale(0.15) brightness(0.95);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 220, 184, 0.24);
  border-top-color: #ffc98e;
  animation: spin 0.9s linear infinite;
  flex: 0 0 auto;
}

.submit-loading {
  margin-top: 0.72rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 188, 126, 0.42);
  background: linear-gradient(155deg, rgba(66, 40, 25, 0.72), rgba(25, 16, 12, 0.8));
  padding: 0.7rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.submit-loading-text {
  display: grid;
  gap: 0.12rem;
}

.loading-title {
  margin: 0;
  color: #ffe2be;
  font-size: 0.96rem;
}

.loading-step {
  margin: 0;
  color: #eac89f;
  font-size: 0.91rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.errors {
  margin-bottom: 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(253, 117, 108, 0.64);
  background: linear-gradient(180deg, rgba(95, 26, 24, 0.66), rgba(63, 17, 16, 0.68));
  color: #ffd0c9;
  padding: 0.65rem 0.78rem;
}

.errors p {
  margin: 0.15rem 0;
}

.chart-panel {
  padding-bottom: 1.1rem;
  background:
    radial-gradient(circle at 18% -8%, rgba(255, 180, 108, 0.14), transparent 36%),
    radial-gradient(circle at 88% 22%, rgba(255, 164, 95, 0.08), transparent 34%),
    linear-gradient(170deg, rgba(25, 17, 13, 0.94), rgba(14, 10, 8, 0.95));
}

.chart-context {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(230, 172, 111, 0.46);
  background: rgba(43, 29, 20, 0.6);
  color: #e8c79f;
  padding: 0.18rem 0.62rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.meta-pill strong {
  color: #ffe2bf;
}

.meta-pill.than-strong {
  border-color: rgba(105, 222, 150, 0.58);
  background: linear-gradient(160deg, rgba(34, 86, 56, 0.45), rgba(21, 33, 25, 0.6));
  box-shadow: 0 0 14px rgba(96, 208, 141, 0.18);
}

.chart-grid {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(188px, auto));
  gap: 0.52rem;
  padding: 0.5rem;
  border-radius: 16px;
  border: 1px solid rgba(225, 164, 102, 0.36);
  background:
    linear-gradient(160deg, rgba(255, 170, 98, 0.04), rgba(14, 10, 8, 0.5)),
    radial-gradient(circle at 50% 120%, rgba(255, 161, 92, 0.05), transparent 62%),
    rgba(8, 6, 5, 0.35);
  box-shadow:
    inset 0 0 0 1px rgba(255, 180, 112, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.34);
}

.cell {
  position: relative;
  border: 1px solid var(--line-copper);
  border-radius: 13px;
  background:
    linear-gradient(165deg, rgba(255, 175, 108, 0.08), rgba(28, 19, 13, 0.93));
  padding: 0.5rem 0.54rem;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.cell.element-water {
  background-image:
    radial-gradient(circle at 84% 18%, rgba(118, 176, 255, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(67, 103, 159, 0.1), rgba(23, 19, 18, 0.72));
}

.cell.element-water::before {
  background:
    radial-gradient(circle at 70% 35%, rgba(137, 183, 255, 0.2), transparent 65%),
    repeating-linear-gradient(
      -12deg,
      rgba(121, 170, 247, 0.11),
      rgba(121, 170, 247, 0.11) 1px,
      transparent 1px,
      transparent 10px
    );
}

.cell.element-wood {
  background-image:
    radial-gradient(circle at 84% 18%, rgba(108, 223, 157, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(41, 107, 68, 0.12), rgba(24, 19, 16, 0.72));
}

.cell.element-wood::before {
  background:
    radial-gradient(circle at 70% 35%, rgba(121, 229, 163, 0.19), transparent 64%),
    repeating-linear-gradient(
      65deg,
      rgba(99, 201, 143, 0.12),
      rgba(99, 201, 143, 0.12) 1px,
      transparent 1px,
      transparent 11px
    );
}

.cell.element-fire {
  background-image:
    radial-gradient(circle at 84% 18%, rgba(255, 117, 87, 0.18), transparent 46%),
    linear-gradient(180deg, rgba(149, 64, 40, 0.13), rgba(24, 16, 14, 0.74));
}

.cell.element-fire::before {
  background:
    radial-gradient(circle at 70% 35%, rgba(255, 139, 100, 0.2), transparent 63%),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 131, 94, 0.12),
      rgba(255, 131, 94, 0.12) 1px,
      transparent 1px,
      transparent 10px
    );
}

.cell.element-metal {
  background-image:
    radial-gradient(circle at 84% 18%, rgba(218, 224, 229, 0.17), transparent 46%),
    linear-gradient(180deg, rgba(131, 136, 143, 0.12), rgba(27, 22, 18, 0.72));
}

.cell.element-metal::before {
  background:
    radial-gradient(circle at 70% 35%, rgba(232, 238, 244, 0.2), transparent 64%),
    repeating-linear-gradient(
      35deg,
      rgba(219, 227, 234, 0.1),
      rgba(219, 227, 234, 0.1) 1px,
      transparent 1px,
      transparent 12px
    );
}

.cell.element-earth {
  background-image:
    radial-gradient(circle at 84% 18%, rgba(252, 204, 129, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(144, 102, 52, 0.13), rgba(26, 19, 15, 0.72));
}

.cell.element-earth::before {
  background:
    radial-gradient(circle at 70% 35%, rgba(248, 204, 128, 0.2), transparent 65%),
    repeating-linear-gradient(
      -68deg,
      rgba(232, 182, 103, 0.11),
      rgba(232, 182, 103, 0.11) 1px,
      transparent 1px,
      transparent 11px
    );
}

.cell::before {
  content: "";
  position: absolute;
  left: -25%;
  top: -52%;
  width: 150%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 168, 96, 0.1), transparent 70%);
  opacity: 0.55;
  pointer-events: none;
}

.cell::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(218, 159, 98, 0.26);
  border-radius: 10px;
  pointer-events: none;
}

.cell.menh {
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 199, 127, 0.2), transparent 40%),
    var(--menh-bg);
  box-shadow:
    inset 0 0 0 1.2px rgba(255, 203, 136, 0.28),
    var(--shadow-soft);
}

.cell.than {
  background:
    radial-gradient(circle at 82% 14%, rgba(120, 233, 170, 0.2), transparent 42%),
    var(--than-bg);
  box-shadow:
    inset 0 0 0 2px rgba(98, 224, 148, 0.62),
    0 0 0 1px rgba(98, 224, 148, 0.34),
    0 0 20px rgba(68, 190, 118, 0.24),
    var(--shadow-soft);
}

.cell-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.38rem;
  margin-bottom: 0.16rem;
}

.cell-title {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  min-width: 0;
}

.palace-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 192, 129, 0.5);
  color: #ffd8ad;
  font-size: 0.72rem;
  line-height: 1;
  background: rgba(66, 42, 26, 0.68);
  flex: 0 0 auto;
}

.cell-head strong {
  font-family: "Charm", cursive;
  font-size: 1.16rem;
  color: #ffe4bf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-branch {
  font-family: "Charm", cursive;
  font-size: 1rem;
  color: #e5bd8e;
  border: 1px solid rgba(222, 161, 97, 0.36);
  border-radius: 999px;
  padding: 0.03rem 0.42rem;
  background: rgba(44, 29, 20, 0.5);
}

.cell-markers {
  min-height: 1.36rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.16rem;
}

.state-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(231, 176, 118, 0.52);
  background: rgba(56, 37, 24, 0.55);
  color: #ffd9ad;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  padding: 0.02rem 0.45rem;
  line-height: 1.2;
}

.state-badge::before {
  content: "✦";
  font-size: 0.6rem;
  margin-right: 0.3rem;
}

.marker-menh {
  border-color: rgba(255, 198, 132, 0.7);
  color: #ffe0ba;
}

.marker-than {
  border-color: rgba(106, 222, 149, 0.72);
  color: #b7f3d0;
  background: rgba(28, 77, 49, 0.36);
}

.cell ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.16rem;
}

.main-star-list li {
  color: #f8e2c3;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.aux-star-list {
  margin-top: 0.36rem !important;
  grid-template-columns: 1fr 1fr;
  gap: 0.16rem 0.46rem !important;
}

.aux-star-list li {
  font-size: 1.03rem;
  line-height: 1.12;
}

.cell-aux-toggle {
  display: none;
  margin-top: 0.26rem;
  border: 1px solid rgba(225, 167, 104, 0.45);
  border-radius: 999px;
  background: linear-gradient(165deg, rgba(66, 43, 27, 0.82), rgba(30, 20, 14, 0.86));
  color: #f7d7b1;
  font-family: inherit;
  font-size: 0.84rem;
  line-height: 1.2;
  padding: 0.15rem 0.46rem;
  cursor: pointer;
}

.cell-aux-toggle[aria-expanded="true"] {
  border-color: rgba(117, 223, 162, 0.62);
  color: #c6f8de;
  background: linear-gradient(165deg, rgba(36, 93, 60, 0.52), rgba(21, 38, 27, 0.78));
}

.muted {
  color: #ab8d69;
  font-style: italic;
}

.tone-main {
  color: #ead2b0;
}

.tone-good {
  color: var(--good);
}

.tone-bad {
  color: var(--bad);
}

.tone-neutral {
  color: var(--neutral);
}

.tone-hoa_loc {
  color: var(--hoa-loc);
  font-weight: 700;
}

.tone-hoa_quyen {
  color: var(--hoa-quyen);
  font-weight: 700;
}

.tone-hoa_khoa {
  color: var(--hoa-khoa);
  font-weight: 700;
}

.tone-hoa_ky {
  color: var(--hoa-ky);
  font-weight: 700;
}

.center-info {
  grid-row: 2 / span 2;
  grid-column: 2 / span 2;
  border-radius: 14px;
  border: 1px dashed rgba(227, 166, 104, 0.75);
  background:
    radial-gradient(circle at 50% -18%, rgba(255, 166, 96, 0.25), transparent 60%),
    linear-gradient(180deg, rgba(30, 20, 14, 0.9), rgba(18, 12, 10, 0.93));
  padding: 0.8rem 0.9rem;
  box-shadow:
    inset 0 0 0 1px rgba(255, 192, 128, 0.2),
    0 12px 24px rgba(0, 0, 0, 0.34);
}

.center-info h3 {
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 1.58rem;
}

.info-grid {
  display: grid;
  gap: 0.24rem;
}

.center-info p {
  margin: 0;
  color: #dec09b;
  line-height: 1.34;
  font-size: 1.2rem;
}

.center-info strong {
  color: #ffd39f;
  font-weight: 600;
}

.than-cue {
  margin-top: 0.28rem !important;
  border-radius: 9px;
  border: 1px solid rgba(104, 220, 147, 0.56);
  background: linear-gradient(165deg, rgba(36, 95, 61, 0.42), rgba(20, 36, 26, 0.46));
  color: #c4f3dd !important;
  padding: 0.18rem 0.46rem;
}

.than-cue span {
  color: #ddffef;
  font-weight: 700;
}

.fortune-inline {
  margin-top: 0.42rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(232, 174, 113, 0.3);
  display: grid;
  gap: 0.22rem;
}

.fortune-inline-title {
  margin: 0;
  color: #ffd9ad;
  font-size: 1.04rem;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fortune-inline-meta {
  margin: 0;
  color: #d6b692;
  font-size: 0.96rem;
  line-height: 1.38;
}

.center-info .fortune-note {
  margin: 0;
  color: #c7aa85;
  font-size: 0.92rem;
  line-height: 1.4;
}

.center-info .fortune-current {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.42;
  padding: 0.26rem 0.46rem;
}

.summary-card {
  margin-top: 0.9rem;
  border: 1px solid var(--line-copper);
  border-radius: var(--radius-md);
  padding: 1.02rem;
  background:
    linear-gradient(150deg, rgba(255, 172, 102, 0.08), rgba(29, 20, 15, 0.9));
}

.interpretation-panel .summary-card {
  position: relative;
}

.interpretation-panel .summary-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  border: 1px solid rgba(230, 171, 111, 0.17);
  pointer-events: none;
}

.interpretation-panel p,
.interpretation-panel li,
.interpretation-panel .domain-advice,
.interpretation-panel .point-main,
.interpretation-panel .point-impact,
.interpretation-panel .qa-intro,
.interpretation-panel .qa-meta,
.interpretation-panel .qa-answer-line {
  letter-spacing: 0.01em;
}

.summary-card h3 {
  margin-bottom: 0.3rem;
}

.summary-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.64;
}

.summary-card ul {
  margin: 0.7rem 0 0;
  padding-left: 1.08rem;
}

.summary-card li {
  margin: 0.32rem 0;
  color: #d9bc98;
  line-height: 1.54;
}

.star-token {
  display: inline-block;
  margin: 0 0.09rem;
  padding: 0.03rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 193, 132, 0.65);
  background: linear-gradient(180deg, rgba(255, 192, 128, 0.2), rgba(72, 44, 26, 0.7));
  color: #ffe3be;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 215, 170, 0.15);
}

.point-at {
  color: #c6aa88;
  font-style: italic;
}

.point-impact {
  display: block;
  margin-top: 0.4rem;
  padding: 0.28rem 0 0 0.7rem;
  color: #c9babf;
  line-height: 1.48;
}

.point-impact-label {
  display: inline-block;
  margin-right: 0.3rem;
  color: #d6ebff;
  padding: 0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.point-impact-label::after {
  content: ":";
}

.score-guide {
  margin-top: 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(232, 174, 114, 0.5);
  background: linear-gradient(165deg, rgba(255, 176, 102, 0.09), rgba(24, 17, 13, 0.9));
  padding: 1rem;
}

.score-guide-intro {
  margin: 0.46rem 0 0;
  color: #e2c39d;
  line-height: 1.56;
}

.score-guide ul {
  margin: 0.78rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.44rem;
}

.score-guide li {
  display: grid;
  grid-template-columns: 108px 110px 1fr;
  gap: 0.5rem;
  align-items: center;
  border: 1px solid rgba(233, 177, 115, 0.25);
  border-radius: 9px;
  padding: 0.44rem 0.56rem;
  background: rgba(41, 28, 20, 0.64);
}

.range {
  color: #ffd7a6;
  font-weight: 700;
}

.score-method {
  margin: 0.74rem 0 0;
  color: #bb9e7a;
  font-size: 0.98rem;
  line-height: 1.56;
}

.interp-grid {
  margin-top: 0.98rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.98rem;
  align-items: start;
}

.domain-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line-copper-soft);
  background:
    linear-gradient(160deg, rgba(255, 171, 99, 0.05), rgba(22, 16, 12, 0.92));
  padding: 1.08rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.domain-card:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 182, 120, 0.75);
  box-shadow: 0 13px 26px rgba(0, 0, 0, 0.42);
}

.domain-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.56rem;
}

.domain-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
}

.score,
.level {
  border-radius: 999px;
  border: 1px solid rgba(232, 174, 113, 0.4);
  background: rgba(46, 31, 22, 0.6);
  color: #f5d5aa;
  padding: 0.08rem 0.52rem;
  font-size: 0.86rem;
}

.level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(232, 174, 113, 0.45);
  padding: 0.08rem 0.48rem;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.level-very-strong {
  color: #41db87;
  border-color: rgba(65, 219, 135, 0.5);
  background: rgba(22, 78, 50, 0.34);
}

.level-strong {
  color: #81d89e;
  border-color: rgba(129, 216, 158, 0.4);
  background: rgba(32, 80, 54, 0.3);
}

.level-medium {
  color: #ffd39f;
  border-color: rgba(255, 211, 159, 0.46);
  background: rgba(90, 56, 30, 0.34);
}

.level-challenge {
  color: #ff9990;
  border-color: rgba(255, 153, 144, 0.55);
  background: rgba(100, 31, 29, 0.34);
}

.score-meter {
  margin: 0.4rem 0 0.68rem;
}

.score-track {
  position: relative;
  height: 14px;
}

.score-track-base {
  position: absolute;
  inset: 4px 0;
  border-radius: 999px;
  background: rgba(89, 63, 42, 0.58);
  border: 1px solid rgba(230, 171, 110, 0.22);
}

.score-track-fill {
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #9f5230, #ff9c58);
  min-width: 2px;
}

.score-track-fill.level-very-strong {
  background: linear-gradient(90deg, #3ea968, #56e38f);
}

.score-track-fill.level-strong {
  background: linear-gradient(90deg, #578854, #87d488);
}

.score-track-fill.level-medium {
  background: linear-gradient(90deg, #8f5a37, #f2ba76);
}

.score-track-fill.level-challenge {
  background: linear-gradient(90deg, #813130, #f06a60);
}

.score-track-pin {
  position: absolute;
  top: -2px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 999px;
  background: #ffe3c0;
  border: 1px solid rgba(123, 73, 43, 0.85);
  box-shadow: 0 0 8px rgba(255, 194, 135, 0.35);
}

.score-marker {
  position: absolute;
  top: -14px;
  font-size: 0.68rem;
  color: #b5936a;
}

.marker-zero {
  left: 28.57%;
}

.marker-four {
  left: 57.14%;
}

.marker-eight {
  left: 85.71%;
}

.score-scale {
  margin-top: 0.28rem;
  display: flex;
  justify-content: space-between;
  color: #a88a68;
  font-size: 0.8rem;
}

.domain-advice {
  margin: 0;
  color: #e2c39b;
  line-height: 1.62;
  padding: 0.62rem 0.7rem;
  border: 1px solid rgba(231, 173, 112, 0.22);
  border-left: 3px solid rgba(255, 189, 125, 0.55);
  background: rgba(30, 21, 15, 0.38);
  border-radius: 10px;
}

.point-group {
  border-radius: 10px;
  border: 1px solid rgba(231, 173, 112, 0.22);
  background: rgba(33, 23, 17, 0.66);
  overflow: hidden;
}

.point-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.44rem;
  padding: 0.55rem 0.66rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.point-group-head:hover {
  background: rgba(255, 171, 99, 0.05);
}

.point-group-head:focus-visible {
  outline: 2px solid rgba(255, 188, 126, 0.65);
  outline-offset: 2px;
  border-radius: 8px;
}

.point-group[open] > .point-group-head {
  background: rgba(255, 171, 99, 0.04);
  border-bottom: 1px solid rgba(231, 173, 112, 0.16);
}

.point-group-head::-webkit-details-marker {
  display: none;
}

.point-group-head::after {
  content: "▾";
  color: rgba(226, 178, 123, 0.8);
  font-size: 0.9rem;
  transform: rotate(-90deg);
  transition: transform 0.18s ease;
}

.point-group[open] > .point-group-head::after {
  transform: rotate(0deg);
}

.point-group-title {
  margin: 0;
  font-size: 0.92rem;
  color: #b99567;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.point-count {
  border-radius: 999px;
  border: 1px solid rgba(232, 174, 113, 0.4);
  background: rgba(49, 33, 24, 0.75);
  color: #e2c39e;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.18rem 0.42rem;
}

.point-list {
  margin: 0;
  padding: 0.66rem;
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.point-item {
  margin: 0;
  padding: 0.56rem 0.62rem;
  border-radius: 10px;
  border: 1px solid rgba(232, 174, 113, 0.14);
  background: rgba(20, 14, 11, 0.38);
}

.point-item-empty {
  font-style: italic;
  color: #b69571;
}

.point-group-reference {
  grid-column: auto;
}

.point-main {
  display: block;
  color: #d9bc97;
  line-height: 1.56;
}

@media (min-width: 980px) {
  .point-group-reference {
    grid-column: 1 / -1;
  }
}

.qa-section {
  margin-top: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(231, 173, 112, 0.5);
  background:
    linear-gradient(160deg, rgba(255, 171, 99, 0.08), rgba(23, 16, 12, 0.9));
  padding: 0.86rem;
}

.qa-intro {
  margin: 0.4rem 0 0;
  color: #d6b38b;
  line-height: 1.52;
}

.qa-meta {
  margin: 0.5rem 0 0;
  color: #c9e3f7;
  line-height: 1.46;
  font-size: 0.95rem;
}

.qa-meta strong {
  color: #d9edff;
}

.qa-pending-box {
  margin-top: 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(226, 167, 105, 0.42);
  background:
    linear-gradient(160deg, rgba(255, 171, 99, 0.08), rgba(37, 26, 19, 0.72));
  padding: 0.72rem 0.78rem;
}

.qa-pending-head {
  display: flex;
  align-items: flex-start;
  gap: 0.66rem;
}

.qa-pending-spinner {
  width: 22px;
  height: 22px;
  margin-top: 0.14rem;
  border-width: 3px;
  border-top-color: #ffd9aa;
}

.qa-pending-body {
  min-width: 0;
}

.qa-pending-title {
  margin: 0;
  color: #ffe0bb;
  font-weight: 700;
}

.qa-pending-copy {
  margin-top: 0.24rem;
}

.qa-pending-status {
  margin: 0.46rem 0 0;
  color: #f6d0a0;
  line-height: 1.45;
  font-size: 0.98rem;
  font-weight: 700;
}

.qa-pending-hint {
  margin: 0.24rem 0 0;
  color: #cfae86;
  line-height: 1.45;
  font-size: 0.95rem;
}

.qa-pending-groups {
  margin-top: 0.66rem;
  display: grid;
  gap: 0.56rem;
}

.qa-pending-groups .qa-group {
  margin-top: 0;
}

.qa-group {
  margin-top: 0.64rem;
  border-radius: 12px;
  border: 1px solid rgba(226, 167, 105, 0.36);
  background: rgba(35, 25, 18, 0.56);
  overflow: hidden;
}

.qa-group[open] {
  border-color: rgba(238, 182, 121, 0.62);
  box-shadow: 0 0 0 1px rgba(236, 178, 116, 0.17);
}

.qa-group summary {
  list-style: none;
  cursor: pointer;
  padding: 0.52rem 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  color: #ffe0b9;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(226, 167, 105, 0.2);
}

.qa-group summary::-webkit-details-marker {
  display: none;
}

.qa-group summary::before {
  content: "✦";
  color: #ffc78f;
  margin-right: 0.4rem;
}

.qa-group-pending-item summary {
  cursor: default;
  position: relative;
  padding-left: 2rem;
}

.qa-group-pending-item summary::before {
  position: absolute;
  left: 0.74rem;
  margin-right: 0;
}

.qa-group-pending-item summary > span:first-child {
  flex: 1;
  text-align: center;
}

.qa-group-pending-item summary > span:last-child {
  margin-left: auto;
}

.qa-group-pending-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(243, 189, 126, 0.52);
  background: rgba(67, 41, 24, 0.62);
  color: #ffdcb2;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.2rem 0.52rem;
}

.qa-category-loading {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  padding: 0.56rem 0.78rem 0.64rem;
  border-top: 1px solid rgba(226, 167, 105, 0.2);
}

.qa-category-spinner {
  width: 17px;
  height: 17px;
  border-width: 2px;
  border-top-color: #ffd7aa;
}

.qa-category-loading-copy {
  margin: 0;
  color: #e4c39b;
  line-height: 1.4;
  font-size: 0.98rem;
}

.qa-section .qa-intro,
.qa-section .qa-pending-status,
.qa-section .qa-pending-hint,
.qa-section .qa-question,
.qa-section .qa-category-loading-copy {
  font-family: "Charm", cursive;
}

.qa-list {
  margin: 0;
  padding: 0.56rem 0.7rem 0.65rem 1.35rem;
  display: grid;
  gap: 0.8rem;
}

.qa-item {
  margin: 0;
}

.qa-question {
  margin: 0;
  color: #ffe2bc;
  font-weight: 700;
}

.qa-answer {
  margin: 0.16rem 0 0;
  display: grid;
  gap: 0.34rem;
}

.qa-answer-line {
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(231, 173, 112, 0.22);
  background: rgba(40, 28, 20, 0.54);
  padding: 0.36rem 0.5rem;
}


.qa-answer-label {
  display: block;
  letter-spacing: 0.06em;
  color: #d1ad7f;
  margin-bottom: 0.14rem;
}

.qa-answer-value {
  display: block;
  color: #dfc5a2;
  line-height: 2;
}

.foot-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.72rem;
}

.foot-grid article {
  border-radius: var(--radius-md);
  border: 1px solid var(--line-copper);
  background:
    linear-gradient(155deg, rgba(255, 170, 98, 0.08), rgba(24, 17, 13, 0.9));
  padding: 0.75rem;
}

.element-legend {
  margin-top: 0.76rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.fortune-note {
  margin: 0.52rem 0 0;
  color: #caa983;
  font-size: 0.94rem;
  line-height: 1.35;
}

.fortune-current {
  margin: 0.42rem 0 0;
  border-radius: 10px;
  border: 1px solid rgba(96, 217, 144, 0.56);
  background: linear-gradient(165deg, rgba(29, 86, 53, 0.38), rgba(18, 34, 24, 0.42));
  color: #caf2dd;
  padding: 0.3rem 0.5rem;
}

.fortune-current strong {
  color: #e3ffef;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(229, 172, 112, 0.44);
  background: rgba(33, 23, 16, 0.78);
  color: #efcfaa;
  padding: 0.16rem 0.58rem;
  font-size: 0.76rem;
  font-family: "Charm", cursive;
  letter-spacing: 0.03em;
}

.legend-chip::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  box-shadow: 0 0 10px currentColor;
  background: currentColor;
}

.legend-chip.kim {
  color: #b3b3b3;
}

.legend-chip.thuy {
  color: #8db5ff;
}

.legend-chip.moc {
  color: #43ca72;
}

.legend-chip.hoa {
  color: #ff5f55;
}

.legend-chip.tho {
  color: #f0c468;
}

.tag-list,
ol {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
}

.tag-list li,
ol li {
  margin: 0.3rem 0;
  color: #d9bc97;
  line-height: 1.54;
}

ol {
  list-style-type: disclosure-open;
}

.advisor-teaser-panel {
  display: grid;
  gap: 1rem;
  align-items: center;
}

.advisor-teaser-copy {
  display: grid;
  gap: 0.6rem;
}

.advisor-teaser-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.82rem;
  color: #ffca8b;
}

.advisor-teaser-desc {
  margin: 0;
  color: #f0cd9f;
  font-size: 1.05rem;
}

.advisor-teaser-list {
  margin: 0;
  padding-left: 1.3rem;
  display: grid;
  gap: 0.34rem;
}

.advisor-teaser-list li {
  color: #f8d9b0;
}

.advisor-teaser-cta-wrap {
  display: grid;
  gap: 0.48rem;
  justify-items: start;
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 177, 105, 0.42);
}

.advisor-teaser-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #1a0f09;
  font-weight: 700;
  padding: 0.64rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd39e, #ff8f53 58%, #ffb98f);
  box-shadow: 0 14px 28px rgba(255, 132, 73, 0.36);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.advisor-teaser-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(255, 132, 73, 0.42);
}

.advisor-teaser-note {
  margin: 0 auto;
  font-size: 0.9rem;
  color: #d4b189;
}

.advisor-auth-body,
.advisor-chat-body {
  font-family: "Charm", cursive;
  letter-spacing: 0.01em;
}

.advisor-auth-body h1,
.advisor-chat-body h1 {
  font-family: "Charm", cursive;
  color: #ffe2be;
}

.advisor-auth-shell {
  width: min(700px, calc(100% - 1.5rem));
  margin: 1.1rem auto;
  display: grid;
  gap: 0.76rem;
  padding: 1rem;
  border-color: rgba(238, 178, 116, 0.55);
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 163, 92, 0.17), transparent 36%),
    linear-gradient(145deg, rgba(20, 13, 10, 0.95), rgba(14, 10, 8, 0.94));
}

.advisor-auth-back {
  text-decoration: none;
  color: #ffd8ac;
  font-size: 1.06rem;
  line-height: 1.2;
  width: fit-content;
}

.advisor-auth-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.86rem;
  color: #ffc585;
  opacity: 0.95;
}

.advisor-auth-title {
  margin: 0;
  font-size: clamp(1.88rem, 3.8vw, 2.5rem);
  line-height: 1.17;
}

.advisor-auth-subtitle {
  margin: 0;
  color: #e7c79f;
  font-size: 1.12rem;
  line-height: 1.42;
}

.advisor-auth-errors {
  margin-bottom: 0;
}

.advisor-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.56rem;
}

.advisor-auth-tab-btn {
  border: 1px solid rgba(255, 185, 119, 0.44);
  border-radius: 999px;
  background: rgba(42, 27, 18, 0.62);
  color: #f5d4ac;
  font-family: inherit;
  font-size: 1.08rem;
  line-height: 1.1;
  cursor: pointer;
  padding: 0.54rem 0.72rem;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.advisor-auth-tab-btn.is-active {
  border-color: rgba(255, 188, 124, 0.84);
  background: linear-gradient(135deg, rgba(255, 186, 119, 0.34), rgba(172, 95, 51, 0.26));
}

.advisor-auth-form {
  display: none;
  gap: 0.5rem;
  padding: 0.08rem 0;
}

.advisor-auth-form.is-active {
  display: grid;
}

.advisor-auth-form label {
  display: grid;
  gap: 0.2rem;
}

.advisor-auth-form span {
  font-size: 1.06rem;
  line-height: 1.2;
  color: #f1cd9f;
}

.advisor-auth-form input {
  width: 100%;
  border: 1px solid rgba(232, 177, 121, 0.55);
  border-radius: 12px;
  background: rgba(8, 6, 6, 0.87);
  color: #ffe7c8;
  font-family: inherit;
  font-size: 1.14rem;
  padding: 0.52rem 0.64rem;
  outline: none;
  line-height: 1.2;
}

.advisor-auth-form input:focus {
  border-color: rgba(255, 179, 110, 0.94);
  box-shadow: 0 0 0 3px rgba(255, 158, 90, 0.13);
}

.advisor-auth-submit {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd7aa, #ff8d55 58%, #f6b281);
  color: #1c1009;
  font-family: inherit;
  font-size: 1.16rem;
  line-height: 1.1;
  padding: 0.62rem 0.9rem;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  margin-top: 0.08rem;
}

.advisor-auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 26px rgba(246, 138, 86, 0.34);
}

.advisor-chat-page {
  width: min(1080px, 100%);
  margin: 0 auto;
  min-height: 100svh;
  padding: 1rem 0.88rem 1.18rem;
  display: grid;
  gap: 0.82rem;
}

.advisor-chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.72rem;
}

.advisor-chat-back {
  text-decoration: none;
  color: #fed8b0;
  font-size: 1.14rem;
  line-height: 1.12;
}

.advisor-chat-user {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  padding: 0.34rem 0.64rem;
  border: 1px solid rgba(251, 186, 127, 0.42);
  border-radius: 999px;
  background: linear-gradient(
    132deg,
    rgba(31, 19, 14, 0.9),
    rgba(17, 12, 10, 0.84)
  );
  color: #efcc9f;
  font-size: 0.98rem;
  line-height: 1;
  max-width: 72vw;
}

.advisor-chat-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advisor-chat-logout {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(255, 189, 130, 0.28),
    rgba(191, 99, 56, 0.34)
  );
  color: #ffe2bf;
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0.34rem 0.64rem;
  cursor: pointer;
}

.advisor-chat-card {
  border-radius: 26px;
  border: 1px solid rgba(236, 178, 115, 0.45);
  padding: clamp(0.88rem, 2vw, 1.2rem);
  background:
    radial-gradient(circle at 80% 9%, rgba(255, 171, 104, 0.22), transparent 36%),
    radial-gradient(circle at 12% 94%, rgba(255, 125, 79, 0.14), transparent 40%),
    linear-gradient(160deg, rgba(14, 10, 8, 0.96), rgba(12, 9, 8, 0.94));
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: min(820px, calc(100svh - 126px));
  gap: 0.78rem;
}

.advisor-chat-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.44rem;
}

.advisor-blob {
  position: relative;
  isolation: isolate;
  width: clamp(146px, 17vw, 198px);
  aspect-ratio: 1;
  border-radius: 52% 48% 44% 56% / 46% 64% 36% 54%;
  background:
    radial-gradient(circle at 32% 34%, rgba(255, 236, 203, 0.93), rgba(255, 161, 99, 0.56) 41%, rgba(155, 77, 46, 0.42) 68%, transparent 78%),
    radial-gradient(circle at 74% 72%, rgba(246, 106, 76, 0.5), rgba(141, 53, 33, 0.2) 45%, transparent 73%);
  box-shadow:
    inset 0 0 26px rgba(255, 196, 136, 0.28),
    0 0 32px rgba(234, 132, 79, 0.26),
    0 12px 28px rgba(0, 0, 0, 0.42);
  animation: advisorBlobShift 8s ease-in-out infinite;
}

.advisor-blob::before,
.advisor-blob::after {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  pointer-events: none;
}

.advisor-blob::before {
  inset: -15%;
  z-index: -2;
  background: radial-gradient(
    circle,
    rgba(254, 184, 118, 0.28),
    rgba(251, 132, 82, 0.08) 48%,
    transparent 70%
  );
  filter: blur(2px);
}

.advisor-blob::after {
  z-index: -1;
  border: 1px solid rgba(255, 182, 125, 0.42);
  opacity: 0.34;
  transform: scale(0.95);
  animation: advisorBlobHalo 4.8s ease-in-out infinite;
}

.advisor-chat-page.is-typing .advisor-blob {
  animation: advisorBlobTyping 1.7s ease-in-out infinite;
}

.advisor-chat-page.is-typing .advisor-blob::after {
  opacity: 0.56;
  border-color: rgba(255, 199, 143, 0.58);
  animation: advisorTypingRing 1.08s ease-out infinite;
}

.advisor-chat-page.is-waiting .advisor-blob {
  animation: advisorBlobWaiting 1.18s ease-in-out infinite;
}

.advisor-chat-page.is-waiting .advisor-blob::after {
  opacity: 0.72;
  border-color: rgba(255, 208, 154, 0.68);
  animation: advisorWaitingRing 0.92s linear infinite;
}

.advisor-chat-hero h1 {
  margin: 0;
  font-size: clamp(1.78rem, 3.2vw, 2.46rem);
  color: #fde3bf;
  line-height: 1.2;
}

.advisor-chat-hero p {
  margin: 0;
  max-width: 760px;
  color: #efcfa6;
  font-size: 1.14rem;
  line-height: 1.42;
}

.advisor-messages {
  min-height: clamp(320px, 44svh, 520px);
  max-height: min(58svh, 620px);
  border: 1px solid rgba(226, 172, 112, 0.34);
  border-radius: 18px;
  padding: 0.78rem;
  background: linear-gradient(
    180deg,
    rgba(15, 10, 8, 0.62),
    rgba(10, 8, 8, 0.56)
  );
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 0.52rem;
}

.advisor-message {
  max-width: min(84%, 740px);
  border-radius: 16px;
  padding: 0.56rem 0.72rem;
  line-height: 1.4;
  font-size: 1.08rem;
  animation: rise 0.2s ease-out;
}

.advisor-message p {
  margin: 0;
}

.advisor-message-bot {
  background: rgba(64, 39, 25, 0.52);
  border: 1px solid rgba(236, 183, 123, 0.35);
  color: #f3d4ad;
  box-shadow: inset 0 1px 0 rgba(255, 215, 166, 0.08);
}

.advisor-message-user {
  margin-left: auto;
  background: linear-gradient(
    135deg,
    rgba(255, 149, 96, 0.24),
    rgba(181, 89, 49, 0.25)
  );
  border: 1px solid rgba(255, 187, 140, 0.46);
  color: #fff0e0;
  box-shadow: 0 8px 18px rgba(160, 73, 38, 0.16);
}

.advisor-message-typing {
  display: inline-flex;
  align-items: center;
}

.advisor-message-typing p {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
}

.advisor-typing-icon {
  display: inline-grid;
  place-items: center;
  width: 1.06rem;
  height: 1.06rem;
  font-size: 0.86rem;
  color: #ffcb97;
  animation: advisorTypingIcon 1s ease-in-out infinite;
}

.advisor-typing-dots {
  display: inline-flex;
  gap: 0.16rem;
  margin-left: 0.06rem;
}

.advisor-typing-dots i {
  width: 0.26rem;
  height: 0.26rem;
  border-radius: 50%;
  background: #f5d0a7;
  opacity: 0.2;
  animation: advisorTypingDot 0.96s ease-in-out infinite;
}

.advisor-typing-dots i:nth-child(2) {
  animation-delay: 0.13s;
}

.advisor-typing-dots i:nth-child(3) {
  animation-delay: 0.26s;
}

.advisor-chat-input-wrap {
  border: 1px solid rgba(237, 180, 116, 0.38);
  background: linear-gradient(178deg, rgba(16, 12, 10, 0.94), rgba(10, 8, 7, 0.94));
  border-radius: 18px;
  padding: 0.62rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.44rem;
}

.advisor-chat-input-wrap[aria-busy="true"] {
  border-color: rgba(255, 191, 135, 0.74);
  box-shadow: 0 0 0 3px rgba(255, 154, 88, 0.16);
}

.advisor-chat-input-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.advisor-chat-input-wrap input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #f8dcb7;
  font-size: 1.14rem;
  font-family: inherit;
  outline: none;
  padding: 0.34rem 0.52rem;
  line-height: 1.15;
}

.advisor-chat-input-wrap input::placeholder {
  color: rgba(236, 196, 151, 0.55);
}

.advisor-chat-send {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: radial-gradient(
    circle at 28% 24%,
    #ffe6c7 4%,
    #ffb37f 42%,
    #f48b57 68%,
    #d26540 100%
  );
  color: #2c150b;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  box-shadow: 0 12px 24px rgba(245, 135, 79, 0.28);
}

.advisor-chat-send-icon {
  transform: translateX(1px);
}

.advisor-chat-send:disabled {
  cursor: not-allowed;
  filter: saturate(0.72);
  opacity: 0.82;
}

.advisor-chat-send:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 16px 28px rgba(245, 135, 79, 0.34);
}

@media (max-width: 1180px) {
  .interp-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .page.app-shell {
    padding: 1rem 0.72rem 1.5rem;
  }

  .chart-grid {
    grid-template-rows: repeat(4, minmax(170px, auto));
  }

  .main-star-list li {
    font-size: 1.08rem;
  }

  .aux-star-list li {
    font-size: 0.9rem;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 860px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    gap: 0.55rem;
    padding: 0.36rem;
  }

  .cell,
  .center-info {
    min-height: 180px;
    grid-row: auto !important;
    grid-column: auto !important;
  }

  .center-info {
    order: -1;
    min-height: unset;
  }

  .chart-context {
    gap: 0.4rem;
  }

  .meta-pill {
    font-size: 0.88rem;
  }

  .qa-group summary {
    font-size: 0.98rem;
  }

  .advisor-teaser-panel {
    grid-template-columns: 1fr;
  }

  .advisor-teaser-cta-wrap {
    justify-items: stretch;
  }

  .advisor-teaser-btn {
    width: 100%;
  }

  .seo-topic-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .panel {
    padding: 0.82rem;
    border-radius: 16px;
  }

  .masthead {
    padding-top: 1.1rem;
    padding-bottom: 0.95rem;
  }

  .sigil {
    width: 48px;
    height: 48px;
    font-size: 1.42rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

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

  .btn-cast {
    grid-column: auto;
    width: 100%;
  }

  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    padding: 0.26rem;
  }

  .cell,
  .center-info {
    min-height: unset;
  }

  .center-info {
    grid-column: 1 / -1 !important;
    padding: 0.68rem 0.74rem;
  }

  .center-info h3 {
    font-size: 1.24rem;
    margin-bottom: 0.36rem;
  }

  .center-info p {
    font-size: 0.96rem;
  }

  .cell {
    padding: 0.4rem 0.42rem;
    border-radius: 11px;
  }

  .cell-head {
    gap: 0.28rem;
  }

  .palace-glyph {
    width: 1.02rem;
    height: 1.02rem;
    font-size: 0.62rem;
  }

  .cell-head strong {
    font-size: 1rem;
  }

  .cell-branch {
    font-size: 0.9rem;
    padding: 0.03rem 0.34rem;
  }

  .cell-markers {
    min-height: 0;
    margin-bottom: 0.08rem;
    gap: 0.22rem;
  }

  .state-badge {
    font-size: 0.76rem;
    padding: 0.01rem 0.35rem;
  }

  .state-badge::before {
    margin-right: 0.2rem;
  }

  .main-star-list li {
    font-size: 1.02rem;
    line-height: 1.14;
  }

  .aux-star-list {
    margin-top: 0.24rem !important;
    gap: 0.14rem 0.34rem !important;
  }

  .aux-star-list li {
    font-size: 0.92rem;
    line-height: 1.14;
  }

  .cell-aux-toggle {
    display: inline-flex;
    align-items: center;
  }

  .interp-grid {
    grid-template-columns: 1fr;
  }

  .score-guide li {
    grid-template-columns: 1fr;
    gap: 0.24rem;
  }

  .qa-list {
    padding: 0.5rem 0.58rem 0.6rem 1.08rem;
  }

  .advisor-auth-shell {
    width: calc(100% - 1rem);
    margin: 0.9rem auto;
  }

  .advisor-auth-title {
    font-size: clamp(1.52rem, 7.4vw, 2rem);
  }

  .advisor-auth-subtitle {
    font-size: 1rem;
  }

  .advisor-auth-tab-btn {
    font-size: 0.98rem;
  }

  .advisor-auth-form span {
    font-size: 1.06rem;
  }

  .advisor-auth-form input {
    font-size: 1.02rem;
  }

  .advisor-auth-submit {
    font-size: 1.06rem;
  }

  .advisor-chat-page {
    padding: 0.78rem 0.46rem 0.96rem;
    gap: 0.66rem;
  }

  .advisor-chat-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .advisor-chat-user {
    max-width: 100%;
  }

  .advisor-chat-user span {
    max-width: 48vw;
  }

  .advisor-chat-card {
    border-radius: 20px;
    min-height: calc(100svh - 166px);
    padding: 0.72rem;
  }

  .advisor-chat-hero h1 {
    font-size: clamp(1.38rem, 7vw, 1.85rem);
  }

  .advisor-chat-hero p {
    font-size: 1rem;
  }

  .advisor-messages {
    min-height: clamp(270px, 45svh, 420px);
    max-height: 54svh;
    padding: 0.64rem;
  }

  .advisor-message {
    font-size: 1rem;
    max-width: 90%;
  }

  .advisor-chat-input-wrap {
    border-radius: 16px;
    padding: 0.46rem;
  }

  .advisor-chat-input-wrap input {
    font-size: 1rem;
  }

  .advisor-chat-send {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 390px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }

  .center-info {
    grid-column: auto !important;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(18px, -16px, 0) scale(1.05);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes rise {
  from {
    transform: translateY(12px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes advisorBlobShift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    border-radius: 44% 58% 38% 62% / 60% 34% 66% 40%;
  }

  50% {
    transform: translate3d(0, -5px, 0) scale(1.04);
    border-radius: 58% 42% 61% 39% / 34% 64% 36% 66%;
  }
}

@keyframes advisorBlobHalo {
  0%,
  100% {
    transform: scale(0.94);
    opacity: 0.28;
  }

  50% {
    transform: scale(1.03);
    opacity: 0.4;
  }
}

@keyframes advisorBlobTyping {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    border-radius: 48% 52% 42% 58% / 56% 38% 62% 44%;
  }

  50% {
    transform: translate3d(0, -7px, 0) scale(1.06);
    border-radius: 60% 40% 63% 37% / 34% 63% 37% 66%;
  }
}

@keyframes advisorBlobWaiting {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    border-radius: 45% 55% 41% 59% / 58% 34% 66% 42%;
  }

  30% {
    transform: translate3d(0, -4px, 0) scale(1.02);
  }

  60% {
    transform: translate3d(0, -2px, 0) scale(1.08);
    border-radius: 62% 38% 57% 43% / 36% 66% 34% 64%;
  }
}

@keyframes advisorTypingRing {
  from {
    transform: scale(0.88);
    opacity: 0.64;
  }

  to {
    transform: scale(1.12);
    opacity: 0;
  }
}

@keyframes advisorWaitingRing {
  0% {
    transform: scale(0.88) rotate(0deg);
    opacity: 0.74;
  }

  100% {
    transform: scale(1.16) rotate(360deg);
    opacity: 0;
  }
}

@keyframes advisorTypingDot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.22;
  }

  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@keyframes advisorTypingIcon {
  0%,
  100% {
    transform: rotate(0deg) scale(0.94);
    opacity: 0.78;
  }

  50% {
    transform: rotate(16deg) scale(1.12);
    opacity: 1;
  }
}
