/* Yüzbir uygulama ekranları */

#app { position: relative; z-index: 1; min-height: 100dvh; }
body.no-scroll { overflow: hidden; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.link { color: var(--gold); font-weight: 700; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }

.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot .logo-mark { animation: bootPulse 1.2s ease-in-out infinite; width: 46px; height: 60px; font-size: 18px; }
@keyframes bootPulse { 50% { transform: rotate(6deg) scale(1.06); } }

.view-enter { animation: viewIn 0.5s var(--ease) backwards; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, var(--shadow);
}

/* --- Üst menü ve sekmeler ------------------------------------------ */

.topbar { position: sticky; top: 0; z-index: 40; background: rgba(6, 16, 12, 0.7); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); border-bottom: 1px solid var(--line-soft); padding-top: env(safe-area-inset-top); }
.topbar-inner { max-width: 1320px; margin: 0 auto; height: 68px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.topbar .logo-mark { width: 30px; height: 39px; font-size: 12px; }
.topbar .logo-word { font-size: 21px; }
.topnav { display: flex; gap: 4px; }
.topnav a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); transition: color 0.2s, background 0.2s; }
.topnav a svg { width: 18px; height: 18px; }
.topnav a:hover { color: var(--text); }
.topnav a.active { color: var(--text); background: var(--surface-2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #1d1508; background: linear-gradient(160deg, #f2d595, var(--gold-2)); box-shadow: 0 0 0 3px rgba(230, 196, 127, 0.15); }

.main { max-width: 1100px; margin: 0 auto; padding: 36px 24px 120px; }
.main-wide { max-width: 1320px; }

.tabbar { display: none; }

/* --- Avatar --------------------------------------------------------- */

.avatar { --c: #888; width: 36px; height: 36px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000)); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35), 0 4px 10px -2px color-mix(in srgb, var(--c) 50%, transparent); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.avatar.sm { width: 26px; height: 26px; font-size: 11.5px; }
.avatar.lg { width: 52px; height: 52px; font-size: 21px; }
.avatar.xl { width: 84px; height: 84px; font-size: 34px; }
.dot { --c: #888; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); flex: none; margin-right: 7px; vertical-align: middle; }

/* --- Giriş ---------------------------------------------------------- */

.auth { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { position: relative; overflow: hidden; padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(700px 500px at 30% 30%, rgba(46, 140, 98, 0.35), transparent 70%), radial-gradient(500px 400px at 80% 90%, rgba(230, 196, 127, 0.14), transparent 70%), linear-gradient(160deg, #0d241a, #07120d); border-right: 1px solid var(--line-soft); }
.auth-art::after { content: ''; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 50% 50%, transparent 0 3px, rgba(255, 255, 255, 0.012) 3px 4px); pointer-events: none; }
.auth-rack { display: flex; gap: 6px; padding: 18px 20px 26px; border-radius: 18px; align-self: flex-start; background: linear-gradient(180deg, #5b3a1f, #3e2713); box-shadow: 0 2px 0 rgba(255, 255, 255, 0.1) inset, 0 -6px 0 rgba(0, 0, 0, 0.3) inset, var(--shadow-lg); transform: rotate(-4deg); }
.auth-rack .tile.joker { color: var(--gold-2); }
.auth-art blockquote { font-size: clamp(28px, 3vw, 40px); line-height: 1.15; margin: 0; max-width: 460px; font-weight: 500; }
.auth-art p { color: var(--muted); margin: 0; font-weight: 600; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-logo-mobile { display: none; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 40px; margin: 0 0 8px; line-height: 1.05; }
.auth-card > .muted { margin: 0 0 30px; }
.form { display: grid; gap: 16px; }
.form-row { display: flex; justify-content: flex-end; margin-top: -6px; font-size: 14px; }
.form-error { color: var(--bad); font-size: 14px; font-weight: 600; min-height: 1px; }
.form-error:empty { display: none; }
.auth-switch { text-align: center; color: var(--muted); margin-top: 26px; font-size: 14.5px; }
.notice { padding: 14px 16px; border-radius: 14px; background: rgba(230, 196, 127, 0.08); border: 1px solid var(--line); color: var(--gold); font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.notice-good { background: var(--good-bg); border-color: rgba(88, 209, 151, 0.25); color: var(--good); }

/* --- Ana sayfa ------------------------------------------------------ */

.page-title { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.05; margin: 0 0 8px; }
.page-title.sm { font-size: clamp(28px, 3.6vw, 38px); margin: 0; }
.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
.page-head p { margin: 0; }

.home-hero { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; margin-bottom: 26px; }
.home-hero p { margin: 0; }
.new-game-cta { display: flex; align-items: center; gap: 18px; padding: 18px 20px 18px 22px; border-radius: 24px; min-width: 340px; background: radial-gradient(260px 120px at 0% 0%, rgba(255, 255, 255, 0.35), transparent 70%), linear-gradient(160deg, #f2d595, var(--gold) 45%, var(--gold-2)); color: #1d1508; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 20px 50px -14px rgba(230, 196, 127, 0.45); transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.new-game-cta:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 26px 60px -12px rgba(230, 196, 127, 0.55); }
.ngc-tiles { display: flex; gap: 3px; }
.ngc-tiles .tile { box-shadow: 0 1px 0 #fff inset, 0 -3px 0 var(--ivory-edge) inset, 0 6px 12px -4px rgba(60, 40, 0, 0.5); }
.ngc-tiles .tile:nth-child(2) { transform: translateY(-5px); }
.ngc-text { display: grid; }
.ngc-text strong { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; }
.ngc-text span { font-size: 13px; font-weight: 700; opacity: 0.7; }
.ngc-plus { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(29, 21, 8, 0.12); }
.ngc-plus svg { width: 22px; height: 22px; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 40px; }
.stat { padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.025); display: grid; gap: 4px; min-width: 0; }
.stat-label { font-size: 12px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.stat strong { font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat strong small { font-size: 15px; color: var(--gold); margin-left: 4px; font-family: var(--font-ui); font-weight: 800; }

.block { margin-bottom: 40px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.block-head h2 { font-size: 24px; margin: 0; }

.game-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.game-card { padding: 20px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: radial-gradient(300px 140px at 100% 0%, rgba(230, 196, 127, 0.1), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)); display: grid; gap: 16px; transition: transform 0.3s var(--ease), border-color 0.3s; box-shadow: var(--shadow); }
.game-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.gc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gc-title { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.015em; }
.gc-sub { font-size: 13px; color: var(--muted); font-weight: 600; }
.ring { --p: 0; width: 54px; height: 54px; border-radius: 50%; flex: none; display: grid; place-items: center; background: radial-gradient(closest-side, var(--surface-solid) 78%, transparent 80% 100%), conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0); }
.ring span { font-weight: 800; font-size: 14px; }
.ring small { color: var(--dim); font-size: 11px; }
.gc-players { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gc-player { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.2); min-width: 0; }
.gc-player.lead { box-shadow: 0 0 0 1px var(--line-strong) inset; }
.gc-name { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-score { margin-left: auto; font-weight: 800; font-size: 14px; }
.gc-player.lead .gc-score { color: var(--gold); }
.gc-foot { display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: 14px; color: var(--gold); }
.gc-foot svg { width: 16px; height: 16px; }

.history { padding: 6px; }
.history-row { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; transition: background 0.2s; }
.history-row + .history-row { border-top: 1px solid var(--line-soft); }
.history-row:hover { background: rgba(255, 255, 255, 0.03); }
.hr-crown { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--gold); background: rgba(230, 196, 127, 0.1); flex: none; }
.hr-crown svg { width: 20px; height: 20px; }
.hr-main { min-width: 0; flex: 1; }
.hr-title { font-weight: 800; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-title .muted { font-weight: 600; }
.hr-sub { font-size: 13px; color: var(--dim); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-scores { display: flex; gap: 14px; }
.hr-score { display: inline-flex; align-items: center; font-weight: 700; font-size: 13.5px; color: var(--muted); }
.hr-score:first-child { color: var(--gold); }
.hr-arrow { color: var(--dim); }
.hr-arrow svg { width: 18px; height: 18px; }

.empty { text-align: center; padding: 48px 24px; display: grid; justify-items: center; gap: 4px; }
.empty h2, .empty h3 { margin: 12px 0 0; font-size: 24px; }
.empty p { margin: 0 0 16px; max-width: 360px; }
.empty-tiles .tile { transform: rotate(-8deg); }

.skeleton-page { height: 60vh; border-radius: var(--radius-lg); background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* --- Yeni oyun ------------------------------------------------------ */

.setup { display: grid; gap: 16px; }
.setup-block { padding: 24px; }
.setup-h { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 800; margin: 0 0 18px; }
.setup-hint { margin-left: auto; font-size: 14px; font-weight: 700; }
.step-no { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #1d1508; background: linear-gradient(160deg, #f2d595, var(--gold-2)); }

.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode { position: relative; text-align: left; padding: 20px; border-radius: 20px; border: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.2); cursor: pointer; display: grid; gap: 2px; transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease); }
.mode:active { transform: scale(0.98); }
.mode strong { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.mode span { color: var(--muted); font-size: 14px; font-weight: 600; }
.mode.active { border-color: var(--gold-2); background: radial-gradient(240px 120px at 0% 0%, rgba(230, 196, 127, 0.14), transparent 70%), rgba(0, 0, 0, 0.2); box-shadow: 0 0 0 3px rgba(230, 196, 127, 0.1); }
.mode-art { display: flex; gap: 6px; margin-bottom: 14px; }
.mode-art.pairs { gap: 14px; }
.mpair { display: flex; gap: 3px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.mdot { --c: #888; width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3); }
.mode-check { position: absolute; top: 16px; right: 16px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-soft); color: transparent; transition: all 0.2s; }
.mode-check svg { width: 15px; height: 15px; }
.mode.active .mode-check { background: var(--gold); border-color: var(--gold); color: #1d1508; }

.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.team { padding: 12px; border-radius: 18px; border: 1px dashed var(--line); }
.team-label { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin: 0 4px 10px; }
.seats { display: grid; gap: 10px; }
.seats.four { grid-template-columns: repeat(4, 1fr); }
.seats.two { grid-template-columns: 1fr; }
.seat { position: relative; display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 14px; border-radius: 16px; border: 1.5px dashed var(--line-soft); background: rgba(0, 0, 0, 0.18); cursor: pointer; min-width: 0; transition: all 0.2s; }
.seat.filled { border-style: solid; border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 10%, rgba(0, 0, 0, 0.2)); }
.seat-name { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-empty { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); color: var(--dim); flex: none; }
.seat-empty svg { width: 16px; height: 16px; }
.seat-x { margin-left: auto; color: var(--dim); }
.seat-x svg { width: 16px; height: 16px; }

.pool { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.pool-label { font-size: 13px; font-weight: 700; color: var(--dim); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.03); font-weight: 700; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.chip:hover { border-color: var(--line); }
.chip svg { width: 15px; height: 15px; margin-left: 6px; color: var(--gold); }
.chip.on { border-color: var(--gold-2); background: rgba(230, 196, 127, 0.1); }
.add-player { display: flex; gap: 8px; margin-top: 14px; }
.add-player .input { height: 46px; }
.add-player .btn { height: 46px; }
.add-player-lg { padding: 12px; margin-bottom: 20px; }

.settings-grid { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: end; }
.stepper { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line-soft); }
.stepper strong { min-width: 48px; text-align: center; font-size: 22px; font-family: var(--font-display); }
.stepper .btn { width: 42px; height: 42px; }
.adv-toggle { margin-top: 18px; background: none; border: 0; padding: 0; color: var(--gold); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.adv-toggle svg { width: 15px; height: 15px; }
.setup-foot { position: sticky; bottom: 0; padding: 18px 0 calc(18px + env(safe-area-inset-bottom)); display: flex; justify-content: flex-end; background: linear-gradient(transparent, var(--bg) 40%); z-index: 5; margin-top: 8px; }

.pen-editor { display: grid; gap: 8px; margin-top: 16px; }
.pen-edit-row { display: grid; grid-template-columns: 1fr 100px 36px; gap: 8px; align-items: center; }
label.pen-edit-row { grid-template-columns: 1fr 100px 36px; font-weight: 700; font-size: 14px; color: var(--muted); padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
label.pen-edit-row input { grid-column: 2; }
.pen-edit-row .input { height: 44px; font-size: 15px; }
.pen-editor > .btn { justify-self: start; margin-top: 4px; }

/* --- Oyun ----------------------------------------------------------- */

.game-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.gh-main { min-width: 0; flex: 1; }
.gh-title { font-size: clamp(24px, 3vw, 34px); margin: 0; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-soft); font-size: 12.5px; font-weight: 800; color: var(--muted); }
.badge-gold { color: #1d1508; background: var(--gold); border-color: transparent; }
.save-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--dim); }
.save-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.save-state[data-state='saving'] i { background: var(--gold); animation: pulseDot 0.9s infinite; }
.save-state[data-state='error'] { color: var(--bad); }
.save-state[data-state='error'] i { background: var(--bad); }
@keyframes pulseDot { 50% { opacity: 0.3; } }
.gh-actions { display: flex; gap: 8px; align-items: center; }

.game-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }

.board { padding: 8px; overflow: hidden; }
.board-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.score { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.score th, .score td { text-align: center; padding: 0 6px; }
.score .lbl { width: 84px; text-align: left; padding-left: 14px; }
.score thead th { position: sticky; top: 0; background: var(--surface-solid); z-index: 1; }
.team-head th { padding-top: 8px; }
.team-head th span { display: block; margin: 0 4px; padding: 5px 0; border-radius: 10px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); background: rgba(230, 196, 127, 0.08); }
.pcol { padding: 14px 4px 12px !important; border-bottom: 1px solid var(--line-soft); }
.ph { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.ph-name { font-size: 13.5px; font-weight: 800; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcol.leader .ph-name { color: var(--gold); }
.pcol.leader .avatar { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--gold); }
.score thead tr:last-child th.lbl { border-bottom: 1px solid var(--line-soft); font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); vertical-align: bottom; padding-bottom: 14px; }

.score tbody tr { cursor: pointer; }
.row-hand td { height: 50px; font-size: 18px; font-weight: 700; border-top: 1px solid var(--line-soft); }
.score tbody tr.row-hand:first-child td { border-top: 0; }
.row-hand:hover td { background: rgba(255, 255, 255, 0.025); }
.row-hand .lbl { display: flex; align-items: center; gap: 8px; height: 50px; }
.hand-no { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); font-size: 13px; font-weight: 800; color: var(--muted); }
.hand-tag { font-size: 10.5px; font-weight: 800; color: var(--dim); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.pt { position: relative; }
.pt.neg { color: var(--good); }
.pt.fin .num { display: inline-block; padding: 3px 9px; border-radius: 9px; background: var(--good-bg); box-shadow: 0 0 0 1px rgba(88, 209, 151, 0.25) inset; }
.fin-ico { position: absolute; top: 5px; right: calc(50% - 34px); color: var(--gold); }
.fin-ico svg { width: 12px; height: 12px; }
.pt.nopen { color: var(--bad); }
.tag-mini { font-style: normal; font-size: 9.5px; font-weight: 800; margin-left: 4px; padding: 1px 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); color: var(--muted); vertical-align: 2px; }

.row-sum td { height: 34px; font-size: 14px; font-weight: 800; color: var(--gold); background: linear-gradient(90deg, rgba(230, 196, 127, 0.07), rgba(230, 196, 127, 0.04)); }
.row-sum td:first-child { border-radius: 10px 0 0 10px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-2); }
.row-sum td:last-child { border-radius: 0 10px 10px 0; }
.row-team td { height: 28px; font-size: 13px; font-weight: 800; color: var(--text); }
.row-team td:first-child { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.row-team td[colspan] { background: rgba(255, 255, 255, 0.03); border-radius: 8px; }

.row-next td { height: 58px; border-top: 1px solid var(--line-soft); }
.row-next td[colspan] { padding: 6px; }
.next-cta { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 14px; border: 1.5px dashed var(--line-strong); color: var(--gold); font-weight: 800; font-size: 15px; background: rgba(230, 196, 127, 0.05); transition: background 0.2s; animation: nextGlow 2.4s ease-in-out infinite; }
.next-cta svg { width: 18px; height: 18px; }
.row-next:hover .next-cta { background: rgba(230, 196, 127, 0.1); }
@keyframes nextGlow { 50% { box-shadow: 0 0 0 4px rgba(230, 196, 127, 0.06); } }
.row-empty td { height: 44px; color: var(--dim); opacity: 0.45; border-top: 1px solid var(--line-soft); }
.row-empty { cursor: default !important; }

.score tfoot td { height: 40px; font-weight: 800; font-size: 15px; }
.score tfoot tr:first-child td { border-top: 1.5px solid var(--line); padding-top: 6px; }
.score tfoot .lbl { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.f-pen td:not(.lbl) { color: var(--bad); }
.f-grand td { height: 58px; font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.f-grand td.lbl { font-family: var(--font-ui); color: var(--gold); }
.f-grand td.leader { color: var(--gold); }
.f-grand td.leader::after { content: ''; display: block; width: 26px; height: 3px; margin: 2px auto 0; border-radius: 3px; background: var(--gold); }
.f-team td[colspan] { font-family: var(--font-display); font-size: 20px; background: rgba(255, 255, 255, 0.04); border-radius: 12px; }
.f-team td.leader { color: #1d1508; background: linear-gradient(160deg, #f2d595, var(--gold-2)) !important; }

/* Ceza paneli */
.pen-panel { padding: 20px; position: sticky; top: 88px; display: grid; gap: 16px; max-height: calc(100dvh - 108px); grid-template-rows: auto auto minmax(0, 1fr) auto; }
.pen-head h2 { font-size: 21px; margin: 0; }
.pen-head .muted { font-size: 13px; font-weight: 600; }
.pen-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pen-q { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.2); font-weight: 700; font-size: 13.5px; cursor: pointer; min-width: 0; transition: all 0.2s; }
.pen-q span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pen-q > svg { width: 16px; height: 16px; margin-left: auto; color: var(--bad); flex: none; }
.pen-q:hover { border-color: rgba(240, 122, 106, 0.35); background: var(--bad-bg); }
.pen-list { overflow-y: auto; display: grid; gap: 6px; align-content: start; min-height: 60px; margin: 0 -4px; padding: 0 4px; }
.pen-item { display: flex; align-items: center; gap: 4px; padding: 8px 6px 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.2); }
.pen-txt { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.pen-txt strong { font-size: 13.5px; }
.pen-txt span { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pen-pts { font-weight: 800; color: var(--bad); font-size: 14px; }
.pen-item .btn { color: var(--dim); }
.pen-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 0; color: var(--dim); font-size: 13.5px; font-weight: 600; text-align: center; }
.pen-empty svg { width: 28px; height: 28px; color: var(--gold-3); }
.pen-totals { border-top: 1.5px solid var(--line); padding-top: 12px; display: grid; gap: 4px; }
.pen-total { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; padding: 3px 2px; }
.pen-total .num { color: var(--bad); font-weight: 800; }
.pen-total.all { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--bad-bg); font-weight: 800; }

.action-bar { display: none; }

/* Sonuç */
.results { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 24px 28px; margin-bottom: 18px; border-radius: var(--radius-lg); border: 1px solid var(--line-strong); background: linear-gradient(160deg, #1a2e22, #0e1c15); box-shadow: var(--shadow-lg); animation: viewIn 0.6s var(--ease) backwards; }
.results-glow { position: absolute; inset: -40% auto auto -10%; width: 420px; height: 300px; background: radial-gradient(closest-side, rgba(230, 196, 127, 0.28), transparent); pointer-events: none; }
.results-main { display: flex; align-items: center; gap: 18px; position: relative; }
.results-crown { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #1d1508; background: linear-gradient(160deg, #f6dea5, var(--gold-2)); box-shadow: 0 12px 30px -8px rgba(230, 196, 127, 0.6); }
.results-crown svg { width: 32px; height: 32px; }
.results-name { font-size: 30px; margin: 0; line-height: 1.1; }
.results-score { color: var(--gold); font-weight: 800; }
.results-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; position: relative; }
.results-rank li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px; }
.rk { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); font-size: 12px; font-weight: 800; color: var(--muted); }
.rk-name { flex: 1; }
.results-actions { display: flex; flex-direction: column; gap: 8px; position: relative; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: 0.9; } }

/* --- Pencere / alt sayfa ------------------------------------------- */

.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 4, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.28s; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; border-radius: 28px; background: linear-gradient(180deg, #14281f, #0d1b15); border: 1px solid var(--line); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(20px) scale(0.98); transition: transform 0.32s var(--ease), opacity 0.25s; }
.sheet-sm { max-width: 420px; }
.sheet-lg { max-width: 680px; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { opacity: 1; transform: none; }
.sheet-grip { display: none; }
.sheet-body { padding: 24px; display: grid; gap: 18px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; }
.sheet-head h3 { margin: 0; font-size: 30px; line-height: 1.05; }

.dialog { display: grid; gap: 14px; }
.dialog h3 { margin: 0; font-size: 26px; }
.dialog p { margin: 0; color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.seg { display: flex; padding: 4px; gap: 4px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-soft); }
.seg button { flex: 1; height: 40px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; transition: all 0.2s; white-space: nowrap; padding: 0 8px; }
.seg button.on { background: var(--surface-raised); color: var(--text); box-shadow: 0 0 0 1px var(--line) inset, 0 4px 10px -4px rgba(0, 0, 0, 0.5); }
.seg-sm button { height: 34px; font-size: 12.5px; }

.hs-block { display: grid; gap: 10px; }
.hs-label { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.hs-hint { font-size: 13.5px; color: var(--muted); padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); font-weight: 600; }
.hs-hint.gold { color: var(--gold); background: rgba(230, 196, 127, 0.07); }

.who-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.who { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: 18px; border: 1.5px solid var(--line-soft); background: rgba(0, 0, 0, 0.2); cursor: pointer; font-weight: 700; font-size: 13.5px; min-width: 0; transition: all 0.2s var(--ease); }
.who span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who:active { transform: scale(0.96); }
.who.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, rgba(0, 0, 0, 0.2)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.who-crown { position: absolute; top: 6px; right: 8px; color: var(--gold); }
.who-crown svg { width: 15px; height: 15px; }

.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.2); cursor: pointer; text-align: left; transition: all 0.2s; }
.type span { font-size: 13px; font-weight: 700; color: var(--muted); line-height: 1.25; }
.type strong { font-size: 16px; color: var(--good); }
.type.on { border-color: var(--gold-2); background: rgba(230, 196, 127, 0.1); }
.type.on span { color: var(--text); }

.entries { display: grid; gap: 8px; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) auto 92px 64px; gap: 10px; align-items: center; padding: 8px 8px 8px 12px; border-radius: 16px; background: rgba(0, 0, 0, 0.22); border-left: 3px solid var(--c); }
.entry-who { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; min-width: 0; }
.entry-who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-input { height: 44px; text-align: center; font-size: 18px; font-weight: 800; padding: 0 6px; }
.entry-input:disabled { opacity: 0.35; }
.entry-pts { text-align: right; font-weight: 800; font-size: 16px; color: var(--gold); padding-right: 4px; }

.manual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.manual-field { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 84px; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 16px; background: rgba(0, 0, 0, 0.22); border-left: 3px solid var(--c); font-weight: 700; font-size: 14px; }
.manual-field span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.manual-field .input { height: 42px; text-align: center; font-size: 17px; font-weight: 800; padding: 0 6px; }
.sign-btn { font-size: 16px; font-weight: 800; }

.void-box { grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); }
.void-box p { margin: 0; color: var(--muted); font-size: 14px; }
.void-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(230, 196, 127, 0.1); color: var(--gold); }
.void-ico svg { width: 22px; height: 22px; }

.hs-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 12px; border-radius: 16px; background: linear-gradient(180deg, rgba(230, 196, 127, 0.08), rgba(230, 196, 127, 0.03)); border: 1px solid var(--line); }
.pv { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.pv .dot { margin: 0; }
.pv-name { font-size: 12px; font-weight: 700; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv strong { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.pv strong.neg { color: var(--good); }
.sheet-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: sticky; bottom: -24px; margin: 0 -24px -24px; padding: 14px 24px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, #0d1b15 30%); }

.hand-pick { display: inline-flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--muted); }
.hand-pick .input { height: 34px; width: 72px; padding: 0 10px; font-size: 14px; border-radius: 10px; }
.pen-types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pen-types.disabled { opacity: 0.4; }
.pen-type { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 52px; padding: 0 14px; border-radius: 14px; border: 1px solid rgba(240, 122, 106, 0.18); background: var(--bad-bg); cursor: pointer; font-weight: 700; font-size: 14px; text-align: left; transition: all 0.2s; }
.pen-type strong { color: var(--bad); font-size: 14px; }
.pen-type:hover { border-color: rgba(240, 122, 106, 0.45); }
.pen-type:active { transform: scale(0.97); }
.custom-row { display: grid; grid-template-columns: 1fr 90px auto; gap: 8px; }
.custom-row .input { height: 46px; }
.custom-row .btn { height: 46px; }

.menu-list { display: grid; gap: 4px; }
.menu-list button { display: flex; align-items: center; gap: 14px; height: 54px; padding: 0 14px; border: 0; border-radius: 14px; background: transparent; font-weight: 700; font-size: 15px; cursor: pointer; text-align: left; }
.menu-list button:hover { background: rgba(255, 255, 255, 0.04); }
.menu-list button svg { width: 20px; height: 20px; color: var(--muted); }
.menu-list button.danger, .menu-list button.danger svg { color: var(--bad); }

/* --- Oyuncular ------------------------------------------------------ */

.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.player-card { position: relative; overflow: hidden; text-align: left; padding: 20px; cursor: pointer; display: grid; gap: 16px; transition: transform 0.3s var(--ease), border-color 0.3s; }
.player-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 120px; background: radial-gradient(300px 120px at 0% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%); pointer-events: none; }
.player-card:hover { transform: translateY(-3px); border-color: var(--line); }
.pc-top { display: flex; align-items: center; gap: 14px; position: relative; }
.pc-name { display: grid; min-width: 0; }
.pc-name strong { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-name .muted { font-size: 13px; font-weight: 600; }
.pc-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #1d1508; background: linear-gradient(160deg, #f2d595, var(--gold-2)); flex: none; }
.pc-badge svg { width: 13px; height: 13px; }
.pc-bar { height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.pc-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 50%, #fff)); }
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pc-stats div { padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.2); display: grid; }
.pc-stats strong { font-size: 19px; font-weight: 800; }
.pc-stats strong small { font-size: 12px; color: var(--muted); }
.pc-stats span { font-size: 11.5px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }

.edit-avatar { display: grid; place-items: center; padding: 6px 0 4px; }
.palette { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3); transition: transform 0.2s; }
.swatch.on { box-shadow: 0 0 0 3px #0d1b15, 0 0 0 5px var(--c); transform: scale(1.06); }

/* --- Hesap ---------------------------------------------------------- */

.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.form-card { padding: 24px; display: grid; gap: 14px; }
.form-card h2 { margin: 0; font-size: 22px; }
.form-card p { margin: 0; }
.form-card .btn { justify-self: start; }

/* --- Bildirim ------------------------------------------------------- */

#toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; border-radius: 16px; background: rgba(22, 38, 30, 0.96); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-weight: 700; font-size: 14px; opacity: 0; transform: translateY(14px) scale(0.98); transition: all 0.3s var(--ease); backdrop-filter: blur(10px); }
.toast.show { opacity: 1; transform: none; }
.toast-success { border-color: rgba(88, 209, 151, 0.35); }
.toast-success::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.toast-error { border-color: rgba(240, 122, 106, 0.4); color: #ffc5bb; }
.toast-warn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); flex: none; }
.toast button { border: 0; background: rgba(230, 196, 127, 0.14); color: var(--gold); font-weight: 800; padding: 7px 12px; border-radius: 10px; cursor: pointer; }

/* --- Duyarlı -------------------------------------------------------- */

@media (max-width: 1060px) {
  .game-grid { grid-template-columns: 1fr; }
  .pen-panel { position: static; max-height: none; }
  .pen-quick { grid-template-columns: repeat(4, 1fr); }
  .results { grid-template-columns: 1fr; gap: 18px; }
  .results-actions { flex-direction: row; }
}

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-panel { place-items: start center; padding-top: calc(36px + env(safe-area-inset-top)); }
  .auth-logo-mobile { display: inline-flex; margin-bottom: 40px; justify-self: start; width: 100%; max-width: 400px; }
  .home-hero { grid-template-columns: 1fr; }
  .new-game-cta { min-width: 0; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .hide-mobile { display: none !important; }
  .topbar-inner { height: 60px; padding: 0 16px; }
  .topnav { display: none; }
  .main { padding: 22px 16px calc(110px + env(safe-area-inset-bottom)); }

  .tabbar { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 10px; border-radius: 24px; background: rgba(13, 27, 21, 0.86); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); border: 1px solid var(--line-soft); box-shadow: var(--shadow-lg); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--dim); }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--gold); }
  .tabbar .tab-new { width: 56px; height: 56px; border-radius: 20px; margin-top: -26px; display: grid; place-items: center; color: #1d1508; background: linear-gradient(160deg, #f2d595, var(--gold) 45%, var(--gold-2)); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 14px 30px -8px rgba(230, 196, 127, 0.55), 0 0 0 6px var(--bg); }
  .tabbar .tab-new svg { width: 26px; height: 26px; }

  .page-head { margin-bottom: 20px; }
  .stat { padding: 14px 16px; }
  .stat strong { font-size: 24px; }
  .hr-scores { display: none; }
  .game-cards { grid-template-columns: 1fr; }

  .setup-block { padding: 18px; }
  .mode { padding: 16px; }
  .mode strong { font-size: 19px; }
  .mode span { font-size: 12.5px; }
  .teams { grid-template-columns: 1fr; }
  .seats.four { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .stepper { justify-self: start; }
  .setup-foot .btn { width: 100%; }

  .game-head { gap: 6px; margin-bottom: 14px; }
  .game-head > .btn-icon:first-child { margin-left: -10px; }
  .board { padding: 4px; border-radius: 20px; }
  .score .lbl { width: 52px; padding-left: 8px; }
  .score th, .score td { padding: 0 2px; }
  .row-hand td { height: 46px; font-size: 16.5px; }
  .row-hand .lbl { height: 46px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1px; }
  .hand-tag { font-size: 9px; }
  .row-sum td { font-size: 13px; height: 30px; }
  .row-sum td:first-child, .row-team td:first-child, .score tfoot .lbl { font-size: 9.5px; letter-spacing: 0.06em; }
  .pt.fin .num { padding: 2px 6px; }
  .fin-ico { right: 2px; top: 3px; }
  .ph-name { font-size: 12px; }
  .f-grand td { font-size: 19px; height: 52px; }
  .f-team td[colspan] { font-size: 17px; }
  .pen-quick { grid-template-columns: 1fr 1fr; }
  .pen-panel { padding: 16px; }

  .action-bar { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 8px; border-radius: 24px; background: rgba(13, 27, 21, 0.88); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); border: 1px solid var(--line-soft); box-shadow: var(--shadow-lg); }
  .action-bar .btn { height: 50px; }

  .results { padding: 20px; }
  .results-name { font-size: 25px; }

  /* Pencereler alttan açılır */
  .sheet-wrap { place-items: end stretch; padding: 0; }
  .sheet, .sheet-sm, .sheet-lg { max-width: none; border-radius: 28px 28px 0 0; max-height: 92dvh; transform: translateY(100%); border-bottom: 0; }
  .sheet-grip { display: block; width: 42px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.18); margin: 10px auto 0; }
  .sheet-body { padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); gap: 16px; }
  .sheet-head h3 { font-size: 26px; }
  .sheet-actions { margin: 0 -16px calc(-20px - env(safe-area-inset-bottom)); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); bottom: calc(-20px - env(safe-area-inset-bottom)); }
  .sheet-actions .btn-lg { flex: 1; }
  .who { padding: 12px 4px 10px; font-size: 12.5px; border-radius: 16px; }
  .type-grid { grid-template-columns: 1fr 1fr; }
  .entry { grid-template-columns: minmax(0, 1fr) 76px 52px; grid-template-areas: 'who in pts' 'seg seg seg'; row-gap: 8px; }
  .entry-who { grid-area: who; }
  .entry .seg { grid-area: seg; }
  .entry-input { grid-area: in; }
  .entry-pts { grid-area: pts; }
  .manual-grid { grid-template-columns: 1fr; }
  .pv strong { font-size: 19px; }
  .pen-types { grid-template-columns: 1fr 1fr; }
  .pen-type { height: auto; min-height: 52px; padding: 10px 12px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; font-size: 13.5px; }
  .custom-row { grid-template-columns: 1fr 76px auto; }
  #toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .player-grid { grid-template-columns: 1fr; }
  .add-player-lg { flex-direction: column; }
}

@media (max-width: 380px) {
  .who-grid { gap: 6px; }
  .avatar.sm { width: 22px; height: 22px; font-size: 10px; }
  .ph-name { font-size: 11px; }
}
