/* ?????? - ???? UI */
:root {
  --font-ui: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
/* 拉丁语（英/法/德）Fredoka 标题 + Nunito 正文；中文走 :root 黑体 */
html[data-locale="en"],
html[data-locale="fr"],
html[data-locale="de"] {
  --font-ui: "Nunito", "Fredoka", system-ui, sans-serif;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #87c5e8;
  font-family: var(--font-ui);
  /* CrazyGames：禁用页面选择 / 拖拽 */
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  /* 游戏风滚动条（Firefox） */
  scrollbar-width: thin;
  scrollbar-color: #c4892a #efe0c4;
}
.hidden { display: none !important; }

/* ---------- 自定义滚动条（木筏羊皮纸风格） ---------- */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #f3e6c8, #e8d4a8);
  border-radius: 8px;
  border: 1px solid #c8b070;
  box-shadow: inset 0 1px 2px rgba(90, 60, 20, .12);
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e8b86a 0%, #c4892a 55%, #a06a28 100%);
  border-radius: 8px;
  border: 2px solid #8a5a2b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #f0c878 0%, #d49a3a 55%, #b07830 100%);
}
*::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #d4a050 0%, #a06a28 100%);
}
*::-webkit-scrollbar-corner { background: #e8d4a8; }

/* ---------- ?????SDK ???? ---------- */
#bootScreen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #6eb8e0 0%, #87c5e8 45%, #a8d4ef 100%);
  transition: opacity .28s ease;
}
#bootScreen.boot-hide { opacity: 0; pointer-events: none; }
.bootInner { text-align: center; color: #fff; text-shadow: 0 2px 8px rgba(0,40,80,.35); }
.bootTitle { font-size: 2rem; font-weight: 800; letter-spacing: .06em; }
.bootSub { margin-top: 6px; opacity: .85; font-size: .95rem; font-weight: 600; }
.bootStatus { margin-top: 22px; font-size: .9rem; opacity: .9; }

#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#flyLayer { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.flyIcon { position: absolute; font-size: 26px; transform: translate(-50%, -50%);
  transition: all .55s cubic-bezier(.3,-0.2,.4,1.1); text-shadow: 0 2px 4px rgba(0,0,0,.35); }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
#stats { position: absolute; top: 14px; left: 14px; display: flex; flex-direction: column; gap: 11px; }
.bar {
  display: flex; align-items: center; gap: 9px;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.18));
  transition: transform .35s cubic-bezier(.34, 1.55, .45, 1);
}
.bar.bar-bump { animation: barBump .42s cubic-bezier(.34, 1.7, .45, 1); }
.bicon {
  font-size: 22px; width: 28px; text-align: center;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.35));
  transform-origin: center;
  transition: transform .35s cubic-bezier(.34, 1.7, .45, 1);
}
.bar.bar-bump .bicon { animation: iconPop .48s cubic-bezier(.22, 1.7, .36, 1); }
.bar.bar-low .bicon { animation: iconWorry 1.1s ease-in-out infinite; }
.bar.bar-crit .bicon { animation: iconPanic .55s ease-in-out infinite; }
.tracks { display: flex; align-items: center; gap: 4px; }
.track {
  position: relative;
  width: 186px; height: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), transparent 45%),
    rgba(14, 22, 36, .58);
  border-radius: 12px;
  border: 2.5px solid rgba(255,255,255,.82);
  overflow: hidden;
  box-shadow:
    0 4px 10px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -2px 4px rgba(0,0,0,.2);
}
.track::before {
  content: '';
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.28), transparent 42%, rgba(0,0,0,.08) 100%);
  border-radius: inherit;
}
.track-extra {
  width: 62px;
  border-color: rgba(255,230,160,.95);
  box-shadow: 0 3px 8px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,220,140,.28);
}
.track-extra .fill.hunger {
  background: linear-gradient(180deg, #ffe898 0%, #ffc840 42%, #f09000 100%);
  filter: saturate(1.22);
}
.track-extra .fill.thirst {
  background: linear-gradient(180deg, #b8f0ff 0%, #58d0ff 42%, #1aaef8 100%);
  filter: saturate(1.22);
}
.fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 100%; height: 100%;
  border-radius: 10px;
  transform: scaleX(var(--p, 1));
  transform-origin: left center;
  transition: transform .55s cubic-bezier(.22, 1.55, .36, 1);
  will-change: transform;
  overflow: hidden;
}
.fillShine {
  position: absolute; inset: 0;
  background: linear-gradient(105deg,
    transparent 0%, transparent 38%,
    rgba(255,255,255,.55) 50%,
    transparent 62%, transparent 100%);
  background-size: 220% 100%;
  animation: barShine 8.5s ease-in-out infinite;
  pointer-events: none;
}
.fill.hp {
  background:
    linear-gradient(180deg, rgba(255,255,255,.35), transparent 40%),
    linear-gradient(180deg, #ff8a8a 0%, #ff3a3a 48%, #d01010 100%);
  box-shadow: 0 0 10px rgba(255,60,60,.42);
  filter: saturate(1.22);
}
.fill.hunger {
  background:
    linear-gradient(180deg, rgba(255,255,255,.35), transparent 40%),
    linear-gradient(180deg, #ffd070 0%, #ff9a18 48%, #e06000 100%);
  box-shadow: 0 0 10px rgba(255,140,20,.38);
  filter: saturate(1.22);
}
.fill.thirst {
  background:
    linear-gradient(180deg, rgba(255,255,255,.4), transparent 40%),
    linear-gradient(180deg, #8adcff 0%, #2aa8ff 48%, #0078e0 100%);
  box-shadow: 0 0 10px rgba(30,150,255,.4);
  filter: saturate(1.22);
}
.bar.bar-low .fill { filter: saturate(1.35); }
.bar.bar-crit .track {
  animation: trackBlink .7s ease-in-out infinite;
  border-color: rgba(255,160,160,.95);
}
.bar.bar-crit .fill {
  animation: fillPulse .7s ease-in-out infinite;
}
.bnum {
  font-size: 13px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.65), 0 0 8px rgba(255,255,255,.15);
  width: 38px; font-variant-numeric: tabular-nums;
  transition: transform .35s cubic-bezier(.34, 1.7, .45, 1), color .25s;
}
.bar.bar-bump .bnum { animation: numPop .4s cubic-bezier(.22, 1.7, .36, 1); }
.bar.bar-crit .bnum { color: #ffb4b4; }

@keyframes barShine {
  0% { background-position: 140% 0; opacity: .35; }
  45% { opacity: .85; }
  100% { background-position: -60% 0; opacity: .35; }
}
@keyframes barBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.045, 1.08); }
  70% { transform: scale(.985, .97); }
  100% { transform: scale(1); }
}
@keyframes iconPop {
  0% { transform: scale(1) rotate(0); }
  35% { transform: scale(1.35) rotate(-10deg); }
  65% { transform: scale(.9) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes iconWorry {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.08); }
}
@keyframes iconPanic {
  0%, 100% { transform: translateX(0) scale(1.05); }
  25% { transform: translateX(-2px) scale(1.12); }
  75% { transform: translateX(2px) scale(1.12); }
}
@keyframes numPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.28); }
  100% { transform: scale(1); }
}
@keyframes trackBlink {
  0%, 100% { box-shadow: 0 4px 10px rgba(0,0,0,.3), 0 0 0 0 rgba(255,80,80,0); }
  50% { box-shadow: 0 4px 10px rgba(0,0,0,.3), 0 0 14px 2px rgba(255,70,70,.45); }
}
@keyframes fillPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25) saturate(1.2); }
}

/* Q 版昼夜仪表盘 */
#dayInfo.dayGauge {
  position: absolute; top: 12px; right: 14px;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 8px;
  background:
    linear-gradient(160deg, rgba(255,255,255,.2), transparent 42%),
    linear-gradient(180deg, rgba(36, 52, 78, .72), rgba(18, 28, 44, .78));
  border: 2.5px solid rgba(255,255,255,.78);
  border-radius: 22px;
  color: #fff; font-weight: 800;
  box-shadow:
    0 6px 18px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.2),
    0 0 0 1px rgba(120,180,255,.12);
  backdrop-filter: blur(6px);
  animation: dayGaugeIdle 3.6s ease-in-out infinite;
  transition: transform .4s cubic-bezier(.34, 1.55, .45, 1), box-shadow .35s;
}
#dayInfo.dayGauge.day-bump {
  animation: dayGaugeBump .5s cubic-bezier(.22, 1.65, .36, 1);
}
.dayGaugeDial {
  position: relative; width: 54px; height: 54px; flex-shrink: 0;
}
.dayGaugeRing {
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.35), transparent 42%),
    conic-gradient(from -90deg,
      #ffe08a 0%, #ffb04a 18%, #7ec8ff 42%, #4a6ad8 62%, #2a3560 78%, #ffb88a 92%, #ffe08a 100%);
  box-shadow:
    0 3px 8px rgba(0,0,0,.3),
    inset 0 0 0 2px rgba(255,255,255,.55),
    inset 0 0 10px rgba(0,0,0,.15);
}
.dayGaugeProgress {
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: conic-gradient(from -90deg,
    rgba(255,255,255,.92) 0deg,
    rgba(255,255,255,.92) var(--day-ang, 0deg),
    rgba(10,16,28,.55) var(--day-ang, 0deg),
    rgba(10,16,28,.55) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  transition: --day-ang .45s cubic-bezier(.22, 1.4, .36, 1);
  filter: drop-shadow(0 0 4px rgba(255,230,160,.5));
}
.dayGaugeHand {
  position: absolute; left: 50%; top: 50%;
  width: 2.5px; height: 18px;
  margin-left: -1.25px; margin-top: -18px;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, #fff8e0, #ffd36a 70%, #e8a020);
  transform-origin: 50% 100%;
  transform: rotate(0deg);
  transition: transform .55s cubic-bezier(.22, 1.55, .36, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
  z-index: 3;
}
.dayGaugeHand::after {
  content: '';
  position: absolute; left: 50%; bottom: -3px;
  width: 7px; height: 7px; margin-left: -3.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #ffd36a 55%, #d49220);
  box-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.dayGaugeCore {
  position: absolute; inset: 11px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.5), transparent 45%),
    linear-gradient(160deg, #fff6e0, #d8ecff 55%, #c8d8f0);
  border: 2px solid rgba(255,255,255,.85);
  box-shadow:
    0 2px 6px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.7);
  z-index: 2;
  transition: transform .45s cubic-bezier(.34, 1.7, .45, 1);
}
#dayInfo.day-bump .dayGaugeCore {
  animation: gaugeCorePop .5s cubic-bezier(.22, 1.7, .36, 1);
}
.dayGaugeCore #phaseIcon {
  font-size: 18px; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
  display: block;
}
.dayGaugeTicks {
  position: absolute; inset: 5px; border-radius: 50%;
  background:
    repeating-conic-gradient(from -90deg,
      rgba(255,255,255,.55) 0deg 1.2deg,
      transparent 1.2deg 30deg);
  -webkit-mask: radial-gradient(farthest-side, transparent 62%, #000 63%, #000 78%, transparent 79%);
  mask: radial-gradient(farthest-side, transparent 62%, #000 63%, #000 78%, transparent 79%);
  opacity: .7; pointer-events: none; z-index: 1;
}
.dayGaugeMeta {
  display: flex; flex-direction: column; gap: 1px; min-width: 72px;
}
.dayGaugeDay {
  font-size: 13px; font-weight: 900; letter-spacing: .02em;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  color: #fff4d8;
}
.dayGaugeClock {
  font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  background: linear-gradient(180deg, #fff, #ffe9a8);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.45));
  line-height: 1.15;
  transition: transform .4s cubic-bezier(.34, 1.7, .45, 1);
}
#dayInfo.day-bump .dayGaugeClock {
  animation: numPop .42s cubic-bezier(.22, 1.7, .36, 1);
}
.dayGaugeWeather {
  font-size: 14px; min-height: 16px; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}
.dayGaugeWeather:empty, .dayGaugeWeather:has(#weatherIcon:empty) { display: none; }

@keyframes dayGaugeIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@keyframes dayGaugeBump {
  0% { transform: scale(1) rotate(0); }
  40% { transform: scale(1.07) rotate(-2deg); }
  70% { transform: scale(.97) rotate(1deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes gaugeCorePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

#storyQuest {
  position: absolute; top: 86px; right: 16px; max-width: min(280px, 46vw);
  background: rgba(18,26,40,.62);
  border: 2px solid rgba(255,230,170,.78); border-radius: 12px;
  padding: 8px 12px; color: #fff8e8; font-weight: 800; font-size: 13px; line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
  box-shadow: 0 4px 12px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.1);
  display: flex; flex-direction: column; gap: 3px; pointer-events: none;
  animation: storyQuestIn .28s ease-out;
}
#storyQuest.hidden { display: none; }
.storyQuestLabel {
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #ffd98a; opacity: .92;
}
.storyQuestText { font-size: 13px; font-weight: 800; color: #fff; }

#missionHud {
  position: absolute; top: 138px; right: 16px; max-width: min(300px, 48vw);
  background: rgba(18,40,36,.68);
  border: 2px solid rgba(90,208,168,.72); border-radius: 12px;
  padding: 7px 11px; color: #e8fff6; font-weight: 800; font-size: 12px; line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  box-shadow: 0 4px 12px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.1);
  pointer-events: none;
  animation: storyQuestIn .28s ease-out;
}
#missionHud.hidden { display: none; }
#missionHud .missionHudLabel {
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #5ad0a8; opacity: .95; display: block; margin-bottom: 2px;
}
#missionHud .missionHudText { font-size: 12px; font-weight: 800; color: #e8fff6; }

@keyframes storyQuestIn {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#hotbar { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; pointer-events: auto; align-items: flex-end; z-index: 2; }
.slot { width: 54px; height: 54px; border-radius: 14px; background: rgba(18,26,40,.55);
  border: 3px solid rgba(255,255,255,.58); position: relative; display: flex;
  align-items: center; justify-content: center; font-size: 24px; cursor: pointer;
  transition: transform .12s, border-color .12s, background .12s, box-shadow .12s;
  box-shadow: 0 4px 10px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.1); }
.slot:hover { transform: scale(1.08); }
.slot.active { border-color: #ffd94d; background: rgba(80,60,20,.58); transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0,0,0,.3), 0 0 0 2px rgba(255,217,77,.28); }
.slot.weaponSlot { border-color: rgba(200,160,90,.85); background: rgba(50,40,25,.55); }
.slot.weaponSlot.active { border-color: #e8a83e; background: rgba(90,60,20,.65); box-shadow: 0 0 0 2px rgba(232,168,62,.35); }
.slot.deviceSlot { border-color: rgba(110,180,220,.9); background: rgba(30,45,60,.55); }
.slot.deviceSlot.active { border-color: #6ec8ff; background: rgba(40,70,100,.7); box-shadow: 0 0 0 2px rgba(110,200,255,.35); }
.slot .key { position: absolute; top: 1px; left: 5px; font-size: 11px; font-weight: 800; color: #ffe9a8;
  text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.slot .cnt { position: absolute; bottom: 1px; right: 5px; font-size: 12px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.slot .sub { position: absolute; bottom: 1px; left: 4px; font-size: 10px; line-height: 1; }
.slot.empty { opacity: .45; }

/* 宽屏：右侧并列；窄屏/非全屏 iframe：抬到热键栏上方，避免与 7/8 槽重叠 */
#hudBtns { position: absolute; bottom: 14px; right: 16px; display: flex; gap: 8px; pointer-events: auto; z-index: 3; }
.hbtn { border: 3px solid rgba(255,255,255,.68); background: rgba(18,26,40,.58); color: #fff;
  font-weight: 800; font-size: 14px; border-radius: 12px; padding: 8px 13px; cursor: pointer;
  transition: transform .12s, background .12s, box-shadow .12s; font-family: inherit;
  box-shadow: 0 3px 8px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.1); }
.hbtn i { font-style: normal; opacity: .7; font-size: 11px; }
.hbtn:hover { transform: scale(1.06); background: rgba(55,85,125,.7); }
.hbtn:active { transform: scale(.94); }
html[data-locale="fr"] .hbtn,
html[data-locale="de"] .hbtn { font-size: 13px; padding: 8px 10px; }

/* HUD 补给空投入口：放在左侧状态条下方，避开右侧任务/委托 UI */
.hudSupplyBtn {
  position: absolute; top: 158px; left: 16px; right: auto; z-index: 4; pointer-events: auto;
  width: 54px; height: 54px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.7);
  background: rgba(18, 36, 58, .72);
  color: #fff; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  transition: transform .12s, background .12s, border-color .12s;
}
.hudSupplyBtn.hidden { display: none !important; }
.hudSupplyBtn:hover { transform: scale(1.08); background: rgba(40, 70, 110, .8); }
.hudSupplyBtn.ready { border-color: #ffd94d; box-shadow: 0 0 14px rgba(255, 200, 60, .45); }
.hudSupplyBtn.onCd { opacity: .92; }
.hudSupplyBtn:disabled { opacity: .55; cursor: wait; }
.hudSupplyIcon { font-size: 22px; line-height: 1; position: relative; z-index: 1; }
.hudSupplyRing {
  position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px);
  transform: rotate(-90deg); pointer-events: none;
}
.hudSupplyRingBg { stroke: rgba(255,255,255,.22); stroke-width: 3; }
.hudSupplyRingFg {
  stroke: #ffd94d; stroke-width: 3.2; stroke-linecap: round;
  stroke-dasharray: 97.4; stroke-dashoffset: 97.4;
  transition: stroke-dashoffset .2s linear;
}
.hudSupplyCd {
  position: absolute; bottom: -2px; right: -2px; z-index: 2;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; font-size: 10px; font-weight: 900;
  background: #1a2a40; color: #ffe08a; border: 2px solid #c9a05a;
  display: flex; align-items: center; justify-content: center;
}
.hudSupplyCd:empty { display: none; }
.hudSupplyActions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.overReviveHint {
  color: #ffe9c0; font-weight: 700; font-size: 13px; text-align: center;
  max-width: 420px; margin: 0 0 8px; line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.overConfirm {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px;
  background: rgba(10, 16, 28, .88);
  border-radius: inherit;
}
.overConfirm.hidden { display: none !important; }
.overConfirmText {
  color: #fff; font-weight: 800; font-size: 15px; line-height: 1.5;
  text-align: center; max-width: 420px;
}
.overConfirmBtns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.mbtn.danger {
  background: linear-gradient(180deg, #e07060, #b03830) !important;
  border-color: #7a2018 !important; color: #fff !important;
}

/* CrazyGames 常见非全屏宽度（约 821–1216）：热键栏与右侧按钮错层 */
@media (max-width: 1180px) {
  #hudBtns {
    bottom: 76px;
    right: 12px;
    flex-wrap: wrap;
    max-width: min(380px, 48vw);
    justify-content: flex-end;
  }
  #hint { bottom: 148px; }
  body.soft-arrow-on #hint { bottom: 168px; }
}
@media (max-width: 820px) {
  #hudBtns {
    bottom: 70px;
    max-width: min(360px, 92vw);
    gap: 6px;
  }
  .hbtn { padding: 6px 10px; font-size: 12px; border-width: 2px; }
  .hbtn i { font-size: 10px; }
  #hotbar { gap: 5px; }
  .slot { width: 48px; height: 48px; font-size: 22px; border-radius: 12px; }
  #hint { bottom: 136px; max-width: 88vw; font-size: 13px; padding: 8px 14px; }
}

/* ---------- ?? ---------- */
#hint { position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%); z-index: 30;
  background: rgba(22,30,48,.9); color: #fff; padding: 11px 16px 11px 24px; border-radius: 16px;
  border: 2px solid #ffd94d; font-size: 15px; font-weight: 700; max-width: 72vw; text-align: left;
  line-height: 1.5;
  box-shadow: 0 6px 18px rgba(0,0,0,.38); animation: hintPop .34s cubic-bezier(.22,1.3,.36,1);
  transition: opacity .24s ease, transform .24s ease, filter .24s ease;
  pointer-events: none;
  display: flex; align-items: flex-end; gap: 12px; }
#hintText { flex: 1; min-width: 0; text-align: center; }
.hintAck {
  pointer-events: auto; cursor: pointer; flex-shrink: 0;
  margin: 0; padding: 3px 10px;
  font-family: var(--font-display); font-size: 11px; font-weight: 800;
  color: #d8e4f4; background: linear-gradient(180deg, rgba(48, 62, 88, .95), rgba(32, 44, 66, .96));
  border: 2px solid rgba(120, 148, 186, .42); border-radius: 999px;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.hintAck:hover {
  color: #fff;
  background: linear-gradient(180deg, rgba(58, 74, 104, .98), rgba(40, 54, 78, .98));
  border-color: rgba(160, 186, 220, .55);
}
.hintAck:active { transform: scale(.94); }
.hintAck.hidden { display: none !important; }
#hint.hint-out { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.96); filter: blur(2px); }
@keyframes hintPop { from { transform: translateX(-50%) translateY(10px) scale(.82); opacity: 0; } to { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; } }

/* ---------- 硬性教程教练：左下角空白槽（JS 按 HUD 避让并缩放；箭头在 #coach 外） ---------- */
.coach {
  position: fixed;
  left: 12px; right: auto; bottom: 12px; top: auto; margin: 0;
  z-index: 80; pointer-events: none;
  display: flex; flex-direction: column; align-items: stretch; gap: 0;
  width: min(280px, 32vw);
  opacity: 1;
  transform: scale(var(--coach-scale, 1));
  transform-origin: var(--coach-origin, left bottom);
  /* 入场只靠 .coachCard 动画；勿给根节点做 opacity 过渡，否则会与 coach-in 叠成「播两次」 */
}
/* 日记确认等：优先顶左；实际坐标仍由 layoutCoachDock 写入 */
.coach.coach-top {
  top: 12px; bottom: auto;
  transform-origin: var(--coach-origin, left top);
}
/* 旧方位 class 兼容：同样停在左下角槽 */
.coach.coach-side,
.coach.coach-panel {
  top: auto; bottom: 12px; left: 12px; right: auto;
  width: min(280px, 32vw);
  align-items: stretch;
  z-index: 80;
}
.coach.coach-side .coachCard,
.coach.coach-panel .coachCard {
  text-align: left;
  padding: 10px 14px 12px;
}
.coach.hidden { display: none !important; }

/* 教练显示时隐藏底部 hint，避免同槽位叠层（教练本身已在高层） */
body.coach-on #hint {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
body.coach-on #modeTip {
  top: 12px;
  left: auto;
  right: 16px;
  transform: none;
}
/* 饥饿软提示箭头：把底部 hint 略抬高，避免盖住快捷栏 2 的箭头 */
body.soft-arrow-on #hint { bottom: 118px; }
.coachCard {
  background: linear-gradient(180deg, rgba(28, 38, 58, .94), rgba(18, 26, 42, .96));
  color: #fff; padding: 10px 14px 12px; border-radius: 16px;
  border: 3px solid #ffd94d;
  box-shadow: 0 8px 24px rgba(0,0,0,.42), 0 0 0 2px rgba(255, 200, 80, .2);
  text-align: left; width: 100%;
}
.coach-in .coachCard {
  animation: coachCardIn .28s cubic-bezier(.22,1,.36,1) both;
}
.coach-out {
  opacity: 0 !important;
  transition: opacity .18s ease-out;
}
.coach-out .coachCard { animation: none !important; }
@keyframes coachCardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
/* 步骤完成：边框变绿即可，避免 scale 脉冲与淡出叠出颠卡 */
.coach-done .coachCard {
  border-color: #b5e85e;
  box-shadow: 0 8px 24px rgba(0,0,0,.42),
    0 0 0 3px rgba(181,232,94,.45),
    0 0 20px rgba(150,220,90,.35);
  transition: border-color .2s, box-shadow .2s;
}
.coach-done .coachStep {
  color: #2e5210;
  background: linear-gradient(180deg, #dcf79c, #a8e062);
  border-color: #5c8a2b;
}
.coachHead {
  display: flex; align-items: center; justify-content: flex-start; gap: 8px;
  margin-bottom: 6px; flex-wrap: wrap;
}
.coachStep {
  font-size: 11px; font-weight: 900; letter-spacing: .06em;
  color: #ffe9a8; background: rgba(255, 217, 77, .16);
  border: 1px solid rgba(255, 217, 77, .45);
  padding: 2px 10px; border-radius: 999px;
}
.coachKeys {
  font-size: 12px; font-weight: 900; color: #1a2a18;
  background: linear-gradient(180deg, #ffe08a, #ffc94d);
  border: 2px solid #c4892a; border-radius: 8px;
  padding: 2px 10px; letter-spacing: .04em;
}
.coachText {
  font-size: 14px; font-weight: 700; line-height: 1.4; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.coachText b { color: #ffd94d; }
.coachSkip {
  pointer-events: auto; cursor: pointer;
  margin: 0; padding: 5px 12px;
  font-family: var(--font-display); font-size: 12px; font-weight: 800;
  color: #c8d4e8; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px;
  transition: background .15s, color .15s, border-color .15s;
}
.coachSkip:hover {
  color: #fff; background: rgba(255,255,255,.16);
  border-color: rgba(255,217,77,.55);
}
.coachSkip.hidden { display: none !important; }
.coachFoot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 10px;
}
.coachAck {
  pointer-events: auto; cursor: pointer;
  margin: 0 0 0 auto; padding: 5px 12px;
  font-family: var(--font-display); font-size: 12px; font-weight: 800;
  color: #d8e4f4; background: linear-gradient(180deg, rgba(48, 62, 88, .95), rgba(32, 44, 66, .96));
  border: 2px solid rgba(120, 148, 186, .42); border-radius: 999px;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.coachAck:hover {
  color: #fff;
  background: linear-gradient(180deg, rgba(58, 74, 104, .98), rgba(40, 54, 78, .98));
  border-color: rgba(160, 186, 220, .55);
}
.coachAck:active { transform: scale(.94); }
.coachAck.hidden { display: none !important; }
.coachSpotlight {
  position: fixed; inset: 0; z-index: 79;
  pointer-events: auto;
}
.coachSpotlight.hidden { display: none !important; }
.coachSpotlight.spot-out {
  opacity: 0; pointer-events: none;
  transition: opacity .42s ease;
}
.coachSpotHole {
  position: fixed; pointer-events: none;
  border-radius: 20px;
  box-shadow: 0 0 0 200vmax rgba(4, 8, 18, .82), 0 0 0 3px rgba(255, 217, 77, .7);
  animation: coachSpotPulse 2.2s ease-in-out infinite;
}
@keyframes coachSpotPulse {
  0%, 100% {
    box-shadow: 0 0 0 200vmax rgba(4, 8, 18, .84), 0 0 0 3px rgba(255, 217, 77, .45), 0 0 18px rgba(255, 200, 80, .35);
  }
  50% {
    box-shadow: 0 0 0 200vmax rgba(4, 8, 18, .62), 0 0 0 5px rgba(255, 243, 176, .95), 0 0 28px 8px rgba(255, 217, 77, .55);
  }
}
.coachHighlight {
  outline: 3px solid #ffd94d !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(255, 200, 60, .35), 0 0 18px rgba(255, 200, 60, .55) !important;
  animation: coachHilitePulse 1s ease-in-out infinite;
  z-index: 40; position: relative;
}
.coachHighlightStrong {
  outline-width: 4px !important;
  outline-offset: 4px !important;
  /* 不用 transform 抖动，避免与按钮自身 transform / 布局叠出颠卡 */
  animation: coachHilitePulse 0.9s ease-in-out infinite !important;
  box-shadow: 0 0 0 5px rgba(255, 180, 40, .45), 0 0 28px rgba(255, 200, 60, .85) !important;
}
.hudTutHilite {
  border-radius: 10px;
}
@keyframes coachHilitePulse {
  0%, 100% { outline-color: #ffd94d; }
  50% { outline-color: #fff3b0; }
}
.coachArrow {
  position: fixed; z-index: 81; pointer-events: none;
  width: 40px; height: 40px; margin-left: -20px; margin-top: -8px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.45));
}
.coachArrow.hidden { display: none !important; }
.coachArrowGlyph {
  font-size: 28px; line-height: 1; color: #ffd94d;
  text-shadow: 0 0 8px rgba(255, 200, 60, .7), 0 2px 0 #8a5a2b;
  animation: coachBob 1.15s ease-in-out infinite;
  will-change: transform;
}
.coachArrow[data-kind="ui"] .coachArrowGlyph { color: #9fd4ff; text-shadow: 0 0 8px rgba(100,180,255,.6), 0 2px 0 #2a5080; }
@keyframes coachBob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
@media (max-width: 1180px) {
  .coach,
  .coach.coach-side,
  .coach.coach-panel {
    width: min(240px, 30vw);
  }
  .coach.coach-top { top: 12px; bottom: auto; }
}
@media (max-height: 720px) {
  .coach.coach-top { top: 8px; }
  .coachCard { padding: 8px 12px 10px; }
  .coachText { font-size: 13px; }
}
@media (max-width: 820px) {
  .coach,
  .coach.coach-side,
  .coach.coach-panel {
    width: min(220px, 42vw);
  }
  .coach.coach-top { top: 8px; bottom: auto; width: min(220px, 42vw); }
  .coachText { font-size: 12px; line-height: 1.35; }
  .coachSkip { padding: 4px 12px; font-size: 11px; }
  .coachAck { padding: 4px 10px; font-size: 11px; }
}

#modeTip { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 30;
  background: rgba(60,120,60,.88); color: #fff; padding: 8px 18px; border-radius: 14px;
  border: 2px solid #c6ffb0; font-size: 14px; font-weight: 700; pointer-events: none;
  box-shadow: 0 5px 14px rgba(0,0,0,.3);
  animation: modeTipPop .26s cubic-bezier(.22,1.3,.36,1);
  max-width: min(420px, 70vw); text-align: center; }
@keyframes modeTipPop {
  from { transform: translateX(-50%) translateY(-8px) scale(.9); opacity: 0; }
  to { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

/* ---------- 成就解锁 Toast ---------- */
.achToast {
  position: fixed; top: 72px; left: 50%; z-index: 40;
  width: min(420px, 90vw);
  pointer-events: none;
  transform: translateX(-50%);
  overflow: visible;
}
.achToast.hidden { display: none; }
.achToastInner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px 14px 14px;
  background:
    linear-gradient(135deg, rgba(255,248,220,.95), rgba(255,228,160,.92) 40%, rgba(255,210,120,.9)),
    linear-gradient(180deg, #fff8e8, #ffe0a8);
  border: 3px solid #c4892a;
  border-radius: 18px 22px 16px 20px / 20px 16px 22px 18px;
  box-shadow:
    0 12px 32px rgba(40, 24, 8, .45),
    0 0 0 2px rgba(255, 217, 77, .35),
    inset 0 1px 0 rgba(255,255,255,.7);
  overflow: hidden;
  isolation: isolate;
}
.achToastShine {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 48%, transparent 62%);
  transform: translateX(-120%);
  border-radius: inherit;
}
.achToast-in .achToastShine { animation: achShine 1.1s ease-out .15s forwards; }
.achToastBadge {
  position: relative; z-index: 1;
  flex: 0 0 54px; width: 54px; height: 54px;
  display: grid; place-items: center;
  font-size: 28px;
  background: radial-gradient(circle at 35% 30%, #fff6d0, #f0c050 55%, #c4892a);
  border: 3px solid #8a5a2b;
  border-radius: 50%;
  box-shadow: 0 3px 0 rgba(90,50,20,.2), inset 0 2px 0 rgba(255,255,255,.55);
  animation: achBadgePulse 1.6s ease-in-out infinite;
}
.achToastCopy { position: relative; z-index: 1; min-width: 0; flex: 1; }
.achToastLabel {
  font-size: 11px; font-weight: 900; letter-spacing: .12em;
  color: #a06a20; text-transform: uppercase; margin-bottom: 2px;
}
.achToastName {
  font-size: 17px; font-weight: 900; color: #5c3d1a; line-height: 1.25;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
}
.achToastDesc {
  margin-top: 3px; font-size: 12px; font-weight: 700; color: #7a5a2e; line-height: 1.4;
}
.achToastSparks {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: visible;
}
.achSpark {
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px; margin: -3px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6a8, #ffd94d 60%, transparent 70%);
  box-shadow: 0 0 8px rgba(255, 217, 77, .8);
  opacity: 0;
  transform: rotate(var(--a)) translateY(0);
}
.achToast-in .achSpark {
  animation: achSparkFly .9s ease-out calc(var(--i) * 40ms) both;
}
.achToast-in {
  animation: achToastIn .48s cubic-bezier(.2,1.1,.3,1) both;
}
.achToast-out {
  animation: achToastOut .4s ease-in both;
}
@keyframes achToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-18px) scale(.86); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes achToastOut {
  to { opacity: 0; transform: translateX(-50%) translateY(-12px) scale(.94); }
}
@keyframes achShine {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}
@keyframes achBadgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes achSparkFly {
  0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.4); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(-78px) scale(1.1); }
}

/* ---------- ?? ---------- */
.panel { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 35;
  width: min(560px, 92vw); max-height: 78vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), transparent 28%),
    linear-gradient(180deg, #fff9ec, #ffe9c8 55%, #ffe3b8);
  border: 4px solid #8a5a2b; border-radius: 22px;
  box-shadow: 0 16px 44px rgba(40,24,8,.42), 0 2px 0 rgba(255,255,255,.35) inset;
  display: flex; flex-direction: column; overflow: hidden;
  transform-origin: center center;
  contain: layout paint;
}
.panel.panel-in {
  will-change: transform, opacity, filter;
  animation: panelIn .48s cubic-bezier(.22, 1.4, .36, 1) both;
}
.panel.panel-out {
  will-change: transform, opacity, filter;
  animation: panelOut .36s cubic-bezier(.55, .05, .68, .2) both;
  pointer-events: none;
}
@keyframes panelIn {
  0% {
    transform: translate(-50%, -46%) scale(.72) rotate(-1.4deg);
    opacity: 0;
    filter: blur(5px) brightness(1.15);
    box-shadow: 0 4px 12px rgba(40,24,8,.12), 0 2px 0 rgba(255,255,255,.35) inset;
  }
  58% {
    transform: translate(-50%, -51%) scale(1.065) rotate(.55deg);
    opacity: 1;
    filter: blur(0) brightness(1.04);
    box-shadow: 0 22px 52px rgba(40,24,8,.48), 0 2px 0 rgba(255,255,255,.4) inset;
  }
  78% {
    transform: translate(-50%, -49.5%) scale(.975) rotate(-.2deg);
    filter: none;
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0);
    opacity: 1;
    filter: none;
    box-shadow: 0 16px 44px rgba(40,24,8,.42), 0 2px 0 rgba(255,255,255,.35) inset;
  }
}
@keyframes panelOut {
  0% {
    transform: translate(-50%, -50%) scale(1) rotate(0);
    opacity: 1;
    filter: none;
  }
  28% {
    transform: translate(-50%, -51.5%) scale(1.06) rotate(.6deg);
    opacity: 1;
    filter: brightness(1.06);
  }
  100% {
    transform: translate(-50%, -44%) scale(.76) rotate(1.6deg);
    opacity: 0;
    filter: blur(4px) brightness(1.12);
  }
}
.phead { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px;
  background: linear-gradient(180deg, #9a6836, #7e5126); color: #ffe9c0; font-size: 18px; font-weight: 900;
  letter-spacing: .02em; box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.pclose { background: linear-gradient(180deg, #c08a52, #a06a38); color: #fff; border: none; width: 30px; height: 30px; border-radius: 10px;
  font-size: 15px; cursor: pointer; transition: transform .12s; box-shadow: 0 2px 0 #6e4520; }
.pclose:hover { transform: scale(1.12) rotate(90deg); }
.ptip { padding: 9px 16px; font-size: 12px; color: #8a6a3b; background: linear-gradient(180deg, #f9ecd0, #f3e2c0);
  border-bottom: 1px solid rgba(138,90,43,.12); line-height: 1.45; }

#craftCats { display: flex; gap: 6px; padding: 10px 12px 6px; flex-wrap: wrap;
  border-bottom: 2px solid #e8d4a8; background: #fff6e4; }
.catBtn { border: 2px solid #b98d55; background: #fff3d9; color: #7a5326; font-weight: 800;
  padding: 5px 12px; border-radius: 10px; cursor: pointer; font-size: 12px; transition: all .12s; font-family: inherit; }
html[data-locale="fr"] .catBtn,
html[data-locale="de"] .catBtn { padding: 5px 9px; letter-spacing: 0; }
.catBtn:hover { transform: scale(1.05); background: #ffe7b8; }
.catBtn.active { background: #e8a83e; color: #fff; border-color: #b97c1e; box-shadow: 0 2px 0 #b97c1e; }
.craftPanel { width: min(780px, 96vw); }
/* 合成台 / 日志：Q 弹入场，无 blur */
.craftPanel.panel-in,
.journalPanel.panel-in {
  will-change: transform, opacity;
  animation: inkPanelIn .52s cubic-bezier(.34, 1.65, .42, 1) both;
}
.craftPanel.panel-out,
.journalPanel.panel-out {
  will-change: transform, opacity;
  animation: inkPanelOut .34s cubic-bezier(.55, .05, .68, .2) both;
}
@keyframes inkPanelIn {
  0% {
    transform: translate(-50%, -42%) scale(.68) rotate(-2.2deg);
    opacity: 0;
    box-shadow: 0 4px 12px rgba(40,24,8,.12), 0 2px 0 rgba(255,255,255,.35) inset;
  }
  42% {
    transform: translate(-50%, -52%) scale(1.14) rotate(1.1deg);
    opacity: 1;
    box-shadow: 0 26px 56px rgba(40,24,8,.5), 0 2px 0 rgba(255,255,255,.4) inset;
  }
  64% {
    transform: translate(-50%, -48.2%) scale(.92) rotate(-.55deg);
  }
  82% {
    transform: translate(-50%, -50.8%) scale(1.045) rotate(.22deg);
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0);
    opacity: 1;
    box-shadow: 0 16px 44px rgba(40,24,8,.42), 0 2px 0 rgba(255,255,255,.35) inset;
  }
}
@keyframes inkPanelOut {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1; }
  35% { transform: translate(-50%, -51.5%) scale(1.06) rotate(.5deg); opacity: 1; }
  100% { transform: translate(-50%, -43%) scale(.82) rotate(1.4deg); opacity: 0; }
}
.craftBody { position: relative; display: flex; flex: 1; overflow: hidden;
  min-height: min(52vh, 420px); background: linear-gradient(180deg, #fff6e4, #ffe9c8 55%, #ffe3b8); }
.inkRevealHost { position: relative; }
/* 空白壳：先藏内容，只露羊皮纸底 */
.inkRevealHost.ink-blank > *:not(.inkRevealCanvas) { visibility: hidden; pointer-events: none; }
.inkRevealCanvas {
  position: absolute; inset: 0; z-index: 6;
  width: 100%; height: 100%;
  pointer-events: none;
  border-radius: 0 0 18px 18px;
}
.panel.ink-open .inkRevealHost { pointer-events: none; }
.craftMain { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
#craftList { overflow-y: auto; padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.craftReady { width: 168px; flex-shrink: 0; border-left: 2px solid #e8d4a8; background: #f7f0dc;
  display: flex; flex-direction: column; overflow: hidden; }
.craftReadyTitle { padding: 10px 10px 6px; font-size: 13px; font-weight: 900; color: #5c8a2b;
  border-bottom: 1.5px solid #d4c49a; letter-spacing: 0.5px; }
.craftReadyList { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.craftReadyEmpty { font-size: 11px; color: #a08860; text-align: center; padding: 16px 6px; line-height: 1.4; }
.craftReadyItem { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px;
  background: #fffdf4; border: 2px solid #7fbf4d; cursor: pointer; transition: transform .12s, box-shadow .12s;
  font-family: inherit; text-align: left; width: 100%; }
.craftReadyItem:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(127,191,77,.3); }
.craftReadyItem .ri { font-size: 18px; flex-shrink: 0; }
.craftReadyItem .rn { font-size: 12px; font-weight: 800; color: #3d7a1e; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 620px) {
  .craftPanel { width: min(560px, 96vw); }
  .craftBody { flex-direction: column; }
  .craftReady { width: auto; border-left: none; border-top: 2px solid #e8d4a8; max-height: 140px; }
  .craftReadyList { flex-direction: row; flex-wrap: wrap; }
  .craftReadyItem { width: auto; max-width: 46%; }
}
.craftGroup { margin-bottom: 4px; }
.craftGroupTitle { font-size: 12px; font-weight: 900; color: #a07840; letter-spacing: 1px;
  padding: 4px 2px 6px; border-bottom: 1.5px solid #e0d0a8; margin-bottom: 8px; }
.recipe { display: flex; align-items: center; gap: 12px; background: linear-gradient(180deg, #fffef8, #fff8e8);
  border: 2px solid #d9bd8a; border-radius: 14px; padding: 9px 12px;
  transition: transform .12s, box-shadow .12s, border-color .12s;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset; }
.recipe.can { border-color: #7fbf4d; box-shadow: 0 0 0 2px rgba(127,191,77,.22), 0 1px 0 rgba(255,255,255,.7) inset; }
.recipe:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(138,90,43,.12); }
.ricon { font-size: 30px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: #f3e3bd; border-radius: 12px; border: 2px solid #d9bd8a; flex-shrink: 0; }
.rmid { flex: 1; min-width: 0; }
.rname { font-weight: 900; color: #5c3d1a; font-size: 15px; }
.rdesc { font-size: 12px; color: #8a6a3b; margin-top: 1px; }
.rreq { display: flex; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.req { font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: #e7f6d8;
  color: #3d7a1e; border: 1px solid #a9d68a; }
.req.lack { background: #ffdcdc; color: #c22; border-color: #f0a0a0; }
.craftBtn { border: 3px solid #5c8a2b; background: linear-gradient(180deg, #9ed65e, #6fae36); color: #fff;
  font-weight: 900; font-size: 14px; padding: 8px 16px; border-radius: 12px; cursor: pointer;
  transition: transform .12s; font-family: inherit; text-shadow: 0 1px 2px rgba(0,0,0,.3); white-space: nowrap; }
.craftBtn:hover { transform: scale(1.06); }
.craftBtn:active { transform: scale(.93); }
.craftBtn.disabled, .craftBtn:disabled { background: #c9c0ae; border-color: #9a937f; cursor: not-allowed; }
.craftBtn:disabled:hover { transform: none; }
.shake { animation: shakeX .35s; }
@keyframes shakeX { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }

/* ---------- ?? ---------- */
.invPanel { width: min(440px, 92vw); max-height: min(86vh, 720px); }
.invBody {
  display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden;
}
.invPlayer {
  display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden;
}
.invPlayerHead {
  display: none; /* ?????????? */
  flex-shrink: 0; padding: 8px 14px 2px;
  font-weight: 900; font-size: 13px; color: #5c3d1a; font-family: var(--font-display);
  background: #fff6e4; border-bottom: 2px solid #e8d4a8;
}
.invPanel > .phead,
.invPlayer > .weaponBar,
.invPlayer > .deviceBar,
.invPlayer > .armorBar,
.invPlayer > .invMeta,
.invPlayer > .invPlayerHead { flex-shrink: 0; }
.invPlayer > .ptip {
  flex-shrink: 0;
  padding: 7px 14px;
  font-size: 11px;
  line-height: 1.35;
}
.weaponBar { display: flex; align-items: center; gap: 8px; padding: 8px 12px 6px;
  background: linear-gradient(180deg, #fff6e4, #ffeecf); border-bottom: 2px solid #e8d4a8; flex-wrap: wrap; }
.weaponBarLabel { font-weight: 900; color: #5c3d1a; font-size: 12px; white-space: nowrap; }
.weaponEquipSlots { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.weaponEquip { width: 52px; height: 52px; background: #fffdf4; border: 3px solid #c98a4b; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .12s, border-color .12s, box-shadow .12s; position: relative; }
.weaponEquip:hover { transform: scale(1.05); border-color: #e8a83e; }
.weaponEquip.filled { box-shadow: 0 0 0 2px rgba(232,168,62,.3); background: #fff8e8; }
.weaponEquip.empty { border-style: solid; border-color: #d9bd8a; opacity: .72; cursor: pointer;
  background: repeating-linear-gradient(-45deg, #f7efd8, #f7efd8 6px, #f3e8cc 6px, #f3e8cc 12px); }
.weaponEquip.selected { border-color: #e8a83e; box-shadow: 0 0 0 2px rgba(232,168,62,.45); opacity: 1; }
.weaponEquip .slotNum {
  position: absolute; top: 2px; left: 4px; font-size: 9px; font-weight: 900;
  color: #a98d5f; line-height: 1;
}
.weaponEquip.selected .slotNum { color: #c98a4b; }
.weaponEquip .ic { font-size: 22px; line-height: 1; }
.weaponEquip .in { font-size: 9px; font-weight: 800; color: #7a5326; max-width: 46px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.weaponEquip .n { font-size: 10px; font-weight: 800; color: #3d7a1e; line-height: 1; }
.weaponEquip .ph { font-size: 9px; font-weight: 800; color: #a98d5f; text-align: center; line-height: 1.15; }
.arrowPick { display: flex; flex-direction: column; gap: 3px; flex: 1 1 96px; min-width: 96px; }
.arrowPickLabel { font-size: 11px; font-weight: 800; color: #8a6a3b; }
.arrowPickBtns { display: flex; gap: 6px; flex-wrap: wrap; }
.arrowBtn { border: 2px solid #d9bd8a; background: #fffdf4; border-radius: 10px; padding: 4px 8px;
  cursor: pointer; font-family: inherit; font-weight: 800; font-size: 12px; color: #5c3d1a;
  display: flex; align-items: center; gap: 4px; transition: all .12s; }
.arrowBtn:hover { border-color: #e8a83e; transform: scale(1.04); }
.arrowBtn.active { border-color: #7fbf4d; background: #f4ffe8; box-shadow: 0 0 0 2px rgba(127,191,77,.25); }
.arrowBtn .n { color: #3d7a1e; font-size: 11px; }
.arrowBtn.empty { opacity: .45; }
.deviceBar { border-bottom: 2px solid #c5dff0; background: #eef7ff; padding: 8px 12px 6px; }
.deviceBar .weaponEquip { border-color: #4a90c8; }
.deviceBar .weaponEquip.filled { box-shadow: 0 0 0 2px rgba(74,144,200,.3); background: #e8f4ff; }
.deviceBarHint { font-size: 11px; font-weight: 700; color: #5a7a9a; flex: 1; }
.armorBar { border-bottom: 2px solid #d4c0a8; background: #f4efe6; padding: 8px 12px 6px; }
.armorBar .weaponEquip { border-color: #8a6a4a; }
.armorBar .weaponEquip.filled { box-shadow: 0 0 0 2px rgba(138,106,74,.28); background: #f8f0e4; }
.armorBar .deviceBarHint { color: #7a6348; }
.invCell.device { border-color: #4a90c8; background: #eef7ff; }
.invCell.battery { border-color: #5aaf6a; background: #eef8f0; }
.invCell.armor { border-color: #8a6a4a; background: #f6efe4; }
.weaponEquip .dur { position: absolute; bottom: 2px; left: 4px; right: 4px; height: 3px;
  background: #d8c8b0; border-radius: 2px; overflow: hidden; }
.weaponEquip .dur > i { display: block; height: 100%; background: #7fbf4d; border-radius: 2px; }
.searchlightBody { display: flex; flex-direction: column; gap: 12px; align-items: stretch; padding: 4px 2px; }
.searchlightActions { display: flex; gap: 10px; flex-wrap: wrap; }
.searchlightActions .craftBtn { flex: 1; min-width: 120px; text-align: center; }
#searchlightBattPick { width: 100%; }
.slAutoRow {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 13px; color: #5c3d1a;
  cursor: pointer; user-select: none;
}
.slAutoRow input[type=checkbox] { width: 18px; height: 18px; accent-color: #c9a46a; flex-shrink: 0; }

.signalBody { display: flex; flex-direction: column; gap: 12px; align-items: stretch; padding: 4px 2px; }
.signalSeekBlock {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 10px 12px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(126,200,232,.12), rgba(255,246,228,.55));
  border: 2px solid rgba(126,200,232,.35);
}
.signalSeekBlock .ptip { border: none; background: transparent; padding: 0; font-size: 11px; }
#signalSeekStatus { min-height: 1.2em; color: #3a6a7a; font-weight: 800; font-size: 12px; }
.signalMsgList { display: flex; flex-direction: column; gap: 8px; }
.signalMsg {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  padding: 10px 12px; border-radius: 14px; cursor: pointer; font-family: inherit;
  background: linear-gradient(180deg, #fffef8, #fff4dc);
  border: 2px solid #d9bd8a; color: #5c3d1a;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.signalMsg:hover { transform: translateY(-1px); border-color: #c9a46a; }
.signalMsg.selected {
  border-color: #3a9a7a;
  box-shadow: 0 0 0 2px rgba(90, 208, 168, .28), 0 1px 0 rgba(255,255,255,.7) inset;
  background: linear-gradient(180deg, #f0fff8, #e4f8ee);
}
.signalMsg .smTag {
  font-size: 11px; font-weight: 900; letter-spacing: .04em;
  color: #3a9a7a; text-transform: uppercase;
}
.signalMsg .smText { font-size: 13px; font-weight: 800; line-height: 1.45; color: #5c3d1a; }
.signalMsg .smWarn { font-size: 11px; font-weight: 700; color: #b06030; margin-top: 2px; }
#signalBroadcastBtn { width: 100%; }
.invMeta { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px 0;
  font-size: 12px; font-weight: 800; color: #8a6a3b; }
.invMetaHint { color: #a98d5f; font-weight: 700; }
#invGrid { display: grid; grid-template-columns: repeat(6, 56px); gap: 9px; padding: 10px 16px 12px;
  overflow-y: auto; overflow-x: hidden; justify-content: center; flex: 1 1 auto; min-height: 140px; }
.invCell, .slotCell { width: 56px; height: 62px; background: linear-gradient(180deg, #fffef8, #fff6e4);
  border: 2px solid #d9bd8a; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .12s, border-color .12s, background .12s, box-shadow .12s; position: relative;
  box-shadow: 0 1px 0 rgba(255,255,255,.65) inset; }
.invCell:hover, .slotCell:hover { transform: scale(1.08); border-color: #e8a83e; }
.invCell.empty, .slotCell.empty { opacity: .55; cursor: default; border-style: solid; border-color: #e0d0a8;
  background: repeating-linear-gradient(-45deg, #f7efd8, #f7efd8 5px, #f2e6c8 5px, #f2e6c8 10px); }
.invCell.empty:hover, .slotCell.empty:hover { transform: none; border-color: #d9bd8a; }
.invCell .ic, .slotCell .ic { font-size: 24px; line-height: 1; }
.invCell .in, .slotCell .in { font-size: 10px; font-weight: 800; color: #7a5326; max-width: 50px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.invCell .cnt, .slotCell .cnt { position: absolute; top: 2px; right: 4px; font-size: 11px; font-weight: 900; color: #3d7a1e; }
.invCell.usable { border-color: #7fbf4d; background: #f4ffe8; }
.invCell.weapon { border-color: #c98a4b; background: #fff6e8; }
.invCell.full .cnt, .slotCell.full .cnt { color: #c47a1a; }

/* ---------- ?? / ??????? ---------- */
.workPanel { width: min(560px, 94vw); max-height: 82vh; }
#compressorPanel.workPanel { width: min(620px, 96vw); }
#relicForgePanel.relicForgePanel { width: min(580px, 95vw); }
.workBody { padding: 14px 16px 12px; overflow-y: auto; }
.workCols { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: start; }
.workCol { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.workColMain { background: linear-gradient(180deg, #fffaf0, #fff4e0); border: 2px solid #e0c896; border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset; }
.workLabel { font-weight: 900; color: #5c3d1a; font-size: 13px; display: flex; align-items: baseline; gap: 8px; }
.workHint { font-weight: 700; font-size: 11px; color: #a98d5f; }
.workSlots { display: grid; grid-template-columns: repeat(auto-fill, 50px); gap: 6px; justify-content: start;
  min-height: 54px; background: rgba(255,252,242,.72); border: 2px solid #e0c896; border-radius: 12px; padding: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65); }
.workSlots.outSlots { border-color: #c9b07a; background: rgba(255,250,235,.8); }
.workSlot { width: 50px; height: 54px; background: #fffdf4; border: 2px solid #d9bd8a; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative;
  cursor: pointer; transition: transform .12s, border-color .12s; }
.workSlot:hover { transform: scale(1.08); border-color: #e8a83e; }
.workSlot.empty { opacity: .5; cursor: default; border-style: solid; border-color: #e0d0a8;
  background: repeating-linear-gradient(-45deg, #f7efd8, #f7efd8 5px, #f2e6c8 5px, #f2e6c8 10px); }
.workSlot.empty:hover { transform: none; border-color: #d9bd8a; }
.workSlot .ic { font-size: 20px; line-height: 1; }
.workSlot .in { font-size: 9px; font-weight: 800; color: #7a5326; max-width: 44px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.workSlot.locked { pointer-events: none; opacity: .55; }
.workFlow { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin: 4px 0; }
.workProgress { height: 10px; background: rgba(138,90,43,.15); border-radius: 999px; overflow: hidden;
  border: 1px solid #d9bd8a; }
.workBarFill { height: 100%; width: 0%; background: linear-gradient(90deg, #ff9a5a, #ffd94d);
  border-radius: 999px; transition: width .2s linear; }
.workBarFill.grill { background: linear-gradient(90deg, #e59a4d, #ffc46b); }
.heatBtns { display: flex; gap: 6px; flex-wrap: wrap; }
.heatBtn {
  flex: 1; min-width: 72px; min-height: 44px; padding: 10px 10px; border-radius: 10px; border: 2px solid #d9bd8a;
  background: #fffdf4; font-weight: 800; font-size: 13px; color: #5c3d1a; cursor: pointer;
  transition: border-color .12s, background .12s, transform .1s;
  touch-action: manipulation;
}
.heatBtn:hover { border-color: #e8a83e; transform: translateY(-1px); }
.heatBtn.active { border-color: #e07040; background: #ffe8d0; box-shadow: 0 0 0 2px rgba(224,112,64,.2); }
.heatBtn:disabled { opacity: .45; cursor: default; transform: none; }
.workBarFill.fuel { background: linear-gradient(90deg, #c45a2a, #ff9a5a); }
.workBarFill.fuel.alchemyFuel { background: linear-gradient(90deg, #8a4a90, #e8a060); }
.workBarFill.alchemy { background: linear-gradient(90deg, #a07040, #e8b060 55%, #c890ff); }
.workBarFill.compress { background: linear-gradient(90deg, #7eb6d9, #ffe066); }
.workProgress.fuel { height: 8px; margin: 2px 0 4px; }
.fuelLabel { margin-top: 10px; }
.fuelStatus { font-size: 11px; min-height: 1em; margin-bottom: 4px; }
.fuelMats { max-height: 140px; }
.workMat.fuelMat { border-color: #e8a070; background: #fff8f0; }
.workMat.fuelMat:hover { border-color: #ff9a5a; }
.workActions { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.workStatus { font-size: 12px; font-weight: 800; color: #8a5a2b; min-height: 1.2em; text-align: center; }
.workMats { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; padding-right: 2px; }
.workMat { width: 100%; padding: 8px 6px; background: #fffdf4; border: 2px solid #d9bd8a; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: transform .12s, border-color .12s;
  font-weight: 800; color: #5c3d1a; font-size: 11px; }
.workMat:hover { transform: scale(1.03); border-color: #7fbf4d; }
.workMat .ic { font-size: 22px; }
.workMat.disabled { opacity: .4; cursor: not-allowed; }
.workMat.disabled:hover { transform: none; border-color: #d9bd8a; }
.workEmpty { width: 100%; text-align: center; color: #a98d5f; font-weight: 700; font-size: 12px; padding: 12px 6px; line-height: 1.4; }

/* ---------- ?? ---------- */
.chestPanel { width: min(480px, 94vw); }
.chestBody { padding: 12px 14px 8px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.chestSection { display: flex; flex-direction: column; gap: 8px; }
.chestDivider { height: 2px; background: linear-gradient(90deg, transparent, #d9bd8a, transparent); }
.slotGrid { display: grid; grid-template-columns: repeat(6, 56px); gap: 8px; justify-content: center;
  background: #fff8e8; border: 2px solid #e0c896; border-radius: 14px; padding: 10px; }

/* ---------- ????????????? ---------- */
.bagBirdPanel { width: min(460px, 94vw); }
.bagBirdBody { padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.bagBirdHero {
  display: flex; align-items: center; gap: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.35), transparent 40%),
    linear-gradient(135deg, #fff6e4 0%, #ffe8c4 55%, #f5dcb0 100%);
  border: 3px solid #8a5a2b;
  border-radius: 18px 22px 16px 24px / 22px 16px 24px 18px;
  padding: 10px 12px;
  box-shadow: 0 3px 0 #6e4520, inset 0 1px 0 rgba(255,255,255,.55);
}
.bagBirdSketch {
  position: relative; width: 72px; height: 64px; flex-shrink: 0;
}
.bbsBody {
  position: absolute; left: 18px; top: 18px; width: 34px; height: 22px;
  background: #e0c4a0; border: 3px solid #6a4830; border-radius: 50% 50% 45% 45%;
}
.bbsBag {
  position: absolute; left: 28px; top: 34px; width: 22px; height: 20px;
  background: #e8c888; border: 2.5px solid #6a4830;
  border-radius: 40% 40% 55% 55%;
}
.bbsHead {
  position: absolute; left: 42px; top: 8px; width: 18px; height: 18px;
  background: #f0dcc0; border: 3px solid #6a4830; border-radius: 50%;
}
.bbsHead::after {
  content: ''; position: absolute; right: -10px; top: 6px;
  border: 5px solid transparent; border-left-color: #e8a858;
}
.bbsWing {
  position: absolute; width: 22px; height: 14px;
  background: rgba(210,180,140,.8); border: 2.5px solid #6a4830;
  border-radius: 60% 20% 50% 40%;
}
.bbsWing.L { left: 4px; top: 16px; transform: rotate(-28deg); }
.bbsWing.R { right: 2px; top: 22px; transform: rotate(18deg); animation: bbWing 0.7s ease-in-out infinite alternate; }
@keyframes bbWing { from { transform: rotate(10deg); } to { transform: rotate(28deg); } }
.bbsHeart {
  position: absolute; right: 4px; top: 0; color: #ff6a9a;
  font-size: 14px; animation: bbHeart 1.2s ease-in-out infinite;
  text-shadow: 0 1px 0 #8a3050;
}
@keyframes bbHeart { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.2); opacity: 1; } }
.bagBirdMeta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bagBirdStatus { font-weight: 800; color: #5a4028; font-size: 14px; line-height: 1.35; }
.bagBirdAffRow { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: #8a5a6a; }
.bagBirdAffBar {
  flex: 1; height: 10px; border-radius: 8px; border: 2px solid #8a5a2b;
  background: #efe0c4; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
}
.bagBirdAffBar i {
  display: block; height: 100%; width: 50%;
  background: linear-gradient(90deg, #e87878, #ff9ec8 50%, #ffb0d0);
  border-radius: 6px;
}
.bagBirdSection { display: flex; flex-direction: column; gap: 8px; }
.bagBirdDesc { margin: 0; font-size: 12px; color: #8a6a3b; line-height: 1.45; font-weight: 600; }
.bagBirdNameRow { display: flex; gap: 8px; align-items: center; }
.bagBirdNameInput {
  flex: 1; min-width: 0; border: 3px solid #8a5a2b; border-radius: 12px;
  padding: 8px 12px; font: inherit; font-weight: 800; color: #5a4028;
  background: linear-gradient(180deg, #fffdf6, #fff3dc);
  box-shadow: 0 3px 0 #b98d55, inset 0 1px 0 rgba(255,255,255,.7);
  outline: none;
}
.bagBirdNameInput:focus { border-color: #c45a8c; box-shadow: 0 3px 0 #a04870, 0 0 0 3px rgba(255,150,180,.3); }
.craftBtn.alt {
  border-color: #8a6a3b; background: linear-gradient(180deg, #e8c878, #c9a046); box-shadow: 0 2px 0 #8a6a28;
}
.bagBirdModes { display: flex; gap: 8px; }
.bagBirdModeBtn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 8px; border: 3px solid #b98d55; border-radius: 14px 16px 12px 18px / 16px 12px 18px 14px;
  background: linear-gradient(180deg, #fffef8, #fff0d0);
  cursor: pointer; font-family: inherit; color: #6a4828; font-weight: 800;
  box-shadow: 0 3px 0 #b98d55; transition: transform .12s, border-color .12s, background .12s;
}
.bagBirdModeBtn:hover { transform: translateY(-2px); }
.bagBirdModeBtn.active {
  border-color: #5c8a2b; background: linear-gradient(180deg, #e8f8c8, #c8e878);
  box-shadow: 0 3px 0 #5c8a2b; color: #3d6a18;
}
.bagBirdModeBtn .bmi { font-size: 22px; line-height: 1; }
.bagBirdModeBtn .bmn { font-size: 12px; }
.bagBirdBagGrid { grid-template-columns: repeat(5, 56px); }

/* ---------- ??? ---------- */
.planterPanel { width: min(440px, 94vw); }
.planterBody { padding: 12px 14px 8px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.planterSection { display: flex; flex-direction: column; gap: 8px; }
.planterBeds { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  background: #fff8e8; border: 2px solid #e0c896; border-radius: 14px; padding: 12px; }
.planterBed { width: 72px; min-height: 88px; border-radius: 14px; border: 3px solid #c9a46a;
  background: linear-gradient(180deg, #f3e2c0, #e8d0a0); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  box-shadow: 0 3px 0 #b98d55; transition: transform .12s, border-color .12s; padding: 6px 4px; }
.planterBed:hover { transform: translateY(-2px); border-color: #8a5a2b; }
.planterBed.empty { border-style: solid; border-color: #d4b888; opacity: .9;
  background: repeating-linear-gradient(-45deg, #efe0bc, #efe0bc 6px, #e8d6ae 6px, #e8d6ae 12px); }
.planterBed.growing { border-color: #7fbf3d; }
.planterBed.ripe { border-color: #e8a030; background: linear-gradient(180deg, #fff0c8, #ffe08a);
  animation: ripePulse 1.4s ease-in-out infinite; }
@keyframes ripePulse {
  0%, 100% { box-shadow: 0 3px 0 #b98d55; }
  50% { box-shadow: 0 3px 0 #d4a020, 0 0 10px rgba(255, 200, 80, .45); }
}
.planterBed .ic { font-size: 26px; line-height: 1; }
.planterBed .in { font-size: 11px; font-weight: 800; color: #6b4423; text-align: center; line-height: 1.2; max-width: 64px; }
.planterBed .pg { width: 56px; height: 7px; border-radius: 4px; background: #d9bd8a; overflow: hidden; border: 1px solid #b98d55; }
.planterBed .pg > i { display: block; height: 100%; background: linear-gradient(90deg, #9ed65e, #6fbf3d); border-radius: 3px; }
.planterBed .st { font-size: 10px; font-weight: 800; color: #8a6a3b; }
.planterSeeds { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  background: #fff8e8; border: 2px solid #e0c896; border-radius: 14px; padding: 10px; min-height: 64px; }
.planterSeed { width: 58px; min-height: 64px; border-radius: 12px; border: 2px solid #d9bd8a;
  background: #fffdf6; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; cursor: pointer; position: relative; transition: transform .12s, border-color .12s; padding: 4px; }
.planterSeed:hover { transform: scale(1.06); border-color: #8a5a2b; }
.planterSeed.selected { border-color: #6fbf3d; background: linear-gradient(180deg, #eef8d8, #d8efb0);
  box-shadow: 0 0 0 2px rgba(111, 191, 61, .35); }
.planterSeed.disabled { opacity: .4; cursor: not-allowed; }
.planterSeed.disabled:hover { transform: none; border-color: #d9bd8a; }
.planterSeed .ic { font-size: 22px; }
.planterSeed .in { font-size: 10px; font-weight: 800; color: #6b4423; text-align: center; line-height: 1.15; }
.planterSeed .cnt { position: absolute; top: 2px; right: 4px; font-size: 11px; font-weight: 900; color: #8a5a2b; }
.planterEmptySeeds { width: 100%; text-align: center; color: #a98d5f; font-weight: 700; font-size: 12px; padding: 10px 6px; }

@media (max-width: 560px) {
  .workCols { grid-template-columns: 1fr; }
  .workMats { flex-direction: row; flex-wrap: wrap; max-height: none; }
  .workMat { width: auto; min-width: 64px; }
  #invGrid, .slotGrid { grid-template-columns: repeat(4, 56px); }
  .creativeGrid { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
  .invPanel.creativeOpen { width: min(96vw, 560px); }
  .invPanel.creativeOpen .invBody { flex-direction: column; }
  .invPanel.creativeOpen {
    height: min(88vh, 760px);
  }
  .invPanel.creativeOpen .creativeBlock {
    width: 100%; max-width: none; flex-basis: auto; height: auto;
    border-right: none; border-bottom: 3px solid #c8b070;
    max-height: min(32vh, 240px);
  }
  .invPanel.creativeOpen .invPlayer { min-height: 220px; }
  .planterBed { width: 64px; min-height: 80px; }
  #hotbar { gap: 4px; bottom: 10px; }
  .slot { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; }
  .slot .key { font-size: 9px; }
  .slot .cnt { font-size: 10px; }
  .modePick { flex-direction: column; width: min(280px, 86vw); }
}

@media (max-height: 700px) {
  .weaponBar, .deviceBar, .armorBar { padding: 4px 10px 3px; gap: 6px; }
  .weaponEquip { width: 44px; height: 44px; border-radius: 10px; }
  .weaponEquip .ic { font-size: 18px; }
  .weaponEquip .in { font-size: 8px; max-width: 40px; }
  .weaponEquip .ph { font-size: 8px; }
  .weaponEquipSlots { gap: 4px; }
  .invPanel { max-height: min(92vh, 640px); }
  .invPanel .ptip { padding: 4px 10px; font-size: 10px; }
  .invMeta { padding: 4px 12px 0; }
  #invGrid { min-height: 110px; padding: 8px 12px; gap: 7px; }
  .invPanel.creativeOpen {
    height: min(92vh, 640px);
    max-height: min(92vh, 640px);
  }
  .invPanel.creativeOpen .creativeBlock {
    flex-basis: min(38%, 280px); width: min(38%, 280px);
    max-height: none; align-self: stretch;
  }
  .invPanel.creativeOpen #invGrid { min-height: 100px; }
}

#tooltip {
  position: fixed; z-index: 50; pointer-events: none;
  min-width: 148px; max-width: 260px;
  padding: 0; overflow: hidden;
  background: linear-gradient(180deg, #fff8e8 0%, #ffeecf 100%);
  color: #5a3a18; font-size: 13px; font-weight: 600; line-height: 1.35;
  border: 3px solid #8a5a2b; border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.55);
  animation: tipPop .14s ease-out;
}
@keyframes tipPop {
  from { transform: translateY(4px) scale(.96); opacity: 0; }
  to { transform: none; opacity: 1; }
}
#tooltip.hidden { animation: none; }
#tooltip .tipHead {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 7px;
  background: linear-gradient(180deg, #9a6836, #8a5a2b);
  color: #ffe9c0; border-bottom: 2px solid #6e4520;
}
#tooltip .tipIcon {
  font-size: 20px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}
#tooltip .tipTitle {
  flex: 1; font-size: 14px; font-weight: 900; letter-spacing: .02em;
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
#tooltip .tipQty {
  font-size: 12px; font-weight: 800; color: #ffe9a8;
  background: rgba(0,0,0,.18); padding: 2px 7px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
}
#tooltip .tipBody { padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 6px; }
#tooltip .tipStats {
  display: flex; flex-wrap: wrap; gap: 4px 6px;
}
#tooltip .tipStat {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 8px;
  border: 1.5px solid rgba(138,90,43,.35); background: rgba(255,255,255,.55);
}
#tooltip .tipStat.hunger { color: #b86a10; border-color: rgba(240,140,30,.45); background: rgba(255,196,107,.28); }
#tooltip .tipStat.thirst { color: #1a6fa8; border-color: rgba(47,157,240,.4); background: rgba(124,214,255,.28); }
#tooltip .tipStat.hp { color: #b83030; border-color: rgba(230,62,62,.4); background: rgba(255,123,123,.25); }
#tooltip .tipStat.stew {
  color: #6a4a18; border-color: rgba(200,150,60,.5);
  background: linear-gradient(180deg, rgba(255,230,160,.55), rgba(255,210,120,.35));
}
#tooltip .tipMeta { font-size: 11px; color: #8a6a3b; font-weight: 700; }
#tooltip .tipAction {
  margin-top: 2px; padding-top: 6px;
  border-top: 1.5px solid #e0d0a8;
  font-size: 11px; color: #7a5326; font-weight: 700;
}
#tooltip .tipSimple { padding: 8px 12px; }
#tooltip b { color: #8a5a2b; }
#tooltip .tipSimple b { color: #b8860b; }
#tooltip.tip-dark {
  background: linear-gradient(180deg, rgba(36,44,62,.96), rgba(22,28,42,.96));
  color: #eef2f8; border-color: rgba(255,255,255,.35);
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
}
#tooltip.tip-dark .tipSimple b { color: #ffd94d; }
#tooltip.tip-dark .tipAction { border-top-color: rgba(255,255,255,.2); color: #c8d0dc; }

/* ---------- ?? ---------- */
.menu { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  align-items: center; justify-content: safe center; gap: 14px;
  background: linear-gradient(180deg, #79bfe9 0%, #a8d9f2 45%, #ffe9c4 100%);
  overflow-x: hidden; overflow-y: auto; padding: 24px 16px; }
#pauseMenu, #settingsMenu, #announceMenu, #supplyMenu {
  background: rgba(20, 30, 50, .62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  isolation: isolate;
}
#overMenu { background: linear-gradient(180deg, #2a3350, #4a4460 60%, #7a5a58); position: fixed; }

/* ?? ???????? + ??? ?? */
.titleMenu {
  gap: 0; padding: 0; justify-content: center;
  background: linear-gradient(165deg, #3a8ec8 0%, #6eb8e8 28%, #9fd0f0 55%, #c8e4f5 72%, #ffe2b0 100%);
  overflow: hidden;
}
.titleSky {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.skyGlow {
  position: absolute; inset: -20% -10% auto; height: 70%;
  background: radial-gradient(ellipse 55% 50% at 50% 20%, rgba(255,236,170,.55), transparent 70%);
  animation: skyPulse 6s ease-in-out infinite;
}
@keyframes skyPulse {
  0%,100% { opacity: .85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
.skySun {
  position: absolute; top: 9%; left: 50%; width: 88px; height: 88px;
  margin-left: -44px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff9e0, #ffd86a 45%, #ffb030 78%);
  box-shadow: 0 0 40px 14px rgba(255,210,90,.55), 0 0 90px 40px rgba(255,180,60,.25);
  animation: sunFloat 5s ease-in-out infinite;
}
@keyframes sunFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(8px) scale(1.04); }
}
.skyRays {
  position: absolute; top: 9%; left: 50%; width: 280px; height: 280px;
  margin: -96px 0 0 -140px;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255,230,140,.18) 8deg, transparent 16deg,
    transparent 40deg, rgba(255,230,140,.14) 48deg, transparent 56deg,
    transparent 80deg, rgba(255,230,140,.16) 88deg, transparent 96deg,
    transparent 120deg, rgba(255,230,140,.12) 128deg, transparent 136deg,
    transparent 160deg, rgba(255,230,140,.15) 168deg, transparent 176deg,
    transparent 200deg, rgba(255,230,140,.12) 208deg, transparent 216deg,
    transparent 240deg, rgba(255,230,140,.14) 248deg, transparent 256deg,
    transparent 280deg, rgba(255,230,140,.12) 288deg, transparent 296deg,
    transparent 320deg, rgba(255,230,140,.16) 328deg, transparent 336deg, transparent 360deg);
  animation: raySpin 48s linear infinite; opacity: .7;
}
@keyframes raySpin { to { transform: rotate(360deg); } }
.skySparkles { position: absolute; inset: 0; }
.skySparkles span {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px 2px rgba(255,255,255,.8);
  animation: sparkle 3.2s ease-in-out infinite;
}
.skySparkles span:nth-child(1) { top: 22%; left: 14%; animation-delay: 0s; }
.skySparkles span:nth-child(2) { top: 18%; left: 78%; animation-delay: .6s; }
.skySparkles span:nth-child(3) { top: 38%; left: 22%; animation-delay: 1.1s; }
.skySparkles span:nth-child(4) { top: 32%; left: 88%; animation-delay: 1.7s; }
.skySparkles span:nth-child(5) { top: 48%; left: 8%; animation-delay: 2.2s; }
.skySparkles span:nth-child(6) { top: 28%; left: 52%; animation-delay: .3s; width: 3px; height: 3px; }
@keyframes sparkle {
  0%,100% { opacity: .15; transform: scale(.6); }
  50% { opacity: 1; transform: scale(1.3); }
}
.skyBirds { position: absolute; inset: 0; }
.bird {
  position: absolute; display: block; width: 18px; height: 8px;
  border: solid rgba(40,70,100,.35); border-width: 0 0 2px 0; border-radius: 50%;
  animation: birdFly 18s linear infinite;
}
.bird::before, .bird::after {
  content: ''; position: absolute; top: 0; width: 10px; height: 8px;
  border: solid rgba(40,70,100,.4); border-width: 2px 0 0; border-radius: 50% 50% 0 0;
}
.bird::before { left: -2px; transform: rotate(-28deg); transform-origin: right bottom; }
.bird::after { right: -2px; transform: rotate(28deg); transform-origin: left bottom; }
.bird.b1 { top: 26%; animation-duration: 22s; animation-delay: -4s; }
.bird.b2 { top: 34%; animation-duration: 28s; animation-delay: -12s; transform: scale(.75); }
.bird.b3 { top: 20%; animation-duration: 26s; animation-delay: -18s; transform: scale(.9); }
@keyframes birdFly {
  from { left: -40px; }
  to { left: calc(100% + 40px); }
}
.skyHorizon {
  position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  background: linear-gradient(180deg, transparent, rgba(255,210,150,.35) 40%, rgba(255,200,130,.55));
  pointer-events: none;
}
.cloudLayer {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}

.titleContent {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 28px 20px 20px; width: 100%; max-width: 640px;
  max-height: 100%;
  box-sizing: border-box;
  pointer-events: auto;
  animation: titleEnter .7s cubic-bezier(.22,1,.36,1) both;
}
@keyframes titleEnter {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.titleBrand { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.titleBadge {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #3a6a90;
  background: rgba(255,255,255,.72); border: 2px solid rgba(255,255,255,.9);
  padding: 5px 14px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(40,80,120,.15);
  animation: badgeGlow 3.5s ease-in-out infinite;
}
html[data-locale="zh"] .titleBadge { letter-spacing: .06em; text-transform: none; }
@keyframes badgeGlow {
  0%,100% { box-shadow: 0 4px 14px rgba(40,80,120,.15); }
  50% { box-shadow: 0 4px 20px rgba(255,200,80,.35); }
}
.titleActions {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 100%; position: relative; z-index: 3; flex-shrink: 0;
}
.titleActionRow {
  display: flex; gap: 10px; width: min(280px, 82vw); align-items: stretch;
}
.titleActionRow .mbtn {
  flex: 1 1 0; min-width: 0; width: auto;
  font-size: 15px; padding: 12px 10px;
  white-space: nowrap;
}
html[data-locale="en"] .titleActionRow .mbtn { font-size: 13px; padding: 12px 8px; letter-spacing: -.01em; }
html[data-locale="fr"] .titleActionRow .mbtn,
html[data-locale="de"] .titleActionRow .mbtn {
  font-size: 12px; padding: 10px 6px; letter-spacing: 0; white-space: normal; line-height: 1.2;
}
.titleMenu .mbtn {
  min-width: min(280px, 82vw);
  position: relative; z-index: 3;
  transition: transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s, filter .18s;
}
.titleMenu .titleActionRow .mbtn { min-width: 0; }
.titleMenu .mbtn.primary {
  background: linear-gradient(180deg, #c8f06a, #7fbf3d 55%, #6aa832);
  box-shadow: 0 6px 0 #4d7a1e, 0 10px 24px rgba(40,90,20,.28), 0 0 0 0 rgba(180,240,80,.4);
  animation: primaryPulse 2.8s ease-in-out infinite;
}
@keyframes primaryPulse {
  0%,100% { box-shadow: 0 6px 0 #4d7a1e, 0 10px 24px rgba(40,90,20,.28), 0 0 0 0 rgba(180,240,80,.35); }
  50% { box-shadow: 0 6px 0 #4d7a1e, 0 14px 28px rgba(40,90,20,.35), 0 0 22px 4px rgba(180,240,80,.28); }
}
.titleMenu .mbtn.primary:hover {
  filter: brightness(1.05);
  animation: none;
  box-shadow: 0 8px 0 #4d7a1e, 0 16px 28px rgba(40,90,20,.35);
}

.fsTip {
  margin-top: 2px; border: 2px solid rgba(255,255,255,.55);
  background: rgba(20,40,70,.36); color: #fff;
  font-family: inherit; font-weight: 800; font-size: 13px;
  padding: 8px 16px; border-radius: 999px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(0,0,0,.14);
  transition: opacity .25s, transform .25s;
  animation: fsTipBob 2.4s ease-in-out infinite;
  position: relative; z-index: 3; flex-shrink: 0;
  pointer-events: none; cursor: default; user-select: none;
  text-align: center; max-width: min(420px, 90vw); line-height: 1.35;
}
.fsTip.fs-hidden { opacity: 0; transform: scale(.9); animation: none; }
@keyframes fsTipBob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.title { font-family: var(--font-display); font-size: clamp(36px, 7vw, 72px); font-weight: 900; color: #fff; letter-spacing: 6px;
  text-shadow: 0 4px 0 #3d7ab0, 0 8px 0 rgba(40,80,120,.4), 0 12px 24px rgba(0,0,0,.3);
  animation: titleBob 3s ease-in-out infinite; position: relative; line-height: 1.1; margin: 0; }
html[data-locale="en"] .title { letter-spacing: 1px; font-weight: 700; }
html[data-locale="fr"] .title,
html[data-locale="de"] .title {
  letter-spacing: 0.5px; font-weight: 700;
  font-size: clamp(28px, 5.6vw, 60px);
  max-width: 94vw;
  text-wrap: balance;
}
.titleMenu .title {
  background: linear-gradient(180deg, #ffffff 0%, #fff6d0 45%, #ffe08a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #2f6a9a) drop-shadow(0 8px 18px rgba(20,60,100,.35));
  animation: titleBob 3s ease-in-out infinite, titleShimmer 5s ease-in-out infinite;
}
@keyframes titleShimmer {
  0%,100% { filter: drop-shadow(0 3px 0 #2f6a9a) drop-shadow(0 8px 18px rgba(20,60,100,.35)); }
  50% { filter: drop-shadow(0 3px 0 #2f6a9a) drop-shadow(0 8px 22px rgba(255,200,80,.4)); }
}
.title.small { font-size: clamp(30px, 5vw, 52px); text-shadow: 0 4px 0 #503a3a, 0 10px 22px rgba(0,0,0,.5);
  background: none; -webkit-background-clip: unset; background-clip: unset; color: #fff; filter: none;
  animation: titleBob 3s ease-in-out infinite; }
@keyframes titleBob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
.subtitle { color: #fff; font-weight: 800; font-size: 15px; text-shadow: 0 2px 4px rgba(60,100,140,.6);
  margin-top: -4px; margin-bottom: 4px; max-width: min(520px, 92vw); text-align: center; line-height: 1.35; }
.titleMenu .subtitle {
  margin: 0; opacity: .95; letter-spacing: .02em;
  text-shadow: 0 2px 8px rgba(30,70,110,.55);
}
.titleVersion {
  display: inline-block;
  margin-top: 0; margin-bottom: 0;
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  color: #3a6a90;
  background: rgba(255,255,255,.55);
  border: 2px solid rgba(255,255,255,.75);
  padding: 2px 10px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(40,80,120,.12);
}
html[data-locale="en"] .titleVersion,
html[data-locale="fr"] .titleVersion,
html[data-locale="de"] .titleVersion { letter-spacing: .04em; }

.mbtn.hasNew { position: relative; overflow: visible; }
.mbtn.hasNew::after {
  content: '';
  position: absolute; top: -4px; right: -4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a7a, #e23a3a 70%);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(180,30,30,.45);
  animation: announcePulse 1.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
  transform: none;
  opacity: 1;
}
@keyframes announcePulse {
  0%,100% { transform: scale(1); box-shadow: 0 2px 6px rgba(180,30,30,.45); }
  50% { transform: scale(1.12); box-shadow: 0 2px 10px rgba(220,50,50,.55); }
}

/* ---------- 公告 / 更新日志 ---------- */
#announceMenu {
  justify-content: flex-start;
  padding: 28px 16px 24px;
  overflow-y: auto;
  gap: 12px;
}
.announceVersion {
  color: #ffe9c0; font-weight: 800; font-size: 15px; text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,.45); margin: 0;
}
.announceIntro {
  color: #fff; font-weight: 700; font-size: 14px; text-align: center;
  max-width: min(520px, 90vw); line-height: 1.5; opacity: .92;
  text-shadow: 0 1px 3px rgba(0,0,0,.45); margin: 0 0 4px;
}
.announceList {
  display: flex; flex-direction: column; gap: 14px; align-items: stretch;
  width: min(560px, 92vw);
  max-height: min(58vh, 520px);
  overflow-y: auto;
  padding: 4px 2px 8px;
}
.announceCard {
  background: linear-gradient(180deg, #fff8e8, #ffe8c4);
  border: 4px solid #8a5a2b;
  border-radius: 18px;
  padding: 14px 16px 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
}
.announceCard.latest {
  border-color: #5a8a3a;
  background: linear-gradient(180deg, #f4ffe8, #e8f5c8 55%, #ffe8c4);
  box-shadow: 0 8px 20px rgba(0,0,0,.28), 0 0 0 2px rgba(127,191,61,.25);
}
.announceCardHead {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.announceLatest {
  font-size: 11px; font-weight: 900;
  color: #2e5210;
  background: linear-gradient(180deg, #c8f06a, #7fbf3d);
  border: 2px solid #4d7a1e;
  border-radius: 999px;
  padding: 2px 10px;
}
.announceVer {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 900; color: #5c3d1a;
}
html[data-locale="en"] .announceVer,
html[data-locale="fr"] .announceVer,
html[data-locale="de"] .announceVer { font-weight: 700; }
.announceDate {
  font-size: 12px; font-weight: 800; color: #8a6a3b;
  margin-left: auto;
}
.announceCardTitle {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 17px; font-weight: 900; color: #5c3d1a;
}
html[data-locale="en"] .announceCardTitle,
html[data-locale="fr"] .announceCardTitle,
html[data-locale="de"] .announceCardTitle { font-weight: 700; }
.announceCardBody {
  font-size: 14px; font-weight: 700; line-height: 1.75; color: #4a341c;
}
.announceCardBody b { color: #5c3d1a; }
.announceCardBody ul {
  margin: 8px 0 0; padding-left: 1.2em;
}
.announceCardBody li { margin: 4px 0; }

.mtitle { font-family: var(--font-display); color: #fff; font-size: 34px; font-weight: 900; text-shadow: 0 3px 6px rgba(0,0,0,.5); }
html[data-locale="en"] .mtitle,
html[data-locale="fr"] .mtitle,
html[data-locale="de"] .mtitle { font-weight: 700; }
.mbtn { min-width: 240px; border: 4px solid #7a5326; background: linear-gradient(180deg, #fff3d9, #ffd98f);
  color: #6b4423; font-weight: 900; font-size: 18px; padding: 13px 26px; border-radius: 18px;
  cursor: pointer; transition: transform .14s, box-shadow .14s; font-family: var(--font-display);
  box-shadow: 0 5px 0 #b98d55, 0 8px 16px rgba(0,0,0,.2);
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1.15; vertical-align: middle; }
html[data-locale="en"] .mbtn,
html[data-locale="fr"] .mbtn,
html[data-locale="de"] .mbtn { font-weight: 700; }
html[data-locale="fr"] .mbtn,
html[data-locale="de"] .mbtn {
  white-space: normal;
  max-width: min(420px, 94vw);
  text-align: center;
}
.mbtn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: 0 3px 0 #b98d55; }
.mbtn:disabled:hover { transform: none; box-shadow: 0 3px 0 #b98d55; }
.mbtn:hover { transform: scale(1.06) translateY(-2px); box-shadow: 0 7px 0 #b98d55, 0 12px 20px rgba(0,0,0,.25); }
.mbtn:active { transform: scale(.96); box-shadow: 0 2px 0 #b98d55; }
.mbtn.primary { background: linear-gradient(180deg, #b5e85e, #7fbf3d); border-color: #4d7a1e;
  color: #2e5210; box-shadow: 0 5px 0 #5c8a2b, 0 8px 16px rgba(0,0,0,.2); }
#helpBox { background: rgba(255,255,255,.88); border: 3px solid #7a9cc0; border-radius: 16px;
  padding: 12px 18px; color: #33506b; font-size: 13px; line-height: 1.7; max-width: min(560px, 88vw);
  max-height: min(32vh, 240px); overflow-y: auto; flex-shrink: 1; min-height: 0;
  position: relative; z-index: 3; }
#overStats { color: #ffe9c0; font-size: 18px; font-weight: 800; text-align: center; line-height: 2;
  background: rgba(0,0,0,.3); padding: 12px 30px; border-radius: 16px; border: 2px solid rgba(255,255,255,.3); }
.srow { color: #fff; font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.12); padding: 12px 20px; border-radius: 14px; min-width: 280px;
  justify-content: space-between; }
.srow input[type=range] { width: 150px; accent-color: #ffd94d; }
.srow input[type=checkbox] { width: 20px; height: 20px; accent-color: #7fbf3d; }

/* 四语切换：2×2 分段按钮 */
.langSwitch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  width: min(268px, 86vw); margin-top: 2px; border-radius: 14px; overflow: hidden;
  border: 3px solid #7a5326; box-shadow: 0 3px 0 #b98d55; position: relative; z-index: 3; flex-shrink: 0;
}
.langSwitch .langBtn {
  min-width: 0; border: none; border-radius: 0; box-shadow: none;
  background: linear-gradient(180deg, #fff3d9, #ffd98f); color: #6b4423;
  font-weight: 800; font-size: 13px; padding: 9px 10px; cursor: pointer;
  font-family: inherit; letter-spacing: .01em; line-height: 1.15;
  transition: background .12s, color .12s, box-shadow .12s;
  border-right: 1px solid rgba(122, 83, 38, .22);
  border-bottom: 1px solid rgba(122, 83, 38, .22);
}
.langSwitch .langBtn:nth-child(2n) { border-right: none; }
.langSwitch .langBtn:nth-last-child(-n+2) { border-bottom: none; }
.langSwitch .langBtn:hover { transform: none; background: linear-gradient(180deg, #ffe9b0, #ffcc6a); }
.langSwitch .langBtn.active {
  background: linear-gradient(180deg, #b5e85e, #7fbf3d); color: #2e5210;
  box-shadow: inset 0 0 0 2px rgba(77, 122, 30, .28);
  z-index: 1;
}
.langSwitch .langBtn:focus-visible {
  outline: 2px solid #4d7a1e; outline-offset: -2px; z-index: 2;
}
.langSwitch.compact { margin-top: 0; border-width: 2px; box-shadow: none; width: min(220px, 100%); }
.langSwitch.compact .langBtn { padding: 6px 8px; font-size: 13px; font-weight: 800; }
.langRow { justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.langRow .langSwitch { margin-left: auto; }

/* ??????????????? */
.cloud { position: absolute; background: #fff; border-radius: 999px; opacity: .88;
  pointer-events: none; animation: cloudDrift linear infinite; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: #fff; border-radius: 50%; pointer-events: none; }
.cloud.c1 { width: 140px; height: 44px; top: 14%; animation-duration: 42s; opacity: .75; }
.cloud.c2 { width: 100px; height: 34px; top: 58%; animation-duration: 56s; animation-delay: -20s; opacity: .55; }
.cloud.c3 { width: 180px; height: 52px; top: 78%; animation-duration: 68s; animation-delay: -40s; opacity: .7; }
.cloud.c4 { width: 90px; height: 30px; top: 42%; animation-duration: 48s; animation-delay: -8s; opacity: .5; }
.cloud.c5 { width: 120px; height: 38px; top: 8%; animation-duration: 36s; animation-delay: -25s; opacity: .65; }
.cloud.c1::before { width: 60px; height: 60px; top: -30px; left: 22px; }
.cloud.c1::after { width: 44px; height: 44px; top: -20px; right: 24px; }
.cloud.c2::before { width: 44px; height: 44px; top: -22px; left: 16px; }
.cloud.c2::after { width: 32px; height: 32px; top: -14px; right: 18px; }
.cloud.c3::before { width: 74px; height: 74px; top: -36px; left: 30px; }
.cloud.c3::after { width: 52px; height: 52px; top: -24px; right: 32px; }
.cloud.c4::before { width: 36px; height: 36px; top: -18px; left: 14px; }
.cloud.c4::after { width: 28px; height: 28px; top: -12px; right: 14px; }
.cloud.c5::before { width: 48px; height: 48px; top: -24px; left: 20px; }
.cloud.c5::after { width: 36px; height: 36px; top: -16px; right: 18px; }
@keyframes cloudDrift { from { left: -220px; } to { left: 110%; } }

@media (max-height: 700px) {
  .titleContent { padding: 16px 16px 12px; gap: 8px; }
  .titleActions { gap: 8px; }
  .titleMenu .title { font-size: clamp(30px, 6.5vw, 52px); }
  .titleMenu .mbtn { padding: 11px 18px; font-size: 16px; }
  .titleActionRow .mbtn { font-size: 14px; padding: 10px 8px; }
  .skySun { width: 64px; height: 64px; margin-left: -32px; }
  .skyRays { width: 200px; height: 200px; margin: -68px 0 0 -100px; }
  #helpBox { max-height: min(26vh, 180px); font-size: 12px; padding: 10px 14px; }
  .langSwitch .langBtn { padding: 7px 8px; font-size: 12px; }
}
@media (max-height: 560px) {
  .titleContent { padding: 10px 12px 8px; gap: 6px; }
  .titleBadge { padding: 3px 10px; font-size: 11px; }
  .titleVersion { display: none; }
  .fsTip { padding: 6px 12px; font-size: 12px; }
  .titleMenu .mbtn { padding: 9px 14px; font-size: 15px; box-shadow: 0 3px 0 #b98d55, 0 6px 12px rgba(0,0,0,.18); }
  .titleMenu .mbtn.primary { box-shadow: 0 3px 0 #4d7a1e, 0 6px 12px rgba(40,90,20,.25); animation: none; }
  #helpBox { max-height: min(22vh, 140px); }
}

/* ---------- ????? ---------- */
.saveHint { color: #fff; font-weight: 700; font-size: 14px; text-shadow: 0 2px 4px rgba(40,70,100,.45);
  margin: -4px 0 4px; text-align: center; max-width: min(420px, 90vw); line-height: 1.5; }
.modePick {
  display: flex; gap: 10px; width: min(360px, 90vw); justify-content: center; margin: 2px 0 6px;
}
.modeBtn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 4px solid #7a5326; border-radius: 16px;
  background: linear-gradient(180deg, #fff3d9, #ffd98f);
  color: #4a3218; font-family: var(--font-display); font-weight: 900; font-size: 14px;
  padding: 10px 8px 12px; cursor: pointer;
  box-shadow: 0 4px 0 #b98d55, 0 8px 14px rgba(0,0,0,.12);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.modeBtn .modeIcon { font-size: 26px; line-height: 1; }
.modeBtn .modeName { line-height: 1.2; }
.modeBtn:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.04); }
.modeBtn:active { transform: scale(.97); box-shadow: 0 2px 0 #b98d55; }
.modeBtn.active {
  background: linear-gradient(180deg, #b5e85e, #7fbf3d);
  border-color: #4d7a1e; color: #2e5210;
  box-shadow: 0 4px 0 #5c8a2b, 0 0 0 3px rgba(127,191,61,.35);
}
.modeBtn[data-mode="creative"].active {
  background: linear-gradient(180deg, #c8e8ff, #7ec8f0);
  border-color: #3a7aaa; color: #1e4a6a;
  box-shadow: 0 4px 0 #4a8ab0, 0 0 0 3px rgba(110,180,230,.35);
}
.modeDesc {
  color: #fff; font-weight: 700; font-size: 13px; line-height: 1.45;
  text-shadow: 0 2px 4px rgba(40,70,100,.45);
  text-align: center; max-width: min(380px, 90vw); margin: 0 0 8px;
  opacity: .95; min-height: 2.8em;
}
.saveNameInput {
  width: min(320px, 86vw); box-sizing: border-box;
  border: 4px solid #7a5326; border-radius: 14px;
  background: rgba(255,255,255,.95); color: #4a3218;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  padding: 12px 16px; outline: none;
  box-shadow: 0 4px 0 #b98d55, 0 8px 16px rgba(0,0,0,.15);
}
.saveNameInput:focus { border-color: #4d7a1e; box-shadow: 0 4px 0 #5c8a2b, 0 0 0 3px rgba(127,191,61,.35); }
.saveError { color: #fff; background: rgba(160,40,40,.85); border: 2px solid rgba(255,200,180,.5);
  font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 12px;
  max-width: min(320px, 86vw); text-align: center; }
.saveList {
  display: flex; flex-direction: column; gap: 10px;
  width: min(420px, 92vw); max-height: min(48vh, 420px);
  overflow-x: hidden; overflow-y: auto; padding: 4px 6px 8px;
  box-sizing: border-box;
}
.saveListEmpty { color: #fff; font-weight: 800; opacity: .85; }
.saveRow {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.9); border: 3px solid #7a9cc0; border-radius: 16px;
  padding: 10px 12px 10px 16px; cursor: pointer;
  transition: transform .12s, box-shadow .12s; box-shadow: 0 4px 12px rgba(0,0,0,.12);
  max-width: 100%; box-sizing: border-box;
}
.saveRow:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.18); }
.saveRow:active { transform: scale(.99); }
.saveRowMain { flex: 1; min-width: 0; text-align: left; }
.saveRowName { color: #33506b; font-weight: 900; font-size: 17px; font-family: var(--font-display);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saveRowMeta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-items: center; }
.saveRowDay { display: inline-block; font-size: 13px; font-weight: 800;
  color: #2e5210; background: linear-gradient(180deg, #d8f0a0, #b5e85e);
  border: 2px solid #4d7a1e; border-radius: 999px; padding: 2px 10px; }
.saveRowMode {
  display: inline-block; font-size: 12px; font-weight: 800;
  border-radius: 999px; padding: 2px 10px; border: 2px solid;
}
.saveRowMode.survival {
  color: #2e5210; background: linear-gradient(180deg, #e8f4c8, #c8e070);
  border-color: #6a9a28;
}
.saveRowMode.creative {
  color: #1e4a6a; background: linear-gradient(180deg, #d8f0ff, #9ad0f0);
  border-color: #3a7aaa;
}
.saveDel {
  flex-shrink: 0; border: 3px solid #8a3a2a; border-radius: 12px;
  background: linear-gradient(180deg, #ffd0c0, #f08870); color: #5a2010;
  font-weight: 900; font-size: 13px; padding: 8px 10px; cursor: pointer;
  font-family: var(--font-display); box-shadow: 0 3px 0 #a85840;
}
.saveDel:hover { filter: brightness(1.05); }
.saveDel.confirm { background: linear-gradient(180deg, #ff8a70, #e04830); color: #fff; border-color: #7a2010; }
.pauseSaveInfo { color: #ffe9c0; font-weight: 800; font-size: 15px;
  background: rgba(0,0,0,.28); border: 2px solid rgba(255,255,255,.25);
  padding: 8px 18px; border-radius: 12px; margin-top: -4px; }

/* ---------- ????? ---------- */
.creativeBlock {
  display: flex; flex-direction: column; flex-shrink: 0;
  border-bottom: 3px solid #c8b070;
  background: linear-gradient(180deg, #e8f4ff, #f0f8e8);
  margin: 0; min-height: 0; overflow: hidden;
}
.creativeHead {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 14px 4px; flex-wrap: wrap; flex-shrink: 0;
}
.creativeTitle { font-weight: 900; font-size: 14px; color: #2e5a7a; font-family: var(--font-display); }
.creativeHint { font-size: 11px; font-weight: 700; color: #6a7a50; opacity: .9; }
.creativeGrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 6px;
  padding: 6px 12px 10px; overflow-y: auto; min-height: 0;
  flex: 1; align-content: start;
}
.creativeCell {
  width: 100%; aspect-ratio: 52 / 58; max-height: 58px; min-height: 52px;
  background: #fffdf4; border: 2px solid #9ab8d0; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; position: relative; transition: transform .1s, border-color .1s;
  box-shadow: 0 2px 0 #b8c8d8;
}
.creativeCell:hover { transform: scale(1.06); border-color: #4a90c8; }
.creativeCell .ic { font-size: 20px; line-height: 1; }
.creativeCell .in { font-size: 9px; font-weight: 800; color: #4a6080; max-width: 90%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creativeCell .cnt {
  position: absolute; top: 1px; right: 3px; font-size: 11px; font-weight: 900; color: #3a7aaa;
}
.recipe .req.free { color: #3a8a50; opacity: .85; }

/* ?????????????????????? */
.invPanel.creativeOpen {
  width: min(780px, 96vw);
  height: min(88vh, 760px);
  max-height: min(88vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.invPanel.creativeOpen .invBody {
  /* 0% basis：在明确高度的面板里吃掉剩余空间，左侧才能 stretch */
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
  flex-direction: row;
  align-items: stretch;
}
.invPanel.creativeOpen .creativeBlock {
  flex: 0 0 min(42%, 320px);
  width: min(42%, 320px);
  max-height: none;
  min-height: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  border-bottom: none;
  border-right: 3px solid #c8b070;
}
.invPanel.creativeOpen .creativeGrid {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
}
.invPanel.creativeOpen .invPlayer {
  flex: 1 1 0; min-width: 0; min-height: 0;
}
.invPanel.creativeOpen .invPlayerHead { display: block; }
.invPanel.creativeOpen #invGrid {
  flex: 1 1 auto;
  min-height: 140px;
  overflow-y: auto;
}

/* ---------- ??? ---------- */
#touchUI { position: fixed; inset: 0; z-index: 25; pointer-events: none; }
#joyBase { position: absolute; bottom: 90px; left: 26px; width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.18); border: 3px solid rgba(255,255,255,.45); pointer-events: auto; touch-action: none; }
#joyKnob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.75); transform: translate(-50%,-50%); box-shadow: 0 3px 8px rgba(0,0,0,.3); }
#touchBtns { position: absolute; bottom: 96px; right: 22px; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: flex-end; max-width: 250px; pointer-events: auto; }
.tbtn { width: 58px; height: 58px; border-radius: 50%; border: 3px solid rgba(255,255,255,.6);
  background: rgba(30,45,70,.55); color: #fff; font-size: 22px; font-weight: 900; touch-action: none; }
.tbtn.big { width: 76px; height: 76px; font-size: 30px; }
.tbtn.sm { width: 40px; height: 40px; font-size: 14px; }
.tbtn:active { transform: scale(.9); background: rgba(90,130,180,.6); }
#touchHotbar { position: absolute; bottom: 220px; left: 18px; display: flex; flex-wrap: wrap; gap: 6px; max-width: 200px; pointer-events: auto; }

/* ---------- ?????ViTab OS? ---------- */
.tabletShell {
  position: fixed; inset: 0; z-index: 36;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(15, 25, 40, .45); gap: 12px;
  transform-origin: center center;
  contain: layout paint;
}
.tabletShell.panel-in {
  will-change: transform, opacity, filter;
  animation: tabletIn .48s cubic-bezier(.22, 1.4, .36, 1) both;
}
.tabletShell.panel-out {
  will-change: transform, opacity, filter;
  animation: tabletOut .36s cubic-bezier(.55, .05, .68, .2) both;
  pointer-events: none;
}
@keyframes tabletIn {
  0% {
    opacity: 0;
    transform: scale(.82) translateY(18px);
    filter: blur(4px);
    background: rgba(15, 25, 40, 0);
  }
  55% {
    opacity: 1;
    transform: scale(1.04) translateY(-4px);
    filter: blur(0);
    background: rgba(15, 25, 40, .48);
  }
  78% { transform: scale(.985) translateY(1px); }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: none;
    background: rgba(15, 25, 40, .45);
  }
}
@keyframes tabletOut {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: none;
  }
  30% {
    opacity: 1;
    transform: scale(1.045) translateY(-6px);
  }
  100% {
    opacity: 0;
    transform: scale(.8) translateY(22px);
    filter: blur(4px);
    background: rgba(15, 25, 40, 0);
  }
}
.tabletBezel {
  width: min(340px, 86vw); height: min(560px, 78vh);
  background: linear-gradient(160deg, #3a4555, #2a3340 55%, #1e2630);
  border-radius: 28px; padding: 14px 12px 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.12);
  border: 3px solid #1a2028; position: relative;
  display: flex; flex-direction: column;
}
.tabletCam {
  width: 8px; height: 8px; border-radius: 50%; background: #111;
  box-shadow: inset 0 0 0 2px #2a80b8; margin: 0 auto 8px; flex-shrink: 0;
}
.tabletScreen {
  flex: 1; min-height: 0; background: #0d1a24; border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column;
  border: 2px solid #152030; position: relative;
}
.vStatus {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px 4px; background: rgba(0,0,0,.35); color: #e8f4ff;
  font-size: 11px; font-weight: 800; flex-shrink: 0; z-index: 2;
}
.vBrand { color: #6ec8ff; letter-spacing: 1px; }
.vTime { font-variant-numeric: tabular-nums; }
.vStatusRight { display: flex; gap: 8px; align-items: center; }
.vSignal { opacity: .35; letter-spacing: -1px; font-size: 10px; }
.vBatt { color: #8fd49a; font-variant-numeric: tabular-nums; }
.vBatt.low { color: #ff9a6b; }
.vBatt.crit { color: #ff6b6b; }
.vBatt.off { color: #7a8a9a; opacity: .75; }
.tabletPage { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.vOffBody {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 18px; text-align: center; background: #0a1218; color: #9bb4c8; gap: 8px;
}
.vOffIcon {
  width: 64px; height: 64px; border-radius: 50%;
  border: 3px solid #3a5060; color: #5a7080; font-size: 32px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 6px;
  background: #121c24;
}
.vOffTitle { font-weight: 900; font-size: 18px; color: #c5d8e8; }
.vOffDesc { font-size: 12px; font-weight: 700; line-height: 1.5; color: #7a98b0; max-width: 220px; margin-bottom: 8px; }
.vBattBay {
  display: flex; align-items: center; gap: 10px; width: min(240px, 88%);
  padding: 12px 14px; border-radius: 14px; cursor: pointer; font-family: inherit;
  border: 2px solid #4a6a80; background: #152028; color: #c5d8e8;
  transition: transform .12s, border-color .12s, background .12s;
}
.vBattBay:hover { transform: scale(1.02); border-color: #6ec8ff; background: #1a3040; }
.vBattBay.filled {
  border-style: solid; border-color: #5aaf6a; background: #1a3028;
}
.vBattBayIcon { font-size: 26px; line-height: 1; }
.vBattBayLabel { font-weight: 800; font-size: 13px; text-align: left; flex: 1; }
.vBattPick {
  width: min(260px, 92%); max-height: 140px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px; margin-top: 8px;
}
.vBattPick.hidden { display: none; }
.vBattPickItem {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: 10px; border: 1px solid #2a4860; background: #1a3048;
  color: #e8f4ff; font-family: inherit; font-weight: 800; font-size: 12px;
  cursor: pointer; text-align: left;
}
.vBattPickItem:hover { background: #234060; }
.vBattPickEmpty {
  font-size: 12px; font-weight: 700; color: #7a98b0; padding: 8px;
}
.vDockRow {
  position: relative; z-index: 1; margin-top: auto;
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 10px 10px;
}
.vEjectBatt {
  border: 1px solid #3a5068; background: rgba(255,255,255,.06); color: #8ab8d8;
  font-family: inherit; font-weight: 800; font-size: 11px; padding: 4px 12px;
  border-radius: 8px; cursor: pointer;
}
.vEjectBatt:hover { background: rgba(255,255,255,.12); color: #e8f4ff; }
.vWallpaper {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(110,200,255,.35), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(80,140,200,.25), transparent 45%),
    linear-gradient(165deg, #1a3a55 0%, #0f2438 45%, #163048 100%);
  pointer-events: none;
}
.vHomeBrand {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 12px;
  padding: 28px 22px 8px;
}
.vLogo {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(145deg, #6ec8ff, #2b6ea8);
  color: #fff; font-weight: 900; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(43,110,168,.45);
}
.vLogoText { color: #e8f4ff; font-weight: 900; font-size: 16px; line-height: 1.25; }
.vLogoText small { font-size: 11px; font-weight: 700; color: #8ab8d8; }
.vAppGrid {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr;
  gap: 18px; padding: 24px 28px; justify-items: center;
}
.vApp {
  background: transparent; border: none; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform .12s; width: 88px;
}
.vApp:hover { transform: scale(1.06); }
.vApp:active { transform: scale(.94); }
.vAppIcon {
  width: 58px; height: 58px; border-radius: 16px; font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
}
.vAppIcon.market { background: linear-gradient(160deg, #5ad0a8, #2a8a6a); }
.vAppIcon.guide { background: linear-gradient(160deg, #f0c060, #c98a4b); }
.vAppName { color: #e8f4ff; font-size: 12px; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.vDockHint {
  text-align: center;
  padding: 4px; color: #7aa0b8; font-size: 11px; font-weight: 700;
}
.vAppBar {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: #1a3048; color: #e8f4ff; font-weight: 900; font-size: 14px; flex-shrink: 0;
}
.vBack, .guideBack {
  border: none; background: rgba(255,255,255,.1); color: #6ec8ff;
  width: 28px; height: 28px; border-radius: 8px; font-size: 16px; cursor: pointer;
  font-family: inherit; font-weight: 900;
}
.guideBack { width: auto; padding: 4px 10px; font-size: 12px; margin-bottom: 10px; }
.vOffline {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center; background: #0f1c28; color: #c5d8e8;
}
.vOfflineIcon { font-size: 42px; margin-bottom: 12px; opacity: .7; }
.vOfflineTitle { font-weight: 900; font-size: 18px; color: #ff9a6b; margin-bottom: 8px; }
.vOfflineDesc { font-size: 13px; line-height: 1.55; font-weight: 700; color: #9bb4c8; }

.vMarketOnline {
  flex: 1; display: flex; flex-direction: column; min-height: 0; background: #0f1c28; position: relative;
}
.vMarketTop {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; background: #152838; border-bottom: 1px solid #2a4860; flex-shrink: 0;
}
.vCloudCoins {
  font-weight: 900; font-size: 14px; color: #7ec8ef;
  background: rgba(110, 200, 255, .12); border: 1px solid #3a6a88;
  border-radius: 10px; padding: 4px 10px; white-space: nowrap;
}
.vMarketTabs { display: flex; gap: 6px; }
.vMarketTab {
  border: 1px solid #2a4860; background: #1a3048; color: #9bb4c8;
  font-family: inherit; font-weight: 800; font-size: 12px;
  padding: 5px 12px; border-radius: 10px; cursor: pointer;
}
.vMarketTab.active { background: #2a5a78; color: #e8f4ff; border-color: #4a90c8; }
.vMarketBody {
  flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px;
}
.vContract {
  background: #1a3048; border: 1px solid #2a4860; border-radius: 12px;
  padding: 10px 12px; color: #e8f4ff;
}
.vContractSpecial {
  border-color: #3a7a68; background: #163830;
}
.vContractActive { box-shadow: inset 0 0 0 1px rgba(90,208,168,.4); }
.vContractHead {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px;
}
.vContractName { font-weight: 900; font-size: 13px; color: #7ec8ef; }
.vContractReward { font-weight: 800; font-size: 12px; color: #5ad0a8; white-space: nowrap; }
.vContractReq { font-size: 12px; font-weight: 700; color: #b8cfe0; line-height: 1.45; margin-bottom: 8px; }
.vContractDesc { font-size: 12px; font-weight: 700; color: #b8cfe0; line-height: 1.45; margin-bottom: 6px; }
.vContractProg { font-size: 12px; font-weight: 800; color: #9ed65e; margin-bottom: 6px; }
.vContractMeta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.vKindTag {
  font-size: 10px; font-weight: 900; color: #12352e; background: #5ad0a8;
  border-radius: 999px; padding: 2px 8px;
}
.vKindTime { font-size: 11px; font-weight: 800; color: #d8b271; }
.vContractActs { display: flex; gap: 6px; flex-wrap: wrap; }
.vContractBtn {
  border: none; border-radius: 9px; padding: 5px 12px; font-family: inherit;
  font-weight: 800; font-size: 12px; cursor: pointer;
}
.vContractBtn.accept { background: #2a8a6a; color: #fff; }
.vContractBtn.deliver { background: #4a90c8; color: #fff; }
.vContractBtn.cancel { background: #3a4a58; color: #c5d8e8; }
.vContractBtn:disabled { opacity: .45; cursor: default; }
.vContractTag {
  display: inline-block; font-size: 10px; font-weight: 800; color: #ffd94d;
  background: rgba(255, 217, 77, .15); border-radius: 6px; padding: 2px 6px; margin-left: 6px;
}
.vMarketEmpty {
  text-align: center; padding: 28px 16px; color: #9bb4c8; font-weight: 700; font-size: 13px; line-height: 1.55;
}
.vMarketTut {
  position: absolute; inset: 0; z-index: 5;
  background: rgba(8, 16, 24, .82);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.vMarketTutCard {
  background: #1a3048; border: 2px solid #3a6a88; border-radius: 16px;
  padding: 18px 16px; max-width: 280px; text-align: center; color: #e8f4ff;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.vMarketTutIcon { font-size: 36px; margin-bottom: 8px; }
.vMarketTutTitle { font-weight: 900; font-size: 16px; color: #6ec8ff; margin-bottom: 8px; }
.vMarketTutBody { font-size: 13px; line-height: 1.55; font-weight: 700; color: #b8cfe0; margin-bottom: 14px; }
.vMarketTutBtn {
  border: none; background: linear-gradient(180deg, #5ad0a8, #2a8a6a);
  color: #fff; font-family: inherit; font-weight: 900; font-size: 13px;
  padding: 8px 20px; border-radius: 12px; cursor: pointer;
}
.vSignal.on { color: #5ad0a8; letter-spacing: 1px; }
.vSignal.off { color: #6a8090; opacity: .7; }

.guideList {
  flex: 1; overflow-y: auto; padding: 8px 10px; background: #0f1c28;
  display: flex; flex-direction: column; gap: 6px;
}
.guideItem {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: #1a3048; border: 1px solid #2a4860; border-radius: 12px;
  cursor: pointer; color: #e8f4ff; font-family: inherit; text-align: left;
  transition: background .12s, transform .12s;
}
.guideItem:hover { background: #234060; transform: translateX(2px); }
.guideItem .gic { font-size: 22px; width: 32px; text-align: center; }
.guideItem .gtitle { font-weight: 800; font-size: 13px; }
.guideDetail {
  flex: 1; overflow-y: auto; padding: 12px 14px; background: #0f1c28; color: #d0e4f4;
}
.guideDetailTitle { font-weight: 900; font-size: 16px; color: #6ec8ff; margin-bottom: 10px; }
.guideDetailBody { font-size: 13px; line-height: 1.65; font-weight: 700; color: #b8cfe0; }
.vNav {
  display: flex; justify-content: space-around; align-items: center;
  padding: 6px 20px 8px; background: rgba(0,0,0,.4); flex-shrink: 0; z-index: 2;
}
.vNavBtn {
  border: none; background: transparent; color: #a8c8e0; font-size: 16px;
  width: 44px; height: 32px; cursor: pointer; border-radius: 8px; opacity: .85;
}
.vNavBtn:hover { background: rgba(255,255,255,.08); color: #fff; }
.tabletClose {
  border: 3px solid #8a5a2b; background: linear-gradient(180deg, #fff3d9, #ffe7b8);
  color: #5c3d1a; font-weight: 900; font-size: 14px; padding: 8px 20px;
  border-radius: 14px; cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.tabletClose:hover { transform: scale(1.05); }

@media (max-width: 600px) {
  .tabletBezel { height: min(520px, 72vh); }
  #hotbar { gap: 4px; }
  .slot { width: 46px; height: 46px; font-size: 20px; }
}

/* ---------- ???? ---------- */
#supplyMenu {
  justify-content: flex-start;
  padding: 28px 16px 24px;
  overflow-y: auto;
  gap: 12px;
}
.supplyIntro {
  color: #fff; font-weight: 700; font-size: 14px; text-align: center;
  max-width: min(520px, 90vw); line-height: 1.5; opacity: .95;
  text-shadow: 0 2px 4px rgba(0,0,0,.65), 0 0 12px rgba(0,0,0,.35); margin-bottom: 4px;
}
.supplyCards {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  width: min(1080px, 96vw);
}
.supplyCard {
  flex: 1 1 280px; max-width: 340px;
  background: linear-gradient(180deg, #fff8e8, #ffe8c4);
  border: 4px solid #8a5a2b; border-radius: 18px;
  padding: 14px 14px 16px; box-shadow: 0 8px 20px rgba(0,0,0,.28);
  display: flex; flex-direction: column; gap: 10px;
}
.supplyCardHead { display: flex; gap: 10px; align-items: flex-start; }
.supplyCardIcon { font-size: 32px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.supplyCardTitle { font-family: var(--font-display); font-weight: 900; font-size: 17px; color: #5c3d1a; }
html[data-locale="en"] .supplyCardTitle,
html[data-locale="fr"] .supplyCardTitle,
html[data-locale="de"] .supplyCardTitle { font-weight: 700; }
.supplyCardDesc { font-size: 12px; font-weight: 700; color: #8a6a3b; margin-top: 2px; line-height: 1.35; }
.supplyLoot {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px;
  background: rgba(138,90,43,.08); border-radius: 12px; padding: 8px;
}
.supplyLoot li {
  display: flex; align-items: center; gap: 4px;
  background: #fff; border: 2px solid #d4b888; border-radius: 10px;
  padding: 3px 8px; font-size: 12px; font-weight: 800; color: #5c3d1a;
}
.supplyLoot .lootIcon { font-size: 15px; }
.supplyCardStatus {
  min-height: 18px; font-size: 12px; font-weight: 800; color: #a05a20; text-align: center;
}
.supplyCardStatus.ok { color: #3d7a1e; }
.supplyCardStatus.warn { color: #c44; }
.supplyProgress { display: flex; flex-direction: column; gap: 6px; }
.supplyProgressTrack {
  height: 12px; border-radius: 8px; background: rgba(20,30,45,.15);
  border: 2px solid #b98d55; overflow: hidden;
}
.supplyProgressFill {
  height: 100%; width: 0%; background: linear-gradient(90deg, #7ecb54, #ffd94d);
  transition: width .25s ease-out; border-radius: 6px;
}
.supplyProgressText { font-size: 12px; font-weight: 800; color: #6b4423; text-align: center; }
.supplyBtn { min-width: 0; width: 100%; font-size: 15px; padding: 11px 14px; }
.supplyBtnRow { display: flex; flex-direction: column; gap: 8px; }
.supplyBtn.claimReady {
  background: linear-gradient(180deg, #b5e85e, #7fbf3d); border-color: #4d7a1e;
  color: #2e5210; box-shadow: 0 5px 0 #5c8a2b, 0 8px 16px rgba(0,0,0,.2);
}
.supplyBtn.watchAd {
  background: linear-gradient(180deg, #9fd4ff, #5aa8e8); border-color: #2f6fa8;
  color: #123a5c; box-shadow: 0 5px 0 #3d7ab0, 0 8px 16px rgba(0,0,0,.2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
/* 矩形奖励广告图标（播放三角） */
.rewardAdIcon {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; width: 22px; height: 16px;
  border-radius: 3px;
  background: linear-gradient(180deg, #2a3548, #1a2233);
  border: 1.5px solid rgba(255,255,255,.92);
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  position: relative;
}
.rewardAdIcon::after {
  content: '';
  width: 0; height: 0;
  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent #fff;
  margin-left: 1px;
}
.mbtn.watchAd {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.supplyTip {
  color: #ffe9c0; font-size: 12px; font-weight: 700; text-align: center;
  max-width: min(520px, 90vw); line-height: 1.45; opacity: .95;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* ---------- 小高度屏幕适配（未全屏 Chromebook ≈800×420） ---------- */
/* 压缩菜单纵向占位，确保主要操作按钮无需滚动即可见 */
@media (max-height: 560px) {
  .menu { gap: 8px; padding: 10px 12px 12px; }
  .mtitle { font-size: 22px; }
  .menu .mbtn { min-width: min(220px, 82vw); padding: 8px 18px; font-size: 15px;
    border-width: 3px; border-radius: 14px;
    box-shadow: 0 3px 0 #b98d55, 0 6px 12px rgba(0,0,0,.18); }
  .menu .mbtn.primary { box-shadow: 0 3px 0 #5c8a2b, 0 6px 12px rgba(0,0,0,.18); }
  .srow { padding: 7px 14px; font-size: 14px; min-width: min(280px, 88vw); border-radius: 12px; }
  .srow input[type=range] { width: 110px; }
  .srow input[type=checkbox] { width: 16px; height: 16px; }
  .langSwitch.compact .langBtn { padding: 4px 6px; font-size: 12px; }
  .pauseSaveInfo { font-size: 12px; padding: 4px 12px; }
  #overStats { font-size: 15px; line-height: 1.7; padding: 8px 20px; }
  .modeBtn { padding: 6px 6px 8px; }
  .modeBtn .modeIcon { font-size: 20px; }
  .modeDesc { font-size: 12px; min-height: 0; }
  .saveHint { font-size: 12px; }

  /* 补给空投：卡片区内部滚动，「返回」等主按钮始终可见 */
  #supplyMenu { overflow-y: hidden; gap: 8px; padding-top: 12px; padding-bottom: 10px; }
  #supplyMenu .supplyCards { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px 4px 6px; }
  #supplyMenu .supplyIntro { font-size: 12px; margin-bottom: 0; }
  #supplyMenu .supplyTip { font-size: 11px; }
  .supplyCard { padding: 10px 10px 12px; gap: 6px; }
  .supplyCardHead { gap: 8px; }
  .supplyCardIcon { font-size: 24px; }
  .supplyCardTitle { font-size: 14px; }
  .supplyCardDesc { font-size: 11px; }
  .supplyBtn { padding: 8px 12px; font-size: 13px; }

  /* 公告：列表内部滚动，「返回」始终可见 */
  #announceMenu { overflow-y: hidden; }
  .announceList { flex: 1 1 auto; min-height: 0; max-height: none; }
  .announceCard { padding: 10px 12px 12px; }
  .announceCardBody { font-size: 12px; line-height: 1.55; }

  /* 背包：压缩固定区高度，扩大物品格滚动区；✕ 关闭按钮固定可见 */
  .invPanel { max-height: min(94vh, 640px); }
  .invPanel > .phead { padding: 8px 14px; font-size: 15px; }
  .invPanel .weaponBar, .invPanel .deviceBar, .invPanel .armorBar { padding: 5px 10px 4px; gap: 6px; }
  .invPanel .weaponBarLabel { font-size: 11px; }
  .invPanel .weaponEquip { width: 42px; height: 42px; border-radius: 10px; border-width: 2px; }
  .invPanel .weaponEquip .ic { font-size: 18px; }
  .invPanel .deviceBarHint { font-size: 10px; }
  .invPanel .invMeta { padding: 3px 12px 0; font-size: 11px; }
  .invPanel .invMetaHint { display: none; }
  .invPanel .ptip { display: none; }
  #invGrid { min-height: 168px; padding: 8px 12px 10px; gap: 8px; }
  /* 矮窗仍保持左右分栏：左侧创意栏铺满高度，勿再 cap 成一条矮带 */
  .invPanel.creativeOpen {
    height: min(94vh, 640px);
    max-height: min(94vh, 640px);
  }
  .invPanel.creativeOpen .creativeBlock {
    max-height: none;
    align-self: stretch;
  }
}

/* 窄屏叠放布局须盖过上方矮窗规则，避免创意栏 height:100% 挤掉右侧背包 */
@media (max-width: 560px) {
  .invPanel.creativeOpen .invBody { flex-direction: column; }
  .invPanel.creativeOpen .creativeBlock {
    width: 100%; max-width: none; flex-basis: auto;
    height: auto; max-height: min(32vh, 240px);
    border-right: none; border-bottom: 3px solid #c8b070;
  }
}

/* ????/???? ?? ????????adStarted ????? */
.adBlocker {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 20, 36, .55); backdrop-filter: blur(2px);
  pointer-events: auto;
}
/* ?????????????????????? */
body.ad-playing .menu {
  visibility: hidden !important;
  pointer-events: none !important;
}
.adBlockerInner {
  text-align: center; color: #fff;
  background: rgba(20,30,50,.88); border: 3px solid rgba(255,255,255,.35);
  border-radius: 20px; padding: 28px 36px; box-shadow: 0 12px 32px rgba(0,0,0,.45);
}
.adSpinner {
  width: 42px; height: 42px; margin: 0 auto 14px;
  border: 4px solid rgba(255,255,255,.25); border-top-color: #ffd94d;
  border-radius: 50%; animation: adSpin .75s linear infinite;
}
@keyframes adSpin { to { transform: rotate(360deg); } }
.adBlockerText { font-family: var(--font-display); font-weight: 800; font-size: 16px; }

/* ---------- ??????? / ???????? ---------- */
#storyIntro {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
  animation: storyIntroIn .55s ease-out;
}
#storyIntro.hidden { display: none; }
#storyIntro.storyIntro-out { animation: storyIntroOut .48s ease-in forwards; }
.storyIntroBg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 35%, rgba(255,210,140,.28), transparent 55%),
    linear-gradient(180deg, #1a3050 0%, #0c1a2e 48%, #152438 100%);
}
.storyIntroBg::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.14) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 18%, rgba(255,255,255,.1) 0 1.5px, transparent 3px),
    radial-gradient(circle at 40% 70%, rgba(255,255,255,.08) 0 2px, transparent 3px),
    radial-gradient(circle at 85% 55%, rgba(255,255,255,.12) 0 1px, transparent 2px);
  opacity: .7; pointer-events: none;
}
.storyIntroCard {
  position: relative; z-index: 1;
  width: min(520px, 90vw);
  padding: 28px 28px 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.2), transparent 30%),
    linear-gradient(165deg, #fff8ea, #ffe4b8 55%, #f5d09a);
  border: 5px solid #8a5a2b;
  border-radius: 18px 22px 16px 24px / 22px 16px 24px 18px;
  box-shadow:
    0 18px 48px rgba(8,16,28,.55),
    0 2px 0 rgba(255,255,255,.4) inset,
    0 0 0 2px rgba(255,230,180,.35);
  transform: rotate(-0.4deg);
}
.storyIntroCard.storyCardPulse { animation: storyCardPulse .35s ease-out; }
@keyframes storyCardPulse {
  from { transform: rotate(-0.4deg) scale(.96); opacity: .7; }
  to { transform: rotate(-0.4deg) scale(1); opacity: 1; }
}
.storyIntroBadge {
  display: inline-block;
  font-weight: 900; font-size: 13px; color: #7a5326;
  background: rgba(255,249,236,.85);
  border: 3px solid #8a5a2b; border-radius: 999px;
  padding: 4px 12px; margin-bottom: 14px;
  box-shadow: 0 2px 0 rgba(0,0,0,.08);
}
.storyIntroText {
  font-size: 17px; font-weight: 700; line-height: 1.7; color: #4a3018;
  min-height: 6.2em; white-space: pre-wrap;
}
.storyIntroDots { display: flex; gap: 8px; justify-content: center; margin: 16px 0 14px; }
.storyDot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #c9a06a; border: 2px solid #8a5a2b; opacity: .45;
}
.storyDot.on { opacity: 1; background: #ffd94d; transform: scale(1.15); }
.storyIntroActions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes storyIntroIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes storyIntroOut {
  to { opacity: 0; transform: scale(1.02); }
}

.journalPanel {
  width: min(560px, 94vw);
  max-height: 78vh;
  overflow: hidden;
}
.journalBody {
  display: flex; flex-direction: column; flex: 1; overflow: hidden;
  min-height: min(48vh, 380px);
  background: linear-gradient(180deg, #fff6e4, #ffe9c8 55%, #ffe3b8);
}
.journalPanel .ptip { font-size: 12px; }
.journalTabs {
  display: flex; gap: 6px; padding: 8px 12px 0;
  background: linear-gradient(180deg, #fff6e4, #ffe9c4);
  border-bottom: 2px solid #e0c898;
  flex-shrink: 0;
}
.journalTab {
  flex: 1;
  font-family: inherit;
  font-size: 12px; font-weight: 900;
  color: #8a6a3a;
  background: rgba(255,248,230,.7);
  border: 3px solid #c9a46a;
  border-radius: 12px 14px 8px 10px / 14px 10px 12px 8px;
  padding: 7px 6px;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(90,50,20,.1);
  transition: transform .12s, background .12s;
  white-space: nowrap;
}
.journalTab:hover { transform: translateY(-1px); background: #fff8e8; }
.journalTab.on {
  color: #5c3d1a;
  background: linear-gradient(180deg, #fff8e0, #ffe0a8);
  border-color: #8a5a2b;
  box-shadow: 0 3px 0 rgba(90,50,20,.14), inset 0 1px 0 rgba(255,255,255,.55);
}
.journalScroll {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 12px 16px 8px;
  background:
    repeating-linear-gradient(transparent, transparent 27px, rgba(138,90,43,.07) 28px),
    linear-gradient(90deg, rgba(180,120,60,.08) 0 18px, transparent 18px);
}
.journalEmpty {
  text-align: center; color: #9a7a4a; font-weight: 700; padding: 28px 12px; font-size: 14px;
}
.journalEntries { display: flex; flex-direction: column; gap: 14px; }
.journalEntry {
  position: relative;
  background: linear-gradient(180deg, rgba(255,252,245,.92), rgba(255,236,205,.88));
  border: 3px solid #8a5a2b;
  border-radius: 14px 18px 12px 16px / 16px 12px 18px 14px;
  padding: 12px 14px 12px 16px;
  box-shadow: 0 3px 0 rgba(90,50,20,.12), inset 0 1px 0 rgba(255,255,255,.5);
  overflow: hidden;
  isolation: isolate;
}
.journalEntryMeta {
  font-size: 11px; font-weight: 800; color: #a07840; margin-bottom: 4px; letter-spacing: .04em;
}
.journalEntryTitle {
  margin: 0 0 8px; font-size: 15px; font-weight: 900; color: #5c3d1a;
}
.journalEntryBody {
  margin: 0 0 10px; font-size: 14px; font-weight: 700; line-height: 1.65; color: #4a341c;
  white-space: pre-wrap; min-height: 1.2em;
}
.journalQuestTag {
  font-size: 12px; font-weight: 800; color: #5c3d1a;
  background: rgba(255,217,77,.28);
  border: 2px dashed #c98a4b; border-radius: 10px;
  padding: 6px 10px;
}
.journalQuestTag.confirmed {
  border-style: solid; border-color: #7fbf4d; background: rgba(180,230,140,.3); color: #3d6a1e;
}
.journalQuestTag.pending {
  border-color: #e8a83e; background: rgba(255,200,100,.35); animation: questPulse 1.6s ease-in-out infinite;
}
@keyframes questPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,168,62,.25); }
  50% { box-shadow: 0 0 0 4px rgba(232,168,62,.12); }
}
.journalEpilogue {
  border-color: #5a8a3a;
  background: linear-gradient(180deg, #f4ffe8, #e4f5c8);
}
.journalEpilogueHook {
  margin-top: 10px;
  color: #6a5a28;
  font-style: italic;
  opacity: 0.92;
}
.journalEnvelope {
  border-color: #7a6a4a;
  background: linear-gradient(180deg, rgba(255,250,235,.95), rgba(245,228,190,.9));
}
.journalEnvelope .journalEntryMeta { color: #8a7040; }
.journalThreadTag {
  display: inline-block;
  font-size: 11px; font-weight: 800; color: #6a4a28;
  background: rgba(200,160,90,.22);
  border: 2px solid #c9a46a;
  border-radius: 8px;
  padding: 2px 8px;
  margin-bottom: 6px;
}
.journalInsight {
  border-color: #5a7a9a;
  background: linear-gradient(180deg, #f0f6ff, #d8e8f8);
}
.journalInsight .journalEntryTitle { color: #2a4a6a; }
.journalInsight .journalEntryBody { color: #2e3e52; }
.journalLoreHead {
  font-size: 12px; font-weight: 800; color: #8a6a3a;
  text-align: center; padding: 4px 8px 8px;
}
.journalAchHead {
  text-align: center; padding: 2px 4px 10px;
}
.journalAchHeadTitle {
  font-size: 13px; font-weight: 900; color: #7a5326; margin-bottom: 8px;
}
.journalAchBar {
  height: 10px; border-radius: 999px;
  background: rgba(138,90,43,.14);
  border: 2px solid #c9a46a;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(90,50,20,.12);
}
.journalAchBar > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #e8a83e, #ffd94d 55%, #ffe9a0);
  border-radius: inherit;
  box-shadow: 0 0 8px rgba(255, 217, 77, .35);
  transition: width .35s ease;
}
.journalAchBar.thin { height: 7px; margin-top: 4px; }
.journalAchSection { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.journalAchSectionTitle {
  font-size: 12px; font-weight: 900; color: #8a6a3a;
  letter-spacing: .06em;
  padding: 2px 4px 0;
  border-bottom: 2px dashed rgba(138,90,43,.2);
  margin-bottom: 2px;
}
.journalAch .journalAchRow {
  display: flex; gap: 12px; align-items: flex-start;
}
.journalAchIcon {
  flex: 0 0 44px; width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 22px;
  background: radial-gradient(circle at 35% 30%, #fff8e0, #ffe0a8);
  border: 3px solid #c9a46a;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
.journalAch.unlocked {
  border-color: #c4892a;
  background:
    linear-gradient(115deg, transparent 36%, rgba(255,255,255,.28) 48%, transparent 60%),
    linear-gradient(180deg, #fff8e0, #ffe6b0);
  overflow: hidden;
}
.journalAch.unlocked .journalAchIcon {
  border-color: #8a5a2b;
  background: radial-gradient(circle at 35% 30%, #fff6d0, #f0c050 60%, #c4892a);
}
.journalAch.locked {
  opacity: .78;
  border-style: dashed;
  border-color: #b89868;
  background: linear-gradient(180deg, rgba(255,250,240,.75), rgba(245,230,200,.7));
}
.journalAch.locked .journalEntryTitle { color: #8a7048; }
.journalAch.locked .journalEntryBody { color: #9a8060; font-size: 13px; }
.journalAchCopy { min-width: 0; flex: 1; }
.journalAchProg {
  margin-top: 6px;
  font-size: 11px; font-weight: 800; color: #8a6a3a;
}
.journalFoot {
  flex-shrink: 0;
  padding: 10px 14px 14px;
  border-top: 2px solid #e0c898;
  background: linear-gradient(180deg, #fff3d8, #ffe6b8);
  display: flex; justify-content: center;
}
.journalFoot .mbtn { min-width: 180px; }
.journalFoot .mbtn:disabled { opacity: .45; cursor: default; transform: none; }

/* ========== 按钮华丽点击反馈 ========== */
#uiFxLayer {
  position: fixed; inset: 0; z-index: 80;
  pointer-events: none; overflow: hidden;
}

.uiRipple {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,249,200,.85) 0%, rgba(255,217,77,.45) 40%, rgba(255,180,60,0) 70%);
  transform: translate(-50%, -50%) scale(0);
  animation: uiRippleOut .55s cubic-bezier(.15,.85,.25,1) forwards;
  mix-blend-mode: screen;
}
@keyframes uiRippleOut {
  0% { opacity: .95; transform: translate(-50%, -50%) scale(0.15); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

.uiSpark {
  position: absolute; width: 7px; height: 7px; margin: -3.5px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8e0, #ffd94d 55%, transparent 72%);
  box-shadow: 0 0 10px rgba(255, 217, 77, .9);
  animation: uiSparkFly .55s ease-out forwards;
  --dx: 0px; --dy: -40px;
}
@keyframes uiSparkFly {
  0% { opacity: 1; transform: translate(0, 0) scale(.5); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.15); }
}

.uiRing {
  position: absolute; border-radius: 50%;
  border: 2.5px solid rgba(255, 217, 77, .85);
  box-shadow: 0 0 12px rgba(255, 200, 80, .55);
  transform: translate(-50%, -50%) scale(.4);
  animation: uiRingOut .45s ease-out forwards;
}
@keyframes uiRingOut {
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
}

/* 被点击元素短脉冲 */
.uiBtnPop {
  animation: uiBtnPop .32s cubic-bezier(.2,1.2,.3,1) !important;
}
@keyframes uiBtnPop {
  0% { filter: brightness(1); }
  35% { filter: brightness(1.18); transform: scale(0.94); }
  70% { filter: brightness(1.08); transform: scale(1.05); }
  100% { filter: brightness(1); transform: scale(1); }
}

/* 通用可点控件：更跟手的悬停/按下 */
.mbtn, .hbtn, .craftBtn, .catBtn, .craftReadyItem, .supplyBtn,
.signalMsg, .guideItem, .vBattPickItem, .langBtn,
.slot, .pclose, .journalTab, button.mbtn, .invCell, .slotCell, .heatBtn {
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform .14s cubic-bezier(.22,1,.36,1),
    box-shadow .14s,
    filter .14s,
    background .14s,
    border-color .14s !important;
}
.mbtn, .hbtn, .craftBtn, .catBtn, .craftReadyItem, .supplyBtn, .heatBtn {
  overflow: hidden;
}
/* 扫光用 ::before，把 ::after 留给 hasNew 红点，避免悬停时红点被扫走 */
.mbtn::before, .hbtn::before, .craftBtn::before, .supplyBtn::before,
.craftReadyItem::before, .catBtn::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.45) 48%, transparent 62%);
  transform: translateX(-120%);
  opacity: 0;
  z-index: 1;
  border-radius: inherit;
}
.mbtn:hover::before, .hbtn:hover::before, .craftBtn:hover::before,
.supplyBtn:hover::before, .craftReadyItem:hover::before, .catBtn:hover::before {
  animation: uiBtnShine .7s ease-out;
}
@keyframes uiBtnShine {
  0% { opacity: 0; transform: translateX(-120%); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translateX(120%); }
}

.mbtn:active:not(:disabled),
.hbtn:active,
.craftBtn:active:not(.disabled):not(:disabled),
.catBtn:active,
.craftReadyItem:active,
.supplyBtn:active:not(:disabled),
.slot:active,
.pclose:active,
.signalMsg:active,
.guideItem:active,
.invCell:active:not(.empty),
.slotCell:active:not(.empty),
.heatBtn:active:not(:disabled) {
  transform: scale(.93) translateY(1px) !important;
  filter: brightness(1.08);
}

.slot:active { box-shadow: 0 1px 4px rgba(0,0,0,.35), inset 0 2px 4px rgba(0,0,0,.2) !important; }
.hbtn:active { box-shadow: 0 1px 4px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.15) !important; }

/* 主按钮点击后金边闪一下 */
.mbtn.uiBtnFlash {
  box-shadow:
    0 5px 0 #b98d55,
    0 0 0 3px rgba(255, 217, 77, .55),
    0 0 22px rgba(255, 200, 80, .45) !important;
}
.mbtn.primary.uiBtnFlash {
  box-shadow:
    0 5px 0 #5c8a2b,
    0 0 0 3px rgba(180, 240, 100, .55),
    0 0 24px rgba(160, 230, 80, .5) !important;
}


/* ========== v0.2.0 云海枢纽 ========== */
.titleMenu .titleEnterHub {
  min-width: min(300px, 86vw);
  font-size: 18px;
  padding: 14px 28px;
  letter-spacing: .04em;
}
.titleMenu .titleActions { gap: 14px; margin-top: 6px; }
.titleMenu .titleActionRow { width: min(300px, 86vw); }

.announceReward {
  width: min(420px, 92%);
  margin: 8px 0 4px;
  padding: 12px 14px;
  border: 3px solid #c9a05a;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff6d8, #ffe9b0);
  box-shadow: 0 4px 0 #a07830, 0 8px 18px rgba(80,50,10,.18);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.announceRewardTitle { font-weight: 900; color: #6a4010; font-size: 15px; }
.announceRewardDesc { font-size: 12px; color: #7a5520; font-weight: 700; line-height: 1.4; }
.announceRewardDone { font-weight: 800; color: #3d7a28; font-size: 14px; }

.hubMenu {
  gap: 0; padding: 0; justify-content: stretch; align-items: stretch;
  background: linear-gradient(165deg, #2f7ab8 0%, #5aa8d8 30%, #8ec8ec 55%, #c8e4f5 78%, #ffe2b0 100%);
  overflow: hidden;
}
.hubSky { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hubGlow {
  position: absolute; inset: -25% -10% auto; height: 65%;
  background: radial-gradient(ellipse 50% 45% at 50% 25%, rgba(255,236,170,.6), transparent 70%);
  animation: skyPulse 7s ease-in-out infinite;
}
.hubSun {
  position: absolute; top: 8%; left: 18%; width: 70px; height: 70px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff9e0, #ffd86a 50%, #ffb030 80%);
  box-shadow: 0 0 36px 12px rgba(255,210,90,.5);
  animation: sunFloat 6s ease-in-out infinite;
}
.hubSparkles { position: absolute; inset: 0; }
.hubSparkles span {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px 2px rgba(255,255,255,.75);
  animation: sparkle 3.4s ease-in-out infinite;
}
.hubSparkles span:nth-child(1) { top: 18%; left: 12%; }
.hubSparkles span:nth-child(2) { top: 22%; left: 72%; animation-delay: .5s; }
.hubSparkles span:nth-child(3) { top: 40%; left: 28%; animation-delay: 1s; }
.hubSparkles span:nth-child(4) { top: 35%; left: 88%; animation-delay: 1.4s; }
.hubSparkles span:nth-child(5) { top: 55%; left: 10%; animation-delay: 1.8s; }
.hubSparkles span:nth-child(6) { top: 48%; left: 55%; animation-delay: .3s; }
.hubSparkles span:nth-child(7) { top: 28%; left: 42%; animation-delay: 2.2s; width: 3px; height: 3px; }
.hubSparkles span:nth-child(8) { top: 62%; left: 78%; animation-delay: .9s; }
.hubCloudLayer { position: absolute; inset: 0; overflow: hidden; }
.hubCloud {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.78);
  box-shadow: 28px 8px 0 -4px rgba(255,255,255,.7), 52px 4px 0 -10px rgba(255,255,255,.55),
    -22px 6px 0 -6px rgba(255,255,255,.65);
  filter: blur(.2px);
}
.hubCloudFar .hubCloud { animation: hubDrift 48s linear infinite; opacity: .7; }
.hubCloudNear .hubCloud { animation: hubDrift 28s linear infinite; opacity: .92; }
.hubCloud.hc1 { width: 90px; height: 36px; top: 22%; left: -20%; animation-duration: 52s; }
.hubCloud.hc2 { width: 120px; height: 42px; top: 38%; left: -30%; animation-duration: 60s; animation-delay: -12s; }
.hubCloud.hc3 { width: 70px; height: 28px; top: 55%; left: -15%; animation-duration: 44s; animation-delay: -22s; }
.hubCloud.hc4 { width: 100px; height: 34px; top: 18%; left: -40%; animation-duration: 56s; animation-delay: -8s; }
.hubCloud.hc5 { width: 80px; height: 30px; top: 68%; left: -25%; animation-duration: 64s; animation-delay: -30s; }
.hubCloud.hc6 { width: 140px; height: 50px; top: 30%; left: -35%; animation-duration: 30s; }
.hubCloud.hc7 { width: 110px; height: 40px; top: 50%; left: -20%; animation-duration: 26s; animation-delay: -6s; }
.hubCloud.hc8 { width: 160px; height: 54px; top: 72%; left: -45%; animation-duration: 34s; animation-delay: -14s; }
.hubCloud.hc9 { width: 95px; height: 36px; top: 42%; left: -28%; animation-duration: 22s; animation-delay: -18s; }
@keyframes hubDrift {
  from { transform: translateX(0); }
  to { transform: translateX(140vw); }
}
.hubHorizon {
  position: absolute; left: 0; right: 0; bottom: 0; height: 42%;
  background: linear-gradient(180deg, transparent, rgba(255,210,150,.4) 40%, rgba(255,195,120,.65));
}
.hubMist {
  position: absolute; left: 0; right: 0; bottom: 8%; height: 28%;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(255,255,255,.55), transparent 70%);
  animation: skyPulse 5s ease-in-out infinite;
}

.hubChrome {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  width: 100%; height: 100%;
  padding: 14px 16px 18px;
  box-sizing: border-box;
  pointer-events: auto;
  animation: titleEnter .65s cubic-bezier(.22,1,.36,1) both;
}
.hubTop {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0;
}
.hubBack { min-width: 0 !important; padding: 8px 14px !important; font-size: 13px !important;
  line-height: 1.1 !important; }
.hubCrystalBadge {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, #fff8e8, #ffe6b0);
  border: 3px solid #d4a84a;
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  box-shadow: 0 4px 0 #a07828, 0 8px 18px rgba(60,40,10,.2);
  animation: crystalPulse 2.8s ease-in-out infinite;
}
@keyframes crystalPulse {
  0%,100% { box-shadow: 0 4px 0 #a07828, 0 8px 18px rgba(60,40,10,.2); }
  50% { box-shadow: 0 4px 0 #a07828, 0 8px 22px rgba(255,200,80,.45), 0 0 16px rgba(180,220,255,.35); }
}
.hubCrystalIcon { font-size: 20px; filter: drop-shadow(0 2px 0 rgba(80,50,10,.25)); }
.hubCrystalLabel { font-size: 12px; font-weight: 800; color: #6a4518; }
.hubCrystalVal { font-size: 18px; font-weight: 900; color: #3a6a9a; min-width: 2ch; text-align: right; }

.hubBody {
  flex: 1; display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr minmax(120px, 180px);
  gap: 12px; align-items: center;
  min-height: 0; margin: 8px 0;
}
.hubSide {
  display: flex; flex-direction: column; gap: 10px;
}
.hubSideLeft { align-items: stretch; }
.hubSideRight { align-items: stretch; }
.hubNavBtn {
  display: flex; align-items: center; gap: 8px;
  font-family: inherit; font-weight: 800; font-size: 14px;
  color: #3d2a14;
  background: linear-gradient(180deg, #ffe9c0, #f0c078 55%, #e0a858);
  border: 3px solid #c48a3a;
  border-radius: 14px;
  padding: 12px 12px;
  cursor: pointer;
  box-shadow: 0 4px 0 #9a6a28, 0 8px 16px rgba(40,30,10,.2);
  transition: transform .15s, filter .15s, box-shadow .15s;
  text-align: left;
}
.hubNavBtn:hover { filter: brightness(1.05); transform: translateY(-2px); }
.hubNavBtn:active { transform: translateY(1px) scale(.98); box-shadow: 0 2px 0 #9a6a28; }
.hubNavIcon { font-size: 20px; flex-shrink: 0; }
.hubCenter {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; min-width: 0;
}
.hubBadge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em;
  color: #3a6a90; background: rgba(255,255,255,.7); border: 2px solid rgba(255,255,255,.9);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 8px;
}
.hubTitle {
  font-family: var(--font-display); font-size: clamp(28px, 5vw, 48px); font-weight: 900;
  margin: 0; color: #fff;
  text-shadow: 0 3px 0 #2f6a9a, 0 8px 18px rgba(20,60,100,.35);
  animation: titleBob 3.2s ease-in-out infinite;
}
.hubSub { margin: 8px 0 0; color: #fff; font-weight: 700; font-size: 14px;
  text-shadow: 0 2px 8px rgba(30,70,110,.5); opacity: .95; max-width: 320px; }

.hubBottom {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; flex-shrink: 0;
}
.hubJourney { min-width: min(200px, 42vw) !important; }
.hubJourney.disabled, .hubJourney:disabled {
  opacity: .55; cursor: not-allowed; filter: grayscale(.3);
}

.hubPanel {
  z-index: 35;
  background: linear-gradient(165deg, rgba(70,130,180,.92), rgba(120,170,210,.95) 40%, rgba(255,220,160,.96));
  overflow-y: auto;
  padding: 20px 16px 24px;
  gap: 10px;
}
.hubPanelHint { color: #fff; font-weight: 700; font-size: 13px; text-shadow: 0 1px 4px rgba(0,40,80,.4);
  text-align: center; max-width: 420px; margin: 0 0 4px; opacity: .95; }

.checkinDays {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  width: min(520px, 96%); margin: 8px 0 12px;
}
.checkinDay {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(255,255,255,.75); border: 3px solid #c9a05a;
  border-radius: 12px; padding: 8px 4px; min-height: 88px;
  box-shadow: 0 3px 0 #a07830;
  font-weight: 800; color: #5a3a14; font-size: 11px; text-align: center;
}
.checkinDay.today { border-color: #5aaa30; box-shadow: 0 3px 0 #3d7a1e, 0 0 14px rgba(120,220,80,.45);
  background: linear-gradient(180deg, #f0ffd0, #d8f090); }
.checkinDay.claimed { opacity: .7; border-color: #8a9aaa; }
.checkinDay .cdIcon { font-size: 20px; }
.checkinDay .cdReward { font-size: 10px; line-height: 1.25; color: #4a6a20; }

.wheelTabs, .bpTabs { display: flex; gap: 8px; margin-bottom: 4px; }
.wheelTab, .bpTab {
  font-family: inherit; font-weight: 800; font-size: 14px;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 3px solid #c48a3a; background: rgba(255,255,255,.65); color: #4a3010;
}
.wheelTab.on, .bpTab.on {
  background: linear-gradient(180deg, #c8f06a, #7fbf3d); border-color: #4d7a1e; color: #1e3a08;
}
.wheelStage {
  position: relative; width: 220px; height: 220px; margin: 8px auto;
}
.wheelPointer {
  position: absolute; top: -4px; left: 50%; margin-left: -10px; z-index: 3;
  width: 0; height: 0;
  border-left: 10px solid transparent; border-right: 10px solid transparent;
  border-top: 18px solid #e05030;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.35));
}
.wheelDisc {
  width: 220px; height: 220px; border-radius: 50%;
  border: 5px solid #8a5a20;
  box-shadow: 0 6px 0 #5a3a10, 0 12px 28px rgba(0,0,0,.25), inset 0 0 0 6px #ffe8b0;
  background: conic-gradient(
    #ffd56a 0 20%, #7ec8ff 20% 45%, #ff9a6a 45% 60%, #b4e06a 60% 85%, #e08aff 85% 100%);
  position: relative;
  transition: transform .1s linear;
}
.wheelDisc.spinning { transition: transform 3.6s cubic-bezier(.12,.75,.18,1); }
.wheelCenter {
  position: absolute; inset: 38%; border-radius: 50%;
  background: linear-gradient(180deg, #fff8e0, #ffd070);
  border: 3px solid #c48a3a;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.wheelChances { color: #fff; font-weight: 800; text-shadow: 0 1px 4px rgba(0,40,80,.4); }
.wheelResult {
  background: rgba(255,255,255,.85); border: 3px solid #c9a05a; border-radius: 12px;
  padding: 10px 14px; font-weight: 800; color: #4a3010; max-width: 360px; text-align: center;
}

/* Chromebook / 矮屏：转盘面板自适应缩放，保证返回钮无需滚动可见 */
@media (max-height: 520px) {
  #hubWheelPanel.hubPanel {
    overflow: hidden;
    padding: 10px 10px 12px;
    gap: 6px;
    justify-content: flex-start;
  }
  #hubWheelPanel .mtitle { font-size: 20px; margin: 0; }
  #hubWheelPanel .hubPanelHint { font-size: 11px; margin: 0 0 2px; line-height: 1.3; }
  #hubWheelPanel .wheelTabs { margin-bottom: 2px; gap: 6px; }
  #hubWheelPanel .wheelTab { padding: 5px 12px; font-size: 12px; }
  #hubWheelPanel .wheelStage,
  #hubWheelPanel .wheelDisc {
    width: min(148px, 34vh, 42vw);
    height: min(148px, 34vh, 42vw);
    margin: 4px auto;
  }
  #hubWheelPanel .wheelDisc { border-width: 4px; box-shadow: 0 4px 0 #5a3a10, 0 8px 16px rgba(0,0,0,.22), inset 0 0 0 4px #ffe8b0; }
  #hubWheelPanel .wheelCenter { font-size: 16px; }
  #hubWheelPanel .wheelPointer {
    border-left-width: 8px; border-right-width: 8px; border-top-width: 14px;
    margin-left: -8px; top: -2px;
  }
  #hubWheelPanel .wheelChances { font-size: 12px; }
  #hubWheelPanel .wheelResult { padding: 6px 10px; font-size: 12px; max-width: 92%; }
  #hubWheelPanel .mbtn { padding: 8px 14px; font-size: 13px; margin-top: 2px; }
  #hubWheelPanel #btnWheelBack { margin-top: 4px; flex-shrink: 0; }
}
@media (max-height: 420px) {
  #hubWheelPanel .wheelStage,
  #hubWheelPanel .wheelDisc {
    width: min(120px, 28vh, 36vw);
    height: min(120px, 28vh, 36vw);
  }
  #hubWheelPanel .mtitle { font-size: 17px; }
  #hubWheelPanel .hubPanelHint { font-size: 10px; }
  #hubWheelPanel .mbtn { padding: 6px 12px; font-size: 12px; }
}

.hubTaskList, .hubShopList, .hubBpList {
  width: min(480px, 96%); display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px;
  max-height: min(52vh, 420px); overflow-y: auto;
}
.hubTaskCard, .hubShopCard, .hubBpCard {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.82); border: 3px solid #c9a05a; border-radius: 12px;
  padding: 10px 12px; box-shadow: 0 3px 0 #a07830;
  color: #3d2a14; font-weight: 700;
}
.hubTaskCard .taskMeta, .hubShopCard .shopMeta, .hubBpCard .bpMeta { flex: 1; min-width: 0; }
.hubTaskCard .taskName, .hubShopCard .shopName, .hubBpCard .bpName { font-size: 14px; font-weight: 900; }
.hubTaskCard .taskProg, .hubShopCard .shopSub, .hubBpCard .bpSub {
  font-size: 12px; color: #6a5520; margin-top: 2px;
}
.hubTaskCard .taskReward { color: #2a6aaa; font-size: 13px; white-space: nowrap; }
.hubShopCard.legendary, .hubBpCard.legendary { border-color: #b06ad0; box-shadow: 0 3px 0 #703090, 0 0 12px rgba(180,100,220,.3); }
.hubBpCard.unlocked { border-color: #5aaa30; }
.hubClaimBtn, .hubBuyBtn, .hubAssembleBtn {
  font-family: inherit; font-weight: 800; font-size: 12px;
  padding: 8px 10px; border-radius: 10px; cursor: pointer; white-space: nowrap;
  border: 2px solid #4d7a1e; background: linear-gradient(180deg, #c8f06a, #7fbf3d); color: #1e3a08;
}
.hubClaimBtn:disabled, .hubBuyBtn:disabled, .hubAssembleBtn:disabled {
  opacity: .5; cursor: not-allowed; filter: grayscale(.4);
}

.giftCodeRow {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center;
  width: min(420px, 92vw); margin: 8px 0 12px;
}
.giftCodeInput {
  flex: 1 1 220px; min-width: 0; box-sizing: border-box;
  border: 4px solid #7a5326; border-radius: 14px;
  background: rgba(255,255,255,.95); color: #4a3218;
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
  padding: 12px 14px; outline: none; letter-spacing: .02em;
  box-shadow: 0 4px 0 #b98d55, 0 8px 16px rgba(0,0,0,.15);
}
.giftCodeInput:focus { border-color: #4d7a1e; box-shadow: 0 4px 0 #5c8a2b, 0 0 0 3px rgba(127,191,61,.35); }
.giftCodeMsg {
  color: #fff; font-weight: 800; font-size: 14px; text-align: center;
  text-shadow: 0 1px 4px rgba(0,40,80,.45); max-width: min(420px, 92vw);
  margin: 0 0 10px; min-height: 1.2em;
}
.giftCodeMsg.ok { color: #c8f06a; }
.giftCodeMsg.err { color: #ffc8b0; }

.recipe.comingSoon { opacity: .85; }
.recipe.comingSoon .craftBtn { background: #c8c0b0; border-color: #8a8070; }

@media (max-width: 720px) {
  .hubBody {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .hubCenter { grid-column: 1 / -1; order: -1; padding: 4px 0 8px; }
  .hubSide { gap: 8px; }
  .hubNavBtn { font-size: 12px; padding: 10px 8px; flex-direction: column; text-align: center; gap: 4px; }
  .checkinDays { grid-template-columns: repeat(4, 1fr); }
  .checkinDays .checkinDay:nth-child(7) { grid-column: 2 / 4; }
}

.hubNavBtn.hasNew { position: relative; }
.hubNavBtn.hasNew::after {
  content: ''; position: absolute; top: 6px; right: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #ff4d4d; border: 2px solid #fff;
  box-shadow: 0 0 8px rgba(255,60,60,.7);
  animation: sparkle 1.6s ease-in-out infinite;
}
.hubCrystalBadge.uiBtnFlash {
  box-shadow: 0 4px 0 #a07828, 0 0 0 3px rgba(255,217,77,.55), 0 0 22px rgba(255,200,80,.5) !important;
}

/* ---------- ���﹤�� �� ��̫����̨ ---------- */
#relicForgePanel.relicForgePanel {
  border-color: #7a9a88;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(126,200,232,0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(232,197,106,0.14), transparent 50%),
    linear-gradient(180deg, #f4f8f4, #e8efe6);
  box-shadow: 0 12px 40px rgba(40,70,60,0.28), 0 0 0 1px rgba(126,200,232,0.25) inset;
}
.relicForgeHead {
  background: linear-gradient(180deg, #3a5248, #2a3a34);
  color: #e8f6f0;
  border-bottom: 2px solid #7ec8e8;
}
.relicForgeHead .pclose {
  color: #c8e8e0;
  background: rgba(255,255,255,0.08);
  border-color: #5a7a70;
}
.relicForgeBody { position: relative; padding-top: 8px; }
.relicForgeHero {
  position: relative;
  height: 72px;
  margin: 0 0 10px;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(42,58,52,0.92), rgba(58,80,72,0.88)),
    repeating-linear-gradient(90deg, transparent, transparent 18px, rgba(126,200,232,0.06) 18px, rgba(126,200,232,0.06) 19px);
  border: 2px solid #5a7a70;
  box-shadow: inset 0 0 24px rgba(126,200,232,0.18);
}
.relicForgeOrb {
  position: absolute;
  left: 50%; top: 50%;
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8e0, #e8c56a 45%, #7ec8e8 100%);
  box-shadow: 0 0 18px rgba(126,200,232,0.7), 0 0 36px rgba(232,197,106,0.35);
  animation: relicOrbPulse 2.4s ease-in-out infinite;
}
.relicForgeRunes {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 40%, rgba(126,200,232,0.35) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 55%, rgba(232,197,106,0.4) 0 2px, transparent 3px),
    radial-gradient(circle at 30% 75%, rgba(160,230,255,0.3) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 70% 28%, rgba(255,230,140,0.35) 0 1.5px, transparent 2.5px);
  animation: relicRuneDrift 6s linear infinite;
  pointer-events: none;
}
@keyframes relicOrbPulse {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.12); opacity: 1; }
}
@keyframes relicRuneDrift {
  0% { transform: translateX(0); }
  100% { transform: translateX(12px); }
}
.relicForgeTip {
  background: linear-gradient(180deg, #e8f4f0, #d8e8e0) !important;
  color: #3a5548 !important;
  border: 1px solid #a8c8b8;
  border-radius: 10px;
  margin-bottom: 8px;
}
.relicForgeLabel {
  color: #3a5548;
  margin: 6px 0 8px;
  letter-spacing: 0.04em;
}
.relicForgeGrid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.relicForgeCard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #6a8a78;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.55), rgba(200,230,220,0.35)),
    linear-gradient(180deg, #f0f8f4, #dce8e0);
  color: #2a3a34;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 2px 0 #4a6a58, 0 4px 12px rgba(40,70,60,0.12);
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
  font: inherit;
}
.relicForgeCard:hover:not(:disabled):not(.disabled) {
  transform: translateY(-2px) scale(1.01);
  border-color: #7ec8e8;
  box-shadow: 0 4px 0 #4a6a58, 0 8px 18px rgba(126,200,232,0.25);
}
.relicForgeCard:active:not(:disabled):not(.disabled) {
  transform: translateY(1px) scale(0.99);
}
.relicForgeCard:disabled,
.relicForgeCard.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.35);
  box-shadow: none;
}
.relicForgeCardIn,
.relicForgeCardOut {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.relicForgeCardOut { justify-content: flex-end; }
.relicForgeIcon {
  font-size: 22px;
  line-height: 1;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(90,120,100,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.relicForgeMeta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.relicForgeMeta strong {
  font-size: 13px;
  font-weight: 900;
  color: #2a4038;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.relicForgeMeta em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: #5a7a68;
}
.relicForgeHave { color: #3a8a5a; }
.relicForgeCard:disabled .relicForgeHave,
.relicForgeCard.disabled .relicForgeHave { color: #a07050; }
.relicForgeArrow {
  font-size: 16px;
  font-weight: 900;
  color: #7ec8e8;
  text-shadow: 0 0 8px rgba(126,200,232,0.5);
}

/* ---------- ���� �� ��������� ---------- */
.devPanel {
  width: min(540px, 94vw);
  max-height: min(82vh, 720px);
}
.devBody {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  padding: 0 0 10px;
}
.devSection {
  padding: 10px 14px 6px;
  border-bottom: 1px solid rgba(138, 90, 43, .12);
}
.devSectionGrow {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-bottom: none;
  overflow: hidden;
}
.devSecHead {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
  color: #6a4520;
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.devSecIcon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  font-size: 15px;
  background: linear-gradient(180deg, #fff6e0, #f0d9a8);
  border: 2px solid #c4892a;
  border-radius: 10px;
  box-shadow: 0 2px 0 rgba(120, 70, 20, .18), inset 0 1px 0 rgba(255,255,255,.65);
}
.devWeatherGrid,
.devSpawnGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
.devSpawnCats {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.devSpawnSec { display: flex; flex-direction: column; gap: 6px; }
.devSpawnCat {
  font-size: 11px;
  font-weight: 900;
  color: #a06a28;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 2px 0;
  opacity: .9;
}
.devCell {
  appearance: none;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 68px;
  padding: 8px 6px 7px;
  border-radius: 14px;
  border: 2px solid #b98d55;
  background:
    linear-gradient(180deg, rgba(255,255,255,.55), transparent 42%),
    linear-gradient(180deg, #fffdf6, #ffe7c0);
  color: #5c3d1a;
  box-shadow:
    0 2px 0 #8a5a2b,
    inset 0 1px 0 rgba(255,255,255,.7);
  transition: transform .12s, border-color .12s, box-shadow .12s, filter .12s;
}
.devCell:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: #e0a040;
  filter: brightness(1.03);
  box-shadow:
    0 4px 0 #8a5a2b,
    0 8px 16px rgba(80, 40, 10, .18),
    inset 0 1px 0 rgba(255,255,255,.75);
}
.devCell:active {
  transform: translateY(1px) scale(.98);
  box-shadow: 0 1px 0 #8a5a2b, inset 0 2px 4px rgba(80,40,10,.12);
}
.devCell.active {
  border-color: #d4a020;
  background:
    linear-gradient(180deg, rgba(255,248,200,.7), transparent 40%),
    linear-gradient(180deg, #ffe9a8, #f0c050);
  box-shadow:
    0 2px 0 #a07018,
    0 0 0 2px rgba(255, 217, 77, .35),
    inset 0 1px 0 rgba(255,255,255,.75);
}
.devCell.spawn {
  border-color: #9a7850;
  background:
    linear-gradient(180deg, rgba(255,255,255,.5), transparent 40%),
    linear-gradient(180deg, #fff8ec, #f3d9b0 70%, #ecd0a0);
}
.devCell .devIc {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.4));
}
.devCell .devNm {
  font-size: 11px;
  font-weight: 800;
  color: #6a4520;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}
@media (max-width: 520px) {
  .devWeatherGrid,
  .devSpawnGrid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
  .devCell { min-height: 60px; border-radius: 12px; }
  .devCell .devIc { font-size: 18px; }
  .devCell .devNm { font-size: 10px; }
}

/* 宽屏分栏：盖过矮窗 media 里误加的 max-height，让创意栏铺满面板高度 */
@media (min-width: 561px) {
  .invPanel.creativeOpen {
    height: min(88vh, 760px);
    max-height: min(88vh, 760px);
    display: flex;
    flex-direction: column;
  }
  .invPanel.creativeOpen .invBody {
    flex: 1 1 0%;
    min-height: 0;
    overflow: hidden;
    flex-direction: row;
    align-items: stretch;
  }
  .invPanel.creativeOpen .creativeBlock {
    flex: 0 0 min(42%, 320px);
    width: min(42%, 320px);
    max-height: none;
    min-height: 0;
    height: auto;
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }
  .invPanel.creativeOpen .creativeGrid {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    align-content: start;
  }
  .invPanel.creativeOpen .invPlayer {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }
}
