*{box-sizing:border-box}
html,body{margin:0;height:100%;background:#080b12;color:#dbe6f5;
  font-family:"Segoe UI",system-ui,sans-serif;overflow:hidden;
  -webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
#wrap{height:100%;display:flex;flex-direction:column;align-items:center;
  padding:max(env(safe-area-inset-top),8px) 8px max(env(safe-area-inset-bottom),8px)}

#hud{width:100%;max-width:900px;display:flex;gap:6px;justify-content:space-between;
  padding:8px 10px;margin-bottom:8px;border:1px solid #17324d;border-radius:10px;
  background:linear-gradient(180deg,#0d1524,#0a1019);box-shadow:0 0 18px #0af2 inset}
.stat{display:flex;flex-direction:column;align-items:center;min-width:52px}
.stat .k{font-size:10px;letter-spacing:.14em;color:#5f86ad}
.stat .v{font-size:18px;font-weight:700;color:#63dcf5;text-shadow:0 0 10px #63dcf588}
#h-time.low{color:#ff5a3c;text-shadow:0 0 10px #ff5a3c88}

#stage{position:relative;flex:1;min-height:0;width:100%;max-width:1100px;
  display:flex;align-items:center;justify-content:center}
#cv{width:auto;height:auto;max-width:100%;max-height:100%;aspect-ratio:15/13;
  image-rendering:auto;border:1px solid #17324d;border-radius:8px;
  background:#0a0f18;box-shadow:0 0 30px #001a2e}

#overlay{position:absolute;inset:0;display:none;align-items:center;justify-content:center;
  background:rgba(6,9,15,.86);backdrop-filter:blur(3px);border-radius:8px;padding:10px;overflow:auto}
#overlay.show{display:flex}
.card{max-width:430px;width:100%;text-align:center;border:1px solid #1d3f5e;border-radius:14px;
  padding:18px 20px;background:linear-gradient(180deg,#0e1726,#0a111c);box-shadow:0 0 40px #0af3}
.card h1{margin:0 0 6px;font-size:32px;letter-spacing:.16em;color:#ffb347;
  text-shadow:0 0 18px #ff8a3c88}
.card .sub{margin:0 0 12px;font-size:13px;color:#9fb6cd;line-height:1.5}
#ov-keys p{margin:3px 0;font-size:12px;color:#7f9ab4}
#ov-keys b{color:#63dcf5}
#ov-nick{margin-top:12px}
#ov-nick label{display:block;font-size:11px;letter-spacing:.1em;color:#5f86ad;margin-bottom:5px}
#nick{width:100%;max-width:240px;padding:9px 12px;font-size:14px;text-align:center;
  color:#e6f3ff;background:#0a1420;border:1px solid #1d3f5e;border-radius:8px;outline:none}
#nick:focus{border-color:#3fd0f0;box-shadow:0 0 12px #3fd0f044}
.hint{margin:6px 0 0;font-size:11px;min-height:14px;color:#8aa6bf}
.hint.err{color:#ff7a5c}
.hint.ok{color:#6fe3a8}
#ov-buttons{margin-top:14px;display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
/* GAME PANEL STANDARD v1 (see _standard/GAME-PANEL.md). Dynarun's own #ov-*
   rules keep the look; these add the two standard rows every hub game shows:
   the stats line and the objective list. Dynarun keeps its own copy - there is
   no shared stylesheet. */
.dyn-final{font-size:14px;letter-spacing:.12em;color:#8aa6bf;margin:0 0 12px}
.dyn-final b{color:#63dcf5}
.dyn-info{text-align:left;font-size:13px;color:#8aa6bf;margin:0 0 14px;padding:0;list-style:none}
.dyn-info li{padding:4px 2px;border-bottom:1px solid #16304a}
.dyn-info li:last-child{border-bottom:none}
.dyn-info b{color:#d8e8f6}
#ov-btn{padding:11px 30px;font-size:15px;font-weight:700;letter-spacing:.1em;
  color:#04121c;background:linear-gradient(180deg,#7ee7fb,#25b6da);border:0;border-radius:9px;
  cursor:pointer;box-shadow:0 0 22px #35c8ff66}
#ov-btn:active{transform:translateY(1px)}
#ov-exit{padding:11px 22px;font-size:13px;font-weight:700;letter-spacing:.1em;
  color:#8fd6ec;background:#0f1c2c;border:1px solid #1d3f5e;border-radius:9px;cursor:pointer}
#ov-exit:hover{border-color:#3fd0f0;color:#c8ecff}
#ov-exit:active{transform:translateY(1px)}

#board{margin-top:16px;border-top:1px solid #16304a;padding-top:12px;text-align:left}
#board h2{margin:0 0 8px;font-size:11px;letter-spacing:.16em;color:#5f86ad;text-align:center}
#board-week{color:#3d6a8f}
#board-list{margin:0;padding:0;list-style:none;counter-reset:rank;
  max-height:170px;overflow:auto}
#board-list li{counter-increment:rank;display:flex;justify-content:space-between;gap:10px;
  font-size:12px;padding:4px 8px;border-radius:5px;color:#a9c1d6}
#board-list li:nth-child(odd){background:#0c1626}
#board-list li::before{content:counter(rank) ".";color:#4d7a9e;min-width:22px}
#board-list li b{color:#63dcf5;font-weight:600}
#board-list li.me{outline:1px solid #2a5f85}
#board-list li.empty{justify-content:center;color:#4d7a9e}

#touch{display:none;width:100%;max-width:760px;justify-content:space-between;
  align-items:center;padding:10px 10px 22px;gap:10px}
#dpad{display:grid;grid-template-columns:repeat(3,48px);grid-template-rows:repeat(3,48px);
  gap:10px;touch-action:none;order:2}
.dpb{border:1px solid #1d3f5e;border-radius:12px;background:#0f1c2c;color:#8fd6ec;
  font-size:19px;line-height:1;padding:0;touch-action:none;
  display:flex;align-items:center;justify-content:center;box-shadow:0 0 12px #35c8ff22}
.dpb.on,.dpb:active{background:#17324d;color:#fff}
.dp-up{grid-column:2;grid-row:1}
.dp-left{grid-column:1;grid-row:2}
.dp-right{grid-column:3;grid-row:2}
.dp-down{grid-column:2;grid-row:3}
/* dpad'i gercek merkeze getiren esit genislikli bosluk */
#touchPadR{flex:0 0 86px;height:1px;order:1}
#sideA{flex:0 0 86px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:10px;order:3}
#handSwap{display:none}
body.lefty #touchPadR{order:3}
body.lefty #sideA{order:1}
#handTxt{font-size:10px;letter-spacing:.4px;color:#6f9dbd;text-align:center;line-height:1.3;max-width:120px}
#leftySw{display:flex;align-items:center;width:66px;height:26px;padding:2px;
  border:1px solid #1d3f5e;border-radius:14px;background:#0f1c2c;touch-action:none}
#leftyKnob{width:22px;height:22px;border-radius:50%;margin-left:0;
  background:#3fd0f0;box-shadow:0 0 10px #35c8ff88;transition:margin-left .18s ease}
body.lefty #leftyKnob{margin-left:38px;background:#ffb347;box-shadow:0 0 10px #ffb34788}
body.lefty #leftySw{border-color:#5a3a1d}
#acts{display:flex;flex-direction:column;gap:10px;align-items:center}
.tb{border:1px solid #1d3f5e;border-radius:14px;background:#0f1c2c;color:#8fd6ec;
  font-size:15px;font-weight:700;letter-spacing:.06em;padding:0;
  min-width:64px;min-height:64px;touch-action:none}
.tb.big{min-width:86px;min-height:86px;color:#ffb347;border-color:#5a3a1d;background:#1c1410}
.tb.on{background:#17324d;color:#fff}
.tb:disabled{opacity:.35;color:#4d7a9e;border-color:#16304a;background:#0b131d}
body.touch #touch{display:flex}
body.touch #ov-keys{display:none}

/* --- mobil yatay: kontroller ekranın üstünde, oyun alanı tam yükseklik --- */
@media (orientation:landscape) and (hover:none){
  #wrap{padding:2px 4px}
  #hud{padding:3px 8px;margin-bottom:3px;border-radius:7px}
  .stat{min-width:44px}
  .stat .k{font-size:8px}
  .stat .v{font-size:14px}
  #stage{max-width:none}
  body.touch #touch{position:fixed;left:0;right:0;bottom:0;top:0;
    padding:8px calc(max(env(safe-area-inset-left),0px) + 16px) calc(max(env(safe-area-inset-bottom),10px) + 12px);
    pointer-events:none;background:none;max-width:none;align-items:stretch}
  /* sag-el (varsayilan): dpad SOLDA, DYN/BOOM SAGDA — ikisi de dikey ortada */
  #touchPadR{display:none}
  #dpad{order:1;align-self:center;pointer-events:auto;opacity:.9;
    grid-template-columns:repeat(3,46px);grid-template-rows:repeat(3,46px);gap:10px}
  #sideA{order:3;flex:0 0 auto;pointer-events:auto;opacity:.95;
    justify-content:space-between;padding-top:48px}
  #handSwap{display:flex;flex-direction:column;align-items:center;gap:8px}
  #acts{margin-top:auto}
  body.lefty #dpad{order:3}
  body.lefty #sideA{order:1}
  .tb{min-width:56px;min-height:56px}
  .tb.big{min-width:74px;min-height:74px}
}
