:root {
  --bg: #0E1117;
  --bg-2: #0A0D12;
  --card: #161B25;
  --card-2: #1E2431;
  --line: #262E3D;
  --line-2: #33405A;
  --text: #E9EDF5;
  --muted: #8C96AB;
  --acc: #F36B0C;
  --acc-2: #FF8A3D;
  --green: #22A65A;
  --red: #D23B4B;
  --blue: #2F5BEA;
  --font: 'Barlow', system-ui, sans-serif;
  --font-c: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --nav-h: 64px;
  --r: 12px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 500 16px/1.35 var(--font); overscroll-behavior-y: contain; }
[hidden] { display: none !important; }
h2, h3 { margin: 0 0 10px; font-family: var(--font-c); text-transform: uppercase; letter-spacing: .06em; }
h3 { font-size: 15px; font-weight: 700; color: var(--muted); }
h3:not(:first-child) { margin-top: 16px; }
h3 small { font-family: var(--font); font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--acc-2); margin-left: 6px; }
code { font-size: 13px; word-break: break-all; color: var(--acc-2); }
.muted { color: var(--muted); }
kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font: 700 11px/1.5 var(--font);
  text-align: center;
  vertical-align: middle;
}

/* ---------- Butonlar ---------- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--card-2);
  color: var(--text);
  font: 700 16px/1.1 var(--font);
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover { border-color: #46557A; background: #232A39; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.big { min-height: 64px; font-size: 20px; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.primary:hover { background: var(--acc-2); }
.btn.go { background: var(--green); border-color: var(--green); color: #fff; }
.btn.bad { background: var(--red); border-color: var(--red); color: #fff; }
.btn.warn { background: transparent; color: #FF9C8A; }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn kbd { border-color: rgba(255, 255, 255, .25); color: inherit; opacity: .75; }
.btn.plus { min-height: 80px; background: var(--acc); border-color: var(--acc); color: #fff; font: 800 34px/1 var(--font-c); }
.btn.plus:hover { background: var(--acc-2); }
.btn.minus { min-height: 44px; }
.btn.undo { min-height: 42px; padding: 6px 14px; background: var(--blue); border-color: var(--blue); color: #fff; white-space: nowrap; }

input, select, textarea {
  width: 100%;
  min-height: 46px;
  margin-top: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--text);
  font: 500 16px/1.3 var(--font);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(243, 107, 12, .2); }
input[type="color"] { padding: 3px; height: 46px; cursor: pointer; }
input[type="range"] { min-height: 30px; padding: 0; border: 0; background: none; accent-color: var(--acc); box-shadow: none; }
input.upper { text-transform: uppercase; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 10px; }

/* ---------- Giriş ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at top, #1A2140, var(--bg) 60%); }
.login-box { width: min(360px, 100%); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.login-logo { width: 96px; height: 96px; margin: 0 auto 4px; border-radius: 50%; box-shadow: 0 0 0 3px var(--acc), 0 10px 30px rgba(0, 0, 0, .5); }
.login-box h1 { margin: 0; font: 800 38px/1 var(--font-c); text-transform: uppercase; letter-spacing: .04em; }
.login-box .muted { margin: 0 0 8px; }
.login-box input { text-align: center; font-size: 26px; letter-spacing: .3em; }
.err { min-height: 1.4em; margin: 0; color: #FF8A7A; font-weight: 700; }

/* ---------- Gezinme ---------- */
.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.tabs > button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: none;
  color: var(--muted);
  font: 700 12px/1 var(--font);
  cursor: pointer;
}
.tabs .ic { font-size: 20px; line-height: 1; }
.tabs > button.on { color: var(--acc-2); }
.desk-only { display: none !important; }

/* ---------- Üst çubuk ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: rgba(14, 17, 23, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.mini { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font: 800 17px/1 var(--font-c); letter-spacing: .04em; }
.mini > * { white-space: nowrap; }
.m-team { display: flex; align-items: center; gap: 5px; }
.m-team i, .sc-name i, .team-btn i, .pen-head i { flex: none; width: 6px; height: 20px; border-radius: 3px; background: var(--c1, #888); }
#mScore { font-size: 24px; }
.m-clock { display: flex; flex-direction: column; margin-left: 6px; line-height: 1; }
.m-clock b { font-size: 19px; color: var(--acc-2); font-variant-numeric: tabular-nums; }
.m-clock small { font: 700 10px/1.3 var(--font); color: var(--muted); letter-spacing: .06em; }
.conn { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(210, 59, 75, .25); }
.conn.ok { background: #36C46F; box-shadow: 0 0 0 3px rgba(54, 196, 111, .2); }

/* ---------- İçerik ---------- */
main { max-width: 680px; margin: 0 auto; padding: 12px 12px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
.tab { display: none; }
.tab.active { display: block; }
.card { margin-bottom: 12px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.row { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.row > label { margin-bottom: 0; }
.grow { flex: 1; min-width: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.row4 .btn { padding: 8px 4px; font-size: 15px; }
.hint { margin: 6px 4px 12px; color: var(--muted); font-size: 13px; }
.card .hint:last-child { margin-bottom: 0; }

.seg { display: flex; gap: 4px; margin-bottom: 10px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.seg button { flex: 1; min-height: 44px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: 700 15px/1.1 var(--font); cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--acc); color: #fff; }
.seg.small button { min-height: 38px; font-size: 14px; }

/* ---------- Maç ---------- */
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.score-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.sc-name { display: flex; align-items: center; gap: 8px; font: 800 22px/1 var(--font-c); letter-spacing: .05em; }
.sc-value { font: 800 76px/1 var(--font-c); text-align: center; font-variant-numeric: tabular-nums; }
.clock-big { margin: 2px 0 12px; font: 800 66px/1 var(--font-c); text-align: center; color: var(--acc-2); font-variant-numeric: tabular-nums; }
.clock-big.paused { color: var(--muted); }
#clockToggle { width: 100%; }
#clockToggle.stop { background: var(--red); border-color: var(--red); }
.stepper { display: grid; grid-template-columns: 68px 1fr 68px; align-items: center; gap: 10px; }
.stepper .btn { font-size: 28px; }
.stepper b { text-align: center; font: 800 40px/1 var(--font-c); color: var(--acc-2); }
.history { margin: 0; padding-left: 22px; color: var(--muted); font-size: 14px; }
.history li { padding: 2px 0; }
.history li:first-child { color: var(--text); font-weight: 700; }

/* ---------- Olaylar ---------- */
.team-btn { font: 800 22px/1 var(--font-c); letter-spacing: .05em; }
.check { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 15px; color: var(--text); }
.check input { width: 22px; min-height: 22px; margin: 0; accent-color: var(--acc); }
.dur-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.dur-row > span { flex: 1; }
.mini-stepper { display: flex; align-items: center; gap: 6px; }
.mini-stepper .btn { min-height: 38px; width: 40px; padding: 0; font-size: 20px; }
.mini-stepper b { min-width: 46px; text-align: center; color: var(--text); font-weight: 700; }
.dur-row .btn.ghost { min-height: 38px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer; }
.switch-row kbd { margin-left: auto; }
.switch-row.big { font: 700 19px/1.2 var(--font-c); letter-spacing: .04em; text-transform: uppercase; }
.screens .switch-row.big { padding: 4px 0; }
.switch { appearance: none; flex: none; position: relative; width: 52px; height: 30px; min-height: 30px; margin: 0; padding: 0; border: 0; border-radius: 99px; background: #384257; cursor: pointer; transition: background .2s; box-shadow: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.2, 1.4, .4, 1); }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(22px); }
.switch:focus { box-shadow: 0 0 0 3px rgba(243, 107, 12, .3); }
.pen-team { margin-bottom: 12px; }
.pen-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font: 800 18px/1 var(--font-c); }
.pen-dots { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.pen-dots i { width: 16px; height: 16px; border-radius: 50%; }
.pen-dots i.g { background: #36C46F; }
.pen-dots i.m { background: var(--red); }
.range-row { display: grid; grid-template-columns: 1fr auto; align-items: center; color: var(--text); }
.range-row input { grid-column: 1 / -1; }
.range-row output { font-weight: 700; color: var(--acc-2); }

.list { list-style: none; margin: 8px 0 0; padding: 0; }
.list:empty { display: none; }
.list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .ev-min { min-width: 46px; font: 800 17px/1 var(--font-c); color: var(--acc-2); }
.list .ev-txt { flex: 1; min-width: 0; }
.list .ev-txt small { display: block; color: var(--muted); }
.list .btn { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.list .swatch { flex: none; width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--c1) 0 55%, var(--c2) 55%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }

/* ---------- Kurulum ---------- */
.logo-row { align-items: center; }
.logo-preview { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: contain; background: #fff; }
.logo-preview:not([src]), .logo-preview[src=""] { visibility: hidden; }
.roster-head, .r-row { display: grid; grid-template-columns: 46px 1fr 36px 36px 36px 28px; gap: 4px; align-items: center; }
.roster-head { margin-bottom: 4px; font-size: 11px; color: var(--muted); text-align: center; }
.roster-head span:nth-child(2) { text-align: left; }
.r-row { margin-bottom: 6px; }
.r-row input { margin: 0; min-height: 42px; padding: 8px 6px; font-size: 16px; }
.r-row .r-no { text-align: center; }
.chip { min-height: 42px; padding: 0; border: 1px solid var(--line-2); border-radius: 9px; background: none; color: var(--muted); font: 800 13px/1 var(--font); cursor: pointer; }
.chip.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.chip.on[data-flag="sub"] { background: var(--blue); border-color: var(--blue); }
.chip.del { border: 0; color: #FF8A7A; font-size: 18px; }

/* ---------- Saha editörü (sürükle-bırak) ---------- */
.pitch-ed {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 5 / 7;
  border-radius: 12px;
  overflow: hidden;
  background: repeating-linear-gradient(180deg, #1F8F4A 0 10%, #1A7E41 10% 20%);
}
.pitch-ed .ln { position: absolute; border: 2px solid rgba(255, 255, 255, .5); pointer-events: none; }
.pitch-ed .ln.outer { inset: 8px; }
.pitch-ed .ln.half { left: 8px; right: 8px; top: 50%; border-width: 2px 0 0; }
.pitch-ed .ln.circle { width: 22%; aspect-ratio: 1; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%); }
.pitch-ed .ln.box-t { left: 27%; right: 27%; top: 8px; height: 13%; border-top: 0; }
.pitch-ed .ln.box-b { left: 27%; right: 27%; bottom: 8px; height: 13%; border-bottom: 0; }
.pitch-ed.drop-hi, .bench.drop-hi { box-shadow: 0 0 0 3px var(--acc); }
.pitch-ed .empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: rgba(255, 255, 255, .85); font-weight: 700; text-align: center; }
.ptok {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.ptok .av {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c1) center top / cover;
  color: var(--c1ink);
  box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(0, 0, 0, .45);
  font: 800 19px/1 var(--font-c);
}
.ptok.gk .av:not(.ph) { background-color: var(--c2); color: var(--c2ink); }
.ptok .av .no { position: absolute; left: -7px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 4px; display: grid; place-items: center; border-radius: 10px; background: var(--c1); color: var(--c1ink); box-shadow: 0 0 0 2px #fff; font: 800 12px/1 var(--font-c); font-style: normal; }
.ptok .av .c { position: absolute; right: -6px; top: -5px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--acc); color: #fff; box-shadow: 0 0 0 2px #fff; font: 800 11px/1 var(--font); font-style: normal; }
.ptok .nm { max-width: 92px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .72); color: #fff; font: 700 11px/1.3 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptok.dragging { opacity: .25; }
.ptok.drop-hi .av { box-shadow: 0 0 0 3px var(--acc), 0 4px 10px rgba(0, 0, 0, .45); }
.ptok.ghost { position: fixed; z-index: 100; pointer-events: none; transform: translate(-50%, -50%) scale(1.12); }
.bench { display: flex; flex-wrap: wrap; gap: 14px 12px; min-height: 84px; padding: 12px; border: 2px dashed var(--line-2); border-radius: 12px; }
.bench .ptok { position: static; transform: none; }
.bench .ptok.ghost { position: fixed; transform: translate(-50%, -50%) scale(1.12); }
.bench:empty::before { content: 'Yedek yok — sahadan buraya sürükleyebilirsin'; align-self: center; color: var(--muted); font-size: 13px; }
.pm-av { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--card-2) center top / cover; box-shadow: 0 0 0 2px var(--line-2); }
.pm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pm-actions .file { grid-column: 1 / -1; }

/* ---------- Tasarım ---------- */
.preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .25)),
    linear-gradient(180deg, #7FA3C2 0%, #B4C7D6 34%, #3F7A3A 35%, #2C6A2B 100%);
}
.preview iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; pointer-events: none; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.preset { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); color: var(--text); font: 700 14px/1.1 var(--font); text-align: left; cursor: pointer; }
.preset:hover { border-color: var(--acc); }
.preset.on { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc) inset; }
.preset .sw { display: flex; height: 26px; border-radius: 6px; overflow: hidden; }
.preset .sw i { flex: 1; }
.colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* ---------- Oyuncu seçici / yardım ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; background: rgba(0, 0, 0, .6); }
.sheet-box { width: 100%; max-height: 86dvh; display: flex; flex-direction: column; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); background: var(--card); border-top: 3px solid var(--acc); border-radius: 20px 20px 0 0; animation: up .25s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes up { from { transform: translateY(40%); } }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sheet-head h3 { flex: 1; margin: 0; color: var(--text); font-size: 20px; }
.sheet-head .btn { min-height: 40px; }
.typed { font: 800 26px/1 var(--font-c); color: var(--acc-2); }
.sheet-body { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sheet-body .btn { justify-content: flex-start; min-height: 56px; text-align: left; }
.sheet-body .btn b { min-width: 30px; font: 800 22px/1 var(--font-c); color: var(--acc-2); }
.sheet-body .btn.extra { grid-column: 1 / -1; justify-content: center; background: var(--blue); border-color: var(--blue); color: #fff; }
.sheet-body .btn.match { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc) inset; }
.sheet-body .sep { grid-column: 1 / -1; margin: 6px 2px 0; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sheet-body .btn.dim { opacity: .6; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 15px; }
.keys dt { text-align: right; white-space: nowrap; }
.keys dd { margin: 0; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 60; max-width: 92vw; padding: 12px 18px; border-radius: 12px; background: #F4F6FA; color: #0E1117; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); pointer-events: none; opacity: 0; transform: translate(-50%, 20px); transition: transform .3s cubic-bezier(.2, 1.4, .4, 1), opacity .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #FFC2B8; }

/* ================= MASAÜSTÜ ================= */
@media (min-width: 1100px) {
  .desk-only { display: revert !important; }
  .mob-only { display: none !important; }
  #app:not([hidden]) { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }

  .tabs {
    position: sticky;
    top: 0;
    grid-row: 1 / 3;
    grid-column: 1;
    flex-direction: column;
    gap: 4px;
    height: 100vh;
    padding: 18px 12px;
    border-top: 0;
    border-right: 1px solid var(--line);
  }
  .tabs > button.desk-only { display: flex !important; }
  .tabs > button { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; height: 46px; padding: 0 14px; border-radius: 10px; font-size: 15px; }
  .tabs > button:hover { background: var(--card); color: var(--text); }
  .tabs > button.on { background: var(--card-2); color: var(--text); box-shadow: inset 3px 0 0 var(--acc); }
  .tabs .ic { width: 22px; text-align: center; font-size: 18px; }
  .nav-brand { display: flex !important; align-items: center; gap: 12px; padding: 4px 6px 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
  .nav-brand img { width: 42px; height: 42px; border-radius: 50%; }
  .nav-brand b { display: block; font: 800 20px/1 var(--font-c); text-transform: uppercase; letter-spacing: .04em; }
  .nav-brand small { color: var(--muted); font-size: 13px; }
  .nav-foot { display: flex !important; flex-direction: column; gap: 6px; margin-top: auto; }
  .nav-foot .btn { justify-content: flex-start; min-height: 40px; font-size: 14px; text-decoration: none; }

  .topbar { grid-column: 2; padding: 10px 24px; }
  .mini { font-size: 22px; gap: 12px; }
  #mScore { font-size: 30px; }
  .m-clock b { font-size: 24px; }

  main { grid-column: 2; max-width: none; width: 100%; margin: 0; padding: 20px 24px 40px; }
  main[data-view="canli"] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
  main[data-view="kurulum"] .tab.active,
  main[data-view="tasarim"] .tab.active { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; align-items: start; }
  main[data-view="kurulum"] .card, main[data-view="tasarim"] .card { margin: 0; }
  main[data-view="kurulum"] .roster-card { grid-row: span 3; }
  main[data-view="kurulum"] .lineup-ed { grid-row: span 2; }
  .pm-box { width: min(460px, 92vw); }
  main[data-view="tasarim"] .tab.active > .card:first-child { grid-column: 1 / -1; max-width: 960px; }
  .span-all { grid-column: 1 / -1; max-width: 420px; margin: 0 !important; }
  .col-title { display: block !important; margin: 0 0 12px; font-size: 14px; color: var(--muted); letter-spacing: .14em; }

  .btn.big { min-height: 58px; }
  .btn.plus { min-height: 70px; }
  .sc-value { font-size: 64px; }
  .clock-big { font-size: 58px; }

  .sheet { align-items: center; justify-content: center; }
  .sheet-box { width: min(760px, 92vw); max-height: 80vh; padding: 18px; border-top: 0; border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
  .help-box { width: min(560px, 92vw); }
  .toast { bottom: 24px; }
}
