* { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none !important; }
html, body { height: 100%; }
body {
  background: radial-gradient(1200px 700px at 50% 20%, #2c3e5e 0%, #121a2c 70%);
  display: flex; align-items: center; justify-content: center;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
}

/* 本地原创精灵立绘：容器尺寸由各界面控制，加载失败回退 emoji。 */
.spirit-art-img {
  display: block; width: 100%; height: 100%; object-fit: contain; object-position: center;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
.spirit-emoji-fallback { display: inline-flex; align-items: center; justify-content: center; }
.spirit-emoji-fallback[hidden] { display: none; }

/* ===== 手机竖屏容器 ===== */
#game {
  position: relative;
  --battle-speed-scale: 1;
  width: min(430px, 100vw);
  max-width: 100vw;
  height: 100vh; height: 100dvh;
  max-height: 900px;
  background: linear-gradient(180deg, #79b8f2 0%, #cfe9ff 34%, #a5d47f 100%);
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 0 70px rgba(0,0,0,.55);
}
@media (min-width: 480px) {
  #game { height: min(92vh, 860px); }
}

/* ===== 顶部信息卡 ===== */
#top-info { position: absolute; top: 8px; left: 0; right: 0; z-index: 5; display: flex; gap: 4px; justify-content: space-between; padding: 0 8px; pointer-events: none; }
.info-card {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.88);
  border: 2px solid #5b6b8c; border-radius: 14px;
  padding: 6px 8px; box-shadow: 0 4px 10px rgba(30,45,80,.25);
  width: calc(50% - 2px); min-width: 0;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px;
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: #ddd; overflow: hidden;
}
.info-body { min-width: 0; flex: 1; }
.name-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.name-row { display: flex; align-items: baseline; gap: 5px; font-weight: 800; font-size: 13px; color: #24314d; }
.name-row .lv { font-size: 9px; color: #56647d; font-weight: 600; margin-left: auto; flex-shrink: 0; }
.hp-bar {
  position: relative; width: 100%; height: 14px; margin-top: 3px;
  background: #39424f; border: 2px solid #4a3a24; border-radius: 8px; overflow: hidden;
}
.hp-fill {
  position: absolute; inset: 0; width: 100%;
  background: linear-gradient(180deg, #8fe87a, #3fae3f);
  border-radius: 6px; transition: width .55s ease;
}
.hp-fill.warn { background: linear-gradient(180deg, #ffd45e, #eea23a); }
.hp-fill.crit { background: linear-gradient(180deg, #ff8a6b, #e33c4d); }
.hp-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.85); letter-spacing: .3px;
}
.energy-row { margin-top: 2px; font-size: 10px; font-weight: 700; color: #5a4a24; display: flex; align-items: center; gap: 3px; }
.energy-row .star { color: #eab308; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.team-row { margin-top: 2px; font-size: 10px; font-weight: 800; color: #7a2f2f; display: flex; align-items: center; gap: 3px; }
.team-row .heart { color: #e05555; }
.team-row .sep { color: #b9c2d8; font-weight: 400; }

/* ===== 战斗场景 ===== */
#scene { position: absolute; inset: 0; overflow: hidden; }
.arena-ring {
  position: absolute; left: 50%; bottom: -18%; transform: translateX(-50%);
  border-radius: 50%; border: 3px solid rgba(255,214,110,.85);
}
.ring1 { width: 540px; height: 300px; background: radial-gradient(circle at 50% 35%, #f7e6b8 0%, #e7c983 55%, #cba454 100%); }
.ring2 { width: 430px; height: 240px; bottom: -12%; border-color: rgba(255,255,255,.6); }
.ring3 { width: 320px; height: 180px; bottom: -6%; border-color: rgba(255,214,110,.5); }

.model { position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.enemy-model { right: 16%; top: 28%; }
.player-model { left: 13%; bottom: 22%; }
.model-core {
  width: 92px; height: 92px; border-radius: 50%;
  background: #ddd; border: 4px solid rgba(255,255,255,.9);
  box-shadow: 0 8px 20px rgba(20,35,60,.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; position: relative; overflow: hidden;
  animation: idle 2.2s ease-in-out infinite;
}
.player-model .model-core { width: 108px; height: 108px; font-size: 52px; }
.model-shadow { width: 74px; height: 15px; border-radius: 50%; background: rgba(20,35,50,.28); margin-top: 7px; }
.status-badge {
  position: absolute; top: -26px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; white-space: nowrap;
}
.badge {
  background: #fff; border: 1px solid #b9c2d8; border-radius: 10px;
  padding: 1px 7px; font-size: 10px; font-weight: 700; color: #2c3a5e;
  box-shadow: 0 2px 4px rgba(0,0,0,.18);
}

.model.attacking .model-core { animation: lunge calc(.45s * var(--battle-speed-scale)) ease; }
.enemy-model.attacking .model-core { animation: lungeLeft calc(.45s * var(--battle-speed-scale)) ease; }
.model.hit .model-core { animation: hurt calc(.4s * var(--battle-speed-scale)) ease; }
.model.ko .model-core { animation: ko calc(1s * var(--battle-speed-scale)) ease forwards; }
.model.hitflash .model-core { animation: hitflash calc(.3s * var(--battle-speed-scale)) ease; }
@keyframes idle { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes lunge {
  0% { transform: translate(0,0) scale(1); }
  40% { transform: translate(28px,-12px) scale(1.08); }
  100% { transform: translate(0,0) scale(1); }
}
.player-model .model-core.lunge-left { animation: lungeLeft calc(.45s * var(--battle-speed-scale)) ease; }
@keyframes lungeLeft {
  0% { transform: translate(0,0) scale(1); }
  40% { transform: translate(-28px,-12px) scale(1.08); }
  100% { transform: translate(0,0) scale(1); }
}
@keyframes hurt { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 50% { transform: translateX(7px); } 75% { transform: translateX(-4px); } }
@keyframes ko {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  60% { transform: translateY(38px) rotate(14deg); opacity: .7; }
  100% { transform: translateY(70px) rotate(20deg); opacity: 0; }
}
@keyframes hitflash {
  0% { filter: brightness(1); }
  30% { filter: brightness(2.6) saturate(0.4); }
  100% { filter: brightness(1); }
}
#game.shake { animation: gameshake calc(.4s * var(--battle-speed-scale)) ease; }
@keyframes gameshake {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-6px,2px); }
  40% { transform: translate(5px,-2px); }
  60% { transform: translate(-4px,1px); }
  80% { transform: translate(3px,-1px); }
}
#game.koflash { animation: koflash calc(.9s * var(--battle-speed-scale)) ease; }
@keyframes koflash {
  0% { box-shadow: inset 0 0 0 rgba(220,30,30,0); }
  20% { box-shadow: inset 0 0 120px rgba(220,30,30,.45); }
  100% { box-shadow: inset 0 0 0 rgba(220,30,30,0); }
}

/* ===== 飘字 / 回合横幅 / 日志条 ===== */
#fx-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.float-dmg {
  position: absolute; font-size: 27px; font-weight: 900; color: #fff;
  text-shadow: 0 2px 0 #c1272d, 0 0 10px rgba(0,0,0,.55);
  animation: floatUp calc(.95s * var(--battle-speed-scale)) ease-out forwards;
}
.float-dmg.crit { font-size: 34px; color: #ffd76a; text-shadow: 0 2px 0 #8a5a00, 0 0 14px rgba(255,190,60,.8); }
.float-dmg.resist { font-size: 21px; color: #9fd0ff; text-shadow: 0 2px 0 #1f4f8a, 0 0 10px rgba(80,150,255,.6); }
.float-heal { color: #b6ff9a; text-shadow: 0 2px 0 #1f7a2d, 0 0 10px rgba(0,0,0,.5); }
.float-info { font-size: 15px; color: #fff; text-shadow: 0 1px 0 #334, 0 0 8px rgba(0,0,0,.6); }
@keyframes floatUp {
  0% { transform: translateY(0) scale(.8); opacity: 0; }
  15% { transform: translateY(-10px) scale(1.15); opacity: 1; }
  100% { transform: translateY(-74px) scale(1); opacity: 0; }
}
#turn-banner {
  position: absolute; top: 46%; left: 50%; transform: translate(-50%,-50%);
  font-size: 32px; font-weight: 900; color: #fff; letter-spacing: 4px;
  text-shadow: 0 3px 0 rgba(120,70,20,.85), 0 0 22px rgba(255,190,60,.9);
  opacity: 0; z-index: 5; pointer-events: none; transition: opacity .25s ease;
}
#turn-banner.show { opacity: 1; }
#log-ticker {
  position: absolute; left: 8px; right: 8px; bottom: 150px; z-index: 5;
  background: rgba(18,26,46,.78); color: #eaf2ff; border-radius: 10px;
  padding: 6px 12px; font-size: 12px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 3px 8px rgba(0,0,0,.3);
}

/* ===== 右侧功能按钮 ===== */
#side-buttons {
  position: absolute; right: 6px; top: 40%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 9px; z-index: 7;
}
.round-btn {
  width: 46px; height: 46px; border-radius: 50%;
  background: #3a4468; color: #fff; border: 2px solid #262e4d;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; box-shadow: 0 3px 7px rgba(0,0,0,.3);
  transition: transform .12s ease, background .12s ease, color .12s ease;
}
.round-btn span { font-size: 9px; margin-top: 1px; line-height: 1; }
.round-btn:hover:not(:disabled) { transform: scale(1.03); }
.round-btn:active:not(:disabled) { transform: scale(.97); }
.round-btn.active { background: #fff; color: #262e4d; transform: scale(1.12); border-color: #ffd76a; }
.round-btn:disabled { opacity: .45; cursor: default; }

/* ===== 技能卡牌 ===== */
#skill-bar {
  position: absolute; left: 8px; right: 8px; bottom: 82px; z-index: 6;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px;
  pointer-events: auto;
}
#skill-bar.locked { pointer-events: none; }
#skill-bar.locked .skill-card { opacity: .7; }
.skill-card {
  background: #fffdf2; border: 2px solid #8a7350; border-radius: 12px;
  padding: 5px 4px 4px; transform: rotate(-2deg); cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,.28);
  text-align: center; transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
.skill-card:nth-child(2) { transform: rotate(1deg); }
.skill-card:nth-child(3) { transform: rotate(-1deg); }
.skill-card:nth-child(4) { transform: rotate(2deg); }
.skill-card .elem { display: block; height: 6px; border-radius: 4px; margin-bottom: 4px; }
.skill-card .sname { font-size: 12px; font-weight: 800; color: #2c2f45; line-height: 1.25; }
.skill-card .smeta { display: flex; justify-content: center; gap: 7px; margin-top: 3px; font-size: 10px; font-weight: 700; }
.skill-card .scost { color: #a3781c; }
.skill-card .base-cost { margin-left: 1px; font-size: 8px; color: #8a7350; }
.skill-card .scool { margin-top: 2px; font-size: 9px; font-weight: 800; color: #c0392b; background: rgba(192,57,43,.12); border-radius: 6px; padding: 1px 0; }
.skill-card:hover:not(.disabled) { transform: translateY(-3px) scale(1.03) rotate(0); box-shadow: 0 6px 12px rgba(0,0,0,.32); }
.skill-card:active:not(.disabled) { transform: scale(.97); }
.skill-card.disabled { filter: grayscale(.85) brightness(.82); cursor: not-allowed; box-shadow: none; }
.skill-card.selected { border-color: #ffd76a; box-shadow: 0 0 0 2px #ffd76a; }
#skill-bar.highlighted .skill-card { box-shadow: 0 0 0 2px rgba(255,215,106,.7); }

/* ===== 技能详情提示 ===== */
#skill-tooltip {
  position: absolute; width: 212px; z-index: 15; pointer-events: none;
  background: rgba(16,24,45,.95); color: #eaf2ff; border: 1px solid #ffd76a;
  border-radius: 10px; padding: 8px 10px; font-size: 11px; line-height: 1.5;
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
#skill-tooltip.hidden { display: none; }
.tt-title { font-weight: 800; font-size: 13px; display: flex; align-items: baseline; gap: 6px; }
.tt-type { font-size: 10px; font-weight: 700; }
.tt-meta { color: #9fb0dd; font-size: 10.5px; margin-top: 2px; }
.tt-power { color: #ffd76a; margin-left: 6px; }
.tt-desc { margin-top: 4px; color: #dce7ff; }
.tt-response { margin-top: 5px; color: #ffd76a; font-weight: 700; }
.tt-cool { margin-top: 5px; color: #ffb3a5; font-weight: 700; }

/* ===== 底部操作区 ===== */
#action-bar {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 6;
  height: 74px; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(24,34,60,.02), rgba(24,34,60,.28));
}
.gather-btn {
  width: 98px; height: 56px; border-radius: 15px; cursor: pointer;
  background: linear-gradient(180deg, #46557f, #2b3559);
  border: 2px solid #1d2440; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  box-shadow: 0 4px 9px rgba(0,0,0,.32);
  transition: transform .12s ease, filter .12s ease;
}
.gather-btn:hover:not(:disabled) { transform: translateY(-2px); }
.gather-btn:active:not(:disabled) { transform: scale(.97); }
.gather-btn:disabled { filter: grayscale(.6) brightness(.8); cursor: default; }
.gather-icon { font-size: 15px; color: #ffd76a; }
.gather-label { font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.gather-energy { font-size: 9px; color: #9fb0dd; }
.function-buttons { display: flex; gap: 9px; align-items: center; }
.function-buttons .round-btn { width: 44px; height: 44px; font-size: 15px; }

/* ===== 战报面板 ===== */
#log-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 74%;
  background: rgba(14,21,39,.94); color: #dce7ff; z-index: 10;
  padding: 12px; overflow-y: auto; border-left: 1px solid #35405f;
  box-shadow: -8px 0 24px rgba(0,0,0,.35);
}
#log-panel.hidden { display: none; }
.log-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 800; margin-bottom: 8px; color: #ffd76a;
}
.log-panel-header button {
  background: #35405f; color: #fff; border: none; border-radius: 8px;
  width: 26px; height: 26px; cursor: pointer; font-size: 12px;
}
#log-list { font-size: 12px; line-height: 1.8; word-break: break-all; }
#log-list .log-entry:first-child { color: #ffd76a; }

/* ===== 换宠面板 ===== */
#switch-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 78%;
  background: rgba(14,21,39,.95); color: #dce7ff; z-index: 12;
  padding: 12px; overflow-y: auto; border-left: 1px solid #35405f;
  box-shadow: -8px 0 24px rgba(0,0,0,.35);
}
#switch-panel.hidden { display: none; }
.switch-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; font-weight: 800; color: #ffd76a;
}
.switch-panel-header button {
  background: #35405f; color: #fff; border: none; border-radius: 8px;
  width: 26px; height: 26px; cursor: pointer; font-size: 12px;
}
.switch-note { font-size: 10.5px; color: #9fb0dd; margin: 6px 0 10px; }
.switch-card {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.18);
  border-radius: 12px; padding: 8px 9px; margin-bottom: 8px; cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.switch-card:hover:not(.disabled) { transform: scale(1.03); border-color: #ffd76a; }
.switch-card:active:not(.disabled) { transform: scale(.97); }
.switch-card.disabled { opacity: .45; cursor: default; }
.switch-card.selected { border-color: #ffd76a; background: rgba(255,215,106,.14); }
.sw-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 42px;
  border: 2px solid rgba(255,255,255,.85); box-shadow: 0 2px 5px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 22px;
}
.sw-info { min-width: 0; flex: 1; }
.sw-name { font-size: 13px; font-weight: 800; display: flex; align-items: baseline; gap: 5px; }
.sw-name .sw-elem { font-size: 10px; }
.sw-hp { position: relative; height: 9px; background: #39424f; border: 1px solid #4a3a24; border-radius: 6px; margin-top: 4px; overflow: hidden; }
.sw-hp i { position: absolute; inset: 0; background: linear-gradient(180deg, #8fe87a, #3fae3f); border-radius: 5px; transition: width .4s ease; }
.sw-stats { font-size: 9.5px; color: #9fb0dd; margin-top: 3px; }

/* ===== 设置面板 ===== */
#settings-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 74%;
  background: rgba(14,21,39,.95); color: #dce7ff; z-index: 13;
  padding: 12px; border-left: 1px solid #35405f;
  box-shadow: -8px 0 24px rgba(0,0,0,.35);
}
#settings-panel.hidden { display: none; }
.settings-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; font-weight: 800; color: #ffd76a; margin-bottom: 6px;
}
.settings-header button {
  background: #35405f; color: #fff; border: none; border-radius: 8px;
  width: 26px; height: 26px; cursor: pointer; font-size: 12px;
}
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 2px; border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 13px; font-weight: 600;
}
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 46px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #3a4468; border-radius: 26px; cursor: pointer; transition: background .15s ease; }
.switch i:before { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.switch input:checked + i { background: #ffd76a; }
.switch input:checked + i:before { transform: translateX(20px); }
#set-pve-speed {
  width: 88px; border: 1px solid #465376; border-radius: 8px;
  background: #263252; color: #fff; padding: 5px 8px; font-weight: 800;
}

/* ===== 结算弹窗 ===== */
#result-modal {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(8,14,28,.6); display: flex; align-items: center; justify-content: center;
}
#result-modal.hidden { display: none; }
#disconnect-overlay {
  position: absolute; inset: 0; z-index: 40;
  background: rgba(8,14,28,.65); display: flex; align-items: center; justify-content: center;
}
#disconnect-overlay.hidden { display: none; }
#disconnect-title { font-size: 26px; font-weight: 900; color: #d9534f; }
#disconnect-detail { margin: 10px 0 16px; font-size: 12.5px; color: #5a4a2a; line-height: 1.6; }
#btn-disconnect-home {
  background: linear-gradient(180deg, #ffd76a, #f0a83a); color: #5a3c0a;
  border: 2px solid #b9741f; border-radius: 30px; padding: 10px 30px;
  font-size: 15px; font-weight: 800; cursor: pointer;
}
.modal-card {
  width: 280px; background: linear-gradient(180deg, #fffbe8, #ffe7ab);
  border: 3px solid #d9a441; border-radius: 20px; padding: 22px 18px; text-align: center;
  box-shadow: 0 14px 40px rgba(0,0,0,.5);
}
#result-title { font-size: 30px; font-weight: 900; color: #b9741f; }
#result-title.win { color: #2e9e4f; }
#result-detail { margin: 10px 0 16px; font-size: 13px; color: #5a4a2a; line-height: 1.6; }
#btn-restart {
  background: linear-gradient(180deg, #ffd76a, #f0a83a); color: #5a3c0a;
  border: 2px solid #b9741f; border-radius: 30px; padding: 10px 30px;
  font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,.25);
}
#btn-restart:hover { transform: scale(1.03); }

/* ===== 开场选宠 ===== */
#start-screen {
  position: absolute; inset: 0; z-index: 30;
  background: linear-gradient(165deg, #20345f 0%, #101a38 100%);
  color: #fff; display: flex; flex-direction: column; align-items: center;
  padding: 30px 20px 18px; overflow-y: auto;
  overflow-x: hidden;
}
#start-screen.hidden { display: none; }
#start-screen h1 { font-size: 30px; letter-spacing: 2px; color: #ffd76a; text-shadow: 0 2px 0 #7a5410; }
#start-screen h1 span { font-size: 16px; color: #9fc0ff; vertical-align: middle; }
.subtitle { margin-top: 4px; font-size: 12px; color: #9fb0dd; }
.rule-note { margin-top: 10px; font-size: 11px; color: #c9d6f7; background: rgba(255,255,255,.08); border-radius: 20px; padding: 5px 14px; }
.response-rule-note {
  margin-top: 6px; padding: 5px 12px; border: 1px solid rgba(255,215,106,.42); border-radius: 12px;
  color: #ffd76a; background: rgba(255,215,106,.08); font-size: 10.5px; font-weight: 800; text-align: center;
}
.damage-rule-note {
  margin-top: 5px; color: #9fb0dd; font-size: 9px; line-height: 1.45; text-align: center;
}
.damage-rule-note a { color: #9fc0ff; text-decoration: underline; text-underline-offset: 2px; }
#difficulty-row { display: flex; gap: 10px; width: 100%; margin-top: 12px; }
.diff-btn {
  flex: 1; padding: 9px 0; border-radius: 22px; cursor: pointer;
  border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08);
  color: #c9d6f7; font-size: 13px; font-weight: 800; letter-spacing: 2px;
  transition: transform .12s ease, background .12s ease, color .12s ease, border-color .12s ease;
}
.diff-btn:hover { transform: scale(1.03); }
.diff-btn.active { background: linear-gradient(180deg, #ffd76a, #f0a83a); color: #5a3c0a; border-color: #b9741f; }
.diff-hint { font-size: 10.5px; color: #9fb0dd; margin-top: 6px; }
#team-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 16px; }
.pick-card {
  min-width: 0;
  background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.18);
  border-radius: 14px; padding: 12px 8px; text-align: center; cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.pick-card:hover { transform: translateY(-3px) scale(1.03); }
.pick-card.selected { border-color: #ffd76a; background: rgba(255,215,106,.14); box-shadow: 0 0 0 3px rgba(255,215,106,.3); }
.p-avatar { width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 30px; border: 3px solid rgba(255,255,255,.85); box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.p-name { font-weight: 800; font-size: 14px; }
.p-elem { margin-left: 4px; font-size: 12px; }
.p-stats { font-size: 10.5px; color: #aebde4; margin-top: 5px; line-height: 1.55; }
.p-trait {
  margin-top: 5px; padding: 2px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-radius: 8px; background: rgba(255,215,106,.12); color: #ffd76a; font-size: 9.5px; font-weight: 800;
}
@media (max-width: 360px) {
  .p-stats { font-size: 9.5px; }
  .rule-note { white-space: normal; }
}
#btn-start {
  margin-top: 18px; width: 100%; padding: 13px 0; border-radius: 30px;
  background: linear-gradient(180deg, #ffd76a, #f0a83a); color: #5a3c0a;
  border: 2px solid #b9741f; font-size: 17px; font-weight: 900; cursor: pointer;
  box-shadow: 0 5px 14px rgba(0,0,0,.35);
}
#btn-start:disabled { filter: grayscale(.7) brightness(.75); cursor: default; }
.online-enter-btn {
  margin-top: 10px; width: 100%; padding: 11px 0; border-radius: 30px;
  background: rgba(255,255,255,.1); color: #c9d6f7;
  border: 2px solid rgba(255,255,255,.22); font-size: 14px; font-weight: 800;
  cursor: pointer; letter-spacing: 2px; transition: transform .12s ease;
}
.online-enter-btn:hover { transform: scale(1.03); }
.footnote { margin-top: auto; padding-top: 14px; font-size: 10.5px; color: #7382ab; }

/* ===== 模式选择 ===== */
#mode-select {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 30px 22px;
  background: linear-gradient(165deg, #20345f 0%, #101a38 100%);
}
.mode-big-btn {
  width: 100%; margin-top: 24px; padding: 18px 0; border-radius: 30px;
  background: linear-gradient(180deg, #ffd76a, #f0a83a); color: #5a3c0a;
  border: 2px solid #b9741f; font-size: 18px; font-weight: 900; letter-spacing: 4px;
  cursor: pointer; transition: transform .12s ease, background .12s ease, color .12s ease;
}
.mode-big-btn:hover { transform: scale(1.03); }
.mode-big-btn.pvp { background: rgba(255,255,255,.1); color: #c9d6f7; border: 2px solid rgba(255,255,255,.25); }
#room-status { margin-top: 12px; font-size: 12px; color: #9fb0dd; line-height: 1.7; text-align: center; }
.back-home-btn {
  position: absolute; top: 10px; left: 10px; z-index: 6;
  background: rgba(255,255,255,.12); color: #c9d6f7;
  border: 1px solid rgba(255,255,255,.25); border-radius: 20px;
  padding: 6px 14px; font-size: 12px; font-weight: 700; cursor: pointer;
  transition: transform .12s ease;
}
.back-home-btn:hover { transform: scale(1.05); }
#result-pvp-btns { display: flex; gap: 10px; justify-content: center; }
#result-pvp-btns button {
  flex: 1; padding: 10px 0; border-radius: 26px; cursor: pointer;
  background: linear-gradient(180deg, #ffd76a, #f0a83a); color: #5a3c0a;
  border: 2px solid #b9741f; font-size: 14px; font-weight: 800;
  transition: transform .12s ease;
}
#result-pvp-btns button:hover { transform: scale(1.03); }

/* ===== 联机面板 ===== */
#online-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 84%;
  background: rgba(14,21,39,.96); color: #dce7ff; z-index: 35;
  padding: 14px; border-left: 1px solid #35405f;
  box-shadow: -8px 0 24px rgba(0,0,0,.35);
}
#online-panel.hidden { display: none; }
.online-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; font-weight: 800; color: #ffd76a;
}
.online-header button { background: #35405f; color: #fff; border: none; border-radius: 8px; width: 26px; height: 26px; cursor: pointer; font-size: 12px; }
.online-actions { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.online-btn {
  padding: 11px 0; border-radius: 24px; cursor: pointer;
  background: linear-gradient(180deg, #ffd76a, #f0a83a); color: #5a3c0a;
  border: 2px solid #b9741f; font-size: 14px; font-weight: 800;
  transition: transform .12s ease;
}
.online-btn:hover { transform: scale(1.03); }
.online-join-row { display: flex; gap: 8px; }
.online-join-row input {
  flex: 1; padding: 10px 12px; border-radius: 22px; border: 2px solid #35405f;
  background: #101a38; color: #fff; font-size: 15px; text-align: center; letter-spacing: 3px;
  text-transform: uppercase;
}
.online-join-row .online-btn { padding: 10px 14px; }
#online-code-box { margin-top: 16px; text-align: center; }
.code-label { font-size: 11px; color: #9fb0dd; }
.code-text {
  margin-top: 6px; font-size: 30px; font-weight: 900; letter-spacing: 6px; color: #ffd76a;
  background: rgba(255,215,106,.12); border: 2px dashed #ffd76a; border-radius: 12px; padding: 10px 0;
  user-select: all;
}
#online-status { margin-top: 14px; font-size: 12px; color: #9fb0dd; line-height: 1.7; min-height: 40px; }

/* ===== 回合倒计时 ===== */
#turn-timer {
  position: absolute; top: 84px; left: 50%; transform: translateX(-50%);
  z-index: 6; width: 132px; text-align: center;
  background: rgba(16,24,45,.82); border: 1px solid #ffd76a; border-radius: 12px;
  padding: 4px 8px 6px; color: #ffd76a;
}
#turn-timer.hidden { display: none; }
#turn-timer-text { font-size: 15px; font-weight: 900; letter-spacing: 1px; }
#turn-timer-bar { display: block; height: 5px; margin-top: 4px; background: #ffd76a; border-radius: 4px; transition: width 1s linear; }

/* ===== 首页：图鉴 / 仓库入口（V2.8） ===== */
.home-sub-row { display: flex; gap: 10px; margin-top: 8px; }
.mode-sub-btn {
  flex: 1; padding: 12px 8px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,.09); color: #dce7ff;
  border: 2px solid rgba(255,255,255,.22); font-size: 14px; font-weight: 800;
  letter-spacing: 1px; transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.mode-sub-btn:hover { transform: scale(1.03); background: rgba(255,255,255,.16); border-color: #ffd76a; }

/* ===== 精灵图鉴 / 精灵仓库面板 ===== */
.sub-panel {
  position: absolute; inset: 0; z-index: 36;
  background: linear-gradient(180deg, #1d2847 0%, #131b33 100%);
  color: #eaf2ff; padding: 14px 14px 26px; overflow-y: auto;
}
.sub-title { font-size: 21px; font-weight: 900; color: #ffd76a; letter-spacing: 2px; margin-top: 10px; }
.sub-subtitle { font-size: 12px; color: #9fb0dd; margin: 5px 0 14px; }

/* ===== 图鉴列表 ===== */
.dex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dex-card {
  background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.16);
  border-radius: 14px; padding: 10px 6px; text-align: center; cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.dex-card:hover { transform: translateY(-3px); border-color: #ffd76a; background: rgba(255,215,106,.12); }
.dex-avatar {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.3); overflow: hidden;
}
.dex-avatar.big { width: 76px; height: 76px; font-size: 38px; margin: 0 0 0 0; }
.dex-name { font-size: 13px; font-weight: 800; color: #fff; }
.dex-name.big { font-size: 18px; }
.dex-elems { margin-top: 3px; display: flex; justify-content: center; gap: 5px; }
.dex-elem { font-size: 10px; font-weight: 800; }
.dex-race { font-size: 9.5px; color: #9fb0dd; margin-top: 6px; line-height: 1.5; }
.dex-trait-chip {
  display: inline-block; max-width: 100%; margin-top: 5px; padding: 2px 6px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; border-radius: 7px; background: rgba(255,215,106,.12);
  color: #ffd76a; font-size: 9px; font-weight: 800;
}

/* ===== 图鉴详情 ===== */
.dex-detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.dex-race-title { font-size: 14px; font-weight: 800; color: #ffd76a; margin: 10px 0 8px; }
.race-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.race-label { width: 38px; font-size: 11px; font-weight: 800; color: #b9c6ee; }
.race-bar { flex: 1; height: 12px; background: rgba(255,255,255,.12); border-radius: 7px; overflow: hidden; }
.race-bar i { display: block; height: 100%; border-radius: 7px; }
.race-val { width: 32px; text-align: right; font-size: 12px; font-weight: 800; color: #fff; }
.dex-trait {
  margin-top: 13px; padding: 10px 11px; border: 1px solid rgba(255,215,106,.35); border-radius: 11px;
  background: rgba(255,215,106,.08);
}
.dex-trait-name { color: #ffd76a; font-size: 12px; font-weight: 900; }
.dex-trait-desc { margin-top: 4px; color: #dce7ff; font-size: 10.5px; line-height: 1.55; }
.dex-source { margin-top: 9px; color: #8fa0c8; font-size: 9.5px; line-height: 1.45; }
.dex-source a { color: #9fc0ff; text-decoration: underline; text-underline-offset: 2px; }
.dex-pool-title { font-size: 14px; font-weight: 800; color: #ffd76a; margin: 16px 0 8px; }
.dex-skill-item {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px; padding: 9px 10px; margin-bottom: 8px;
}
.dex-skill-top { display: flex; align-items: center; gap: 7px; }
.dex-skill-elem { width: 8px; height: 16px; border-radius: 4px; flex: 0 0 8px; }
.dex-skill-name { font-size: 13px; font-weight: 800; color: #fff; }
.dex-skill-type {
  margin-left: auto; font-size: 10px; font-weight: 800; color: #ffd76a;
  background: rgba(255,215,106,.14); border-radius: 8px; padding: 1px 7px;
}
.dex-skill-meta { font-size: 10.5px; color: #9fb0dd; margin-top: 5px; }
.dex-skill-desc { font-size: 10.5px; color: #dce7ff; margin-top: 4px; line-height: 1.5; }
.dex-skill-response { margin-top: 4px; color: #ffd76a; font-size: 10px; font-weight: 700; }
.dex-skill-source {
  display: inline-block; margin-top: 5px; color: #9fc0ff; font-size: 9px;
  text-decoration: underline; text-underline-offset: 2px;
}
.dex-detail-back {
  width: 100%; margin-top: 10px; padding: 10px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.22);
  font-size: 13px; font-weight: 700;
}
.dex-detail-back:hover { background: rgba(255,255,255,.18); }

/* ===== 仓库：队伍槽位 ===== */
.team-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.team-slot {
  position: relative; border-radius: 13px; padding: 8px 6px; text-align: center;
  background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.16);
  cursor: pointer; transition: transform .12s ease, border-color .12s ease;
}
.team-slot.filled:hover { border-color: #ffd76a; transform: translateY(-2px); }
.team-slot.empty { border-style: dashed; cursor: default; opacity: .65; display: flex; align-items: center; justify-content: center; min-height: 96px; }
.slot-idx {
  position: absolute; top: 5px; left: 7px; font-size: 10px; font-weight: 900; color: #ffd76a;
  background: rgba(0,0,0,.25); border-radius: 7px; padding: 1px 5px;
}
.slot-avatar {
  width: 44px; height: 44px; border-radius: 50%; margin: 4px auto 5px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); overflow: hidden;
}
.slot-name { font-size: 11.5px; font-weight: 800; color: #fff; }
.slot-skills { font-size: 9.5px; color: #9fb0dd; margin-top: 2px; }
.slot-remove {
  position: absolute; top: 4px; right: 5px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(220,60,70,.9); color: #fff; border: none; cursor: pointer; font-size: 12px; line-height: 1;
}
.slot-empty-txt { font-size: 11px; color: #8fa0c8; }

/* ===== 仓库：精灵列表 ===== */
.owned-title { font-size: 13px; font-weight: 800; color: #ffd76a; margin: 16px 0 8px; }
.owned-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.owned-card {
  border-radius: 13px; padding: 9px 5px; text-align: center; cursor: pointer;
  background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.15);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.owned-card:hover { transform: translateY(-2px); border-color: #9fb0dd; }
.owned-card.on-team { border-color: #67d48a; background: rgba(103,212,138,.1); }
.owned-card.locked { cursor: default; opacity: .75; }
.owned-avatar {
  width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 5px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  border: 2px solid #fff; overflow: hidden;
}
.owned-name { font-size: 11px; font-weight: 800; color: #fff; }
.owned-stats { margin-top: 3px; color: #9fb0dd; font-size: 8px; line-height: 1.45; }
.owned-trait {
  margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #ffd76a; font-size: 8.5px; font-weight: 800;
}
.owned-mark { font-size: 9px; color: #67d48a; margin-top: 3px; font-weight: 700; }
.owned-card:not(.on-team) .owned-mark { color: #8fa0c8; }

/* ===== 仓库：保存按钮 ===== */
.bag-save-btn {
  width: 100%; margin-top: 16px; padding: 12px; border-radius: 13px; cursor: pointer;
  background: linear-gradient(180deg, #ffd76a, #eab44a); color: #2b2430;
  border: none; font-size: 15px; font-weight: 900; letter-spacing: 3px;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
}
.bag-save-btn:hover { filter: brightness(1.06); }
#bag-tip {
  margin-top: 10px; text-align: center; font-size: 12px; font-weight: 800; color: #67d48a;
  background: rgba(103,212,138,.12); border-radius: 9px; padding: 7px;
}
#bag-tip.hidden { display: none; }

/* ===== 仓库：技能配置 ===== */
.skill-config-header {
  display: flex; align-items: center; gap: 10px; margin: 10px 0 12px;
  font-size: 15px; font-weight: 900; color: #fff;
}
.skill-config-header button {
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25);
  border-radius: 9px; padding: 6px 10px; cursor: pointer; font-size: 12px; font-weight: 700;
}
#skill-config-count { margin-left: auto; font-size: 12px; color: #ffd76a; }
.cfg-spirit-summary {
  margin-bottom: 10px; padding: 9px 10px; border-radius: 11px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
}
.cfg-spirit-head { display: flex; align-items: center; gap: 9px; }
.cfg-spirit-avatar {
  width: 44px; height: 44px; flex: 0 0 44px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; border: 2px solid #fff; border-radius: 50%; font-size: 22px;
}
.cfg-spirit-stats { color: #9fb0dd; font-size: 9.5px; line-height: 1.5; }
.cfg-trait-summary { margin-top: 6px; color: #dce7ff; font-size: 10px; line-height: 1.5; }
.cfg-trait-summary strong { display: block; color: #ffd76a; font-size: 10.5px; }
.cfg-trait-summary span { display: block; margin-top: 2px; }
.cfg-skill {
  background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.14);
  border-radius: 12px; padding: 10px; margin-bottom: 9px; cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.cfg-skill:hover { border-color: #9fb0dd; }
.cfg-skill.equipped { border-color: #67d48a; background: rgba(103,212,138,.1); }
.cfg-skill.locked { cursor: default; }
.cfg-skill-main { display: flex; align-items: center; gap: 7px; }
.cfg-skill-name { font-size: 13px; font-weight: 800; color: #fff; }
.cfg-skill-mark { margin-left: auto; font-size: 10px; font-weight: 800; color: #67d48a; }
.cfg-skill:not(.equipped) .cfg-skill-mark { color: #8fa0c8; }
.cfg-skill-meta { font-size: 10.5px; color: #9fb0dd; margin-top: 5px; }
.cfg-skill-desc { font-size: 10.5px; color: #dce7ff; margin-top: 4px; line-height: 1.5; }
.cfg-skill-response { margin-top: 4px; color: #ffd76a; font-size: 10px; font-weight: 700; }
/* v3.2 Expedition: reuse the existing game palette and full-screen panels. */
#exp-panel { z-index: 90; overflow-y: auto; padding-bottom: 40px; }
#exp-panel p { line-height: 1.7; }
.exp-rules { color: #b6c6db; font-size: 13px; }
#exp-warning { color: #ffcf76; }
#exp-team { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 20px 0; }
#exp-actions { display: grid; gap: 12px; }
#exp-panel button { padding: 12px 16px; border-radius: 10px; border: 1px solid #7186a4; background: #253753; color: #f5f8ff; cursor: pointer; }
#exp-panel button:disabled { opacity: .45; cursor: default; }
#exp-panel button.exp-selected { border-color: #80e9ca; background: #25574e; }
#exp-panel #exp-home { position: static; transform: none; margin-bottom: 10px; }
#exp-panel #exp-title { margin: 8px 0 12px; }
#exp-team button:disabled { opacity: .8; }
.exp-member { min-width: 0; padding: 12px; background: #16243b; border: 1px solid #526785; border-radius: 12px; }
.exp-member p { font-size: 13px; color: #c5d6ed; }
.exp-member summary { cursor: pointer; line-height: 1.6; overflow-wrap: anywhere; }
.exp-member details button { display: block; width: 100%; margin-top: 8px; }
.exp-route-nodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; padding: 0; list-style: none; }
.exp-route-nodes li { padding: 8px; border: 1px solid #526785; border-radius: 8px; font-size: 13px; }
.exp-route-nodes .visited { color: #8bb9ad; }
.exp-route-nodes .current { border-color: #ffd069; color: #ffd069; background: #293951; }
.exp-loot-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 12px 0; }
.exp-loot-choices button { white-space: pre-line; text-align: left; line-height: 1.7; }
#exp-gear { margin: 20px 0; }
#exp-economy { margin: 20px 0; padding: 12px; background: #17263d; border: 1px solid #526785; border-radius: 12px; }
.exp-shop, .exp-catch { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
.exp-shop p, .exp-catch p { flex-basis: 100%; }
#exp-capture { position: absolute; top: 148px; left: 50%; transform: translateX(-50%); z-index: 25; max-width: 95%; padding: 8px 12px; border: 1px solid #80e9ca; border-radius: 8px; background: #253753; color: #f5f8ff; }
#exp-capture:disabled { opacity: .55; }
#exp-gear summary { cursor: pointer; padding: 12px 0; }
.exp-gear-row { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid #526785; line-height: 1.6; }
.exp-gear-row select { min-width: 0; width: 100%; padding: 10px; background: #17263d; color: #edf5ff; border: 1px solid #8295b0; border-radius: 8px; }
.exp-member .exp-learning-notice { color: #ffe0a0; border-left: 3px solid #e3b14e; padding-left: 8px; }
#exp-battle-home { position: absolute; top: 108px; left: 50%; transform: translateX(-50%); z-index: 25; border: 1px solid #7186a4; border-radius: 8px; background: #253753; color: white; padding: 8px 12px; white-space: nowrap; }

/* v3.6.5: the camp uses map marks and a clear route-to-action hierarchy. */
#game { --camp-bg:#101e2c; --camp-panel:#182c3d; --camp-line:#355366; --camp-text:#edf3ed; --camp-muted:#b6c9ca; --camp-accent:#a3d6b7; --camp-gold:#edcb83; }
button, summary, select, a { touch-action: manipulation; }
button:focus-visible, summary:focus-visible, select:focus-visible, [role=button]:focus-visible { outline:3px solid #c5efcf; outline-offset:3px; }
#start-screen, #mode-select, #exp-panel { background:var(--camp-bg); color:var(--camp-text); }
#mode-select { position:relative; inset:auto; width:100%; min-height:100%; padding:20px 0; justify-content:flex-start; gap:0; }
#start-screen:has(#mode-select:not(.hidden)) { padding:20px; }
.home-eyebrow { color:var(--camp-accent); font-size:10px; font-weight:700; letter-spacing:2px; margin-bottom:10px; }
#mode-select h1 { font-size:34px; letter-spacing:3px; color:var(--camp-text); text-shadow:none; }
#mode-select h1 span { font-size:11px; letter-spacing:0; color:var(--camp-muted); }
#mode-select .subtitle { margin-top:8px; color:var(--camp-muted); }
#home-expedition { position:relative; width:100%; margin-top:24px; overflow:hidden; border:1px solid var(--camp-line); border-radius:18px; background:#17303b; padding:0 16px 16px; }
.home-map { height:122px; margin:0 -16px; background:url('assets/ui/camp-map.svg') center/cover; }
#home-progress h2 { font-size:21px; letter-spacing:1px; margin:12px 0 7px; }
#home-progress p { font-size:12px; color:var(--camp-muted); line-height:1.7; }
.home-party { display:flex; gap:8px; margin:12px 0; }
.home-party span { width:34px; height:34px; display:flex; align-items:center; justify-content:center; border:1px solid #537664; border-radius:50%; font-size:22px; overflow:hidden; background:#274344; }
.home-party .fainted { opacity:.45; }
#mode-select .mode-big-btn { border-radius:12px; padding:15px 10px; font-size:16px; letter-spacing:0; box-shadow:none; margin-top:14px; }
#mode-select #mode-expedition { color:#17362e; background:var(--camp-accent); border:1px solid #b6e6c9; font-weight:800; }
#home-new-expedition { width:100%; margin-top:10px; padding:10px; background:transparent; border-color:#4a6669; }
.home-duels { display:grid; grid-template-columns:1fr 1fr; width:100%; gap:10px; margin-top:4px; }
#mode-select .home-duels .mode-big-btn { background:var(--camp-panel); color:var(--camp-text); border:1px solid var(--camp-line); font-size:14px; }
.home-duels span { display:block; font-size:10px; font-weight:400; color:var(--camp-muted); margin-top:5px; }
#mode-select .home-sub-row { gap:7px; width:100%; margin-top:16px; }
#mode-select .mode-sub-btn { color:var(--camp-text); border-radius:10px; font-size:12px; letter-spacing:0; }
#mode-select .footnote { margin-top:16px; font-size:10px; color:#97aead; }
#settings-panel { z-index:120; overflow:auto; }
.panel-home { padding:10px 12px; border:1px solid #526e81; border-radius:8px; min-height:40px; background:#203a4b; color:#edf3ed; cursor:pointer; }
#exp-panel { padding:16px 14px 30px; }
#exp-title { font-size:23px; color:var(--camp-text); letter-spacing:0; }
#exp-home { font-size:12px; }
#exp-resources { display:flex; gap:8px; flex-wrap:wrap; padding:8px 0 14px; }
#exp-resources span { font-size:12px; font-weight:700; padding:7px 10px; border-radius:8px; background:var(--camp-panel); color:var(--camp-gold); border:1px solid var(--camp-line); }
.exp-help, #exp-economy > details { font-size:12px; color:var(--camp-muted); }
summary { cursor:pointer; }
.exp-help summary, #exp-economy > details > summary { padding:10px 0; }
#exp-detail { font-size:13px; color:var(--camp-text); line-height:1.8; padding:14px; border-left:3px solid var(--camp-accent); background:var(--camp-panel); border-radius:0 10px 10px 0; margin:14px 0; }
#exp-route { font-size:12px; color:var(--camp-muted); margin:12px 0 20px; }
.exp-route-nearby { display:flex; gap:8px; margin:10px 0; list-style:none; }
.exp-route-nearby > div { flex:1; padding:9px 6px; border:1px solid var(--camp-line); border-radius:8px; text-align:center; font-size:11px; }
.exp-route-nearby .current { background:#294c43; border-color:var(--camp-accent); color:#d3f2d9; }
#exp-route details summary { padding:8px 0; }
.exp-route-nodes { margin-top:8px; }
#exp-party-panel > summary { font-size:14px; font-weight:700; color:var(--camp-text); padding:12px 0; }
#exp-team { margin:4px 0 18px; }
.exp-member { display:grid; grid-template-columns:42px minmax(0,1fr); gap:6px; background:var(--camp-panel); border-color:var(--camp-line); padding:12px; }
.exp-pet-visual { width:42px; height:42px; display:flex; align-items:center; justify-content:center; font-size:29px; border-radius:50%; overflow:hidden; background:#274344; grid-row:span 2; }
#exp-panel .exp-member > button:first-of-type { background:transparent; border:0; padding:0; text-align:left; line-height:1.7; color:var(--camp-text); font-size:13px; }
.exp-member > p { grid-column:2; font-size:11px; }
.exp-member > details, .exp-member > .exp-learning-notice, .exp-member > button:not(:first-of-type) { grid-column:1/-1; }
.exp-member details { border-top:1px solid var(--camp-line); padding-top:8px; margin-top:4px; }
.exp-member summary { font-size:12px; }
.exp-member .exp-stats { font-size:11px; color:var(--camp-muted); }
#exp-panel h2 { font-size:16px; color:var(--camp-gold); margin-bottom:8px; }
#exp-growth:empty, #exp-economy:empty, #exp-gear:empty { display:none; }
#exp-growth { padding:14px; margin:16px 0; background:#263c37; border-radius:12px; font-size:12px; }
#exp-economy { background:transparent; border:0; padding:0; margin:14px 0; }
.exp-catch { background:var(--camp-panel); border:1px solid var(--camp-accent); border-radius:12px; padding:14px; font-size:13px; }
.exp-replace-option { width:100%; display:grid; gap:8px; padding:10px; background:#102331; border-radius:8px; }
.exp-replace-option p { font-size:12px; color:var(--camp-muted); }
.exp-shop { border:1px solid var(--camp-line); padding:14px; border-radius:12px; background:var(--camp-panel); }
.exp-shop > p { color:var(--camp-gold); font-size:13px; }
.exp-shop button { width:100%; white-space:pre-line; text-align:left; line-height:1.8; font-size:13px; }
#exp-panel button { background:#203a4b; border-color:#4c6978; border-radius:10px; min-height:44px; }
#exp-panel button:disabled { opacity:.65; }
#exp-panel .exp-primary { background:var(--camp-accent); color:#17362e; border-color:#b6e6c9; font-weight:800; }
.exp-loot-choices button { font-size:13px; }
#exp-actions > button:last-child { margin-top:12px; background:transparent; color:var(--camp-muted); font-size:12px; }
#battle-toolbar { position:absolute; inset:0; z-index:8; pointer-events:none; }
#battle-toolbar button { pointer-events:auto; cursor:pointer; color:#edf3ed; background:#172e40; border:1px solid #526e81; border-radius:8px; min-height:36px; padding:7px 10px; font-size:11px; }
#battle-effects { position:absolute; top:108px; left:8px; }
#battle-speed { position:absolute; top:108px; right:8px; }
#battle-toolbar #exp-capture { top:auto; bottom:190px; left:8px; right:8px; transform:none; max-width:none; min-height:42px; border-color:#8bc6a0; color:#d6f4df; font-size:12px; }
#exp-battle-home { top:152px; font-size:11px; min-height:34px; padding:7px 10px; background:#283545; border-color:#7a8792; }
.expedition-battle .player-model { bottom:34%; }
#turn-banner { font-size:18px; letter-spacing:0; line-height:1.6; text-shadow:0 1px 3px #172e40; padding:8px 14px; border-radius:10px; background:rgba(16,30,44,.86); white-space:pre-line; width:max-content; max-width:90%; text-align:center; top:48%; }
.status-badge { max-width:164px; flex-wrap:wrap; justify-content:center; gap:3px; top:-44px; cursor:pointer; }
.badge { padding:3px 6px; font-size:10px; color:#183d32; background:#d8eddb; border-color:#9dc7a7; }
.badge[data-group=debuff] { color:#663836; background:#f1dbd0; border-color:#d5a692; }
.badge[data-group=trait] { color:#564719; background:#f7e9bc; border-color:#d9c486; }
.status-badge .badge:nth-child(n+4) { display:none; }
.badge-more { border:1px solid #a3bcc5; border-radius:8px; font-size:10px; background:#edf3ed; padding:3px 5px; color:#17362e; cursor:pointer; }
#battle-effects-panel { position:absolute; inset:12% 12px 14%; z-index:110; overflow:auto; background:#122333; color:#edf3ed; border:1px solid #779485; border-radius:16px; padding:16px; box-shadow:0 10px 40px #07131eb3; }
.effect-header { display:flex; justify-content:space-between; align-items:center; position:sticky; top:-16px; background:#122333; padding:10px 0; }
.effect-header button { min-height:40px; padding:8px 12px; border:1px solid #526e81; border-radius:8px; background:#203a4b; color:white; cursor:pointer; }
#battle-effects-content section { padding:14px 0; border-top:1px solid #355366; }
#battle-effects-content h3 { font-size:16px; color:#d5eace; }
#battle-effects-content h4 { font-size:12px; margin:14px 0 6px; color:#edcb83; }
#battle-effects-content p { font-size:12px; color:#b6c9ca; line-height:1.9; }
#skill-bar .skill-card { transform:none; border-radius:9px; box-shadow:0 3px 6px #10233140; }
#skill-bar .skill-card:hover:not(.disabled) { transform:translateY(-3px); }
#btn-run { margin-right:12px; }
@media (min-width:800px) { #game:has(#start-screen:not(.hidden)), #game:has(#exp-panel:not(.hidden)) { width:min(760px,90vw); } #mode-select { max-width:420px; margin:auto; } #exp-panel { padding:24px 30px; } #exp-team { grid-template-columns:repeat(3,minmax(0,1fr)); } .exp-shop { display:grid; grid-template-columns:1fr 1fr; } .exp-shop > p { grid-column:1/-1; } }
@media (max-height:700px) { .home-map { height:90px; } #mode-select { padding:8px 0; } #home-expedition { margin-top:14px; } #mode-select h1 { font-size:28px; } .expedition-battle .player-model { bottom:36%; } #exp-battle-home { top:148px; } #side-buttons { top:37%; gap:5px; } .round-btn { width:40px; height:40px; } }
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }

/* Guided reward pages keep a single decision in front of the player. */
#exp-flow { margin:12px 0 20px; padding:16px; border:1px solid var(--camp-line); border-radius:12px; background:var(--camp-panel); }
#exp-flow-steps { display:flex; gap:7px; list-style:none; margin-bottom:16px; flex-wrap:wrap; }
#exp-flow-steps li { font-size:11px; color:var(--camp-muted); border-bottom:2px solid #456073; padding:5px 3px; }
#exp-flow-steps [aria-current=step] { color:var(--camp-accent); border-color:var(--camp-accent); font-weight:800; }
#exp-flow-title { color:var(--camp-text) !important; font-size:20px !important; }
#exp-flow-hint { color:var(--camp-muted); font-size:12px; }
#exp-flow-controls { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
#exp-flow-controls button:first-child { background:var(--camp-accent); color:#17362e; font-weight:700; }
#exp-panel[data-phase=reward] .exp-help { display:none; }
#exp-panel[data-flow=summary] #exp-flow { visibility:hidden; }
#exp-panel[data-phase=reward][data-flow=team] #exp-gear > p, #exp-panel[data-phase=reward][data-flow=team] .exp-loot-choices, #exp-panel[data-phase=reward][data-flow=team] [data-loot-reroll] { display:none; }
#exp-panel[data-phase=reward][data-flow=loot] #exp-gear > details, #exp-panel[data-flow=capture] #exp-economy > details { display:none; }
#exp-panel[data-flow=loot] #exp-gear > p { display:none; }
#exp-panel[data-flow=loot] #exp-flow-controls button:first-child { background:transparent; color:var(--camp-muted); font-weight:400; }
#exp-panel[data-flow=supply] #exp-actions > h2 { display:none; }
.exp-catch select { min-height:44px; width:100%; border:1px solid #779485; border-radius:8px; background:#102331; color:#edf3ed; padding:10px; }
.exp-catch .exp-compare { width:100%; color:var(--camp-muted); font-size:12px; }
.exp-recruit { padding:14px; border:1px solid #526e81; border-radius:10px; background:#203a4b; min-width:0; }
.exp-recruit p { font-size:13px; color:#edf3ed; margin-bottom:8px; }
.exp-recruit select { width:100%; padding:10px; border:1px solid #779485; border-radius:8px; background:#102331; color:#edf3ed; min-height:44px; }
.exp-recruit button { margin-top:8px; width:100%; }
.exp-enemy-preview { color:var(--camp-muted); font-size:12px; margin-top:8px; }
.exp-boss-rule { margin-top:10px; color:var(--camp-gold); font-size:12px; }
.exp-ending { background:var(--camp-panel); border:1px solid var(--camp-line); border-radius:12px; padding:18px; font-size:13px; }
.exp-ending p { padding:7px 0; }
#exp-summary-modal { position:absolute; inset:0; z-index:100; background:#081522b8; padding:16px; display:flex; align-items:center; justify-content:center; }
.exp-summary-card { width:100%; max-width:600px; max-height:94%; overflow:auto; padding:24px 20px; border:1px solid #8cbea3; border-radius:18px; background:#142c38; color:#edf3ed; box-shadow:0 10px 60px #03101c99; }
#exp-summary-title { font-size:26px; margin:8px 0 18px; }
.exp-summary-total { padding:12px; border-radius:8px; background:#264437; color:#edcb83; margin-bottom:14px; font-size:14px; }
.exp-summary-member { display:grid; gap:6px; padding:12px 0; border-bottom:1px solid #355366; font-size:13px; }
.exp-summary-member span, .exp-summary-member small { color:#b6c9ca; line-height:1.7; }
.exp-summary-card button { width:100%; min-height:46px; padding:12px; border-radius:10px; cursor:pointer; margin-top:16px; background:#a3d6b7; color:#17362e; border:1px solid #b6e6c9; font-weight:800; }
.exp-summary-card #exp-summary-home { margin-top:8px; color:#b6c9ca; border-color:#526e81; background:transparent; }
#desktop-battle-rail { display:none; }
@media (min-width:900px) {
  #game, #game:has(#start-screen:not(.hidden)), #game:has(#exp-panel:not(.hidden)) { width:min(1180px,96vw); height:min(92vh,860px); }
  #mode-select { display:grid; grid-template-columns:1fr 1fr; gap:0 32px; align-content:center; justify-items:center; max-width:1000px; min-height:100%; }
  #mode-select > .home-eyebrow, #mode-select > h1, #mode-select > .subtitle { grid-column:1/-1; }
  #home-expedition { grid-column:1; grid-row:4/span 3; }
  .home-map { height:176px; }
  #mode-select .home-duels { grid-column:2; grid-row:4; align-self:end; grid-template-columns:1fr; }
  #mode-select .home-duels .mode-big-btn { padding:24px 12px; font-size:19px; }
  #mode-select .home-duels span { font-size:12px; }
  #mode-select .home-sub-row { grid-column:2; grid-row:5; align-self:start; }
  #mode-select .footnote { grid-column:2; grid-row:6; align-self:start; }
  #exp-panel { padding:22px 34px; }
  #exp-team { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #exp-panel[data-flow=loot] .exp-loot-choices { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #exp-panel[data-flow=supply] #exp-actions { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; }
  #exp-actions > p, #exp-actions > button:last-child { grid-column:1/-1; }
  #exp-summary-content { display:grid; grid-template-columns:1fr 1fr; gap:0 18px; }
  .exp-summary-total { grid-column:1/-1; }
  #desktop-battle-rail:not(.hidden) { display:block; position:absolute; top:0; bottom:0; right:0; width:290px; padding:22px 18px 88px; color:#edf3ed; background:#142735; z-index:4; border-left:1px solid #46606e; overflow:auto; }
  #desktop-battle-rail h2 { font-size:20px; color:#edcb83; margin-bottom:12px; }
  #desktop-battle-rail h3 { font-size:14px; margin:16px 0 8px; }
  #desktop-battle-rail p { font-size:12px; line-height:1.8; color:#b6c9ca; }
  #desktop-effects { margin:16px 0; width:100%; padding:10px; min-height:44px; background:#a3d6b7; color:#17362e; border:0; border-radius:8px; cursor:pointer; }
  .rail-round { color:#edcb83 !important; }
  .rail-badges { display:flex; flex-wrap:wrap; gap:5px; color:#b6c9ca; font-size:11px; margin-top:8px; }
  .rail-badges span { background:#274637; padding:4px 6px; border-radius:5px; }
  #desktop-battle-log p { padding:8px 0; border-top:1px solid #355366; }
  #scene { right:290px; }
  #top-info { right:290px; padding:0 16px; gap:16px; }
  .info-card { padding:10px 14px; }
  .name-row { font-size:16px; }
  .name-row .lv { font-size:12px; }
  .avatar { width:44px; height:44px; flex-basis:44px; }
  #battle-toolbar { right:290px; }
  #exp-battle-home { left:calc((100% - 290px)/2); top:148px; }
  #skill-bar { left:16px; right:306px; }
  #log-ticker { left:16px; right:16px; }
  #action-bar { left:16px; right:306px; }
  #skill-bar .skill-card { padding:12px 8px; }
  #skill-bar .sname { font-size:15px; }
  #log-ticker { bottom:172px; }
  #battle-toolbar #exp-capture { bottom:214px; left:16px; right:16px; }
  #side-buttons { right:18px; top:auto; bottom:18px; transform:none; flex-direction:row; gap:9px; }
  .enemy-model { right:22%; top:26%; }
  .player-model, .expedition-battle .player-model { left:18%; bottom:33%; }
  .model-core, .player-model .model-core { width:138px; height:138px; font-size:70px; }
  #turn-banner { left:50%; top:45%; }
  #battle-effects-panel { inset:10% 15% 12%; }
  #switch-panel { left:16px; right:306px; }
  #settings-panel { max-width:380px; }
}

/* v3.8 · Forest camp: live controls over the chosen illustration. */
#start-screen:has(#mode-select:not(.hidden)) { padding:0; background:#26362b; }
#mode-select { --ink:#273c2a; --brass:#ad874b; --paper:#f3e8d0; display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; max-width:none; margin:0; padding:0; min-height:100%; color:var(--ink); background:#304332 url('assets/ui/v38/camp-home.png') center top/cover no-repeat; }
.home-icon-sprite { position:absolute; width:0; height:0; overflow:hidden; }
#mode-select svg { width:26px; height:26px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
#mode-select .home-hero { position:relative; flex:1; min-height:310px; padding:30px 42px; background:linear-gradient(115deg,#10221685,transparent 60%); }
#mode-select .home-eyebrow { color:#f0dba8; font-size:10px; letter-spacing:3px; text-shadow:0 2px 8px #17281b; }
#mode-select h1 { font-family:'STKaiti','KaiTi','Microsoft YaHei',serif; font-size:clamp(36px,5vw,66px); color:#fff0c5; letter-spacing:7px; text-shadow:0 3px 15px #13241d; }
#mode-select h1 span { font-family:system-ui,sans-serif; font-size:10px; letter-spacing:1px; color:#eadbb7; }
#mode-select .subtitle { color:#f4e4c0; font-size:13px; letter-spacing:3px; margin-top:9px; text-shadow:0 2px 6px #17281b; }
.home-deck { position:relative; display:grid; grid-template-columns:1.17fr 1fr; grid-template-rows:auto auto auto; gap:14px 30px; padding:25px 34px 16px; background:radial-gradient(ellipse at 18% 0%,#fff4db 0,transparent 60%),linear-gradient(110deg,#e8d5ae,#f5e9d0 55%,#e8d6b8); border-top:2px solid #c3a36a; box-shadow:0 -8px 30px #232d2440; }
.home-deck::before { content:''; position:absolute; inset:8px; border:1px solid #af8d5340; pointer-events:none; }
#mode-select #home-expedition { grid-column:1; grid-row:1/4; margin:0; padding:0; border:0; border-radius:0; overflow:visible; background:none; display:grid; grid-template-columns:66px minmax(0,1fr); gap:0 14px; align-content:center; }
#mode-select .home-map { grid-column:1; grid-row:1; margin:6px 0 0; width:66px; height:66px; border:double 4px #b49659; border-radius:50%; background:radial-gradient(circle,#49653e,#223c2a); display:flex; align-items:center; justify-content:center; box-shadow:0 2px 8px #76563030; color:#e9cb83; }
#mode-select .home-map svg { width:48px; height:48px; stroke-width:1.3; }
#home-progress { min-width:0; }
#mode-select #home-progress .home-route-eyebrow { font-size:10px; color:#766441; letter-spacing:2px; line-height:1.4; margin:0 0 4px; }
#mode-select #home-progress h2 { font-family:'STKaiti','KaiTi','Microsoft YaHei',serif; font-size:30px; margin:0 0 6px; letter-spacing:2px; color:#213e2c; }
#mode-select #home-progress p { font-size:11px; color:#66583d; line-height:1.6; }
.home-route { display:flex; gap:7px; margin-top:14px; padding:3px 0; }
.home-route-segment { position:relative; flex:1; display:flex; align-items:center; justify-content:space-around; min-width:0; height:14px; }
.home-route-trail { position:absolute; height:3px; left:0; right:0; background:#b9a47c; border-radius:5px; overflow:hidden; }
.home-route-trail i { display:block; height:100%; background:#597847; }
.home-route-node { position:relative; width:7px; height:7px; border-radius:50%; background:#d3c4a4; border:1px solid #ab936a; }
.home-route-node.passed { background:#52763f; border-color:#426031; }
.home-route-node.current { background:#f2d279; border:2px solid #355735; width:11px; height:11px; box-shadow:0 0 0 3px #5b7d3a25; }
.home-route-node.boss { border-radius:2px; transform:rotate(45deg); }
.home-route-regions { display:flex; gap:7px; margin:6px 0 0; }
.home-route-regions span { flex:1; min-width:0; text-align:center; font-size:9px; color:#776647; }
.home-route-regions .current { color:#35592e; font-weight:800; }
#mode-select .home-party { gap:6px; margin:10px 0 0; }
#mode-select .home-party > span { width:32px; height:32px; padding:1px; border-color:#aa925a; background:#e4d8b5; box-shadow:inset 0 0 6px #9b804438; }
.home-expedition-actions { grid-column:1/-1; display:flex; gap:10px; margin-top:15px; }
#mode-select .mode-big-btn, #mode-select .mode-sub-btn { color:var(--ink); border:1px solid #b5945b; border-radius:5px; background:linear-gradient(#fff3dc,#e6d1a9); box-shadow:inset 0 0 0 3px #fff2d780,0 3px 6px #6f552329; font-family:inherit; cursor:pointer; transition:filter .15s,transform .15s; }
#mode-select button:hover { transform:translateY(-2px); filter:brightness(1.05); }
#mode-select button:active { transform:translateY(0); }
#mode-select button:focus-visible { outline:3px solid #284f35; outline-offset:3px; }
#mode-select #mode-expedition { flex:1.5; min-height:52px; margin:0; padding:12px; border:double 4px #d0b371; background:linear-gradient(140deg,#3b623b,#183e2c); color:#fff0c5; box-shadow:inset 0 0 0 1px #152e1b,0 3px 6px #6f552329; font-family:'STKaiti','KaiTi','Microsoft YaHei',serif; font-size:23px; letter-spacing:2px; }
#mode-select #home-new-expedition { flex:1; width:auto; min-height:52px; margin:0; padding:10px; font-size:13px; }
#mode-select .home-duels { grid-column:2; grid-row:1; display:grid; grid-template-columns:1fr 1fr; gap:12px; width:100%; margin:0; align-self:stretch; }
#mode-select .home-duels .mode-big-btn { margin:0; padding:0; overflow:hidden; text-align:left; font-size:17px; border:double 4px #b89860; min-width:0; background:linear-gradient(#fff3dc,#e6d1a9); color:var(--ink); }
.home-duel-art { position:relative; height:92px; overflow:hidden; background:linear-gradient(130deg,#253d32,#68804f); border-bottom:1px solid #b5945b; }
#mode-pvp .home-duel-art { background:linear-gradient(130deg,#754a2d,#293d36); }
.home-duel-art img { position:absolute; width:64%; height:110%; object-fit:contain; left:-7%; bottom:-6%; filter:drop-shadow(0 3px 4px #0c231b80); }
.home-duel-art img+img { left:auto; right:-8%; transform:scaleX(-1); }
.home-duel-label { display:flex; align-items:center; gap:8px; padding:12px 9px; }
#mode-select .home-duel-label > svg { width:32px; height:32px; color:#7c6236; }
#mode-select .home-duels span { color:#756343; font-size:10px; font-weight:400; margin-top:5px; letter-spacing:0; }
#mode-select .home-sub-row { grid-column:2; grid-row:2; width:100%; gap:8px; margin:0; }
#mode-select .home-sub-row button { flex:1; min-width:0; min-height:48px; padding:9px 5px; display:flex; align-items:center; justify-content:center; gap:6px; font-size:12px; letter-spacing:0; }
#mode-select .home-sub-row svg { width:22px; height:22px; color:#715a36; }
#mode-select .footnote { grid-column:2; grid-row:3; text-align:center; color:#796646; font-size:9px; padding:0; margin:0; letter-spacing:1px; }
/* Full silhouettes use the same transparent assets in battle, dex and party. */
.model-core.has-camp-art { background:transparent!important; border:0; border-radius:0; overflow:visible; box-shadow:none; width:140px; height:140px; }
.player-model .model-core.has-camp-art { width:160px; height:150px; }
.model-core.has-camp-art .spirit-art-img { filter:drop-shadow(0 4px 3px #22382235); }
.enemy-model .model-core.has-camp-art .spirit-art-img { transform:scaleX(-1); }
@media (min-width:900px) {
  #mode-select .home-hero { min-height:330px; }
  .model-core.has-camp-art, .player-model .model-core.has-camp-art { width:190px; height:175px; }
}
@media (max-width:899px) {
  #mode-select { background-size:auto 430px; background-position:44% top; }
  #mode-select .home-hero { flex:none; min-height:295px; padding:23px 20px; }
  #mode-select h1 { font-size:39px; letter-spacing:4px; }
  #mode-select .subtitle { font-size:11px; letter-spacing:1px; }
  .home-deck { flex:1; align-content:start; grid-template-columns:minmax(0,1fr); gap:17px; padding:20px 17px 15px; }
  #mode-select #home-expedition { grid-column:1; grid-row:1; grid-template-columns:46px minmax(0,1fr); gap:0 10px; }
  #mode-select .home-map { width:46px; height:46px; }
  #mode-select .home-map svg { width:32px; height:32px; }
  #mode-select #home-progress h2 { font-size:26px; }
  #mode-select #home-progress p { font-size:10px; }
  #mode-select .home-duels { grid-column:1; grid-row:2; }
  .home-duel-art { height:70px; }
  #mode-select .home-duels .mode-big-btn { font-size:15px; }
  .home-duel-label { padding:9px 7px; gap:5px; }
  #mode-select .home-duel-label > svg { width:25px; height:25px; }
  #mode-select .home-duels span { font-size:9px; }
  #mode-select .home-sub-row { grid-column:1; grid-row:3; }
  #mode-select .footnote { grid-column:1; grid-row:4; }
  #mode-select .home-sub-row button { font-size:11px; gap:4px; }
  #mode-select #mode-expedition { font-size:20px; }
}
@media (max-height:700px) and (min-width:900px) {
  #mode-select .home-hero { min-height:210px; padding-top:20px; }
  .home-deck { padding-top:18px; padding-bottom:12px; }
  .home-duel-art { height:68px; }
}
@media (prefers-reduced-motion:reduce) { #mode-select button { transition:none; } }
#game:has(#mode-select:not(.hidden)) #settings-panel { color:#273c2a; background:linear-gradient(#fff3dc,#e6d1a9); border:double 4px #b89860; box-shadow:0 8px 28px #17291a70; }
#game:has(#mode-select:not(.hidden)) #settings-panel .settings-header { color:#273c2a; }
#game:has(#mode-select:not(.hidden)) #settings-panel .panel-home { color:#273c2a; border-color:#b5945b; background:#efe1bf; }
.model-core.has-camp-art .spirit-art-img { object-position:center bottom; }
