.adventure-launch {
  display: flex;
  align-items: center;
  gap: 11px;
  width: min(340px, 92%);
  min-height: 54px;
  margin: 16px auto 0;
  padding: 7px 13px;
  border: 1px solid #f0c9dc;
  border-radius: 18px;
  background: #fff9fc;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.adventure-launch-mark { display:grid;place-items:center;width:42px;height:36px;border-radius:13px;background:#fbe5ef;color:#bd4d84;font-size:11px;font-weight:800; }
.adventure-launch strong,.adventure-launch small { display:block; }
.adventure-launch strong { font-size:14px; }
.adventure-launch small { margin-top:2px;color:var(--mute);font-size:11px; }
.adventure-launch-arrow { margin-left:auto;color:#bd4d84;font-size:26px;line-height:1; }

.adventure-screen[hidden] { display:none; }
html.adventure-open,html.adventure-open body { overflow:hidden; }
.adventure-screen {
  position:fixed;inset:0;z-index:120;display:flex;flex-direction:column;
  background:#1b1520;color:#f7eef3;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow:hidden;touch-action:none;
}
.adventure-topbar { flex:0 0 62px;display:flex;align-items:center;gap:10px;padding:0 clamp(10px,2vw,28px);background:#131018;border-bottom:1px solid #2c2432; }
.adventure-sound { display:grid;place-items:center;width:54px;height:40px;border:0;border-radius:20px;background:#2a2230;color:#f3c6dc;font-size:10px;font-weight:700;white-space:nowrap;cursor:pointer; }
.adventure-title { display:grid;gap:1px;min-width:110px; }
.adventure-title span { color:#9b8ea4;font-size:10px;letter-spacing:.08em; }
.adventure-title strong { font-size:15px; }
.player-hp { display:flex;gap:5px;margin-left:auto; }
.player-hp i { width:14px;height:14px;border-radius:4px;background:#3a303f;box-shadow:inset 0 0 0 1px #5a4a58; }
.player-hp i.is-on { background:#e45d7a;box-shadow:none; }
.player-hp.is-flash { filter:brightness(1.45); }
.adventure-progress-group { display:flex;align-items:center;gap:10px; }
.adventure-coins { display:flex;align-items:center;gap:5px;color:#f3ddb3;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap; }
.adventure-coins img { width:20px;height:20px;object-fit:contain; }

.battle-board { position:relative;flex:1;min-height:0;background:radial-gradient(ellipse at 50% 18%,#3a2b44 0 18%,transparent 46%),linear-gradient(#241b2b,#161218 58%,#2a2230); }
.enemy-area {
  position:absolute;left:8%;right:8%;top:8%;height:46%;
  display:flex;align-items:flex-end;justify-content:center;gap:clamp(16px,4vw,48px);
}
.enemy-unit { position:relative;display:flex;flex-direction:column;align-items:center;width:min(180px,28vw);transition:transform .18s ease; }
.enemy-unit.is-target { transform:translateY(-8px) scale(1.04); }
.enemy-highlight {
  display:none;position:absolute;inset:0 auto auto 0;width:100%;aspect-ratio:3/5;border-radius:18px;
  box-shadow:0 0 0 4px #ff4d4d, 0 0 18px #ff4d4d88;pointer-events:none;
}
.enemy-unit.is-target .enemy-highlight { display:block; }
.enemy-placeholder {
  position:relative;overflow:hidden;
  width:100%;aspect-ratio:3/5;border-radius:18px 18px 22px 22px;
  background:linear-gradient(180deg,#6d4d63,#3e2a38);
  box-shadow:0 10px 0 #120c14;
}
.enemy-placeholder.is-flash { filter:brightness(1.45); }
.enemy-placeholder.is-flash::after {
  content:"";position:absolute;inset:0;border-radius:inherit;
  background:rgba(255,89,89,.48);pointer-events:none;
}
.enemy-unit.is-elite .enemy-placeholder { background:linear-gradient(180deg,#8a5a3a,#4a2c22);width:108%; }
.enemy-prompt {
  position:absolute;top:10%;left:8%;right:8%;text-align:center;
  font:800 clamp(18px,2.4vw,28px)/1.1 ui-monospace,monospace;color:#fffdf8;
  text-shadow:0 2px 0 #2a1620;
}
.enemy-hp {
  position:relative;width:180px;max-width:100%;height:32px;margin-top:10px;border-radius:6px;overflow:hidden;
  background:#4a3944;box-shadow:inset 0 0 0 2px #2b1f28;
}
.enemy-hp::before {
  content:"";position:absolute;left:4px;right:8px;top:11px;bottom:16px;border-radius:2px;
  background:#c4454a;transform-origin:left center;transform:scaleX(var(--hp,1));
}
.enemy-hp span {
  position:relative;z-index:1;display:grid;place-items:center;height:100%;
  font:700 13px ui-monospace,monospace;color:#fff;text-shadow:0 1px 2px #000;
}

.hand-area { position:absolute;left:0;right:0;bottom:0;height:42%;pointer-events:none; }
.answer-card {
  position:absolute;pointer-events:auto;border:0;border-radius:14px;
  background:linear-gradient(180deg,#fffaf4,#f1e0c8);color:#4a3428;
  font:800 28px/1 ui-monospace,monospace;box-shadow:0 8px 0 #b89a72;
  cursor:grab;touch-action:none;user-select:none;transform-origin:50% 50%;
}
.answer-card.is-hover { box-shadow:0 14px 0 #b89a72, 0 18px 22px #0005; }
.answer-card.is-dragging { cursor:grabbing;box-shadow:0 16px 24px #0006; }
.target-arrow { display:none;position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:90;overflow:visible; }
.target-arrow.is-on { display:block; }
.target-arrow path { fill:none;stroke:#ff4d4d;stroke-width:10;stroke-linecap:round;stroke-linejoin:round; }
.target-arrow polygon { fill:#ff4d4d; }

.battle-banner {
  position:absolute;inset:18% 12%;z-index:40;display:grid;place-content:center;gap:10px;text-align:center;
  padding:24px;border-radius:24px;background:#fffaf6;color:#3f3342;border:1px solid #ead7c2;
}
.battle-banner[hidden] { display:none; }
.battle-banner h2 { margin:0;font-size:22px; }
.battle-banner p { margin:0;color:#74656c;font-size:14px; }
.adventure-next { margin-top:8px;padding:10px 16px;border:0;border-radius:14px;background:#f3dfeb;color:#854b6d;font-weight:700;cursor:pointer; }

@media (orientation: portrait) {
  .adventure-topbar { flex-basis:56px;gap:8px;padding:0 10px; }
  .adventure-title { min-width:auto; }
  .player-hp i { width:12px;height:12px; }
  .enemy-area { left:4%;right:4%;top:6%;height:50%;gap:0; }
  .enemy-unit { width:min(118px,30vw);margin:0 -8px; }
  .enemy-placeholder { aspect-ratio:2/5;border-radius:14px; }
  .enemy-prompt { font-size:clamp(16px,5vw,22px);top:8%; }
  .enemy-highlight { aspect-ratio:2/5;border-radius:14px; }
  .enemy-hp { width:100%;height:26px;margin-top:8px; }
  .enemy-hp::before { top:8px;bottom:12px;left:3px;right:6px; }
  .hand-area { height:38%;padding-bottom:env(safe-area-inset-bottom); }
  .answer-card { font-size:24px;border-radius:12px; }
}

@media (orientation: landscape) and (max-height: 430px) {
  .enemy-area { height:44%;top:6%; }
  .enemy-unit { width:min(140px,22vw); }
  .enemy-prompt { font-size:18px; }
  .hand-area { height:46%; }
}

@media (prefers-reduced-motion: reduce) {
  .enemy-unit { transition:none; }
  .answer-card { transition:none; }
}
