/* Gamerhood client layer. The archived engine, models and storage stay intact. */
.gh-client { color-scheme: dark; }
.gh-client body { --s0:#0c1015; --s1:#151b23; --s2:#1c2530; --s3:#263344; --r-lg:10px; --r-xl:12px; --text-2:#b5c0ce; --text-3:#96a6b9; background-image:none; }
.gh-toolbar { min-height:42px; display:flex; gap:18px; align-items:center; padding:7px 20px; border-bottom:1px solid #ffffff1a; background:#080c10; color:#bec9d7; font:12px/1.4 system-ui,sans-serif; }
.gh-toolbar a { color:#edf3fa; text-decoration:none; font-weight:700; }
.gh-toolbar a:hover { text-decoration:underline; }
.gh-build { letter-spacing:1.8px; flex:1; }
.gh-build span { margin-left:10px; color:#a3b2c3; letter-spacing:0; }
.gh-toolbar button, .gh-backup button, .gh-panel-switch button { color:#eaf1f8; background:#202c39; border:1px solid #516173; border-radius:5px; padding:6px 12px; font:600 12px/1.3 system-ui,sans-serif; }
.gh-toolbar button:disabled { color:#8291a2; cursor:default; opacity:.65; }
.gh-client .btn { border-radius:6px; }
.gh-client .sidebar { background:#101720; }
@media (min-width:861px) { .gh-client .sidebar { top:42px; height:calc(100dvh - 42px); } }
.gh-client .app { min-height:calc(100dvh - 42px); }
.gh-client .gh-panel-switch { display:flex!important; align-items:center; gap:5px; min-width:0; grid-area:switch; }
.gh-panel-switch button { flex:1; white-space:nowrap; padding:7px 9px; }
.gh-panel-switch button[aria-pressed=true] { color:#0b1520; background:#dce8f4; border-color:#dce8f4; }
.gh-client body:not(.eng-2d) .gh-panel-switch [data-panel=lineups] { display:none; }
.gh-client .gh-panel-switch .gh-mobile-stats { display:none; }
.gh-view-options { margin-top:7px; font-size:12px; flex:none; }
.gh-view-options summary { padding:6px 8px; color:#c4d0dc; cursor:pointer; border:1px solid #ffffff26; border-radius:5px; }
.gh-view-options[open] { max-height:150px; overflow:auto; }
.gh-client .gh-view-options .v2d-bar { margin-top:6px; }
.gh-backup { margin:auto; width:min(600px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); overflow:auto; padding:24px; color:#edf3fa; background:#141c26; border:1px solid #526173; border-radius:12px; box-shadow:0 20px 70px #000a; }
.gh-backup::backdrop { background:#04080ed9; }
.gh-dialog-head { display:flex; align-items:start; justify-content:space-between; gap:20px; }
.gh-dialog-head h2 { font:700 22px/1.2 system-ui,sans-serif; text-transform:none; letter-spacing:-.5px; }
.gh-backup .gh-close { font-size:23px; padding:0 8px; background:transparent; }
.gh-backup p { margin:14px 0; color:#c0cbd8; font-size:13px; }
.gh-backup p.gh-backup-note { padding:12px; border-left:2px solid #809bb6; background:#26313e; }
.gh-backup hr { border:0; border-top:1px solid #46515f; margin:22px 0; }
.gh-backup label { display:block; margin:10px 0; }
.gh-backup input[type=file] { max-width:100%; }
.gh-backup .gh-confirm { display:flex; gap:10px; align-items:start; font-size:13px; }
.gh-backup .gh-confirm input { flex:none; margin-top:3px; }
.gh-backup button:disabled { opacity:.4; cursor:default; }
.gh-backup a { color:#b7d8ff; font-size:12px; }
.gh-backup #gh-backup-status { color:#e5ecf4; }

/* One viewport: score/controls above the pitch, stats beside it. Detail panels
   own their scrolling. No physics/render/Fullscreen API is replaced. */
@media (min-width:1000px) {
  .gh-client body.match-mode { height:100dvh; overflow:hidden; }
  .gh-client body.match-mode .app { min-height:0; height:calc(100dvh - 42px); }
  .gh-client body.match-mode .app-main { min-height:0; }
  .gh-client body.match-mode .container { max-width:none; height:100%; min-height:0; padding:8px 16px 12px; }
  .gh-client body.match-mode #match-screen.active,
  .gh-client #match-screen.ab-fs { display:flex!important; flex-direction:column; height:100%; min-height:0; gap:7px; overflow:hidden!important; }
  .gh-client #match-screen.ab-fs { height:100dvh!important; padding:10px 16px!important; }
  .gh-client #match-screen .match-top { margin:0; gap:8px; flex:none; }
  .gh-client #match-screen .match-top .eng-hint { flex:1 1 240px; order:0; font-size:11px; }
  .gh-client #match-screen .scoreboard { flex:none; margin:0; padding:6px 20px; border-radius:7px; box-shadow:none; gap:12px; }
  .gh-client #match-screen .sb-mid { display:grid; grid-template-columns:90px auto 120px; gap:10px; align-items:center; }
  .gh-client #match-screen .team-score { font-size:36px; }
  .gh-client #match-screen .match-time-badge { padding:2px 9px; font-size:15px; }
  .gh-client #match-screen .period-tag { font-size:11px; letter-spacing:1px; }
  .gh-client #match-screen .sb-name { font-size:22px; letter-spacing:1px; }
  .gh-client #match-screen .sb-crest .team-crest { width:36px!important; height:36px!important; min-width:36px!important; }
  .gh-client #match-screen .match-controls-bar { flex:none; padding:5px 9px; margin:0; gap:10px; }
  .gh-client #match-screen .match-controls-bar .btn { padding:6px 10px; font-size:12px; letter-spacing:.3px; }
  .gh-client #match-screen .live-ticker { padding:5px 8px; font-size:12px; }
  .gh-client #match-screen .match-grid { flex:1; min-height:0; display:grid!important; grid-template-columns:minmax(0,1fr) minmax(310px,360px)!important; grid-template-rows:minmax(268px,.62fr) 32px minmax(100px,1fr)!important; grid-template-areas:"pitch stats" "pitch switch" "pitch detail"!important; align-items:stretch!important; gap:7px!important; }
  .gh-client #match-screen .mg-main, .gh-client #match-screen .mg-side { display:contents!important; }
  .gh-client #match-screen .pitch-card { grid-area:pitch!important; padding:10px!important; display:flex!important; flex-direction:column; min-width:0; min-height:0; max-height:none!important; overflow:hidden; }
  .gh-client #match-screen .pitch-card .card-head { flex:none; margin-bottom:7px; gap:6px; }
  .gh-client #match-screen .pitch-card .card-head h3 { font-size:14px; }
  .gh-client #match-screen #view-2d:not([hidden]) { display:flex!important; flex-direction:column; flex:1; min-height:0; }
  .gh-client #match-screen #view-2d[hidden] { display:none!important; }
  .gh-client #match-screen .v2d-wrap { flex:1; min-height:0; align-items:center; }
  .gh-client #match-screen .v2d-wrap canvas { max-width:100%!important; max-height:100%!important; object-fit:contain; }
  .gh-client #match-screen .v2d-wrap #cv2d { width:auto!important; height:auto!important; }
  .gh-client #match-screen .v2d-wrap #cv3d { top:50%; transform:translate(-50%,-50%); width:auto!important; height:auto!important; }
  .gh-client #match-screen #view-pitch { min-height:0; flex:1; overflow:hidden; }
  .gh-client #match-screen #view-pitch:not([hidden]) { display:flex; align-items:center; justify-content:center; }
  .gh-client #match-screen #view-pitch .pitch-view { height:100%; width:auto; max-width:100%; aspect-ratio:105 / 68; }
  .gh-client #match-screen #view-list { min-height:0; overflow:auto; }
  .gh-client #match-screen .stats-container { grid-area:stats!important; display:block!important; min-height:0; padding:7px 12px!important; overflow:auto; }
  .gh-client #match-screen .stat-header-row { font-size:12px; padding-bottom:5px; margin-bottom:2px; }
  .gh-client #match-screen .stat-row { grid-template-columns:36px minmax(0,1fr) 36px; padding:4px 0; gap:7px; }
  .gh-client #match-screen .stat-val { font-size:15px; }
  .gh-client #match-screen .stat-label { font-size:10px; letter-spacing:.6px; margin-bottom:2px; }
  .gh-client #match-screen .stat-bar-bg, .gh-client #match-screen .cmp-bar { height:4px; }
  .gh-client #match-screen .timeline-card, .gh-client #match-screen #xi-card { grid-area:detail!important; min-height:0; overflow:auto; padding:8px 10px!important; }
  .gh-client #match-screen .timeline-card { display:flex!important; flex-direction:column; }
  .gh-client #match-screen .timeline-card .card-head { margin-bottom:3px; }
  .gh-client #match-screen .timeline-card .fm-events-list, .gh-client #match-screen .timeline-card .commentary-list { flex:1; min-height:0; max-height:none; overflow:auto; }
  .gh-client #match-screen .timeline-card .commentary-list[hidden] { display:none!important; }
  .gh-client #match-screen #l2d-tabs { display:none!important; }
  .gh-client #match-screen[data-panel=events] #xi-card,
  .gh-client #match-screen[data-panel=none] #xi-card,
  .gh-client #match-screen[data-panel=stats] #xi-card,
  .gh-client #match-screen[data-panel=lineups] .timeline-card,
  .gh-client #match-screen[data-panel=none] .timeline-card,
  .gh-client #match-screen[data-panel=stats] .timeline-card { display:none!important; }
  .gh-client #match-screen[data-panel=lineups] #xi-card { display:block!important; }
  .gh-client #match-screen[data-panel=none] .match-grid { grid-template-rows:minmax(268px,1fr) 32px!important; grid-template-areas:"pitch stats" "pitch switch"!important; }
}
@media (max-width:999px) {
  .gh-toolbar { padding:7px 12px; gap:8px; }
  .gh-build { font-size:10px; letter-spacing:1px; text-align:center; }
  .gh-build span { display:none; }
  .gh-client body.match-mode .container { padding:10px 10px 24px; }
  .gh-client #match-screen .match-grid { display:flex!important; flex-direction:column; gap:9px; }
  .gh-client #match-screen .mg-main, .gh-client #match-screen .mg-side { display:contents!important; }
  .gh-client #match-screen .pitch-card { order:0; padding:9px; width:100%; }
  .gh-client #match-screen .gh-panel-switch { order:1; width:100%; flex-wrap:wrap; }
  .gh-client #match-screen .gh-mobile-stats { display:block; }
  .gh-client #match-screen .timeline-card, .gh-client #match-screen #xi-card, .gh-client #match-screen .stats-container { order:2; width:100%; max-height:320px; overflow:auto; margin:0; }
  .gh-client #match-screen #l2d-tabs { display:none!important; }
  .gh-client #match-screen:not([data-panel=events]) .timeline-card,
  .gh-client #match-screen:not([data-panel=lineups]) #xi-card,
  .gh-client #match-screen:not([data-panel=stats]) .stats-container { display:none!important; }
  .gh-client #match-screen[data-panel=events] .timeline-card,
  .gh-client #match-screen[data-panel=lineups] #xi-card,
  .gh-client #match-screen[data-panel=stats] .stats-container { display:block!important; }
  .gh-client #match-screen .scoreboard { padding:10px 8px; gap:5px; }
  .gh-client #match-screen .sb-side { gap:4px; flex-direction:column; text-align:center; }
  .gh-client #match-screen .sb-name { font-size:17px; letter-spacing:.5px; }
  .gh-client #match-screen .team-score { font-size:38px; }
  .gh-client #match-screen .match-time-badge { font-size:15px; }
  .gh-client #match-screen .match-controls-bar { flex-wrap:wrap; gap:8px; padding:8px; }
  .gh-client #match-screen .match-controls-bar .live-ticker { flex:1 1 100%; order:3; font-size:12px; }
  .gh-client #match-screen .match-controls-bar .btn { padding:7px 9px; font-size:12px; letter-spacing:.2px; }
  .gh-client #match-screen .speed-buttons { flex-wrap:wrap; }
  .gh-client #match-screen .match-top .left { gap:6px; }
  .gh-client #match-screen .match-top .eng-hint { font-size:11px; }
  .gh-client #match-screen .pitch-card .card-head { flex-wrap:wrap; }
  .gh-client #match-screen .pitch-card .card-head h3 { font-size:14px; }
  .gh-client #match-screen .v2d-wrap { min-width:0; }
  .gh-client #match-screen .v2d-bar { flex-wrap:wrap; }
  .gh-client #match-screen .v2d-view { max-width:calc(100% - 16px); }
  .gh-client #match-screen .v2d-view button { font-size:10px; padding:5px 7px; }
  .gh-client #match-screen .stats-container .stat-row { grid-template-columns:40px minmax(0,1fr) 40px; }
}
@media (prefers-reduced-motion:reduce) {
  .gh-client .app, .gh-client .screen.active { animation:none; transition:none; }
}
/* Saha Odağı: live renderer with user-controlled frame and optional overlays. */
.gh-layout-button{white-space:nowrap}.gh-toggle-list{display:grid;gap:4px;margin:18px 0}.gh-toggle-list label{display:flex;align-items:center;gap:12px;padding:8px 0}.gh-toggle-list input{width:18px;height:18px;accent-color:#9abce5}.gh-size-label{display:flex!important;justify-content:space-between;gap:20px}.gh-layout-dialog input[type=range]{width:100%;accent-color:#9abce5}.gh-client #match-screen.gh-focus .gh-panel-switch{display:none!important}.gh-client #match-screen.gh-focus .match-grid{position:relative;display:block!important;width:var(--gh-field-width,100%)!important;max-width:100%;margin:0 auto;flex:1;min-height:0;grid-template:none!important}.gh-client #match-screen.gh-focus .pitch-card{width:100%!important;height:100%;padding:8px!important;border:1px solid #4c687f55;background:#0a181d;position:relative}.gh-client #match-screen.gh-focus .pitch-card .card-head{padding:0 6px;margin-bottom:5px}.gh-client #match-screen.gh-focus .stats-container{position:absolute;z-index:12;right:14px;top:50px;width:250px;max-height:calc(100% - 70px);padding:10px 14px!important;background:#12232eea;border:1px solid #91acc52e;box-shadow:0 8px 28px #0003;backdrop-filter:blur(10px);overflow:auto}.gh-client #match-screen.gh-focus .timeline-card{position:absolute!important;left:20px;bottom:66px;z-index:12;width:min(330px,45%);height:180px;background:#12232eea;border:1px solid #91acc52e;backdrop-filter:blur(10px)}.gh-client #match-screen.gh-focus #xi-card{display:none!important}.gh-client #match-screen.gh-focus .match-controls-bar{order:9}.gh-client #match-screen.gh-focus .scoreboard{background:#15222e;border:1px solid #38526966}.gh-client #match-screen.gh-focus .v2d-wrap{background:#081311;border:0}.gh-client #match-screen.gh-focus[data-gh-score=false] .scoreboard,.gh-client #match-screen.gh-focus[data-gh-stats=false] .stats-container,.gh-client #match-screen.gh-focus[data-gh-events=false] .timeline-card,.gh-client #match-screen.gh-focus[data-gh-cameras=false] #v2d-view,.gh-client #match-screen.gh-focus[data-gh-ticker=false] .live-ticker{display:none!important}.gh-client #match-screen.gh-focus[data-gh-events=true] .timeline-card{display:flex!important}.gh-client #match-screen.gh-focus[data-gh-stats=true] .stats-container{display:block!important}.gh-client #match-screen.gh-focus .v2d-wrap #cv2d{width:100%!important;height:100%!important;object-fit:contain}.gh-client #match-screen.gh-focus .v2d-wrap #cv3d{width:100%!important;height:100%!important;object-fit:contain}
@media(max-width:999px){.gh-client #match-screen.gh-focus .match-grid{min-height:380px;flex:none}.gh-client #match-screen.gh-focus .pitch-card{min-height:360px}.gh-client #match-screen.gh-focus .stats-container{position:relative;inset:auto;width:100%;max-height:none;margin-top:10px;background:#142431}.gh-client #match-screen.gh-focus .timeline-card{position:relative!important;inset:auto;width:100%;margin-top:10px;height:200px}.gh-client #match-screen.gh-focus .v2d-wrap{min-height:230px}.gh-client #match-screen.gh-focus .v2d-wrap #cv2d{height:auto!important}.gh-client #match-screen.gh-focus .v2d-wrap #cv3d{height:100%!important}.gh-client #match-screen.gh-focus .match-controls-bar{margin-top:10px}.gh-layout-dialog{padding:20px}.gh-client #match-screen.gh-focus .stats-container .stat-row{padding:5px 0}}
/* Keep a single scoreboard and let the 3D camera use the actual viewport. */
.gh-client #match-screen.gh-focus #ab-hud-top{display:none!important}
.gh-client #match-screen.gh-focus[data-gh-ticker=false] .ab-hud-comm-wrap{display:none!important}
.gh-client #match-screen.gh-focus .stats-container .stat-header-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:7px}
.gh-client #match-screen.gh-focus .stat-header-row>*{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gh-client body:not(.ab-3d) #match-screen.gh-focus .v2d-wrap #cv2d{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important}
