/* JOGJA UNLOCKED — styles (ENGLISH YO!) */
:root{
  --purple:#7b5cc4; --purple-d:#4f3597; --purple-l:#e9e0fb;
  --cream:#fff8ea; --cream-2:#fdeccb; --gold:#f2b632; --gold-d:#c98f12;
  --pink:#ff6f91; --green:#46c06a; --green-d:#2f9a4e; --blue:#3b8de0; --orange:#ff8a2a;
  --ink:#3a2c52; --ink-2:#6a5a86; --sky:#bfe3ff; --bad:#d9534f; --good:#2e9d57;
  --r:22px; --shadow:0 10px 24px rgba(79,53,151,.22), 0 2px 0 rgba(255,255,255,.7) inset;
  --font: ui-rounded, "Nunito", "Segoe UI Rounded", "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0}
body{font-family:var(--font); color:var(--ink); background:#bfe3ff; min-height:100dvh; font-size:17px; line-height:1.5; -webkit-text-size-adjust:100%}
img{max-width:100%; display:block}
button{font-family:inherit; font-size:inherit; color:inherit; cursor:pointer}
.sr{position:absolute!important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}
.skip{position:absolute; left:-999px; top:8px; background:#fff; padding:8px 14px; border-radius:12px; z-index:100}
.skip:focus{left:8px}
h1:focus,h2:focus,#mTitle:focus,[tabindex="-1"]:focus{outline:none}
:focus-visible{outline:3px solid var(--purple-d); outline-offset:3px; border-radius:10px}
[hidden]{display:none!important}

/* ---------- backdrop ---------- */
.bg{position:fixed; inset:0; z-index:-1; background:#bfe3ff url('../assets/derived/background/map_jogja_small.webp') center/cover; filter:saturate(1.05)}
.bg::after{content:""; position:absolute; inset:0; background:linear-gradient(180deg,rgba(255,248,234,.55),rgba(233,224,251,.75)); backdrop-filter:blur(7px)}
body.is-title .bg::after{background:linear-gradient(180deg,rgba(191,227,255,.05),rgba(255,248,234,.45)); backdrop-filter:none}
body.is-title .bg{background-image:url('../assets/derived/background/map_jogja.webp')}

/* ---------- HUD ---------- */
.hud{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:10px clamp(10px,2.5vw,24px); position:sticky; top:0; z-index:20;
  background:rgba(255,248,234,.88); backdrop-filter:blur(8px); border-bottom:2px solid rgba(242,182,50,.5)}
.hud-label{font-size:.75rem; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-2)}
.hud-stats{display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.chip{display:inline-flex; align-items:center; gap:6px; padding:4px 12px; min-height:40px; background:#fff; border:2px solid var(--gold); border-radius:999px; font-weight:700; box-shadow:0 2px 0 var(--gold-d)}
.chip-btn{background:var(--purple-l); border-color:var(--purple); box-shadow:0 2px 0 var(--purple-d); font-weight:800}
.chip-btn:hover{transform:translateY(-1px)}

/* ---------- screen shell ---------- */
main{display:block; min-height:calc(100dvh - 70px); padding:clamp(12px,3vw,28px); outline:none}
.screen{max-width:1180px; margin:0 auto; animation:screenIn .45s ease both}
@keyframes screenIn{from{opacity:0; transform:translateY(14px) scale(.985)} to{opacity:1; transform:none}}
h1,h2,h3{margin:.1em 0 .3em; line-height:1.15}
h2{font-size:clamp(1.5rem,3.6vw,2.1rem)}
.lead{font-size:1.1rem; color:var(--ink-2)}

.panel{background:var(--cream); border:4px solid var(--purple); border-radius:var(--r); box-shadow:var(--shadow); padding:clamp(14px,2.6vw,26px); position:relative}
.panel::before{content:""; position:absolute; inset:5px; border:2px solid var(--gold); border-radius:calc(var(--r) - 8px); pointer-events:none; opacity:.8}

/* ---------- buttons ---------- */
.btn-sprite{display:inline-block; border:0; background:none; padding:0; line-height:0; transition:transform .15s ease, filter .15s ease; filter:drop-shadow(0 6px 6px rgba(79,53,151,.3))}
.btn-sprite img{height:clamp(54px,9vw,64px); width:auto}
.btn-sprite:hover:not(:disabled){transform:translateY(-3px) scale(1.04)}
.btn-sprite:active:not(:disabled){transform:translateY(1px) scale(.98)}
.btn-sprite:disabled{filter:grayscale(1) opacity(.5); cursor:not-allowed}
.btn{border:3px solid var(--gold); background:linear-gradient(#fff,#ffeec7); color:var(--ink); font-weight:800; padding:10px 20px; min-height:46px; border-radius:999px; box-shadow:0 4px 0 var(--gold-d); transition:transform .15s}
.btn:hover:not(:disabled){transform:translateY(-2px)}
.btn:active:not(:disabled){transform:translateY(2px); box-shadow:0 1px 0 var(--gold-d)}
.btn:disabled{opacity:.5; cursor:not-allowed}
.btn.purple{background:linear-gradient(#9a7fe0,#7b5cc4); border-color:var(--gold); color:#fff; box-shadow:0 4px 0 var(--purple-d)}
.btn.danger{background:linear-gradient(#ffb1ad,#ef6f69); border-color:#fff; color:#fff; box-shadow:0 4px 0 #b13b36}
.linklike{background:none; border:0; text-decoration:underline; color:inherit; padding:4px 6px; min-height:32px}
.row{display:flex; gap:12px; flex-wrap:wrap; align-items:center}
.row.center{justify-content:center}

/* ---------- title ---------- */
.title-wrap{min-height:calc(100dvh - 110px); display:grid; place-items:center; text-align:center}
.title-card{max-width:640px; padding:clamp(20px,4vw,40px); background:rgba(255,248,234,.92); border:4px solid var(--purple); border-radius:32px; box-shadow:0 16px 40px rgba(79,53,151,.3); position:relative}
.title-card::before{content:""; position:absolute; inset:6px; border:2px solid var(--gold); border-radius:26px; pointer-events:none}
.presented{font-size:.78rem; letter-spacing:.2em; text-transform:uppercase; color:var(--ink-2); font-weight:800}
.logo{font-size:clamp(2.6rem,9vw,5rem); font-weight:900; letter-spacing:.02em; margin:.1em 0 0; line-height:1;
  color:#fff; background:linear-gradient(#ffd45a,#f2a21b); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
  -webkit-text-stroke:0; filter:drop-shadow(0 3px 0 var(--purple-d)) drop-shadow(0 6px 6px rgba(79,53,151,.35))}
.logo-sub{font-size:clamp(1.1rem,3vw,1.5rem); font-weight:800; color:var(--purple-d); margin:.1em 0 .5em}
.tagline{font-style:italic; color:var(--ink-2); margin:0 0 1.2em}
.title-pin{position:absolute; width:64px; right:-18px; top:-24px; animation:float 2.8s ease-in-out infinite}
@keyframes float{50%{transform:translateY(-8px)}}
.save-note{font-size:.85rem; color:var(--ink-2); margin-top:10px}

/* ---------- agent select ---------- */
.agent-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:clamp(8px,2vw,18px); margin:18px 0; border:0; padding:0}
.agent-card{display:block; position:relative; cursor:pointer}
.agent-card input{position:absolute; opacity:0; inset:0; cursor:pointer; z-index:2}
.agent-card input:focus-visible + .card{outline:3px solid var(--purple-d); outline-offset:3px}
.field{display:flex; flex-direction:column; gap:6px; max-width:360px}
.field input[type=text]{padding:12px 14px; border:3px solid var(--purple-l); border-radius:16px; font:inherit; background:#fff}
.field input[type=text]:focus{border-color:var(--purple); outline:none; box-shadow:0 0 0 3px rgba(123,92,196,.25)}

/* ---------- dialogue scenes ---------- */
.scene{display:grid; grid-template-columns:minmax(150px,300px) 1fr; gap:clamp(8px,3vw,32px); align-items:end; min-height:min(70dvh,560px)}
.scene.flip{grid-template-columns:1fr minmax(150px,300px)} .scene.flip .actor{order:2}
.actor{position:relative; display:flex; justify-content:center}
.actor img{max-height:min(56dvh,460px); width:auto; filter:drop-shadow(0 12px 10px rgba(79,53,151,.3))}
.actor .shadow{position:absolute; bottom:-6px; left:20%; right:20%; height:16px; background:radial-gradient(rgba(79,53,151,.3),transparent 70%)}
.enter-left{animation:enterL .7s cubic-bezier(.2,.8,.2,1) both}
.enter-right{animation:enterR .7s cubic-bezier(.2,.8,.2,1) both}
@keyframes enterL{from{opacity:0; transform:translateX(-70px)} to{opacity:1; transform:none}}
@keyframes enterR{from{opacity:0; transform:translateX(70px)} to{opacity:1; transform:none}}
.bubble{background:var(--cream); border:4px solid var(--purple); border-radius:26px; padding:clamp(16px,3vw,28px); position:relative; box-shadow:var(--shadow); min-height:150px; display:flex; flex-direction:column; gap:12px}
.bubble::after{content:""; position:absolute; left:-22px; bottom:34px; border:14px solid transparent; border-right:22px solid var(--purple); border-left:0}
.scene.flip .bubble::after{left:auto; right:-22px; border-right:0; border-left:22px solid var(--purple)}
.speaker{display:inline-block; align-self:flex-start; background:var(--purple); color:#fff; font-weight:800; padding:2px 14px; border-radius:999px; font-size:.9rem}
.bubble p{margin:0; font-size:clamp(1.1rem,2.6vw,1.35rem)}
.bubble .row{margin-top:auto; justify-content:flex-end}
.dots{display:flex; gap:6px}
.dots i{width:10px; height:10px; border-radius:50%; background:var(--purple-l)} .dots i.on{background:var(--purple)}

/* ---------- mission card ---------- */
.mission-grid{display:grid; grid-template-columns:minmax(140px,240px) 1fr; gap:clamp(12px,3vw,32px); align-items:center}
.mission-grid .portrait img{max-height:360px; margin:auto; filter:drop-shadow(0 10px 8px rgba(79,53,151,.3))}
.kv{display:grid; grid-template-columns:auto 1fr; gap:6px 14px; margin:12px 0}
.kv dt{font-weight:800; color:var(--purple-d)} .kv dd{margin:0}
.tag{display:inline-block; padding:2px 12px; border-radius:999px; font-size:.9rem; font-weight:700; margin:2px 4px 2px 0; background:var(--purple-l); color:var(--purple-d)}
.tag.love{background:#d6f5df; color:#1f6f3a} .tag.hate{background:#ffdede; color:#a1302c}

/* ---------- map screen ---------- */
.map-layout{display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:clamp(12px,2vw,22px); align-items:start}
.map-wrap{position:relative; width:100%; aspect-ratio:1672/941; border-radius:28px; overflow:hidden; border:5px solid #fff; box-shadow:0 14px 34px rgba(79,53,151,.35); background:var(--sky)}
.map-wrap > img{width:100%; height:100%; object-fit:cover}
.pin{position:absolute; transform:translate(-50%,-100%); background:none; border:0; padding:0; display:flex; flex-direction:column; align-items:center; gap:2px; z-index:2}
.pin img{width:clamp(34px,5.6vw,58px); height:auto; filter:drop-shadow(0 4px 3px rgba(0,0,0,.3)); transition:transform .2s}
.pin:hover img,.pin:focus-visible img{transform:translateY(-4px) scale(1.12)}
.pin span.lbl{background:rgba(255,248,234,.95); border:2px solid var(--gold); border-radius:999px; padding:0 10px; font-weight:800; font-size:clamp(.62rem,1.5vw,.85rem); white-space:nowrap; color:var(--ink)}
.pin.active::before{content:""; position:absolute; top:0; width:clamp(34px,5.6vw,58px); height:clamp(34px,5.6vw,58px); border-radius:50%; border:3px solid var(--pink); animation:pulse 1.8s ease-out infinite; pointer-events:none}
@keyframes pulse{from{transform:scale(.8); opacity:.9} to{transform:scale(2.1); opacity:0}}
.pin.locked img{filter:grayscale(1) brightness(1.1) opacity(.75)} .pin.locked .lbl{opacity:.8; color:var(--ink-2); border-color:#c9c1d8}
.side{display:flex; flex-direction:column; gap:14px}
.side h3{font-size:1.15rem; margin:0 0 6px}
.checklist{list-style:none; margin:0; padding:0; display:grid; gap:6px}
.checklist li{display:flex; align-items:center; gap:10px; padding:6px 10px; border-radius:14px; background:#fff; border:2px solid var(--purple-l)}
.checklist li.done{border-color:#9bdcb0; background:#effcf2}
.tick{width:22px; height:22px; border-radius:50%; border:2px solid var(--purple-l); display:grid; place-items:center; font-size:.8rem; font-weight:900; flex:none; background:#fff}
.done .tick{background:var(--green); border-color:var(--green-d); color:#fff}
.dest-list{display:grid; gap:8px}
.dest-btn{display:flex; align-items:center; gap:10px; text-align:left; padding:8px 10px; background:#fff; border:3px solid var(--purple-l); border-radius:16px; transition:transform .15s, border-color .15s}
.dest-btn:hover{transform:translateX(3px); border-color:var(--purple)}
.dest-btn img{width:54px; height:44px; object-fit:contain}
.dest-btn small{display:block; color:var(--ink-2)}
.dest-btn.locked{opacity:.65}
.hint{background:#fff; border:2px dashed var(--gold); border-radius:16px; padding:8px 12px; font-size:.95rem}
.mini-tourist{display:flex; gap:10px; align-items:center}
.mini-tourist img{width:64px; height:auto; flex:none}

/* ---------- modals ---------- */
.overlay{position:fixed; inset:0; background:rgba(58,44,82,.55); z-index:50; display:flex; align-items:center; justify-content:center; padding:clamp(8px,2vw,24px); animation:fade .25s ease}
@keyframes fade{from{opacity:0}}
.modal{background:var(--cream); border:5px solid var(--purple); border-radius:28px; width:min(1060px,100%); max-height:calc(100dvh - 16px); overflow:auto; position:relative; padding:clamp(14px,2.6vw,28px); animation:pop .3s cubic-bezier(.2,.9,.3,1.2); box-shadow:0 20px 50px rgba(0,0,0,.35)}
.modal.sm{width:min(520px,100%)}
@keyframes pop{from{opacity:0; transform:scale(.92) translateY(14px)}}
.modal-close{position:absolute; top:10px; right:10px; width:44px; height:44px; border-radius:50%; border:3px solid var(--gold); background:#fff; font-weight:900; font-size:1.1rem; z-index:3}
.modal h2{padding-right:50px}
.dest-hero{display:grid; grid-template-columns:minmax(140px,300px) 1fr; gap:20px; align-items:center}
.dest-hero img{max-height:280px; margin:auto; filter:drop-shadow(0 10px 8px rgba(0,0,0,.2))}

/* ---------- research desk ---------- */
.desk{display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:clamp(12px,2vw,22px); margin-top:8px}
.tabs{display:flex; gap:6px; margin-bottom:10px; flex-wrap:wrap}
.tab{padding:8px 16px; border-radius:16px 16px 0 0; border:3px solid var(--purple-l); border-bottom:0; background:#fff; font-weight:800; min-height:44px}
.tab[aria-selected=true]{background:var(--purple); border-color:var(--purple); color:#fff}
.passage{background:#fff; border:3px solid var(--purple-l); border-radius:0 20px 20px 20px; padding:16px 18px; position:relative}
.passage h3{display:flex; align-items:center; gap:10px; font-size:1.25rem}
.passage h3 img{width:56px; height:auto}
.passage p{margin:.5em 0; font-size:1.06rem; line-height:1.65}
.gloss{background:linear-gradient(transparent 62%,#ffe08a 62%); border:0; padding:0 1px; font:inherit; color:inherit; cursor:help; border-radius:3px}
.gloss:hover,.gloss:focus-visible{background:#ffd45a}
.gloss-bar{min-height:44px; margin-top:8px; padding:8px 12px; border-radius:14px; background:var(--purple-l); font-size:.95rem}
.stepper{display:flex; gap:8px; margin-bottom:10px; flex-wrap:wrap}
.step{display:flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px; border:3px solid var(--purple-l); background:#fff; font-weight:800; min-height:42px}
.step[aria-current=true]{border-color:var(--purple); background:var(--purple-l)}
.step.done{border-color:#9bdcb0; background:#effcf2} .step.bad{border-color:#f2b3ad; background:#fff0ee}
.step:disabled{opacity:.55; cursor:not-allowed}
.skill{display:inline-block; font-size:.8rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--purple-d); background:var(--purple-l); padding:2px 10px; border-radius:999px}
.q{border:0; padding:0; margin:10px 0}
.q legend{font-weight:800; font-size:1.1rem; padding:0; margin-bottom:8px}
.opt{display:block; position:relative; margin:8px 0}
.opt input{position:absolute; opacity:0; inset:0; cursor:pointer; z-index:2; width:100%; height:100%; margin:0}
.opt span{display:flex; gap:10px; align-items:flex-start; padding:10px 14px; border:3px solid var(--purple-l); border-radius:16px; background:#fff; transition:border-color .15s, transform .15s}
.opt span::before{content:attr(data-k); flex:none; width:28px; height:28px; border-radius:50%; background:var(--purple-l); color:var(--purple-d); font-weight:900; display:grid; place-items:center; font-size:.9rem}
.opt:hover span{border-color:var(--purple); transform:translateX(2px)}
.opt input:checked + span{border-color:var(--purple); background:#f3ecff; box-shadow:0 0 0 3px rgba(123,92,196,.25)}
.opt input:checked + span::before{background:var(--purple); color:#fff}
.opt input:focus-visible + span{outline:3px solid var(--purple-d); outline-offset:2px}
.opt input:disabled{cursor:default}
.opt.right span{border-color:var(--good); background:#effcf2} .opt.right span::before{background:var(--good); color:#fff; content:"\2713"}
.opt.wrong span{border-color:var(--bad); background:#fff0ee} .opt.wrong span::before{background:var(--bad); color:#fff; content:"\2715"}
.feedback{margin-top:10px; padding:12px 14px; border-radius:16px; border:3px solid; font-weight:600; animation:pop .3s}
.feedback.ok{border-color:var(--good); background:#effcf2} .feedback.no{border-color:#e0958f; background:#fff4f2}
.locked-note{padding:18px; text-align:center; border:3px dashed var(--purple-l); border-radius:18px; color:var(--ink-2)}
.notes-card{background:#fffdf3; border:3px solid var(--gold); border-radius:18px; padding:10px 14px}
.notes-card ul{margin:6px 0 0; padding-left:1.2em} .notes-card li{margin:4px 0}

/* ---------- recommend ---------- */
.rec-grid{display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); gap:clamp(12px,2.4vw,24px)}
.place-pick{display:grid; grid-template-columns:1fr 1fr; gap:12px; border:0; padding:0; margin:0}
.place-opt{position:relative; display:block}
.place-opt input{position:absolute; opacity:0; inset:0; width:100%; height:100%; margin:0; z-index:2; cursor:pointer}
.place-opt .pc{display:flex; flex-direction:column; align-items:center; text-align:center; padding:10px; border:4px solid var(--purple-l); border-radius:22px; background:#fff; transition:transform .2s, border-color .2s; height:100%}
.place-opt:hover .pc{transform:translateY(-4px)}
.place-opt input:checked + .pc{border-color:var(--gold); background:linear-gradient(#fff,#fff1cf); box-shadow:0 0 0 4px rgba(242,182,50,.35)}
.place-opt input:focus-visible + .pc{outline:3px solid var(--purple-d); outline-offset:3px}
.place-opt img{height:clamp(80px,16vw,140px); width:auto; object-fit:contain}
.place-opt b{font-size:1.1rem}
.emma-react{display:grid; grid-template-columns:90px 1fr; gap:12px; align-items:end; margin-top:12px}
.emma-react img{width:90px; height:auto}
.emma-react .bubble{min-height:0; padding:12px 16px} .emma-react .bubble::after{bottom:20px}
.shake{animation:wobble .5s}
@keyframes wobble{20%{transform:rotate(-3deg)} 40%{transform:rotate(3deg)} 60%{transform:rotate(-2deg)} 80%{transform:rotate(2deg)}}

/* ---------- reaction / rewards ---------- */
.bounce{animation:bounce .9s ease 2}
@keyframes bounce{40%{transform:translateY(-22px)} 70%{transform:translateY(0)} 85%{transform:translateY(-8px)}}
.meter{display:flex; align-items:center; gap:8px; margin:10px 0}
.meter img{width:44px; height:auto}
.meter .segs{display:flex; gap:4px; flex:1; background:#fff; border:3px solid var(--gold); border-radius:999px; padding:4px}
.meter .seg{flex:1; height:18px; border-radius:8px; background:#e5e0ee; transition:background .4s}
.meter .seg.on{background:linear-gradient(#9be86d,#46c06a)}
.reward{text-align:center}
.reward-top{display:flex; justify-content:center; align-items:center; gap:16px; flex-wrap:wrap; margin:6px 0 12px}
.stars-row{display:flex; justify-content:center; gap:8px; margin:6px 0}
.stars-row img{width:clamp(48px,11vw,72px); height:auto; opacity:.22; filter:grayscale(1); transform:scale(.6)}
.stars-row img.on{opacity:1; filter:none; animation:starIn .6s cubic-bezier(.2,.9,.3,1.5) both}
@keyframes starIn{from{transform:scale(0) rotate(-120deg)} to{transform:scale(1) rotate(0)}}
.coin-count{display:inline-flex; align-items:center; gap:8px; font-size:1.8rem; font-weight:900; color:var(--gold-d)}
.coin-count img{width:44px; height:auto; animation:spin 2.4s ease-in-out infinite}
@keyframes spin{50%{transform:rotateY(180deg)}}
.stamp-drop{width:clamp(110px,22vw,170px); margin:0 auto; animation:stampIn .8s cubic-bezier(.2,.9,.3,1.3) .5s both; transform-origin:center}
@keyframes stampIn{from{opacity:0; transform:scale(2.6) rotate(-18deg)} to{opacity:1; transform:rotate(-6deg)}}
.rank-up{display:inline-block; background:var(--purple); color:#fff; font-weight:900; padding:4px 16px; border-radius:999px; animation:pop .5s .9s both}
table.score{margin:10px auto; border-collapse:collapse; width:min(100%,440px); text-align:left}
table.score td{padding:5px 8px; border-bottom:2px dotted var(--purple-l)} table.score td:last-child{text-align:right; font-weight:800}
table.score tr:last-child td{border-bottom:0; font-size:1.1rem; color:var(--purple-d)}

/* ---------- passport ---------- */
.passport{display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:12px}
.slot{aspect-ratio:1; border:3px dashed #cfc5e3; border-radius:18px; display:grid; place-items:center; text-align:center; padding:6px; color:var(--ink-2); background:#fff; font-weight:700}
.slot.got{border-style:solid; border-color:var(--gold); background:#fffaf0; color:var(--ink)}
.slot img{width:78%; margin:0 auto}
.slot small{display:block; font-weight:600}

/* ---------- footer ---------- */
.brand-foot{text-align:center; font-size:.78rem; color:var(--ink-2); padding:6px 0 14px}
.brand-foot .dot{margin:0 2px}
.brand-foot{display:flex; flex-direction:column; align-items:center; gap:4px; clear:both; position:relative; z-index:1}
.foot-logo{display:inline-block; line-height:0; border-radius:10px}
.foot-logo img{height:36px; width:auto; display:block}
.foot-logo .logo-fb{font-weight:900; color:var(--purple-d); font-size:1rem; line-height:1.4}
.foot-links{background:rgba(255,248,234,.92); border-radius:999px; padding:2px 10px; box-shadow:0 2px 8px rgba(79,53,151,.18); display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:2px 4px; font-size:.86rem}
.foot-links .linklike{color:var(--purple-d); font-weight:800; font-size:inherit; min-height:36px; padding:4px 6px}
@media (max-width:420px){.foot-links{font-size:.78rem; padding:2px 6px; gap:0 2px}.foot-links .linklike{padding:4px 4px}}
/* info panels (About / Sources / Developer) */
.modal.info{width:min(680px,100%)}
.info h2{margin:0 0 4px; color:var(--purple-d)}
.info .lead{margin:0 0 12px; font-weight:700; color:var(--ink-2)}
.info-sec{background:#fff; border:2px solid #e6dcc3; border-left:6px solid var(--gold); border-radius:14px; padding:10px 14px; margin:10px 0}
.info-sec h3{margin:0 0 4px; font-size:1rem; color:var(--purple-d)}
.info-sec p{margin:4px 0; font-size:.95rem; line-height:1.5}
.info-links{list-style:none; margin:6px 0 0; padding:0; display:flex; flex-direction:column; gap:4px}
.info a{color:var(--purple-d); font-weight:800; text-decoration:underline; word-break:break-word}
.info-note{background:#f4ecff; border:2px dashed var(--purple); border-radius:14px; padding:10px 14px; margin:12px 0; font-size:.92rem; line-height:1.5}
.info dl{margin:6px 0}
.info dt{font-size:.78rem; font-weight:900; letter-spacing:.05em; text-transform:uppercase; color:var(--ink-2); margin-top:8px}
.info dd{margin:2px 0 0; font-size:.98rem; font-weight:700}
.info .brand-title{font-size:1.25rem; font-weight:900; margin:0; color:var(--purple-d)}
.confetti{position:fixed; inset:0; pointer-events:none; z-index:60; overflow:hidden}
.confetti i{position:absolute; top:-20px; width:10px; height:16px; border-radius:3px; animation:fall linear forwards}
@keyframes fall{to{transform:translateY(110vh) rotate(720deg)}}

/* ---------- responsive ---------- */
@media (max-width:900px){
  .map-layout{grid-template-columns:1fr}
  .desk,.rec-grid{grid-template-columns:1fr}
}
@media (max-width:640px){
  body{font-size:16px}
  .scene,.scene.flip{grid-template-columns:1fr; min-height:0; gap:6px}
  .scene .actor,.scene.flip .actor{order:0}
  .actor img{max-height:30dvh}   .bubble::after,.scene.flip .bubble::after{display:none}
  .mission-grid,.dest-hero{grid-template-columns:1fr}
  .mission-grid .portrait img{max-height:200px}
  .agent-card b{font-size:.95rem} .agent-card small{font-size:.75rem}
  .passport{grid-template-columns:repeat(2,1fr)}
  .hud{padding:6px 10px} .chip{min-height:38px; padding:2px 10px}
  .overlay{padding:0; align-items:flex-end} .modal{border-radius:24px 24px 0 0; max-height:94dvh}
  .place-pick{gap:8px}
  .map-wrap{border-width:3px; border-radius:18px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important; transition:none!important; scroll-behavior:auto!important}
  .stars-row img{opacity:1; filter:none; transform:none} .stars-row img:not(.on){opacity:.22; filter:grayscale(1)}
  .stamp-drop{transform:rotate(-6deg)}
}

/* ---------- agent selection (3D character cards) ---------- */
.agent-screen .agent-grid{margin:10px 0 6px}
.agent-card .card{display:flex; flex-direction:column; align-items:center; text-align:center; padding:46px 8px 14px; background:linear-gradient(#fff,#f6f0ff); border:4px solid var(--purple-l); border-radius:26px; position:relative; overflow:hidden; transition:transform .25s, border-color .25s, box-shadow .25s, background .25s; height:100%}
.agent-card:hover .card{transform:translateY(-6px); box-shadow:0 14px 26px rgba(79,53,151,.25); border-color:#c9b6f2}
.agent-card input:checked + .card{border-color:var(--gold); background:linear-gradient(#fffdf4,#ffefc2); box-shadow:0 0 0 4px rgba(242,182,50,.4), 0 16px 30px rgba(79,53,151,.28); transform:translateY(-6px)}
.agent-card input:focus-visible + .card{outline:3px solid var(--purple-d); outline-offset:3px}
.agent-card .fig{position:relative; display:flex; align-items:flex-end; justify-content:center; height:clamp(160px,34dvh,360px); width:100%; margin-bottom:8px}
.agent-card .glow{position:absolute; left:8%; right:8%; bottom:-6px; height:22px; background:radial-gradient(rgba(79,53,151,.35),transparent 70%); border-radius:50%}
.agent-card .agent-fig{position:relative; height:100%; width:auto; max-width:100%; object-fit:contain; filter:drop-shadow(0 10px 8px rgba(79,53,151,.28)); transform-origin:50% 100%; transition:transform .3s cubic-bezier(.2,.9,.3,1.3); animation:agentFloat 3.4s ease-in-out var(--d,0s) infinite}
.agent-card:hover .agent-fig{transform:scale(1.03)}
.agent-card input:checked + .card .agent-fig{transform:scale(1.08)}
@keyframes agentFloat{0%,100%{translate:0 0} 50%{translate:0 -9px}}
.agent-card b{font-size:1.25rem; color:var(--purple-d)}
.agent-card small{color:var(--ink-2); font-size:.95rem}
.badge-sel{position:absolute; top:10px; left:50%; transform:translateX(-50%) scale(.6); background:var(--green); color:#fff; font-weight:900; font-size:.8rem; padding:3px 14px; border-radius:999px; opacity:0; transition:.25s; z-index:1; white-space:nowrap; border:2px solid #fff; box-shadow:0 3px 0 var(--green-d)}
.agent-card input:checked + .card .badge-sel{opacity:1; transform:translateX(-50%) scale(1)}
.chosen{margin:6px 0 10px; font-weight:800; color:var(--purple-d); text-align:center; min-height:1.5em}

/* ---------- agent figures in scenes ---------- */
.agent-fig{height:auto; filter:drop-shadow(0 10px 8px rgba(79,53,151,.28))}
.actor .agent-fig{max-height:min(56dvh,460px); width:auto}
.actor.duo,.portrait.duo{display:flex; align-items:flex-end; justify-content:center; gap:clamp(0px,1vw,10px)}
.actor.duo img,.portrait.duo img{max-height:min(46dvh,400px); width:auto; max-width:50%; object-fit:contain}
.portrait.duo img{max-height:min(46dvh,340px)}
.avatar{width:42px; height:42px; border-radius:50%; object-fit:cover; object-position:50% 0; background:var(--cream-2); border:3px solid var(--gold); vertical-align:middle; margin-right:6px}
.hud-rank{display:flex; align-items:center; gap:6px}
.mini-tourist .duo-agent{width:56px; height:auto}
.rec-agent{display:flex; align-items:flex-end; gap:12px; margin-top:12px}
.rec-agent .agent-fig{height:clamp(120px,22dvh,190px); width:auto}
.rec-agent p{margin:0 0 14px; font-weight:700; background:#fff; border:3px solid var(--purple-l); border-radius:16px; padding:8px 12px}
.reward-head{display:flex; align-items:flex-end; justify-content:center; gap:16px; flex-wrap:wrap; text-align:left}
.reward-head .agent-fig{height:clamp(120px,24dvh,200px); width:auto}
@media (max-width:640px){
  .agent-screen{padding:14px 8px}
  .agent-card .card{padding:40px 4px 10px; border-width:3px; border-radius:18px}
  .agent-card .fig{height:clamp(120px,24dvh,200px)}
  .agent-card b{font-size:1rem} .agent-card small{font-size:.74rem; line-height:1.25}
  .badge-sel{font-size:.62rem; padding:2px 8px}
  .actor .agent-fig{max-height:34dvh}
  .actor.duo img,.portrait.duo img{max-height:28dvh}
  .rec-agent .agent-fig{height:110px}
}
@media (prefers-reduced-motion:reduce){ .agent-card .agent-fig{animation:none} }
