/* Gece Perdesi — yalnızca görsel katman. Oyun kodu ve mantığı değişmedi. */
:root{--gold:#ffd27a;--gold2:#e7a23c;--amber:#ffb347;--night:#070a24;--cream:#fdf1d4}
html,body{background:#050719;color:var(--cream);font-family:'Nunito Sans',Alegreya,system-ui,sans-serif}
body{background:radial-gradient(ellipse 90% 45% at 50% 110%,#c4513f 0,#6b2a63 32%,transparent 70%),linear-gradient(#050719 0,#12154a 55%,#2b1c5e 100%)}

/* pasif dekor: yıldız, hilal, siluet, fener */
#gp-deco{position:fixed;inset:0;pointer-events:none;z-index:4}
.gp-sky{position:absolute;left:0;right:0;top:0;height:88px;overflow:hidden}
.gp-sky i{position:absolute;border-radius:50%;background:#fff6d8;animation:gp-tw 3.4s ease-in-out infinite;box-shadow:0 0 6px #fff6d8}
@keyframes gp-tw{0%,100%{opacity:.25}50%{opacity:1}}
.gp-moon{position:absolute;left:52%;top:16px;width:clamp(28px,4.6vw,58px);aspect-ratio:1;border-radius:50%;box-shadow:inset -12px -3px 0 0 #ffe9ae,0 0 28px 4px #ffd27a55;transform:rotate(-20deg);z-index:2}
.gp-skyline{position:absolute;left:0;right:0;bottom:0;width:100%;height:36px;opacity:.95}
.gp-lantern{position:absolute;top:0;width:2px;height:13vh;min-height:70px;background:#c7a15e;transform-origin:50% 0;animation:gp-swing 5s ease-in-out infinite;z-index:4}
.gp-lantern.a{left:4%}.gp-lantern.b{right:7%;height:18vh;min-height:90px;animation-delay:-2s}
.gp-lantern i{position:absolute;bottom:-32px;left:50%;transform:translateX(-50%);width:24px;height:32px;border-radius:40% 40% 50% 50%;border:2px solid #7a4e12;background:radial-gradient(circle at 50% 55%,#fff6b8,var(--amber) 65%,#c8561f);box-shadow:0 0 24px 8px #ffb34788}
@keyframes gp-swing{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(3deg)}}

/* uygulama üstte, dekor arkada */
#app{z-index:2;background:transparent}

/* tam ekran perde: üst/alt çubuk akıştan çıksın, layout() 0 yükseklik görsün */
#top{
  position:fixed;top:0;left:0;right:0;z-index:6;
  height:0!important;min-height:0!important;padding:0 10px!important;border:0!important;
  overflow:visible;background:none!important;display:flex;align-items:flex-start;gap:8px;
}
#top::before{content:"";position:absolute;left:0;right:0;top:0;height:78px;background:linear-gradient(#050719d8,transparent);pointer-events:none;z-index:-1}
#top>*{position:relative;top:10px;flex-shrink:0}
#scTitle{flex:1;min-width:0;padding-top:2px}
#scName{font:400 20px/1.1 'Marcellus',Cinzel,serif;letter-spacing:.12em;text-transform:uppercase;color:var(--gold)}
#scPart{font:600 13px 'Nunito Sans',Alegreya,sans-serif;opacity:.8;color:var(--cream)}
#dots i{border-color:#ffd27a99;background:#ffffff30}
#dots i.on{background:var(--gold2)}
#dots i.cur{background:var(--gold);box-shadow:0 0 10px 3px #ffd27a99}

#bottom{
  position:fixed;left:0;right:0;bottom:0;z-index:6;
  height:0!important;min-height:0!important;padding:0!important;border:0!important;
  overflow:visible;background:none!important;
}
#bottom::before{content:"";position:absolute;left:0;right:0;bottom:0;height:160px;background:linear-gradient(transparent,#050719e6 70%);pointer-events:none;z-index:-1}
#sub,#bar,#rot{position:absolute;left:0;right:0}
#bar{bottom:8px;padding:0 12px 8px}
#sub{bottom:96px;min-height:0;padding:0 16px 6px;max-width:860px;width:100%;margin:0 auto}
#rot{bottom:2px}

/* cam düğmeler */
.btn{
  background:linear-gradient(#ffffff26,#ffffff0f);border:1px solid #ffffff40;color:var(--cream);
  border-radius:99px;box-shadow:inset 0 1px 0 #ffffff40,0 6px 20px #0007;
  backdrop-filter:blur(10px) saturate(1.3);font-family:'Nunito Sans',Alegreya,sans-serif;font-weight:800;
  transition:transform .15s,background .15s,box-shadow .15s;
}
.btn:hover{filter:none;background:linear-gradient(#ffffff3d,#ffffff1a);transform:translateY(-1px)}
.btn:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.btn.hot,.btn.sel{background:linear-gradient(#ffe5a0,#f0a93a);color:#2a1604;border-color:#fff1c4;box-shadow:0 0 0 4px #ffd27a22,0 6px 22px #ffb34777;animation:none}
.btn.sm{min-height:44px}
.tb{gap:8px}

/* yuvarlak eylem düğmeleri */
.ab{
  width:70px;min-width:70px;height:70px;min-height:70px;padding:4px;border-radius:50%;
  background:linear-gradient(#1b1a52ee,#0d0e34ee);border:1px solid #ffd27a66;font:800 12px 'Nunito Sans',sans-serif;
}
.ab svg{width:26px;height:26px}
.ab.who{min-width:76px;width:76px}
#bar.runm .ab{min-width:84px;min-height:84px;width:84px;height:84px;font-size:14px}
#bar.runm .ab svg{width:32px;height:32px}

/* sahne: altın çerçeve, kandil ışıması */
#wrap{background:transparent}
#stage{
  border-radius:22px 22px 14px 14px;
  border:2px solid #ffd27a88;
  box-shadow:0 0 80px 6px #ffb34744,0 0 0 1px #ffd27a44,0 18px 50px #000b;
  background:#0a0c24;
}
#overlay{
  position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;
  padding:12px 16px;overflow:auto;background:transparent;border-radius:inherit;
}
#overlay[hidden]{display:none}
#overlay.dim{background:#04051acc;backdrop-filter:blur(6px)}

/* açılış: menü sahnenin içinde kalsın (taşma yok) */
.intro{
  text-align:center;display:flex;flex-direction:column;align-items:center;
  gap:clamp(4px,1.4cqh,10px);max-width:min(920px,100%);width:100%;margin:auto;
  padding:clamp(4px,1.5cqh,12px) 8px;
}
.kick{font:400 clamp(10px,2.2cqh,18px) 'Marcellus',Cinzel,serif;letter-spacing:.34em;text-transform:uppercase;color:var(--gold);text-shadow:0 2px 10px #000}
h1.big{
  margin:0;font:400 clamp(28px,16cqh,120px)/.95 'Marcellus',Cinzel,serif;letter-spacing:.06em;text-transform:uppercase;
  background:linear-gradient(180deg,#fff6d6 0%,#f2cd72 42%,#a8721e 76%,#f5d98a 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  filter:drop-shadow(0 3px 0 #3a0508) drop-shadow(0 8px 20px #000c);
}
h1.big em{font:italic 600 .3em/1.3 'Nunito Sans',Alegreya,sans-serif;letter-spacing:.18em;text-transform:lowercase;-webkit-text-fill-color:#ffe9ae;color:#ffe9ae}
.subt{margin:0;font:italic 700 clamp(13px,3cqh,26px) 'Nunito Sans',Alegreya,sans-serif;color:#fff3d6;text-shadow:0 2px 10px #000}

.menu{display:flex;flex-wrap:wrap;justify-content:center;gap:clamp(6px,1.4cqh,10px);width:min(780px,100%);margin-top:clamp(4px,1.6cqh,12px)}
.menu .btn{
  min-height:clamp(36px,8.6cqh,56px);font-size:clamp(13px,2.6cqh,17px);padding:0 18px;
  flex:1 1 140px;white-space:nowrap;max-width:240px;
}
.menu .btn.main{
  flex:1 1 100%;max-width:none;grid-column:auto;
  font:400 clamp(16px,3.4cqh,24px) 'Marcellus',Cinzel,serif;letter-spacing:.12em;text-transform:uppercase;
  min-height:clamp(42px,10.5cqh,64px);
  background:linear-gradient(#ffe5a0,#f0a93a);color:#2a1604;border-color:#fff1c4;
  box-shadow:0 0 0 5px #ffd27a22,0 8px 28px #ffb34777;
}

/* paneller ve sahne seçimi */
.panel{
  background:linear-gradient(#1b1a52f2,#0d0e34f2);border:1px solid #ffd27a88;border-radius:24px;
  max-width:min(640px,100%);max-height:100%;width:100%;padding:18px 20px;
  box-shadow:0 0 50px #ffb34733,0 20px 60px #000;overflow:auto;
}
.panel h2{font:400 26px 'Marcellus',Cinzel,serif;letter-spacing:.1em;text-transform:uppercase;color:var(--gold);margin:0 0 10px}
.panel h3{font:400 18px 'Marcellus',Cinzel,serif;color:var(--gold)}
.panel p,.panel li{color:#f7ebd0}
.scn{
  background:linear-gradient(#ffffff14,#ffffff08)!important;color:var(--cream)!important;
  border:1px solid #ffffff33!important;border-radius:16px!important;
  min-height:clamp(40px,8cqh,52px)!important;padding:6px 12px!important;
}
.scn:hover{background:linear-gradient(#ffd27a33,#e7a23c22)!important;border-color:#ffd27a99!important}
.tag{border-radius:99px;font-size:12px;padding:1px 10px}
.ok{color:#9cf0cb;border-color:#35c58a88;background:#35c58a33}
.tmp{color:var(--gold);border-color:#ffd27a99;background:#ffd27a33}

/* altyazı */
#subIn{
  font:800 clamp(16px,2.2cqw,22px)/1.3 'Nunito Sans',Alegreya,sans-serif;
  background:#0a0c2ccc;border:1px solid #ffd27a77;border-radius:24px;
  padding:10px 18px;backdrop-filter:blur(12px);box-shadow:0 8px 30px #000a;color:var(--cream);
}
#spk{font:400 .8em 'Marcellus',Cinzel,serif;letter-spacing:.1em;text-transform:uppercase;
  color:#2a1604;background:linear-gradient(#ffe5a0,#f0a93a);border-radius:99px;padding:2px 12px;margin-right:.6em}
#bNext{background:linear-gradient(#ffe5a0,#f0a93a);color:#2a1604;border-color:#fff1c4;min-width:48px;min-height:44px;padding:0 14px}

#hint{background:linear-gradient(#fff6d6,#f0c56a);border-color:var(--gold2);border-radius:16px;color:#2a1604}
#cardT{font-family:'Marcellus',Cinzel,serif;font-weight:400}
#toast{background:#0a0c2cee;border-color:#ffd27a88;border-radius:16px;backdrop-filter:blur(8px)}
#camBox{border-color:var(--gold2);border-radius:12px;box-shadow:0 0 20px #ffb34755}

#rot{display:none!important}
body.port #rot{display:flex!important;justify-content:center;align-items:center;gap:6px;font-size:13px;opacity:.9;bottom:4px}

/* yatay telefon / compact: cam yuvarlak düğmeler, yanlara yerleşim */
body.compact #top,body.compact #bottom{background:none!important;border:0}
body.compact #top{height:0!important;padding:0 8px!important}
body.compact #bottom{height:0!important}
body.compact #sub{min-height:0;bottom:78px}
body.compact #bar{bottom:6px;display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
body.compact .ab{width:54px;min-width:54px;height:54px;min-height:54px;font-size:10px;border-radius:50%;background:linear-gradient(#1b1a52f2,#0d0e34f2);border:1px solid #ffd27a88}
body.compact .ab svg{width:22px;height:22px}
body.compact .tb span{display:none}
body.compact .tb{min-width:40px;justify-content:center;padding:0 8px}
body.compact #scName{font-size:15px}
body.compact #scPart{font-size:11px}

/* koşu çubuğu compact */
body.compact #bar.runm{justify-content:center}
body.compact #bar.runm .ab{width:72px;min-width:72px;height:72px;min-height:72px;font-size:13px}

@media(max-height:560px) and (orientation:landscape){
  .gp-lantern{display:none} /* dar yükseklikte sahneyi kapatmasın */
  .gp-moon{width:26px;top:8px;right:8px}
  .gp-skyline{height:64px}
  #sub{bottom:64px;padding:0 12px 4px}
  #subIn{padding:6px 12px;font-size:14px;border-radius:18px}
  .panel{padding:12px 14px}
  .panel h2{font-size:20px}
  .menu .btn{padding:0 12px}
  h1.big{font-size:clamp(26px,14cqh,64px)}
}

@media(prefers-reduced-motion:reduce){
  .gp-sky i,.gp-lantern,.btn.hot{animation:none!important}
}

/* boş altyazı çubuğunu gizle (sarı daire/boş şerit) */
#spk:empty{display:none!important}
#sub:not(:has(#txt:not(:empty))):not(:has(#choices button)):not(:has(#bNext:not([hidden]))){visibility:hidden;pointer-events:none;height:0}
#subIn:not(:has(#txt:not(:empty))){background:transparent;border:none;box-shadow:none;padding:0}

/* menü ve paneller alt HUD'un altında kalmasın */
#overlay{padding:10px 16px 118px}
@media(max-height:560px) and (orientation:landscape){
  #overlay{padding:4px 10px 78px}
  .intro{gap:2px}
  .kick{letter-spacing:.28em}
  .subt{font-size:12px}
  .menu{gap:5px;margin-top:2px}
  .menu .btn{min-height:30px;font-size:12px;flex-basis:120px;padding:0 10px}
  .menu .btn.main{min-height:36px;font-size:15px}
}

/* v3-scn-tight: 9 sahne + Geri sığsın */
.scn{min-height:42px!important;padding:5px 12px!important}
.panel{padding:12px 16px}
#overlay.dim{padding-bottom:96px}
@media(max-height:560px) and (orientation:landscape){
  #overlay,#overlay.dim{padding:42px 8px 6px}
  .scn{min-height:26px!important;padding:2px 10px!important;font-size:13px}
  .panel{padding:6px 8px;max-height:100%}
  .panel h2{font-size:16px;margin:0 0 4px}
  .panel .btn{min-height:30px;padding:0 12px}
  .tag{font-size:11px;padding:0 7px}
}

body:has(#overlay:not([hidden])) .gp-skyline{display:none}
@media(max-height:560px) and (orientation:landscape){
  #overlay{padding:4px 10px 78px}
  #overlay.dim{padding:36px 8px 2px;align-items:flex-start}
  #overlay.dim .panel{max-height:100%;overflow:auto;padding:4px 8px 6px}
  #overlay.dim .panel h2{font-size:14px;margin:0 0 2px}
  #overlay.dim .scn{min-height:22px!important;padding:1px 8px!important}
  #overlay.dim .panel .btn{min-height:26px}
}
