:root {
  --bg1: #7B6CF6; --bg2: #4DABF7; --ink: #2B2550; --muted: #6E6895;
  --card: #ffffff; --line: #ECE8FF; --primary: #FF5C8A; --primary-d: #D63D6B;
  --secondary: #6C5CE7; --secondary-d: #4B3DBE; --green: #2FBF71; --green-d: #1E9455;
  --gold: #FFC94D; --red: #FF5C5C; --radius: 18px;
  --shadow: 0 10px 30px rgba(43, 37, 80, .18);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Fredoka', 'Nunito', system-ui, -apple-system, sans-serif; color: var(--ink);
  background: linear-gradient(135deg, var(--bg1), var(--bg2)); background-attachment: fixed;
  overflow-x: hidden;
}
.hidden { display: none !important; }
h2 { margin: 0 0 10px; font-size: 20px; }
h3 { margin: 16px 0 8px; font-size: 16px; color: var(--muted); }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.row { display: flex; gap: 8px; }
.row > input { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.error { color: var(--red); min-height: 20px; font-size: 14px; margin: 4px 0; }

input, select {
  font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line);
  background: #FAF9FF; color: var(--ink); outline: none; width: 100%;
}
input:focus, select:focus { border-color: var(--secondary); background: #fff; }

.btn {
  font: inherit; font-weight: 600; font-size: 16px; border: 0; border-radius: 14px; padding: 11px 18px;
  cursor: pointer; color: #fff; background: var(--secondary); box-shadow: 0 4px 0 var(--secondary-d);
  transition: transform .08s, box-shadow .08s, filter .15s; white-space: nowrap; user-select: none;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--secondary-d); }
.btn:disabled { filter: grayscale(.8) opacity(.55); cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); box-shadow: 0 4px 0 var(--primary-d); }
.btn-primary:active { box-shadow: 0 1px 0 var(--primary-d); }
.btn-green { background: var(--green); box-shadow: 0 4px 0 var(--green-d); }
.btn-green:active { box-shadow: 0 1px 0 var(--green-d); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 #D9A21F; }
.btn-red { background: var(--red); box-shadow: 0 4px 0 #C93C3C; }
.btn-ghost { background: rgba(255,255,255,.2); box-shadow: none; }
.btn-light { background: #F1EEFF; color: var(--secondary-d); box-shadow: 0 3px 0 #D9D3FF; }
.btn-big { width: 100%; padding: 15px; font-size: 18px; margin-top: 10px; }
.btn-small { padding: 7px 12px; font-size: 14px; border-radius: 11px; box-shadow: 0 3px 0 var(--secondary-d); }
.btn-small.btn-primary { box-shadow: 0 3px 0 var(--primary-d); }
.btn-small.btn-green { box-shadow: 0 3px 0 var(--green-d); }
.btn-small.btn-light { box-shadow: 0 3px 0 #D9D3FF; }
.btn-tiny { padding: 4px 9px; font-size: 13px; border-radius: 9px; box-shadow: 0 2px 0 rgba(0,0,0,.18); }

.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.pop { animation: pop .28s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.logo { display: flex; flex-direction: column; align-items: center; line-height: .95; font-weight: 700; letter-spacing: 1px; }
.logo-1 { font-size: 30px; color: var(--secondary); }
.logo-2 { font-size: 46px; color: var(--primary); text-shadow: 3px 3px 0 #FFE3EC; }
.logo.small { flex-direction: row; gap: 6px; align-items: baseline; }
.logo.small .logo-1 { font-size: 20px; color: #fff; }
.logo.small .logo-2 { font-size: 24px; color: #FFE066; text-shadow: none; }

.screen { min-height: 100vh; min-height: 100dvh; }
#screen-auth { display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; text-align: center; }
.tagline { color: var(--muted); margin: 8px 0 4px; }
.auth-pawns { display: flex; justify-content: center; height: 72px; margin: 4px 0 10px; }
.auth-pawns img { width: 64px; height: 64px; animation: bob 1.6s ease-in-out infinite; }
.auth-pawns img:nth-child(2n) { animation-delay: .3s; }
.auth-pawns img:nth-child(3n) { animation-delay: .6s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
#auth-form { display: flex; flex-direction: column; gap: 10px; }

.tabs { display: flex; background: #F1EEFF; border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.tab { flex: 1; border: 0; background: transparent; font: inherit; font-weight: 600; padding: 9px; border-radius: 11px; color: var(--muted); cursor: pointer; font-size: 15px; }
.tab.active { background: #fff; color: var(--secondary); box-shadow: 0 2px 8px rgba(108,92,231,.18); }

.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; }
.me-chip { background: rgba(255,255,255,.22); color: #fff; padding: 7px 14px; border-radius: 999px; font-weight: 600; }

.lobby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 8px 18px 28px; max-width: 1200px; margin: 0 auto; }
.lobby-grid .rules { grid-column: 1 / -1; }
.rules ul { margin: 0; padding-left: 20px; line-height: 1.6; color: #4A4470; }
.room-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow: auto; }
.room-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #FAF9FF; border: 2px solid var(--line); }
.room-item .name { font-weight: 600; }
.room-item .meta { font-size: 13px; color: var(--muted); }
.room-item .avatars { display: flex; }
.room-item .avatars img { width: 30px; height: 30px; margin-left: -8px; background: #fff; border-radius: 50%; border: 2px solid #fff; }
.empty { color: var(--muted); text-align: center; padding: 18px; font-size: 14px; }

.lb-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.lb-body th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; padding: 6px; }
.lb-body td { padding: 8px 6px; border-top: 1px solid var(--line); }
.lb-body tr.me td { background: #FFF5D6; }
.lb-body .rank { font-weight: 700; width: 34px; }
.my-stats { margin-top: 12px; padding: 12px; border-radius: 14px; background: #F1EEFF; display: flex; justify-content: space-around; text-align: center; font-size: 13px; color: var(--muted); }
.my-stats b { display: block; font-size: 20px; color: var(--secondary); }

.room-wrap { display: grid; place-items: start center; padding: 8px 16px 30px; }
.room-wrap .card { width: 100%; max-width: 640px; }
.room-code-box { display: flex; align-items: center; gap: 12px; background: #FFF5D6; border-radius: 14px; padding: 10px 14px; }
.room-code-box b { font-size: 28px; letter-spacing: 4px; color: var(--primary); flex: 1; }
.room-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.room-player { text-align: center; padding: 10px; border-radius: 16px; background: #FAF9FF; border: 2px solid var(--line); position: relative; }
.room-player img { width: 70px; height: 70px; }
.room-player .n { font-weight: 600; }
.room-player .host { position: absolute; top: 6px; right: 8px; font-size: 16px; }
.room-player.off { opacity: .5; }
.room-player .kick { position: absolute; top: 4px; left: 6px; border: 0; background: #FFE3E3; color: #C92A2A; border-radius: 8px; width: 24px; height: 24px; cursor: pointer; font-weight: 700; }
.bot-box { background: linear-gradient(135deg, #E6FCF5, #D3F9D8); border-radius: 14px; padding: 12px; }
.bot-box select { flex: 1; min-width: 0; }
.char-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.char { border: 3px solid transparent; border-radius: 16px; background: #FAF9FF; padding: 4px; cursor: pointer; text-align: center; font-size: 13px; font-weight: 600; transition: transform .12s; }
.char:hover { transform: translateY(-3px); }
.char img { width: 100%; aspect-ratio: 1; display: block; }
.char.mine { border-color: var(--primary); background: #FFF0F5; }
.char.taken { opacity: .35; cursor: not-allowed; }

/* ---------- OYUN ---------- */
#screen-game { position: fixed; inset: 0; overflow: hidden; }
#canvas-wrap { position: absolute; inset: 0; touch-action: none; }
#canvas-wrap canvas { display: block; }
.game-top { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; z-index: 5; max-width: calc(100vw - 20px); }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: rgba(255,255,255,.92); box-shadow: var(--shadow); font-size: 20px; cursor: pointer; flex-shrink: 0; }
.turn-pill { background: rgba(255,255,255,.95); padding: 6px 14px 6px 6px; border-radius: 999px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 44px; min-width: 0; }
.turn-pill img { width: 34px; height: 34px; }
.turn-pill .tname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.timer { font-variant-numeric: tabular-nums; background: #F1EEFF; color: var(--secondary); padding: 2px 8px; border-radius: 999px; font-size: 14px; }
.timer.warn { background: #FFE3E3; color: var(--red); }

.players-panel { position: absolute; top: 70px; left: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 4; width: 230px; max-height: calc(100% - 180px); overflow: auto; padding: 2px; }
.pcard { background: rgba(255,255,255,.94); border-radius: 16px; padding: 8px 10px 8px 6px; display: flex; gap: 8px; align-items: center; box-shadow: 0 4px 14px rgba(43,37,80,.15); border: 3px solid transparent; position: relative; flex-shrink: 0; }
.pcard.turn { border-color: var(--gold); animation: glow 1.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgba(255,201,77,.35); } }
.pcard.bankrupt { opacity: .45; filter: grayscale(1); }
.pcard img { width: 44px; height: 44px; flex-shrink: 0; }
.pcard .info { min-width: 0; flex: 1; }
.pcard .pname { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.pcard .money { font-weight: 700; color: var(--green-d); font-size: 16px; }
.pcard .money.neg { color: var(--red); }
.pcard .sub { font-size: 11px; color: var(--muted); }
.pcard .dots { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.pcard .dots i { width: 8px; height: 8px; border-radius: 2px; display: block; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); display: inline-block; flex-shrink: 0; }
.status-dot.off { background: #bbb; }
.pcard .badge { font-size: 12px; }
.pcard.me { background: #FFFBEA; }

.action-bar { position: absolute; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); z-index: 6; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 24px); }
.action-bar .btn { font-size: 18px; padding: 14px 22px; }
.action-bar .note { background: rgba(255,255,255,.95); padding: 10px 16px; border-radius: 14px; box-shadow: var(--shadow); font-weight: 500; text-align: center; }
.action-bar .btn-roll { font-size: 22px; padding: 16px 34px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }

.side-panel { position: absolute; top: 70px; right: 12px; bottom: 12px; width: 330px; z-index: 4; background: rgba(255,255,255,.96); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.side-tabs { display: flex; border-bottom: 2px solid var(--line); flex-shrink: 0; }
.stab { flex: 1; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; padding: 11px 2px; color: var(--muted); cursor: pointer; position: relative; }
.stab.active { color: var(--secondary); box-shadow: inset 0 -3px 0 var(--secondary); }
.stab .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.side-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.stab-pane { flex: 1; overflow: auto; padding: 12px; }
#pane-chat { display: flex; flex-direction: column; gap: 8px; }
#pane-chat.hidden { display: none; }
.chat-list { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.chat-msg { background: #F6F4FF; padding: 7px 10px; border-radius: 12px; font-size: 14px; }
.chat-msg b { color: var(--secondary); }
.log-item { font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line); line-height: 1.35; }
.log-item time { color: #aaa; font-size: 11px; margin-right: 4px; }
.sheet-toggle { display: none; }

.group-block { margin-bottom: 12px; }
.group-title { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.group-title i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.prop-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 12px; background: #FAF9FF; margin-bottom: 4px; font-size: 14px; flex-wrap: wrap; }
.prop-row .pn { flex: 1; min-width: 100px; cursor: pointer; font-weight: 500; }
.prop-row .pn small { color: var(--muted); display: block; font-weight: 400; }
.prop-row.mort { background: #F3F3F3; color: #888; }
.prop-row .btns { display: flex; gap: 4px; }

.trade-box { display: flex; flex-direction: column; gap: 10px; }
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trade-col { background: #FAF9FF; border-radius: 12px; padding: 8px; }
.trade-col h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.trade-col label { display: flex; align-items: center; gap: 4px; font-size: 13px; padding: 3px 0; cursor: pointer; }
.trade-col label i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.trade-col input[type=number] { padding: 7px 8px; font-size: 14px; margin-top: 4px; }

/* bilgi kartı (kare gelince açılan) */
.tile-peek { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); z-index: 7; width: 250px; cursor: pointer; animation: pop .28s cubic-bezier(.2,1.4,.4,1); }
.deed { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); border: 3px solid #fff; }
.deed-head { padding: 12px; text-align: center; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.deed-head .city { font-size: 13px; opacity: .95; letter-spacing: 1px; }
.deed-head .title { font-size: 22px; font-weight: 700; line-height: 1.1; }
.deed-body { padding: 10px 14px 14px; font-size: 14px; }
.deed-body .m2 { text-align: center; background: #FFF5D6; border-radius: 10px; padding: 5px 8px; margin-bottom: 6px; font-size: 13px; }
.deed-body .desc { color: var(--muted); font-style: italic; margin-bottom: 8px; text-align: center; }
.deed table { width: 100%; border-collapse: collapse; }
.deed td { padding: 3px 0; }
.deed td:last-child { text-align: right; font-weight: 600; }
.deed tr.cur td { color: var(--primary); }
.deed .owner { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 8px; padding: 6px; background: #FAF9FF; border-radius: 10px; font-weight: 600; }
.deed .owner img { width: 28px; height: 28px; }
.deed .sep { border-top: 1px dashed var(--line); margin: 6px 0; }

.modal-bg { position: fixed; inset: 0; background: rgba(30, 24, 70, .45); z-index: 50; display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { background: #fff; border-radius: 22px; width: 100%; max-width: 380px; max-height: calc(100dvh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal .deed { box-shadow: none; border: 0; border-radius: 0; }
.modal-actions { display: flex; gap: 8px; padding: 0 14px 14px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1; }
.modal-pad { padding: 20px; text-align: center; }
.game-card { margin: 18px; border-radius: 18px; padding: 22px 18px; color: #fff; text-align: center; position: relative; }
.game-card .gc-type { font-size: 14px; letter-spacing: 2px; opacity: .9; }
.game-card .gc-emoji { font-size: 54px; margin: 6px 0; }
.game-card .gc-text { font-size: 19px; font-weight: 500; line-height: 1.35; }
.winner-img { width: 140px; height: 140px; animation: bob 1.2s ease-in-out infinite; }
.ranking { text-align: left; margin: 12px 0; }
.ranking div { padding: 6px 10px; border-radius: 10px; display: flex; gap: 8px; align-items: center; }
.ranking div:nth-child(odd) { background: #FAF9FF; }
.ranking img { width: 30px; height: 30px; }

.toasts { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 14px; font-size: 15px; box-shadow: var(--shadow); animation: pop .25s; }
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }

.float-text { position: absolute; left: 0; top: 0; z-index: 3; font-weight: 700; font-size: 22px; pointer-events: none; text-shadow: 0 2px 0 #fff, 0 0 8px #fff; white-space: nowrap; }

#conn-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: var(--red); color: #fff; text-align: center; padding: 8px; font-weight: 600; }

.menu-list { display: flex; flex-direction: column; gap: 10px; padding: 18px; }

/* ---------- MOBİL ---------- */
@media (max-width: 820px) {
  .lobby-grid { grid-template-columns: 1fr; padding: 4px 12px 24px; }
  .char-picker { grid-template-columns: repeat(3, 1fr); }
  .topbar { padding: 10px 12px; }
  .logo.small .logo-1 { font-size: 16px; } .logo.small .logo-2 { font-size: 19px; }
  .game-top { top: 8px; gap: 6px; }
  .icon-btn { width: 40px; height: 40px; font-size: 18px; }
  .players-panel { top: 56px; left: 0; right: 0; width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 4px 8px; max-height: none; scrollbar-width: none; }
  .players-panel::-webkit-scrollbar { display: none; }
  .pcard { min-width: 150px; padding: 5px 8px 5px 4px; }
  .pcard img { width: 34px; height: 34px; }
  .pcard .money { font-size: 14px; }
  .pcard .pname { font-size: 13px; }
  .pcard .dots { display: none; }
  .tile-peek { top: 130px; width: 230px; }
  .side-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 46px; border-radius: 18px 18px 0 0; transition: height .25s; padding-bottom: var(--safe-b); }
  .side-panel.open { height: 62dvh; }
  .side-panel .side-tabs { padding-right: 46px; }
  .sheet-toggle { display: block; position: absolute; right: 6px; top: 4px; width: 38px; height: 38px; border: 0; border-radius: 12px; background: #F1EEFF; font-size: 14px; color: var(--secondary); }
  .side-panel.open .sheet-toggle { transform: rotate(180deg); }
  .action-bar { bottom: calc(58px + var(--safe-b)); }
  .action-bar .btn { font-size: 16px; padding: 12px 18px; }
  .action-bar .btn-roll { font-size: 20px; padding: 14px 30px; }
  .turn-pill .tname { max-width: 32vw; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .side-panel { width: 290px; }
  .players-panel { width: 200px; }
}

/* ---------- karakter çizimleri ---------- */
/* küçük avatarlar: yüzü göster */
.pcard img, .turn-pill img, .room-item .avatars img, .ranking img, .deed .owner img {
  object-fit: cover; object-position: 50% 2%; border-radius: 50%; background: #F1EEFF;
}
.turn-pill img { border: 2px solid #fff; }
.auth-pawns { height: 110px; gap: 2px; }
.auth-pawns img { width: auto; height: 108px; }
.room-player img { width: auto; height: 120px; object-fit: contain; }
.char-picker { grid-template-columns: repeat(6, 1fr); max-height: 420px; overflow: auto; padding: 4px; }
.char img { width: 100%; height: 120px; aspect-ratio: auto; object-fit: contain; }
.char { font-size: 12px; }
.winner-img { width: auto; height: 220px; }
@media (max-width: 820px) {
  .char-picker { grid-template-columns: repeat(4, 1fr); max-height: 360px; }
  .char img { height: 96px; }
  .auth-pawns img { height: 90px; }
}

/* ---------- animasyon dokunuşları ---------- */
.pcard .money { transition: transform .2s; display: inline-block; }
.pcard .money.up { color: #12b76a; animation: moneyUp .8s ease; }
.pcard .money.down { color: #f04438; animation: moneyDown .8s ease; }
@keyframes moneyUp { 0% { transform: scale(1); } 30% { transform: scale(1.25) translateY(-2px); } 100% { transform: scale(1); } }
@keyframes moneyDown { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-3px); } 40% { transform: translateX(3px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }
.action-bar > * { animation: barIn .35s cubic-bezier(.2, 1.4, .4, 1) both; }
.action-bar > *:nth-child(2) { animation-delay: .05s; }
.action-bar > *:nth-child(3) { animation-delay: .1s; }
@keyframes barIn { from { transform: translateY(24px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.pcard { transition: transform .25s, box-shadow .25s; }
.pcard.turn { transform: scale(1.03); }
.float-text { font-size: 24px; text-shadow: 0 2px 0 #fff, 0 0 10px #fff, 0 3px 8px rgba(0,0,0,.25); }
.tile-peek .deed { animation: peekIn .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes peekIn { from { transform: translateY(-20px) rotate(-4deg) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* karakter seçme ekranı */
.modal.wide { max-width: 760px; }
.cp-wrap h2 { margin-bottom: 8px; }
.cp-preview { display: flex; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(135deg, #F1EEFF, #FFF0F5); border-radius: 16px; padding: 8px; margin-bottom: 10px; }
.cp-preview img { height: 150px; width: auto; animation: bob 1.6s ease-in-out infinite; }
.cp-preview img:nth-child(2) { animation-delay: .2s; } .cp-preview img:nth-child(3) { animation-delay: .4s; }
.cp-preview div { text-align: left; min-width: 110px; padding-left: 6px; }
.cp-wrap .char-picker { max-height: 46vh; }
@media (max-width: 820px) { .cp-preview img { height: 100px; } .cp-preview img:nth-child(3) { display: none; } }

/* karakter konuşma balonu */
.speech-bubble { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; white-space: nowrap;
  background: #fff; color: var(--ink); font-weight: 700; font-size: 17px; padding: 8px 14px; border-radius: 18px;
  box-shadow: 0 6px 18px rgba(43,37,80,.25); border: 3px solid var(--gold); animation: bubbleIn .35s cubic-bezier(.2,1.6,.4,1); }
.speech-bubble::after { content: ''; position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%);
  border: 9px solid transparent; border-top-color: var(--gold); }
@keyframes bubbleIn { from { scale: .3; } to { scale: 1; } }

/* ikonik yer tabelası */
.landmark-label { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; white-space: nowrap;
  background: linear-gradient(135deg, #ffffff, #fff8e6); color: var(--ink); font-size: 18px; padding: 8px 16px;
  border-radius: 999px; border: 3px solid var(--c, #FFD166); box-shadow: 0 8px 22px rgba(43,37,80,.28), 0 0 0 4px rgba(255,255,255,.5); }
.landmark-label b { font-weight: 800; }
.landmark-label small { color: var(--c, #6E6895); font-weight: 700; margin-left: 6px; font-size: 14px; }
@media (max-width: 820px) { .landmark-label { font-size: 15px; padding: 6px 12px; } }

/* karakter seçiminde kişi kutuları (Sen, Bot 1...) */
.cp-slots { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 8px; padding: 2px; }
.cp-slots:empty { display: none; }
.cp-slot { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 3px solid #E7E3FF; background: #FAF9FF; border-radius: 14px; padding: 4px 8px; cursor: pointer; font: inherit; min-width: 74px; }
.cp-slot img { height: 54px; width: auto; }
.cp-slot span { font-weight: 700; font-size: 13px; color: var(--ink); }
.cp-slot small { font-size: 11px; color: var(--muted); }
.cp-slot.on { border-color: var(--primary); background: #FFF0F5; box-shadow: 0 0 0 3px rgba(255,92,138,.2); }
.room-player.pickable { cursor: pointer; transition: transform .12s; }
.room-player.pickable:hover { transform: translateY(-3px); border-color: var(--secondary); }
.pick-hint { font-size: 11px; color: var(--secondary); font-weight: 700; margin-top: 2px; }

/* kaç kişi / kaçı bot seçimi */
.seat-row { gap: 10px; }
.seat-row label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seat-row select { font-size: 16px; padding: 10px; }

/* menü ayarları */
.menu-list h3 { margin: 6px 0 0; font-size: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #FAF9FF; border-radius: 12px; padding: 8px 12px; cursor: pointer; }
.set-row > span:first-child { display: flex; flex-direction: column; font-weight: 600; font-size: 15px; }
.set-row small { font-weight: 400; font-size: 12px; color: var(--muted); }
.set-row input[type=range] { width: 46%; accent-color: var(--primary); }
.switch { position: relative; width: 50px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #d5d1ea; border-radius: 999px; transition: background .2s; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(22px); }

/* rakip sayısı ve adım yazısı */
.cp-adjust { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #E6FCF5; border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
.cp-adjust span { flex: 1; font-size: 14px; }
.cp-step { font-weight: 700; color: var(--primary); margin: 2px 0 6px; font-size: 15px; }
.cp-slot img { height: 64px; }

/* alt panel: oyun sırasında Mülklerim/Takas/Olaylar/Sohbet her ekranda altta, açılır-kapanır */
.side-panel { top: auto; right: auto; left: 50%; bottom: 0; transform: translateX(-50%); width: min(760px, calc(100vw - 24px)); height: 46px; border-radius: 18px 18px 0 0; transition: height .25s; padding-bottom: var(--safe-b); }
.side-panel.open { height: min(46dvh, 460px); }
.side-panel .side-tabs { padding-right: 46px; }
.sheet-toggle { display: block; position: absolute; right: 6px; top: 4px; width: 38px; height: 38px; border: 0; border-radius: 12px; background: #F1EEFF; font-size: 14px; color: var(--secondary); cursor: pointer; transition: transform .25s; }
.side-panel.open .sheet-toggle { transform: rotate(180deg); }
.action-bar { bottom: calc(60px + var(--safe-b)); }
@media (max-width: 820px) {
  .side-panel { left: 0; transform: none; width: 100%; }
  .side-panel.open { height: 62dvh; }
}


.turn-pill .round { font-size: 12px; font-weight: 700; color: var(--muted); background: #F1EEFF; border-radius: 10px; padding: 2px 7px; margin-left: 4px; }
