/* =========================================
   方块古文观止 · 我的世界像素风 H5 样式
   支持手机端浏览器 & 电脑端浏览器自适应
   ========================================= */

:root {
  --mc-grass-top: #5da637;
  --mc-grass-mid: #4a8c2a;
  --mc-grass-dark: #35691d;
  --mc-dirt: #7a5230;
  --mc-dirt-dark: #593a20;
  --mc-stone: #8b8b8b;
  --mc-stone-light: #c6c6c6;
  --mc-stone-dark: #555555;
  --mc-obsidian: #1f1b24;
  --mc-emerald: #17dd62;
  --mc-diamond: #4aedd9;
  --mc-gold: #fcee4b;
  --mc-gold-dark: #c99712;
  --mc-xp: #80ff20;
  --mc-xp-dark: #3a7a0c;

  --bg-page: #d7e8c5;
  --bg-panel: #ece8dc;
  --bg-parchment: #fffdf4;
  --text-main: #23201b;
  --text-sub: #5f584c;
  --text-pinyin: #2f6f23;
  --border-pixel: #2b2620;
  --shadow-pixel: rgba(0, 0, 0, 0.28);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body.theme-night {
  --bg-page: #181a20;
  --bg-panel: #252834;
  --bg-parchment: #1e222d;
  --text-main: #f0eee6;
  --text-sub: #a8b0c0;
  --text-pinyin: #7ee787;
  --border-pixel: #0d0f14;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background-color: var(--bg-page);
  background-image:
    linear-gradient(45deg, rgba(0,0,0,0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0,0,0,0.03) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.03) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.03) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  color: var(--text-main);
  overscroll-behavior-y: none;
}

.app-shell {
  max-width: 820px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ===== 顶部草方块状态栏 ===== */
.mc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background:
    repeating-linear-gradient(
      90deg,
      var(--mc-grass-top) 0px,
      var(--mc-grass-top) 16px,
      var(--mc-grass-mid) 16px,
      var(--mc-grass-mid) 32px
    );
  border-bottom: 6px solid var(--mc-dirt);
  box-shadow: 0 4px 0 var(--mc-dirt-dark), 0 6px 14px rgba(0, 0, 0, 0.22);
  padding: 10px 14px;
  color: #fff;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
  flex: 1;
}

/* 像素史蒂夫头像 */
.pixel-avatar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 3px solid #1d1d1d;
  background: #c8966e;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.18), 0 3px 0 rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.steve-hair {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: #3b2618;
  box-shadow: 0 4px 0 -2px #3b2618;
}

.steve-face {
  position: relative;
  width: 100%;
  height: 100%;
}

.steve-eye {
  position: absolute;
  top: 17px;
  width: 8px;
  height: 5px;
  background: #fff;
}
.steve-eye.left {
  left: 5px;
  box-shadow: inset -4px 0 0 #3f48cc;
}
.steve-eye.right {
  right: 5px;
  box-shadow: inset 4px 0 0 #3f48cc;
}

.steve-mouth {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 6px;
  background: #6b4128;
  border-top: 2px solid #9e6b4b;
}

.player-meta {
  min-width: 0;
  flex: 1;
}

.player-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.player-name {
  font-weight: 800;
  font-size: 15px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pickaxe-badge {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 1px 6px;
  font-weight: 700;
}

.xp-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lv-tag {
  font-size: 12px;
  color: var(--mc-xp);
  text-shadow: 1px 1px 0 #000;
  font-weight: 800;
}

.xp-bar-track {
  flex: 1;
  max-width: 150px;
  height: 10px;
  background: #1a2415;
  border: 2px solid #0e130b;
  position: relative;
}

.xp-bar-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--mc-xp) 0px,
    var(--mc-xp) 8px,
    #62d916 8px,
    #62d916 10px
  );
  transition: width 0.35s ease;
}

.xp-text {
  font-size: 11px;
  opacity: 0.92;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.6);
  display: none;
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.38);
  border: 2px solid rgba(255, 255, 255, 0.25);
  padding: 4px 8px;
  font-weight: 800;
  font-size: 13px;
  text-shadow: 1px 1px 0 #000;
}

.pixel-icon.icon-emerald {
  display: inline-block;
  width: 12px;
  height: 14px;
  background: var(--mc-emerald);
  border: 2px solid #0d6e31;
  box-shadow: inset 2px 2px 0 #9effbe;
  clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

.mc-icon-btn {
  width: 34px;
  height: 34px;
  background: #777;
  border: 2px solid #1e1e1e;
  box-shadow: inset 2px 2px 0 #aaa, inset -2px -2px 0 #4a4a4a;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc-icon-btn:active {
  transform: translateY(2px);
}

/* ===== 主内容区 ===== */
.main-content {
  flex: 1;
  padding: 14px 12px calc(84px + var(--safe-bottom));
}

.view {
  display: none;
  animation: fadeIn 0.2s ease;
}

.view.active {
  display: block;
}

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

/* ===== 通用像素面板 & 像素按钮 ===== */
.mc-panel {
  background: var(--bg-panel);
  border: 3px solid var(--border-pixel);
  box-shadow:
    inset 3px 3px 0 rgba(255,255,255,0.45),
    inset -3px -3px 0 rgba(0,0,0,0.12),
    0 4px 0 var(--shadow-pixel);
  padding: 14px;
  margin-bottom: 14px;
}

body.theme-night .mc-panel {
  box-shadow:
    inset 2px 2px 0 rgba(255,255,255,0.08),
    inset -2px -2px 0 rgba(0,0,0,0.35),
    0 4px 0 rgba(0,0,0,0.45);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.panel-title {
  font-weight: 800;
  font-size: 16px;
}

.panel-sub {
  font-size: 12px;
  color: var(--text-sub);
}

.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  border: 3px solid #1e1e1e;
  cursor: pointer;
  user-select: none;
  transition: transform 0.08s ease;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.45);
}

.mc-btn:active {
  transform: translateY(2px);
}

.mc-btn.btn-sm {
  padding: 6px 10px;
  font-size: 13px;
  border-width: 2px;
}

.mc-btn-green {
  background: #3c8527;
  color: #fff;
  box-shadow: inset 3px 3px 0 #63b546, inset -3px -3px 0 #265917;
}

.mc-btn-stone {
  background: #7c7c7c;
  color: #fff;
  box-shadow: inset 3px 3px 0 #a8a8a8, inset -3px -3px 0 #4d4d4d;
}

.mc-btn-gold {
  background: #e5a910;
  color: #2b1d00;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.4);
  box-shadow: inset 3px 3px 0 #fff07a, inset -3px -3px 0 #a16f00;
}

/* ===== 首页：今日任务 & 生物群系 ===== */
.quest-panel {
  border-left: 8px solid var(--mc-grass-top);
}

.daily-progress-badge {
  background: #2f6f23;
  color: #fff;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
  border: 2px solid #1b4214;
}

.quest-bar-track {
  height: 14px;
  background: #3a352e;
  border: 2px solid #1e1b17;
  margin-bottom: 8px;
}

.quest-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #52c41a, #a0e829);
  transition: width 0.35s ease;
}

.quest-tip {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}

.quick-start-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-start-row .mc-btn {
  flex: 1;
  min-width: 130px;
}

.mastery-panel {
  padding: 11px 14px;
  border-left: 8px solid var(--mc-gold-dark);
}

.mastery-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.mastery-title {
  font-size: 14px;
  font-weight: 800;
}

.mastery-count {
  font-size: 13px;
  font-weight: 900;
  color: #139b48;
}

.mastery-track {
  height: 11px;
  background: #3a352e;
  border: 2px solid #1e1b17;
  margin-bottom: 6px;
}

.mastery-fill {
  height: 100%;
  background: linear-gradient(90deg, #f5b400, #4aedd9);
  transition: width 0.35s ease;
}

.mastery-desc {
  margin: 0;
  font-size: 12px;
  color: var(--text-sub);
}

.biome-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.biome-tabs::-webkit-scrollbar {
  display: none;
}

.biome-tab {
  flex-shrink: 0;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg-panel);
  color: var(--text-main);
  border: 2px solid var(--border-pixel);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.4), inset -2px -2px 0 rgba(0,0,0,0.12);
  cursor: pointer;
}

.biome-tab.active {
  background: var(--mc-grass-mid);
  color: #fff;
  box-shadow: inset 2px 2px 0 #76c84d, inset -2px -2px 0 #265014;
}

/* 篇目卡片网格 */
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.article-card {
  background: var(--bg-parchment);
  border: 3px solid var(--border-pixel);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.5), 0 4px 0 var(--shadow-pixel);
  padding: 13px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.1s ease;
  position: relative;
}

.article-card:active {
  transform: translateY(2px);
}

.article-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.article-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.article-card-meta {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

.difficulty-stars {
  font-size: 12px;
  white-space: nowrap;
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border: 1px solid rgba(0,0,0,0.15);
}

body.theme-night .difficulty-stars {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
}

.article-card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.45;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  padding-top: 6px;
  border-top: 2px dashed rgba(0,0,0,0.12);
}

body.theme-night .article-card-footer {
  border-top-color: rgba(255,255,255,0.14);
}

.read-badge {
  font-weight: 700;
  color: var(--mc-grass-mid);
}

.read-badge.done {
  color: #139b48;
}

/* ===== 诵读室 ===== */
.reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.reader-tools {
  display: flex;
  gap: 6px;
}

.audio-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  flex-wrap: wrap;
}

.audio-hint {
  font-size: 12px;
  color: var(--text-sub);
  margin-left: auto;
}

/* 羊皮纸古文阅读区 */
.mc-parchment {
  background: var(--bg-parchment);
  border: 4px solid #6b4f32;
  box-shadow:
    inset 0 0 0 3px rgba(194, 161, 108, 0.35),
    0 5px 0 rgba(0,0,0,0.22);
  padding: 18px 10px 22px;
  margin-bottom: 14px;
}

body.theme-night .mc-parchment {
  border-color: #3b4256;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.06), 0 5px 0 rgba(0,0,0,0.45);
}

.article-title-block {
  text-align: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px dashed rgba(120, 95, 60, 0.35);
}

.biome-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  background: rgba(93, 166, 55, 0.16);
  color: var(--text-pinyin);
  border: 1px solid currentColor;
  margin-bottom: 8px;
}

.reader-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
}

.reader-author {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
}

.reader-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sentence-block {
  padding: 8px 6px 6px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  line-height: 2.25;
}

.sentence-block.sentence-short {
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.sentence-block.sentence-short::-webkit-scrollbar {
  display: none;
}

.char-unit {
  display: inline-flex;
  align-items: flex-end;
  white-space: nowrap;
  vertical-align: bottom;
}

.sentence-block:hover {
  background: rgba(93, 166, 55, 0.08);
}

.sentence-block.speaking {
  background: rgba(252, 238, 75, 0.25);
  border-color: var(--mc-gold-dark);
}

body.theme-night .sentence-block.speaking {
  background: rgba(126, 231, 135, 0.16);
  border-color: #7ee787;
}

/* Ruby 注音精细排版 */
ruby {
  ruby-position: over;
  ruby-align: center;
  display: inline-flex;
  flex-direction: column-reverse;
  align-items: center;
  vertical-align: bottom;
  margin: 0 1px 6px;
  line-height: 1.15;
}

ruby rt {
  font-size: 0.48em;
  font-weight: 600;
  color: var(--text-pinyin);
  letter-spacing: 0.1px;
  margin-bottom: 2px;
  user-select: none;
  font-family: Arial, "Helvetica Neue", sans-serif;
}

.hide-pinyin ruby rt {
  visibility: hidden;
  height: 0;
  margin-bottom: 0;
}

.punct {
  display: inline-block;
  margin: 0 1px 6px -1px;
  vertical-align: bottom;
  line-height: 1.15;
}

/* 字号档位（兼顾手机端短句单行显示与电脑端大字阅读） */
.mc-parchment.font-sm .sentence-block { font-size: clamp(15px, 4.0vw, 19px); }
.mc-parchment.font-md .sentence-block { font-size: clamp(17px, 4.6vw, 23px); }
.mc-parchment.font-lg .sentence-block { font-size: clamp(20px, 5.3vw, 28px); }

/* 小锦囊折叠面板 */
.guide-panel {
  padding: 0;
  overflow: hidden;
}

.guide-toggle {
  width: 100%;
  background: transparent;
  border: none;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.guide-body {
  padding: 0 14px 14px;
  border-top: 2px dashed rgba(0,0,0,0.12);
}

.guide-body.hidden {
  display: none;
}

.guide-section {
  margin-top: 12px;
}

.guide-section h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-pinyin);
}

.guide-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-main);
}

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 8px;
}

.vocab-item {
  background: rgba(0,0,0,0.05);
  border: 2px solid rgba(0,0,0,0.15);
  padding: 8px;
  font-size: 13px;
}

body.theme-night .vocab-item {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
}

.vocab-word {
  font-weight: 800;
  color: var(--text-pinyin);
  margin-bottom: 2px;
}

/* 挖矿打卡区 */
.mine-panel {
  text-align: center;
}

.mine-progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.mine-action-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
}

/* ===== 背包 & 村民商店 & 成就 ===== */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.inv-slot {
  background: #8b8b8b;
  border: 3px solid #373737;
  box-shadow: inset 3px 3px 0 #555, inset -3px -3px 0 #fff;
  padding: 10px 6px;
  text-align: center;
  color: #fff;
}

.inv-icon {
  font-size: 26px;
  line-height: 1.2;
}

.inv-name {
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
  text-shadow: 1px 1px 0 #000;
}

.inv-count {
  font-size: 13px;
  font-weight: 900;
  color: var(--mc-gold);
  text-shadow: 1px 1px 0 #000;
}

.shop-list, .achievement-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-parchment);
  border: 2px solid var(--border-pixel);
  padding: 10px 12px;
}

.shop-item-info {
  flex: 1;
}

.shop-item-title {
  font-weight: 800;
  font-size: 14px;
}

.shop-item-cost {
  font-size: 12px;
  color: #139b48;
  font-weight: 700;
  margin-top: 2px;
}

.ach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 2px solid var(--border-pixel);
  background: var(--bg-parchment);
  opacity: 0.55;
}

.ach-item.unlocked {
  opacity: 1;
  border-color: var(--mc-gold-dark);
  background: linear-gradient(90deg, rgba(252,238,75,0.14), var(--bg-parchment));
}

.ach-icon {
  font-size: 24px;
}

.ach-title {
  font-weight: 800;
  font-size: 14px;
}

.ach-desc {
  font-size: 12px;
  color: var(--text-sub);
}

/* ===== 家长设置 & 日历 ===== */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day {
  background: rgba(0,0,0,0.06);
  border: 2px solid rgba(0,0,0,0.15);
  padding: 6px 2px;
  text-align: center;
  font-size: 11px;
}

.cal-day.checked {
  background: var(--mc-grass-top);
  color: #fff;
  border-color: var(--mc-grass-dark);
  font-weight: 800;
}

.cal-day-mark {
  font-size: 14px;
  margin-top: 2px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.setting-row input,
.setting-row select,
.modal-form input {
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
  border: 2px solid var(--border-pixel);
  background: var(--bg-parchment);
  color: var(--text-main);
}

.setting-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tip-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-sub);
}

/* ===== 底部导航栏 ===== */
.mc-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 820px;
  background: #3d352e;
  border-top: 4px solid #1e1915;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-bottom: var(--safe-bottom);
  z-index: 60;
}

.nav-item {
  background: transparent;
  border: none;
  border-right: 2px solid rgba(0,0,0,0.3);
  color: #cfc6ba;
  padding: 8px 4px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  font-family: inherit;
}

.nav-item:last-child {
  border-right: none;
}

.nav-item.active {
  background: #5a4d41;
  color: var(--mc-gold);
  box-shadow: inset 0 3px 0 var(--mc-grass-top);
}

.nav-icon {
  font-size: 20px;
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
}

/* ===== 弹窗 & Toast ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-overlay.hidden {
  display: none;
}

.mc-modal {
  width: 100%;
  max-width: 380px;
  background: var(--bg-panel);
  border: 4px solid #1e1e1e;
  box-shadow: inset 3px 3px 0 rgba(255,255,255,0.45), 0 8px 24px rgba(0,0,0,0.5);
  padding: 18px;
  text-align: center;
  animation: popIn 0.2s ease;
}

@keyframes popIn {
  from { transform: scale(0.88); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-banner {
  font-size: 19px;
  font-weight: 900;
  margin-bottom: 14px;
  color: var(--text-main);
}

.reward-showcase {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.reward-chip {
  background: #3d3d3d;
  color: #fff;
  border: 3px solid #1c1c1c;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.reward-chip .big-emoji {
  font-size: 30px;
}

.reward-msg {
  font-size: 14px;
  color: var(--text-sub);
  margin: 0 0 16px;
  line-height: 1.5;
}

.modal-close-btn {
  width: 100%;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-actions .mc-btn {
  flex: 1;
}

.mc-toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(24, 24, 24, 0.92);
  color: #fff;
  border: 2px solid var(--mc-gold);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  z-index: 120;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-toast.hidden {
  display: none;
}

/* ===== 平板 & 电脑端适配 ===== */
@media (min-width: 640px) {
  .xp-text {
    display: inline;
  }
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .inventory-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .mc-parchment {
    padding: 28px 32px;
  }
}
