/* ===== hub.css · 宇宙星河主界面枢纽 ===== */
.hub {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr 240px;
  gap: 16px;
  padding: 16px;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  position: relative; z-index: 1;
}

/* —— 左：萌宠区（继承 .card 的奶油底+青描边+四角星装饰，保留顶部彩虹光带） —— */
.pet-pane {
  position: sticky; top: 72px;
  align-self: start;
  padding: 26px 18px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
  color: #4a3520;
  /* .card 已是奶油底，这里用 ::before 实现顶部彩虹光带（会覆盖 .card::before 的右上装饰） */
}
.pet-pane::before {
  content: ''; position: absolute; top: -1px; left: -1px; right: -1px; height: 5px;
  background: linear-gradient(90deg, #ff8b94, #b794ff, #5eead4, #fbbf24, #b794ff, #ff8b94);
  background-size: 200% 100%;
  border-radius: var(--radius) var(--radius) 0 0;
  animation: cosmic-pulse 4s ease-in-out infinite;
  z-index: 2;
}
.pet-pane::after { /* 保留 .card 左下装饰：奶油卡左下角小星点 */
  display: block;
}
.pet-stage { width: 180px; height: 180px; display: grid; place-items: center; cursor: pointer; user-select: none; position: relative; }
.pet-stage::after {
  content: ''; position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  width: 130px; height: 18px; background: radial-gradient(ellipse, rgba(183,148,255,0.4), transparent 70%);
  border-radius: 50%; filter: blur(6px);
}
.pet-stage svg, .pet-stage .zodiac-img, .pet-stage .pet-visual { width: 100%; height: 100%; overflow: visible; position: relative; z-index: 1; }
.pet-stage .idle, .pet-stage .pet-visual { animation: floaty 3s ease-in-out infinite; transform-origin: center bottom; }
.pet-stage.tapped .pet-visual { animation: pop .4s ease, floaty 3s ease-in-out .4s infinite; }
/* —— pet-pane 内文字：奶油底上须用暖深色（与彩虹光带紫色呼应） —— */
.pet-pane .pet-name { font-size: 19px; font-weight: 800; color: #3a1f5e; text-shadow: 0 1px 0 rgba(255,255,255,0.45); }
.pet-pane .pet-stage-name { font-size: 13px; color: #5a3a7a; font-weight: 700; }
.pet-pane .pet-bar { width: 100%; }
.pet-pane .pet-bar .label { display: flex; justify-content: space-between; font-size: 12px; color: #3a2a5a; margin-bottom: 5px; font-weight: 700; }
.pet-pane .exp-hint { color: #5a4a3a; font-size: 11px; margin-top: 4px; }
.pet-pane .muted { color: #5a4a3a; font-weight: 600; font-style: italic; }
.pet-bar .track { height: 10px; background: rgba(0,0,0,0.3); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.pet-bar .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8a5cff, #ec4899); box-shadow: 0 0 8px rgba(183, 148, 255, 0.6); transition: width .4s ease; }
/* 成长值：青绿渐变（与爱心的粉红区分开），满值时转为金色庆祝 */
.pet-bar.exp-bar .fill { background: linear-gradient(90deg, #14b8a6, #5eead4); box-shadow: 0 0 8px rgba(45, 212, 191, 0.6); }
.pet-bar.exp-bar .fill.full { background: linear-gradient(90deg, #fbbf24, #ffd866); box-shadow: 0 0 8px rgba(251, 191, 36, 0.6); }

/* —— 中：地图 —— */
.map-pane { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.map-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.map-head h2 { font-size: 22px; font-weight: 800; color: var(--ink); }
.map-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.map-tab {
  padding: 9px 16px; border-radius: 999px; font-weight: 800; font-size: 14px;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .12s, box-shadow .12s, border-color .12s;
  backdrop-filter: blur(8px);
}
.map-tab:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 0 12px var(--brand-soft); }
.map-tab.active { color: #fff; border-color: transparent; box-shadow: 0 0 16px currentColor; }
.map-tab .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }

.continent { display: none; flex-direction: column; gap: 14px; }
.continent.active { display: flex; animation: bounce-in .35s ease; }

.block { padding: 18px; color: #4a3520; }
.block-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.block-head .b-name { font-weight: 800; font-size: 17px; color: #3a2818; }
.block-head .b-tag { font-size: 12px; color: #8a6f50; font-weight: 600; }
.block-head .sample { margin-left: auto; font-size: 11px; padding: 4px 10px; border-radius: 999px; background: linear-gradient(135deg, #ffd866, #fbbf24); color: #3a2818; font-weight: 800; box-shadow: 0 0 10px rgba(255, 216, 102, 0.5); }
.lesson-video-btn {
  font-size: 13px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid rgba(251, 191, 36, 0.5); background: linear-gradient(135deg, #fff5dc 0%, #ffe8c4 100%);
  color: #b45309; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: all .15s; box-shadow: 0 2px 8px rgba(255, 180, 100, 0.15);
}
.lesson-video-btn:hover { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); color: #fff; border-color: #f59e0b; box-shadow: 0 6px 18px rgba(251, 191, 36, 0.4); }
.lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.lesson {
  position: relative;
  padding: 14px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 248, 235, 0.95) 0%, rgba(255, 240, 215, 0.9) 100%);
  border: 1.5px solid rgba(94, 234, 212, 0.5);
  box-shadow: 0 4px 14px rgba(255, 180, 100, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: flex; flex-direction: column; gap: 7px;
  min-height: 90px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  cursor: pointer;
  color: #4a3520;
}
.lesson.ready:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 8px 24px rgba(255, 180, 100, 0.3), 0 0 0 3px rgba(94, 234, 212, 0.2); border-color: #5eead4; }
.lesson .l-top { display: flex; align-items: center; gap: 6px; }
.lesson .l-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0; box-shadow: 0 0 10px currentColor; }
.lesson .l-grade { font-size: 11px; color: #8a6f50; margin-left: auto; font-weight: 600; }
.lesson .l-title { font-weight: 800; font-size: 14px; line-height: 1.3; color: #3a2818; }
.lesson .l-stars { font-size: 13px; color: #f59e0b; letter-spacing: 2px; text-shadow: 0 0 6px rgba(255, 216, 102, 0.6); }
.lesson.ready { border-color: rgba(94, 234, 212, 0.6); }
.lesson.ready.cleared { border-color: #4ade80; background: linear-gradient(160deg, #fff8eb, rgba(74, 222, 128, 0.15)); box-shadow: 0 4px 14px rgba(74, 222, 128, 0.2); }
.lesson.locked { opacity: .55; }
.lesson.gated.ready:hover { transform: none; box-shadow: 0 3px 10px rgba(255, 180, 100, 0.12); border-color: rgba(94, 234, 212, 0.6); }
.trial-hint {
  padding: 10px 16px; border-radius: 14px; font-size: 13px; font-weight: 700; color: #9a6b1f;
  background: linear-gradient(160deg, #fff8eb, rgba(251, 191, 36, 0.12));
  border: 1.5px dashed rgba(251, 191, 36, 0.5);
}
.lesson.coming { background: repeating-linear-gradient(45deg, rgba(255, 248, 235, 0.95), rgba(255, 248, 235, 0.95) 10px, rgba(255, 220, 180, 0.4) 10px, rgba(255, 220, 180, 0.4) 20px); }
.lesson.coming .l-title { color: #a89070; }
.lesson .lock { position: absolute; top: 10px; right: 10px; font-size: 13px; }

/* —— 右：功能区 —— */
.side-pane { display: flex; flex-direction: column; gap: 12px; }
.side-pane .card { padding: 18px; color: #4a3520; }
.side-h { font-size: 14px; font-weight: 800; color: #3a2818; margin-bottom: 12px; letter-spacing: 0.3px; }
.fn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fn-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px; border-radius: 16px;
  background: linear-gradient(160deg, #fff8eb 0%, #fef0d8 100%);
  border: 1.5px solid rgba(94, 234, 212, 0.45);
  box-shadow: 0 3px 10px rgba(255, 180, 100, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-size: 12px; font-weight: 800; color: #4a3520;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
  position: relative;
}
.fn-btn:hover { transform: translateY(-3px) scale(1.03); background: linear-gradient(160deg, #fff5dc 0%, #ffe8c4 100%); color: #b07a3a; border-color: #fbbf24; box-shadow: 0 8px 22px rgba(255, 180, 100, 0.3), 0 0 0 3px rgba(251, 191, 36, 0.15); }
.fn-btn .ic { font-size: 26px; }
.fn-btn .soon { font-size: 10px; color: #b07a3a; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(255, 184, 102, 0.18); border: 1px solid rgba(255, 184, 102, 0.35); }

/* —— 错题竞技场「未读红点」角标（微信未读消息同款：右上角红底白字 + 呼吸光圈）——
   数字口径 = 待攻克错题数（见 js/ui/arena-badge.js），归零则元素不存在。
   光圈用 ::after 扩散，不占布局、不引额外 DOM；pointer-events:none 保证不挡住点击。 */
.fn-badge {
  position: absolute; top: -7px; right: -7px;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: linear-gradient(160deg, #ff6b6b 0%, #e01e37 100%);
  color: #fff; font-size: 12px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 7px rgba(224, 30, 55, 0.45), 0 0 0 2px #fff8eb;
  pointer-events: none; z-index: 2;
}
.fn-badge::after {
  content: ''; position: absolute; inset: 0; border-radius: 999px;
  border: 2px solid rgba(224, 30, 55, 0.6);
  animation: fnBadgeRing 2.4s ease-out infinite;
}
@keyframes fnBadgeRing {
  0%   { transform: scale(1);    opacity: 0.75; }
  70%  { transform: scale(1.9);  opacity: 0; }
  100% { transform: scale(1.9);  opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .fn-badge::after { animation: none; opacity: 0; } }

.daily-card { background: linear-gradient(160deg, #fff8eb 0%, rgba(251, 191, 36, 0.08) 100%); border-color: rgba(251, 191, 36, 0.45); }
.daily-card .q { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px dashed rgba(180, 140, 100, 0.3); font-size: 13px; font-weight: 600; color: #4a3520; }
.daily-card .q:last-child { border-bottom: none; }
.daily-card .q .ck { width: 20px; height: 20px; border-radius: 6px; border: 2px solid rgba(180, 140, 100, 0.4); flex-shrink: 0; display: grid; place-items: center; font-size: 12px; color: #fff; transition: all .2s; }
.daily-card .q.done .ck { background: #4ade80; border-color: #4ade80; box-shadow: 0 0 8px rgba(74, 222, 128, 0.4); }
.daily-card .q.done .txt { color: #a89070; text-decoration: line-through; }
.streak { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; color: #d97706; }

/* —— 图鉴弹窗 —— */
/* ⚠️ 必须写 .modal.codex-modal：同文件的 .modal{max-width:460px} 在本规则之后声明，
   单类选择器会把它覆盖掉（图鉴弹窗因此长期只有 460px 宽）。复合选择器提高优先级，
   不依赖声明顺序。 */
.modal.codex-modal { width: 100%; max-width: 640px; max-height: 85vh; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.codex-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 12px; }
.codex-head h3 { font-size: 22px; font-weight: 800; color: #3a2818; }
.codex-close { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 248, 235, 0.8); border: 1.5px solid rgba(94, 234, 212, 0.5); font-size: 16px; color: #7a6048; display: grid; place-items: center; transition: all .15s; }
.codex-close:hover { background: #ff7a8a; color: #fff; border-color: #ff7a8a; }
.codex-stats { padding: 0 24px 14px; font-size: 14px; color: #7a6048; font-weight: 700; border-bottom: 1px dashed rgba(180, 140, 100, 0.3); }
/* 图鉴：改为「每星域 1 只守护灵」（2026-09-13 十二生肖池改版），
   故 .codex-list 直接用自适应栅格排 4 个星域块，2 列 → 窄屏 1 列。 */
.codex-list { overflow-y: auto; padding: 16px 24px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 14px; align-content: start; }
.codex-continent { margin-bottom: 0; }
.cc-title { font-size: 15px; font-weight: 800; margin-bottom: 10px; text-shadow: 0 0 8px currentColor; }
.cc-pets { display: grid; grid-template-columns: 1fr; gap: 12px; }
.codex-pet { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 16px; border: 1.5px solid rgba(94, 234, 212, 0.4); background: linear-gradient(160deg, #fff8eb 0%, #fef0d8 100%); position: relative; transition: transform .15s, border-color .15s, box-shadow .15s; color: #4a3520; }
.codex-pet.unlocked { cursor: pointer; }
.codex-pet.unlocked:hover { transform: translateY(-3px); border-color: #5eead4; box-shadow: 0 6px 18px rgba(255, 180, 100, 0.3), 0 0 0 3px rgba(94, 234, 212, 0.2); }
.codex-pet.active { border-color: #4ade80; background: linear-gradient(160deg, #fff8eb, rgba(74, 222, 128, 0.15)); box-shadow: 0 4px 14px rgba(74, 222, 128, 0.25); }
.codex-pet.locked { opacity: 0.7; }
.codex-pet .cp-egg { width: 70px; height: 84px; display: grid; place-items: center; }
.codex-pet .cp-egg .zodiac-img, .codex-pet .cp-egg svg { width: 100% !important; height: 100% !important; }
.codex-pet .cp-name { font-size: 15px; font-weight: 800; color: #3a2818; }
.codex-pet .cp-desc { font-size: 11px; color: #7a6048; }
.codex-pet .cp-tag { position: absolute; top: 6px; right: 6px; font-size: 9px; padding: 2px 6px; border-radius: 999px; background: linear-gradient(135deg, #a78bfa, #ec4899); color: #fff; font-weight: 800; box-shadow: 0 0 8px rgba(236, 72, 153, 0.6); }
.codex-pet .cp-active { position: absolute; top: 6px; left: 6px; font-size: 9px; padding: 2px 6px; border-radius: 999px; background: #4ade80; color: #1a0d3a; font-weight: 800; }
@media (max-width: 480px) { .cc-pets { grid-template-columns: repeat(2, 1fr); } }

/* —— 关卡详情弹层（背景 + .modal 容器：bg/border 来自 .card, .modal；这里只补布局） —— */
.overlay { position: fixed; inset: 0; background: rgba(10, 4, 32, 0.55); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.overlay.show { display: flex; animation: pop .25s ease; }
.modal { width: 100%; max-width: 460px; padding: 26px; }
.modal h3 { font-size: 22px; margin-bottom: 4px; font-weight: 800; color: #3a2818; }
.modal .dim-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.dim { font-size: 12px; padding: 5px 12px; border-radius: 999px; font-weight: 800; }
.dim.考点 { background: rgba(255, 122, 138, 0.18); color: #d24b5d; }
.dim.重点 { background: rgba(167, 139, 250, 0.2); color: #7c5cd9; }
.dim.难点 { background: rgba(183, 148, 255, 0.22); color: #8a5cff; }
.dim.提升点 { background: rgba(74, 222, 128, 0.22); color: #16a34a; }
.dim.易错点 { background: rgba(251, 191, 36, 0.25); color: #d97706; }
.modal .meta { font-size: 13px; color: #7a6048; font-weight: 600; }
.modal .actions { display: flex; gap: 10px; margin-top: 20px; }
.modal .actions .btn { flex: 1; }

/* —— 领养页 —— */
.adopt { flex: 1; display: grid; place-items: center; padding: 28px 16px; }
.adopt-card { width: 100%; max-width: 720px; padding: 32px 28px; text-align: center; }
.adopt-card h1 { font-size: 26px; margin-bottom: 8px; font-weight: 800; color: #3a2818; }
.adopt-card > .muted { font-size: 15px; margin-bottom: 24px; color: #7a6048; }
.adopt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.adopt-pet {
  padding: 20px 14px; border-radius: 22px; color: #4a3520;
  border: 1.5px solid rgba(94, 234, 212, 0.5);
  background: linear-gradient(160deg, #fff8eb 0%, #fef0d8 100%);
  box-shadow: 0 4px 14px rgba(255, 180, 100, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform .18s ease, border-color .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.adopt-pet::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: var(--cc, var(--brand)); opacity: 0.12;
}
.adopt-pet:hover { transform: translateY(-6px) scale(1.03); border-color: var(--cc, #5eead4); box-shadow: 0 12px 28px rgba(255, 180, 100, 0.3), 0 0 0 3px rgba(94, 234, 212, 0.2); }
.adopt-egg { width: 84px; height: 98px; animation: floaty 3s ease-in-out infinite; position: relative; z-index: 1; }
.adopt-egg .zodiac-img { width: 100% !important; height: 100% !important; }
.adopt-pet .ap-name { font-weight: 800; font-size: 17px; position: relative; z-index: 1; color: #3a2818; }
.adopt-pet .ap-cont { font-size: 12px; color: #7a6048; font-weight: 600; position: relative; z-index: 1; }
.adopt-pet .ap-desc { font-size: 11px; color: #a89070; line-height: 1.4; position: relative; z-index: 1; }

/* —— toast —— */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: linear-gradient(135deg, #1a0d3a, #3a206e); color: #fff;
  padding: 14px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 600; line-height: 1.5; max-width: 90vw; white-space: pre-line; z-index: 100;
  border: 1px solid var(--line-strong);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4); animation: bounce-in .3s ease;
}

/* —— 响应式 —— */
@media (max-width: 980px) {
  .hub { grid-template-columns: 1fr; padding: 12px; }
  .pet-pane { position: static; flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .pet-stage { width: 120px; height: 120px; }
  .pet-bar { max-width: 220px; }
  .side-pane { order: 3; }
  .map-pane { order: 2; }
}
@media (max-width: 560px) {
  .topbar .stat.hide-sm { display: none; }
  .lessons { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .fn-grid { grid-template-columns: repeat(3, 1fr); }
  .pet-pane { gap: 8px; }
}

/* —— 宠物互动动画 —— */
@keyframes bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-16px) scale(1.08); }
  60% { transform: translateY(-6px) scale(0.98); }
}
.pet-stage.bounce .pet-visual { animation: bounce .5s ease; }

.pet-stage { position: relative; }
.pet-mood { position: absolute; top: -8px; right: -8px; font-size: 26px; z-index: 3; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); animation: mood-float 2s ease-in-out infinite; }
@keyframes mood-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

.pet-mood-label { font-size: 12px; }

.pet-actions { display: flex; gap: 8px; width: 100%; margin-top: 4px; }
.pet-actions .btn { flex:1; padding: 8px 6px; font-size: 12px; }
.pet-feed-btn:disabled { opacity: .5; }

.pat-bar { display: none; }
.pat-fill { background: linear-gradient(90deg, #ff6b9d, #ff2d55) !important; box-shadow: 0 0 10px rgba(255, 43, 85, 0.6) !important; }

.pet-fx { position: absolute; top: 50%; left: 50%; width: 0; height: 0; z-index: 5; pointer-events: none; }
.pet-fx-text {
  position: absolute; white-space: nowrap; font-weight: 900; font-size: 18px;
  animation: fx-float 1.2s ease-out forwards; text-shadow: 0 0 8px rgba(255,255,255,0.9);
}
@keyframes fx-float {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
  50% { opacity: 1; transform: translate(-50%, -120%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -200%) scale(0.8); }
}

/* 宠物小屋：分类标签 + 气泡 */
.room-cats { display: flex; gap: 8px; padding: 0 24px; flex-wrap: wrap; margin-bottom: 10px; }
.room-cat-btn {
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: rgba(255,248,235,0.6); border: 1.5px solid rgba(180,140,100,0.3); color: #7a6048; cursor: pointer; font-family: inherit;
}
.room-cat-btn.active { background: linear-gradient(160deg, #5eead4, #34d399); color: #fff; border-color: transparent; }
.room-cat-btn:hover { transform: translateY(-1px); }

.room-bubble {
  position: absolute; bottom: 80%; left: 50%; transform: translateX(-50%);
  background: #fff; border-radius: 16px; padding: 8px 14px; font-size: 14px; font-weight: 800;
  color: #3a2818; border: 1.5px solid rgba(94,234,212,0.5); white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 10;
}
.room-bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 8px solid transparent; border-top-color: #fff;
}
.room-bubble-pop { animation: bubble-pop .3s ease; }
@keyframes bubble-pop {
  0% { opacity: 0; transform: translateX(-50%) scale(0.5); }
  100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

.room-items { padding: 0 24px 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.room-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 6px; border-radius: 14px;
  background: linear-gradient(160deg, #fff8eb 0%, #fef0d8 100%);
  border: 1.5px solid rgba(180,140,100,0.3); cursor: pointer; transition: all .15s; color: #4a3520; font-family: inherit;
}
.room-item:hover { transform: translateY(-2px); }
.room-item.on { background: linear-gradient(160deg, #fff8eb 0%, rgba(94,234,212,0.25) 100%); border-color: #5eead4; box-shadow: 0 4px 12px rgba(94,234,212,0.3); }
.ri-emoji { font-size: 28px; }
.ri-name { font-size: 13px; font-weight: 800; }
.ri-desc { font-size: 10px; }
.ri-tag { font-size: 10px; color: #7a6048; }
.room-item.on .ri-tag { color: #34d399; font-weight: 800; }

/* —— 领域切换：切换 = 再领一只蛋（不锁死，未领养领域仍可点，引导领蛋） —— */
.switch-domain-btn {
  padding: 9px 16px; border-radius: 999px; font-weight: 800; font-size: 13px;
  background: linear-gradient(135deg, #fff5dc 0%, #ffe8c4 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.5); color: #d97706;
  cursor: pointer; white-space: nowrap; transition: all .15s;
  box-shadow: 0 3px 10px rgba(255, 180, 100, 0.15);
}
.switch-domain-btn:hover { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); color: #fff; border-color: #f59e0b; box-shadow: 0 6px 18px rgba(251, 191, 36, 0.4); transform: translateY(-2px); }

.domain-banner {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 18px;
  border: 1.5px solid rgba(94, 234, 212, 0.5);
  background: linear-gradient(160deg, #fff8eb 0%, #fef0d8 100%);
  box-shadow: 0 4px 14px rgba(255, 180, 100, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: #4a3520;
}
.domain-banner .db-emoji { font-size: 30px; filter: drop-shadow(0 0 8px var(--cc)); }
.domain-banner .db-info { display: flex; flex-direction: column; gap: 2px; }
.domain-banner .db-name { font-weight: 800; font-size: 15px; color: #3a2818; }
.domain-banner .db-sub { font-size: 12px; color: #7a6048; font-weight: 600; }
.domain-banner.done { border-color: #4ade80; background: linear-gradient(160deg, #fff8eb, rgba(74, 222, 128, 0.12)); }
.domain-banner.done .db-sub { color: #16a34a; }

/* 未领养的领域标签：可点，仅作「去领蛋」暖色提示 */
.map-tab.need { border-style: dashed; border-color: rgba(251, 191, 36, 0.6); color: #d97706; background: rgba(255, 248, 235, 0.7); }
.map-tab.need:hover { transform: translateY(-2px); box-shadow: 0 0 12px rgba(251, 191, 36, 0.4); border-color: #f59e0b; color: #b45309; }
.map-tab .lock-ic { font-size: 12px; margin-left: 2px; }

.switch-modal { max-width: 520px; padding: 0; overflow: hidden; }
.switch-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 8px; }
.switch-head h3 { font-size: 21px; font-weight: 800; color: #3a2818; }
.switch-tip { padding: 0 22px 14px; font-size: 13px; color: #7a6048; line-height: 1.6; }
.switch-tip b { color: #d97706; }
.switch-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 22px 22px; }
.switch-card {
  display: flex; align-items: center; gap: 10px; padding: 14px;
  border-radius: 16px; border: 1.5px solid rgba(94, 234, 212, 0.4);
  background: linear-gradient(160deg, #fff8eb 0%, #fef0d8 100%);
  color: #4a3520;
  cursor: pointer; text-align: left;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  box-shadow: 0 3px 10px rgba(255, 180, 100, 0.1);
}
.switch-card:hover { transform: translateY(-3px); border-color: var(--cc); box-shadow: 0 6px 18px rgba(255, 180, 100, 0.25); }
.switch-card.active { border-color: #4ade80; background: linear-gradient(160deg, #fff8eb, rgba(74, 222, 128, 0.15)); box-shadow: 0 4px 14px rgba(74, 222, 128, 0.25); }
.switch-card.need { border-style: dashed; border-color: rgba(251, 191, 36, 0.6); }
.switch-card.need:hover { transform: translateY(-3px); border-color: #f59e0b; box-shadow: 0 6px 18px rgba(251, 191, 36, 0.35); }
.switch-card .sc-emoji { font-size: 26px; filter: drop-shadow(0 0 6px var(--cc)); }
.switch-card .sc-name { font-weight: 800; font-size: 14px; color: #3a2818; flex: 1; }
.switch-card .sc-badge { font-size: 10px; padding: 3px 8px; border-radius: 999px; font-weight: 800; white-space: nowrap; }
.sc-badge.cur { background: linear-gradient(135deg, #4ade80, #22c55e); color: #fff; }
.sc-badge.done { background: rgba(74, 222, 128, 0.18); color: #16a34a; }
.sc-badge.free { background: rgba(251, 191, 36, 0.22); color: #b45309; }
.sc-badge.warn { background: rgba(255, 122, 138, 0.2); color: #d24b5d; }
@media (max-width: 480px) { .switch-list { grid-template-columns: 1fr; } }

/* ===== 2026-09-12 权限改版：进度定位 + 继续按钮 ===== */
.continue-btn {
  align-self: center; flex-shrink: 0;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #fff; border: none; border-radius: 18px;
  padding: 9px 16px; font-weight: 800; font-size: 13px;
  cursor: pointer; box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.continue-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45); }
.lesson.loc-here { outline: 3px solid #f59e0b; outline-offset: 2px; border-radius: 12px; }
.lesson .loc-marker { pointer-events: none; }
@media (max-width: 720px) { .continue-btn { display: none; } }

/* ===== 2026-09-13 进入流程改造：未登录态主界面 ===== */
.guest-banner {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #5b3fa8 0%, #8a63d2 100%);
  border: 3px solid #3a2a6a; border-radius: 18px;
  padding: 16px 20px; color: #fff;
  box-shadow: 0 6px 0 rgba(58, 42, 106, 0.3);
}
.guest-banner .gb-emoji { font-size: 34px; flex-shrink: 0; }
.guest-banner .gb-info { flex: 1; min-width: 0; }
.guest-banner .gb-title { font-size: 18px; font-weight: 800; }
.guest-banner .gb-sub { font-size: 12.5px; opacity: 0.92; margin-top: 4px; line-height: 1.5; }
.guest-banner .gb-btn {
  flex-shrink: 0; white-space: nowrap;
  background: #ffd866; color: #4a3520; border: 2px solid #b8860b; font-weight: 800;
}
.guest-banner .gb-btn:hover { background: #ffe9a8; }
.pet-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px; padding: 26px 14px; min-height: 230px;
}
.pet-empty .pe-emoji { font-size: 46px; opacity: 0.8; }
.pet-empty .pe-title { font-size: 17px; font-weight: 800; color: #3a1f5e; }
.pet-empty .pe-desc { font-size: 12.5px; color: #5a4a3a; font-weight: 600; line-height: 1.55; }
.pet-empty .btn { margin-top: 6px; }
@media (max-width: 720px) {
  .guest-banner { flex-direction: column; text-align: center; gap: 10px; }
}
