* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --paper-bg: #fcf8f0;
  --paper-warm: #f5ecdc;
  --paper-border: #d8c5a8;
  --wood-dark: #4a3525;
  --wood-mid: #7a583e;
  --wood-light: #b89572;
  --ink-main: #352922;
  --ink-muted: #786658;
  --celadon: #537a67;
  --celadon-dark: #3d5e4e;
  --peach-seal: #c96256;
  --peach-seal-dark: #a6493f;
  --gold-accent: #c79c56;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f3e4d3 0%, #f6ece0 36%, #e4e9df 72%, #c9d7cb 100%);
  color: var(--ink-main);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* 宣纸细腻颗粒与远山云雾背景 */
.scenic-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.scenic-sun {
  position: absolute;
  top: 48px;
  right: 12%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 245, 224, 0.92) 0%, rgba(246, 206, 173, 0.45) 55%, rgba(246, 206, 173, 0) 75%);
}

.scenic-mountains {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 46vh;
  opacity: 0.92;
}

.scenic-paper-grain {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(122, 88, 62, 0.04) 1px, transparent 0),
    radial-gradient(rgba(83, 122, 103, 0.03) 1px, transparent 0);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
}

/* 飘落桃花瓣 */
.petal {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 14px;
  border-radius: 70% 30% 65% 35% / 60% 40% 60% 40%;
  background: linear-gradient(135deg, #ffdce0 0%, #f2a2ad 100%);
  opacity: 0.72;
  animation: petalFall linear infinite;
}

.petal:nth-child(1) { left: 10%; animation-duration: 11s; animation-delay: 0s; transform: scale(0.85); }
.petal:nth-child(2) { left: 26%; animation-duration: 14s; animation-delay: 2s; transform: scale(1.05); }
.petal:nth-child(3) { left: 48%; animation-duration: 12s; animation-delay: 4s; transform: scale(0.75); }
.petal:nth-child(4) { left: 68%; animation-duration: 15s; animation-delay: 1s; transform: scale(0.95); }
.petal:nth-child(5) { left: 85%; animation-duration: 13s; animation-delay: 3s; transform: scale(0.8); }

@keyframes petalFall {
  0% { transform: translateY(-20px) translateX(0) rotate(0deg); opacity: 0; }
  12% { opacity: 0.78; }
  85% { opacity: 0.65; }
  100% { transform: translateY(105vh) translateX(48px) rotate(260deg); opacity: 0; }
}

.app-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  padding: 16px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hidden {
  display: none !important;
}

/* 宣纸卷轴质感卡片 */
.scroll-card {
  position: relative;
  background: linear-gradient(180deg, rgba(253, 250, 243, 0.94) 0%, rgba(246, 238, 224, 0.95) 100%);
  border: 1.5px solid #d4bea0;
  border-radius: 14px;
  box-shadow:
    0 10px 28px rgba(74, 53, 37, 0.11),
    0 2px 6px rgba(74, 53, 37, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
}

.scroll-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(184, 149, 114, 0.28);
  border-radius: 10px;
  pointer-events: none;
}

.wood-hud {
  background: linear-gradient(180deg, rgba(252, 247, 238, 0.95) 0%, rgba(242, 232, 214, 0.95) 100%);
  border: 1.5px solid #cfb693;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(68, 50, 34, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.panel-pad {
  padding: 18px 18px;
}

/* 标题与国风印章 */
.hero-header {
  text-align: center;
  padding: 18px 8px 6px;
}

.seal-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.seal-stamp {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  font-family: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  color: #fff9f2;
  background: var(--peach-seal);
  border: 1px solid #963b32;
  border-radius: 4px;
  letter-spacing: 2px;
  box-shadow: 0 2px 6px rgba(166, 73, 63, 0.25);
}

.hero-kicker {
  font-size: 12px;
  color: var(--celadon-dark);
  letter-spacing: 2px;
  font-weight: 500;
}

.hero-title {
  margin: 4px 0 8px;
  font-size: 30px;
  font-family: "Songti SC", "STSong", "Noto Serif SC", "KaiTi", Georgia, serif;
  font-weight: 700;
  color: var(--wood-dark);
  letter-spacing: 4px;
  text-shadow: 0 2px 10px rgba(255, 250, 240, 0.9);
}

.hero-sub {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 1px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--wood-dark);
  margin-bottom: 12px;
  letter-spacing: 1.5px;
}

.section-title::before,
.section-title::after {
  content: "";
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--wood-light));
}

.section-title::after {
  background: linear-gradient(90deg, var(--wood-light), transparent);
}

.sub-caption {
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* 温润质感按钮 */
.taoyuan-btn {
  cursor: pointer;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 1px;
  border: 1.5px solid transparent;
  transition: transform 0.08s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.taoyuan-btn:hover {
  filter: brightness(1.03);
}

.taoyuan-btn:active {
  transform: translateY(1.5px);
}

.btn-celadon {
  background: linear-gradient(180deg, #628c77 0%, #4b725f 100%);
  color: #fffdf9;
  border-color: #3a5b4b;
  box-shadow: 0 4px 12px rgba(75, 114, 95, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-peach {
  background: linear-gradient(180deg, #d47366 0%, #bc594d 100%);
  color: #fffdf9;
  border-color: #9e453b;
  box-shadow: 0 4px 12px rgba(188, 89, 77, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-paper {
  background: linear-gradient(180deg, #fffdf9 0%, #f3e8d6 100%);
  color: var(--wood-dark);
  border-color: #cfb693;
  box-shadow: 0 2px 6px rgba(74, 53, 37, 0.08);
}

.btn-disabled {
  background: #d8cfc3;
  color: #8f8478;
  border-color: #c5baac;
  cursor: not-allowed;
}

.full-btn {
  width: 100%;
}

.taoyuan-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: #fffdf8;
  border: 1.5px solid #d5bfa0;
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink-main);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.taoyuan-input:focus {
  border-color: var(--celadon);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

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

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-muted);
  margin: 4px 0;
}

.divider-text::before,
.divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(184, 149, 114, 0.35);
}

/* 准备室座位 */
.seat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.seat-card {
  width: 41%;
  padding: 14px 8px;
  text-align: center;
  border-radius: 12px;
  border: 1.5px dashed #cfb693;
  background: rgba(255, 253, 248, 0.65);
}

.seat-joined {
  border-style: solid;
  border-color: #7ca48e;
  background: rgba(235, 245, 238, 0.85);
}

.seat-icon {
  font-size: 26px;
}

.seat-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--wood-dark);
  margin-top: 6px;
}

.invite-box {
  background: rgba(246, 236, 220, 0.8);
  border: 1.5px dashed #c79c56;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  margin-bottom: 14px;
}

.invite-code {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--peach-seal-dark);
  font-family: "Courier New", monospace;
  margin: 4px 0;
}

.invite-tip {
  font-size: 12px;
  color: var(--ink-muted);
}

/* 预览画布 */
.preview-canvas {
  width: 100%;
  height: 128px;
  display: block;
  border-radius: 10px;
  border: 1.5px solid #c9b292;
  image-rendering: pixelated;
}

.ready-strip {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.ready-pill {
  flex: 1;
  text-align: center;
  font-size: 12px;
  padding: 7px 8px;
  border-radius: 8px;
  background: #f0e6d6;
  color: var(--ink-muted);
  border: 1px solid #d8c5a8;
}

.ready-ok {
  background: #e3f0e7;
  color: var(--celadon-dark);
  border-color: #8bb49d;
  font-weight: 600;
}

.card-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--wood-dark);
  margin-bottom: 10px;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
}

.quick-names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick-chip {
  cursor: pointer;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f3e6d3;
  color: var(--wood-mid);
  border: 1px solid #d5bfa0;
}

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

.pet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.option-item {
  cursor: pointer;
  padding: 10px 8px;
  background: #fffdf8;
  border: 1.5px solid #dfceb6;
  border-radius: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--wood-dark);
}

.option-active {
  border-color: var(--peach-seal);
  background: #fdf2ef;
  box-shadow: 0 3px 10px rgba(201, 98, 86, 0.16);
}

.swatch-row {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 5px;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(53, 41, 34, 0.3);
}

/* 小岛主界面 */
.hud-box {
  padding: 12px 14px;
}

.stage-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2eee6;
  color: var(--celadon-dark);
  border: 1px solid #96bca6;
  font-weight: 600;
}

.tool-chip {
  cursor: pointer;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f3e8d6;
  border: 1px solid #d4bea0;
  color: var(--wood-dark);
  font-weight: 600;
}

.tool-chip-celadon {
  background: #e2eee6;
  border-color: #8bb49d;
  color: var(--celadon-dark);
}

.hud-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--wood-dark);
  margin-top: 9px;
  gap: 6px;
}

.exp-bar {
  position: relative;
  width: 96px;
  height: 18px;
  background: #e8dcc8;
  border: 1px solid #ccb391;
  border-radius: 999px;
  overflow: hidden;
}

.exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #86b698 0%, #588a6e 100%);
  transition: width 0.25s;
}

.exp-text {
  position: absolute;
  inset: 0;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  color: var(--wood-dark);
  font-weight: 600;
}

.rpg-ticker {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(253, 249, 241, 0.92);
  color: var(--wood-dark);
  border: 1.5px solid #d5bfa0;
  border-radius: 12px;
  font-size: 12px;
  box-shadow: 0 3px 10px rgba(74, 53, 37, 0.08);
}

.ticker-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.canvas-stage {
  position: relative;
  padding: 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, #efe4d2 0%, #e4d4bc 100%);
  border: 2px solid #c9b08e;
  box-shadow: 0 12px 26px rgba(64, 48, 34, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ===== 全屏 3D 桃源主界面（无上下遮挡横条，画面内就地交互） ===== */
.island-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
}

.island-3d-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  background: #efe4d4;
}

.island-3d-full:active {
  cursor: grabbing;
}

/* 左上角紧凑单行小岛徽章 + 持有资源合体顶栏 */
.corner-tl {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 102px);
  pointer-events: none;
  z-index: 30;
}

.corner-tl > * {
  pointer-events: auto;
}

.top-hud-bar {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 7px 12px;
  border-radius: 16px;
  background: rgba(253, 249, 241, 0.84);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 20px rgba(58, 42, 28, 0.13);
}

.crest-compact {
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.hud-divider {
  width: 1px;
  height: 26px;
  background: rgba(168, 138, 108, 0.32);
  flex-shrink: 0;
}

.crest-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.crest-name {
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--wood-dark);
  white-space: nowrap;
}

.crest-stage {
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 999px;
  background: rgba(83, 122, 103, 0.16);
  color: var(--celadon-dark);
  white-space: nowrap;
}

.crest-progress {
  width: 112px;
  height: 4.5px;
  border-radius: 999px;
  background: rgba(184, 149, 114, 0.28);
  overflow: hidden;
}

.crest-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #86b698, #4b725f);
  transition: width 0.3s;
}

.resource-pills {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.res-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.85);
  border: 1px solid rgba(208, 188, 162, 0.55);
  font-size: 12px;
  font-weight: 700;
  color: var(--wood-dark);
}

.res-pill em {
  font-style: normal;
}

.res-pill-paw {
  cursor: pointer;
  background: rgba(232, 244, 236, 0.9);
  border-color: rgba(140, 184, 158, 0.55);
  color: var(--celadon-dark);
}

.drawer-tag-coast {
  background: rgba(45, 146, 178, 0.92);
}

.drawer-tag-late {
  background: rgba(98, 102, 184, 0.92);
}

/* 右侧极简竖排圆形功能列 */
.rail-right {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 30;
}

.fab-btn {
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  background: rgba(253, 249, 241, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(58, 42, 28, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--wood-dark);
  font-family: inherit;
  transition: transform 0.1s, background 0.15s;
}

.fab-btn:hover {
  background: rgba(255, 253, 249, 0.96);
}

.fab-btn:active {
  transform: scale(0.94);
}

.fab-btn span {
  font-size: 18px;
  line-height: 1;
}

.fab-btn small {
  font-size: 10px;
  font-weight: 700;
}

.fab-role {
  width: auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  flex-direction: row;
  font-size: 11px;
  font-weight: 700;
  background: rgba(226, 238, 230, 0.9);
  color: var(--celadon-dark);
}

.fab-btn.active {
  background: linear-gradient(135deg, #d47366, #bc594d);
  color: #fff;
  border-color: #fff6ee;
  box-shadow: 0 6px 18px rgba(188, 89, 77, 0.35);
}

.fab-mini {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 16px;
}

.sky-clock-pill {
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--wood-dark);
  background: rgba(255, 250, 241, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(213, 191, 160, 0.9);
  box-shadow: 0 4px 12px rgba(44, 34, 24, 0.14);
  white-space: nowrap;
  user-select: none;
  transition: transform 0.12s, background 0.15s;
}

.sky-clock-pill:hover {
  background: rgba(255, 253, 248, 0.98);
  transform: scale(1.04);
}

.sky-clock-pill:active {
  transform: scale(0.95);
}

/* 画面内就地弹出的上下文交互气泡菜单 */
.scene-menu {
  position: fixed;
  transform: translate(-50%, -115%);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.94);
  backdrop-filter: blur(14px);
  border: 1.5px solid #d5bfa0;
  box-shadow: 0 12px 28px rgba(58, 42, 28, 0.24);
  animation: popMenu 0.16s ease-out;
}

@keyframes popMenu {
  0% { opacity: 0; transform: translate(-50%, -90%) scale(0.86); }
  100% { opacity: 1; transform: translate(-50%, -115%) scale(1); }
}

.scene-menu-btn {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 7px 12px;
  background: #f4ebe0;
  color: var(--wood-dark);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  transition: transform 0.08s, background 0.12s;
}

.scene-menu-btn:hover {
  background: #ead9c3;
}

.scene-menu-btn.primary {
  background: linear-gradient(135deg, #628c77, #4b725f);
  color: #fff;
}

.scene-menu-btn.peach {
  background: linear-gradient(135deg, #d47366, #bc594d);
  color: #fff;
}

/* ===== 精致小巧圆形分区转盘（SVG 扇形圆环菜单，紧凑不挡视线） ===== */
.radial-wheel {
  position: fixed;
  width: 156px;
  height: 156px;
  transform: translate(-50%, -50%);
  z-index: 48;
  pointer-events: none;
  animation: wheelPop 0.16s cubic-bezier(0.22, 1.25, 0.36, 1);
}

@keyframes wheelPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.68); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.radial-wheel svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 8px 18px rgba(58, 42, 28, 0.28));
}

.radial-slice {
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.12s ease, filter 0.12s ease;
  transform-origin: 78px 78px;
}

.radial-slice:hover {
  transform: scale(1.07);
  filter: brightness(1.05);
}

.radial-slice path {
  fill: rgba(253, 248, 238, 0.95);
  stroke: #cbb392;
  stroke-width: 1.6;
}

.radial-slice.slice-primary path {
  fill: rgba(230, 243, 234, 0.96);
  stroke: #7aa88e;
}

.radial-slice.slice-danger path {
  fill: rgba(252, 234, 231, 0.96);
  stroke: #d98276;
}

.radial-slice text {
  pointer-events: none;
  user-select: none;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.radial-center {
  cursor: pointer;
  pointer-events: auto;
}

.radial-center circle {
  fill: rgba(255, 253, 248, 0.97);
  stroke: #c4a782;
  stroke-width: 2;
}

/* 营造时才出现的轻便建筑选框 */
.build-float-bar {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 780px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(253, 249, 241, 0.94);
  backdrop-filter: blur(14px);
  border: 1.5px solid #d5bfa0;
  box-shadow: 0 12px 30px rgba(58, 42, 28, 0.22);
  z-index: 35;
}

.drawer-lv-pill {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(235, 166, 48, 0.92);
  color: #fffef9;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 5px rgba(90, 56, 16, 0.25);
}

/* 建筑升级预览弹窗（Lv.N -> Lv.N+1 真实 3D 模型对比） */
.upgrade-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.upgrade-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px;
  border-radius: 14px;
  background: #fffdf8;
  border: 1.5px solid #dfd0b8;
}

.upgrade-card-next {
  border-color: #e5ad42;
  background: linear-gradient(180deg, #fffdf4, #fff5dc);
  box-shadow: 0 6px 18px rgba(229, 173, 66, 0.22);
}

.upgrade-lv-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  background: #8c7b6a;
  color: #fff;
}

.upgrade-lv-next {
  background: linear-gradient(135deg, #f2b43a, #dd8b24);
}

.upgrade-thumb {
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(180, 152, 118, 0.35);
}

.upgrade-card-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--wood-dark);
  text-align: center;
}

.upgrade-arrow {
  font-size: 22px;
  font-weight: 800;
  color: #d9942c;
  text-align: center;
}

.upgrade-desc-box {
  padding: 9px 12px;
  border-radius: 12px;
  background: #f9f3e6;
  border: 1px solid #e2d1b7;
  font-size: 12px;
  line-height: 1.55;
  color: #5a4332;
  text-align: center;
}

.upgrade-cost-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.upgrade-cost-pill {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid #96c2a8;
  background: #edf7f1;
  color: #2f5c45;
}

.upgrade-cost-pill.cost-lack {
  border-color: #dfa099;
  background: #fdf0ee;
  color: #a63d34;
}

/* 左下角单行轻量手记气泡 */
.corner-bl {
  cursor: pointer;
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: min(320px, calc(100% - 88px));
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(253, 249, 241, 0.76);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  font-size: 11px;
  color: var(--wood-dark);
  box-shadow: 0 4px 14px rgba(58, 42, 28, 0.1);
  z-index: 25;
}

.bl-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 步数与萌宠弹窗组件 */
.step-pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.step-pair-box {
  padding: 10px;
  border-radius: 12px;
  background: #fffdf8;
  border: 1px solid #dfceb6;
  text-align: center;
}

.step-big-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--celadon-dark);
  margin-top: 2px;
}

.quick-step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pet-speech-box {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fffdf8;
  border: 1px solid #dfceb6;
  font-size: 12px;
  color: var(--wood-dark);
  text-align: center;
  line-height: 1.5;
}

.pet-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pet-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.pet-bar-row span {
  width: 44px;
  color: var(--ink-muted);
}

.pet-bar-row em {
  width: 34px;
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.pet-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #ebe0cf;
  overflow: hidden;
}

.pet-fill-a {
  height: 100%;
  background: linear-gradient(90deg, #e5a363, #d47b43);
}

.pet-fill-b {
  height: 100%;
  background: linear-gradient(90deg, #eb9aa2, #d96b75);
}

.quest-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d9534f;
  border: 1.5px solid #fffdf8;
}

.drawer-locked {
  opacity: 0.68;
  background: #f2ebe0;
  border-style: dashed;
}

.area-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e6f0e9;
  color: var(--celadon-dark);
  margin-left: 4px;
}

.quest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  background: #fffdf8;
  border: 1px solid #dfceb6;
  border-radius: 10px;
  margin-bottom: 8px;
}

.quest-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--wood-dark);
}

.quest-desc {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 3px;
}

.quest-unlock {
  font-size: 11px;
  color: var(--celadon-dark);
  margin-top: 3px;
  font-weight: 600;
}

.mode-hint {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(253, 249, 241, 0.88);
  border: 1px solid #d8c5a8;
  border-radius: 8px;
  color: var(--ink-muted);
  font-size: 11px;
  text-align: center;
}

.sub-drawer {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 6px 4px 4px;
}

.drawer-card {
  cursor: pointer;
  flex: 0 0 auto;
  width: 112px;
  padding: 6px;
  background: #fffdf8;
  border: 1.5px solid #dac6aa;
  border-radius: 12px;
  font-size: 12px;
  color: var(--wood-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.drawer-card:hover {
  transform: translateY(-2px);
  border-color: #c2a07a;
}

.drawer-thumb-wrap {
  position: relative;
  width: 98px;
  height: 82px;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(180deg, #d8effa 0%, #f5efe2 65%, #e8dcc7 100%);
  border: 1px solid rgba(196, 173, 142, 0.55);
}

.drawer-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drawer-thumb.thumb-loading {
  opacity: 0;
}

.drawer-area-pill {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.9);
  color: var(--celadon-dark);
  border: 1px solid rgba(139, 180, 157, 0.7);
}

.drawer-lock-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(64, 52, 42, 0.28);
  font-size: 18px;
}

.drawer-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.drawer-active {
  background: #fdf0ec;
  border-color: var(--peach-seal);
  box-shadow: 0 4px 12px rgba(201, 98, 86, 0.22);
}

.drawer-meta {
  font-size: 10.5px;
  color: var(--ink-muted);
  line-height: 1.2;
  white-space: nowrap;
}

.bottom-dock {
  display: flex;
  padding: 6px;
  gap: 4px;
}

.dock-btn {
  cursor: pointer;
  flex: 1;
  text-align: center;
  padding: 7px 2px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 600;
}

.dock-icon {
  display: block;
  font-size: 18px;
  margin-bottom: 2px;
}

.dock-active {
  background: #e6f0e9;
  border-color: #93bba3;
  color: var(--celadon-dark);
}

/* Toast 与弹窗 */
.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(53, 41, 34, 0.92);
  color: #fff8ee;
  border: 1px solid #d8b88a;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(34, 24, 18, 0.25);
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(44, 34, 26, 0.52);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 150;
}

.modal-box {
  width: 100%;
  max-width: 390px;
  padding: 20px;
}

.modal-title {
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--wood-dark);
  text-align: center;
  margin-bottom: 10px;
}

.modal-list {
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.list-item {
  padding: 10px;
  background: #fffdf8;
  border: 1px solid #dfceb6;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--ink-main);
}

.list-meta {
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

/* 人物金币衣橱：靠右悬浮透明底，不遮挡左侧 3D 人物实时旋转试衣 */
.wardrobe-mask {
  justify-content: flex-end;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
  padding: 18px 22px;
}

.wardrobe-panel {
  pointer-events: auto;
  max-width: 370px;
  background: rgba(252, 246, 236, 0.96);
  box-shadow: 0 14px 36px rgba(34, 24, 16, 0.28);
}

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

.wardrobe-tabs .taoyuan-btn {
  padding: 7px 4px;
  font-size: 12px;
}

.wardrobe-equipped-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 24px;
}

.wardrobe-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e9f2ec;
  color: var(--celadon-dark);
  border: 1px solid #a6c9b5;
}

.wardrobe-list {
  max-height: 310px;
}

.wardrobe-slot-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f1e4d1;
  color: var(--wood-mid);
  margin-left: 5px;
  vertical-align: middle;
}

.wardrobe-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(74, 53, 37, 0.35);
  margin-right: 4px;
  vertical-align: -2px;
}

.terrain-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(74, 53, 37, 0.35);
  margin-left: 6px;
  vertical-align: -1px;
}

.fish-book-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.fish-card {
  padding: 9px 10px;
  border-radius: 10px;
  background: #fffdf8;
  border: 1.5px solid #dfd0b8;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fish-card-caught {
  border-color: #84b49a;
  background: #f3fbf6;
}

.fish-card-locked {
  opacity: 0.62;
  background: #f3ece0;
}

.fish-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--wood-dark);
}

.fish-rarity {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f5e6cc;
  color: var(--wood-mid);
}

.fish-card-meta {
  font-size: 11px;
  color: var(--ink-muted);
}

.fishing-banner {
  position: fixed;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255, 250, 238, 0.96);
  border: 2px solid #59a89c;
  color: #2f554f;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(34, 62, 66, 0.24);
  letter-spacing: 0.4px;
  pointer-events: none;
}

@media (max-width: 640px) {
  .wardrobe-mask {
    justify-content: center;
    align-items: flex-end;
    padding: 10px;
  }
  .wardrobe-list {
    max-height: 210px;
  }
}
