@import url("./pages.css");
@import url("./challenge.css");

/* =========================================================================
   星语打字乐园 · 基础样式
   ========================================================================= */

:root {
  --font-body: "Nunito", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --font-display: "Trebuchet MS", "Nunito", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --ink: #33264a;
  --ink-soft: #6c5b83;
  --ink-faint: #9b8bab;
  --night: #171129;
  --night-2: #231b44;
  --night-3: #30245c;
  --cream: #fff8ec;
  --cream-2: #fff1d9;
  --paper: #fffaf1;
  --paper-2: #fffdf6;
  --coral: #ff7e9d;
  --coral-deep: #e05c80;
  --gold: #ffcf6a;
  --gold-soft: #ffeab3;
  --mint: #7ee0bf;
  --mint-deep: #2b9c7d;
  --lav: #a99bf0;
  --skyblue: #8fc8ff;
  --line: #3a2b51;
  --line-soft: rgba(51, 38, 74, 0.16);

  --shadow-pop: 0 6px 0 rgba(24, 16, 43, 0.32);
  --shadow-pop-sm: 0 4px 0 rgba(24, 16, 43, 0.24);
  --shadow-soft: 0 24px 70px rgba(10, 7, 25, 0.42);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--cream);
  background: var(--night);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.tour-open,
body.is-challenging {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(255, 207, 106, 0.4);
  color: #fff;
}

:focus-visible {
  outline: 3px solid rgba(255, 207, 106, 0.85);
  outline-offset: 3px;
}

.app-root {
  position: relative;
  min-height: 100vh;
  z-index: 1;
}

/* 环境星空（index.html 中常驻） */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(900px 620px at 78% -6%, rgba(169, 155, 240, 0.22), transparent 62%),
    radial-gradient(760px 520px at 8% 12%, rgba(255, 126, 157, 0.1), transparent 60%),
    linear-gradient(170deg, #171129 0%, #211a3d 48%, #1b1533 100%);
}

.ambient-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, rgba(255, 246, 214, 0.7), transparent 55%),
    radial-gradient(1.2px 1.2px at 28% 62%, rgba(255, 246, 214, 0.5), transparent 55%),
    radial-gradient(1.8px 1.8px at 46% 26%, rgba(255, 246, 214, 0.6), transparent 55%),
    radial-gradient(1.2px 1.2px at 64% 74%, rgba(255, 246, 214, 0.45), transparent 55%),
    radial-gradient(1.5px 1.5px at 82% 34%, rgba(255, 246, 214, 0.7), transparent 55%),
    radial-gradient(1.2px 1.2px at 92% 82%, rgba(255, 246, 214, 0.4), transparent 55%),
    radial-gradient(1.4px 1.4px at 38% 88%, rgba(255, 246, 214, 0.45), transparent 55%);
  background-size: 480px 420px;
  opacity: 0.9;
}

.ambient-star {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff3c9;
  box-shadow: 0 0 12px rgba(255, 243, 201, 0.9);
  animation: twinkle 4s ease-in-out infinite;
}

.ambient-star.s1 { top: 14%; left: 8%; animation-delay: 0.2s; }
.ambient-star.s2 { top: 26%; left: 86%; width: 3px; height: 3px; animation-delay: 1.1s; }
.ambient-star.s3 { top: 58%; left: 4%; width: 4px; height: 4px; animation-delay: 2.2s; }
.ambient-star.s4 { top: 72%; left: 92%; animation-delay: 0.7s; }
.ambient-star.s5 { top: 44%; left: 48%; width: 3px; height: 3px; animation-delay: 1.6s; }
.ambient-star.s6 { top: 88%; left: 34%; width: 4px; height: 4px; animation-delay: 2.8s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* -------------------------------------------------------------------------
   屏幕外壳
   ------------------------------------------------------------------------- */

.screen {
  position: relative;
  min-height: 100vh;
  padding-bottom: 70px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(1100px 640px at 74% -8%, rgba(169, 155, 240, 0.25), transparent 62%),
    radial-gradient(720px 520px at 4% 18%, rgba(255, 126, 157, 0.1), transparent 60%),
    linear-gradient(165deg, #191231 0%, #251c48 46%, #2b2152 74%, #1c1637 100%);
}

.screen > .hud,
.screen > .page-shell,
.screen > main {
  position: relative;
  z-index: 2;
}

.page-shell {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 26px 28px 20px;
}

#app.page-enter > .screen,
#app.page-enter > .landing {
  animation: page-in 0.45s cubic-bezier(0.22, 0.7, 0.24, 1) both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------------------
   启动屏 / 崩溃屏
   ------------------------------------------------------------------------- */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    radial-gradient(800px 500px at 50% 30%, rgba(169, 155, 240, 0.32), transparent 65%),
    linear-gradient(165deg, #171129, #251c48 60%, #1c1637);
}

.boot-orbit {
  position: relative;
  width: 150px;
  height: 150px;
  margin-bottom: 10px;
  border: 1px dashed rgba(255, 248, 236, 0.25);
  border-radius: 50%;
  animation: spin-slow 9s linear infinite;
}

.boot-planet {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  font-size: 36px;
  color: var(--ink);
  background: radial-gradient(circle at 32% 26%, #fff8d8, #ffd376 55%, #ff9fbd);
  border: 2px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 0 46px rgba(255, 207, 106, 0.5);
  animation: breathe 2.6s ease-in-out infinite;
}

.boot-satellite {
  position: absolute;
  left: 50%;
  top: -7px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  background: var(--mint);
  border: 2px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(126, 224, 191, 0.9);
}

.boot-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--cream);
}

.boot-sub {
  font-size: 13px;
  color: rgba(255, 248, 236, 0.55);
  letter-spacing: 0.08em;
}

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

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.fatal-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(700px 500px at 50% 20%, rgba(169, 155, 240, 0.24), transparent 65%),
    linear-gradient(165deg, #171129, #251c48);
}

.fatal-card {
  width: min(100%, 520px);
  padding: 34px;
  text-align: center;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.fatal-orb {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 16px;
  font-size: 36px;
  background: radial-gradient(circle at 32% 26%, #fff6d2, #ffd376, #ff9fbd);
  border: 2px solid var(--line);
  border-radius: 50%;
}

.fatal-card h1 {
  margin: 6px 0 10px;
  font-family: var(--font-display);
  font-size: 28px;
}

.fatal-card p {
  color: var(--ink-soft);
  font-size: 14px;
}

.fatal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.fatal-foot {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-faint);
}

/* -------------------------------------------------------------------------
   通用排版组件
   ------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow i {
  font-style: normal;
  color: var(--coral);
}

.eyebrow-light {
  color: var(--gold-soft);
}

.panel .eyebrow,
.modal-panel .eyebrow {
  color: var(--coral-deep);
}

.aside-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral-deep);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: var(--cream);
  white-space: nowrap;
}

.panel .chip,
.modal-panel .chip {
  background: #f6ead4;
  border-color: rgba(51, 38, 74, 0.18);
  color: var(--ink);
}

.chip-soft {
  background: rgba(255, 255, 255, 0.08);
}

.chip-sky {
  background: rgba(143, 200, 255, 0.2);
  border-color: rgba(143, 200, 255, 0.45);
  color: #cfe8ff;
}

.panel .chip-sky {
  background: #e4f2ff;
  border-color: #a9ccec;
  color: #2d5679;
}

.chip-level {
  letter-spacing: 0.04em;
}

.chip-beginner { color: #d9f7c9; border-color: rgba(126, 224, 191, 0.5); background: rgba(126, 224, 191, 0.16); }
.chip-intermediate { color: #ffe3a6; border-color: rgba(255, 207, 106, 0.5); background: rgba(255, 207, 106, 0.14); }
.chip-expert { color: #ffd3e1; border-color: rgba(255, 126, 157, 0.5); background: rgba(255, 126, 157, 0.16); }

.panel .chip-beginner { color: #237c61; background: #e0f7ee; border-color: #a9e3cf; }
.panel .chip-intermediate { color: #9a6a16; background: #fff1cf; border-color: #efd39a; }
.panel .chip-expert { color: #a23455; background: #ffe3ec; border-color: #f3b7c9; }

/* 按钮 */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  box-shadow: var(--shadow-pop-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(24, 16, 43, 0.28);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(24, 16, 43, 0.28);
}

.btn:disabled {
  opacity: 0.55;
  transform: none;
  box-shadow: 0 3px 0 rgba(24, 16, 43, 0.18);
}

.btn-primary {
  background: linear-gradient(135deg, #ffe28d 0%, #ffd47a 45%, #ff9fbd 100%);
  color: #3b2440;
}

.btn-soft {
  background: rgba(255, 248, 236, 0.12);
  color: var(--cream);
  border-color: rgba(255, 248, 236, 0.3);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
}

.panel .btn-soft,
.modal-panel .btn-soft,
.bg-light .btn-soft,
.result-card .btn-soft,
.arcade-result-card .btn-soft {
  background: var(--cream-2);
  color: var(--ink);
  border-color: rgba(51, 38, 74, 0.25);
  box-shadow: var(--shadow-pop-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(255, 248, 236, 0.32);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(255, 248, 236, 0.08);
}

.panel .btn-ghost,
.modal-panel .btn-ghost,
.bg-light .btn-ghost,
.result-card .btn-ghost,
.arcade-result-card .btn-ghost {
  color: var(--ink-soft);
  border-color: rgba(51, 38, 74, 0.24);
}

.panel .btn-ghost:hover,
.modal-panel .btn-ghost:hover,
.result-card .btn-ghost:hover,
.arcade-result-card .btn-ghost:hover {
  background: rgba(51, 38, 74, 0.06);
}

.btn-danger {
  background: #ff8fa2;
  color: #401023;
  border-color: #6d2236;
}

.btn-small {
  padding: 7px 14px;
  font-size: 12px;
  border-width: 1.6px;
  box-shadow: 0 3px 0 rgba(24, 16, 43, 0.22);
}

.btn-lg {
  padding: 15px 30px;
  font-size: 16px;
}

.btn-spark {
  font-size: 15px;
  color: #a34a66;
  animation: twinkle 2.4s ease-in-out infinite;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  border-bottom: 1px dashed transparent;
}

.text-btn:hover {
  color: var(--coral-deep);
  border-bottom-color: currentColor;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
}

.text-link:hover {
  color: #ffe9a8;
}

.panel .text-link,
.modal-panel .text-link {
  color: var(--coral-deep);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transition: background 0.15s ease, transform 0.15s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

/* 表单 */
.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.text-input,
.text-area {
  width: 100%;
  padding: 11px 14px;
  color: var(--ink);
  background: var(--paper-2);
  border: 2px solid rgba(51, 38, 74, 0.22);
  border-radius: var(--radius-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.text-input::placeholder,
.text-area::placeholder {
  color: #b3a5bf;
}

.text-input:focus,
.text-area:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 126, 157, 0.16);
}

.text-area {
  min-height: 110px;
  line-height: 1.75;
  resize: vertical;
}

.field-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-faint);
}

/* 面板 / 页面标题 / 空状态 */
.panel {
  position: relative;
  padding: 24px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 0 rgba(16, 10, 32, 0.26), 0 22px 50px rgba(10, 7, 25, 0.18);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.panel-head h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}

.panel-copy {
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.page-heading {
  position: relative;
  margin-bottom: 10px;
  padding-top: 4px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 248, 236, 0.56);
}

.back-link:hover {
  color: var(--cream);
}

.page-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.page-heading h1 {
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--cream);
}

.page-heading p {
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255, 248, 236, 0.62);
}

.heading-action {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 4px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-soft);
  border: 2px dashed rgba(51, 38, 74, 0.2);
  border-radius: var(--radius-md);
}

.empty-state > span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  font-size: 26px;
  background: var(--cream-2);
  border: 2px solid rgba(51, 38, 74, 0.15);
  border-radius: 50%;
}

.empty-state h3 {
  font-size: 17px;
  color: var(--ink);
}

.empty-state p {
  max-width: 36ch;
  font-size: 13px;
}

/* -------------------------------------------------------------------------
   HUD
   ------------------------------------------------------------------------- */

.hud {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 9px 26px;
  background: rgba(19, 14, 36, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hud-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 17px;
  color: #3b2440;
  background: radial-gradient(circle at 32% 26%, #fff6d2, #ffd376 58%, #ff9fbd);
  border: 2px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(255, 207, 106, 0.35);
}

.brand-text {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cream);
}

.brand-text strong {
  font-weight: 900;
  color: var(--gold);
}

.hud-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.hud-nav::-webkit-scrollbar {
  display: none;
}

.hud-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 248, 236, 0.6);
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.hud-nav-link span {
  font-size: 14px;
  filter: saturate(0.9);
}

.hud-nav-link b {
  font-weight: 700;
}

.hud-nav-link:hover {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.06);
}

.hud-nav-link.is-active {
  color: var(--ink);
  background: var(--gold-soft);
  box-shadow: 0 2px 0 rgba(24, 16, 43, 0.28);
}

.hud-player {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  font-size: 12px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: transform 0.18s ease;
}

.hud-pill b {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pill-star {
  color: var(--gold);
}

.hud-keys span {
  font-size: 13px;
}

.hud-points.pulse {
  animation: pill-pulse 0.6s ease;
}

@keyframes pill-pulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); background: rgba(255, 207, 106, 0.25); }
  100% { transform: scale(1); }
}

.hud-avatar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hud-avatar:hover {
  background: rgba(255, 255, 255, 0.12);
}

.mini-avatar {
  display: block;
  width: 36px;
  height: 36px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #ffe9cf, #c9b6f4);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
}

.mini-avatar svg {
  width: 100%;
  height: 100%;
}

.hud-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.hud-name b {
  max-width: 90px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-name em {
  font-size: 10px;
  font-style: normal;
  color: rgba(255, 248, 236, 0.55);
}

.member-badge {
  position: absolute;
  top: -7px;
  right: 4px;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 900;
  color: #3b2440;
  background: var(--gold);
  border: 1.5px solid var(--line);
  border-radius: 999px;
}

.member-badge.svip {
  background: linear-gradient(120deg, #ffe7a6, #ffcf5c);
}

.help-btn {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
}

/* -------------------------------------------------------------------------
   落地页
   ------------------------------------------------------------------------- */

.landing {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(940px 640px at 12% 6%, rgba(255, 176, 142, 0.15), transparent 62%),
    radial-gradient(1000px 760px at 86% 12%, rgba(150, 128, 255, 0.34), transparent 66%),
    linear-gradient(166deg, #1a1332 0%, #2a214f 40%, #4a386b 70%, #6f4a60 100%);
}

.landing-sky-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.sky-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(14px);
  opacity: 0.5;
}

.sky-blob.b1 {
  width: 460px;
  height: 460px;
  left: -160px;
  top: 30%;
  background: radial-gradient(circle, rgba(255, 150, 175, 0.34), transparent 68%);
}

.sky-blob.b2 {
  width: 560px;
  height: 560px;
  right: -180px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(130, 118, 230, 0.35), transparent 68%);
}

.shooting-star {
  position: absolute;
  width: 150px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255, 246, 214, 0.9));
  transform: rotate(-32deg);
  opacity: 0;
  animation: shoot 7s ease-in infinite;
}

.shooting-star.ss1 { top: 16%; left: 68%; animation-delay: 1.2s; }
.shooting-star.ss2 { top: 42%; left: 14%; animation-delay: 4.4s; width: 110px; }

@keyframes shoot {
  0% { opacity: 0; transform: translate(0, 0) rotate(-32deg); }
  8% { opacity: 1; }
  26% { opacity: 0; transform: translate(-220px, 140px) rotate(-32deg); }
  100% { opacity: 0; }
}

.landing-cloud {
  position: absolute;
  width: 260px;
  height: 62px;
  background: radial-gradient(ellipse at 50% 50%, rgba(213, 199, 255, 0.2), transparent 70%);
  filter: blur(6px);
  border-radius: 50%;
}

.landing-cloud.lc1 { top: 26%; left: 4%; }
.landing-cloud.lc2 { top: 58%; right: 6%; width: 330px; }
.landing-cloud.lc3 { top: 8%; right: 26%; width: 200px; opacity: 0.6; }

.landing-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 22px 28px 12px;
}

.landing-brand {
  color: var(--cream);
}

.landing-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-link {
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 248, 236, 0.68);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.mini-link:hover {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.12);
}

.landing-main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 22px;
  align-items: start;
  align-content: center;
  flex: 1;
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 8px 28px 30px;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 24px;
  min-height: 566px;
  padding: 46px 40px 36px;
  overflow: hidden;
  background:
    radial-gradient(560px 300px at 72% 24%, rgba(255, 214, 154, 0.14), transparent 68%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-xl);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 30px 80px rgba(10, 7, 25, 0.42);
}

.hero-panel::before {
  content: "";
  position: absolute;
  right: -140px;
  top: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 198, 120, 0.2), transparent 68%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy h1 {
  margin: 14px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(36px, 3.75vw, 54px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--cream);
  text-shadow: 0 4px 24px rgba(10, 7, 25, 0.25);
}

.hero-highlight {
  display: inline-block;
  background: linear-gradient(102deg, #ffe28f 0%, #ffa6c1 52%, #c8b8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-dot {
  color: var(--coral);
}

.hero-lede {
  max-width: 36em;
  font-size: 15.5px;
  line-height: 1.85;
  color: rgba(255, 248, 236, 0.72);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin: 26px 0 18px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hero-tags span {
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 248, 236, 0.62);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
}

.hero-visual {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.hero-scene {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(10, 7, 25, 0.4);
}

.hero-scene-svg {
  width: 100%;
  height: auto;
}

.hero-avatar {
  position: absolute;
  left: 2%;
  bottom: -4%;
  width: 37%;
  filter: drop-shadow(0 12px 24px rgba(17, 11, 32, 0.4));
  animation: hero-avatar-float 6s ease-in-out infinite;
}

.hero-avatar .avatar-svg {
  width: 100%;
  height: auto;
}

@keyframes hero-avatar-float {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50% { transform: translateY(-9px) rotate(0.8deg); }
}

.hero-float-letter {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 900;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 0 rgba(24, 16, 43, 0.3);
  animation: float-soft 5s ease-in-out infinite;
}

.hero-float-letter.fl-a { top: 14%; left: 48%; transform: rotate(-8deg); }
.hero-float-letter.fl-k { top: 33%; right: 5%; transform: rotate(9deg); animation-delay: 0.9s; }
.hero-float-letter.fl-star {
  top: 6%;
  right: 27%;
  width: auto;
  height: auto;
  font-size: 26px;
  color: var(--gold);
  background: none;
  border: 0;
  box-shadow: none;
  animation-delay: 1.6s;
}

@keyframes float-soft {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

.hero-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 11px;
  color: rgba(255, 248, 236, 0.55);
}

.caption-dot {
  width: 7px;
  height: 7px;
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(126, 224, 191, 0.8);
}

.caption-line {
  width: 22px;
  height: 1px;
  background: rgba(255, 255, 255, 0.24);
}

/* 落地页右侧 */
.landing-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.profile-card {
  padding: 20px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 0 rgba(16, 10, 32, 0.28), 0 24px 54px rgba(10, 7, 25, 0.28);
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #ffe9cf, #cbb9f6);
  border: 2px solid var(--line);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.profile-avatar svg {
  width: 100%;
  height: 100%;
}

.profile-meta {
  min-width: 0;
}

.profile-meta .eyebrow {
  color: var(--coral-deep);
}

.profile-meta h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 3px 0 4px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 900;
}

.profile-meta p {
  font-size: 12px;
  color: var(--ink-soft);
}

.name-edit {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--cream-2);
  border: 1.5px solid rgba(51, 38, 74, 0.2);
  border-radius: 50%;
}

.name-edit:hover {
  color: var(--coral-deep);
  border-color: var(--coral);
}

.xp-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 15px 0 13px;
  font-size: 10.5px;
  color: var(--ink-faint);
}

.xp-track {
  height: 10px;
  overflow: hidden;
  background: #f0e3cb;
  border: 1.8px solid rgba(51, 38, 74, 0.25);
  border-radius: 999px;
}

.xp-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffcf6a, #ff9fbd 70%, #b7a4ff);
  border-radius: inherit;
  transition: width 0.5s ease;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed rgba(51, 38, 74, 0.16);
}

.profile-stats > div {
  text-align: center;
}

.profile-stats span {
  display: block;
  font-size: 10px;
  color: var(--ink-faint);
}

.profile-stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
}

.membership-zone {
  padding: 16px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.section-minihead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 248, 236, 0.78);
}

.mini-note {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 248, 236, 0.4);
}

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

.tier-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.tier-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.tier-card.vip.is-active {
  border-color: rgba(255, 159, 189, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 159, 189, 0.18), 0 0 26px rgba(255, 159, 189, 0.2);
}

.tier-card.svip.is-active {
  border-color: rgba(255, 207, 106, 0.72);
  box-shadow: 0 0 0 2px rgba(255, 207, 106, 0.16), 0 0 26px rgba(255, 207, 106, 0.2);
}

.tier-head {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.tier-crown {
  font-size: 17px;
  line-height: 1;
  color: var(--gold);
}

.tier-kicker {
  display: block;
  font-size: 9px;
  letter-spacing: 0.09em;
  color: rgba(255, 248, 236, 0.45);
}

.tier-head h3 {
  font-size: 13px;
  font-weight: 900;
  color: var(--cream);
}

.tier-check {
  margin-left: auto;
  padding: 1px 6px;
  font-size: 8.5px;
  font-weight: 800;
  color: #3b2440;
  background: var(--gold);
  border-radius: 999px;
}

.tier-perks {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10.5px;
  line-height: 1.5;
  color: rgba(255, 248, 236, 0.6);
}

.tier-perks li {
  position: relative;
  padding-left: 10px;
}

.tier-perks li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 7px;
  color: var(--gold);
}

.tier-btn {
  margin-top: auto;
  padding: 7px 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  transition: background 0.15s ease;
}

.tier-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.tier-note {
  font-size: 8.5px;
  text-align: center;
  color: rgba(255, 248, 236, 0.35);
}

.side-manifesto {
  position: relative;
  padding: 18px 20px;
  color: var(--ink);
  background: linear-gradient(150deg, #fff2d3, #ffe9e3 70%, #f1e7ff);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 7px 0 rgba(16, 10, 32, 0.22);
  transform: rotate(-0.4deg);
}

.manifesto-mark {
  position: absolute;
  top: -14px;
  left: 16px;
  font-family: Georgia, serif;
  font-size: 44px;
  line-height: 1;
  color: rgba(224, 92, 128, 0.4);
}

.side-manifesto p {
  font-size: 12.5px;
  line-height: 1.8;
}

.side-manifesto-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}

.landing-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 18px 28px 26px;
  font-size: 11px;
  color: rgba(255, 248, 236, 0.36);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* -------------------------------------------------------------------------
   星岛地图
   ------------------------------------------------------------------------- */

.park-screen {
  background:
    radial-gradient(980px 600px at 18% 4%, rgba(255, 156, 160, 0.16), transparent 62%),
    radial-gradient(900px 620px at 86% 18%, rgba(140, 122, 230, 0.3), transparent 64%),
    linear-gradient(168deg, #191231 0%, #2a204c 44%, #3b2a5c 76%, #241a44 100%);
}

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

.park-sky-glow {
  position: absolute;
  width: 700px;
  height: 500px;
  left: -160px;
  top: -100px;
  background: radial-gradient(circle, rgba(255, 170, 160, 0.2), transparent 66%);
  filter: blur(10px);
}

.pk-star {
  position: absolute;
  font-size: 10px;
  color: #fff0bd;
  opacity: 0.7;
  animation: twinkle 5s ease-in-out infinite;
}

.pk-star.p1 { top: 12%; left: 6%; }
.pk-star.p2 { top: 20%; left: 84%; font-size: 14px; animation-delay: 1s; }
.pk-star.p3 { top: 48%; left: 92%; animation-delay: 2.2s; }
.pk-star.p4 { top: 64%; left: 3%; font-size: 15px; animation-delay: 0.6s; }
.pk-star.p5 { top: 34%; left: 48%; font-size: 8px; animation-delay: 3.1s; }

.pk-cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(7px);
  background: radial-gradient(ellipse, rgba(213, 199, 255, 0.18), transparent 70%);
}

.pk-cloud.pk1 { width: 340px; height: 80px; top: 24%; left: -60px; }
.pk-cloud.pk2 { width: 420px; height: 100px; top: 48%; right: -100px; }
.pk-cloud.pk3 { width: 260px; height: 70px; top: 8%; right: 22%; opacity: 0.6; }

.pk-island {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 20%, rgba(126, 224, 191, 0.16), rgba(75, 56, 110, 0.5) 62%, transparent 70%);
  filter: blur(2px);
}

.pk-island.pi1 { width: 260px; height: 90px; bottom: 12%; left: -60px; transform: rotate(-6deg); }
.pk-island.pi2 { width: 300px; height: 110px; bottom: 6%; right: -70px; transform: rotate(5deg); }

.park-balloon {
  position: absolute;
  right: 4.5%;
  top: 150px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 86px;
  padding: 0;
  animation: balloon-float 7s ease-in-out infinite;
}

.balloon-body {
  display: grid;
  place-items: center;
  width: 74px;
  height: 88px;
  font-size: 22px;
  color: #6a2e44;
  background: radial-gradient(circle at 34% 28%, #ffe1a7 0%, #ff9ab5 46%, #e86b8c 100%);
  border: 2px solid var(--line);
  border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
  box-shadow: inset -8px -10px 0 rgba(160, 60, 90, 0.16), 0 8px 22px rgba(10, 7, 25, 0.3);
}

.balloon-basket {
  display: block;
  width: 28px;
  height: 20px;
  margin-top: -3px;
  background: repeating-linear-gradient(90deg, #a97a5a 0 4px, #8c6249 4px 8px);
  border: 2px solid var(--line);
  border-radius: 3px 3px 6px 6px;
}

.balloon-label {
  padding: 1px 7px;
  font-size: 9px;
  font-weight: 800;
  color: var(--cream);
  background: rgba(20, 14, 38, 0.6);
  border-radius: 999px;
}

@keyframes balloon-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1.5deg); }
}

.park-main {
  position: relative;
  z-index: 2;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 26px 28px 50px;
}

.park-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
  margin: 6px 0 26px;
}

.park-welcome {
  padding: 10px 4px 0;
}

.park-welcome h1 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 900;
  line-height: 1.08;
  color: var(--cream);
}

.park-welcome h1 span {
  background: linear-gradient(100deg, #ffe28f, #ffa6c1 60%, #c8b8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.park-welcome > p {
  max-width: 54ch;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 248, 236, 0.64);
}

.park-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.park-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 248, 236, 0.78);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
}

.park-chip-btn {
  color: #3b2440;
  background: var(--gold-soft);
  border-color: rgba(51, 38, 74, 0.4);
}

.park-chip-btn:hover {
  background: var(--gold);
}

.quest-card {
  padding: 16px 18px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 7px 0 rgba(16, 10, 32, 0.28), 0 20px 44px rgba(10, 7, 25, 0.2);
}

.quest-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.quest-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
}

.quest-count {
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 900;
  color: #6a4310;
  background: var(--gold-soft);
  border: 1.5px solid rgba(51, 38, 74, 0.22);
  border-radius: 999px;
}

.quest-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quest-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  background: var(--paper-2);
  border: 1.5px solid rgba(51, 38, 74, 0.1);
  border-radius: 12px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.quest-row:hover {
  background: #fff8e9;
  transform: translateX(2px);
}

.quest-row.is-done {
  background: #f2fbf5;
}

.quest-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  font-size: 14px;
  background: var(--cream-2);
  border: 1.5px solid rgba(51, 38, 74, 0.14);
  border-radius: 50%;
}

.quest-row.is-done .quest-icon {
  color: #237c61;
  background: #ddf7ec;
}

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

.quest-copy b {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

.quest-copy small {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  color: var(--ink-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quest-arrow {
  margin-left: auto;
  font-size: 14px;
  color: var(--coral-deep);
}

.quest-progress {
  height: 7px;
  margin-top: 11px;
  overflow: hidden;
  background: #efe2c9;
  border-radius: 999px;
}

.quest-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--gold), var(--coral));
  border-radius: inherit;
  transition: width 0.5s ease;
}

.park-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 18px;
}

.place-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 0 rgba(16, 10, 32, 0.3), 0 18px 40px rgba(10, 7, 25, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.place-card:hover {
  transform: translateY(-5px) rotate(-0.35deg);
  box-shadow: 0 13px 0 rgba(16, 10, 32, 0.24), 0 26px 50px rgba(10, 7, 25, 0.24);
}

.place-card.is-tour-target {
  z-index: 5;
  outline: 3px solid var(--gold);
  outline-offset: 4px;
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 0 0 10px rgba(255, 207, 106, 0.12), 0 16px 0 rgba(16, 10, 32, 0.24);
}

.place-number {
  position: absolute;
  top: 12px;
  left: 15px;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: rgba(51, 38, 74, 0.38);
}

.place-ribbon {
  position: absolute;
  top: 11px;
  right: 12px;
  z-index: 2;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 800;
  color: #fff8ec;
  background: var(--coral-deep);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  transform: rotate(2deg);
}

.place-ribbon.ribbon-open {
  color: #1e5c49;
  background: var(--mint);
}

.place-art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 174px;
  padding: 10px 12px 0;
  overflow: hidden;
}

.place-svg {
  width: 100%;
  height: 100%;
}

.place-tower .place-art {
  background: radial-gradient(circle at 50% 30%, #ffe6c9 0%, #ffd7e2 45%, #d9cff8 100%);
}

.place-study .place-art {
  background: radial-gradient(circle at 50% 26%, #e9fff3 0%, #d7f2e5 50%, #fdf0ce 100%);
}

.place-arcade .place-art {
  background: radial-gradient(circle at 50% 26%, #4a3a7a 0%, #3a2d63 55%, #2a2049 100%);
}

.place-sky .place-art {
  background: radial-gradient(circle at 50% 26%, #e9e4ff 0%, #d5e9ff 55%, #f6e5ff 100%);
}

.place-wardrobe .place-art {
  background: radial-gradient(circle at 50% 26%, #fff0dd 0%, #ffe0ea 52%, #e5d9ff 100%);
}

.place-pasture .place-art {
  background: radial-gradient(circle at 50% 26%, #f2ffe4 0%, #d8f5d5 52%, #fdf2cc 100%);
}

.place-boxes .place-art {
  background: radial-gradient(circle at 50% 26%, #fff5d6 0%, #ffe1e8 52%, #e7ddff 100%);
}

.place-body {
  flex: 1;
  padding: 14px 18px 10px;
}

.place-kicker {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--coral-deep);
}

.place-body h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.2;
}

.place-body h2 span {
  font-size: 17px;
  color: var(--coral-deep);
}

.place-body p {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.place-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 18px;
  padding: 9px 0 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-faint);
  border-top: 1px dashed rgba(51, 38, 74, 0.16);
}

.place-foot i {
  font-style: normal;
  color: var(--gold);
}

.free-box-note {
  color: var(--coral-deep);
}

.place-sky.is-locked {
  cursor: pointer;
}

.place-sky.is-locked .place-art {
  filter: saturate(0.72);
}

.place-sky.is-unlocked {
  box-shadow: 0 8px 0 rgba(16, 10, 32, 0.3), 0 0 0 2px rgba(126, 224, 191, 0.28), 0 0 34px rgba(126, 224, 191, 0.18);
}

.park-lower {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  margin-top: 26px;
}

.door-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 17px 20px;
  text-align: left;
  color: var(--cream);
  background:
    radial-gradient(420px 200px at 10% 30%, rgba(126, 224, 191, 0.16), transparent 70%),
    linear-gradient(120deg, #3a2b63, #55386f);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: 0 7px 0 rgba(10, 7, 25, 0.28);
  transition: transform 0.16s ease;
}

.door-banner:hover {
  transform: translateY(-3px);
}

.door-banner-art {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.door-banner-art i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 18px;
  font-style: normal;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.door-banner-copy {
  min-width: 0;
}

.door-banner-copy b {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.door-banner-copy small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255, 248, 236, 0.56);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.door-banner-cta {
  margin-left: auto;
  padding: 7px 13px;
  font-size: 11px;
  font-weight: 800;
  color: #3b2440;
  white-space: nowrap;
  background: var(--gold-soft);
  border-radius: 999px;
}

.park-fairy {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px 17px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255, 248, 236, 0.75);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
}

.fairy-face {
  flex-shrink: 0;
  font-size: 30px;
  line-height: 1;
}

.park-fairy b {
  color: var(--gold);
}

/* 巡游 */
.tour-layer {
  position: fixed;
  inset: 0;
  z-index: 130;
}

.tour-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 7, 25, 0.78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.tour-flyer {
  position: fixed;
  left: var(--fly-x, 50%);
  top: var(--fly-y, 42%);
  z-index: 3;
  width: 170px;
  margin: -90px 0 0 -85px;
  pointer-events: none;
  transition: left 0.75s cubic-bezier(0.3, 0.8, 0.3, 1), top 0.75s cubic-bezier(0.3, 0.8, 0.3, 1);
  filter: drop-shadow(0 22px 30px rgba(8, 5, 20, 0.55));
}

.tour-avatar {
  position: relative;
  z-index: 2;
  display: block;
  width: 132px;
  margin: 0 auto;
  animation: hero-avatar-float 4s ease-in-out infinite;
}

.tour-avatar svg {
  width: 100%;
}

.tour-wings {
  position: absolute;
  left: 50%;
  top: 34px;
  width: 210px;
  height: 96px;
  margin-left: -105px;
  background:
    radial-gradient(ellipse at 18% 50%, rgba(255, 223, 158, 0.75), transparent 62%),
    radial-gradient(ellipse at 82% 50%, rgba(255, 223, 158, 0.75), transparent 62%);
  filter: blur(4px);
  animation: wing-flap 1.2s ease-in-out infinite;
}

@keyframes wing-flap {
  0%, 100% { transform: scaleY(1) rotate(-2deg); opacity: 0.8; }
  50% { transform: scaleY(0.7) rotate(2deg); opacity: 1; }
}

.tour-trail {
  position: absolute;
  font-size: 15px;
  color: var(--gold);
  opacity: 0;
  animation: trail 1.8s ease-in infinite;
}

.tour-trail.t1 { left: 14px; top: 78px; animation-delay: 0.1s; }
.tour-trail.t2 { right: 6px; top: 120px; animation-delay: 0.65s; font-size: 11px; }
.tour-trail.t3 { left: 42px; top: 158px; animation-delay: 1.1s; font-size: 9px; }

@keyframes trail {
  0% { opacity: 0; transform: translateY(10px) scale(0.6); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(44px) scale(1.15); }
}

.tour-card {
  position: fixed;
  right: 42px;
  bottom: 38px;
  z-index: 4;
  width: min(420px, calc(100% - 36px));
  padding: 24px 26px 18px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 0 rgba(8, 5, 20, 0.3), 0 30px 70px rgba(8, 5, 20, 0.5);
  animation: tour-card-in 0.42s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

@keyframes tour-card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tour-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.tour-dots {
  display: flex;
  gap: 4px;
}

.tour-dots i {
  width: 7px;
  height: 7px;
  background: #e5d8c2;
  border-radius: 50%;
  transition: background 0.2s ease, width 0.2s ease;
}

.tour-dots i.on {
  width: 17px;
  background: var(--coral);
  border-radius: 999px;
}

.tour-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  font-size: 24px;
  background: var(--cream-2);
  border: 2px solid rgba(51, 38, 74, 0.16);
  border-radius: 14px;
}

.tour-card h2 {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
}

.tour-card > p {
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.tour-hint {
  margin-top: 9px;
  font-size: 10px;
  text-align: center;
  color: var(--ink-faint);
}

.tour-layer.is-leaving {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.park-screen.is-touring .place-card:not(.is-tour-target) {
  filter: brightness(0.62) saturate(0.7);
  transform: scale(0.985);
}

/* -------------------------------------------------------------------------
   模态框
   ------------------------------------------------------------------------- */

.modal-root {
  position: relative;
  z-index: 200;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(10, 7, 25, 0.72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-backdrop.show {
  opacity: 1;
}

.modal-backdrop.closing {
  opacity: 0;
}

.modal-panel {
  position: relative;
  width: min(100%, 580px);
  max-height: 88vh;
  padding: 24px 26px 20px;
  overflow-y: auto;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 0 rgba(8, 5, 20, 0.3), 0 40px 90px rgba(8, 5, 20, 0.55);
  transform: translateY(16px) scale(0.96);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.modal-backdrop.show .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.modal-head h2 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.2;
}

.modal-icon {
  margin-right: 6px;
}

.modal-kicker {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral-deep);
}

.modal-x {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-soft);
  background: var(--cream-2);
  border: 1.5px solid rgba(51, 38, 74, 0.18);
  border-radius: 50%;
}

.modal-x:hover {
  color: var(--ink);
  background: #ffe6ba;
}

.modal-body {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.modal-body h3 {
  color: var(--ink);
}

.modal-copy {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed rgba(51, 38, 74, 0.16);
}

.modal-actions .btn {
  font-size: 13px;
}

/* 帮助 */
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.help-card {
  position: relative;
  padding: 12px 14px;
  background: var(--paper-2);
  border: 1.5px solid rgba(51, 38, 74, 0.12);
  border-radius: var(--radius-sm);
}

.help-card > span {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--coral-deep);
}

.help-card h3 {
  margin: 3px 0 4px;
  font-size: 14px;
}

.help-card p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.help-tip {
  margin-top: 12px;
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.7;
  color: #6a4310;
  background: #fff3d2;
  border: 1.5px dashed #e5c06a;
  border-radius: var(--radius-sm);
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.how-steps > div {
  display: flex;
  gap: 12px;
}

.how-steps > div > span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
  background: var(--gold-soft);
  border: 1.5px solid rgba(51, 38, 74, 0.2);
  border-radius: 50%;
}

.how-steps h3 {
  font-size: 14px;
}

.how-steps p {
  font-size: 12.5px;
  line-height: 1.65;
}

.how-note {
  margin-top: 14px;
  padding: 10px 13px;
  font-size: 12px;
  color: #6a4310;
  background: #fff3d2;
  border-radius: var(--radius-sm);
}

/* 天空之门 / 秘境 */
.sky-gate-visual {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.sky-gate-visual .place-svg {
  width: 220px;
  height: 150px;
}

.gate-key-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 11px 14px;
  background: var(--paper-2);
  border: 1.5px dashed rgba(51, 38, 74, 0.2);
  border-radius: var(--radius-sm);
}

.gate-key-row span {
  font-size: 20px;
  filter: grayscale(1);
  opacity: 0.35;
}

.gate-key-row span.has-key {
  filter: none;
  opacity: 1;
  animation: key-pop 0.4s ease;
}

.gate-key-row b {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-soft);
}

@keyframes key-pop {
  0% { transform: scale(0.7) rotate(-12deg); }
  65% { transform: scale(1.16) rotate(4deg); }
  100% { transform: scale(1) rotate(0); }
}

.secret-head p {
  font-size: 12.5px;
  line-height: 1.7;
}

.secret-key-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 11px;
  background: var(--cream-2);
  border-radius: 999px;
}

.secret-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.secret-door {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 8px 11px;
  text-align: center;
  color: var(--ink);
  background: var(--paper-2);
  border: 2px solid rgba(51, 38, 74, 0.2);
  border-radius: 16px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.secret-door:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: var(--coral);
  background: #fff8ea;
}

.secret-door:disabled {
  opacity: 0.55;
}

.secret-door-arch {
  display: grid;
  place-items: center;
  width: 54px;
  height: 60px;
  margin-bottom: 3px;
  font-size: 24px;
  background: linear-gradient(180deg, #f3e6cf, #e6d4ff);
  border: 1.5px solid rgba(51, 38, 74, 0.18);
  border-radius: 50% 50% 12px 12px;
}

.secret-door b {
  font-size: 12.5px;
}

.secret-door small {
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--ink-faint);
}

.secret-door em {
  margin-top: 4px;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  color: var(--coral-deep);
}

.secret-door.is-opening .secret-door-arch {
  animation: door-shake 0.5s ease infinite;
}

@keyframes door-shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-4deg); }
  75% { transform: rotate(4deg); }
}

.secret-reward {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--paper-2);
  border: 1.5px dashed rgba(51, 38, 74, 0.2);
  border-radius: var(--radius-sm);
}

.secret-reward > span {
  font-size: 22px;
  color: var(--gold);
}

.secret-reward.has-reward {
  background: #fff8e8;
  border-style: solid;
  border-color: rgba(255, 207, 106, 0.55);
}

.secret-reward b {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  color: var(--ink);
}

.secret-reward p {
  margin-bottom: 4px;
  font-size: 11.5px;
}

.secret-reward a {
  font-size: 11px;
  font-weight: 800;
  color: var(--coral-deep);
}

.secret-reward-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: 20px;
  color: var(--ink);
  background: var(--swatch, var(--gold-soft));
  border: 1.5px solid rgba(51, 38, 74, 0.2);
  border-radius: 50%;
}

/* -------------------------------------------------------------------------
   Toast / 特效
   ------------------------------------------------------------------------- */

.toast-layer {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 320;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(92vw, 460px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cream);
  background: rgba(28, 20, 50, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(8, 5, 20, 0.45);
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.toast-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.toast-success { border-color: rgba(126, 224, 191, 0.5); }
.toast-success .toast-icon { color: #9df3d4; background: rgba(126, 224, 191, 0.18); }
.toast-error { border-color: rgba(255, 126, 157, 0.55); }
.toast-error .toast-icon { color: #ffc2d2; background: rgba(255, 126, 157, 0.2); }
.toast-reward { border-color: rgba(255, 207, 106, 0.6); }
.toast-reward .toast-icon { color: var(--gold); background: rgba(255, 207, 106, 0.16); }
.toast-sound .toast-icon { color: #c9c0ff; }

.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 300;
  overflow: hidden;
  pointer-events: none;
}

.confetti-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.confetti {
  position: absolute;
  top: -12vh;
  width: 9px;
  height: 15px;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
}

.confetti.round {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

@keyframes confetti-fall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0.1; transform: translate(var(--drift, 40px), 115vh) rotate(var(--spin, 360deg)); }
}

.burst-star {
  position: fixed;
  font-size: 14px;
  line-height: 1;
  animation: burst 0.85s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes burst {
  0% { opacity: 1; transform: translate(0, 0) scale(0.4); }
  60% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 40px), var(--dy, -40px)) scale(1.2); }
}

.points-float {
  position: fixed;
  z-index: 310;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  pointer-events: none;
  animation: points-float 1.4s ease-out forwards;
}

.points-float.gain { color: var(--gold); text-shadow: 0 2px 10px rgba(255, 207, 106, 0.5); }
.points-float.loss { color: #ff9ab2; }

@keyframes points-float {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.8); }
  25% { opacity: 1; transform: translate(-50%, -18px) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -54px) scale(1); }
}

.loading-orb {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  font-size: 24px;
  color: var(--ink);
  background: radial-gradient(circle at 32% 28%, #fff6d2, #ffd376);
  border: 2px solid var(--line);
  border-radius: 50%;
  animation: breathe 1.6s ease-in-out infinite;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 24px;
  font-size: 16px;
  color: var(--ink);
  background: var(--cream);
}

/* 通用小动画 */
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
