/* ==========================================================================
   UNO — Online Masa · v3 AÇIK TEMA (mobil öncelikli, performans dostu)
   ========================================================================== */
:root {
  --bg: #f4eee5; --bg2: #fbf8f3; --bg3: #ece3d6; --surface: #ffffff;
  --ink: #1f1a15; --ink66: rgba(31, 26, 21, .66); --ink45: rgba(31, 26, 21, .45); --ink12: rgba(31, 26, 21, .12); --ink06: rgba(31, 26, 21, .06);
  --accent: #b9824b; --accent2: #8c5a2b; --accentSoft: rgba(185, 130, 75, .14);
  --line: rgba(31, 26, 21, .1);
  --shadow-s: 0 2px 8px rgba(90, 64, 38, .08), 0 1px 2px rgba(90, 64, 38, .06);
  --shadow-m: 0 12px 30px -8px rgba(90, 64, 38, .2), 0 2px 6px rgba(90, 64, 38, .06);
  --shadow-l: 0 30px 70px -20px rgba(90, 64, 38, .35);
  --r-s: 12px; --r-m: 18px; --r-l: 24px; --r-xl: 34px;
  --k-r: #e5484d; --k-y: #f0a92b; --k-g: #23a065; --k-b: #3d74f0;
  --teamA: #3d74f0; --teamB: #f07a24;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --cw: clamp(70px, 7vw, 104px);
  --cwh: clamp(74px, 7.4vw, 112px);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100svh; background: radial-gradient(120% 80% at 50% 0%, #fffaf3 0%, var(--bg) 55%, #ebe2d4 100%) fixed; color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; touch-action: manipulation; }
em { font-style: italic; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 12px; }

/* ---------- küçük parçalar ---------- */
.kicker { margin: 0; display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 40px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); font-size: .68rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--ink66); }
.kicker b { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 30px; background: var(--accentSoft); color: var(--accent2); font-family: var(--serif); font-weight: 500; letter-spacing: 0; font-size: .82rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 30px; background: var(--bg2); border: 1px solid var(--line); font-size: .72rem; font-weight: 700; color: var(--ink66); white-space: nowrap; }
.chip--team0 { background: rgba(61, 116, 240, .12); color: #2453c4; border-color: rgba(61, 116, 240, .3); }
.chip--team1 { background: rgba(240, 122, 36, .12); color: #b4520c; border-color: rgba(240, 122, 36, .3); }
.pill-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); font-weight: 800; color: var(--ink); transition: transform .3s var(--ease); }
.pill-icon:active { transform: scale(.92); }
.pill-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill-icon svg path:first-child { fill: currentColor; stroke: none; }
#btnFull svg path:first-child { fill: none; stroke: currentColor; }
.is-muted #btnSound .wave { opacity: .15; }
.linkbtn { font-size: .78rem; font-weight: 700; color: var(--accent2); text-decoration: underline; text-underline-offset: 3px; justify-self: start; }

/* ---------- butonlar ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 24px; border-radius: 100px; overflow: hidden; isolation: isolate; font-weight: 800; font-size: .95rem; white-space: nowrap; transition: transform .35s var(--ease), opacity .3s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn__fill { position: absolute; z-index: -1; left: 50%; top: 100%; width: 140%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, 0) scale(0); transition: transform .6s var(--ease); }
@media (hover: hover) { .btn:hover .btn__fill { transform: translate(-50%, -50%) scale(1.2); } }
.btn__label { position: relative; display: inline-block; overflow: hidden; line-height: 1.3; }
.btn__label::after { content: attr(data-text); position: absolute; left: 0; top: 100%; }
.btn__label, .btn__label::after { transition: transform .5s var(--ease); }
@media (hover: hover) { .btn:hover .btn__label { transform: translateY(-100%); } }
.btn--primary { background: var(--ink); color: #fff8ee; box-shadow: 0 10px 24px -10px rgba(31, 26, 21, .6); }
.btn--primary .btn__fill { background: var(--accent); }
.btn--glass { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.btn--glass .btn__fill { background: var(--bg3); }
.btn--ghost { border: 1px solid var(--ink12); }
.btn--ghost .btn__fill { background: var(--ink06); }
.btn--small { height: 44px; padding: 0 18px; font-size: .85rem; }
.btn--danger { background: #c9343a; color: #fff; }
.btn--danger .btn__fill { background: #a8262c; }

/* ---------- baloncuklar (sadece masaüstünde hareketli) ---------- */
.bubble { position: absolute; pointer-events: none; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .35) 30%, rgba(185, 130, 75, .1) 70%); border: 1px solid rgba(255, 255, 255, .8); box-shadow: inset -6px -10px 24px rgba(185, 130, 75, .16), 0 10px 30px -10px rgba(120, 90, 60, .25); }
.bubble.b1 { width: 110px; height: 110px; left: 5%; top: 18%; }
.bubble.b2 { width: 56px; height: 56px; right: 10%; top: 12%; }
.bubble.b3 { width: 170px; height: 170px; right: -40px; bottom: 12%; }
.bubble.b4 { width: 36px; height: 36px; left: 30%; bottom: 8%; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .bubble { animation: bubble-float 14s ease-in-out infinite; }
  .bubble.b2 { animation-duration: 11s; animation-delay: -3s; } .bubble.b3 { animation-duration: 18s; animation-delay: -6s; } .bubble.b4 { animation-duration: 9s; animation-delay: -2s; }
}
@keyframes bubble-float { 0%, 100% { transform: translate3d(0, 0, 0); } 33% { transform: translate3d(14px, -20px, 0); } 66% { transform: translate3d(-10px, 12px, 0); } }

/* ---------- açılış + perde ---------- */
.intro { position: fixed; inset: 0; z-index: 200; background: var(--bg2); display: grid; place-items: center; align-content: center; gap: 24px; }
.intro__brand { display: flex; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(5rem, 22vw, 12rem); line-height: .9; letter-spacing: -.04em; overflow: hidden; padding-bottom: .12em; }
.intro__brand span { display: inline-block; transform: translateY(110%); }
.intro__brand span:nth-child(1) { color: var(--k-r); } .intro__brand span:nth-child(2) { color: var(--k-y); } .intro__brand span:nth-child(3) { color: var(--k-b); }
.intro__meta { display: flex; align-items: center; gap: 14px; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink45); }
.intro__count { font-family: var(--serif); font-size: 1rem; color: var(--ink); min-width: 3ch; }
.intro__line { width: 120px; height: 2px; background: var(--ink12); border-radius: 2px; overflow: hidden; }
.intro__line i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
html:not(.js) .intro, .intro.is-done { display: none; }
.curtain { position: fixed; inset: 0; z-index: 150; background: var(--bg3); display: grid; place-items: center; transform: translateY(100%); pointer-events: none; }
.curtain__mark { font-family: var(--serif); font-style: italic; font-size: clamp(3rem, 9vw, 6rem); color: var(--accent); }

/* ---------- üst menü (lobide) ---------- */
.nav { position: fixed; z-index: 60; top: calc(10px + var(--sat)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 20px), 1180px); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 7px 7px 20px; border-radius: 100px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); box-shadow: var(--shadow-m); transition: transform .5s var(--ease), opacity .3s; }
.nav__brand { display: flex; align-items: baseline; gap: 10px; }
.nav__brand b { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.45rem; background: linear-gradient(90deg, var(--k-r), var(--k-y) 40%, var(--k-g) 70%, var(--k-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav__brand em { font-style: normal; font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink45); }
.nav__actions { display: flex; gap: 6px; }
.nav__actions .pill-icon { box-shadow: none; }
.nav__status { display: flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; color: #a3342f; padding: 6px 12px; border-radius: 30px; background: rgba(229, 72, 77, .1); }
.nav__status i { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
body.in-game .nav, body.on-home .nav { transform: translate(-50%, calc(-100% - 30px)); opacity: 0; pointer-events: none; }
body.in-game.net-bad .nav { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
body.in-game.net-bad .nav .nav__actions, body.in-game.net-bad .nav__brand { display: none; }

.screen { display: none; position: relative; }
.screen.is-active { display: block; }

/* ==========================================================================
   ANA MENÜ (oyun başlangıç ekranı)
   ========================================================================== */
.screen--home { min-height: 100svh; overflow: hidden; }
.menu-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.menu-bg__scene { position: absolute; inset: 0; opacity: .9; }
.menu-bg__scene canvas { display: block; width: 100% !important; height: 100% !important; }
.menu-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(251, 248, 243, .92) 0%, rgba(251, 248, 243, .7) 45%, rgba(251, 248, 243, 0) 80%); }
.menu { position: relative; z-index: 2; width: min(460px, 100%); margin: 0 auto; min-height: 100svh; padding: calc(28px + var(--sat)) 18px calc(22px + var(--sab)); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.menu__logo { text-align: center; display: grid; gap: 2px; }
.logo { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(4.4rem, 22vw, 6.6rem); line-height: .95; letter-spacing: -.045em; text-shadow: 0 10px 30px rgba(120, 90, 60, .18); }
.logo .k-r { color: var(--k-r); } .logo .k-y { color: var(--k-y); } .logo .k-b { color: var(--k-b); }
.menu__tag { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .26em; text-transform: uppercase; color: var(--ink45); }
.profile { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-m); }
.profile.shake { animation: shake .45s; }
.profile__pic { position: relative; cursor: pointer; display: block; }
.profile__cam { position: absolute; right: -4px; bottom: -4px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; border: 3px solid var(--surface); }
.profile__cam svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.profile__info { display: grid; gap: 6px; min-width: 0; }
.profile__info label { font-size: .66rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--ink45); }
.profile__info input { width: 100%; height: 46px; padding: 0 16px; border-radius: 14px; background: var(--bg2); border: 1.5px solid var(--line); outline: none; font-size: 1.05rem; font-weight: 700; transition: border-color .25s; }
.profile__info input:focus { border-color: var(--accent); background: #fff; }
.menu__list { display: grid; gap: 10px; }
.mbtn { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 18px 10px 10px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); text-align: left; transition: transform .3s var(--ease), box-shadow .3s; }
.mbtn:active { transform: scale(.98); }
@media (hover: hover) { .mbtn:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); } }
.mbtn__ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--bg3); font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.mbtn__t { flex: 1; display: grid; gap: 1px; min-width: 0; }
.mbtn__t b { font-size: 1.08rem; font-weight: 800; }
.mbtn__t small { font-size: .78rem; color: var(--ink45); font-weight: 600; }
.mbtn__go { font-size: 1.2rem; font-weight: 800; color: var(--ink45); transition: transform .3s var(--ease); }
.mbtn:hover .mbtn__go { transform: translateX(4px); }
.mbtn--hero { min-height: 76px; background: linear-gradient(135deg, #2a221b, #15110d); color: #fff8ee; border: 0; box-shadow: 0 18px 40px -16px rgba(31, 26, 21, .7); }
.mbtn--hero .mbtn__ic { background: linear-gradient(135deg, var(--k-r), #f0743b); color: #fff; width: 52px; height: 52px; border-radius: 16px; font-size: 1.2rem; box-shadow: 0 8px 18px -6px rgba(229, 72, 77, .7); }
.mbtn--hero .mbtn__t b { font-size: 1.22rem; }
.mbtn--hero .mbtn__t small, .mbtn--hero .mbtn__go { color: rgba(255, 248, 238, .6); }
.mbtn--join { padding-right: 8px; }
.mbtn--join input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 14px; background: var(--bg2); border: 1.5px solid var(--line); outline: none; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; }
.mbtn--join input::placeholder { font-family: var(--sans); font-size: .78rem; letter-spacing: .2em; font-weight: 700; color: var(--ink45); }
.mbtn--join input:focus { border-color: var(--accent); background: #fff; }
.mbtn__join { height: 46px; padding: 0 18px; border-radius: 14px; background: var(--ink); color: #fff8ee; font-weight: 800; }
.menu__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mbtn--sm { min-height: 58px; flex-direction: column; justify-content: center; gap: 4px; padding: 10px 6px; text-align: center; }
.mbtn--sm .mbtn__ic { width: 30px; height: 30px; border-radius: 10px; font-size: .9rem; }
.mbtn--sm b { font-size: .82rem; font-weight: 800; }
.menu__foot { margin: 4px 0 0; text-align: center; font-size: .72rem; font-weight: 600; color: var(--ink45); }
.menu > * { opacity: 0; transform: translateY(18px); }
.is-lit .menu > * { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .9s var(--ease); }
.is-lit .menu > *:nth-child(2) { transition-delay: .06s; } .is-lit .menu > *:nth-child(3) { transition-delay: .12s; } .is-lit .menu > *:nth-child(4) { transition-delay: .18s; }
html:not(.js) .menu > * { opacity: 1; transform: none; }

/* mod kartları (kurulum ve lobi) */
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mode { position: relative; display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: var(--r-m); background: var(--bg2); border: 1.5px solid var(--line); text-align: left; transition: border-color .25s, background .25s, transform .3s var(--ease); }
.mode b { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.mode span { font-size: .76rem; color: var(--ink66); line-height: 1.35; }
.mode i { font-style: normal; font-size: 1.15rem; }
.mode.is-on { border-color: var(--ink); background: #fff; box-shadow: var(--shadow-m); }
.mode.is-on::after { content: '✓'; position: absolute; right: 10px; top: 10px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: .7rem; font-weight: 800; }
.modes.is-locked { pointer-events: none; }
.modes.is-locked .mode:not(.is-on) { opacity: .5; }
.more { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 6px; }
.more summary { cursor: pointer; list-style: none; padding: 10px 0; font-weight: 800; font-size: .88rem; color: var(--accent2); }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ' ▾'; }
.more[open] summary::after { content: ' ▴'; }
.note { margin: 0; padding: 10px 14px; border-radius: 14px; background: rgba(240, 169, 43, .14); color: #7a4f05; font-size: .82rem; font-weight: 600; }

/* ---------- lobi ---------- */
.screen--lobby { min-height: 100svh; }
.lobby { position: relative; z-index: 2; width: min(1180px, 100%); margin: 0 auto; padding: calc(96px + var(--sat)) clamp(12px, 4vw, 40px) calc(30px + var(--sab)); display: grid; gap: 20px; }
.lobby__head { display: grid; gap: 14px; justify-items: start; }
.lobby__title { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1; letter-spacing: -.035em; }
.lobby__title em { font-weight: 500; letter-spacing: .08em; color: var(--accent2); }
.lobby__share { display: flex; flex-wrap: wrap; gap: 8px; }
.lobby__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.panel { position: relative; z-index: 2; padding: 20px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-m); }
.panel__title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel__title h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; letter-spacing: -.02em; }
.seats { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.seatrow { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 7px; border-radius: 100px; background: var(--bg2); border: 1px solid var(--line); }
.seatrow__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.seatrow__tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.seatrow .x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--ink45); }
.seatrow .x:hover { background: rgba(229, 72, 77, .12); color: #c9343a; }
.seatrow.is-off { opacity: .5; }
.seatrow--empty { border-style: dashed; color: var(--ink45); justify-content: center; padding: 13px; font-size: .84rem; background: transparent; }
.tag-host { color: var(--accent2); border-color: rgba(185, 130, 75, .4); background: var(--accentSoft); }
.lvl { font-size: .7rem; padding: 3px 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; }
.addbot { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.seg { display: inline-flex; padding: 3px; border-radius: 100px; background: var(--bg3); gap: 2px; flex-wrap: wrap; }
.seg button { padding: 7px 13px; border-radius: 100px; font-size: .8rem; font-weight: 700; color: var(--ink66); transition: background .25s, color .25s; }
.seg button.is-on { background: var(--ink); color: #fff8ee; box-shadow: var(--shadow-s); }
.seg.is-locked { pointer-events: none; opacity: .8; }
.settings { display: grid; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.set:last-child { border-bottom: 0; }
.set__t { display: grid; gap: 2px; min-width: 0; }
.set__t b { font-weight: 700; font-size: .93rem; }
.set__t span { font-size: .76rem; color: var(--ink45); }
.switch { position: relative; flex: none; width: 52px; height: 30px; border-radius: 40px; background: var(--bg3); border: 1px solid var(--line); transition: background .3s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .4s var(--ease); }
.switch[aria-checked='true'] { background: var(--k-g); }
.switch[aria-checked='true']::after { transform: translateX(22px); }
.switch:disabled { opacity: .5; cursor: default; }
.lobby__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lobby__wait { margin: 0; color: var(--ink45); font-size: .88rem; flex: 1; text-align: center; font-weight: 600; }

/* ---------- avatar ---------- */
.avatar { --h: 20; position: relative; flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; font-family: var(--serif); font-size: 1.15rem; font-style: italic; font-weight: 600; color: #fff; background: radial-gradient(circle at 32% 28%, hsl(var(--h) 75% 70%), hsl(var(--h) 60% 45%) 72%); box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(90, 64, 38, .25); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar--xl { width: 76px; height: 76px; font-size: 2rem; box-shadow: 0 0 0 3px #fff, 0 8px 20px -6px rgba(90, 64, 38, .45); }

/* ==========================================================================
   KARTLAR (1em = kart genişliğinin onda biri)
   ========================================================================== */
.card { --k: var(--k-r); position: relative; flex: none; width: var(--cw); height: calc(var(--cw) * 1.46); font-size: calc(var(--cw) / 10); border-radius: 1.3em; padding: .5em; background: #fff; box-shadow: 0 .15em .4em rgba(60, 40, 20, .18), 0 .9em 1.8em -1em rgba(60, 40, 20, .45); user-select: none; -webkit-user-select: none; color: #fff; }
.card.k-r { --k: var(--k-r); } .card.k-y { --k: var(--k-y); } .card.k-g { --k: var(--k-g); } .card.k-b { --k: var(--k-b); } .card.k-w { --k: #1c1714; }
.card__face { position: relative; height: 100%; border-radius: .9em; overflow: hidden; background: radial-gradient(120% 80% at 30% 0%, rgba(255, 255, 255, .3), transparent 55%), linear-gradient(160deg, color-mix(in srgb, var(--k) 85%, #fff), var(--k) 45%, color-mix(in srgb, var(--k) 80%, #000)); }
.card__bubble { position: absolute; left: 50%; top: 50%; width: 76%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 34% 28%, #fff 0%, #f7f2eb 45%, #e2d8cb 100%); box-shadow: inset -.3em -.45em .9em rgba(0, 0, 0, .12), 0 .25em .6em rgba(0, 0, 0, .18); color: var(--k); }
.card__bubble::before { content: ''; position: absolute; left: 20%; top: 14%; width: 26%; height: 16%; border-radius: 50%; background: rgba(255, 255, 255, .9); transform: rotate(-30deg); }
.card__big { position: relative; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 4.3em; line-height: 1; letter-spacing: -.05em; margin-top: -.06em; }
.card__big--sm { font-size: 3.2em; }
.card__big svg, .card__i svg { width: 1em; height: 1em; display: block; }
.card__i { position: absolute; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.75em; line-height: 1; text-shadow: 0 .06em .12em rgba(0, 0, 0, .25); }
.card__i svg { width: .8em; height: .8em; }
.card__i.tl { top: .35em; left: .4em; }
.card__i.br { bottom: .35em; right: .4em; transform: rotate(180deg); }
.card__u { text-decoration: underline; text-underline-offset: .08em; text-decoration-thickness: .06em; }
.card.k-w .card__face { background: radial-gradient(120% 80% at 30% 0%, rgba(255, 255, 255, .14), transparent 55%), linear-gradient(160deg, #2c241e, #15110e); }
.card.k-w .card__bubble { background: conic-gradient(from 45deg, var(--k-r) 0 25%, var(--k-y) 0 50%, var(--k-g) 0 75%, var(--k-b) 0); color: #fff; }
.card.k-w .card__big { text-shadow: 0 .05em .2em rgba(0, 0, 0, .45); }
.card[data-pick] .card__bubble { box-shadow: 0 0 0 .3em var(--pick), 0 .25em .6em rgba(0, 0, 0, .25); }
.card--back { background: #fff; }
.card--back .card__face { background: radial-gradient(90% 60% at 50% 40%, #3a2e24, #17120e 75%); display: grid; place-items: center; }
.card--back .card__face::before { content: ''; position: absolute; inset: .7em; border-radius: .7em; border: .1em solid rgba(214, 170, 120, .5); }
.card__logo { position: relative; padding: .5em .9em; border-radius: 3em; transform: rotate(-24deg); background: linear-gradient(135deg, var(--k-r), #b8323a); font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 2.1em; line-height: 1; color: #fff4e3; }

/* ==========================================================================
   OYUN MASASI
   ========================================================================== */
body.in-game { overflow: hidden; overscroll-behavior: none; }
.screen--game.is-active { position: fixed; inset: 0; z-index: 10; display: block; }
.table { --meH: calc(var(--cwh) * 1.46 + 96px + var(--sab)); position: absolute; inset: 0; overflow: hidden; background: radial-gradient(130% 90% at 50% 35%, #fbf6ee 0%, #efe5d7 60%, #e4d8c7 100%); touch-action: manipulation; user-select: none; -webkit-user-select: none; contain: layout paint; }
.table__felt { position: absolute; left: 0; right: 0; top: 0; bottom: var(--meH); perspective: 1200px; pointer-events: none; }
.felt { position: absolute; left: 50%; top: 55%; width: min(94%, 1160px); height: min(82%, 600px); transform: translate(-50%, -50%) rotateX(24deg); border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #fffdf8 0%, #f6eee2 55%, #ecdfcc 100%); box-shadow: 0 0 0 9px #e7d6bf, 0 0 0 10px rgba(185, 130, 75, .45), 0 0 0 22px #f3e9db, 0 40px 80px -20px rgba(110, 80, 50, .35), inset 0 -20px 60px rgba(185, 130, 75, .12); }
.felt::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--active, var(--accent)) 22%, transparent), transparent 52%); transition: background .8s var(--ease); }
.felt__ring { position: absolute; inset: 9%; border-radius: 50%; border: 1.5px dashed rgba(185, 130, 75, .28); }

.hud { position: absolute; z-index: 30; top: calc(10px + var(--sat)); left: 10px; right: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud__info { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 14px; border-radius: 40px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink66); white-space: nowrap; overflow: hidden; }
.hud__info .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink45); flex: none; }
.hud__team { display: inline-flex; align-items: center; gap: 4px; }

/* rakipler */
.seats-ring { position: absolute; z-index: 5; left: 0; right: 0; top: 0; bottom: var(--meH); pointer-events: none; }
.seat { position: absolute; transform: translate(-50%, -30px); display: grid; justify-items: center; gap: 4px; width: 104px; pointer-events: auto; }
.seat__av { position: relative; }
.seat .avatar { width: 52px; height: 52px; font-size: 1.35rem; transition: transform .4s var(--ease); }
.seat[data-team='0'] .avatar { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--teamA), 0 4px 10px rgba(90, 64, 38, .25); }
.seat[data-team='1'] .avatar { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--teamB), 0 4px 10px rgba(90, 64, 38, .25); }
.seat.is-turn .avatar { transform: scale(1.12); }
.seat.is-turn .seat__av::before { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 3px solid var(--active, var(--accent)); box-shadow: 0 0 18px color-mix(in srgb, var(--active, var(--accent)) 55%, transparent); }
.seat.is-off .avatar { filter: grayscale(1); opacity: .6; }
.seat.is-off .seat__name::after { content: ' · ⚠'; color: #c9343a; }
.seat.is-auto .seat__name::after { content: ' · ⟳'; color: var(--accent2); }
.timer { position: absolute; inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); transform: rotate(-90deg); pointer-events: none; }
.timer circle { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.seat__name { max-width: 104px; padding: 3px 10px; border-radius: 30px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); font-size: .74rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat__mate { font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--teamA); }
.seat__cards { position: relative; display: flex; height: 30px; align-items: flex-end; justify-content: center; }
.minicard { width: 18px; height: 26px; margin-left: -12px; border-radius: 4px; background: radial-gradient(circle at 50% 42%, #e5484d 0 22%, transparent 24%), linear-gradient(160deg, #3a2e24, #16110d); border: 1.5px solid #fff; box-shadow: 0 2px 4px rgba(60, 40, 20, .3); transform: rotate(var(--r, 0deg)); transform-origin: bottom center; }
.minicard:first-child { margin-left: 0; }
.seat__count { position: absolute; right: -14px; top: -6px; min-width: 24px; height: 24px; padding: 0 6px; display: grid; place-items: center; border-radius: 20px; background: var(--ink); color: #fff; font-size: .74rem; font-weight: 800; box-shadow: 0 3px 8px rgba(31, 26, 21, .3); border: 2px solid #fff; }
.seat__score { font-size: .66rem; font-weight: 700; color: var(--ink45); }
.badge-uno { position: absolute; top: -10px; left: -18px; padding: 2px 8px; border-radius: 20px; background: var(--k-r); color: #fff; font-family: var(--serif); font-style: italic; font-size: .78rem; font-weight: 600; box-shadow: 0 4px 10px rgba(229, 72, 77, .45); border: 2px solid #fff; }
.badge-bot { position: absolute; bottom: -4px; right: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); font-size: .66rem; }

/* orta */
.center { position: absolute; z-index: 6; left: 50%; top: calc((100% - var(--meH)) * .56); transform: translate(-50%, -50%); display: flex; align-items: center; gap: clamp(22px, 5vw, 56px); }
.pile { position: relative; width: var(--cw); height: calc(var(--cw) * 1.46); }
.pile--draw { border-radius: calc(var(--cw) * .13); }
.pile--draw .pile__stack { position: absolute; inset: 0; }
.pile--draw .pile__stack .card { position: absolute; left: 0; top: 0; }
.pile--draw.is-live::after { content: ''; position: absolute; inset: -7px; border-radius: calc(var(--cw) * .2); border: 3px solid var(--accent); animation: ring 1.5s ease-out infinite; }
@keyframes ring { from { transform: scale(.97); opacity: 1; } to { transform: scale(1.12); opacity: 0; } }
.pile__count { position: absolute; z-index: 5; right: -10px; top: -10px; min-width: 30px; height: 30px; padding: 0 7px; display: grid; place-items: center; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-s); font-size: .76rem; font-weight: 800; }
.pile__hint { position: absolute; left: 50%; bottom: -28px; transform: translateX(-50%); font-size: .64rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--ink45); white-space: nowrap; }
.pile--discard .card { position: absolute; left: 0; top: 0; transform: rotate(var(--r, 0deg)); }
.pile--discard::before { content: ''; position: absolute; inset: -26%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--active, var(--accent)) 35%, transparent), transparent 66%); transition: background .6s var(--ease); }
.pile--discard .card.is-landed { animation: land .4s var(--ease); }
@keyframes land { 0% { transform: rotate(var(--r, 0deg)) scale(1.15); } 60% { transform: rotate(var(--r, 0deg)) scale(.97); } 100% { transform: rotate(var(--r, 0deg)) scale(1); } }
.dir { position: absolute; left: 50%; top: 50%; width: calc(var(--cw) * 4.2); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; opacity: .45; }
.dir svg { width: 100%; height: 100%; transition: transform .6s var(--ease); }
.dir.is-rev svg { transform: scaleX(-1); }
.dir text { fill: var(--active, var(--accent)); font-size: 11px; letter-spacing: 7px; transition: fill .6s; }
.pending { position: absolute; left: 50%; top: -46px; transform: translateX(-50%); padding: 5px 15px; border-radius: 30px; background: var(--k-r); color: #fff; font-family: var(--serif); font-style: italic; font-size: 1.2rem; box-shadow: 0 8px 20px -6px rgba(229, 72, 77, .6); white-space: nowrap; border: 2px solid #fff; }
.turnbar { position: absolute; z-index: 7; left: 50%; bottom: calc(var(--meH) + 10px); transform: translateX(-50%); padding: 8px 18px; border-radius: 40px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-m); font-size: .86rem; font-weight: 800; white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; transition: background .3s, color .3s; }
.turnbar.is-me { background: var(--ink); color: #fff8ee; border-color: var(--ink); }

/* kendi alanım */
.me { --cw: var(--cwh); position: absolute; z-index: 20; left: 0; right: 0; bottom: 0; height: var(--meH); display: grid; grid-template-rows: auto 1fr; padding: 0 0 var(--sab); background: linear-gradient(to top, rgba(251, 247, 240, 1) 55%, rgba(251, 247, 240, 0)); }
.me::before { content: ''; position: absolute; left: 12%; right: 12%; top: 0; height: 3px; border-radius: 3px; background: var(--active, var(--accent)); opacity: 0; transition: opacity .4s; }
.me.is-turn::before { opacity: 1; }
.me.is-hurry::before { background: var(--k-r); animation: blink .6s infinite; }
.me__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 0; }
.me__id { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 800; }
.me__id > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me__id .avatar { width: 34px; height: 34px; font-size: 1rem; }
.chip--score::before { content: '★'; color: var(--accent); }
.me__actions { display: flex; gap: 8px; align-items: center; }
.uno-btn { position: relative; height: 46px; padding: 0 20px; border-radius: 100px; background: linear-gradient(135deg, #ff6a6e, var(--k-r) 55%, #b8262d); color: #fff; font-family: var(--serif); font-style: italic; font-size: 1.25rem; font-weight: 600; box-shadow: 0 8px 20px -6px rgba(229, 72, 77, .6); border: 2px solid #fff; transition: transform .25s var(--ease), opacity .25s; }
.uno-btn:active { transform: scale(.94); }
.uno-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.uno-btn.is-hot { animation: unoPulse 1s ease-in-out infinite; }
@keyframes unoPulse { 50% { transform: scale(1.07); } }

.hand { position: relative; display: flex; justify-content: center; align-items: flex-end; padding: 0 10px 8px; min-height: 0; }
.hand .card { margin-left: var(--ov, 0px); transform: translateY(var(--y, 0px)) rotate(var(--r, 0deg)); transform-origin: 50% 120%; transition: transform .35s var(--ease), margin .35s var(--ease); cursor: pointer; }
.hand .card:first-child { margin-left: 0; }
.hand .card.is-dim { cursor: not-allowed; }
.hand .card.is-dim::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(244, 238, 229, .58); pointer-events: none; }
.hand .card.is-ok { transform: translateY(calc(var(--y, 0px) - 14px)) rotate(var(--r, 0deg)); box-shadow: 0 0 0 2.5px var(--ink), 0 .9em 1.8em -1em rgba(60, 40, 20, .5); }
@media (hover: hover) { .hand .card.is-ok:hover { transform: translateY(calc(var(--y, 0px) - 30px)) rotate(0deg) scale(1.05); z-index: 50 !important; } }
.hand .card.is-new { animation: dealIn .45s var(--ease) both; }
@keyframes dealIn { from { opacity: 0; translate: 0 50px; } }
.hand.is-locked .card { pointer-events: none; }

.catch, .afk { position: absolute; z-index: 40; left: 50%; top: calc(62px + var(--sat)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 100px; background: #fff; border: 2px solid var(--k-r); box-shadow: var(--shadow-l); font-weight: 800; font-size: .88rem; white-space: nowrap; max-width: calc(100% - 20px); }
.afk { border-color: var(--line); }
.catch span, .afk span { overflow: hidden; text-overflow: ellipsis; }
.reactions { position: absolute; z-index: 45; right: 10px; top: calc(58px + var(--sat)); display: grid; grid-template-columns: repeat(5, 42px); gap: 4px; padding: 8px; border-radius: var(--r-l); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-l); }
.reactions button { height: 42px; border-radius: 50%; font-size: 1.25rem; }
.reactions button:active { background: var(--bg3); }
.reactions button.txt { font-size: .68rem; font-weight: 800; border-radius: 16px; }
.react-pop { position: absolute; z-index: 50; transform: translate(-50%, -100%); padding: 5px 11px; border-radius: 18px 18px 18px 4px; background: var(--ink); color: #fff; font-size: 1.25rem; font-weight: 800; pointer-events: none; animation: reactUp 2.4s var(--ease) forwards; white-space: nowrap; }
@keyframes reactUp { 0% { opacity: 0; transform: translate(-50%, -60%) scale(.5); } 12% { opacity: 1; transform: translate(-50%, -100%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -160%); } }

.fly { position: absolute; inset: 0; z-index: 35; pointer-events: none; }
.fly .card { position: absolute; left: 0; top: 0; will-change: transform; }
.pfx { position: absolute; inset: 0; z-index: 34; width: 100%; height: 100%; pointer-events: none; }
.flash { position: absolute; inset: 0; z-index: 33; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--flash, #fff) 45%, transparent), color-mix(in srgb, var(--flash, #fff) 12%, transparent) 50%, transparent 80%); }
.burst { position: absolute; z-index: 36; transform: translate(-50%, -50%); pointer-events: none; font-family: var(--serif); font-style: italic; font-weight: 600; white-space: nowrap; animation: burst 1.25s var(--ease) forwards; }
.burst--uno { font-size: clamp(2.2rem, 9vw, 4.6rem); color: #fff; padding: 0 .4em; border-radius: 1em; background: linear-gradient(135deg, #ff6a6e, var(--k-r) 60%, #b8262d); border: 3px solid #fff; box-shadow: 0 16px 40px -10px rgba(229, 72, 77, .7); }
.burst--skip { font-size: 2.4rem; color: var(--k-r); text-shadow: 0 2px 0 #fff, 0 6px 16px rgba(229, 72, 77, .35); }
.burst--caught { font-size: clamp(1.4rem, 5vw, 2.3rem); color: #fff; padding: .1em .6em; border-radius: 1em; background: #c9343a; border: 3px solid #fff; box-shadow: var(--shadow-l); }
.burst--info { font-size: clamp(1.1rem, 4vw, 1.7rem); color: var(--ink); padding: .2em .8em; border-radius: 1em; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-l); font-style: normal; font-family: var(--sans); font-weight: 800; }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } 30% { transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -80%) scale(.96); } }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; }
.modal__back { position: absolute; inset: 0; background: rgba(40, 30, 20, .35); animation: fade .3s; }
.modal__card { position: relative; width: min(560px, 100%); max-height: min(88dvh, 840px); overflow: auto; padding: 26px 22px 22px; border-radius: var(--r-xl); background: var(--bg2); box-shadow: var(--shadow-l); animation: modalIn .45s var(--ease); overscroll-behavior: contain; }
.modal--wide .modal__card { width: min(760px, 100%); }
.modal__x { position: absolute; right: 14px; top: 14px; }
.modal__title { margin: 0 46px 16px 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.05; letter-spacing: -.025em; }
.modal__title em { color: var(--accent2); }
.modal__body { display: grid; gap: 14px; }
.modal__body p { margin: 0; color: var(--ink66); }
.modal__row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.modal__row--split { justify-content: space-between; align-items: center; }
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.colors button { position: relative; aspect-ratio: 1.7; border-radius: var(--r-l); background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .45), transparent 45%), var(--k); font-family: var(--serif); font-style: italic; font-size: 1.45rem; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .25); box-shadow: 0 12px 24px -12px var(--k); border: 3px solid #fff; }
.colors button:active { transform: scale(.97); }
.colors button small { display: block; font-family: var(--sans); font-style: normal; font-size: .7rem; font-weight: 700; opacity: .9; }
.targets { display: grid; gap: 8px; }
.targets button { display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 100px; background: #fff; border: 1px solid var(--line); text-align: left; font-weight: 700; box-shadow: var(--shadow-s); }
.targets button:active { background: var(--bg3); }
.targets button span:nth-child(2) { flex: 1; }
.rules h4 { margin: 14px 0 4px; font-family: var(--serif); font-weight: 500; font-size: 1.15rem; }
.rules ul { margin: 0; padding-left: 18px; color: var(--ink66); display: grid; gap: 4px; font-size: .9rem; }
.rules b { color: var(--ink); }
.results { display: grid; gap: 8px; }
.res { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px 10px 10px; border-radius: var(--r-m); background: #fff; border: 1px solid var(--line); }
.res.is-win { border-color: var(--accent); background: #fff8ec; }
.res__name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res__cards { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 3px; --cw: 26px; }
.res__pts { font-family: var(--serif); font-size: 1.25rem; text-align: right; }
.res__pts small { display: block; font-family: var(--sans); font-size: .66rem; font-weight: 700; color: var(--ink45); }
.podium { text-align: center; display: grid; justify-items: center; gap: 6px; padding: 4px 0 8px; }
.podium .avatar { width: 76px; height: 76px; font-size: 2rem; }
.podium b { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; }
.countdown { color: var(--ink45); font-size: .8rem; font-weight: 600; }
.set--slider { gap: 16px; }
.set--col { flex-direction: column; align-items: stretch; }
.seg--wrap { flex-wrap: wrap; border-radius: 20px; }
.slider { display: flex; align-items: center; gap: 12px; flex: 1; max-width: 300px; }
.slider output { min-width: 3ch; text-align: right; font-weight: 800; font-size: .85rem; color: var(--ink66); }
.slider input { -webkit-appearance: none; appearance: none; flex: 1; height: 8px; border-radius: 10px; background: linear-gradient(90deg, var(--ink) var(--fill, 50%), var(--bg3) var(--fill, 50%)); outline: none; cursor: pointer; }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); box-shadow: 0 3px 8px rgba(0, 0, 0, .2); }
.slider input::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); }
#npText { color: var(--accent2); font-weight: 700; }

/* ---------- bildirim ---------- */
.toasts { position: fixed; z-index: 130; left: 50%; top: calc(66px + var(--sat)); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(92vw, 520px); }
.toast { padding: 10px 18px; border-radius: 100px; background: var(--ink); color: #fff8ee; box-shadow: var(--shadow-l); font-size: .86rem; font-weight: 700; text-align: center; animation: toastIn .4s var(--ease); }
.toast--err { background: #c9343a; }
.toast.is-out { opacity: 0; transform: translateY(-10px); transition: all .35s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } }
body.in-game .toasts { top: calc(108px + var(--sat)); }
.confetti { position: fixed; inset: 0; z-index: 125; pointer-events: none; width: 100%; height: 100%; }

/* ==========================================================================
   DUYARLI
   ========================================================================== */
@media (max-width: 1000px) { .lobby__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  :root { --cw: clamp(58px, 17vw, 80px); --cwh: clamp(60px, 17.5vw, 84px); }
  .nav { padding-left: 16px; }
  .nav__brand em { display: none; }
  .lobby__foot { flex-direction: column-reverse; align-items: stretch; }
  .lobby__foot .btn { width: 100%; }
  .panel { padding: 16px; }
  .modes { gap: 8px; }
  .mode { padding: 12px; }
  .mode b { font-size: 1.05rem; }
  .felt { width: 96%; height: 84%; top: 54%; transform: translate(-50%, -50%); border-radius: 46% / 40%; box-shadow: 0 0 0 7px #e7d6bf, 0 0 0 8px rgba(185, 130, 75, .4), 0 24px 40px -18px rgba(110, 80, 50, .35); }
  .seat { width: 78px; transform: translate(-50%, -26px); }
  .seat .avatar { width: 46px; height: 46px; font-size: 1.15rem; }
  .seat__name { max-width: 80px; font-size: .7rem; padding: 2px 8px; }
  .seat__cards, .seat__score { display: none; }
  .seat__count { right: -12px; min-width: 22px; height: 22px; font-size: .7rem; }
  .uno-btn { height: 42px; padding: 0 16px; font-size: 1.12rem; }
  .me__id .avatar { width: 30px; height: 30px; }
  .me__bar { padding: 6px 10px 0; }
  .turnbar { font-size: .8rem; padding: 7px 14px; }
  .modal { place-items: end center; padding: 0; }
  .modal__card { width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: calc(22px + var(--sab)); animation-name: sheetIn; }
  @keyframes sheetIn { from { transform: translateY(100%); } }
  .set--slider { flex-direction: column; align-items: stretch; gap: 8px; }
  .slider { max-width: none; }
  .set:has(#fxSeg) { flex-direction: column; align-items: stretch; }
  #fxSeg { justify-content: space-between; } #fxSeg button { flex: 1; }
  .reactions { grid-template-columns: repeat(5, 40px); }
  .bubble.b1 { width: 70px; height: 70px; } .bubble.b3 { width: 110px; height: 110px; }
}
@media (max-width: 360px) { .menu__row .mbtn--sm b { font-size: .74rem; } .mbtn__t small { display: none; } }
@media (max-height: 700px) and (max-width: 640px) { .menu { gap: 12px; } .logo { font-size: 3.8rem; } .mbtn { min-height: 56px; } .mbtn--hero { min-height: 64px; } .menu__foot { display: none; } }
@media (max-height: 520px) and (orientation: landscape) {
  :root { --cw: clamp(46px, 7vw, 66px); --cwh: clamp(48px, 7vw, 70px); }
  .table { --meH: calc(var(--cwh) * 1.46 + 58px); }
  .seat .avatar { width: 36px; height: 36px; }
  .seat__cards, .seat__score, .hud__info { display: none; }
  .felt { transform: translate(-50%, -50%); }
}
/* Dokunmatik cihazlarda süreklilik içeren animasyonlar kapalı → akıcılık */
@media (pointer: coarse) {
  .uno-btn.is-hot { animation: none; box-shadow: 0 0 0 4px rgba(229, 72, 77, .25), 0 8px 20px -6px rgba(229, 72, 77, .6); }
  .pile--draw.is-live::after { animation: none; opacity: 1; }
  .felt::before { transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.menu__list { grid-template-columns: minmax(0, 1fr); }
.menu__list > *, .menu > * { min-width: 0; }
.mbtn__t b, .mbtn__t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Odaklanan kart (dokunma/klavye) tarayıcının masayı kaydırmasına yol açıyordu → öğeler kayıyordu.
   overflow: clip programatik kaydırmaya da izin vermez. */
.table, .screen--game, .hand, .me, .seats-ring { overflow: clip; }
.hand .card:focus { outline: none; }
.hand .card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Çok kart: el kaydırılabilir şeride dönüşür (her kartın köşesi görünür, dokunma kesin) */
.hand.is-scroll { overflow-x: auto; overflow-y: hidden; justify-content: flex-start; padding: 24px 18px 8px; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); }
.hand.is-scroll::-webkit-scrollbar { display: none; }
.hand.is-scroll .card { transform-origin: 50% 100%; }
.hand.is-scroll::after { content: ''; flex: none; width: 18px; }
.hand-hint { position: absolute; z-index: 21; right: 12px; bottom: calc(var(--cwh) * 1.46 + 18px + var(--sab)); padding: 3px 10px; border-radius: 20px; background: var(--ink); color: #fff; font-size: .68rem; font-weight: 800; pointer-events: none; }

/* ==========================================================================
   3B MASA MODU
   ========================================================================== */
.stage3d { position: absolute; inset: 0; z-index: 0; display: none; }
.has3d .stage3d { display: block; }
.stage3d canvas { display: block; width: 100% !important; height: 100% !important; }
.has3d { background: #1a110b; }
.has3d .table__felt, .has3d .dir { display: none; }
.has3d .seats-ring { bottom: 0; }
.has3d .seat { left: 0; top: 0; transform-origin: 50% 30px; will-change: transform; transition: none; }
.has3d .seat .avatar { box-shadow: 0 0 0 3px #fff, 0 10px 24px rgba(0, 0, 0, .55); }
.has3d .seat__cards, .has3d .seat__score { display: none; }
.has3d #center { left: 0; top: 0; width: 100%; height: 100%; transform: none; display: block; pointer-events: none; }
.has3d .pile { position: absolute; left: 0; top: 0; pointer-events: auto; will-change: transform; }
.has3d .pile--draw .pile__stack, .has3d .pile--discard .card, .has3d .pile--discard::before { opacity: 0; }
.has3d .pile--draw.is-live::after { border-color: #ffd890; box-shadow: 0 0 24px rgba(255, 200, 120, .6); }
.has3d .pile__hint { color: rgba(255, 236, 210, .75); }
.has3d .pending { position: fixed; left: 50%; top: calc(70px + var(--sat)); }
.has3d .me { background: linear-gradient(to top, rgba(18, 11, 6, .92) 40%, rgba(18, 11, 6, 0)); color: #fff6ea; }
.has3d .me .chip { background: rgba(255, 255, 255, .12); color: #fff6ea; border-color: rgba(255, 255, 255, .2); }
.has3d .hand .card.is-dim::after { background: rgba(20, 12, 6, .5); }
.has3d .hand .card.is-ok { box-shadow: 0 0 0 2.5px #ffd890, 0 0 22px rgba(255, 200, 120, .55), 0 .9em 1.8em -1em rgba(0, 0, 0, .7); }
.has3d .hand { perspective: 900px; }
.has3d .turnbar { box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }

/* ==========================================================================
   v5 — LOAS APP MERKEZİ, PROFİL, SOHBET, UNO ANI, KOZMETİK, RTL
   ========================================================================== */
body.on-hub .nav { transform: translate(-50%, calc(-100% - 30px)); opacity: 0; pointer-events: none; }
.intro__brand--loas span:nth-child(4) { color: var(--k-g); }
.curtain__mark { font-family: var(--serif); font-style: italic; }
.nav__brand b { font-size: 1.3rem; }

/* merkez */
.screen--hub { min-height: 100svh; overflow: hidden; }
.hub { position: relative; z-index: 2; width: min(520px, 100%); margin: 0 auto; min-height: 100svh; padding: calc(30px + var(--sat)) 18px calc(22px + var(--sab)); display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.hub > * { opacity: 0; transform: translateY(18px); min-width: 0; }
.is-lit .hub > * { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .9s var(--ease); }
.is-lit .hub > *:nth-child(2) { transition-delay: .06s; } .is-lit .hub > *:nth-child(3) { transition-delay: .1s; } .is-lit .hub > *:nth-child(4) { transition-delay: .14s; } .is-lit .hub > *:nth-child(5) { transition-delay: .18s; }
html:not(.js) .hub > * { opacity: 1; transform: none; }
.hub__head { text-align: center; display: grid; gap: 6px; justify-items: center; }
.hub__logo { margin: 0; display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 500; font-size: clamp(2.8rem, 13vw, 4.2rem); line-height: 1; letter-spacing: -.035em; }
.hub__logo em { font-style: italic; background: linear-gradient(90deg, var(--k-r), var(--k-y) 40%, var(--k-g) 70%, var(--k-b)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.hub__mark { display: grid; place-items: center; width: 1.15em; height: 1.15em; border-radius: .32em; background: linear-gradient(135deg, #2a221b, #15110d); color: #fff4e3; font-style: italic; font-size: .8em; box-shadow: 0 14px 30px -12px rgba(31, 26, 21, .7); transform: rotate(-8deg); }
.hub__sec { margin: 6px 4px -4px; font-size: .7rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--ink45); }
.games { display: grid; gap: 12px; }
.game-tile { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 18px 12px 12px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-m); text-align: start; transition: transform .3s var(--ease), box-shadow .3s; }
.game-tile:active { transform: scale(.985); }
.game-tile--uno { background: linear-gradient(135deg, #2a221b, #15110d); color: #fff8ee; border: 0; box-shadow: 0 24px 50px -18px rgba(31, 26, 21, .75); min-height: 108px; }
.game-tile--uno:hover .mbtn__go { transform: translateX(4px); }
.game-tile--uno .mbtn__go { color: rgba(255, 248, 238, .6); }
.game-tile__art { position: relative; flex: none; width: 84px; height: 84px; border-radius: 22px; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #3a2e24, #120e0b); overflow: hidden; }
.game-tile__art b { position: relative; z-index: 2; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.4rem; color: #fff; padding: 2px 10px; border-radius: 20px; background: var(--k-r); transform: rotate(-14deg); box-shadow: 0 6px 14px rgba(0, 0, 0, .35); }
.gc { position: absolute; width: 34px; height: 50px; border-radius: 7px; border: 2px solid #fff; top: 50%; left: 50%; }
.gc1 { background: var(--k-b); transform: translate(-90%, -50%) rotate(-18deg); } .gc2 { background: var(--k-y); transform: translate(-50%, -58%) rotate(2deg); } .gc3 { background: var(--k-g); transform: translate(-10%, -50%) rotate(20deg); }
.game-tile__t { flex: 1; display: grid; gap: 3px; min-width: 0; }
.game-tile__t b { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; line-height: 1.05; }
.game-tile__t small { font-size: .8rem; font-weight: 600; opacity: .68; }
.game-tile__live { font-size: .72rem; font-weight: 800; color: #6fe3a4; }
.game-tile--soon { opacity: .75; box-shadow: var(--shadow-s); border-style: dashed; }
.game-tile--soon .game-tile__art { width: 58px; height: 58px; border-radius: 18px; background: var(--bg3); color: var(--ink45); font-size: 1.4rem; }
.game-tile--soon .game-tile__t b { font-size: 1.1rem; font-family: var(--sans); font-weight: 800; }
.hub__tools { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.hub__tools #btnInstall:not([hidden]) { grid-column: 1 / -1; flex-direction: row; min-height: 52px; background: var(--ink); color: #fff8ee; border: 0; }
.hub__tools #btnInstall .mbtn__ic { background: rgba(255, 255, 255, .14); color: #fff; }
.langsel { position: relative; display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 0 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); font-size: 1.1rem; }
.langsel select { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; font: inherit; font-size: .92rem; font-weight: 800; color: var(--ink); outline: none; cursor: pointer; appearance: none; -webkit-appearance: none; }
.langsel::after { content: '▾'; position: absolute; inset-inline-end: 14px; font-size: .8rem; color: var(--ink45); pointer-events: none; }
.profile { grid-template-columns: auto minmax(0, 1fr) auto; }
.profile__open { align-self: start; font-size: 1.05rem; }
.lvl-bar { display: flex; align-items: center; gap: 8px; font-size: .72rem; }
.lvl-bar b { font-weight: 800; white-space: nowrap; }
.lvl-bar small { font-weight: 700; color: var(--ink45); white-space: nowrap; }
.lvl-bar__track { flex: 1; height: 7px; border-radius: 10px; background: var(--bg3); overflow: hidden; min-width: 40px; }
.lvl-bar__track i { display: block; height: 100%; background: linear-gradient(90deg, var(--k-y), var(--k-r)); transform-origin: 0 50%; transform: scaleX(0); transition: transform .8s var(--ease); border-radius: inherit; }
[dir='rtl'] .lvl-bar__track i { transform-origin: 100% 50%; }

/* UNO menüsü */
.backpill { position: fixed; z-index: 30; top: calc(12px + var(--sat)); inset-inline-start: 12px; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 40px; background: rgba(255, 255, 255, .86); border: 1px solid var(--line); box-shadow: var(--shadow-s); font-size: .84rem; font-weight: 700; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.backpill b { font-family: var(--serif); font-style: italic; font-weight: 600; }
[dir='rtl'] .backpill span { transform: scaleX(-1); display: inline-block; }
.mechip { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 40px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); text-align: start; }
.mechip .avatar { width: 40px; height: 40px; font-size: 1rem; }
.mechip__t { flex: 1; display: grid; min-width: 0; line-height: 1.25; }
.mechip__t b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mechip__t small { font-size: .72rem; font-weight: 700; color: var(--ink45); }
.mbtn--quick .mbtn__ic { background: linear-gradient(135deg, var(--k-y), #f07a24); color: #fff; }
.menu__row:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.menu { gap: 14px; }
.menu__list { gap: 10px; }

/* isim sorma */
.nameform { display: flex; gap: 10px; margin-top: 12px; }
.nameform .field { flex: 1; min-width: 0; height: 50px; padding: 0 16px; border-radius: 16px; background: var(--bg2); border: 1.5px solid var(--line); font-size: 1.05rem; font-weight: 700; outline: none; }
.nameform .field:focus { border-color: var(--accent); background: #fff; }
.field.shake, .nameform .field.shake { animation: shake .45s; }
input.field { height: 50px; padding: 0 16px; border-radius: 16px; background: var(--bg2); border: 1.5px solid var(--line); font-weight: 700; }

/* profil penceresi */
.prof h4 { display: flex; align-items: baseline; gap: 8px; margin: 20px 0 10px; font-size: .7rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--ink45); }
.prof h4 small { letter-spacing: 0; font-size: .8rem; color: var(--ink66); }
.prof__top { display: flex; align-items: center; gap: 14px; }
.prof__top > div { flex: 1; display: grid; gap: 6px; min-width: 0; }
.prof__name { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quests { display: grid; gap: 8px; }
.quest { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: 'i t s' 'i b b'; align-items: center; gap: 4px 10px; padding: 10px 12px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); }
.quest > span:first-child { grid-area: i; font-weight: 800; color: var(--ink45); }
.quest b { grid-area: t; font-size: .86rem; }
.quest small { grid-area: s; font-size: .7rem; font-weight: 700; color: var(--ink45); white-space: nowrap; }
.quest__bar { grid-area: b; height: 5px; border-radius: 6px; background: var(--bg3); overflow: hidden; }
.quest__bar i { display: block; height: 100%; background: var(--k-g); transform-origin: 0 50%; border-radius: inherit; }
[dir='rtl'] .quest__bar i { transform-origin: 100% 50%; }
.quest.is-done { background: rgba(35, 160, 101, .08); border-color: rgba(35, 160, 101, .3); }
.quest.is-done > span:first-child { color: var(--k-g); }
.quest__bonus { margin: 2px 4px 0; font-size: .74rem; font-weight: 700; color: var(--ink45); }
.quest__bonus.is-done { color: var(--k-g); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.stats > div { display: grid; padding: 10px 12px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); }
.stats b { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; line-height: 1.1; }
.stats span { font-size: .68rem; font-weight: 700; color: var(--ink45); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.bdg { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 12px 8px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); filter: grayscale(1); opacity: .5; }
.bdg i { font-style: normal; font-size: 1.7rem; line-height: 1.2; }
.bdg b { font-size: .8rem; }
.bdg small { font-size: .66rem; color: var(--ink45); font-weight: 600; line-height: 1.3; }
.bdg.is-on { filter: none; opacity: 1; background: linear-gradient(160deg, #fff8e8, #fff); border-color: rgba(240, 169, 43, .45); box-shadow: var(--shadow-s); }
.cos { display: grid; gap: 8px; margin-bottom: 12px; }
.cos > b { font-size: .84rem; }
.cos__list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.sw { flex: none; display: grid; justify-items: center; gap: 4px; width: 92px; padding: 8px; border-radius: 16px; background: var(--bg2); border: 1.5px solid var(--line); font-size: .74rem; font-weight: 800; }
.sw i { width: 46px; height: 46px; border-radius: 12px; background: radial-gradient(circle at 50% 40%, var(--b), var(--a) 70%); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .7), 0 4px 10px rgba(0, 0, 0, .15); }
.sw small { font-size: .6rem; font-weight: 700; color: var(--ink45); line-height: 1.2; text-align: center; }
.sw.is-on { border-color: var(--ink); background: #fff; box-shadow: var(--shadow-s); }
.sw.is-locked i { filter: grayscale(.8) brightness(.8); opacity: .55; }
.toast--gold { background: linear-gradient(135deg, #2a221b, #4a3420); color: #ffe7b3; border: 1px solid rgba(240, 169, 43, .5); }

/* turnuva + açık masalar */
.tour { display: grid; gap: 8px; margin: 12px 0; }
.tour__st { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); }
.tour__st i { font-style: normal; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; }
.tour__st b { flex: 1; }
.tour__st span { font-size: .78rem; color: var(--ink66); font-weight: 600; }
.publist { display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; margin: 6px 0 4px; }
.pubrow { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); }
.pubrow__ic { font-size: 1.4rem; }
.pubrow__t { flex: 1; display: grid; min-width: 0; }
.pubrow__t b { font-size: .9rem; }
.pubrow__t small { font-size: .74rem; color: var(--ink45); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--ink45); font-weight: 600; text-align: center; padding: 18px 0; }
.lobby__auto { margin: 8px 0 0; padding: 8px 14px; border-radius: 30px; background: rgba(240, 169, 43, .14); color: #8a5a10; font-size: .82rem; font-weight: 800; display: inline-block; }
.set--pub { margin-bottom: 12px; padding: 12px 14px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); }
.res.is-out { opacity: .55; }
.res__elim { font-weight: 800; color: #a3342f; }

/* hazır sohbet */
.chat { position: absolute; z-index: 45; inset-inline-end: 10px; top: calc(58px + var(--sat)); width: min(330px, calc(100% - 20px)); max-height: calc(100% - 80px - var(--meH)); overflow-y: auto; display: grid; gap: 8px; padding: 10px; border-radius: var(--r-l); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-l); }
.chat__emo { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.chat__emo button { height: 40px; border-radius: 14px; font-size: 1.2rem; }
.chat__emo button.txt { font-size: .68rem; font-weight: 800; }
.chat__q { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.chat__q button { min-height: 38px; padding: 6px 10px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); font-size: .78rem; font-weight: 700; text-align: start; line-height: 1.25; }
.chat button:active, .chat button:hover { background: var(--bg3); }
.react-pop--txt { font-size: .9rem; max-width: 220px; white-space: normal; line-height: 1.3; padding: 7px 12px; }
.react-pop small { display: block; font-size: .62rem; font-weight: 800; opacity: .6; letter-spacing: .06em; }
.has3d .react-pop { background: #fff6ea; color: #1f1a15; }

/* sürüklenen kart */
.drag-ghost { position: absolute; z-index: 60; margin: 0 !important; pointer-events: none; transform-origin: 50% 80%; will-change: transform; box-shadow: 0 1.4em 2.6em -0.8em rgba(40, 25, 10, .55) !important; }
.hand .card { touch-action: pan-x; }

/* UNO anı: kenarlar kararır, nabız atar */
.tension { position: absolute; inset: 0; z-index: 30; pointer-events: none; opacity: 0; background: radial-gradient(ellipse 70% 62% at 50% 45%, transparent 40%, rgba(120, 10, 20, .32) 85%, rgba(60, 0, 8, .55) 100%); }
.tension.is-on { animation: tension 2.2s ease-out forwards; }
@keyframes tension { 0% { opacity: 0; } 12% { opacity: 1; } 28% { opacity: .7; } 40% { opacity: 1; } 56% { opacity: .75; } 68% { opacity: 1; } 100% { opacity: 0; } }
.seat.is-spot .seat__av { animation: spot 2s var(--ease); }
@keyframes spot { 0%, 100% { transform: none; } 15% { transform: scale(1.35); } 30% { transform: scale(1.2); } 45% { transform: scale(1.32); } 70% { transform: scale(1.15); } }
.has3d .seat.is-spot .seat__av { animation: none; }

/* elenen oyuncular */
.seat.is-out .avatar { filter: grayscale(1); opacity: .45; }
.seat.is-out .seat__count { background: #777; }
.seat.is-out .seat__name { text-decoration: line-through; opacity: .6; }
.me.is-out .hand { opacity: .35; pointer-events: none; }

/* yeni kart sembolleri */
.card__big--xs { font-size: 2.5em; letter-spacing: -.04em; }

/* 3B: koltuk etiketi başın üstünde */
.has3d .seat { transform-origin: 50% 100%; gap: 2px; width: 120px; }
.has3d .seat .avatar { width: 38px; height: 38px; font-size: 1rem; }
.has3d .seat__name { font-size: .68rem; padding: 2px 9px; background: rgba(255, 246, 234, .92); }
.has3d .seat__count { right: -16px; top: -8px; }
.has3d .seat.is-turn .avatar { transform: scale(1.08); }
.has3d .seat.is-out { opacity: .55; }

/* kart arkası temaları (DOM) */
body[data-back='midnight'] .card--back .card__face { background: radial-gradient(90% 60% at 50% 40%, #24386b, #0b1226 75%); }
body[data-back='midnight'] .card__logo { background: linear-gradient(135deg, #3d74f0, #2346a8); }
body[data-back='neon'] .card--back .card__face { background: radial-gradient(90% 60% at 50% 40%, #3a0f52, #0c0414 75%); }
body[data-back='neon'] .card--back .card__face::before { border-color: rgba(60, 240, 255, .7); }
body[data-back='neon'] .card__logo { background: linear-gradient(135deg, #ff3df2, #9b1ad1); }
body[data-back='gold'] .card--back .card__face { background: radial-gradient(90% 60% at 50% 40%, #5a4520, #1a1206 75%); }
body[data-back='gold'] .card--back .card__face::before { border-color: rgba(240, 200, 110, .8); }
body[data-back='gold'] .card__logo { background: linear-gradient(135deg, #e8b44a, #a8741c); color: #2a1d08; }
body[data-back='royal'] .card--back .card__face { background: radial-gradient(90% 60% at 50% 40%, #4a1a55, #150618 75%); }
body[data-back='royal'] .card__logo { background: linear-gradient(135deg, #a46cf0, #6a2fb0); }
body[data-back='midnight'] .minicard { background: radial-gradient(circle at 50% 42%, #3d74f0 0 22%, transparent 24%), linear-gradient(160deg, #24386b, #0b1226); }
body[data-back='neon'] .minicard { background: radial-gradient(circle at 50% 42%, #ff3df2 0 22%, transparent 24%), linear-gradient(160deg, #3a0f52, #0c0414); }
body[data-back='gold'] .minicard { background: radial-gradient(circle at 50% 42%, #e8b44a 0 22%, transparent 24%), linear-gradient(160deg, #5a4520, #1a1206); }
body[data-back='royal'] .minicard { background: radial-gradient(circle at 50% 42%, #a46cf0 0 22%, transparent 24%), linear-gradient(160deg, #4a1a55, #150618); }
/* masa çuhası (2B masada hafif renk tonu) */
body[data-felt='green'] .felt { background: radial-gradient(ellipse at 50% 40%, #f7fdf8 0%, #e3f1e7 55%, #cfe4d5 100%); }
body[data-felt='navy'] .felt { background: radial-gradient(ellipse at 50% 40%, #f6f9ff 0%, #e2e9f7 55%, #ccd7ee 100%); }
body[data-felt='burgundy'] .felt { background: radial-gradient(ellipse at 50% 40%, #fff7f7 0%, #f5e2e4 55%, #ebcdd1 100%); }
body[data-felt='purple'] .felt { background: radial-gradient(ellipse at 50% 40%, #fbf7ff 0%, #ebe1f7 55%, #dccbef 100%); }
body[data-felt='black'] .felt { background: radial-gradient(ellipse at 50% 40%, #fafafa 0%, #e8e8e8 55%, #d4d4d4 100%); }
/* oda teması (2B masa zemini) */
body[data-room='casino'] .table { background: radial-gradient(130% 90% at 50% 35%, #fff6f7 0%, #f3e1e4 60%, #e8d0d5 100%); }
body[data-room='garden'] .table { background: radial-gradient(130% 90% at 50% 35%, #f8fdf4 0%, #e6f1de 60%, #d6e6cb 100%); }

/* Arapça: yazı tipi ve yön */
html[lang='ar'] body { font-family: 'Noto Sans Arabic', var(--sans); }
html[lang='ar'] .menu__tag, html[lang='ar'] .hub__sec, html[lang='ar'] .prof h4, html[lang='ar'] .profile__info label, html[lang='ar'] .pile__hint, html[lang='ar'] .hud__info { letter-spacing: 0; }
[dir='rtl'] .mbtn, [dir='rtl'] .mode, [dir='rtl'] .game-tile { text-align: right; }
[dir='rtl'] .mbtn__go, [dir='rtl'] .btn__arrow { transform: scaleX(-1); }
[dir='rtl'] .mbtn:hover .mbtn__go { transform: scaleX(-1) translateX(4px); }
[dir='rtl'] .mode.is-on::after { right: auto; left: 10px; }
[dir='rtl'] .mbtn--join input, [dir='rtl'] .logo, [dir='rtl'] .hub__logo, [dir='rtl'] .lobby__title em, [dir='rtl'] #codeInput { direction: ltr; }
[dir='rtl'] .hub__logo { flex-direction: row; }
/* oyun masası yön bağımsız kalır (kart dizilimi ve oturma düzeni) */
[dir='rtl'] .table, [dir='rtl'] .hand, [dir='rtl'] .center, [dir='rtl'] .seats-ring, [dir='rtl'] .dir { direction: ltr; }
[dir='rtl'] .turnbar, [dir='rtl'] .me__bar, [dir='rtl'] .catch, [dir='rtl'] .afk, [dir='rtl'] .hud__info, [dir='rtl'] .chat, [dir='rtl'] .toasts, [dir='rtl'] .burst, [dir='rtl'] .react-pop { direction: rtl; }
[dir='rtl'] .seat__name { direction: rtl; }

@media (max-width: 640px) {
  .hub { gap: 13px; padding-top: calc(24px + var(--sat)); }
  .game-tile--uno { min-height: 96px; }
  .game-tile__art { width: 72px; height: 72px; }
  .chat__q button { font-size: .74rem; }
}
@media (max-height: 700px) and (max-width: 640px) { .hub__logo { font-size: 2.6rem; } .menu__foot { display: none; } .mechip { padding: 6px 12px 6px 6px; } .mechip .avatar { width: 34px; height: 34px; } }
[dir='rtl'] .uno-btn, [dir='rtl'] .burst--uno, [dir='rtl'] .badge-uno { direction: ltr; }
.backpill { direction: ltr; }
[dir='rtl'] .backpill span { transform: none; }
.chat__emo button.txt { direction: ltr; }
.screen--home .menu { padding-top: calc(66px + var(--sat)); }
