/* rescue.css — Missing Persons / Big Rescue (rescue_v2 engine). Phone-first, no scroll. */
@font-face { font-family: "Cinzel Decorative"; src: url("assets/fonts/CinzelDecorative-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Crimson Text"; src: url("assets/fonts/CrimsonText-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Crimson Text"; src: url("assets/fonts/CrimsonText-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #120c08; color: #f3e6d0; font-family: "Crimson Text", Georgia, serif; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body { position: fixed; inset: 0; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- hub ---------- */
.hub { position: absolute; inset: 0; display: flex; flex-direction: column; }
.hub-bg { position: absolute; inset: 0; background: url("assets/town/rooms/room_bounty_desk.png") center 40% / cover no-repeat; filter: brightness(.55) saturate(.9); }
.hub-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, transparent 30%, rgba(10,6,3,.75) 100%); }
.slim-bar { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(6px); padding-top: max(10px, env(safe-area-inset-top)); }
.back-town { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; font-size: 30px; line-height: 1; color: #f3e2b8; background: radial-gradient(#4a3020, #24160c); border: 2px solid #c9a24a; }
.hub-title { flex: 1; margin: 0; font: 700 1.15rem "Cinzel Decorative", Georgia, serif; color: #f3e2b8; text-shadow: 0 2px 0 #3a2410; }
.pills { display: flex; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(20,12,6,.8); border: 1.5px solid #8a6a3a; font-size: .95rem; }
.pill img { width: 18px; height: 18px; }
.hub-body { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 8px 16px 54px; min-height: 0; }
.notice, .lover-card { position: relative; width: min(100%, 420px); padding: 22px 20px 18px; text-align: center; color: #2a1a0c;
  background: linear-gradient(180deg, #f1e2bd, #dcc597); border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.6), inset 0 0 40px rgba(120,80,30,.25); transform: rotate(-.6deg); }
.pin { position: absolute; top: 8px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff7a6a, #9a1a12); box-shadow: 0 2px 3px rgba(0,0,0,.5); }
.notice-kicker { margin: 6px 0 0; font: 700 1.6rem "Cinzel Decorative", Georgia, serif; letter-spacing: .08em; color: #8a1e14; }
.notice-name, .lover-card h3 { margin: 2px 0 0; font-size: 1.7rem; line-height: 1.1; }
.notice-who { margin: 2px 0 8px; font-style: italic; color: #5a3a1e; }
.notice-line { margin: 0 0 10px; font-size: 1.12rem; }
.notice-rule { margin: 6px 0 12px; font-size: 1rem; color: #4a3018; }
.notice-time { margin: 4px 0 8px; font-size: 1.2rem; }
.notice-out { margin: 10px 0 6px; font-size: 1.15rem; font-weight: 700; }
.notice-out.good { color: #1f5a1c; } .notice-out.bad { color: #7a1a12; }
.big-btn { display: block; width: 100%; min-height: 58px; margin: 8px 0 0; padding: 10px 16px; border: 0; border-radius: 12px; font-size: 1.35rem; font-weight: 700; color: #fff6e0;
  background: linear-gradient(180deg, #c0392b, #8a1e14); box-shadow: 0 4px 0 #4a0e08, 0 6px 14px rgba(0,0,0,.4); text-shadow: 0 1px 0 #4a0e08; }
.big-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #4a0e08; }
.wood-btn { display: block; width: 100%; min-height: 46px; margin: 8px 0 0; border: 2px solid #5a3a1c; border-radius: 10px; font-size: 1.05rem; font-weight: 700; color: #f3e2b8; background: linear-gradient(180deg, #7a5230, #4a3018); }
.lover-door { width: min(100%, 420px); min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px solid #c9a24a; border-radius: 12px; color: #f3e2b8;
  background: linear-gradient(180deg, #4a2a3a, #24121c); box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.lover-door b { font: 700 1.2rem "Cinzel Decorative", Georgia, serif; } .lover-door span { font-size: .95rem; opacity: .85; }
.lover-card { transform: none; padding: 14px 14px 12px; }
.lover-banner { display: flex; gap: 12px; align-items: center; text-align: left; }
.lover-banner canvas { width: 34%; max-width: 140px; height: auto; border-radius: 6px; flex: none; }
.lover-text .notice-kicker { font-size: 1rem; margin: 0; }
.lb { list-style: none; margin: 6px 0 4px; padding: 0; text-align: left; font-size: 1rem; }
.lb li { display: flex; gap: 8px; padding: 3px 8px; border-bottom: 1px dashed rgba(90,58,30,.35); }
.lb li span { width: 22px; font-weight: 700; } .lb li b { flex: 1; } .lb li i { font-style: normal; font-weight: 700; }
.lb li.me { background: rgba(201,162,74,.35); border-radius: 4px; }

/* ---------- play ---------- */
.play { position: absolute; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud.top { position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 8px; align-items: flex-start; padding: 8px; padding-top: max(8px, env(safe-area-inset-top)); pointer-events: none; }
.hud-btn { pointer-events: auto; width: 46px; height: 46px; flex: none; border-radius: 12px; border: 2px solid #c9a24a; background: rgba(36,22,12,.88); color: #f3e2b8; font-size: 24px; }
.hud-mid { flex: 1; min-width: 0; max-width: 560px; }
#miniMap { margin-left: auto; }
.hud-row { display: flex; gap: 8px; align-items: center; font-size: .95rem; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.hud-kind { flex: 1; overflow: hidden; text-overflow: ellipsis; font-weight: 700; color: #f3e2b8; }
.hud-clock b, .hud-score b { font-variant-numeric: tabular-nums; }
.hud-score { color: #ffe08a; font-weight: 700; }
.bar { position: relative; height: 16px; margin-top: 4px; border-radius: 8px; background: rgba(0,0,0,.6); border: 1.5px solid #5a3a1c; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #e8574a, #a8261c); transition: width .15s; }
.bar.hp span { position: absolute; left: 8px; top: -1px; font-size: .78rem; font-weight: 700; text-shadow: 0 1px 1px #000; }
.bar.hp em { position: absolute; right: 8px; top: -1px; font-style: normal; font-size: .78rem; font-weight: 700; color: #bff0bf; text-shadow: 0 1px 1px #000; }
.bar.xp { height: 14px; margin-top: 3px; border-color: #3a5a2a; } .bar.xp i { background: linear-gradient(180deg, #9ae07a, #4e9a3a); }
.bar.xp em { position: absolute; left: 8px; top: -2px; font-style: normal; font-size: .76rem; font-weight: 800; color: #fff; text-shadow: 0 1px 1px #000; }
.bar.hp.regen i { background: linear-gradient(180deg, #ff8a6a, #c8402c); box-shadow: inset 0 0 6px rgba(160,255,160,.8); }
#miniMap { width: 72px; height: 72px; flex: none; border: 2px solid #c9a24a; border-radius: 6px; }
.boss-bar { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); width: min(80%, 380px); text-align: center; pointer-events: none; text-shadow: 0 1px 2px #000; }
.boss-bar b { font: 700 .95rem "Cinzel Decorative", Georgia, serif; color: #ffd0b0; } .boss-bar .bar i { background: linear-gradient(180deg, #b04ad0, #6a1a8a); }
.room-tag { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; max-width: calc(100% - 150px); padding: 6px 12px; border-radius: 10px; background: rgba(20,12,6,.78); border: 1px solid #6a4a2a;
  font-size: .95rem; text-align: center; pointer-events: none; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
.chips { position: absolute; left: 8px; bottom: 60px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.chip { padding: 3px 9px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: rgba(20,12,6,.8); border: 1.5px solid #8a6a3a; }
.chip.frenzy { border-color: #ff7a2a; color: #ffb07a; } .chip.boost { border-color: #6ab0ff; color: #b8dcff; } .chip.wind { border-color: #9df09d; color: #c8f7c8; }
.sup-open { position: absolute; right: 10px; bottom: 12px; min-width: 112px; min-height: 54px; border-radius: 14px; border: 2px solid #c9a24a; font-size: 1.15rem; font-weight: 700; color: #fff6e0;
  background: linear-gradient(180deg, #7a5230, #4a3018); box-shadow: 0 4px 0 #24160c; margin-bottom: env(safe-area-inset-bottom); }

/* ---------- sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(6,4,2,.66); }
.sheet-card { width: min(100%, 420px); max-height: calc(100% - 20px); overflow: auto; padding: 18px 18px 14px; text-align: center; color: #2a1a0c; background: linear-gradient(180deg, #f3e6c4, #dcc597); border-radius: 10px; border: 3px solid #7a5230; box-shadow: 0 14px 40px rgba(0,0,0,.7); }
.sh-title { margin: 2px 0 6px; font: 700 1.45rem "Cinzel Decorative", Georgia, serif; color: #5a1a10; }
.sheet.good .sh-title { color: #1f5a1c; }
.sh-line { margin: 4px 0 10px; font-size: 1.12rem; } .sh-small { margin: 2px 0 8px; font-size: .95rem; color: #5a3a1e; } .sh-score { font-size: 1.05rem; }
.sh-face { width: 110px; height: 122px; object-fit: cover; border: 3px solid #5a3a1c; border-radius: 4px; filter: sepia(.3); }
.sh-teaser { width: 120px; height: auto; border-radius: 6px; }
.loot { list-style: none; display: flex; justify-content: center; gap: 10px; padding: 0; margin: 6px 0 8px; }
.loot li { display: flex; flex-direction: column; align-items: center; width: 82px; padding: 6px; border-radius: 10px; background: rgba(255,255,255,.4); border: 1.5px solid #a07a40; }
.loot img { width: 46px; height: 46px; } .loot b { font-size: 1.2rem; }
.sup-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 58px; margin: 6px 0 0; padding: 6px 12px; text-align: left; border-radius: 12px; border: 2px solid #7a5230; background: #fff4da; color: #2a1a0c; }
.sup-btn span { display: flex; flex-direction: column; } .sup-btn b { font-size: 1.12rem; } .sup-btn small { font-size: .9rem; color: #5a3a1e; }
.sup-btn:disabled { opacity: .5; }
.sup-price { font-style: normal; font-weight: 700; white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: #2a1a0c; color: #ffe9a8; }
.sup-row .tale-btn { width: 100%; min-height: 54px; justify-content: center; font-size: 1.05rem; }
.sup-note { margin: 6px 0; font-size: .95rem; color: #5a3a1e; }
.fb { margin: 10px 0 2px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.35); }
.fb p { margin: 0 0 4px; font-weight: 700; }
.fb-row { display: flex; gap: 12px; justify-content: center; }
.fb-btn { width: 74px; height: 58px; font-size: 30px; border-radius: 12px; border: 2px solid #7a5230; background: #fff4da; }
.fb-btn.on { background: #ffd86a; border-color: #8a1e14; transform: scale(1.05); }
.fb textarea { width: 100%; margin-top: 8px; padding: 6px 8px; font: inherit; font-size: 1rem; border-radius: 8px; border: 1.5px solid #a07a40; resize: none; }

.toast { position: fixed; left: 50%; top: 110px; z-index: 30; transform: translateX(-50%); margin: 0; max-width: 90%; padding: 8px 16px; border-radius: 12px; background: rgba(20,12,6,.92); border: 1.5px solid #c9a24a; color: #f3e2b8; font-size: 1.02rem; text-align: center; pointer-events: none; }

.dev-drawer { position: fixed; left: 6px; bottom: 6px; z-index: 40; max-width: 230px; border: 1px dashed #3a4255; border-radius: 8px; background: rgba(14,16,24,.88); color: #8b93a7; font-size: .78rem; }
.dev-drawer summary { cursor: pointer; padding: 3px 9px; font-family: ui-monospace, monospace; font-size: .7rem; list-style: none; }
.dev-drawer summary::-webkit-details-marker { display: none; }
.dev-body { display: flex; flex-direction: column; gap: 4px; padding: 6px; }
.dev-body button { padding: 5px 8px; font-size: .78rem; border-radius: 6px; border: 1px solid #3a4255; background: #1c2030; color: #c8cfdf; text-align: left; }
body.on-play .dev-drawer { bottom: auto; top: 110px; left: 4px; opacity: .7; }

/* ---------- level-up choice (rescue_v2): two big buttons, no scroll ---------- */
.sheet.lvl .sheet-card { background: linear-gradient(180deg, #2a3a22, #18240f); border-color: #9ae07a; color: #f3e6d0; }
.sheet.lvl .sh-title { color: #e8f7d0; margin-bottom: 10px; }
.lv-kicker { margin: 0; font: 700 1.5rem "Cinzel Decorative", Georgia, serif; color: #ffe08a; text-shadow: 0 2px 0 #000; }
.lv-row { display: flex; gap: 10px; }
.lv-btn { flex: 1; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 6px; border-radius: 14px; border: 2px solid #c9a24a;
  color: #fff6e0; background: linear-gradient(180deg, #7a5230, #4a3018); box-shadow: 0 5px 0 #24160c; }
.lv-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #24160c; }
.lv-btn i { font-style: normal; font-size: 2.2rem; line-height: 1; } .lv-btn b { font-size: 1.35rem; } .lv-btn small { font-size: .92rem; opacity: .9; }

/* v5_left1: zone banner (rooms.json zone_banner) */
.zone-banner { position: absolute; left: 50%; top: 22%; z-index: 25; transform: translateX(-50%); pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 26px; border-radius: 10px; background: rgba(20,12,6,.82); border: 2px solid #c9a24a; color: #f3e2b8; text-align: center; opacity: 0; white-space: nowrap; }
.zone-banner b { font-size: 1.35rem; letter-spacing: .04em; }
.zone-banner span { font-size: .8rem; opacity: .8; text-transform: uppercase; letter-spacing: .12em; }
.zone-banner.show { animation: zoneIn 2.8s ease forwards; }
@keyframes zoneIn { 0% { opacity: 0; transform: translate(-50%, -8px); } 12% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; } 100% { opacity: 0; } }
