:root{--amber:#e8b45a;--ink:#f3efe6;--panel:rgba(14,16,15,.78);--line:rgba(232,180,90,.35)}
*{box-sizing:border-box;margin:0;padding:0}
html,body{width:100%;height:100%;overflow:hidden;background:#0b0d0c;font-family:Inter,system-ui,sans-serif;color:var(--ink)}
canvas#c{display:block;width:100%;height:100%;touch-action:none;cursor:grab}
canvas#c:active{cursor:grabbing}
.hud{position:fixed;pointer-events:none;z-index:5}

/* statistiques */
#stats{top:18px;left:18px;width:260px}
#owner{font-family:'Barlow Condensed';font-size:22px;font-weight:700;letter-spacing:.06em;text-shadow:0 1px 6px #000}
#role{font-size:12px;opacity:.85;margin-bottom:10px;text-shadow:0 1px 4px #000}
.bar{display:flex;align-items:center;gap:8px;margin:5px 0}
.bar span{width:18px;font-size:12px;text-align:center}
.bar .t{flex:1;height:8px;background:rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.15);border-radius:2px;overflow:hidden}
.bar .f{height:100%;width:100%;transition:width .2s linear}
#disc{margin-top:10px;font-size:13px;background:var(--panel);border:1px solid var(--line);padding:6px 10px;display:inline-block;border-radius:3px}

/* mini-carte */
#mapwrap{top:18px;right:18px;width:184px;height:184px;border:1px solid var(--line);background:var(--panel);padding:2px;border-radius:50%;overflow:hidden}
#minimap{width:178px;height:178px;border-radius:50%;display:block}

#prompt{left:50%;bottom:22%;transform:translateX(-50%);background:var(--panel);border:1px solid var(--line);padding:9px 16px;font-size:15px;border-radius:3px;display:none;white-space:nowrap}
#prompt kbd{background:var(--amber);color:#1a1307;font-weight:700;padding:1px 7px;border-radius:2px;margin-right:8px;font-family:'Barlow Condensed'}
#help{left:18px;bottom:18px;font-size:12px;line-height:1.7;opacity:.85;text-shadow:0 1px 4px #000}
#help b{color:var(--amber);font-weight:600}

/* dialogue */
#dlg{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);width:min(760px,calc(100% - 28px));background:linear-gradient(180deg,rgba(20,22,20,.92),rgba(10,11,10,.95));border:1px solid var(--line);border-top:3px solid var(--amber);padding:20px 24px 16px;z-index:10;display:none;box-shadow:0 20px 60px rgba(0,0,0,.6)}
#dname{font-family:'Barlow Condensed';font-size:26px;font-weight:700;letter-spacing:.06em;color:var(--amber)}
#dtitle{font-size:12px;letter-spacing:.14em;text-transform:uppercase;opacity:.65;margin-bottom:12px}
#dtext{font-size:16px;line-height:1.6;min-height:78px}
#dtext a{color:var(--amber)}
#dtext .ph{color:#9fb3a8;font-style:italic}
#dlg .row{display:flex;justify-content:space-between;align-items:center;margin-top:14px}
#dpage{font-size:12px;opacity:.6}
.btn{pointer-events:auto;background:var(--amber);color:#1a1307;border:0;font-family:'Barlow Condensed';font-weight:700;font-size:16px;letter-spacing:.1em;text-transform:uppercase;padding:9px 18px;cursor:pointer;border-radius:2px}
.btn.ghost{background:transparent;color:var(--ink);border:1px solid var(--line);margin-right:8px}
.btn:hover{filter:brightness(1.1)}

/* écran d'accueil : l'île tourne derrière */
#intro{position:fixed;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 55%,rgba(10,10,8,.25),rgba(5,6,5,.85) 75%);text-align:center;padding:24px;transition:opacity .9s}
#intro.out{opacity:0;pointer-events:none}
#intro h1{font-family:'Barlow Condensed';font-weight:700;font-size:clamp(44px,9vw,104px);letter-spacing:.08em;line-height:.95;text-shadow:0 4px 30px rgba(0,0,0,.6)}
#intro h1 em{font-style:normal;color:var(--amber)}
#intro p{max-width:520px;opacity:.85;margin:18px 0 26px;line-height:1.6;text-shadow:0 1px 8px #000}
#ldwrap{width:220px;height:3px;background:rgba(255,255,255,.12);margin-bottom:10px}
#ldbar{height:100%;width:0;background:var(--amber);transition:width .3s}
#ld{font-size:12px;letter-spacing:.2em;text-transform:uppercase;opacity:.7;height:20px;margin-bottom:12px}
#go{display:none}

/* tactile */
#joy{position:fixed;left:26px;bottom:26px;width:120px;height:120px;border-radius:50%;border:1px solid var(--line);background:rgba(0,0,0,.25);z-index:6;display:none;touch-action:none}
#joy i{position:absolute;left:35px;top:35px;width:50px;height:50px;border-radius:50%;background:rgba(232,180,90,.7)}
#tbtns{position:fixed;right:22px;bottom:30px;z-index:6;display:none;gap:10px;flex-direction:column}
#tbtns .btn{width:78px;height:54px;padding:0}
@media (max-width:700px){#mapwrap{width:120px;height:120px}#minimap{width:114px;height:114px}#stats{width:180px}#help{display:none}}
