:root {
  color-scheme: light;
  --ink: #0a1b33;
  --muted: #617391;
  --paper: #f8fcff;
  --line: rgba(130, 169, 210, 0.24);
  --teal: #00d4b3;
  --blue: #4cc9f0;
  --deep-blue: #174ea6;
  --lime: #7ae2a6;
  --sun: #ffd166;
  --coral: #ff7aa8;
  --violet: #8a7cff;
  --lavender: #e6d6ff;
  --ice: #e6f3ff;
  --glass: rgba(255, 255, 255, 0.54);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --shadow: 0 22px 60px rgba(74, 119, 173, 0.18);
  --glow: 0 0 28px rgba(125, 221, 255, 0.34), 0 0 60px rgba(173, 140, 255, 0.2);
  --radius: 20px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #eef7ff;
}

body {
  position: relative;
  overflow-x: hidden;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(230, 244, 255, 0.88) 36%, rgba(246, 239, 255, 0.82) 62%, rgba(232, 252, 255, 0.9)),
    linear-gradient(90deg, rgba(76, 201, 240, 0.14), rgba(138, 124, 255, 0.1) 45%, rgba(255, 122, 168, 0.08)),
    #eef7ff;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(120deg, transparent 0 18%, rgba(255, 255, 255, 0.72) 26%, transparent 34%),
    linear-gradient(300deg, transparent 0 56%, rgba(126, 226, 166, 0.18) 64%, transparent 73%),
    linear-gradient(180deg, rgba(215, 234, 255, 0.52), rgba(255, 255, 255, 0.1));
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.55;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.6) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 72%);
  pointer-events: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.app-shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 20px 38px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 12;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 70px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 18px 48px rgba(76, 126, 180, 0.12);
  backdrop-filter: blur(24px) saturate(1.35);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92) 0 18%, transparent 19%),
    conic-gradient(from 15deg, #44d2ff, #8a7cff, #ff7aa8, #ffd166, #7ae2a6, #44d2ff);
  box-shadow: 0 12px 28px rgba(76, 201, 240, 0.3), var(--glow);
  font-weight: 950;
  text-shadow: 0 1px 10px rgba(10, 27, 51, 0.28);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong {
  color: var(--ink);
  font-size: 1.32rem;
  font-weight: 950;
  letter-spacing: 0;
}

.brand small {
  margin-top: 3px;
  color: #29446a;
  font-size: 0.74rem;
  font-weight: 800;
}

.mode-tabs {
  justify-self: center;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(137, 173, 214, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 10px 24px rgba(82, 130, 187, 0.1);
  backdrop-filter: blur(18px) saturate(1.25);
}

.mode-tab {
  min-width: 82px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.mode-tab.active {
  color: #0a2f60;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(222, 240, 255, 0.78)),
    linear-gradient(135deg, rgba(76, 201, 240, 0.2), rgba(138, 124, 255, 0.18));
  box-shadow: inset 0 1px 0 #ffffff, 0 10px 22px rgba(76, 126, 180, 0.14);
}

.icon-btn {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 24px rgba(82, 130, 187, 0.12);
  backdrop-filter: blur(18px);
}

.top-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.login-pill {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(118, 166, 222, 0.28);
  border-radius: 999px;
  color: #123f72;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 10px 22px rgba(82, 130, 187, 0.1);
}

.login-pill.is-authed {
  color: white;
  background: linear-gradient(135deg, #00d4b3, #4cc9f0 58%, #8a7cff);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.spin-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  grid-template-areas:
    "copy result"
    "topics result"
    "scope result"
    "filters result"
    "wheel guide"
    "actions guide";
  gap: 18px 24px;
  align-items: start;
  padding-top: 26px;
}

.spin-copy {
  grid-area: copy;
  align-self: end;
}

.eyebrow,
.result-kicker,
.section-heading p {
  margin: 0 0 8px;
  color: #24598f;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 14px;
  color: #08234a;
  font-size: 3.15rem;
  line-height: 1.02;
  text-shadow: 0 10px 30px rgba(88, 129, 184, 0.16);
}

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

.stats-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid rgba(118, 166, 222, 0.28);
  border-radius: 999px;
  color: #123f72;
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.86rem;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 8px 18px rgba(82, 130, 187, 0.08);
}

.filter-strip {
  grid-area: filters;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: thin;
}

.scope-strip {
  grid-area: scope;
  display: inline-flex;
  width: min(360px, 100%);
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(118, 166, 222, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 24px rgba(82, 130, 187, 0.1);
  backdrop-filter: blur(18px) saturate(1.25);
}

.scope-chip {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  color: #37587c;
  background: transparent;
  cursor: pointer;
  font-weight: 900;
}

.scope-chip.active {
  color: white;
  background: linear-gradient(135deg, #00d4b3, #4cc9f0 48%, #8a7cff);
  box-shadow: 0 10px 22px rgba(76, 201, 240, 0.2), 0 0 18px rgba(138, 124, 255, 0.16);
}

.topic-strip {
  grid-area: topics;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.topic-chip {
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 16px;
  color: #123f72;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(239, 247, 255, 0.52)),
    rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 10px 22px rgba(82, 130, 187, 0.08);
  cursor: pointer;
  font-weight: 920;
  backdrop-filter: blur(16px);
}

.topic-chip.active {
  border-color: rgba(255, 255, 255, 0.86);
  color: white;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), transparent 40%),
    linear-gradient(135deg, #58dbff, #8a7cff 58%, #ff7aa8);
  box-shadow: 0 16px 32px rgba(107, 132, 255, 0.2), var(--glow);
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid rgba(118, 166, 222, 0.24);
  border-radius: 999px;
  color: #37587c;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font-weight: 820;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.filter-chip.active {
  border-color: rgba(122, 226, 166, 0.65);
  color: #0b4b5d;
  background: linear-gradient(180deg, rgba(231, 255, 241, 0.96), rgba(183, 248, 220, 0.78));
  box-shadow: 0 8px 18px rgba(122, 226, 166, 0.22);
}

.wheel-stage {
  position: relative;
  grid-area: wheel;
  width: min(100%, 650px);
  aspect-ratio: 1;
  align-self: center;
  justify-self: center;
  padding: 26px;
}

.wheel-stage::before {
  position: absolute;
  inset: 0;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(226, 242, 255, 0.36) 48%, rgba(244, 232, 255, 0.34)),
    linear-gradient(90deg, rgba(76, 201, 240, 0.16), rgba(138, 124, 255, 0.14), rgba(255, 209, 102, 0.12));
  box-shadow: var(--shadow), var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(1.35);
}

.wheel-stage::after {
  position: absolute;
  inset: 20px;
  z-index: 0;
  content: "";
  border-radius: 50%;
  background:
    conic-gradient(from 12deg, rgba(76, 201, 240, 0.18), rgba(138, 124, 255, 0.18), rgba(255, 122, 168, 0.16), rgba(255, 209, 102, 0.16), rgba(0, 212, 179, 0.16), rgba(76, 201, 240, 0.18));
  filter: blur(14px);
  opacity: 0.86;
}

#wheelCanvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  cursor: pointer;
  filter: saturate(1.12) drop-shadow(0 18px 42px rgba(76, 126, 180, 0.22));
}

.pointer {
  position: absolute;
  z-index: 6;
  top: 3px;
  left: 50%;
  width: 54px;
  height: 82px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(123, 226, 255, 0.62) 28%, rgba(138, 124, 255, 0.76) 62%, rgba(255, 122, 168, 0.58)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), transparent);
  clip-path: polygon(50% 0, 78% 32%, 56% 100%, 44% 100%, 22% 32%);
  box-shadow: 0 14px 28px rgba(80, 108, 176, 0.24), 0 0 22px rgba(138, 124, 255, 0.32);
  filter: drop-shadow(0 14px 18px rgba(76, 126, 180, 0.22));
}

.pointer::after {
  position: absolute;
  top: 18px;
  left: 23px;
  width: 8px;
  height: 42px;
  content: "";
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.9);
}

.center-badge {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: grid;
  width: 128px;
  height: 128px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 8px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  color: #0a2f60;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.96), rgba(235, 246, 255, 0.82) 48%, rgba(212, 229, 255, 0.68)),
    conic-gradient(from 30deg, rgba(76, 201, 240, 0.26), rgba(138, 124, 255, 0.22), rgba(255, 122, 168, 0.18), rgba(255, 209, 102, 0.22), rgba(0, 212, 179, 0.2), rgba(76, 201, 240, 0.26));
  box-shadow: 0 20px 40px rgba(74, 119, 173, 0.24), 0 0 34px rgba(255, 255, 255, 0.8), inset 0 1px 0 #ffffff;
  cursor: pointer;
}

.center-badge span,
.center-badge small {
  display: block;
  line-height: 1;
}

.center-badge span {
  align-self: end;
  font-size: 2.18rem;
  font-weight: 950;
  text-shadow: 0 8px 20px rgba(76, 126, 180, 0.18);
}

.center-badge small {
  align-self: start;
  color: #29446a;
  font-size: 0.76rem;
  font-weight: 900;
}

.action-bar {
  grid-area: actions;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(118px, auto);
  gap: 10px;
  width: min(100%, 650px);
  justify-self: center;
}

.primary-action,
.secondary-action,
.text-action,
.search-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 920;
}

.primary-action {
  gap: 10px;
  border: 0;
  color: white;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 42%),
    linear-gradient(135deg, #00d4b3, #4cc9f0 42%, #8a7cff 78%);
  box-shadow: 0 18px 36px rgba(76, 126, 255, 0.24), 0 0 24px rgba(76, 201, 240, 0.18);
}

.primary-action svg,
.secondary-action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.primary-action.is-spinning svg {
  animation: spinIcon 0.75s linear infinite;
}

.secondary-action {
  gap: 8px;
  border: 1px solid var(--line);
  color: #174ea6;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 10px 22px rgba(82, 130, 187, 0.1);
}

.result-panel,
.guide-panel,
.world-panel {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(235, 246, 255, 0.54) 48%, rgba(246, 238, 255, 0.5)),
    rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(1.24);
}

.result-panel {
  grid-area: result;
  position: sticky;
  top: 16px;
  z-index: 3;
  padding: 20px;
  overflow: hidden;
}

.result-panel::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(150deg, transparent 0 45%, rgba(76, 201, 240, 0.18) 54%, transparent 66%),
    linear-gradient(20deg, transparent 0 58%, rgba(255, 255, 255, 0.52) 63%, transparent 69%);
  opacity: 0.72;
}

.live-heat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.live-heat .result-kicker {
  margin-bottom: 0;
}

.live-heat span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: #174ea6;
  background: rgba(230, 243, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 900;
  border: 1px solid rgba(118, 166, 222, 0.18);
}

.result-panel h2 {
  margin-bottom: 6px;
  color: #08234a;
  font-size: 2.2rem;
  line-height: 1.08;
}

.result-panel p {
  color: var(--muted);
}

.persona-card {
  margin: 16px 0 2px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(232, 244, 255, 0.56)),
    linear-gradient(90deg, rgba(76, 201, 240, 0.12), rgba(255, 122, 168, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 26px rgba(82, 130, 187, 0.08);
}

.persona-card span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: #0a5f78;
  background: rgba(223, 252, 255, 0.78);
  font-size: 0.8rem;
  font-weight: 900;
  border: 1px solid rgba(76, 201, 240, 0.2);
}

.persona-card strong {
  display: block;
  margin-top: 9px;
  font-size: 1.02rem;
  line-height: 1.45;
}

.spot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 94px;
  margin: 18px 0;
}

.spot-grid span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(76, 201, 240, 0.18);
  border-radius: 999px;
  color: #17466f;
  background: rgba(245, 251, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 780;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

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

.text-action {
  border: 1px solid var(--line);
  color: #174ea6;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 22px rgba(82, 130, 187, 0.08);
}

.guide-panel {
  grid-area: guide;
  position: relative;
  z-index: 1;
  padding: 20px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 1.7rem;
  line-height: 1.15;
}

.guide-layout {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.guide-block {
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.guide-block h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.guide-block ol {
  margin: 0;
  padding-left: 1.35rem;
  color: #385d80;
}

.guide-block li + li {
  margin-top: 7px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-link {
  width: 100%;
  margin-top: 14px;
  color: white;
  border: 0;
  background: linear-gradient(135deg, #102a55, #174ea6 52%, #8a7cff);
  box-shadow: 0 16px 30px rgba(23, 78, 166, 0.22);
}

.world-panel {
  width: min(980px, 100%);
  margin: 24px auto 0;
  padding: 24px;
}

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

.world-grid article {
  min-height: 142px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(235, 246, 255, 0.58)),
    rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 22px rgba(82, 130, 187, 0.08);
}

.world-grid span {
  color: #0d9488;
  font-size: 0.78rem;
  font-weight: 900;
}

.world-grid strong {
  display: block;
  margin: 8px 0;
  font-size: 1.08rem;
}

.world-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 15px;
  border-radius: 999px;
  color: white;
  background: rgba(16, 24, 40, 0.92);
  box-shadow: 0 16px 30px rgba(16, 24, 40, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  font-size: 0.92rem;
  font-weight: 800;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 18, 32, 0.42);
  backdrop-filter: blur(12px);
}

.auth-card {
  position: relative;
  width: min(430px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(183, 238, 69, 0.46), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 255, 249, 0.9));
  box-shadow: 0 24px 70px rgba(8, 18, 32, 0.24);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.auth-card h2 {
  width: calc(100% - 36px);
  margin-bottom: 8px;
  font-size: 1.85rem;
  line-height: 1.12;
}

.auth-note,
.mini-policy {
  color: var(--muted);
  line-height: 1.6;
}

.auth-note {
  margin-bottom: 16px;
}

.auth-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
}

.auth-method {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
}

.auth-method.active {
  color: white;
  background: #101828;
}

.wechat-login,
.phone-submit {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #09b83e, #0aa697);
  cursor: pointer;
  font-weight: 950;
}

.wechat-login svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.auth-pane label {
  display: block;
  margin-bottom: 12px;
  color: #31536d;
  font-size: 0.88rem;
  font-weight: 900;
}

.auth-pane input {
  width: 100%;
  height: 46px;
  margin-top: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
}

.auth-pane input:focus {
  border-color: rgba(18, 184, 166, 0.56);
  box-shadow: 0 0 0 3px rgba(18, 184, 166, 0.12);
}

.code-row {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 8px;
}

.code-row button {
  align-self: end;
  height: 46px;
  margin-top: 7px;
  border: 1px solid rgba(18, 184, 166, 0.24);
  border-radius: var(--radius);
  color: #0f5f69;
  background: #ffffff;
  cursor: pointer;
  font-weight: 900;
}

.phone-submit {
  margin-top: 2px;
  background: linear-gradient(135deg, #0aa697, #247dff);
}

.mini-policy {
  margin: 12px 0 0;
  font-size: 0.78rem;
}

.poster-canvas {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
}

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

@media (max-width: 940px) {
  .app-shell {
    padding: 14px 14px 28px;
  }

  .topbar {
    gap: 10px;
  }

  .brand small {
    display: none;
  }

  .mode-tab {
    min-width: 74px;
  }

  .spin-screen {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "topics"
      "scope"
      "filters"
      "wheel"
      "actions"
      "result"
      "guide";
    gap: 14px;
    padding-top: 12px;
  }

  h1 {
    font-size: 2.35rem;
  }

  .result-panel {
    position: static;
  }

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

  .scope-strip {
    width: 100%;
  }

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

@media (max-width: 580px) {
  body {
    background:
      linear-gradient(155deg, rgba(255, 255, 255, 0.94), rgba(230, 244, 255, 0.9) 42%, rgba(246, 239, 255, 0.84)),
      #eef7ff;
  }

  .app-shell {
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .topbar {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .mode-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    width: min(240px, 100%);
  }

  .top-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .brand strong {
    font-size: 1.08rem;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .mode-tabs {
    justify-self: stretch;
  }

  .mode-tab {
    min-width: 0;
    flex: 1;
    height: 36px;
    padding: 0 8px;
    font-size: 0.88rem;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .login-pill {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.86rem;
  }

  .spin-copy {
    text-align: center;
  }

  h1 {
    font-size: 2rem;
  }

  .stats-row {
    justify-content: center;
  }

  .filter-strip {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

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

  .wheel-stage {
    padding: 16px;
  }

  .pointer {
    width: 42px;
    height: 64px;
    border: 1px solid rgba(255, 255, 255, 0.88);
  }

  .center-badge {
    width: 98px;
    height: 98px;
    border-width: 6px;
  }

  .center-badge span {
    font-size: 1.65rem;
  }

  .action-bar {
    grid-template-columns: 1fr 0.52fr;
  }

  .primary-action,
  .secondary-action,
  .text-action,
  .search-link {
    min-height: 46px;
  }

  .result-panel,
  .guide-panel,
  .world-panel {
    padding: 16px;
  }

  .result-panel h2 {
    font-size: 1.7rem;
  }

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

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

  .auth-modal {
    align-items: end;
    padding: 12px;
  }

  .auth-card {
    padding: 20px;
    border-radius: 14px 14px 10px 10px;
  }

  .auth-card h2 {
    font-size: 1.55rem;
  }
}

/* Small phones & safe-area polish */
@media (max-width: 480px) {
  .app-shell {
    padding: 10px 10px 24px;
  }

  h1 {
    font-size: 1.85rem;
  }

  .spin-copy {
    padding: 8px 0;
  }

  .stats-row {
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .stats-row span {
    font-size: 0.78rem;
  }

  .topic-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .topic-chip {
    height: 34px;
    font-size: 0.79rem;
    padding: 0 8px;
  }

  .filter-strip {
    gap: 5px;
  }

  .filter-chip {
    height: 30px;
    font-size: 0.76rem;
    padding: 0 8px;
  }

  .wheel-stage {
    max-width: min(360px, calc(100vw - 24px));
    margin: 0 auto;
  }

  .center-badge {
    width: 70px;
    height: 70px;
  }

  .center-badge span {
    font-size: 1.2rem;
  }

  .center-badge small {
    font-size: 0.55rem;
  }

  .action-bar {
    gap: 8px;
  }

  .primary-action,
  .secondary-action {
    min-height: 48px;
    font-size: 0.9rem;
    padding: 0 16px;
  }

  .result-panel {
    padding: 16px;
  }

  .result-panel h2 {
    font-size: 1.4rem;
  }

  .spot-grid {
    gap: 5px;
  }

  .spot-grid span {
    font-size: 0.76rem;
    padding: 4px 8px;
  }

  .persona-card {
    padding: 12px;
    font-size: 0.88rem;
  }

  .result-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .text-action {
    flex: 1;
    min-height: 40px;
    font-size: 0.82rem;
    justify-content: center;
  }

  .guide-panel {
    padding: 16px;
  }

  .section-heading h2 {
    font-size: 1.1rem;
  }

  .guide-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .guide-block h3 {
    font-size: 0.88rem;
  }

  .guide-block li {
    font-size: 0.84rem;
    padding: 6px 0;
  }

  .tag-cloud {
    gap: 4px;
  }

  .tag-cloud span {
    font-size: 0.74rem;
    padding: 3px 8px;
  }

  .search-link {
    font-size: 0.88rem;
    min-height: 44px;
  }

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

  .login-pill {
    min-height: 34px;
    font-size: 0.8rem;
    padding: 0 10px;
  }
}

/* Very small screens (iPhone SE etc) */
@media (max-width: 380px) {
  .app-shell {
    padding: 8px 8px 20px;
  }

  h1 {
    font-size: 1.55rem;
  }

  .wheel-stage {
    max-width: min(300px, calc(100vw - 20px));
  }

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

  .filter-strip {
    gap: 4px;
  }

  .filter-chip {
    height: 28px;
    font-size: 0.72rem;
    padding: 0 6px;
  }

  .result-panel {
    padding: 12px;
  }

  .result-panel h2 {
    font-size: 1.2rem;
  }

  .guide-panel {
    padding: 12px;
  }
}

/* Safe area and smooth scrolling for all pages */
html {
  scroll-behavior: smooth;
}

.pointer,
.center-badge,
.primary-action,
.secondary-action,
.topic-chip,
.scope-chip,
.filter-chip,
.text-action,
.login-pill,
.icon-btn,
.search-link {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Better touch targets for mobile */
@media (pointer: coarse) {
  .filter-chip,
  .topic-chip,
  .scope-chip {
    min-height: 36px;
  }

  .text-action {
    min-height: 44px;
  }

  .search-link {
    min-height: 48px;
  }
}

/* Guide card in result panel */
.guide-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.guide-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
  background: var(--line);
}

.guide-card .gc-summary {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-card .gc-steps {
  display: grid;
  gap: 6px;
  margin: 8px 0;
}

.guide-card .gc-step {
  display: flex;
  gap: 8px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.guide-card .gc-step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
}

.guide-card .gc-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal);
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s;
}

.guide-card .gc-link:hover {
  background: rgba(13, 148, 136, 0.06);
}

.guide-card .gc-details {
  margin-top: 8px;
}

.guide-card .gc-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.guide-card .gc-mini-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(248, 252, 255, 0.75);
}

.guide-card .gc-mini-title {
  margin: 0 0 6px;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--ink);
  font-weight: 900;
}

.guide-card .gc-mini-card ul {
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.guide-card .gc-mini-card li {
  margin-bottom: 4px;
}

.guide-card .gc-mini-card li:last-child { margin-bottom: 0; }

/* Guide badge on result panel */
.guide-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .guide-card { padding: 12px; }
  .guide-card .gc-step { font-size: 0.8rem; }
  .guide-card .gc-link { min-height: 44px; }
}

/* Guide card enhancements */
.guide-card {
  animation: cardSlideIn 0.35s ease-out;
}

@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.guide-card .gc-summary {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-card .gc-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  min-height: 44px;
  border: 1.5px solid var(--teal);
  border-radius: 999px;
  color: var(--teal);
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.18s;
}

.guide-card .gc-link:hover {
  background: var(--teal);
  color: #fff;
}

/* Guide panel status */
.guide-panel.has-guide .section-heading p {
  color: var(--teal);
}

.guide-panel.has-guide .section-heading p::after {
  content: "✓";
  display: inline-block;
  margin-left: 6px;
  font-weight: 900;
}

.guide-panel.no-guide .section-heading p {
  color: var(--muted);
}

.guide-panel .search-link {
  transition: all 0.18s;
}

.guide-panel .search-link:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

/* Better guide badge */
.guide-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  animation: badgePop 0.3s ease-out;
}

@keyframes badgePop {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* Guide panel loading state */
.guide-title-loading {
  position: relative;
  color: transparent !important;
}

.guide-title-loading::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 60%;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--line) 25%, #f1f5f9 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

/* Result panel enhanced */
.result-panel.has-guide {
  border-color: var(--teal);
  border-width: 1.5px;
}

/* Search bar */
.search-box {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 240px;
}

.search-input {
  width: 100%;
  min-height: 38px;
  padding: 0 14px 0 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.1);
}

.search-input::placeholder { color: var(--muted-light); }

.search-box::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M16 16l5 5'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 270px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  overflow-x: hidden;
}

.search-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: normal;
  border-top: 1px solid var(--line);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.12s;
}

.search-result-item:hover { background: var(--bg); }

.search-result-item strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.search-result-item span {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: auto;
}

/* Popular destinations */
.popular-section {
  margin-top: 32px;
  padding: 0 0 24px;
}

.popular-section .section-heading { margin-bottom: 14px; }

.popular-section .section-heading p {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0 0 4px;
}

.popular-section .section-heading h2 {
  margin: 0;
  font-size: 1.3rem;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.popular-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.popular-card:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 12px rgba(13,148,136,0.1);
  transform: translateY(-2px);
}

.popular-emoji { font-size: 1.8rem; }

.popular-card strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}

.popular-card span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Mobile search */
@media (max-width: 768px) {
  .search-box { max-width: 100%; }
  .top-actions .search-box { order: -1; flex-basis: 100%; }
  .popular-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .popular-grid { grid-template-columns: repeat(2, 1fr); }
  .popular-card { padding: 14px 10px; }
  .popular-emoji { font-size: 1.4rem; }
}
