/* ============================================================
   game.css — Khu giải trí (/giai-tri) + cờ vua, cờ tướng, tiến lên
   Dùng biến màu của theme: --ah-text, --ah-text-muted, --ah-accent
   ============================================================ */
.gm-page { width: 100%; padding: 0 16px 48px; box-sizing: border-box; color: var(--ah-text, #e5e7eb); }
.gm-page *, .gm-page *::before, .gm-page *::after { box-sizing: border-box; }

.gm-bc { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 0 14px; font-size: 12.5px; color: var(--ah-text-muted, #9ca3af); }
.gm-bc a { color: var(--ah-text-muted, #9ca3af); text-decoration: none; }
.gm-bc a:hover { color: var(--ah-accent, #f59e0b); }
.gm-bc span { opacity: .45; }
.gm-bc .gm-bc__cur { opacity: 1; color: var(--ah-text, #e5e7eb); font-weight: 600; }

.gm-hero { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 16px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; }
.gm-hero__icon { font-size: 30px; color: #fff; width: 54px; height: 54px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--ah-accent, #f59e0b), #7c3aed); }
.gm-hero__title { margin: 0 0 3px; font-size: 19px; font-weight: 700; }
.gm-hero__sub { font-size: 13px; color: var(--ah-text-muted, #9ca3af); }

.gm-off { display: flex; align-items: center; gap: 14px; padding: 22px 18px; border-radius: 14px; line-height: 1.6;
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.3); }
.gm-off .material-icons-round { font-size: 34px; color: #f59e0b; }
.gm-off a { color: var(--ah-accent, #f59e0b); }

/* Thẻ trò chơi */
.gm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.gm-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; text-decoration: none; color: inherit;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); transition: border-color .15s, transform .15s; }
a.gm-card:hover { border-color: var(--ah-accent, #f59e0b); transform: translateY(-2px); }
.gm-card--soon { opacity: .55; cursor: default; }
.gm-card__icon { width: 48px; height: 48px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 30px; line-height: 1; background: rgba(255,255,255,.07); font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", serif; }
.gm-card__name { font-weight: 700; font-size: 15px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gm-card__desc { font-size: 12.5px; color: var(--ah-text-muted, #9ca3af); line-height: 1.5; }
.gm-badge { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 20px; background: rgba(255,255,255,.1); color: var(--ah-text-muted, #9ca3af); }

.gm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .gm-grid2 { grid-template-columns: 1fr; } }

.gm-box { padding: 14px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); margin-bottom: 12px; }
.gm-box__title { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.gm-box__title .material-icons-round { font-size: 19px; color: var(--ah-accent, #f59e0b); }
.gm-sub { margin: 14px 0 8px; font-size: 13px; font-weight: 700; color: var(--ah-text-muted, #9ca3af); }
.gm-empty { font-size: 13px; color: var(--ah-text-muted, #9ca3af); padding: 6px 0; line-height: 1.6; list-style: none; }
.gm-empty a { color: var(--ah-accent, #f59e0b); }
.gm-note { margin-top: 10px; font-size: 12px; color: var(--ah-text-muted, #9ca3af); line-height: 1.5; }
.gm-mt { margin-top: 10px; }

/* Bảng xếp hạng */
.gm-rank { list-style: none; margin: 0; padding: 0; }
.gm-rank__row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 13.5px; }
.gm-rank__row.is-me { background: rgba(245,158,11,.08); border-radius: 6px; }
.gm-rank__pos { width: 24px; text-align: center; font-weight: 700; color: var(--ah-text-muted, #9ca3af); }
.gm-rank__row:nth-child(-n+3) .gm-rank__pos { color: var(--ah-accent, #f59e0b); }
.gm-rank__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; }
.gm-rank__name:hover { color: var(--ah-accent, #f59e0b); }
.gm-rank__wdl { font-size: 11.5px; color: var(--ah-text-muted, #9ca3af); }
.gm-rank__elo { font-weight: 700; min-width: 42px; text-align: right; }

.gm-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; text-align: center; }
.gm-stats div { padding: 10px 4px; border-radius: 10px; background: rgba(255,255,255,.05); }
.gm-stats b { display: block; font-size: 18px; }
.gm-stats span { font-size: 11.5px; color: var(--ah-text-muted, #9ca3af); }

/* Nút + ô nhập */
.gm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 14px; border-radius: 9px; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ah-text, #e5e7eb); text-decoration: none;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); transition: background .15s, border-color .15s; }
.gm-btn:hover:not(:disabled) { background: rgba(255,255,255,.12); }
.gm-btn:disabled { opacity: .5; cursor: default; }
.gm-btn .material-icons-round { font-size: 18px; }
.gm-btn--primary { background: var(--ah-accent, #f59e0b); border-color: transparent; color: #111; }
.gm-btn--primary:hover:not(:disabled) { background: var(--ah-accent, #f59e0b); filter: brightness(1.08); }
.gm-btn--danger { color: #fca5a5; border-color: rgba(248,113,113,.35); }
.gm-btn--sm { padding: 6px 10px; font-size: 12.5px; }
.gm-btn--sm .material-icons-round { font-size: 16px; }
.gm-btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.gm-field { display: block; font-size: 12.5px; color: var(--ah-text-muted, #9ca3af); margin-bottom: 10px; }
.gm-field select, .gm-join input { display: block; width: 100%; margin-top: 5px; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13.5px;
  color: var(--ah-text, #e5e7eb); background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.12); }
.gm-field select option { color: #111; }
.gm-seg { display: flex; margin-top: 5px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); }
.gm-seg button { flex: 1; padding: 7px 4px; font: inherit; font-size: 12.5px; color: var(--ah-text, #e5e7eb); background: transparent; border: 0; cursor: pointer; }
.gm-seg button + button { border-left: 1px solid rgba(255,255,255,.12); }
.gm-seg button.is-active { background: var(--ah-accent, #f59e0b); color: #111; font-weight: 700; }
.gm-join { display: flex; gap: 8px; margin-top: 12px; }
.gm-join input { margin-top: 0; text-transform: uppercase; letter-spacing: 2px; min-width: 0; }

/* Tab */
.gm-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.gm-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--ah-text-muted, #9ca3af); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.gm-tab .material-icons-round { font-size: 19px; }
.gm-tab.is-active { color: var(--ah-text, #e5e7eb); border-color: var(--ah-accent, #f59e0b); background: rgba(245,158,11,.1); }

/* Bố cục bàn cờ */
.gm-layout { display: grid; grid-template-columns: minmax(0, 600px) minmax(260px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .gm-layout { grid-template-columns: 1fr; } }
.gm-boardcol { min-width: 0; }

.gm-player { display: flex; align-items: center; gap: 8px; padding: 7px 4px; font-size: 14px; font-weight: 600; min-height: 40px; }
.gm-player.is-off .gm-player__name { opacity: .5; }
.gm-player__dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; border: 2px solid rgba(255,255,255,.3); }
.gm-player__dot--w { background: #f5f5f4; }
.gm-player__dot--b { background: #1c1917; }
.gm-player__dot.is-turn { box-shadow: 0 0 0 3px rgba(245,158,11,.55); }
.gm-player__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-player__clock { font-variant-numeric: tabular-nums; font-size: 17px; font-weight: 700; padding: 3px 10px; border-radius: 7px; background: rgba(255,255,255,.07); min-width: 72px; text-align: center; }
.gm-player__clock.is-run { background: rgba(245,158,11,.2); }
.gm-player__clock.is-low { color: #fca5a5; }
.gm-player__clock.is-low.is-run { background: rgba(239,68,68,.25); }

.gm-board-wrap { position: relative; width: 100%; container-type: inline-size; }
.gm-board { display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden;
  user-select: none; -webkit-user-select: none; touch-action: none; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.gm-sq { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; }
.gm-sq--l { background: #eeeed2; }
.gm-sq--d { background: #769656; }
.gm-sq.is-own { cursor: grab; }
.gm-sq.is-last::before { content: ""; position: absolute; inset: 0; background: rgba(255,214,10,.42); }
.gm-sq.is-sel::before { content: ""; position: absolute; inset: 0; background: rgba(20,85,30,.5); }
.gm-sq.is-check { background: radial-gradient(circle, #ff3b30 0%, rgba(231,0,0,.6) 40%, transparent 75%), #d9a; }
.gm-sq.is-dot::after { content: ""; position: absolute; width: 30%; height: 30%; border-radius: 50%; background: rgba(0,0,0,.2); pointer-events: none; }
.gm-sq.is-cap::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 6px solid rgba(0,0,0,.2); pointer-events: none; }
.gm-sq.is-dot, .gm-sq.is-cap { cursor: pointer; }

.gm-pc { position: relative; z-index: 1; line-height: 1; font-size: 40px; font-size: 10cqw;
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", "Arial Unicode MS", serif; pointer-events: none; }
.gm-pc--w { color: #fff; text-shadow: 0 0 1px #000, 1px 1px 0 #222, -1px -1px 0 #222, 1px -1px 0 #222, -1px 1px 0 #222; }
.gm-pc--b { color: #111; text-shadow: 0 0 1px rgba(255,255,255,.5); }
.gm-ghost { position: fixed; z-index: 9999; transform: translate(-50%, -55%); pointer-events: none; }
.gm-co { position: absolute; z-index: 2; font-size: 11px; font-weight: 700; line-height: 1; pointer-events: none; }
.gm-co--r { top: 3px; left: 3px; }
.gm-co--f { bottom: 3px; right: 4px; }
.gm-sq--l .gm-co { color: #769656; }
.gm-sq--d .gm-co { color: #eeeed2; }

.gm-promo { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
  background: rgba(0,0,0,.6); border-radius: 6px; }
.gm-promo[hidden] { display: none; }
.gm-promo__btn { width: 18%; aspect-ratio: 1 / 1; border-radius: 10px; border: 2px solid rgba(255,255,255,.4); background: #b8c99a; cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.gm-promo__btn:hover { border-color: var(--ah-accent, #f59e0b); }
.gm-promo__btn .gm-pc { font-size: 11cqw; }
.gm-promo__x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; font-size: 16px;
  color: #fff; background: rgba(255,255,255,.15); }

.gm-status { min-height: 22px; margin: 6px 0; font-size: 13.5px; color: var(--ah-text-muted, #9ca3af); }
.gm-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.gm-moves { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; counter-reset: mv; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.gm-moves li:not(.gm-empty) { display: grid; grid-template-columns: 34px 1fr 1fr; padding: 3px 4px; counter-increment: mv; }
.gm-moves li:not(.gm-empty)::before { content: counter(mv) "."; color: var(--ah-text-muted, #9ca3af); }
.gm-moves li:nth-child(even) { background: rgba(255,255,255,.03); }

.gm-conn { font-size: 13px; color: var(--ah-text-muted, #9ca3af); line-height: 1.7; }
.gm-conn[hidden] { display: none; }
.gm-rooms { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.gm-room { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 13px; }
.gm-room__host { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.gm-room__meta { color: var(--ah-text-muted, #9ca3af); white-space: nowrap; }
.gm-roominfo { font-size: 13.5px; margin-bottom: 10px; line-height: 1.5; }
.gm-invite { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 10px; margin-bottom: 10px;
  border-radius: 9px; background: rgba(245,158,11,.08); border: 1px dashed rgba(245,158,11,.4); font-size: 13.5px; }
.gm-invite b { letter-spacing: 3px; font-size: 16px; }
.gm-invite[hidden], #gm-lobby[hidden], #gm-room[hidden], .gm-box[hidden] { display: none; }

.gm-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.55); }
.gm-modal[hidden] { display: none; }
.gm-modal__card { width: 100%; max-width: 360px; padding: 20px; border-radius: 14px; text-align: center; background: #1f2230; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 16px 48px rgba(0,0,0,.5); }
.gm-modal__title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.gm-modal__text { font-size: 14px; color: var(--ah-text-muted, #9ca3af); line-height: 1.6; }
.gm-modal .gm-btnrow { justify-content: center; margin-top: 16px; }

.gm-toast { position: fixed; left: 50%; bottom: 24px; z-index: 10001; transform: translateX(-50%); max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 10px; font-size: 13.5px; color: #fff; background: rgba(20,20,28,.95); border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 24px rgba(0,0,0,.4); transition: opacity .4s; }
.gm-toast.is-out { opacity: 0; }

@media (max-width: 480px) {
  .gm-page { padding: 0 8px 40px; }
  .gm-stats { grid-template-columns: repeat(3, 1fr); }
  .gm-tab { flex: 1; justify-content: center; padding: 8px 6px; font-size: 13px; }
  .gm-co { font-size: 9px; }
  .gm-player__clock { font-size: 15px; min-width: 62px; }
}

/* ============================================================
   Đợt 2: cờ tướng (/giai-tri/co-tuong) + tiến lên (/giai-tri/tien-len)
   ============================================================ */
.gm-modal__text { white-space: pre-line; }
.gm-seg--tabs { display: inline-flex; margin: 0 0 12px; max-width: 100%; overflow-x: auto; }
.gm-seg--tabs a { padding: 7px 14px; font-size: 13px; white-space: nowrap; color: var(--ah-text, #e5e7eb); text-decoration: none; }
.gm-seg--tabs a + a { border-left: 1px solid rgba(255,255,255,.12); }
.gm-seg--tabs a.is-active { background: var(--ah-accent, #f59e0b); color: #111; font-weight: 700; }
.gm-seg button:focus-visible, .gm-seg a:focus-visible, .gm-btn:focus-visible, .gm-tab:focus-visible { outline: 2px solid var(--ah-accent, #f59e0b); outline-offset: 2px; }
.gm-player__dot--red { background: #dc2626; }
.gm-player__dot--blk { background: #111827; }
.gm-rules summary { cursor: pointer; list-style: none; margin: 0; }
.gm-rules summary::-webkit-details-marker { display: none; }
.gm-rules[open] summary { margin-bottom: 8px; }
.gm-rules ul { padding-left: 18px; margin: 0; }
.gm-rules li { margin-bottom: 4px; }

/* ── Cờ tướng ── */
.xq-wrap { width: 100%; max-width: 560px; margin: 0 auto; container-type: inline-size; }
.xq-board { position: relative; width: 100%; aspect-ratio: 9 / 10; border-radius: 8px; user-select: none; -webkit-user-select: none;
  background: linear-gradient(135deg, #e8c48a, #d9a95f); box-shadow: 0 6px 24px rgba(0,0,0,.35), inset 0 0 0 3px #8b5a2b; }
.xq-grid { position: absolute; inset: 0; width: 100%; height: 100%; }
.xq-grid line, .xq-frame { stroke: #6b3f1d; stroke-width: .035; fill: none; vector-effect: none; }
.xq-frame { stroke-width: .06; }
.xq-river { font-size: .5px; fill: #7a4a22; text-anchor: middle; font-family: "KaiTi", "STKaiti", "Noto Serif CJK SC", "Songti SC", serif; letter-spacing: .1px; opacity: .8; }
.xq-pieces { position: absolute; inset: 0; }
.xq-pc, .xq-dot, .xq-mark { position: absolute; transform: translate(-50%, -50%); }
.xq-pc { width: 10.2%; aspect-ratio: 1 / 1; border-radius: 50%; padding: 0; cursor: default; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #fff8e6, #f1d9a6 70%, #c99b55); border: 2px solid #8b5a2b;
  box-shadow: 0 2px 3px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,255,255,.35); transition: transform .12s, box-shadow .12s; }
.xq-pc span { font-size: 6.2cqw; font-weight: 700; line-height: 1; font-family: "KaiTi", "STKaiti", "Noto Serif CJK SC", "Songti SC", "SimSun", serif; }
.xq-pc--r span { color: #c1121f; }
.xq-pc--b span { color: #111827; }
.xq-pc--r { border-color: #b91c1c; }
.xq-pc.is-own { cursor: pointer; }
.xq-pc.is-own:hover { box-shadow: 0 3px 6px rgba(0,0,0,.5), 0 0 0 3px rgba(245,158,11,.55); }
.xq-pc.is-sel { transform: translate(-50%, -58%) scale(1.06); box-shadow: 0 6px 10px rgba(0,0,0,.5), 0 0 0 3px #16a34a; }
.xq-pc.is-check { box-shadow: 0 0 0 4px rgba(239,68,68,.85), 0 0 14px rgba(239,68,68,.9); }
.xq-pc.is-cap { cursor: pointer; box-shadow: 0 0 0 3px rgba(22,163,74,.9); }
.xq-pc:focus-visible, .xq-dot:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.xq-dot { width: 4.2%; aspect-ratio: 1 / 1; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: rgba(22,163,74,.85); box-shadow: 0 0 0 3px rgba(22,163,74,.25); }
.xq-mark { width: 11.5%; aspect-ratio: 1 / 1; border-radius: 6px; border: 2px dashed rgba(37,99,235,.85); pointer-events: none; }

/* ── Tiến lên ── */
.gm-layout--wide { grid-template-columns: minmax(0, 760px) minmax(260px, 1fr); }
@media (max-width: 1000px) { .gm-layout--wide { grid-template-columns: 1fr; } }
.tl-table { position: relative; width: 100%; min-height: 330px; aspect-ratio: 16 / 10; border-radius: 18px; padding: 12px;
  background: radial-gradient(ellipse at center, #1f7a4d 0%, #14583a 60%, #0d3f29 100%); box-shadow: inset 0 0 0 6px #5b3a1e, inset 0 0 0 8px #3b2412, 0 8px 24px rgba(0,0,0,.35); }
.tl-seat { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 46%; }
.tl-seat[hidden] { display: none; }
.tl-seat--top { top: 10px; left: 50%; transform: translateX(-50%); }
.tl-seat--left { left: 12px; top: 50%; transform: translateY(-50%); }
.tl-seat--right { right: 12px; top: 50%; transform: translateY(-50%); }
.tl-seat--bottom { bottom: 10px; left: 50%; transform: translateX(-50%); }
.tl-seat__head { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 20px; background: rgba(0,0,0,.45); border: 2px solid transparent; font-size: 13px; font-weight: 600; color: #fff; max-width: 100%; }
.tl-seat__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.tl-seat__count { font-size: 11.5px; padding: 1px 7px; border-radius: 10px; background: rgba(255,255,255,.18); white-space: nowrap; }
.tl-seat__count:empty { display: none; }
.tl-seat__tag { font-size: 11.5px; color: #fde68a; min-height: 14px; }
.tl-seat.is-turn .tl-seat__head { border-color: #fbbf24; box-shadow: 0 0 12px rgba(251,191,36,.7); }
.tl-seat.is-pass .tl-seat__head { opacity: .6; }
.tl-seat.is-off .tl-seat__name, .tl-seat.is-out .tl-seat__name { text-decoration: line-through; opacity: .6; }
.tl-seat__timer { width: 90px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); position: relative; overflow: hidden; }
.tl-seat__timer::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 1)); background: #fbbf24; }
.tl-seat__timer[hidden] { display: none; }
.tl-seat__cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 220px; }
.tl-pile { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 62%; text-align: center; color: #fff; }
.tl-pile__cards { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px; }
.tl-pile__who { margin-top: 6px; font-size: 12.5px; color: #d1fae5; }
.tl-pile__who b { color: #fca5a5; }
.tl-pile__empty { font-size: 13px; color: rgba(255,255,255,.75); padding: 10px; border: 1px dashed rgba(255,255,255,.3); border-radius: 10px; display: inline-block; }
.tl-card { position: relative; width: 46px; height: 66px; flex-shrink: 0; padding: 4px 0 0 5px; border-radius: 7px; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0; font: inherit; color: #111; background: #fff; border: 1px solid #cbd5e1;
  box-shadow: 0 2px 4px rgba(0,0,0,.3); transition: transform .12s; }
.tl-card:disabled { cursor: default; opacity: 1; }
.tl-card--red { color: #dc2626; }
.tl-card__r { font-size: 17px; font-weight: 800; line-height: 1.05; }
.tl-card__s { font-size: 18px; line-height: 1; font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", serif; }
.tl-card--sm { width: 30px; height: 42px; padding: 2px 0 0 3px; border-radius: 5px; }
.tl-card--sm .tl-card__r { font-size: 12px; }
.tl-card--sm .tl-card__s { font-size: 12px; }
.tl-card.is-sel { transform: translateY(-14px); box-shadow: 0 0 0 3px #f59e0b, 0 6px 10px rgba(0,0,0,.35); }
.tl-card:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.tl-hand { display: flex; justify-content: center; flex-wrap: nowrap; padding: 22px 4px 6px; min-height: 96px; overflow-x: auto; }
.tl-hand .tl-card + .tl-card { margin-left: -12px; }
.tl-hand__empty { font-size: 13px; color: var(--ah-text-muted, #9ca3af); align-self: center; }
.tl-log { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; font-size: 12.5px; }
.tl-log li { padding: 3px 4px; border-bottom: 1px solid rgba(255,255,255,.04); }
.tl-seatlist { list-style: none; margin: 8px 0; padding: 0; font-size: 13px; }
.tl-seatlist li { padding: 5px 2px; border-bottom: 1px solid rgba(255,255,255,.05); }
.tl-rank { text-align: left; margin: 10px auto 0; padding-left: 22px; max-width: 260px; }
.tl-rank li { padding: 3px 0; }
.tl-rank li span { margin-right: 8px; }
.tl-rank li.is-me { font-weight: 700; color: var(--ah-text, #e5e7eb); }
.tl-rank .is-pos { color: #4ade80; }
.tl-rank .is-neg { color: #f87171; }

@media (max-width: 600px) {
  .tl-table { aspect-ratio: auto; min-height: 300px; height: 300px; padding: 8px; border-radius: 14px; }
  .tl-seat__name { max-width: 84px; }
  .tl-seat--left { left: 6px; }
  .tl-seat--right { right: 6px; }
  .tl-pile { width: 70%; }
  .tl-pile .tl-card { width: 34px; height: 48px; padding: 2px 0 0 3px; }
  .tl-pile .tl-card__r, .tl-pile .tl-card__s { font-size: 13px; }
  .tl-seat__cards .tl-card--sm { width: 22px; height: 32px; }
  .tl-card { width: 38px; height: 56px; }
  .tl-card__r { font-size: 15px; }
  .tl-card__s { font-size: 15px; }
  .tl-hand .tl-card + .tl-card { margin-left: -16px; }
  .tl-hand { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-card, .xq-pc { transition: none; }
}
