/* Shared table styles for every browser game under /play/. */

.play-page {
  --cw: clamp(58px, 10.5vh, 88px);  /* hand card width, scales with window height */
  --tw: clamp(54px, 9.5vh, 80px);   /* trick card width */
  --rim: 0px;
  /* Android "Classic Green" felt (FeltBackground.kt) */
  --felt-hi: #239b4f;
  --felt-mid: #1a7e3f;
  --felt-lo: #0f4a24;
  --gold-soft: rgba(242, 193, 78, 0.55);
  padding-top: 70px;
  background:
    radial-gradient(1200px 500px at 50% 0%, rgba(18, 138, 104, 0.25), transparent 70%),
    linear-gradient(180deg, #0a2a21 0%, #071c16 100%);
}

/* ---------- Page header (compact so the table fits on screen) ---------- */
.play-top { padding: 18px 24px 4px; color: #fff; }
.play-top-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; width: min(1120px, 100%); margin: 0 auto; }
.play-top .crumbs { flex-basis: 100%; }
.play-top h1 { margin: 6px 0 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.1; letter-spacing: -0.02em; }
.play-top p { margin: 0; color: rgba(255, 255, 255, 0.66); font-size: 15px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: rgba(255, 255, 255, 0.55); font-size: 13px; }
.crumbs a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Stage: bar, table, hand ---------- */
.game-wrap { position: relative; width: min(1120px, 100%); margin: 0 auto; padding: 14px 24px 18px; }
.game-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; }
.game-title {
  margin: 0 6px 0 0;
  color: #fff;
  font: 800 19px/1.2 var(--display);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.game-bar-actions { margin-left: auto; }
.bar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.deal-pill {
  padding: 7px 14px;
  color: var(--felt-deep);
  background: linear-gradient(180deg, #ffd977, var(--gold));
  border-radius: 999px;
  font: 800 13px var(--display);
  letter-spacing: 0.03em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.score-pill b { font-family: var(--display); font-weight: 800; font-size: 15px; color: #fff; }
.score-pill small { color: rgba(255, 255, 255, 0.55); font-weight: 500; }
.sc-us b { color: #7ff0bf; }
.sc-them b { color: #ff9c9c; }
.game-bar-actions { display: flex; gap: 8px; }
.bar-btn {
  min-height: 40px;
  padding: 8px 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  font: 600 14px Inter, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.bar-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.32); }
.bar-btn:disabled { opacity: 0.4; cursor: default; }
.bar-btn:focus-visible, .hand-card:focus-visible, .bid-btn:focus-visible, .dlg-btn:focus-visible, .suit-btn:focus-visible, .reveal-btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Table: the Android app's felt ---------- */
.table {
  position: relative;
  isolation: isolate;
  /* window height minus site header, toolbar, hand and gaps, so everything fits */
  height: clamp(260px, calc(100svh - 70px - 58px - var(--cw) * 1.4 - 96px - var(--strip, 0px)), 600px);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.25) 100%),
    radial-gradient(ellipse 75% 70% at 50% 50%, var(--felt-hi) 0%, var(--felt-mid) 55%, var(--felt-lo) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.table::after {
  /* fine cloth grain, like the app's scattered grain dots */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0.5;
  background:
    radial-gradient(rgba(255, 255, 255, 0.06) 0.6px, transparent 1.2px) 0 0 / 7px 7px,
    radial-gradient(rgba(0, 0, 0, 0.08) 0.6px, transparent 1.2px) 3px 4px / 9px 9px;
}

/* Faint suit emblem in the middle of the felt */
.trick { position: absolute; inset: var(--rim); pointer-events: none; }
.trick::before {
  content: "♠ ♥ ♣ ♦";
  position: absolute;
  left: 50%; top: 47%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.06);
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: 0.15em;
  white-space: nowrap;
}

/* ---------- Seats ---------- */
.seat {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  text-align: center;
}
.seat img {
  width: 58px; height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: #0b0b0d;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  transition: border-color 160ms ease, transform 160ms ease;
}
.seat > div {
  min-width: 96px;
  padding: 5px 12px 6px;
  background: rgba(5, 22, 16, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}
.seat strong { display: block; font: 700 13.5px/1.15 var(--display); white-space: nowrap; }
.seat span { display: block; margin-top: 2px; color: rgba(255, 255, 255, 0.75); font-size: 12px; white-space: nowrap; }
.seat b { color: var(--gold); font-weight: 700; }
.seat.is-turn img { border-color: var(--gold); animation: turn-pulse 1.4s ease-in-out infinite; }
.seat.is-turn > div { border-color: var(--gold-soft); }
.seat.is-winner img { border-color: #7ff0bf; transform: scale(1.08); }
.seat.is-bidder img { border-color: var(--gold); }
.seat.is-nil img { border-color: #b9a6ff; }
@keyframes turn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 193, 78, 0.7), 0 6px 16px rgba(0, 0, 0, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(242, 193, 78, 0), 0 6px 16px rgba(0, 0, 0, 0.45); }
}
.seat-north { top: 16px; left: 50%; transform: translateX(-50%); }
.seat-south {
  left: 50%;
  bottom: -22px;
  z-index: 6;
  transform: translateX(-50%);
  flex-direction: row;
  gap: 10px;
  padding: 4px 16px 4px 4px;
  background: rgba(5, 22, 16, 0.94);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}
.seat-south img { width: 40px; height: 40px; border-width: 2px; }
.seat-south > div { min-width: 0; padding: 0; background: none; border: 0; box-shadow: none; text-align: left; }
.seat-south.is-turn { border-color: var(--gold); }
.seat-west { left: 18px; top: 42%; transform: translateY(-50%); }
.seat-east { right: 18px; top: 42%; transform: translateY(-50%); }

/* Corner chips (trump, contract, scores in play) */
.table-chips {
  position: absolute;
  top: calc(var(--rim) + 12px);
  left: calc(var(--rim) + 14px);
  right: calc(var(--rim) + 14px);
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}
.table-chips span {
  padding: 6px 12px;
  color: #fff;
  background: rgba(5, 22, 16, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.table-chips span[hidden] { display: none; }
.table-chips b { color: var(--gold); }
.table-chips .sub { padding: 0; border: 0; background: none; box-shadow: none; color: rgba(255, 255, 255, 0.6); font-weight: 600; }
.chip-trump.red b { color: #ff8b8b; }

/* ---------- Cards: ProgrammaticCard.kt, CORNER_INDEX face ----------
   White face, 1dp near-black border, 7dp corners; rank top-left with a small pip
   under it and a larger pip bottom-right. All sizes scale from the app's 68dp
   reference card (--s = card width / 68). */
.pcard {
  --s: calc(var(--cw) / 68);
  position: relative;
  width: var(--cw);
  aspect-ratio: 54 / 77;
  overflow: hidden;
  background: #fff;
  border-radius: calc(var(--s) * 8.8);
  box-shadow: inset 0 0 0 1px #111, 0 2px 6px rgba(0, 0, 0, 0.35);
  user-select: none;
}
.pcard.black { color: #0a1428; }
.pcard.red { color: #c62828; }
.pc-corner {
  position: absolute;
  top: calc(var(--s) * 3);
  left: calc(var(--s) * 5);
  display: grid;
  justify-items: center;
  font: 700 calc(var(--s) * 22)/1 Roboto, Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.05em;
}
.pc-corner i { margin-top: calc(var(--s) * 3); font-style: normal; font-size: calc(var(--s) * 15); line-height: 1; letter-spacing: 0; }
.pc-corner.pc-br { display: none; }
.pc-pip {
  position: absolute;
  right: calc(var(--s) * 5);
  bottom: calc(var(--s) * 3);
  font-size: calc(var(--s) * 38);
  line-height: 1;
}

/* ---------- Trick area ---------- */
.trick-slot {
  --cw: var(--tw);
  position: absolute;
  left: 50%; top: 47%;
  z-index: 2;
  transform: translate(-50%, -50%) translate(var(--ox, 0), var(--oy, 0)) rotate(var(--r, 0deg));
}
.trick-slot.fresh { animation: fly-in 260ms cubic-bezier(0.2, 0.8, 0.3, 1); }
.trick-slot .pcard { box-shadow: inset 0 0 0 1px #111, 0 8px 18px rgba(0, 0, 0, 0.4); transition: transform 200ms ease, box-shadow 200ms ease; }
.slot-north { --oy: -56%; --fx: 0; --fy: -140px; z-index: 1; }
.slot-south { --oy: 56%; --fx: 0; --fy: 160px; z-index: 4; }
.slot-west { --ox: -70%; --r: -7deg; --fx: -200px; --fy: 0; z-index: 2; }
.slot-east { --ox: 70%; --r: 7deg; --fx: 200px; --fy: 0; z-index: 3; }
.trick-slot.is-winner { z-index: 6; }
.trick-slot.is-winner .pcard {
  transform: scale(1.08);
  box-shadow: inset 0 0 0 1px #111, 0 0 0 3px var(--gold), 0 0 26px rgba(242, 193, 78, 0.55), 0 12px 26px rgba(0, 0, 0, 0.5);
}
@keyframes fly-in {
  from { translate: var(--fx, 0) var(--fy, 0); }
  to { translate: 0 0; }
}

/* ---------- Status line (sits on the bottom rail) ---------- */
.status {
  position: absolute;
  left: 50%; bottom: 34px;
  z-index: 5;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 60px);
  padding: 8px 18px;
  color: #fff7df;
  background: linear-gradient(180deg, rgba(20, 40, 32, 0.96), rgba(8, 24, 18, 0.96));
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* ---------- Bid / trump / pass panels ---------- */
.bid-panel {
  position: absolute;
  left: 50%; top: 47%;
  z-index: 8;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100% - 40px));
  padding: 18px;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(14, 40, 31, 0.97), rgba(6, 22, 17, 0.97));
  border: 1px solid var(--gold-soft);
  border-radius: 20px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
  animation: pop-in 200ms ease-out;
}
.bid-panel[hidden] { display: none; }
.bid-panel p { margin: 0 0 12px; color: #fff; font: 700 15px/1.35 var(--display); }
.bid-buttons { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; }
.bid-btn {
  min-height: 42px;
  color: #fff;
  background: linear-gradient(180deg, #1f8a63, #136a4b);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 11px;
  font: 800 17px var(--display);
  cursor: pointer;
  box-shadow: 0 3px 0 #0a4532;
  transition: transform 100ms ease, filter 100ms ease;
}
.bid-btn:hover { transform: translateY(-2px); filter: brightness(1.12); }
.bid-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #0a4532; }
.bid-btn.is-hint { color: var(--felt-deep); background: linear-gradient(180deg, #ffd977, var(--gold)); box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.45), 0 3px 0 #a37a1d; }
.bid-buttons-29 { grid-template-columns: repeat(7, 1fr); }
.bid-pass { grid-column: span 2; background: linear-gradient(180deg, #a4303d, #7d1f2a); box-shadow: 0 3px 0 #4f121a; }
.bid-pass.is-hint { color: var(--felt-deep); background: linear-gradient(180deg, #ffd977, var(--gold)); }
.suit-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.suit-btn {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 4px 10px;
  color: #17171c;
  background: linear-gradient(160deg, #fff, #f3eee2);
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font: 700 12px Inter, sans-serif;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  transition: transform 120ms ease, border-color 120ms ease;
}
.suit-btn b { font-size: 34px; line-height: 1; }
.suit-btn.red { color: #c8202b; }
.suit-btn:hover { transform: translateY(-3px); border-color: var(--gold); }
.suit-btn.is-hint { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.45), 0 6px 14px rgba(0, 0, 0, 0.35); }
@keyframes pop-in { from { transform: translate(-50%, -46%) scale(0.96); } to { transform: translate(-50%, -50%) scale(1); } }

/* ---------- Hand (on a rail under the table) ---------- */
.hand {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: calc(var(--cw) * 1.4 + 30px);
  margin-top: 16px;
  padding: 30px 12px 6px;
}
.hand-card {
  flex: 0 0 auto;
  padding: 0;
  margin-left: calc(var(--cw) * -0.42);
  background: none;
  border: 0;
  border-radius: calc(var(--cw) * 0.1);
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
}
.hand-card:first-child { margin-left: 0; }
.hand-card:disabled { cursor: default; }
.hand-card:disabled .pcard::after { content: ""; position: absolute; inset: 0; background: rgba(27, 35, 48, 0.45); }
.hand-card.is-legal { transform: translateY(-8px); }
.hand-card.is-legal .pcard { box-shadow: inset 0 0 0 1px #111, 0 0 0 2px var(--gold), 0 8px 18px rgba(0, 0, 0, 0.45); }
.hand-card.is-legal:hover, .hand-card.is-legal:focus-visible { transform: translateY(-26px); z-index: 20; }
.hand-card.is-hint { transform: translateY(-28px); z-index: 19; }
.hand-card.is-hint .pcard { box-shadow: 0 0 0 4px #7ff0bf, 0 0 22px rgba(127, 240, 191, 0.6), 0 8px 18px rgba(0, 0, 0, 0.45); }

.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 4px 0 0; color: rgba(255, 255, 255, 0.6); font-size: 13px; text-align: center; }
.legend b { color: rgba(255, 255, 255, 0.85); }

/* ---------- Dialogs ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(4, 16, 12, 0.72); backdrop-filter: blur(4px); }
.overlay[hidden] { display: none; }
.dialog {
  width: min(460px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 26px 24px 22px;
  background: linear-gradient(180deg, #fffdf7, #f8f2e4);
  border: 1px solid rgba(215, 166, 63, 0.4);
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: dialog-in 260ms cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes dialog-in { from { transform: translateY(18px) scale(0.97); } to { transform: none; } }
.dlg-eyebrow { margin: 0; color: var(--gold-deep); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.dialog h2 { margin: 6px 0 16px; font-size: 27px; letter-spacing: -0.02em; }
.dialog h2.good { color: #0f7a5b; }
.dialog h2.bad { color: #c73636; }
.score-table { width: 100%; margin-bottom: 16px; border-collapse: separate; border-spacing: 0; font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.score-table th, .score-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.score-table tr:last-child th, .score-table tr:last-child td { border-bottom: 0; }
.score-table thead th { color: var(--muted); background: var(--paper); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.score-table tbody th { text-align: left; padding-left: 14px; }
.score-table .me { background: rgba(242, 193, 78, 0.16); }
.score-table .good { color: #0f7a5b; font-weight: 700; }
.score-table .bad { color: #c73636; font-weight: 700; }
.dlg-note { margin: 0 0 10px; color: #3f3a33; font-size: 14.5px; line-height: 1.6; }
.dlg-note.moon { padding: 10px 12px; background: rgba(91, 63, 196, 0.1); border-radius: 12px; }
.dlg-score { margin: 0 0 16px; font-size: 15px; }
.dlg-score small { color: var(--muted); }
.dlg-btn {
  width: 100%;
  min-height: 52px;
  color: var(--felt-deep);
  background: linear-gradient(180deg, #ffd977, var(--gold));
  border: 0;
  border-radius: 14px;
  font: 800 16px var(--display);
  cursor: pointer;
  box-shadow: 0 4px 0 #a37a1d, 0 10px 20px rgba(0, 0, 0, 0.15);
  transition: transform 100ms ease, filter 100ms ease;
}
.dlg-btn:hover { filter: brightness(1.05); }
.dlg-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #a37a1d; }
.final-list { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 8px; }
.final-list li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 11px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.final-list li.me { background: rgba(242, 193, 78, 0.22); border-color: rgba(215, 166, 63, 0.5); }
.final-list span { display: grid; place-items: center; width: 26px; height: 26px; color: #fff; background: var(--felt); border-radius: 50%; font-size: 13px; font-weight: 800; }
.final-list li:first-child span { color: var(--felt-deep); background: var(--gold); }
.final-list em { font-style: normal; font-weight: 800; }
.dlg-promo { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.dlg-promo p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.dlg-promo strong { color: var(--ink); }
.dialog .store-btn.is-soon { color: var(--muted); }

/* ---------- Info section below the game ---------- */
.play-info { padding: 44px 24px 80px; background: var(--paper); }
.play-info-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 32px; width: min(1120px, 100%); margin: 0 auto; align-items: start; }
.play-info h2 { margin: 0 0 12px; font-size: 24px; letter-spacing: -0.015em; }
.play-info li, .play-info p { color: #3f3a33; font-size: 16px; line-height: 1.7; }
.play-info ul { margin: 0 0 12px; padding-left: 20px; }
.play-info a { color: var(--green); font-weight: 700; }
.play-cta { padding: 24px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.play-cta img { border-radius: 16px; margin-bottom: 12px; }
.play-cta h2 { font-size: 20px; }
.play-cta p { margin: 0 0 6px; color: var(--muted); font-size: 14.5px; }
.play-cta a.store-btn { color: #fff; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .play-page { --cw: 50px; --tw: 52px; padding-top: 60px; }
  .play-top { padding: 12px 14px 2px; }
  .play-top p { display: none; }
  .play-top h1 { font-size: 22px; }
  .game-wrap { padding: 8px 8px 12px; }
  .game-bar { margin-bottom: 8px; }
  .game-title { flex-basis: 100%; font-size: 17px; }
  .wide-only { display: none; }
  .deal-pill { padding: 6px 11px; font-size: 12px; }
  .score-pill { gap: 8px; padding: 6px 10px; font-size: 12px; }
  .score-pill small { display: none; }
  .bar-btn { min-height: 38px; padding: 6px 10px; font-size: 13px; }
  .table { height: clamp(320px, calc(100svh - 60px - 52px - var(--cw) * 1.4 - 84px), 480px); border-radius: 20px; }
  .seat img { width: 40px; height: 40px; border-width: 2px; }
  .seat > div { min-width: 0; max-width: 92px; padding: 3px 7px 4px; border-radius: 9px; }
  .seat strong { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
  .seat span { font-size: 10px; overflow: hidden; text-overflow: ellipsis; }
  .seat-north { top: 38px; }
  .seat-west { left: 6px; top: 44%; }
  .seat-east { right: 6px; top: 44%; }
  .seat-south { bottom: -18px; padding: 3px 12px 3px 3px; gap: 7px; }
  .seat-south img { width: 32px; height: 32px; }
  .table-chips { top: 6px; left: 6px; right: 6px; }
  .table-chips span { padding: 4px 9px; font-size: 11px; }
  .table-chips .sub { display: none; }
  .trick::before { font-size: 28px; }
  .slot-north { --oy: -52%; }
  .slot-south { --oy: 52%; }
  .slot-west { --ox: -64%; }
  .slot-east { --ox: 64%; }
  .status { bottom: 26px; max-width: calc(100% - 20px); padding: 5px 12px; font-size: 12px; }
  .bid-panel { width: calc(100% - 20px); padding: 14px 12px; }
  .bid-buttons { grid-template-columns: repeat(4, 1fr); }
  .bid-buttons-29 { grid-template-columns: repeat(5, 1fr); }
  .bid-btn { min-height: 44px; }
  .suit-btn b { font-size: 28px; }
  .hand { margin-top: 12px; padding: 24px 4px 6px; min-height: calc(var(--cw) * 1.4 + 30px); }
  .hand-card { margin-left: calc(var(--cw) * -0.5); }
  .hand-card.is-legal { transform: translateY(-6px); }
  .hand-card.is-legal:hover { transform: translateY(-16px); }
  .hand-card.is-hint { transform: translateY(-18px); }
  .legend { font-size: 12px; }
  .play-info { padding: 32px 16px 56px; }
  .play-info-inner { grid-template-columns: 1fr; }
}
@media (max-width: 380px) { .play-page { --cw: 46px; --tw: 48px; } }
@media (min-width: 761px) and (max-height: 760px) {
  .play-page { --tw: clamp(44px, 8.2vh, 80px); }
  .trick-slot { top: 45%; }
  .slot-north { --oy: -50%; }
  .slot-south { --oy: 50%; }
  .slot-west { --ox: -66%; }
  .slot-east { --ox: 66%; }
  .seat { flex-direction: row; gap: 6px; }
  .seat img { width: 40px; height: 40px; border-width: 2px; }
  .seat > div { min-width: 0; padding: 4px 9px; text-align: left; }
  .seat-north { top: 12px; }
  .seat-west { left: 14px; top: 40%; }
  .seat-east { right: 14px; top: 40%; flex-direction: row-reverse; }
  .seat-east > div { text-align: right; }
  .table-chips { top: 10px; }
  .status { bottom: 30px; padding: 6px 14px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .trick-slot, .dialog, .bid-panel { animation: none; }
  .seat.is-turn img { animation: none; box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.6); }
}

/* ---------- App promo: side panel (wide) and slim strip (mid widths) ---------- */
.promo-strip { display: none; }
.side-promo { display: none; }
.promo-strip { align-items: center; gap: 12px; margin: 0 0 10px; padding: 6px 8px 6px 10px; color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--gold-soft); border-radius: 14px; font-size: 13.5px; }
.promo-strip img { border-radius: 8px; }
.promo-strip span { flex: 1; min-width: 0; }
.promo-strip strong { color: #fff; }
.promo-strip .store-row { display: flex; gap: 8px; margin: 0; padding: 0; }
.promo-strip .store-btn { min-height: 34px; padding: 4px 12px; }

@media (min-width: 761px) and (max-width: 1179px) {
  .play-page { --strip: 46px; }
  .promo-strip { display: flex; }
}
@media (min-width: 1180px) {
  .game-wrap {
    width: min(1440px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    column-gap: 22px;
    align-items: start;
  }
  .game-wrap > .game-bar, .game-wrap > .table, .game-wrap > .hand, .game-wrap > .legend { grid-column: 1; }
  .side-promo { display: block; grid-column: 2; grid-row: 1 / span 4; position: sticky; top: 84px; padding: 22px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 18px; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35); }
  .side-promo img { border-radius: 18px; margin-bottom: 12px; }
  .sp-eyebrow { margin: 0 0 4px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
  .side-promo h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; }
  .sp-lead { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
  .sp-list { margin: 0 0 16px; padding: 0; list-style: none; }
  .sp-list li { position: relative; padding: 5px 0 5px 24px; color: #3f3a33; font-size: 14px; font-weight: 600; }
  .sp-list li::before { content: "✓"; position: absolute; left: 2px; color: var(--green); font-weight: 800; }
  .side-promo .store-row { grid-template-columns: 1fr; padding-top: 0; }
  .side-promo a.store-btn { color: #fff; }
  .sp-more { display: block; margin-top: 12px; color: var(--green); font-size: 13.5px; font-weight: 700; text-align: center; text-decoration: none; }
  .sp-more:hover, .sp-more:focus-visible { text-decoration: underline; }
}
@media (min-width: 761px) and (max-width: 1179px) and (max-height: 700px) {
  .play-page { --strip: 36px; }
  .promo-strip { margin-bottom: 6px; padding: 2px 6px 2px 8px; font-size: 13px; }
  .promo-strip img { width: 26px; height: 26px; }
  .promo-strip .store-btn { min-height: 30px; padding: 2px 10px; }
  .play-page .legend { display: none; }
  .table { height: clamp(244px, calc(100svh - 70px - 58px - var(--cw) * 1.4 - 96px - var(--strip)), 600px); }
}

/* Light sweep across the store buttons in the app promo (transform only) */
.side-promo a.store-btn, .promo-strip a.store-btn { position: relative; overflow: hidden; box-shadow: 0 0 0 1px rgba(242, 193, 78, 0.55), 0 6px 16px rgba(0, 0, 0, 0.25); }
.side-promo a.store-btn::after, .promo-strip a.store-btn::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 38%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
  transform: translateX(-140%) skewX(-18deg);
  animation: store-shine 3.8s ease-in-out infinite;
  pointer-events: none;
}
.side-promo a.store-btn + a.store-btn::after, .promo-strip a.store-btn + a.store-btn::after { animation-delay: 0.45s; }
@keyframes store-shine {
  0%, 50% { transform: translateX(-140%) skewX(-18deg); }
  100% { transform: translateX(380%) skewX(-18deg); }
}
.side-promo { background-image: linear-gradient(180deg, #fffaf0 0%, #fff 40%); }
.promo-strip span, .promo-strip span strong { color: #fff; }
.promo-strip span { font-weight: 500; }
@media (prefers-reduced-motion: reduce) {
  .side-promo a.store-btn::after, .promo-strip a.store-btn::after { animation: none; display: none; }
}
