:root {
  --page-top: #6b0811;
  --page-mid: #880d18;
  --page-bottom: #3c040a;
  --gold-1: #f8dd8a;
  --gold-2: #dca53f;
  --gold-3: #8c5314;
  --cream: #fff6df;
  --red-panel: #8f0d16;
  --red-panel-2: #6f0811;
  --red-soft: rgba(145, 12, 23, .92);
  --green-1: #2c8828;
  --green-2: #156b18;
  --brown: #54250e;
  --text: #fff5dd;
  --muted: #f4d6a1;
  --line: rgba(255, 223, 150, .35);
  --line-soft: rgba(255, 236, 191, .18);
  --shadow: 0 16px 32px rgba(49, 4, 8, .35);
  --shadow-strong: 0 28px 60px rgba(28, 3, 7, .45);
  --table-red-1: #b30f1e;
  --table-red-2: #900814;
  --table-red-3: #69040f;
  --danger: #ff8c81;
  --gold-bright: #ffe29f;
}

body.is-dragging-card { user-select: none; }

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Tahoma, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 183, 88, .14), transparent 22%),
    radial-gradient(circle at 75% 12%, rgba(255, 219, 121, .09), transparent 26%),
    radial-gradient(circle at 50% 84%, rgba(255, 225, 172, .06), transparent 22%),
    linear-gradient(180deg, var(--page-top), var(--page-mid) 35%, var(--page-bottom));
  overflow-x: hidden;
}
button, input { font: inherit; }
button { border: 0; background: none; color: inherit; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.page-ornament, .page-sparkles {
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
}
.page-ornament {
  opacity: .18;
  background-image:
    radial-gradient(circle at center, rgba(255, 230, 176, .2) 0 1px, transparent 1px 100%),
    linear-gradient(45deg, transparent 45%, rgba(255, 205, 122, .1) 49%, transparent 52%);
  background-size: 28px 28px, 100px 100px;
}
.ornament-top {
  mask-image: linear-gradient(180deg, black, transparent 65%);
}
.ornament-bottom {
  mask-image: linear-gradient(0deg, black, transparent 65%);
}
.page-sparkles {
  background-image: radial-gradient(circle, rgba(255, 217, 120, .8) 0 1px, transparent 1px 100%);
  background-size: 55px 55px;
  opacity: .14;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 25;
  padding: 10px 10px 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  background: linear-gradient(180deg, rgba(81, 4, 13, .9), rgba(81, 4, 13, .35), transparent);
}
.header-side {
  display: flex;
  gap: 8px;
  align-items: center;
}
.title-plaque {
  min-width: 0;
  text-align: center;
  padding: 10px 16px;
  border-radius: 20px;
  color: var(--text);
  background: linear-gradient(180deg, #a71522, #7f0914);
  border: 2px solid var(--gold-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), var(--shadow);
  position: relative;
}
.title-plaque::before,
.title-plaque::after {
  content: '❖';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-1);
  font-size: 13px;
}
.title-plaque::before { right: 8px; }
.title-plaque::after { left: 8px; }
.title-plaque small { display: block; font-size: 8px; opacity: .82; letter-spacing: 1px; }
.title-plaque strong { display: block; font-size: 18px; margin-top: 3px; }
.icon-button, .connection-badge {
  border-radius: 16px;
  border: 2px solid var(--gold-2);
  background: linear-gradient(180deg, #9d121d, #700812);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), var(--shadow);
}
.icon-button {
  width: 46px; height: 46px; cursor: pointer; font-size: 18px;
  display: grid; place-items: center;
}
.connection-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 12px; min-height: 46px; font-size: 11px;
  white-space: nowrap;
}
.connection-badge i {
  width: 9px; height: 9px; border-radius: 50%; background: #b8514e; flex: 0 0 9px;
}
.connection-badge.online i { background: #6cf95f; box-shadow: 0 0 12px rgba(108, 249, 95, .8); }
.connection-badge.offline i { background: #f96b5f; box-shadow: 0 0 12px rgba(249, 107, 95, .45); }

.app-shell {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 0 8px 22px;
}
.panel-card, .panel-lite {
  border: 2px solid var(--gold-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), var(--shadow-strong);
}
.panel-card {
  background:
    radial-gradient(circle at 50% -10%, rgba(255,255,255,.12), transparent 36%),
    linear-gradient(180deg, rgba(168, 21, 35, .96), rgba(121, 8, 18, .97));
  border-radius: 30px;
}
.panel-lite {
  background: linear-gradient(180deg, rgba(119, 10, 19, .94), rgba(82, 6, 12, .96));
  border-radius: 24px;
}

.landing-screen {
  padding: 8px 0 18px;
  display: grid;
  gap: 12px;
}
.landing-hero, .entry-panel { padding: 20px; }
.hero-kicker {
  display: inline-block;
  background: rgba(255, 234, 183, .12);
  border: 1px solid rgba(255, 231, 174, .2);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--gold-1);
  font-size: 11px;
}
.landing-hero h1 {
  margin: 14px 0 12px;
  font-size: 34px;
  line-height: 1.25;
}
.landing-hero h1 span { color: var(--gold-1); }
.landing-hero p {
  margin: 0;
  color: #ffe8bd;
  line-height: 1.95;
  font-size: 13px;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.hero-chips span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 234, 183, .1);
  border: 1px solid rgba(255, 224, 152, .2);
  font-size: 11px;
}
.entry-tabs, .side-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  background: rgba(71, 4, 10, .45);
  padding: 6px;
  border-radius: 18px;
  border: 1px solid rgba(255, 230, 170, .14);
}
.entry-tab, .side-tab {
  border-radius: 14px;
  padding: 12px 10px;
  cursor: pointer;
  color: #ffe0a1;
}
.entry-tab.active, .side-tab.active {
  background: linear-gradient(180deg, #bf1e2c, #8d0c17);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}
.entry-content { display: none; padding-top: 14px; }
.entry-content.active { display: block; }
label {
  display: block;
  font-size: 12px;
  color: var(--cream);
  margin-bottom: 8px;
}
input {
  width: 100%;
  color: var(--cream);
  background: rgba(72, 7, 12, .86);
  border: 1px solid rgba(255, 219, 133, .22);
  border-radius: 16px;
  padding: 14px 14px;
  outline: none;
}
input::placeholder { color: #d8b881; }
.entry-content label + input { margin-bottom: 12px; }
.room-code-input { letter-spacing: 2px; text-transform: uppercase; text-align: center; }
.form-note { color: #f6d4a3; font-size: 11px; line-height: 1.9; margin: 12px 2px 0; }
.resume-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(38, 111, 35, .2);
  border: 1px solid rgba(133, 214, 113, .28);
}
.resume-box strong { display: block; }
.resume-box small { display: block; color: #dff6c7; margin-top: 4px; }
.resume-actions { display: flex; gap: 8px; margin-top: 10px; }
.text-button { cursor: pointer; color: #f7ddb2; }
.primary-button, .secondary-button, .danger-button, .table-button, .round-button {
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, opacity .16s ease;
}
.primary-button:active, .secondary-button:active, .danger-button:active, .table-button:active, .round-button:active, .icon-button:active, .entry-tab:active, .side-tab:active { transform: scale(.98); }
.primary-button {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  margin-top: 6px;
  background: linear-gradient(180deg, #f4da8d, #dcad4d 55%, #c58527);
  color: #5b2004;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.36), 0 10px 22px rgba(86, 31, 2, .25);
}
.primary-button.compact, .secondary-button, .danger-button { width: auto; min-height: 44px; padding: 0 14px; margin-top: 0; }
.secondary-button {
  background: linear-gradient(180deg, #b51825, #7e0d16);
  color: var(--cream);
  border-radius: 16px;
  border: 1px solid rgba(255, 223, 145, .25);
}
.danger-button {
  background: linear-gradient(180deg, #8b2830, #67131a);
  color: #ffe7e1;
  border-radius: 16px;
  border: 1px solid rgba(255, 197, 176, .2);
}

.game-screen { padding-bottom: 16px; }
.game-frame {
  padding: 12px;
  position: relative;
  overflow: hidden;
}
.game-frame::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 24px;
  border: 1px solid rgba(255, 226, 161, .15);
  pointer-events: none;
}
.top-hud {
  display: grid;
  grid-template-columns: 90px 1fr 96px;
  gap: 8px;
  align-items: center;
}
.hud-box, .hud-plaque, .score-mini {
  min-height: 62px;
  border-radius: 18px;
  border: 2px solid rgba(245, 194, 92, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), var(--shadow);
}
.hud-box, .score-mini {
  background: linear-gradient(180deg, rgba(100, 5, 13, .9), rgba(127, 9, 20, .9));
}
.hud-box {
  padding: 10px;
  text-align: center;
  cursor: pointer;
}
.hud-box small, .score-mini small, .hud-plaque small, .trump-badge small, .trick-score span, .status-banner small { display: block; font-size: 10px; color: #ffdca2; }
.hud-box strong { display: block; margin-top: 4px; letter-spacing: 1.4px; }
.hud-plaque {
  padding: 10px 8px;
  text-align: center;
  background: linear-gradient(180deg, rgba(169, 18, 30, .95), rgba(123, 8, 17, .96));
}
.hud-plaque strong { display: block; font-size: 17px; }
.hud-plaque small { margin-top: 4px; }
.score-mini {
  display: grid;
  grid-template-columns: 1fr 16px 1fr;
  align-items: center;
  padding: 6px;
  text-align: center;
}
.team-score strong { display: block; font-size: 22px; margin-top: 2px; }
.team-zero strong { color: var(--gold-1); }
.team-one strong { color: #ffdfb2; }
.score-divider { text-align: center; color: var(--gold-1); }
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.table-stage {
  margin-top: 14px;
  position: relative;
  min-height: 540px;
}
.trump-badge {
  position: absolute;
  top: 56px;
  right: 6px;
  z-index: 7;
  min-width: 96px;
  padding: 12px 16px 10px;
  text-align: center;
  color: var(--cream);
  background: linear-gradient(180deg, #ba1725, #790a13);
  border: 2px solid var(--gold-2);
  border-radius: 28px 28px 28px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), var(--shadow);
}
.trump-badge strong { display: block; font-size: 24px; margin-top: 4px; }
.trump-badge.red strong { color: #ffd0d0; }

.table-shell {
  position: relative;
  margin: 78px auto 0;
  width: 100%;
  max-width: 370px;
  height: 430px;
  border-radius: 46% / 12%;
  background: linear-gradient(180deg, #28120c, #3b1a12);
  box-shadow: inset 0 0 0 2px rgba(255, 225, 168, .45), 0 20px 50px rgba(40, 5, 9, .38);
  padding: 14px;
}
.table-shell::before {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: inherit;
  border: 3px solid rgba(238, 192, 95, .75);
  box-shadow: 0 0 0 3px rgba(67, 20, 3, .68);
}
.table-shell-inner {
  position: absolute;
  inset: 14px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.12), transparent 32%),
    radial-gradient(circle at 50% 90%, rgba(0,0,0,.14), transparent 30%),
    linear-gradient(180deg, var(--table-red-1), var(--table-red-2) 62%, var(--table-red-3));
  box-shadow: inset 0 0 0 2px rgba(255, 223, 152, .12);
}
.table-shell-inner::before {
  content: '';
  position: absolute;
  inset: 22px;
  border-radius: inherit;
  border: 1px solid rgba(255, 228, 180, .14);
  background-image: radial-gradient(circle at center, rgba(255, 235, 188, .06) 0 1px, transparent 1px 100%);
  background-size: 18px 18px;
  opacity: .4;
}
.table-title {
  position: absolute;
  left: 0; right: 0; top: 90px;
  z-index: 1;
  text-align: center;
  font-size: 34px;
  color: rgba(255, 229, 193, .28);
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(44, 2, 7, .25);
}
.turn-timer-wrap {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
}
.turn-timer {
  position: relative;
  width: 56px; height: 56px;
}
.turn-timer svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.timer-track { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 4; }
.timer-progress { fill: none; stroke: var(--gold-1); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 113.1; }
.turn-timer span {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
}
.trick-score {
  min-width: 88px;
  text-align: center;
  padding: 9px 10px;
  border-radius: 16px;
  background: rgba(74, 6, 12, .55);
  border: 1px solid rgba(255, 226, 159, .18);
}
.trick-score strong { display: block; margin-top: 4px; }
.trick-area {
  position: absolute;
  inset: 88px 34px 62px;
  z-index: 5;
  border-radius: 28px;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.trick-area.drop-zone-active {
  background: rgba(255, 245, 221, .03);
}
.trick-area.drop-zone-hot {
  background: rgba(255, 229, 183, .08);
  box-shadow: inset 0 0 0 2px rgba(255, 219, 127, .2);
  transform: scale(1.02);
}
.played-card {
  position: absolute;
  width: 76px;
  filter: drop-shadow(0 16px 24px rgba(25, 4, 6, .32));
  animation: floatIn .18s ease;
}
.played-card img { display: block; width: 100%; border-radius: 10px; }
.played-card.pos-top { top: 8%; left: 50%; transform: translateX(-50%) rotate(-4deg); }
.played-card.pos-bottom { bottom: 8%; left: 50%; transform: translateX(-50%) rotate(4deg); }
.played-card.pos-left { top: 50%; right: 60%; transform: translateY(-50%) rotate(-7deg); }
.played-card.pos-right { top: 50%; left: 60%; transform: translateY(-50%) rotate(7deg); }
.waiting-callout {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  z-index: 6;
  text-align: center;
  padding: 18px 14px;
  border-radius: 24px;
  background: rgba(79, 6, 13, .72);
  border: 1px solid rgba(255, 221, 152, .2);
}
.waiting-icon {
  width: 54px; height: 54px; margin: 0 auto 10px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #f7dd8f, #d39b36);
  color: #5b2204;
  font-size: 24px;
}
.waiting-callout strong { display: block; margin-bottom: 6px; }
.waiting-callout span { color: #ffdfaa; font-size: 11px; line-height: 1.9; }

.player-seat {
  position: absolute;
  z-index: 10;
  min-width: 110px;
  max-width: 116px;
  min-height: 78px;
  padding: 8px 8px 8px 44px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(138, 11, 20, .98), rgba(85, 5, 12, .98));
  border: 2px solid rgba(243, 190, 91, .8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), var(--shadow);
}
.player-seat.self-seat {
  box-shadow: 0 0 0 3px rgba(255, 218, 131, .18), inset 0 1px 0 rgba(255,255,255,.1), var(--shadow);
}
.player-seat.active-turn {
  box-shadow: 0 0 0 3px rgba(255, 219, 130, .24), 0 0 24px rgba(255, 214, 111, .35), inset 0 1px 0 rgba(255,255,255,.1), var(--shadow);
}
.seat-top {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.seat-left {
  top: 160px;
  left: 0;
}
.seat-right {
  top: 160px;
  right: 0;
}
.seat-bottom {
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
}
.seat-avatar {
  position: absolute;
  right: 6px;
  top: 8px;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #4d1703;
  font-size: 17px; font-weight: 900;
  background: radial-gradient(circle at 30% 30%, #fff0c0, #e8b34a 60%, #bc7a1f);
  border: 3px solid #0d5d7f;
  box-shadow: 0 0 0 2px var(--gold-2);
}
.seat-avatar.team-1 { border-color: #195873; }
.seat-avatar.bot::after {
  content: '⚙';
  position: absolute;
  bottom: -4px; left: -2px;
  width: 16px; height: 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold-1);
  color: #64280a;
  font-size: 10px;
}
.seat-copy strong {
  display: block;
  font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seat-copy small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: #f5d5a0;
}
.seat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.seat-chip {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  background: rgba(255, 234, 183, .1);
  border: 1px solid rgba(255, 223, 150, .14);
  color: #fff0cd;
}
.seat-chip.hakem { background: linear-gradient(180deg, #f4db8e, #d29938); color: #5c2304; }
.seat-chip.offline { background: rgba(0,0,0,.2); }
.empty-seat {
  padding-inline-start: 10px;
  text-align: center;
}
.empty-seat .seat-avatar { position: static; margin: 0 auto 8px; border-color: #7a5c2c; }

.status-banner {
  margin-top: 12px;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px;
  border-radius: 16px;
  background: rgba(92, 8, 15, .72);
  border: 1px solid rgba(255, 225, 155, .16);
}
.status-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #ffd46d;
  box-shadow: 0 0 12px rgba(255, 212, 109, .7);
  flex: 0 0 12px;
}
.status-banner strong { font-size: 12px; line-height: 1.8; }

.hand-zone {
  margin-top: 12px;
  padding: 12px 10px 12px;
}
.hand-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}
.hand-heading span { font-size: 15px; font-weight: 700; }
.hand-heading small { font-size: 10px; color: #ffdfaa; }
.drag-guide {
  margin: 10px 0 8px;
  padding: 10px 12px;
  display: flex; justify-content: center; align-items: center; gap: 10px;
  border-radius: 14px;
  background: rgba(255, 233, 177, .08);
  border: 1px solid rgba(255, 219, 133, .14);
  color: var(--cream);
  font-size: 12px;
}
.player-hand {
  min-height: 190px;
  display: flex; align-items: flex-end; justify-content: flex-start;
  gap: 0; overflow-x: auto; overflow-y: visible; direction: ltr;
  padding: 6px 6px 16px; scrollbar-width: none;
}
.player-hand::-webkit-scrollbar { display: none; }
.hand-empty {
  align-self: center;
  width: 100%; text-align: center;
  color: #ffdc9b;
  font-size: 12px;
}
.hand-card {
  position: relative;
  width: 84px;
  flex: 0 0 auto;
  margin-left: -28px;
  border-radius: 18px;
  filter: drop-shadow(0 16px 18px rgba(26, 3, 7, .32));
  transition: transform .16s ease, opacity .16s ease, filter .16s ease;
  scroll-snap-align: center;
}
.hand-card:first-child { margin-left: 0; }
.hand-card img { display: block; width: 100%; border-radius: 14px; pointer-events: none; }
.hand-card.playable { cursor: grab; touch-action: none; }
.hand-card.playable:hover,
.hand-card.playable.selected {
  transform: translateY(-18px) scale(1.03);
  z-index: 40 !important;
}
.hand-card.playable::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 18px;
  border: 2px solid transparent;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.hand-card.playable:hover::after,
.hand-card.playable.selected::after {
  border-color: rgba(255, 222, 136, .86);
  box-shadow: 0 0 0 4px rgba(255, 220, 132, .18);
}
.hand-card.invalid {
  opacity: .48;
  filter: grayscale(.12) drop-shadow(0 10px 10px rgba(15, 2, 5, .22));
}
.hand-card.dragging { opacity: .12; }
.drag-ghost {
  position: fixed;
  top: 0; left: 0; z-index: 90;
  pointer-events: none;
  filter: drop-shadow(0 18px 26px rgba(15, 2, 5, .4));
}
.drag-ghost img { display: block; width: 100%; }
.bottom-actions {
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  gap: 10px;
  margin-top: 6px;
  align-items: center;
}
.round-button {
  min-height: 58px;
  border-radius: 50px;
  background: linear-gradient(180deg, #a11420, #700810);
  border: 2px solid var(--gold-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), var(--shadow);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--cream);
}
.round-button small { display: block; font-size: 11px; margin-top: 2px; }
.table-button {
  min-height: 60px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2f9b35, #146a17);
  color: #fff6dd;
  border: 2px solid #f0c05e;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), var(--shadow);
  font-size: 15px;
  font-weight: 700;
}

.side-panel {
  margin-top: 12px;
  padding: 12px;
}
.side-content { display: none; }
.side-content.active { display: block; }
.player-roster {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}
.roster-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 238, 204, .05);
  border: 1px solid rgba(255, 223, 151, .12);
}
.roster-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, #fff0c0, #e3a941 60%, #b77820);
  color: #5d2304;
  font-weight: 900;
}
.roster-copy strong { display: block; font-size: 13px; }
.roster-copy small { display: block; color: #f9d7a7; margin-top: 4px; font-size: 10px; }
.roster-status { width: 9px; height: 9px; border-radius: 50%; background: #77f45b; box-shadow: 0 0 10px rgba(119, 244, 91, .6); }
.roster-status.offline { background: #c67d75; box-shadow: none; }
.teams-legend {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 229, 168, .08);
  border: 1px solid rgba(255, 217, 127, .16);
}
.team-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #ffd56f; display: inline-block; margin-left: 6px;
}
.teams-legend small { display: block; margin-top: 8px; color: #f9d4a2; font-size: 10px; }
.chat-list {
  max-height: 230px;
  overflow-y: auto;
  padding-top: 10px;
}
.chat-message { margin-bottom: 10px; }
.chat-message strong { display: block; margin-bottom: 4px; font-size: 10px; color: var(--gold-1); }
.chat-message p {
  display: inline-block;
  margin: 0;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 6px 16px 16px 16px;
  background: rgba(255, 241, 216, .08);
  line-height: 1.9;
  font-size: 11px;
}
.chat-message.system p {
  background: transparent;
  color: #ffdfad;
  padding: 4px 0;
  font-size: 10px;
}
.quick-reactions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.quick-reactions button, .chat-composer button {
  border-radius: 12px;
  background: linear-gradient(180deg, #a91725, #770a12);
  border: 1px solid rgba(255, 222, 137, .22);
  min-height: 40px;
}
.chat-composer {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
  margin-top: 10px;
}
.unread {
  min-width: 18px; height: 18px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: #f0ca64; color: #571d04;
  font-size: 10px;
  padding: 0 4px;
}

.modal, .result-overlay {
  position: fixed; inset: 0;
  z-index: 50;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(39, 2, 6, .72);
  backdrop-filter: blur(4px);
}
.modal-card, .result-card {
  width: min(100%, 420px);
  padding: 22px;
  text-align: center;
}
.modal-icon {
  width: 60px; height: 60px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 26px;
  color: #5b2404;
  background: linear-gradient(180deg, #f4dc8f, #d09937);
}
.modal-card p, .result-card small { color: #ffe1b4; }
.modal-card h2, .result-card h2 { margin: 8px 0 14px; }
.trump-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.trump-options button {
  min-height: 94px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 244, 221, .12), rgba(255, 244, 221, .06));
  border: 1px solid rgba(255, 224, 150, .24);
}
.trump-options b { display: block; font-size: 34px; }
.trump-options span { display: block; margin-top: 5px; }
.trump-options .red b { color: #ffd0d0; }
.result-icon {
  font-size: 52px; color: var(--gold-1);
}
.result-card p { color: #ffe4bf; line-height: 1.95; }

.toast-stack {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  display: grid; gap: 8px;
  z-index: 70;
  pointer-events: none;
}
.toast {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(88, 7, 14, .95);
  border: 1px solid rgba(255, 223, 151, .24);
  box-shadow: var(--shadow);
  font-size: 12px;
}
.toast.success { border-color: rgba(151, 238, 110, .34); }
.toast.error { border-color: rgba(255, 172, 160, .26); }

@keyframes floatIn {
  from { opacity: 0; transform: translateY(10px) scale(.95); }
  to { opacity: 1; }
}

@media (min-width: 540px) {
  .app-shell { padding: 0 12px 24px; }
  .table-stage { min-height: 590px; }
  .table-shell { max-width: 400px; height: 470px; }
  .seat-left, .seat-right { top: 180px; }
  .player-seat { max-width: 126px; }
  .hand-card { width: 92px; margin-left: -30px; }
}
