/* screens.css — 챕터·스테이지 지도·편성·결과 (Claude-B). 모든 선택자 b- 로 시작(다른 화면과 안 겹침).
   좌표는 1280x720 논리 무대 기준. */

.b-screen {
  position: absolute; inset: 0; overflow: hidden;
  color: #f3ead7;
  font-family: inherit;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.b-screen img { image-rendering: pixelated; }
.b-noimg {
  background: repeating-linear-gradient(45deg, #3b3f4a 0 6px, #2c2f38 6px 12px);
  border-radius: 4px;
}
.b-empty { color: #9aa3ad; font-size: 18px; padding: 8px; text-align: center; }

/* ── 공통 버튼 ── */
.b-btn {
  font: inherit; color: #f7efe0; cursor: pointer;
  min-height: 64px; min-width: 64px; padding: 0 22px;
  border: 3px solid #1b1c22; border-radius: 6px;
  background: linear-gradient(#5c5752, #3e3a37);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.12);
  font-size: 24px; font-weight: 700; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.b-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.35); }
.b-btn:disabled { filter: grayscale(.8) brightness(.6); cursor: default; }
.b-btn-dark { background: linear-gradient(#57524d, #3a3632); }
.b-btn-food {
  color: #3a1f0c;
  background: linear-gradient(#ffd79a, #f2a65a);
  border-color: #5a2f12;
  box-shadow: inset 0 -4px 0 rgba(120,50,0,.35), inset 0 2px 0 rgba(255,255,255,.5);
}
.b-btn-food.short { filter: saturate(.4) brightness(.8); }
.b-btn-lg { height: 68px; font-size: 26px; }
.b-btn-ic { width: 34px; height: 34px; object-fit: contain; }
.b-btn-x {
  font-size: 18px; background: rgba(60,25,5,.75); color: #fff; padding: 2px 8px; border-radius: 10px;
}
.b-btn-lock { width: 26px; height: 26px; object-fit: contain; margin-left: 4px; }
.b-ic-btn { padding: 0; width: 64px; height: 64px; background: rgba(20,24,30,.75); }

.b-topline { position: absolute; left: 16px; top: 8px; z-index: 5; }
.b-back {
  background: transparent; border: 0; box-shadow: none; padding: 0 12px;
  font-size: 30px; color: #fff; text-shadow: 0 3px 0 #000, 0 0 6px rgba(0,0,0,.6);
}
.b-back::first-letter { color: #ffb43c; }

.b-stars { display: inline-flex; gap: 1px; line-height: 1; }
.b-star { color: #6c6f75; text-shadow: 0 2px 0 #222; }
.b-star.on { color: #ffc533; text-shadow: 0 2px 0 #8a4a00; }

/* 위 자원 줄 */
.b-resbar {
  position: absolute; right: 16px; top: 8px; z-index: 6;
  display: flex; gap: 10px; align-items: center;
}
.b-res {
  display: flex; align-items: center; gap: 6px;
  height: 44px; min-width: 150px; padding: 0 14px 0 6px;
  background: rgba(16,20,26,.78); border-radius: 22px;
  font-size: 22px; font-weight: 700;
}
.b-res-v { margin-left: auto; }
.b-res-ic { width: 36px; height: 36px; object-fit: contain; }
.b-resbar .b-ic-btn { width: 64px; height: 64px; border-radius: 8px; }

/* ═════════ 챕터 선택 ═════════ */
.b-chapter {
  background:
    radial-gradient(ellipse 260px 120px at 120px 30px, rgba(210,215,190,.55), transparent 70%),
    radial-gradient(ellipse 300px 120px at 1200px 40px, rgba(210,215,190,.5), transparent 70%),
    radial-gradient(ellipse 360px 110px at 300px 720px, rgba(210,215,190,.5), transparent 70%),
    radial-gradient(ellipse 380px 110px at 1050px 720px, rgba(210,215,190,.5), transparent 70%),
    radial-gradient(circle at 50% 40%, #1f6b78, #0f3c48 75%);
}
.b-chapter-row {
  position: absolute; left: 24px; right: 24px; top: 120px; height: 520px;
  display: flex; gap: 20px;
}
.b-ccard {
  position: relative; flex: 0 0 287px; height: 520px; cursor: pointer;
  border: 3px solid #d8b48c; border-radius: 8px; overflow: hidden;
  background: #2f6d48;
  box-shadow: 0 6px 0 rgba(0,0,0,.35);
  transition: transform .12s;
}
.b-ccard:active { transform: scale(.98); }
.b-ccard-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.b-ccard-info {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 0 18px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  text-align: center;
}
.b-ccard-name { font-size: 30px; font-weight: 800; text-shadow: 0 3px 0 #000; }
.b-ccard-stars { font-size: 22px; margin-top: 4px; text-shadow: 0 2px 0 #000; }
.b-ccard.locked { background: #4a403b; border-color: #7a675a; cursor: default; }
.b-ccard-sil {
  position: absolute; left: 0; right: 0; top: 90px; bottom: 0;
  background: #1a1513;
  clip-path: polygon(0 18%, 10% 12%, 18% 15%, 30% 4%, 42% 9%, 55% 0, 66% 7%, 80% 5%, 92% 14%, 100% 10%, 100% 100%, 0 100%);
}
.b-ccard-sil::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
  background: linear-gradient(transparent, #000);
}
.b-lock {
  position: absolute; left: 50%; bottom: 40px; width: 48px; height: 48px;
  transform: translateX(-50%); object-fit: contain; opacity: .85;
}

/* ═════════ 스테이지 지도 ═════════ */
.b-stagemap { background: #0f3c48; }
.b-map { position: absolute; left: 0; top: 0; width: 720px; height: 720px; overflow: hidden; }
.b-map-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.b-map-lines { position: absolute; inset: 0; width: 720px; height: 720px; pointer-events: none; }
.b-map-line { stroke: #fff; stroke-width: 9; stroke-linecap: round; }
.b-map-line.locked { stroke: rgba(255,255,255,.45); stroke-dasharray: 2 14; }
.b-map-nodes { position: absolute; inset: 0; }
.b-node {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  min-width: 66px; min-height: 80px; cursor: pointer;
}
.b-node-plate {
  width: 60px; height: 44px; border: 3px solid #183022; border-radius: 6px;
  background: linear-gradient(#69b85c, #3f8a3e);
  display: flex; align-items: center; justify-content: center;
}
.b-node-tree {
  width: 30px; height: 26px;
  background:
    radial-gradient(circle at 50% 35%, #2e6a2c 9px, transparent 10px),
    linear-gradient(#5b3b22, #5b3b22) 50% 100% / 4px 10px no-repeat;
}
.b-node.locked .b-node-plate { background: linear-gradient(#3a3d42, #22252a); border-color: #0e0f12; }
.b-node-lock { width: 28px; height: 28px; object-fit: contain; }
.b-node-label {
  margin-top: -4px; padding: 0 12px; font-size: 18px; font-weight: 700;
  background: #3c3f45; border: 2px solid #17181c; border-radius: 4px;
}
.b-node-stars { font-size: 20px; }
.b-node.sel .b-node-plate { box-shadow: 0 0 0 3px #ffd36b, 0 0 16px #ffd36b; }
.b-node-mark {
  position: absolute; top: -34px; color: #ffcb4a; font-size: 26px;
  text-shadow: 0 2px 0 #7a4500; animation: b-bob 1s ease-in-out infinite;
}
@keyframes b-bob { 50% { transform: translateY(-6px); } }

.b-panel {
  position: absolute; left: 720px; top: 0; width: 560px; height: 720px;
  padding: 80px 24px 20px; box-sizing: border-box;
  background: linear-gradient(90deg, rgba(10,40,48,.0), rgba(10,40,48,.92) 40px, #0d3640);
  display: flex; flex-direction: column; align-items: center;
}
.b-panel-head { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 76px; }
.b-arrow {
  width: 64px; height: 76px; padding: 0; font-size: 40px; color: #c9b9a6;
  background: rgba(40,36,34,.85);
}
.b-panel-title { font-size: 34px; font-weight: 800; text-shadow: 0 3px 0 #000; }
.b-sec-title {
  margin-top: 18px; width: 100%; display: flex; align-items: center; gap: 12px;
  font-size: 22px; font-weight: 700; color: #ffc457; text-shadow: 0 2px 0 #000;
}
.b-sec-title::before, .b-sec-title::after { content: ""; flex: 1; height: 2px; background: #c99a4a; }
.b-enemies { display: flex; gap: 14px; justify-content: center; margin-top: 12px; min-height: 112px; }
.b-portrait {
  position: relative; width: 108px; height: 108px;
  background: #3e434d; border: 3px solid #d8b48c; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.b-portrait-img { max-width: 92px; max-height: 92px; }
.b-portrait-n { position: absolute; right: 4px; bottom: 2px; font-size: 18px; font-weight: 800; text-shadow: 0 2px 0 #000; }
.b-rewards {
  margin-top: 12px; width: 100%; min-height: 112px; box-sizing: border-box;
  padding: 8px; display: flex; gap: 10px; justify-content: center;
  background: rgba(24,26,32,.85); border: 3px solid #4b4f58; border-radius: 6px;
}
.b-rcell {
  position: relative; width: 96px; height: 96px; flex: 0 0 96px;
  background: radial-gradient(circle, #8a6d55, #5b4536);
  border: 3px solid #d8b48c; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.b-rcell-ic { width: 60px; height: 60px; object-fit: contain; }
.b-rcell-n {
  position: absolute; right: 5px; bottom: 2px;
  font-size: 18px; font-weight: 800; text-shadow: 0 2px 0 #000, 0 0 3px #000;
}
.b-rcell-n.top { top: 2px; bottom: auto; }
.b-rcell-tag {
  position: absolute; left: -3px; top: -12px; padding: 1px 6px;
  font-size: 13px; font-weight: 800; background: #d9443a; color: #fff; border-radius: 4px;
}
.b-panel-note { margin-top: 10px; min-height: 26px; font-size: 18px; color: #b9c6cc; }
.b-panel-note.warn { color: #ff9b7a; }
.b-panel-btns { margin-top: auto; display: flex; gap: 16px; }
.b-panel-btns .b-btn { width: 240px; padding: 0 10px; white-space: nowrap; }
.b-rewards .b-rcell { width: 86px; height: 86px; flex-basis: 86px; }
.b-rewards .b-rcell-ic { width: 54px; height: 54px; }
.b-rewards { gap: 8px; }

/* ═════════ 편성 ═════════ */
.b-party {
  background: linear-gradient(#21303a, #141c23);
}
.b-slots { position: absolute; left: 24px; top: 84px; display: flex; gap: 12px; }
.b-slot {
  position: relative; width: 142px; height: 170px; box-sizing: border-box; cursor: pointer;
  background: #2c333d; border: 3px solid #5e6672; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 6px;
}
.b-slot.pick { border-color: #ffd36b; box-shadow: 0 0 14px #ffd36b; }
.b-slot.locked { background: #1d2127; border-color: #33373e; cursor: default; justify-content: center; }
.b-slot-no { position: absolute; left: 6px; top: 2px; font-size: 16px; color: #9aa3ad; }
.b-slot-img { height: 96px; max-width: 120px; object-fit: contain; }
.b-slot-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 132px; }
.b-slot-stars { font-size: 16px; }
.b-slot-lock { width: 40px; height: 40px; object-fit: contain; opacity: .7; }
.b-slot-empty { flex: 1; display: flex; align-items: center; font-size: 56px; color: #5e6672; }
.b-party-help { position: absolute; left: 24px; top: 262px; font-size: 17px; color: #9fb0bb; }
.b-mlist {
  position: absolute; left: 24px; top: 296px; width: 760px; height: 404px;
  overflow-y: auto; display: flex; flex-wrap: wrap; gap: 12px; align-content: flex-start;
  padding: 10px; box-sizing: border-box;
  background: rgba(0,0,0,.25); border: 2px solid #33404b; border-radius: 8px;
}
.b-mcard {
  position: relative; width: 136px; height: 184px; box-sizing: border-box; cursor: pointer;
  background: #3a3f48; border: 3px solid #6b7380; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; padding-top: 6px;
}
.b-mcard.in { border-color: #6fc06a; }
.b-mcard.focus { box-shadow: 0 0 0 3px #ffd36b; }
.b-mcard-img { height: 96px; max-width: 120px; object-fit: contain; }
.b-mcard-lv { position: absolute; left: 6px; top: 4px; font-size: 16px; font-weight: 800; text-shadow: 0 2px 0 #000; }
.b-mcard-name { font-size: 17px; font-weight: 700; margin-top: 2px; }
.b-mcard-stars { font-size: 16px; }
.b-mcard-role { font-size: 14px; color: #b5c0c9; }
.b-mcard-badge {
  position: absolute; right: 4px; top: 4px; padding: 1px 6px; font-size: 13px; font-weight: 800;
  background: #3f8a3e; border-radius: 4px;
}
.b-detail {
  position: absolute; left: 808px; top: 84px; width: 448px; height: 616px; box-sizing: border-box;
  padding: 18px; background: #252b33; border: 3px solid #4b5560; border-radius: 10px;
  display: flex; flex-direction: column; gap: 12px;
}
.b-detail-head { display: flex; gap: 16px; }
.b-detail-img {
  width: 120px; height: 120px; object-fit: contain; flex: 0 0 120px;
  background: #3e434d; border: 3px solid #d8b48c; border-radius: 6px;
}
.b-detail-hinfo { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.b-detail-name { font-size: 28px; font-weight: 800; }
.b-detail-stars { font-size: 22px; }
.b-detail-role { font-size: 18px; color: #c5d0d8; }
.b-expbar {
  position: relative; height: 22px; background: #14171c; border: 2px solid #000; border-radius: 4px; overflow: hidden;
}
.b-expbar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#ffd56a, #e79a2a); }
.b-expbar-t { position: absolute; inset: 0; text-align: center; font-size: 14px; line-height: 18px; font-weight: 700; text-shadow: 0 1px 0 #000; }
.b-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.b-stat { display: flex; justify-content: space-between; font-size: 19px; padding: 4px 8px; background: rgba(0,0,0,.25); border-radius: 4px; }
.b-stat-k { color: #a9b6c0; }
.b-stat-v { font-weight: 800; }
.b-skill { padding: 10px 12px; background: rgba(0,0,0,.3); border-radius: 6px; border-left: 4px solid #ffb43c; }
.b-skill-name { font-size: 21px; font-weight: 800; color: #ffd27a; }
.b-skill-cd { font-size: 15px; color: #a9b6c0; margin-top: 2px; }
.b-skill-desc { font-size: 17px; margin-top: 6px; line-height: 1.35; }
.b-detail-act { margin-top: auto; width: 100%; }

/* ═════════ 결과 ═════════ */
.b-result { background: #10160f; }
.b-result-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.b-result-dim { position: absolute; inset: 0; background: rgba(5,10,6,.68); }
.b-result-title {
  position: absolute; left: 0; right: 0; top: 10px; text-align: center;
  font-size: 112px; font-weight: 900; letter-spacing: 6px; line-height: 1.1;
  color: #ffbd5a;
  background: linear-gradient(#ffe2a0 0 45%, #f19a3e 55% 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 4px #5a2a0a;
  filter: drop-shadow(0 6px 0 #2a1204);
  animation: b-drop .45s cubic-bezier(.2,1.6,.4,1) both;
}
.b-result.lose .b-result-title {
  background: linear-gradient(#d6dde6 0 45%, #7f8b99 55% 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke-color: #1d2430;
}
@keyframes b-drop { 0% { transform: translateY(-60px) scale(1.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
.b-result-stars { position: absolute; left: 0; right: 0; top: 136px; display: flex; justify-content: center; gap: 22px; }
.b-bigstar {
  font-size: 72px; line-height: 1; color: #5d6168;
  text-shadow: 0 4px 0 #222; animation: b-pop .35s cubic-bezier(.2,1.8,.4,1) both;
}
.b-bigstar.on { color: #ffc533; text-shadow: 0 4px 0 #8a4a00, 0 0 18px rgba(255,200,60,.7); }
@keyframes b-pop { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.pop { animation: b-pop .3s cubic-bezier(.2,1.6,.4,1) both; }

.b-mvp { position: absolute; left: 52px; top: 210px; width: 230px; text-align: center; }
.b-mvp-label {
  font-size: 44px; font-weight: 900; color: #fff; text-align: left; padding-left: 10px;
  text-shadow: 0 3px 0 #000;
}
.b-mvp-box {
  width: 224px; height: 224px; box-sizing: border-box; margin-top: 4px;
  background: #3e434d; border: 4px solid #c99779; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.b-mvp-img { width: 180px; height: 180px; object-fit: contain; }
.b-mvp-name { margin-top: 8px; font-size: 22px; font-weight: 800; }
.b-mvp-dmg { font-size: 17px; color: #ffd27a; }

.b-reward-wrap { position: absolute; left: 318px; top: 226px; width: 644px; }
.b-reward-label { text-align: center; font-size: 22px; font-weight: 700; color: #ffc457; margin-bottom: 8px; }
.b-reward-box {
  height: 284px; box-sizing: border-box; padding: 16px 16px 10px;
  background: rgba(30,34,44,.92); border: 3px solid #0d0f14; border-radius: 6px;
  display: flex; flex-direction: column; gap: 14px;
}
.b-reward-cells { display: flex; gap: 12px; justify-content: center; min-height: 104px; }
.b-reward-cells .b-rcell { width: 104px; height: 104px; flex-basis: 104px; }
.b-lvups { display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.b-lvrow {
  display: flex; align-items: center; gap: 10px; height: 36px;
  padding: 0 8px; background: rgba(0,0,0,.28); border-radius: 4px; font-size: 17px;
}
.b-lvrow-img { width: 30px; height: 30px; object-fit: contain; }
.b-lvrow-name { width: 120px; font-weight: 700; }
.b-lvrow-lv { width: 130px; }
.b-lvrow .b-expbar { flex: 1; height: 18px; }
.b-lvrow .b-expbar-t { font-size: 12px; line-height: 14px; }
.b-lvup { color: #ffd33c; font-weight: 900; text-shadow: 0 2px 0 #6a3a00; animation: b-blink .6s steps(2) 4; }
@keyframes b-blink { 50% { opacity: .3; } }

.b-conds { position: absolute; left: 1000px; top: 300px; display: flex; flex-direction: column; gap: 10px; }
.b-cond { font-size: 22px; font-weight: 700; color: #8d939b; display: flex; gap: 8px; align-items: center; }
.b-cond.on { color: #ffc457; }
.b-cond-time { font-size: 16px; color: #b9c6cc; margin-top: 4px; }
.b-repeat {
  margin-top: 10px; width: 264px; padding: 6px 6px 6px 10px; box-sizing: border-box;
  background: rgba(20,24,30,.85); border: 2px solid #ffc457; border-radius: 6px;
  display: flex; gap: 8px; align-items: center;
}
.b-repeat-t { flex: 1; font-size: 16px; color: #ffe0a0; line-height: 1.3; white-space: normal; }
.b-repeat .b-btn { min-height: 64px; font-size: 20px; }

.b-result-btns {
  position: absolute; left: 0; right: 0; top: 604px;
  display: flex; justify-content: center; gap: 16px; align-items: flex-end;
}
.b-result-btns > .b-btn { width: 196px; }
.b-foodbtn { position: relative; }
.b-foodbtn .b-btn { width: 214px; }
.b-foodhave {
  position: absolute; left: 50%; top: -46px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 2px 10px;
  background: rgba(30,30,34,.9); border: 2px solid #000; border-radius: 6px; font-size: 17px; font-weight: 700;
}
.b-foodhave .b-btn-ic { width: 28px; height: 28px; }
