:root {
  --bg: #0b1f18;
  --felt: #1c6b4a;
  --felt-dark: #145236;
  --card: #15271f;
  --card-2: #1d3329;
  --text: #f1f5f2;
  --muted: #9db5a8;
  --accent: #f5c542;
  --primary: #2e9e6b;
  --danger: #d9534f;
  --line: #06c755;
  --border: rgba(255, 255, 255, 0.12);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; width: 100%; overflow-x: hidden; }
body { touch-action: manipulation; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior: none;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.error { color: #ff8a80; min-height: 1.2em; font-size: 13px; }
h2 { font-size: 16px; margin: 0 0 10px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
input[type="text"], input[type="number"], input[type="password"] {
  width: 100%;
  font-size: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0e1a15;
  color: var(--text);
  outline: none;
}
input:focus { border-color: var(--primary); }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
label input { margin-top: 4px; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); margin: 0; }
label.check input { width: 20px; height: 20px; margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; align-items: center; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card-2); color: var(--text); cursor: pointer; text-decoration: none;
  transition: transform 0.05s;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.3; pointer-events: none; }
.btn.primary { background: var(--primary); border-color: transparent; color: #fff; }
.btn.danger { background: #5a2624; border-color: #7a3230; color: #ffd8d6; }
.btn.line { background: var(--line); border-color: transparent; color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 8px 10px; font-size: 13px; }
.btn.wide { width: 100%; margin-top: 8px; }
.icon-btn { background: transparent; border: 0; color: var(--text); font-size: 20px; padding: 6px 8px; cursor: pointer; }

.screen { min-height: 100%; display: flex; flex-direction: column; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px; margin: 12px;
}
.card.center { margin: auto; max-width: 360px; width: calc(100% - 32px); text-align: center; }
.screen { overflow-x: hidden; }
.logo { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.logo-img { width: 128px; height: 128px; border-radius: 28px; display: block; margin: 4px auto 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
.content { padding-bottom: 24px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(8px + var(--safe-t)) 12px 8px;
  background: rgba(0, 0, 0, 0.25);
  position: sticky; top: 0; z-index: 5;
}
.topbar .title { flex: 1; min-width: 0; text-align: center; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .title small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; }
.me-box { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #333; }
.avatar-lg { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #333; }

.table-list .item {
  display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border);
}
.table-list .item:first-child { border-top: 0; }
.table-list .info { flex: 1; min-width: 0; }
.table-list .info b { display: block; }
.table-list .avatars { display: flex; margin-top: 4px; }
.table-list .avatars img { width: 22px; height: 22px; border-radius: 50%; margin-right: -6px; border: 1px solid var(--card); background: #333; }

/* ---- テーブル画面 ---- */
#screen-table { height: 100%; height: 100dvh; overflow: hidden; }
.ring {
  position: relative; flex: 1; min-height: 0; margin: 4px 8px 0;
}
.felt {
  position: absolute; inset: 12% 10% 16%; /* JS で席の楕円に合わせて上書き */
  border-radius: 50% / 45%;
  background: radial-gradient(ellipse at center, #237a56 0%, var(--felt) 60%, var(--felt-dark) 100%);
  border: 8px solid #3b2a1e;
  box-shadow: 0 0 0 3px #5a4130 inset, 0 10px 30px rgba(0, 0, 0, 0.5);
}
.table-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none;
}
.table-center .street { font-size: 12px; color: #d8efe3; letter-spacing: 0.1em; }
.table-center .pot { font-size: 26px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.table-center .pot .label { font-size: 11px; display: block; color: #d8efe3; font-weight: 600; }
.table-center .sub { font-size: 11px; color: #d8efe3; margin-top: 2px; }

.seat {
  position: absolute; width: 90px; margin-left: -45px; margin-top: -27px;
  text-align: center; touch-action: none; user-select: none; -webkit-user-select: none;
  z-index: 2;
}
.seat .avatar {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto; position: relative;
  border: 3px solid #35544a; background: #333; overflow: visible;
}
.seat .avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.seat .avatar .initial { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; background: #4a6b5c; }
.seat.turn .avatar { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.35), 0 0 18px rgba(245, 197, 66, 0.6); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(245,197,66,.35), 0 0 12px rgba(245,197,66,.5);} 50% { box-shadow: 0 0 0 5px rgba(245,197,66,.5), 0 0 22px rgba(245,197,66,.8);} }
.seat.me .name { color: var(--accent); }
.seat.folded { opacity: 0.45; }
.seat.out .avatar { filter: grayscale(1); }
.seat .name { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.seat .chips { font-size: 12px; font-weight: 700; background: rgba(0, 0, 0, 0.55); border-radius: 8px; padding: 1px 6px; display: inline-block; }
.seat .badge {
  position: absolute; right: -6px; top: -6px; font-size: 10px; font-weight: 800; padding: 2px 5px; border-radius: 8px;
  background: #fff; color: #000;
}
.seat .badge.D { background: #fff; }
.seat .badge.SB { background: #7fc8ff; }
.seat .badge.BB { background: #ffb27f; }
.seat .tag { position: absolute; left: 50%; transform: translateX(-50%); top: 30px; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--danger); color: #fff; }
.seat .tag.allin { background: #b0389c; }
.seat.dragging { z-index: 10; opacity: 0.9; transform-origin: center; }
.seat.dragging .avatar { transform: scale(1.1); }
.seat.drop-target .avatar { border-color: #7fc8ff; box-shadow: 0 0 0 4px rgba(127, 200, 255, 0.5); }
.bet {
  position: absolute; margin-left: -20px; margin-top: -10px; z-index: 1;
  font-size: 12px; font-weight: 800; color: #fff;
  background: rgba(0, 0, 0, 0.55); border-radius: 10px; padding: 1px 7px; white-space: nowrap;
}
.bet::before { content: "●"; color: var(--accent); margin-right: 3px; font-size: 10px; }

.status-line {
  text-align: center; font-size: 12px; color: var(--muted); padding: 6px 12px 4px; min-height: 26px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(0, 0, 0, 0.25); position: relative; z-index: 3;
}
.action-bar {
  display: grid; gap: 8px; padding: 4px 10px calc(10px + var(--safe-b));
  grid-template-columns: repeat(4, 1fr);
  background: rgba(0, 0, 0, 0.25);
}
.action-bar .btn { padding: 12px 2px; font-size: 13px; flex-direction: column; white-space: nowrap; line-height: 1.2; }
.action-bar .btn small { display: block; font-size: 11px; font-weight: 500; opacity: 0.85; margin-top: 2px; }
.action-bar .btn.fold { background: #5a2624; border-color: #7a3230; }
.action-bar .btn.call { background: #245c8a; border-color: transparent; }
.action-bar .btn.raise { background: var(--primary); border-color: transparent; }
.action-bar .btn.allin { background: #7a2a6a; border-color: transparent; }
.action-bar .msg { grid-column: 1 / -1; text-align: center; height: 30px; padding: 0 4px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.raise-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--card); border-top: 1px solid var(--border); border-radius: 16px 16px 0 0;
  padding: 12px 14px calc(14px + var(--safe-b));
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}
.raise-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.raise-amount { display: flex; align-items: baseline; gap: 10px; margin: 6px 0; }
.raise-amount input { font-size: 24px; font-weight: 800; flex: 1; }
.raise-panel input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 48px; margin: 6px 0; background: transparent; cursor: pointer;
  touch-action: pan-x;
}
.raise-panel input[type="range"]::-webkit-slider-runnable-track {
  height: 12px; border-radius: 6px; background: linear-gradient(90deg, #2e9e6b, var(--accent)); border: 1px solid rgba(0, 0, 0, 0.4);
}
.raise-panel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 40px; height: 40px; margin-top: -15px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #ffe9a8, var(--accent) 60%, #c9962a);
  border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}
.raise-panel input[type="range"]::-moz-range-track {
  height: 12px; border-radius: 6px; background: linear-gradient(90deg, #2e9e6b, var(--accent)); border: 1px solid rgba(0, 0, 0, 0.4);
}
.raise-panel input[type="range"]::-moz-range-thumb {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #ffe9a8, var(--accent) 60%, #c9962a);
  border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}
.raise-panel input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.presets .btn { padding: 8px 4px; font-size: 13px; }

/* ---- マイページ ---- */
.topbar-spacer { width: 64px; }
.seg { display: flex; gap: 4px; background: #0e1a15; border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin: 12px 0; }
.seg button { flex: 1; border: 0; border-radius: 9px; padding: 8px 4px; font-size: 13px; font-weight: 600; background: transparent; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card-2); color: var(--text); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.kpi { background: #0e1a15; border: 1px solid var(--border); border-radius: 12px; padding: 8px 4px; text-align: center; }
.kpi span { display: block; font-size: 10px; color: var(--muted); margin-bottom: 2px; }
.kpi b { font-size: 16px; font-weight: 800; }
.pos { color: #6fd69a; }
.neg { color: #ff8a80; }
.chart-wrap { position: relative; margin-top: 12px; }
.chart-wrap svg { width: 100%; height: 90px; display: block; }
#st-chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.list .row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.list .row:first-child { border-top: 0; }
.list .row img, .list .row .initial { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #4a6b5c; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.list .row .rank { width: 22px; text-align: center; font-weight: 800; color: var(--muted); flex: none; }
.list .row .rank.top { color: var(--accent); }
.list .row .main { flex: 1; min-width: 0; }
.list .row .main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.list .row .main small { color: var(--muted); font-size: 11px; }
.list .row .amt { font-weight: 800; font-size: 15px; text-align: right; flex: none; }
.list .row.me { background: rgba(245, 197, 66, 0.08); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }

/* ---- 練習テーブル（カード） ---- */
.lobby-tabs { margin: 12px 12px 0; }
.row2.tight { margin: 4px 0 0; gap: 4px; }
.mode-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: #245c8a; color: #fff; margin-right: 4px; vertical-align: 1px; }
.card-ui {
  display: inline-flex; flex-direction: column; justify-content: space-between; box-sizing: border-box;
  width: 44px; height: 62px; border-radius: 6px; background: #fff; color: #111; font-weight: 900;
  padding: 2px 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); font-size: 21px; line-height: 1; text-align: left;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; letter-spacing: -0.03em;
}
.card-ui.red { color: #d22; }
.card-ui .suit { font-size: 24px; text-align: right; line-height: 1; }
.card-ui.back {
  background: repeating-linear-gradient(45deg, #2a4f8f 0 4px, #1d3a6b 4px 8px);
  border: 2px solid #e8eef8; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.card-ui.deal { animation: dealIn 0.35s ease-out; }
@keyframes dealIn { from { transform: translateY(-16px) scale(0.7); opacity: 0; } to { transform: none; opacity: 1; } }
.card-ui.used { outline: 3px solid var(--accent); outline-offset: 0; box-shadow: 0 0 0 1px #000, 0 0 12px rgba(245, 197, 66, 0.8); }
.board .card-ui:not(.used):not(.back) { opacity: 0.92; }
.my-cards .card-ui:not(.used):not(.back) { opacity: 0.92; }
.board { display: flex; gap: 3px; justify-content: center; margin-bottom: 6px; min-height: 60px; }
.board .card-ui { width: 42px; height: 60px; font-size: 20px; }
.board .card-ui .suit { font-size: 23px; }
.board .slot { width: 42px; height: 60px; border-radius: 6px; border: 1px dashed rgba(255, 255, 255, 0.25); }
.table-center.front { z-index: 9; }
.result-banner {
  margin-top: 6px; padding: 6px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.88);
  border: 1px solid rgba(245, 197, 66, 0.6); color: #fff; font-size: 13px; line-height: 1.5; white-space: nowrap;
}
.result-banner b { color: var(--accent); }
.result-banner .tap { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.my-cards {
  display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 10px 2px;
  position: relative; z-index: 3;
}
.my-cards .cards { display: flex; gap: 8px; }
.my-cards .card-ui { width: 66px; height: 92px; font-size: 30px; padding: 4px 6px; }
.my-cards .card-ui .suit { font-size: 34px; }
.my-cards .hand-name { font-weight: 800; color: var(--accent); font-size: 16px; }
.my-cards .hand-sub { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.my-cards .folded { color: var(--muted); font-size: 13px; }
/* 相手の手札（裏面）はアバターの上に重ねて表示。中央のボードと重ならないよう外側には出さない */
.seat .mini { position: absolute; left: 50%; transform: translateX(-50%); top: -30px; display: flex; z-index: 3; }
.seat .mini .card-ui { width: 22px; height: 30px; font-size: 11px; padding: 1px 2px; border-radius: 3px; margin-right: -6px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.seat .mini .card-ui .suit { font-size: 11px; }
.seat .mini .card-ui.back { border-width: 1px; }
/* ショーダウンで公開された相手の手札は大きく */
.seat .mini.revealed { top: -40px; }
.seat .mini.revealed .card-ui { width: 32px; height: 44px; font-size: 16px; margin-right: 3px; padding: 2px 3px; border-radius: 4px; }
.seat .mini.revealed .card-ui .suit { font-size: 18px; }
/* 背の低い画面ではカードを少し小さく */
@media (max-height: 760px) {
  .my-cards .card-ui { width: 52px; height: 72px; font-size: 24px; }
  .my-cards .card-ui .suit { font-size: 26px; }
  .board .card-ui, .board .slot { width: 38px; height: 54px; font-size: 18px; }
  .board .card-ui .suit { font-size: 20px; }
  .board { min-height: 54px; }
}
.action-bar .btn.next { grid-column: 1 / -1; background: var(--accent); color: #000; border-color: transparent; font-size: 16px; animation: nextPulse 1.2s infinite; }
@keyframes nextPulse { 50% { filter: brightness(1.15); } }
.seat .hand-tag {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: -13px; font-size: 9px; font-weight: 800;
  background: rgba(0, 0, 0, 0.75); color: #fff; padding: 1px 6px; border-radius: 6px; white-space: nowrap; z-index: 2;
}
.seat.showwin .hand-tag { background: var(--accent); color: #000; }
.seat.showwin .avatar { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(245, 197, 66, 0.5), 0 0 22px rgba(245, 197, 66, 0.8); }
.seat.thinking .avatar::after {
  content: "…"; position: absolute; right: -8px; bottom: -6px; background: #fff; color: #000; font-weight: 900;
  font-size: 12px; line-height: 1; padding: 2px 4px; border-radius: 8px; animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }

/* ---- 演出 ---- */
.flash {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); /* top は JS で上書き */
  font-size: 30px; font-weight: 800; color: #fff; letter-spacing: 0.08em; white-space: nowrap;
  padding: 8px 22px; border-radius: 16px; background: rgba(0, 0, 0, 0.82); font-size: 26px;
  border: 2px solid rgba(255, 255, 255, 0.25); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none; z-index: 6; opacity: 0;
}
.flash.show { animation: flashIn 1.3s ease-out forwards; }
.flash.gold { color: var(--accent); border-color: rgba(245, 197, 66, 0.6); }
@keyframes flashIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  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%, -50%) scale(1); }
}
.table-center.pop .pot { animation: potPop 0.6s ease-out; }
@keyframes potPop { 0% { transform: scale(1); } 35% { transform: scale(1.4); color: #fff; } 100% { transform: scale(1); } }
.felt.street-flip { animation: feltPulse 0.9s ease-out; }
@keyframes feltPulse { 0% { filter: brightness(1); } 25% { filter: brightness(1.45); } 100% { filter: brightness(1); } }
.seat.winner .avatar { border-color: var(--accent); animation: winGlow 0.7s ease-in-out 4; }
.seat.winner .chips { background: var(--accent); color: #000; }
@keyframes winGlow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.3), 0 0 10px rgba(245, 197, 66, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 0 6px rgba(245, 197, 66, 0.7), 0 0 28px rgba(245, 197, 66, 0.9); transform: scale(1.12); }
}
.chip-fx {
  position: absolute; width: 16px; height: 16px; border-radius: 50%; pointer-events: none; z-index: 7;
  background: radial-gradient(circle at 40% 40%, #ffe9a8, var(--accent) 60%, #c9962a);
  border: 2px dashed rgba(255, 255, 255, 0.9);
  animation: chipFly 1.1s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.chip-fx.red { background: radial-gradient(circle at 40% 40%, #ff9a94, #d9534f 60%, #8f2d2a); }
.chip-fx.blue { background: radial-gradient(circle at 40% 40%, #9ec9ff, #3d8bfd 60%, #234f8f); }
@keyframes chipFly {
  0% { transform: translate(-50%, -50%) scale(0.4) rotate(0deg); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(420deg); opacity: 0; }
}
.toast { white-space: pre-line; line-height: 1.5; }
.toast.win .toast-title { display: block; font-size: 12px; color: #fff; font-weight: 500; margin-bottom: 2px; }

/* ---- モーダル ---- */
.modal {
  position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-body {
  width: 100%; max-width: 520px; max-height: 88vh; overflow: auto;
  background: var(--card); border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + var(--safe-b));
}
@media (min-width: 600px) {
  .modal { align-items: center; }
  .modal-body { border-radius: 18px; }
}
.player-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.pm-name { font-size: 18px; font-weight: 700; }

.pot-box { border: 1px solid var(--border); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.pot-box .pot-title { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.pot-box .pot-title span:last-child { color: var(--accent); }
.eligible { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.eligible .cand {
  display: flex; flex-direction: column; align-items: center; width: 64px; cursor: pointer;
  padding: 6px 2px; border-radius: 12px; border: 2px solid transparent;
}
.eligible .cand img, .eligible .cand .initial { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #4a6b5c; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.eligible .cand span { font-size: 11px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.eligible .cand.selected { border-color: var(--accent); background: rgba(245, 197, 66, 0.12); }
.eligible .cand.selected img, .eligible .cand.selected .initial { box-shadow: 0 0 0 3px var(--accent); }

.log-list { max-height: 60vh; overflow: auto; font-size: 13px; }
.log-list div { padding: 4px 0; border-bottom: 1px solid var(--border); }
.log-list div.hand { color: var(--accent); font-weight: 700; }

.toast {
  position: fixed; left: 50%; top: calc(60px + var(--safe-t)); transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 50;
  max-width: 90%; text-align: center; font-size: 14px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
}
.toast.win { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.toast.err { border-color: var(--danger); }
