:root { --bg:#0f2a22; --panel:#173a2f; --line:#2b5a4a; --text:#f1ead8; --muted:#a9b8ae; --gold:#d8b25a; }
* { box-sizing:border-box; }
body { margin:0; font-family:system-ui,Segoe UI,Roboto,sans-serif; background:var(--bg); color:var(--text); }
header { display:flex; align-items:center; gap:12px; padding:10px 16px; background:#0b1f19; border-bottom:1px solid var(--line); flex-wrap:wrap; }
header h1 { font-size:18px; margin:0; color:var(--gold); letter-spacing:.5px; }
.sp { flex:1; }
button { background:var(--gold); color:#221a05; border:0; border-radius:6px; padding:8px 12px; font-weight:600; cursor:pointer; }
button.alt { background:transparent; color:var(--text); border:1px solid var(--line); }
button.sm { padding:2px 8px; }
button:disabled { opacity:.4; cursor:default; }
input, select { background:#0b1f19; color:var(--text); border:1px solid var(--line); border-radius:6px; padding:8px; }
input { width:100%; } input[type=checkbox] { width:auto; }
.hide { display:none !important; }
.panel { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:14px; }
#login { max-width:380px; margin:8vh auto; display:grid; gap:10px; }
h2 { margin:0 0 4px; font-size:16px; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.row.nowrap { flex-wrap:nowrap; }
.muted { color:var(--muted); font-size:13px; }
.gold { color:var(--gold); font-weight:600; }
.err { color:#ff9c8a; min-height:18px; font-size:13px; }
.wrap { display:grid; grid-template-columns:1fr 320px; gap:14px; padding:14px; max-width:1300px; margin:0 auto; }
@media (max-width:900px) { .wrap { grid-template-columns:1fr; } }
.tables { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:12px; }
.tcard h3 { margin:0 0 8px; font-size:14px; display:flex; justify-content:space-between; }
.seats { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.seat { border:1px dashed var(--line); border-radius:6px; padding:6px; font-size:13px; text-align:center; min-height:32px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.seat.free { cursor:pointer; color:var(--gold); } .seat.free:hover { background:#1f4a3c; } .seat.taken { border-style:solid; }
.chat { display:flex; flex-direction:column; height:560px; }
.chat .log { flex:1; overflow:auto; font-size:13px; line-height:1.5; }
.chat .log b { color:var(--gold); } .chat .log .dm { color:#9fd0ff; }
.online span { display:inline-block; margin:2px 4px 2px 0; padding:2px 8px; border:1px solid var(--line); border-radius:12px; font-size:12px; cursor:pointer; }
.players { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.player { text-align:center; font-size:13px; } .player.turn { outline:2px solid var(--gold); }
.player .nm { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tile { display:inline-flex; flex-direction:column; align-items:center; justify-content:center; width:38px; height:54px; margin:2px;
        background:#fbf6e6; border-radius:6px; border:2px solid #d9cfb4; font-weight:800; font-size:19px; user-select:none; vertical-align:top; }
.tile small { font-size:10px; line-height:1; }
.tile.sel { transform:translateY(-8px); border-color:var(--gold); box-shadow:0 4px 10px #0008; }
.tile.wild { border-color:#39b36b; } .tile.pend { opacity:.45; }
.tile.back { background:#2b5a4a; border-color:#1f4a3c; color:var(--text); font-size:14px; }
.tile.mini { width:26px; height:36px; font-size:14px; margin:1px; border-width:1px; }
.c0 { color:#c79100; } .c1 { color:#1e6fd9; } .c2 { color:#222; } .c3 { color:#d22; }
#rack { min-height:126px; padding:8px; background:#5a3c1c; border-radius:8px; border:2px solid #3d2811; }
#rack .tile { cursor:pointer; }
.center { display:flex; gap:24px; align-items:center; justify-content:center; flex-wrap:wrap; margin:12px 0; }
.center > div { text-align:center; font-size:12px; color:var(--muted); }
#status { font-weight:600; color:var(--gold); }
.hash { font-family:ui-monospace,Consolas,monospace; font-size:11px; word-break:break-all; color:var(--muted); }
.meld { display:inline-block; margin:3px; padding:3px; border:1px solid var(--line); border-radius:6px; cursor:pointer; vertical-align:top; }
.meld:hover { background:#1f4a3c; }
#modal { position:fixed; inset:0; background:#000a; display:flex; align-items:center; justify-content:center; z-index:9; }
#modal .panel { width:min(560px,94vw); max-height:86vh; overflow:auto; }
table.lb { width:100%; border-collapse:collapse; font-size:14px; }
table.lb td, table.lb th { padding:5px 8px; text-align:left; border-bottom:1px solid var(--line); }
table.lb td.n, table.lb th.n { text-align:right; font-variant-numeric:tabular-nums; }

/* Telefon görünümü */
@media (max-width:640px) {
  header { padding:8px 10px; gap:8px; } header h1 { font-size:16px; }
  .wrap { padding:8px; gap:8px; }
  .players { grid-template-columns:repeat(2,1fr); }
  .panel { padding:8px; }
  .tile { width:30px; height:44px; font-size:16px; margin:1px; }
  .tile.mini { width:22px; height:32px; font-size:12px; }
  #rack { min-height:100px; padding:6px; }
  .center { gap:14px; margin:8px 0; }
  .chat { height:300px; }
  button { padding:8px 10px; }
  #tpass { width:100% !important; }
  #lobby .row.nowrap { flex-wrap:wrap; }
}
.quick { display:flex; gap:4px; flex-wrap:wrap; margin:4px 0; }
.quick button { padding:3px 8px; font-weight:400; }
