:root {
  color-scheme: light;
  --ink: #17203a;
  --muted: #6d7690;
  --blue: #1554e8;
  --blue-deep: #122f9f;
  --blue-soft: #edf3ff;
  --violet: #7055e8;
  --violet-soft: #f2efff;
  --gold: #c88819;
  --gold-soft: #fff7e7;
  --teal: #129b88;
  --teal-soft: #eafaf7;
  --rose: #e75d78;
  --rose-soft: #fff0f3;
  --line: #e2e8f5;
  --paper: #f3f6ff;
  --white: #ffffff;
  --shadow: 0 20px 54px rgba(16, 52, 145, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #e7edfb;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: #e7edfb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(21, 84, 232, 0.34);
  outline-offset: 2px;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 68px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  min-height: 350px;
  padding: max(18px, env(safe-area-inset-top)) 18px 28px;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 84% 16%, rgba(115, 181, 255, 0.56), transparent 34%),
    radial-gradient(circle at 14% 88%, rgba(65, 144, 255, 0.42), transparent 38%),
    linear-gradient(145deg, #05247d 0%, #0751cf 53%, #1678f4 100%);
}

.hero::after {
  position: absolute;
  right: -95px;
  bottom: 76px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
}

.hero-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.96);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.back-link span {
  margin-right: 5px;
  font-size: 17px;
  line-height: 1;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 700;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 248px;
  margin-top: 24px;
}

.eyebrow,
.section-heading > p,
.loop-section > p,
.consult-card > p {
  margin: 0 0 10px;
  color: #7ea6ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(33px, 8.7vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-copy > p:last-child {
  max-width: 214px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.6;
}

.hero-art {
  position: absolute;
  z-index: 1;
  right: -8px;
  bottom: -4px;
  width: 178px;
  max-width: none;
  border-radius: 48px 0 0 48px;
  mix-blend-mode: screen;
  filter: saturate(1.18) contrast(1.04) drop-shadow(0 18px 24px rgba(0, 27, 112, 0.24));
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.hero-next {
  position: absolute;
  z-index: 2;
  left: 18px;
  bottom: 14px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

main {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.boundary-note,
.story-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.boundary-note {
  margin-top: -18px;
  padding: 10px 13px;
  position: relative;
  z-index: 3;
  border-color: #d8e5ff;
  background: #fbfdff;
  box-shadow: 0 12px 34px rgba(26, 62, 156, 0.12);
}

.boundary-note strong {
  color: #214fbd;
  font-size: 14px;
}

.boundary-note p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.story-section {
  padding: 16px 14px;
  box-shadow: 0 8px 24px rgba(38, 68, 146, 0.055);
}

.section-heading {
  margin-bottom: 12px;
}

.section-heading > p {
  color: var(--blue);
}

.section-heading h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.28;
  letter-spacing: -0.025em;
}

.section-heading > span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

.preference-grid button {
  display: flex;
  min-height: 104px;
  padding: 5px 2px 6px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faff;
  color: var(--ink);
  text-align: center;
}

.preference-icon {
  display: block;
  width: 48px;
  height: 43px;
  margin: 0 auto 3px;
  object-fit: contain;
  border-radius: 14px;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 6px 9px rgba(38, 67, 142, 0.12));
}

.preference-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.preference-grid button.active {
  border-color: #4677f1;
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px #4677f1;
}

.preference-grid button:nth-child(1) {
  border-color: #cbdcff;
  background: var(--blue-soft);
}

.preference-grid button:nth-child(1) strong {
  color: #1e55c8;
}

.preference-grid button:nth-child(2) {
  border-color: #ddd5ff;
  background: var(--violet-soft);
}

.preference-grid button:nth-child(2) strong {
  color: var(--violet);
}

.preference-grid button:nth-child(3) {
  border-color: #f0d89f;
  background: var(--gold-soft);
}

.preference-grid button:nth-child(3) strong {
  color: var(--gold);
}

.preference-grid button:nth-child(4) {
  border-color: #c8ece5;
  background: var(--teal-soft);
}

.preference-grid button:nth-child(4) strong {
  color: var(--teal);
}

.preference-grid button:nth-child(5) {
  border-color: #c9e5ff;
  background: #eef8ff;
}

.preference-grid button:nth-child(5) strong {
  color: #1680c4;
}

.preference-grid button:nth-child(6) {
  border-color: #ffd8d1;
  background: #fff3f1;
}

.preference-grid button:nth-child(6) strong {
  color: #d96353;
}

.preference-grid button:nth-child(7) {
  border-color: #cfdcff;
  background: #eef4ff;
}

.preference-grid button:nth-child(7) strong {
  color: #315fbd;
}

.preference-grid button:nth-child(8) {
  border-color: #ded3ff;
  background: #f5f0ff;
}

.preference-grid button:nth-child(8) strong {
  color: #7651d6;
}

.preference-grid button.active {
  box-shadow: 0 9px 22px rgba(41, 84, 185, 0.13), inset 0 0 0 1px currentColor;
  transform: translateY(-2px);
}

.preference-grid button:nth-child(1).active {
  border-color: #2d66dc;
  color: #2d66dc;
}

.preference-grid button:nth-child(2).active {
  border-color: var(--violet);
  color: var(--violet);
}

.preference-grid button:nth-child(3).active {
  border-color: var(--gold);
  color: var(--gold);
}

.preference-grid button:nth-child(4).active {
  border-color: var(--teal);
  color: var(--teal);
}

.preference-grid button:nth-child(5).active {
  border-color: #1680c4;
  color: #1680c4;
}

.preference-grid button:nth-child(6).active {
  border-color: #d96353;
  color: #d96353;
}

.preference-grid button:nth-child(7).active {
  border-color: #315fbd;
  color: #315fbd;
}

.preference-grid button:nth-child(8).active {
  border-color: #7651d6;
  color: #7651d6;
}

.preference-grid button.active span {
  color: #59657f;
}

.preference-grid strong,
.preference-grid span {
  display: block;
}

.preference-grid strong {
  font-size: clamp(10.5px, 3vw, 12px);
  line-height: 1.25;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.preference-grid span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.2px;
  line-height: 1.3;
}

.refine-panel {
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #d9e4fa;
  border-radius: 14px;
  background: #fbfdff;
}

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

.refine-heading strong,
.refine-heading span {
  display: block;
}

.refine-heading strong {
  font-size: 15px;
}

.refine-heading span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.refine-heading b {
  flex: none;
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf3ff;
  color: #2b5bc7;
  font-size: 10px;
  font-weight: 900;
}

.choice-group {
  margin-top: 8px;
}

.choice-group > span {
  display: block;
  margin-bottom: 5px;
  color: #43506b;
  font-size: 11px;
  font-weight: 900;
}

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

.choice-chips button {
  min-height: 44px;
  padding: 0 4px;
  border: 1px solid #dfe6f4;
  border-radius: 11px;
  background: #ffffff;
  color: #56617a;
  font-size: 11px;
  font-weight: 800;
}

.choice-chips button.active {
  border-color: #4d78e8;
  background: #edf3ff;
  color: #174cbf;
  box-shadow: inset 0 0 0 1px #4d78e8;
}

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

.segment-chips button {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 2px;
  font-size: 10.5px;
  white-space: nowrap;
}

.segment-chips b,
.segment-chips small {
  font: inherit;
  letter-spacing: 0;
}

.segment-chips b {
  font-weight: 900;
}

.segment-chips small {
  font-size: 9px;
  font-weight: 800;
}

.budget-chips {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.budget-chips button {
  min-height: 44px;
  padding: 0 1px;
  border-radius: 10px;
  font-size: 10.3px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.refine-panel > p {
  margin: 8px 0 0;
  color: #8992a7;
  font-size: 10px;
  line-height: 1.55;
}

.refine-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border-radius: 13px;
  background: var(--blue);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(21, 84, 232, 0.18);
}

.refine-submit:disabled {
  cursor: wait;
  opacity: 0.62;
}

.culture-section {
  overflow: hidden;
  border-color: #efdfb9;
  background: #fffdf8;
  box-shadow: 0 10px 28px rgba(157, 108, 27, 0.08);
}

.culture-section .section-heading {
  margin-bottom: 10px;
  text-align: center;
}

.culture-section .section-heading > p {
  color: #ad7418;
}

.culture-section .section-heading h2 {
  color: #173873;
  font-size: 20px;
  line-height: 1.35;
}

.culture-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid #ead7a9;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(140, 96, 20, 0.08);
}

.culture-cards article {
  display: flex;
  min-width: 0;
  min-height: 92px;
  padding: 11px 7px 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #f0e3c5;
  background: #ffffff;
  text-align: center;
}

.culture-cards article:nth-child(2) {
  background: #fffaf0;
}

.culture-cards article:last-child {
  border-right: 0;
}

.culture-cards strong {
  display: block;
  color: #bd7d17;
  font-size: 33px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.culture-cards span {
  display: block;
  max-width: 92px;
  margin-top: 7px;
  color: #53617b;
  font-size: 10.5px;
  line-height: 1.5;
}

.culture-disclaimer {
  margin: 9px 0 0;
  padding: 7px 9px;
  border: 1px solid #f0e2c2;
  border-radius: 10px;
  background: #fff9ec;
  color: #7f7c75;
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.impression-inline {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(7, 30, 103, 0.56);
  color: var(--white);
}

.impression-inline-copy > span,
.impression-inline-copy > strong {
  display: block;
}

.impression-inline-copy > span {
  color: #a8c4ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.impression-inline-copy > strong {
  margin-top: 3px;
  font-size: 15px;
}

.impression-inline-copy > p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10.5px;
  line-height: 1.45;
}

.impression-inline-badges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.impression-inline-badges article {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 5px 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
  text-align: center;
}

.impression-inline-badges picture {
  display: block;
  width: 28px;
  height: 26px;
}

.impression-inline-badges img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 999px;
}

.impression-inline-badges span,
.impression-inline-badges b {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.impression-inline-badges span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
}

.impression-inline-badges b {
  margin-top: 1px;
  color: #ffffff;
  font-size: 9.5px;
}

.reveal-section {
  overflow: hidden;
  border-color: transparent;
  background:
    radial-gradient(circle at 88% 12%, rgba(102, 190, 255, 0.54), transparent 34%),
    linear-gradient(145deg, #092a8b 0%, #1260ec 100%);
}

.section-heading.light > p,
.section-heading.light > span {
  color: rgba(255, 255, 255, 0.68);
}

.section-heading.light h2 {
  color: var(--white);
}

.featured-number {
  padding: 18px;
  border-radius: 17px;
  border: 1px solid rgba(170, 199, 255, 0.7);
  background: #fbfdff;
  box-shadow: 0 18px 36px rgba(4, 19, 67, 0.24);
}

.number-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.number-value {
  display: block;
  margin-top: 8px;
  color: #143cae;
  font-size: clamp(30px, 9vw, 38px);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.number-value.skeleton {
  color: #9aa7c2;
  font-size: 24px;
}

.number-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.number-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf3ff;
  color: #315fca;
  font-size: 11px;
  font-weight: 800;
}

.number-fee {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid #efdba9;
  border-radius: 12px;
  background: #fff8e9;
}

.number-fee span,
.number-fee strong {
  display: block;
}

.number-fee span {
  color: #8d6a2d;
  font-size: 9.5px;
  font-weight: 800;
}

.number-fee strong {
  margin-top: 2px;
  color: #a8650b;
  font-size: 20px;
  line-height: 1.05;
}

.number-fee strong b {
  margin-left: 2px;
  font-size: 10px;
  font-weight: 900;
}

.number-fee p {
  margin: 0;
  color: #806f55;
  font-size: 10px;
  line-height: 1.45;
}

.selection-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.selection-summary span {
  padding: 5px 8px;
  border: 1px solid #dfe6f4;
  border-radius: 999px;
  background: #ffffff;
  color: #68738b;
  font-size: 10px;
  font-weight: 800;
}

.number-caption {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.number-actions,
.loop-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.number-actions button,
.loop-actions button,
.loop-actions a {
  min-height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  background: #edf2fb;
  color: #344158;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.number-actions .primary,
.loop-actions .primary,
.primary {
  background: var(--blue);
  color: var(--white);
}

.number-actions .primary {
  grid-column: 1 / -1;
}

.loop-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bcd1ff;
  color: #164fb9;
  background: #edf3ff;
}

.loop-actions button:last-child {
  grid-column: 1 / -1;
}

.rhythm-card {
  padding: 15px;
  border: 1px solid #dfe7f7;
  border-radius: 15px;
  border-color: #ddd7ff;
  background: var(--violet-soft);
}

.rhythm-number {
  color: #214ebc;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.rhythm-segments {
  display: grid;
  grid-template-columns: 3fr 4fr 4fr;
  gap: 6px;
  margin-top: 10px;
}

.rhythm-segments span {
  min-width: 0;
  padding: 8px 4px;
  border-radius: 10px;
  background: #ffffff;
  color: #5d46c9;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.rhythm-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.reason-list,
.similar-list {
  display: grid;
  gap: 8px;
}

.reason-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.reason-item:nth-child(1) {
  border-color: #d4e1ff;
  background: var(--blue-soft);
}

.reason-item:nth-child(2) {
  border-color: #f0dcae;
  background: var(--gold-soft);
}

.reason-item:nth-child(3) {
  border-color: #c9ece6;
  background: var(--teal-soft);
}

.reason-item:nth-child(2) .reason-index {
  background: #9b5c00;
}

.reason-item:nth-child(3) .reason-index {
  background: #08796b;
}

.reason-item .reason-index {
  display: grid;
  width: 34px;
  height: 34px;
  margin-top: 0;
  place-items: center;
  align-self: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 5px 12px rgba(23, 32, 58, 0.14);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.reason-item strong,
.reason-item span {
  display: block;
}

.reason-item strong {
  font-size: 14px;
}

.reason-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.scene-grid {
  display: grid;
  gap: 7px;
}

.scene-grid article {
  padding: 12px;
  border-left: 3px solid #4c78ed;
  border-radius: 0 13px 13px 0;
  background: #f2f6ff;
}

.scene-grid strong,
.scene-grid span {
  display: block;
}

.scene-grid strong {
  font-size: 14px;
}

.scene-grid span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.scene-grid > button {
  min-height: 44px;
  border: 1px solid #d7e2f8;
  border-radius: 12px;
  background: #ffffff;
  color: #315fca;
  font-size: 11px;
  font-weight: 900;
}

.similar-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  border-color: #d9e4fa;
  background: #fbfdff;
}

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

.similar-card strong {
  color: #183eaa;
  font-size: 18px;
  letter-spacing: 0.03em;
}

.similar-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.similar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
}

.similar-meta .similar-tags,
.similar-meta .similar-fee {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
}

.similar-meta .similar-fee {
  min-height: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e7f7f0;
  color: #167357;
  font-weight: 900;
  white-space: nowrap;
}

.similar-card button {
  min-height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  background: #eaf1ff;
  color: #2758c9;
  font-size: 11px;
  font-weight: 900;
}

.similar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.similar-actions button[data-action="promote-similar"] {
  background: #f2efff;
  color: #634bd0;
}

.similar-card button.selected {
  background: #173fae;
  color: var(--white);
}

.loop-section {
  padding: 26px 18px;
  color: var(--white);
  background: #102d79;
}

.loop-section > p {
  color: #87a9ff;
}

.loop-section h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.3;
}

.loop-section > span {
  display: block;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  line-height: 1.7;
}

.loop-actions button:not(.primary) {
  color: #dce6ff;
  background: rgba(255, 255, 255, 0.12);
}

.loop-section .loop-actions a {
  border-color: rgba(177, 204, 255, 0.48);
  color: #ffffff;
  background: rgba(58, 126, 255, 0.38);
}

.official-account-section {
  margin: -8px 0 78px;
  padding: 0 10px;
}

.shared-inventory-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 10px 14px;
  padding: 9px 11px;
  border-left: 3px solid #0b9b76;
  background: #f0faf6;
  color: #415f58;
  font-size: 10px;
  line-height: 1.45;
}

.shared-inventory-note[hidden] {
  display: none;
}

.shared-inventory-note strong {
  flex: 0 0 auto;
  color: #08765e;
  font-size: 11px;
}

.official-pool-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #b9dfd5;
  border-radius: 8px;
  background: #f3fbf8;
}

.official-pool-section[hidden] {
  display: none;
}

.official-pool-section p,
.official-pool-section h2,
.official-pool-section span {
  margin: 0;
}

.official-pool-section p {
  color: #087f67;
  font-size: 10px;
  font-weight: 800;
}

.official-pool-section h2 {
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.35;
}

.official-pool-section span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.official-pool-section a {
  min-width: 82px;
  padding: 9px 10px;
  border: 1px solid #8bcfbd;
  border-radius: 6px;
  color: #076a58;
  background: #fff;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 359px) {
  .official-pool-section {
    grid-template-columns: 1fr;
  }

  .official-pool-section a {
    width: 100%;
  }
}

.official-account-section details {
  overflow: hidden;
  border: 1px solid #d7e3f7;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(34, 63, 124, 0.07);
}

.official-account-section summary {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.official-account-section summary::-webkit-details-marker {
  display: none;
}

.official-account-section summary span,
.official-account-section summary small,
.official-account-section summary strong {
  display: block;
}

.official-account-section summary small {
  color: #6d7c97;
  font-size: 10px;
}

.official-account-section summary strong {
  margin-top: 2px;
  color: #173f9e;
  font-size: 13px;
}

.official-account-section summary b {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #2458c8;
  font-size: 10px;
}

.official-account-section details[open] summary b {
  background: #f0f3f8;
  color: #65738b;
}

.official-account-content {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 12px 12px;
  border-top: 1px dashed #dce5f4;
}

.official-account-content img {
  display: block;
  width: 136px;
  height: auto;
  margin-top: 12px;
  border-radius: 9px;
  background: #ffffff;
}

.official-account-content strong {
  color: #132f6f;
  font-size: 13px;
}

.official-account-content p,
.official-account-content span {
  display: block;
  margin: 5px 0 0;
  color: #61708a;
  font-size: 10px;
  line-height: 1.55;
}

.official-account-content span {
  color: #2e62c8;
}

.sticky-dock {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  width: min(100%, 430px);
  min-height: 56px;
  padding: 6px 10px max(6px, env(safe-area-inset-bottom));
  transform: translate(-50%, calc(100% + 12px));
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(78, 126, 236, 0.22);
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -12px 30px rgba(26, 43, 95, 0.12);
  backdrop-filter: blur(16px);
  transition: transform 220ms ease, opacity 180ms ease;
}

.sticky-dock.visible {
  transform: translateX(-50%);
  opacity: 1;
  pointer-events: auto;
}

.sticky-dock span,
.sticky-dock strong {
  display: block;
}

.sticky-dock span {
  color: var(--muted);
  font-size: 10px;
}

.sticky-dock strong {
  margin-top: 3px;
  font-size: 13px;
}

.sticky-dock button {
  min-height: 44px;
  padding: 0 15px;
  border-radius: 13px;
  background: var(--blue);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

dialog {
  width: min(calc(100% - 28px), 400px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
}

dialog::backdrop {
  background: rgba(7, 17, 51, 0.58);
  backdrop-filter: blur(3px);
}

.consult-card {
  position: relative;
  padding: 28px 22px 22px;
  border-radius: 22px;
  background: var(--white);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 38px;
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #eef2f8;
  color: var(--muted);
  font-size: 11px;
}

.consult-card h2 {
  margin: 0;
  font-size: 24px;
}

.consult-preference {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7e7;
  color: #926115;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.55;
}

.consult-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.consult-numbers span {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: #214ebc;
  font-size: 13px;
  font-weight: 900;
}

.consult-contact {
  margin-top: 15px;
  padding: 13px;
  border-radius: 13px;
  background: #f7f9fd;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

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

.consult-checks span {
  min-width: 0;
  padding: 8px 5px;
  border-radius: 10px;
  background: #eef5ff;
  color: #4465ad;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.consult-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.wide {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  margin-top: 0;
  border-radius: 13px;
  font-weight: 900;
}

.consult-phone,
.consult-wechat,
.consult-wecom {
  display: grid;
  min-height: 42px;
  place-items: center;
  padding: 0 8px;
  border-radius: 12px;
  background: #edf3ff;
  color: #2454c4;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.consult-phone[hidden],
.consult-wechat[hidden],
.consult-wecom[hidden] {
  display: none;
}

.consult-wecom {
  background: linear-gradient(135deg, #17a86b, #0b8f59);
  color: #fff;
  box-shadow: 0 8px 20px rgba(16, 151, 95, 0.2);
}

.secondary-link {
  display: block;
  margin-top: 14px;
  color: #4067c4;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 78px;
  max-width: min(86vw, 360px);
  padding: 10px 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #111c3b;
  color: var(--white);
  font-size: 12px;
  box-shadow: 0 12px 28px rgba(5, 17, 54, 0.24);
}

.toast[hidden] {
  display: none;
}

@media (max-width: 350px) {
  .number-actions,
  .loop-actions {
    grid-template-columns: 1fr;
  }

  .loop-actions button:last-child {
    grid-column: auto;
  }

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

  .segment-chips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .segment-chips button {
    gap: 2px;
    font-size: 9.8px;
  }

  .segment-chips small {
    font-size: 8.4px;
  }

  .budget-chips {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
  }

  .budget-chips button {
    font-size: 9.5px;
  }

  .official-account-content {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .official-account-content img {
    width: 112px;
  }

  .number-actions .primary {
    grid-column: auto;
  }

  .number-fee {
    gap: 8px;
    padding: 8px 9px;
  }

  .number-fee strong {
    font-size: 18px;
  }

  .number-fee p {
    font-size: 9.5px;
  }

  .hero {
    min-height: 390px;
  }

  .hero-art {
    right: -25px;
    bottom: 0;
    width: 172px;
  }

  .refine-heading {
    display: block;
  }

  .refine-heading b {
    display: inline-block;
    margin-top: 9px;
  }
}

@media (min-width: 700px) {
  body {
    padding: 16px 0;
  }

  .app-shell {
    border-radius: 28px;
  }
}

@media (min-width: 900px) {
  .app-shell {
    width: min(calc(100% - 48px), 820px);
  }

  .hero {
    min-height: 390px;
    padding: 26px 30px 30px;
  }

  .hero-copy {
    max-width: 430px;
    margin-top: 48px;
  }

  .hero h1 {
    max-width: 460px;
    font-size: 52px;
  }

  .hero-copy > p:last-child {
    max-width: 390px;
    font-size: 14px;
  }

  .hero-art {
    right: 12px;
    bottom: 16px;
    width: 340px;
    border-radius: 50px;
  }

  main {
    gap: 12px;
    padding: 14px;
  }

  .boundary-note {
    padding: 16px 20px;
  }

  .story-section {
    padding: 22px 20px;
  }

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

  .preference-grid button {
    min-height: 138px;
    padding: 8px 7px 10px;
    border-radius: 14px;
  }

  .preference-icon {
    width: 72px;
    height: 60px;
    margin-bottom: 4px;
    border-radius: 18px;
    filter: drop-shadow(0 9px 12px rgba(38, 67, 142, 0.13));
  }

  .preference-grid strong {
    font-size: 14px;
    letter-spacing: normal;
  }

  .preference-grid span {
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.45;
  }

  .impression-inline-badges {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .reason-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reason-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .similar-card {
    padding: 13px 16px;
  }

  .sticky-dock {
    width: min(calc(100% - 48px), 820px);
    border-radius: 20px 20px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sticky-dock {
    transition: none;
  }
}
