:root {
  --bg: #1b1230;
  --bg2: #2a1c48;
  --felt: #241840;
  --ink: #f7efe2;
  --muted: #b6a8d2;
  --line: rgba(255, 255, 255, .09);
  --coral: #ff6b4a;
  --gold: #ffc23d;
  --green: #3ecf8e;
  --blue: #4aa8ff;
  --violet: #c86bff;
  --red: #ff4d6d;
  --card: #fbf4e6;
  --card-edge: #e6dac3;
  --r: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(120% 80% at 50% 0%, #3a2464 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overscroll-behavior: none;
  user-select: none; -webkit-user-select: none;
}
#app { max-width: 540px; margin: 0 auto; height: 100%; position: relative; }
.screen { display: none; height: 100%; flex-direction: column; padding: calc(12px + var(--safe-top)) 16px calc(12px + var(--safe-bot)); }
.screen.active { display: flex; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* düğmeler */
.btn {
  border: 0; border-radius: var(--r); padding: 14px 18px; font-weight: 700; font-size: 1.05rem;
  background: var(--bg2); color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px;
  box-shadow: 0 3px 0 rgba(0,0,0,.35); transition: transform .08s, filter .15s, opacity .2s;
}
.btn small { font-weight: 500; font-size: .78rem; opacity: .8; }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.btn:disabled { opacity: .35; cursor: default; }
.btn.primary { background: linear-gradient(180deg, #ff825f, var(--coral)); color: #2a0f06; }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); box-shadow: none; }
.btn.big { padding: 16px 18px; font-size: 1.2rem; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-size: 1.15rem; display: grid; place-items: center; }

/* ana menü */
#home { gap: 14px; overflow-y: auto; }
#home .corner { position: absolute; right: 16px; top: calc(12px + var(--safe-top)); }
.logo { text-align: center; margin: 18px 0 6px; }
.fan { height: 92px; position: relative; }
.fan i {
  position: absolute; left: 50%; bottom: 0; width: 52px; height: 74px; margin-left: -26px; border-radius: 9px;
  background: var(--card); border: 2px solid var(--card-edge); color: var(--c); font-style: normal; font-weight: 900; font-size: 1.6rem;
  display: grid; place-items: start; padding: 4px 6px; font-size: 1.15rem; transform-origin: 50% 160%; transform: rotate(var(--r));
  box-shadow: 0 6px 14px rgba(0,0,0,.35);
}
.logo h1 { margin: 10px 0 0; font-size: 3rem; letter-spacing: .06em; font-weight: 900; line-height: 1; }
.logo h1 span { color: var(--gold); margin-left: .12em; text-shadow: 0 0 22px rgba(255,194,61,.45); }
.tagline { margin: 6px 0 0; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.field input { border: 1.5px solid var(--line); background: rgba(255,255,255,.05); border-radius: 12px; padding: 12px 14px; font-size: 1.05rem; color: var(--ink); outline: none; user-select: text; }
.field input:focus { border-color: var(--gold); }
.seg { display: flex; background: rgba(255,255,255,.05); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 10px 0; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--gold); color: #2a1a00; }
.menu { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
#apkLink { text-decoration: none; font-size: .95rem; }
.foot { text-align: center; color: var(--muted); font-size: .72rem; margin-top: auto; opacity: .7; }

/* oyun ekranı */
#game { gap: 8px; padding-top: calc(8px + var(--safe-top)); }
.topbar { display: flex; align-items: center; justify-content: space-between; }
.round-info { text-align: center; display: flex; flex-direction: column; line-height: 1.15; }
.round-info span { font-size: .75rem; color: var(--muted); }

.opponents { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.opponents.n1 { grid-template-columns: 1fr; }
.opp {
  background: rgba(255,255,255,.04); border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 8px; min-height: 74px;
  display: flex; flex-direction: column; gap: 4px; transition: border-color .2s, background .2s, opacity .3s; position: relative;
}
.opp.turn, .me.turn { border-color: var(--gold); background: rgba(255,194,61,.08); box-shadow: 0 0 0 3px rgba(255,194,61,.12); }
.opp.out { opacity: .62; }
.opp.busted .mini-row { filter: grayscale(.9); }
.opp-head { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.opp-head b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opp-head .tot { font-weight: 800; color: var(--gold); }
.opp-sub { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 6px; font-size: .72rem; color: var(--muted); white-space: nowrap; }
.badge { font-size: .66rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.1); text-transform: uppercase; letter-spacing: .04em; }
.badge.busted { background: var(--red); color: #fff; }
.badge.stayed { background: var(--green); color: #052; }
.badge.frozen { background: #8fd3ff; color: #032c4a; }
.badge.seven { background: var(--gold); color: #2a1a00; }
.mini-row { display: flex; flex-wrap: wrap; gap: 3px; }

.table-mid { display: flex; align-items: center; gap: 12px; padding: 4px 2px; min-height: 76px; }
.pile { position: relative; width: 50px; height: 70px; flex: none; }
.pile .back, .card.back {
  position: absolute; inset: 0; border-radius: 9px; border: 2px solid #f7efe2;
  background: repeating-linear-gradient(45deg, #ff6b4a 0 6px, #e0553a 6px 12px);
  box-shadow: 3px 3px 0 #b84430, 6px 6px 0 #7e2d20;
}
.pile span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 1.05rem; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.banner { flex: 1; font-size: .95rem; line-height: 1.3; min-height: 2.6em; display: flex; align-items: center; }
.banner b { color: var(--gold); }
.banner.pop { animation: pop .35s ease; }

.me { margin-top: auto; background: var(--felt); border: 1.5px solid var(--line); border-radius: 18px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; transition: border-color .2s, box-shadow .2s; }
.me-head { display: flex; justify-content: space-between; align-items: center; }
.me-name { display: flex; align-items: center; gap: 6px; }
.me-name em { font-style: normal; }
.me-score { display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: baseline; font-size: .74rem; color: var(--muted); text-align: right; }
.me-score b { color: var(--ink); font-size: 1.15rem; }
.me-score b#meTotal { color: var(--gold); }
.seven-track { display: flex; gap: 5px; }
.seven-track i { flex: 1; height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); transition: background .25s; }
.seven-track i.on { background: var(--green); }
.seven-track.full i { background: var(--gold); }
.hand { display: flex; flex-wrap: wrap; gap: 6px; min-height: 76px; align-content: flex-start; }
.actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.btn.hit { background: linear-gradient(180deg, #ff825f, var(--coral)); color: #2a0f06; padding: 16px; font-size: 1.2rem; }
.btn.stay { background: linear-gradient(180deg, #5ee0a4, var(--green)); color: #03301b; padding: 16px; font-size: 1.2rem; }
.btn.hit.danger small { color: #5a0010; font-weight: 800; }

/* kartlar */
.card {
  width: 50px; height: 70px; border-radius: 9px; background: var(--card); border: 2px solid var(--card-edge);
  display: grid; place-items: center; position: relative; font-weight: 900; color: var(--c, #333); font-size: 1.6rem;
  box-shadow: 0 3px 8px rgba(0,0,0,.3); flex: none;
}
.card::before, .card::after { content: attr(data-v); position: absolute; font-size: .58rem; font-weight: 800; }
.card::before { top: 3px; left: 5px; }
.card::after { bottom: 3px; right: 5px; transform: rotate(180deg); }
.card.m { background: linear-gradient(160deg, #ffe08a, var(--gold)); border-color: #e0a520; color: #5a3a00; font-size: 1.3rem; }
.card.x2 { background: linear-gradient(160deg, #e3a6ff, var(--violet)); border-color: #9a46d0; color: #fff; font-size: 1.4rem; }
.card.a { color: #fff; font-size: 1.5rem; }
.card.a.freeze { background: linear-gradient(160deg, #b6e6ff, #4aa8ff); border-color: #2a7fd0; }
.card.a.flip3 { background: linear-gradient(160deg, #ffb48a, #ff7a2f); border-color: #d05a17; }
.card.a.chance { background: linear-gradient(160deg, #8ff0c3, #22b573); border-color: #138a55; }
.card .lbl { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: .5rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.card.a::before, .card.a::after, .card.m::before, .card.m::after, .card.x2::before, .card.x2::after { content: none; }
.card.bust { border-color: var(--red); box-shadow: 0 0 0 3px var(--red), 0 3px 8px rgba(0,0,0,.3); animation: shake .45s; }
.card.used { opacity: .45; }
.card.fresh { animation: flipIn .38s cubic-bezier(.2, .9, .3, 1.2); }
.me.busted .card:not(.bust) { filter: grayscale(.8); opacity: .6; }
.me.seven .card { animation: glow 1s ease-in-out 2; }

.mini { width: 20px; height: 27px; border-radius: 4px; background: var(--card); color: var(--c, #333); font-weight: 900; font-size: .72rem; display: inline-grid; place-items: center; flex: none; border: 1px solid var(--card-edge); }
.mini.m { background: var(--gold); color: #5a3a00; border-color: #e0a520; font-size: .6rem; }
.mini.x2 { background: var(--violet); color: #fff; border-color: #9a46d0; font-size: .6rem; }
.mini.a { color: #fff; font-size: .62rem; }
.mini.a.freeze { background: #4aa8ff; border-color: #2a7fd0; }
.mini.a.flip3 { background: #ff7a2f; border-color: #d05a17; }
.mini.a.chance { background: #22b573; border-color: #138a55; }
.mini.bust { outline: 2px solid var(--red); }
.mini.fresh { animation: flipIn .35s ease; }

/* alt pencere */
.sheet { position: fixed; inset: 0; background: rgba(10, 5, 20, .66); display: flex; align-items: flex-end; justify-content: center; z-index: 20; animation: fade .2s; }
.sheet-card {
  width: 100%; max-width: 540px; max-height: 88vh; overflow-y: auto; background: #2b1d4a; border-radius: 22px 22px 0 0;
  padding: 20px 16px calc(18px + var(--safe-bot)); animation: up .25s ease; display: flex; flex-direction: column; gap: 12px;
}
.sheet-card h2 { margin: 0; font-size: 1.35rem; }
.sheet-card p { margin: 0; }
.muted { color: var(--muted); font-size: .9rem; }
.rules p { margin: 0 0 8px; line-height: 1.45; }
.rule-cards { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.rule-cards div { display: flex; gap: 8px; align-items: center; line-height: 1.35; font-size: .93rem; }
.targets { display: flex; flex-direction: column; gap: 8px; }
.target { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); background: rgba(255,255,255,.05); border-radius: 14px; padding: 10px 12px; text-align: left; }
.target b { flex: 1; }
.target .t-info { font-size: .78rem; color: var(--muted); text-align: right; }
.target:active { border-color: var(--gold); }
.target .mini-row { max-width: 46%; justify-content: flex-end; }
.scoretable { width: 100%; border-collapse: collapse; font-size: .95rem; }
.scoretable td, .scoretable th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.scoretable th { color: var(--muted); font-weight: 600; font-size: .78rem; }
.scoretable td.n { text-align: right; font-variant-numeric: tabular-nums; }
.scoretable td.plus { color: var(--green); font-weight: 700; }
.scoretable td.zero { color: var(--red); }
.scoretable tr.me-row td { color: var(--gold); }
.bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--gold); }
.winner { text-align: center; font-size: 1.1rem; }
.winner .big-emoji { font-size: 3.4rem; display: block; animation: pop .5s; }
.row-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.toast { position: fixed; left: 50%; top: calc(64px + var(--safe-top)); transform: translateX(-50%); background: var(--gold); color: #2a1a00; font-weight: 800; padding: 10px 18px; border-radius: 999px; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.4); animation: pop .3s; white-space: nowrap; }
.toast.bad { background: var(--red); color: #fff; }
.toast.cool { background: #8fd3ff; color: #032c4a; }
.toast.good { background: var(--green); color: #03301b; }

@keyframes flipIn { from { transform: rotateY(90deg) translateY(-12px) scale(.8); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px) rotate(-4deg); } 40% { transform: translateX(6px) rotate(4deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes glow { 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 22px rgba(255,194,61,.8); } }
@keyframes pop { 0% { transform: translateX(var(--tx, 0)) scale(.85); opacity: 0; } 100% { transform: translateX(var(--tx, 0)) scale(1); opacity: 1; } }
.toast { --tx: -50%; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

@media (max-height: 700px) {
  .card { width: 44px; height: 62px; font-size: 1.4rem; }
  .hand { min-height: 62px; }
  .opp { min-height: 64px; padding: 5px 7px; }
  .logo { margin-top: 4px; }
  .fan { height: 76px; }
  .fan i { width: 44px; height: 62px; margin-left: -22px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* --- online: profil, oda, süre --- */
.profile { display: flex; gap: 10px; align-items: flex-end; }
.grow { flex: 1; }
.avatar-btn { width: 52px; height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(255,255,255,.06); font-size: 1.8rem; display: grid; place-items: center; flex: none; }
.btn.blue { background: linear-gradient(180deg, #6fb9ff, var(--blue)); color: #04223f; }
.btn.green { background: linear-gradient(180deg, #5ee0a4, var(--green)); color: #03301b; }
.btn.small { padding: 8px 12px; font-size: .9rem; }
.icon-spacer { width: 42px; }
#lobby { gap: 12px; }
.code-box { display: flex; align-items: center; gap: 10px; background: var(--felt); border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.code-box > span { color: var(--muted); font-size: .8rem; }
.code-box b { flex: 1; font-size: 2rem; letter-spacing: .18em; color: var(--gold); font-variant-numeric: tabular-nums; }
.seats { display: flex; flex-direction: column; gap: 8px; }
.seat { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.05); border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 1.05rem; }
.seat .em { font-size: 1.5rem; }
.seat b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat.me { border-color: var(--gold); }
.seat.off { opacity: .55; }
.seat.empty { border-style: dashed; color: var(--muted); justify-content: center; font-size: .9rem; }
.seat .x { border: 0; background: rgba(255,255,255,.08); border-radius: 8px; width: 30px; height: 30px; }
.host-ctl { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.lobby-note { text-align: center; color: var(--muted); margin: 0; min-height: 1.3em; }
.code-input { display: flex; gap: 8px; }
.code-input input { flex: 1; text-transform: uppercase; letter-spacing: .2em; font-size: 1.3rem; text-align: center; border: 1.5px solid var(--line); background: rgba(255,255,255,.05); border-radius: 12px; padding: 10px; color: var(--ink); outline: none; user-select: text; }
.code-input input:focus { border-color: var(--gold); }
.divider { text-align: center; color: var(--muted); font-size: .8rem; }
.tleft { font-weight: 800; color: var(--gold); font-size: .75rem; }
.tleft.low { color: var(--red); }
.off-tag { font-size: .65rem; color: var(--red); }
.timebar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.timebar i { display: block; height: 100%; background: var(--gold); width: 100%; transition: width .25s linear; }
.timebar i.low { background: var(--red); }
.net-state { position: fixed; left: 50%; bottom: calc(10px + var(--safe-bot)); transform: translateX(-50%); background: var(--red); color: #fff; font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; z-index: 40; }

/* --- Box Games Online hesap çubuğu --- */
.acc-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: -4px; }
.acc-back { color: var(--muted); text-decoration: none; font-weight: 700; font-size: .9rem; padding: 8px 0; }
.acc-chips { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); background: rgba(255,255,255,.06); border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: .9rem; max-width: 70%; white-space: nowrap; overflow: hidden; }
.acc-chips b { overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--muted); }
.coin { width: 16px; height: 16px; border-radius: 50%; flex: none; background: radial-gradient(circle, var(--gold) 0 40%, #6b4a00 41% 50%, var(--gold) 51%); border: 1.5px solid #6b4a00; }
.chip-win { color: var(--green); font-weight: 800; font-size: 1.15rem; margin: 6px 0 0; }
.chip-lose { color: var(--muted); font-weight: 700; margin: 6px 0 0; }
a.btn { text-decoration: none; text-align: center; }

/* ---------- Salonlar (BoxGames ortak salon düzeni, Seri 7 renkleri) ---------- */
#salons, #salon { flex-direction: column; gap: 10px; overflow-y: auto; }
.chip-pill { display: flex; align-items: center; gap: 6px; font-weight: 900; color: var(--gold); background: rgba(0,0,0,.3); border: 1px solid rgba(255,194,61,.45); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.acc-daily { border: none; border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 900; background: linear-gradient(135deg, var(--gold), var(--coral)); color: #2a0c18; cursor: pointer; }
.salon-list { display: flex; flex-direction: column; gap: 10px; }
.salon-card { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border-radius: 20px; color: var(--ink); font: inherit; cursor: pointer;
  border: 1px solid rgba(255,255,255,.14); overflow: hidden;
  background: linear-gradient(120deg, color-mix(in srgb, var(--c1) 26%, transparent), color-mix(in srgb, var(--c2) 18%, transparent)), var(--felt);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 8px 20px rgba(0,0,0,.3); }
.salon-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, var(--c1), var(--c2)); }
.salon-card:active { transform: scale(.98); }
.salon-icon { width: 54px; height: 54px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 30px; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: inset 0 -4px 0 rgba(0,0,0,.2); }
.salon-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.salon-info > b { font-size: 18px; }
.salon-info > small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.salon-stakes { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; font-weight: 700; }
.salon-stakes b { color: var(--gold); }
.salon-live { display: grid; grid-template-columns: auto auto; gap: 0 4px; align-items: baseline; text-align: right; font-size: 15px; }
.salon-live small { color: var(--muted); font-size: 11px; font-weight: 700; text-align: left; }
.salon-card.locked { filter: saturate(.35); }
.salon-lock { position: absolute; right: 10px; bottom: 8px; font-size: 11.5px; font-weight: 800; background: rgba(0,0,0,.55); border-radius: 999px; padding: 3px 9px; }
.salon-tools { display: flex; gap: 8px; }
.salon-tools .btn { flex: 1; }
.tables { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; }
.tables-empty { text-align: center; color: var(--muted); font-weight: 700; margin: 20px 0; }
.table-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--felt); border: 1px solid var(--line); }
.table-row.busy { opacity: .6; }
.t-no { flex: none; width: 46px; text-align: center; display: flex; flex-direction: column; line-height: 1.1; }
.t-no small { font-size: 10px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.t-no b { font-size: 20px; }
.t-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.t-count { font-size: 11.5px; font-weight: 800; color: var(--muted); }
.t-seats { display: flex; gap: 4px; }
.t-av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; background: rgba(255,255,255,.1); }
.t-free { width: 28px; height: 28px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.25); display: grid; place-items: center; color: var(--muted); font-weight: 900; }
.t-names { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-row .sit { flex: none; padding: 10px 18px; }
.t-state { flex: none; font-size: 12px; font-weight: 800; color: var(--muted); padding: 0 6px; }

/* dil düğmesi (TR/EN) */
.lang-btn { font: 700 12px/1 system-ui, sans-serif; letter-spacing: .06em; padding: 7px 10px; border-radius: 999px; border: 1.5px solid currentColor; background: transparent; color: inherit; opacity: .85; cursor: pointer; }
.lang-btn:active { transform: scale(.96); }
.lang-float { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 12px); right: 14px; z-index: 5; }

/* kilit rozeti kazanç satırının üstüne binmesin */
.salon-card.locked { padding-bottom: 34px; }

/* ===== ana menü (yeni) ===== */
#home.hm { gap: 0; padding: calc(12px + var(--safe-top)) 18px calc(18px + var(--safe-bot)); overflow-y: auto;
  background: linear-gradient(180deg, #2a1a4a 0%, #1d1336 55%, #160e2a 100%); }
.hm > * { width: 100%; max-width: 440px; margin-left: auto; margin-right: auto; }
.hm svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hm-bar { display: flex; align-items: center; gap: 8px; }
.hm-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--ink); text-decoration: none;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); padding: 0; cursor: pointer; }
.hm-icon svg { width: 20px; height: 20px; }
.hm-icon:active, .hm-acc:active { transform: scale(.95); }
.hm-lang.lang-btn { font: 800 12px/1 system-ui, sans-serif; letter-spacing: .06em; opacity: 1; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); }
.hm-sound .off, .hm-sound.is-off .on { display: none; }
.hm-sound.is-off .off { display: block; }
.hm-acc { flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 0 12px; margin-left: auto;
  border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); max-width: max-content; }
.hm-acc b { overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--muted); }

.hm-hero { display: flex; align-items: center; gap: 18px; margin-top: clamp(20px, 5dvh, 48px); margin-bottom: clamp(16px, 3.5dvh, 28px); }
.hm-fan { position: relative; width: 84px; height: 78px; flex: none; }
.hm-fan i { position: absolute; left: 22px; bottom: 0; width: 40px; height: 58px; border-radius: 7px; background: var(--card); border: 1.5px solid var(--card-edge);
  color: var(--c); font-style: normal; font-weight: 900; font-size: .95rem; display: grid; place-items: start; padding: 3px 5px;
  transform-origin: 50% 150%; transform: rotate(var(--r)); box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.hm-eyebrow { margin: 0 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9a8cbc; }
.hm-title { margin: 0; font-size: 44px; line-height: 1; font-weight: 900; letter-spacing: -.02em; }
.hm-title span { color: var(--gold); }
.hm-sub { margin: 6px 0 0; font-size: 15px; font-weight: 500; color: var(--muted); }

.hm-daily { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; margin-bottom: 12px; border-radius: 16px; text-align: left; color: var(--ink); font: inherit; cursor: pointer;
  background: rgba(255,194,61,.08); border: 1px solid rgba(255,194,61,.28); }
.hm-daily[hidden] { display: none; }
.hm-daily-ic { width: 26px; height: 26px; color: var(--gold); flex: none; }
.hm-daily-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hm-daily-t b { font-size: 15px; }
.hm-daily-t small { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.hm-daily-btn { flex: none; height: 38px; line-height: 38px; padding: 0 16px; border-radius: 11px; background: var(--gold); color: #3a2600; font-weight: 900; font-size: 15px; }

.hm-profile { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 12px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.hm-avatar { width: 46px; height: 46px; flex: none; border-radius: 13px; border: 0; background: rgba(255,255,255,.08); font-size: 1.6rem; display: grid; place-items: center; cursor: pointer; }
.hm-name { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hm-name > span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9a8cbc; }
.hm-name input { border: 0; background: transparent; padding: 2px 0; font-size: 1.05rem; font-weight: 700; color: var(--ink); outline: none; user-select: text; width: 100%; }
.hm-name input::placeholder { color: rgba(247,239,226,.38); font-weight: 600; }

.hm-modes { display: flex; flex-direction: column; gap: 12px; }
.hm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hm-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 20px; text-align: left; font: inherit; cursor: pointer;
  color: var(--ink); background: #2b1f4d; border: 1px solid rgba(255,255,255,.08); transition: transform .12s ease; overflow: hidden; }
.hm-tile[hidden] { display: none; }
.hm-tile:active { transform: scale(.98); }
.hm-tile-t { display: flex; flex-direction: column; gap: 3px; }
.hm-tile-t b { font-size: 17px; font-weight: 800; line-height: 1.15; }
.hm-tile-t small { font-size: 12.5px; font-weight: 500; color: var(--muted); line-height: 1.3; }
.hm-ic { width: 40px; height: 40px; padding: 9px; border-radius: 12px; flex: none; }
.hm-row .hm-tile:nth-child(1) .hm-ic { color: var(--blue); background: rgba(74,168,255,.13); }
.hm-row .hm-tile:nth-child(2) .hm-ic { color: var(--green); background: rgba(62,207,142,.13); }

.hm-main { flex-direction: row; align-items: center; min-height: 112px; padding: 20px; border: 0; color: #2a0c18;
  background: linear-gradient(120deg, #ff6b4a, #ff9a4a); }
.hm-cards { position: relative; width: 84px; height: 70px; flex: none; margin-right: 6px; }
.hm-cards i { position: absolute; top: 6px; left: 24px; width: 36px; height: 52px; border-radius: 6px; background: var(--card); border: 1.5px solid var(--card-edge);
  color: var(--c); font-style: normal; font-weight: 900; font-size: 1.1rem; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(90,20,0,.25); }
.hm-cards i:nth-child(1) { transform: rotate(-14deg) translate(-20px, 5px); }
.hm-cards i:nth-child(3) { transform: rotate(14deg) translate(20px, 5px); }
.hm-main .hm-tile-t { flex: 1; z-index: 1; }
.hm-main .hm-tile-t b { font-size: 24px; font-weight: 900; }
.hm-main .hm-tile-t small { color: rgba(42,12,24,.72); font-size: 13.5px; font-weight: 600; }
.hm-go { width: 22px; height: 22px; flex: none; z-index: 1; opacity: .8; }
.hm-resume { flex-direction: row; align-items: center; background: rgba(62,207,142,.1); border-color: rgba(62,207,142,.35); }
.hm-resume .hm-ic { color: var(--green); background: rgba(62,207,142,.15); }

.hm-foot { margin-top: auto; padding-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hm-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.hm-link[hidden] { display: none; }
.hm-link svg { width: 18px; height: 18px; }
.hm .foot { margin: 6px 0 0; font-size: 12px; color: #7d7099; }

/* ===== oyun masası (yeni) ===== */
/* Yön: sıcak ve gergin bir masa. Tek vurgu: altın (risk/seri). Kartlar düz krem kâğıt; 3B alt gölge, çizgili deste ve parlama yok. */
:root {
  --s-bg: #1a1130; --s-surface: #261a44; --s-surface-2: #332457; --s-line: rgba(255,255,255,.08);
  --s-text: #f7efe2; --s-muted: #b3a6cf; --s-dim: #7f739c;
  --s-accent: #ffc23d; --s-bad: #ff5d73; --s-good: #3ecf8e;
  --s-r-sm: 8px; --s-r-md: 12px; --s-r-lg: 16px;
  --s-shadow: 0 1px 2px rgba(0,0,0,.25), 0 6px 14px rgba(0,0,0,.28);
}
#game { gap: 8px; padding: calc(10px + var(--safe-top)) 12px calc(10px + var(--safe-bot));
  background: radial-gradient(120% 70% at 50% 40%, #241743 0%, var(--s-bg) 70%); }
svg.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#game .icon-btn { width: 40px; height: 40px; border-radius: var(--s-r-md); background: var(--s-surface); border: 1px solid var(--s-line); color: var(--s-text); }
#game .round-info b { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
#game .round-info span { font-size: 11.5px; color: var(--s-muted); }

/* rakipler */
#game .opponents { gap: 8px; }
#game .opp { background: var(--s-surface); border: 1px solid var(--s-line); border-radius: var(--s-r-lg); padding: 8px 10px; min-height: 0; box-shadow: none; }
#game .opp.turn { border-color: rgba(255,194,61,.55); background: var(--s-surface); box-shadow: inset 0 2px 0 var(--s-accent); }
#game .opp.out { opacity: .7; }
#game .opp-head { font-size: 13px; gap: 6px; }
#game .opp-head b { font-weight: 700; }
#game .opp-head .tot { font-weight: 800; color: var(--s-accent); font-variant-numeric: tabular-nums; }
#game .opp-sub { font-size: 11.5px; color: var(--s-muted); }
#game .opp-sub b { color: var(--s-text); }
#game .badge { font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; }
#game .badge.busted, .sheet .badge.busted { background: rgba(255,93,115,.16); color: var(--s-bad); }
#game .badge.stayed, .sheet .badge.stayed { background: rgba(62,207,142,.15); color: var(--s-good); }
#game .badge.frozen, .sheet .badge.frozen { background: rgba(120,190,255,.16); color: #9fd0ff; }
#game .badge.seven, .sheet .badge.seven { background: rgba(255,194,61,.18); color: var(--s-accent); }

/* deste ve duyuru */
#game .table-mid { gap: 14px; min-height: 80px; }
#game .pile { width: 52px; height: 72px; }
.pile .back, .card.back {
  border-radius: 9px; border: 1.5px solid rgba(255,194,61,.55);
  background: radial-gradient(circle at 50% 50%, rgba(255,194,61,.16) 0 30%, transparent 31%), repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 2px, transparent 2px 7px), #3a2763;
  box-shadow: 2px 2px 0 #2a1c4a, 4px 4px 0 #20153a, var(--s-shadow);
}
.pile span { font-size: 15px; font-weight: 800; color: var(--s-accent); text-shadow: none; font-variant-numeric: tabular-nums; }
#game .banner { font-size: 14px; font-weight: 500; color: var(--s-muted); }
#game .banner b { color: var(--s-text); font-weight: 700; }

/* benim alanım */
#game .me { background: var(--s-surface); border: 1px solid var(--s-line); border-radius: 20px; padding: 12px; gap: 10px; box-shadow: none; }
#game .me.turn { border-color: rgba(255,194,61,.55); background: var(--s-surface); box-shadow: inset 0 2px 0 var(--s-accent); }
#game .me-name b { font-weight: 800; }
#game .me-score { font-size: 11px; color: var(--s-muted); }
#game .me-score b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
#game .me-score b#meTotal { color: var(--s-accent); }
#game .seven-track { gap: 4px; }
#game .seven-track i { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); }
#game .seven-track i.on { background: var(--s-text); }
#game .seven-track.full i { background: var(--s-accent); }
#game .actions { gap: 8px; }
#game .btn.stay, #game .btn.hit { min-height: 58px; padding: 10px; border-radius: 14px; font-size: 17px; font-weight: 800; box-shadow: none; }
#game .btn.stay { background: transparent; color: var(--s-text); box-shadow: inset 0 0 0 1.5px rgba(247,239,226,.35); }
#game .btn.stay small { color: var(--s-muted); opacity: 1; }
#game .btn.hit { background: var(--s-accent); color: #2b1a00; }
#game .btn.hit small { color: rgba(43,26,0,.7); opacity: 1; font-weight: 600; }
#game .btn.hit.danger { background: #ff8a5c; }
#game .btn.hit.danger small { color: #4a0d00; font-weight: 700; }
#game .btn:active:not(:disabled) { transform: scale(.98); box-shadow: none; }
#game .btn.stay:active:not(:disabled) { box-shadow: inset 0 0 0 1.5px rgba(247,239,226,.35); }
#game .btn:disabled { opacity: .3; }

/* kartlar */
.card { border: 1.5px solid var(--card-edge); border-radius: 8px; box-shadow: var(--s-shadow); font-weight: 800; letter-spacing: -.02em; }
.card::before, .card::after { font-size: 9px; font-weight: 700; opacity: .7; }
.card.m { background: #fff1c9; border-color: #e9c66a; color: #7a5200; }
.card.x2 { background: #f0e1ff; border-color: #c9a2ec; color: #6a2ca0; }
.card.a { color: #fff; }
.card.a svg.ic, .mini.a svg.ic { width: 46%; height: auto; margin-top: -8px; stroke-width: 2.2; }
.card.a.freeze { background: #2f6fb8; border-color: #4a8fd8; }
.card.a.flip3 { background: #c4532a; border-color: #e0713f; }
.card.a.chance { background: #1d8a5a; border-color: #2fae76; }
.card .lbl { font-size: 8.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .92; }
.card.bust { border-color: var(--s-bad); box-shadow: 0 0 0 2px var(--s-bad), var(--s-shadow); }
.mini { border-radius: 4px; font-weight: 800; }
.mini.m { background: #fff1c9; color: #7a5200; border-color: #e9c66a; }
.mini.x2 { background: #f0e1ff; color: #6a2ca0; border-color: #c9a2ec; }
.mini.a.freeze { background: #2f6fb8; border-color: #4a8fd8; }
.mini.a.flip3 { background: #c4532a; border-color: #e0713f; }
.mini.a.chance { background: #1d8a5a; border-color: #2fae76; }
.mini.a svg.ic { width: 70%; margin: 0; }
.mini.bust { outline: 1.5px solid var(--s-bad); outline-offset: 1px; }

/* alt pencereler */
.sheet { background: rgba(12,7,24,.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet-card { background: var(--s-surface); border: 1px solid var(--s-line); border-bottom: 0; border-radius: 20px 20px 0 0; gap: 12px; }
.sheet-card h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.sheet .target { border: 1px solid var(--s-line); background: rgba(0,0,0,.16); border-radius: var(--s-r-md); }
.sheet .target:active, .sheet .target:hover { border-color: rgba(255,194,61,.55); }
.scoretable tr.me-row td { color: var(--s-accent); }
.bar i { background: var(--s-accent); }

/* ortak düğmeler (menü dışı ekranlar) */
.btn { border-radius: 12px; box-shadow: none; transition: transform .15s ease, background .2s, opacity .2s; }
.btn:active:not(:disabled) { transform: scale(.98); box-shadow: none; }
.btn.primary { background: var(--s-accent); color: #2b1a00; }
.btn.blue { background: #3b82d6; color: #fff; }
.btn.green { background: #2fae76; color: #fff; }
.btn.ghost { border: 1px solid var(--s-line); color: var(--s-muted); }
.btn:focus-visible, .target:focus-visible, .hm-tile:focus-visible, .hm-icon:focus-visible { outline: 2px solid var(--s-accent); outline-offset: 2px; }
.seg button.on { background: var(--s-text); color: #1d1336; }
.toast { border-radius: 12px; font-weight: 700; box-shadow: var(--s-shadow); }
/* ===== oyun masası sonu ===== */
