:root {
  --felt: #166534;
  --felt-dark: #0f3d22;
  --bg: #0b2a17;
  --panel: #ffffff;
  --panel-text: #1f2937;
  --muted: #6b7280;
  --accent: #f59e0b;
  --accent-text: #1f2937;
  --red: #c81e1e;
  --black: #111827;
  --good: #15803d;
  --bad: #b91c1c;
  --border: #d1d5db;
  --cw: 52px;
  --mini: 22px;
  --radius: 12px;
  /* Kleur per kaartkleur; met het vierkleurendek worden klaveren groen en ruiten blauw. */
  --c-S: #111827;
  --c-H: #c81e1e;
  --c-C: #111827;
  --c-D: #c81e1e;
  color-scheme: light;
}
:root[data-deck="4"] { --c-C: #15803d; --c-D: #1d4ed8; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --panel: #1f2937;
    --panel-text: #f3f4f6;
    --muted: #9ca3af;
    --border: #374151;
    --good: #4ade80;
    --bad: #f87171;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --panel: #1f2937;
  --panel-text: #f3f4f6;
  --muted: #9ca3af;
  --border: #374151;
  --good: #4ade80;
  --bad: #f87171;
  color-scheme: dark;
}

@media (min-width: 700px) {
  :root { --cw: 70px; --mini: 26px; }
}

/* Tekstgrootte (instelling in het menu): alles in rem en de kaarten groeien mee. */
:root[data-size="large"] { font-size: 118%; --cw: 62px; --mini: 26px; }
:root[data-size="xlarge"] { font-size: 135%; --cw: 72px; --mini: 30px; }
@media (min-width: 700px) {
  :root[data-size="large"] { --cw: 84px; --mini: 30px; }
  :root[data-size="xlarge"] { --cw: 96px; --mini: 34px; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

button {
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--panel-text);
  padding: 8px 12px;
  min-height: 40px;
}
button:disabled { opacity: .4; cursor: default; }
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
button.ghost { background: transparent; border-style: dashed; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button.link { background: none; border: none; color: inherit; text-decoration: underline; padding: 0; min-height: 0; }
select { font: inherit; padding: 6px; border-radius: 6px; }

/* ---------- Kaarten ---------- */

.card {
  position: relative;
  width: var(--cw);
  height: calc(var(--cw) * 1.42);
  flex: none;
  overflow: hidden;
  border-radius: calc(var(--cw) * .09);
  background: #fff;
  color: var(--sc, var(--black));
  border: 1px solid #b8bcc4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  padding: 0;
  min-height: 0;
  font-family: Georgia, "Times New Roman", serif;
  user-select: none;
}
.suit-S { --sc: var(--c-S); }
.suit-H { --sc: var(--c-H); }
.suit-C { --sc: var(--c-C); }
.suit-D { --sc: var(--c-D); }
.card .corner {
  position: absolute;
  top: 4%;
  left: 4%;
  width: 1em;
  font-size: calc(var(--cw) * .21);
  line-height: .95;
  font-weight: bold;
  text-align: center;
  letter-spacing: -.08em;
}
.card .corner.br { top: auto; left: auto; bottom: 4%; right: 4%; transform: rotate(180deg); }
.card .pips { position: absolute; top: 15%; bottom: 15%; left: 33%; right: 33%; }
.card .pips i, .card .face i { font-style: normal; line-height: 1; }
.card svg.sym { display: block; width: 1em; height: 1em; fill: currentColor; margin: 0 auto; }
.card .pips i { width: 1em; height: 1em; }
.card .pips i { position: absolute; font-size: calc(var(--cw) * .19); transform: translate(-50%, -50%); }
.card .pips i.flip { transform: translate(-50%, -50%) rotate(180deg); }
.card .ace { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: calc(var(--cw) * .62); }
.card .face {
  position: absolute;
  inset: 14% 27%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 3% 0;
  border: 1px solid currentColor;
  border-radius: calc(var(--cw) * .05);
  background: linear-gradient(160deg, #fff8e1, #fbe3a6);
}
.card .face b { font-size: calc(var(--cw) * .36); line-height: 1; }
.card .face i { font-size: calc(var(--cw) * .15); }
.card .face i.flip { transform: rotate(180deg); }
.card.back {
  background: repeating-linear-gradient(45deg, #7f1d1d 0 4px, #991b1b 4px 8px);
  border: 2px solid #fff;
}
.card.mini {
  --cw: var(--mini);
  border-radius: 3px;
  box-shadow: none;
}
.card.mini .corner { font-size: calc(var(--mini) * .42); top: 1px; left: 2px; }
.card.mini .corner.br, .card.mini .pips, .card.mini .ace, .card.mini .face { display: none; }

.inline-card {
  display: inline-block;
  background: #fff;
  color: var(--sc, var(--black));
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 600;
  border: 1px solid var(--border);
}

/* ---------- Knoppen in de bovenbalk ---------- */

.icon-btn, .topbar button {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: none;
  min-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-text { display: none; font-size: .9rem; }
@media (min-width: 700px) { .btn-text { display: inline; } }

/* ---------- Menu (lobby) ---------- */

.menu {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 16px 40px;
  text-align: center;
}
.menu-top { display: flex; justify-content: space-between; align-items: center; }
.hero { max-width: 720px; margin: 0 auto; }
.menu h1 { font-family: Georgia, serif; font-size: 3rem; margin: 12px 0 0; letter-spacing: .02em; }
.menu .subtitle { margin: 4px 0 12px; opacity: .8; }
.hero-text { line-height: 1.55; opacity: .95; margin: 0 auto; }
.logo { display: flex; justify-content: center; gap: 0; }
.logo .card { --cw: 58px; margin: 0 -8px; }
.logo .card:nth-child(1) { transform: rotate(-14deg) translateY(6px); }
.logo .card:nth-child(2) { transform: rotate(-5deg); }
.logo .card:nth-child(3) { transform: rotate(5deg); }
.logo .card:nth-child(4) { transform: rotate(14deg) translateY(6px); }
.resume {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: center;
  margin: 20px auto 0;
  padding: 10px 16px;
  max-width: 720px;
  border-radius: var(--radius);
  background: rgba(245, 158, 11, .18);
  border: 1px solid var(--accent);
}
.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.mode-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--panel);
  color: var(--panel-text);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}
.mode-icon { font-size: 2rem; line-height: 1; }
.mode-card h2 { margin: 8px 0 2px; font-family: Georgia, serif; font-size: 1.35rem; }
.who-for { margin: 0 0 8px; color: var(--muted); font-size: .92rem; }
.ticks { list-style: none; padding: 0; margin: 4px 0 16px; line-height: 1.4; }
.ticks li { position: relative; padding-left: 22px; margin: 6px 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: bold; }
.mode-card button.primary { margin-top: auto; min-height: 46px; font-size: 1.05rem; }
.help-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 28px; }
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  text-decoration: none;
  font-size: .95rem;
}
.current-settings { opacity: .75; font-size: .9rem; }

/* ---------- Instellingen ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, .55);
}
.sheet {
  width: min(440px, 100%);
  height: 100%;
  overflow: auto;
  padding: 16px 20px 24px;
  background: var(--panel);
  color: var(--panel-text);
  box-shadow: -4px 0 24px rgba(0, 0, 0, .4);
}
.sheet header { display: flex; justify-content: space-between; align-items: center; }
.sheet h2 { margin: 0; font-family: Georgia, serif; }
.sheet .icon-btn { background: transparent; color: inherit; border: 1px solid var(--border); }
.setting { border: none; padding: 0; margin: 18px 0 0; }
.setting legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.seg { display: flex; flex-wrap: wrap; }
.seg button { flex: 1 1 0; border-radius: 0; margin-left: -1px; white-space: nowrap; }
.seg button:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.seg button:last-child { border-radius: 0 8px 8px 0; }
.seg button.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; position: relative; }
.deck-preview { display: flex; gap: 8px; margin-top: 10px; }
.deck-preview .card { --cw: 56px; }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
button.wide { width: 100%; margin-top: 24px; min-height: 46px; }
@media (max-width: 600px) {
  .overlay { align-items: flex-end; }
  .sheet { height: auto; max-height: 92dvh; border-radius: 16px 16px 0 0; }
}

/* ---------- Bovenbalk ---------- */

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}
.top-right { display: flex; gap: 6px; }
.topbar .title { text-align: center; font-family: Georgia, serif; font-size: 1.25rem; font-weight: bold; }
.topbar small { display: block; font-family: system-ui, sans-serif; font-size: .75rem; font-weight: normal; opacity: .8; }

/* ---------- Les en regels ---------- */

.lesson { max-width: 900px; margin: 0 auto; padding-bottom: 32px; }
.page {
  background: var(--panel);
  color: var(--panel-text);
  margin: 8px 16px;
  padding: 16px 20px;
  border-radius: var(--radius);
  line-height: 1.55;
}
.page h2 { margin-top: .3em; font-family: Georgia, serif; }
.page .card.mini { display: inline-block; vertical-align: middle; --mini: 26px; }
.lesson-cards { display: flex; gap: 8px; flex-wrap: wrap; }
.lesson-cards .card.mini { --mini: 60px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
/* Voorbeeldkaarten in een les zijn echte kaarten, geen mini's. */
.lesson-cards .card.mini .corner { font-size: calc(var(--cw) * .21); top: 4%; left: 4%; }
.lesson-cards .card.mini .corner.br { display: block; top: auto; left: auto; bottom: 4%; right: 4%; }
.lesson-cards .card.mini .pips, .lesson-cards .card.mini .ace, .lesson-cards .card.mini .face { display: flex; }
.lesson-cards .card.mini .pips { display: block; }
.lesson-steps { display: flex; gap: 6px; justify-content: center; padding: 4px 16px 8px; }
.lesson-steps .lesson-step { min-height: 0; width: 28px; height: 8px; padding: 0; border: none; border-radius: 4px; background: rgba(255, 255, 255, .25); }
.lesson-steps .lesson-step.done { background: rgba(245, 158, 11, .6); }
.lesson-steps .lesson-step.on { background: var(--accent); }
.lesson-nav { display: flex; justify-content: space-between; padding: 8px 16px; gap: 8px; }
.skip { text-align: center; }
.points { border-collapse: collapse; width: 100%; }
.points td, .points th { border-bottom: 1px solid var(--border); padding: 6px; text-align: left; vertical-align: top; }
.page a { color: inherit; font-weight: 600; }
.about-link a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
}
.tips dt { font-weight: bold; margin-top: 10px; }
.tips dd { margin: 2px 0 0; }
.tabs { display: flex; gap: 8px; padding: 0 16px; }
.tabs button { flex: 1; background: rgba(255, 255, 255, .12); color: #fff; border: none; }
.tabs button.active { background: var(--accent); color: var(--accent-text); }

/* ---------- Speltafel ---------- */

.game { padding-bottom: 16px; }
.main { min-width: 0; }
.contract-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 12px 8px;
  min-height: 2em;
  font-size: .9rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .3);
}
.badge.phase { background: rgba(255, 255, 255, .15); }
.badge.score { background: rgba(245, 158, 11, .25); }
.table {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 1.6fr) minmax(0, 1fr);
  grid-template-areas: ". north ." "west trick east";
  align-content: center;
  gap: 6px;
  margin: 0 12px;
  padding: 10px 8px;
  border-radius: 24px;
  background: radial-gradient(ellipse at center, var(--felt) 0%, var(--felt-dark) 100%);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .4);
}
.seat { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.seat.north { grid-area: north; }
.seat.west { grid-area: west; align-self: center; }
.seat.east { grid-area: east; align-self: center; }
.seat.south { margin: 8px 12px 0; flex-direction: row; justify-content: center; }
.seat .who {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .25);
  font-size: .9rem;
  transition: box-shadow .2s;
}
.seat.turn .who {
  background: var(--accent);
  color: var(--accent-text);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .7); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}
@media (prefers-reduced-motion: reduce) { .seat.turn .who { animation: none; box-shadow: 0 0 0 3px rgba(245, 158, 11, .5); } }
.chip { font-size: .7rem; border-radius: 999px; padding: 1px 6px; background: rgba(255, 255, 255, .85); color: #111; }
.chip.role { background: #fde68a; }
.tricks { font-size: .8rem; opacity: .9; }
.mini-hand { display: flex; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.mini-hand .card.mini { margin: 0 -6px 2px 0; }
.mini-hand.faces .card.mini { margin: 0 1px 2px 0; }
.west .mini-hand, .east .mini-hand { max-width: calc(var(--mini) * 4); }
.bubble {
  background: #fff;
  color: #111;
  font-size: .8rem;
  font-weight: 600;
  border-radius: 10px;
  padding: 2px 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

.trick-area {
  grid-area: trick;
  position: relative;
  height: calc(var(--cw) * 1.42 * 2.25);
  min-height: 150px;
}
.slot { position: absolute; transition: transform .2s; }
.slot.south { left: 50%; bottom: 0; transform: translateX(-50%); }
.slot.north { left: 50%; top: 0; transform: translateX(-50%); }
.slot.west { left: 4%; top: 50%; transform: translateY(-50%); }
.slot.east { right: 4%; top: 50%; transform: translateY(-50%); }
.slot.winner .card { box-shadow: 0 0 0 3px var(--accent), 0 2px 8px rgba(0, 0, 0, .5); }
.center-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: .85rem;
  opacity: .85;
}
.center-msg.big { font-family: Georgia, serif; font-size: 1.6rem; font-weight: bold; opacity: 1; }

.hand {
  display: flex;
  justify-content: center;
  padding: 16px 8px 4px;
  margin: 0 4px;
  min-height: calc(var(--cw) * 1.42 + 24px);
}
.hand .card + .card { margin-left: calc(4px - var(--overlap, 0px)); }
.hand .card { transition: transform .12s; }
.hand.active .card.playable { transform: translateY(-10px); box-shadow: 0 0 0 2px var(--accent), 0 3px 6px rgba(0, 0, 0, .4); }
.hand.active .card.playable:hover, .hand.active .card.playable:focus-visible { transform: translateY(-16px); }
.hand.active .card.blocked { background: #c4c8cf; filter: saturate(.55); }

/* ---------- Acties (vaste plek onder de eigen hand) ---------- */

.actions {
  background: var(--panel);
  color: var(--panel-text);
  margin: 10px 12px 0;
  padding: 12px;
  border-radius: var(--radius);
  min-height: 4.5rem;
}
.action-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.prompt-line { margin: 0; font-weight: 600; }
.help-btn { flex: none; }
.waiting { margin: 8px 0; text-align: center; color: var(--muted); }
.waiting .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; animation: pulse 1.4s infinite; }
.bidding { display: grid; gap: 8px; }
.bid-group { display: grid; grid-template-columns: 8.5em 1fr; gap: 8px; align-items: center; }
.group-name { font-size: .85rem; color: var(--muted); }
.bid-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.bid-buttons .bid.selected { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.bid-desc p, .bid-hint { margin: 10px 0 0; line-height: 1.4; }
.bid-hint { color: var(--muted); font-size: .9rem; }
.main-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.main-actions button { min-width: 7em; min-height: 46px; }
.main-actions .pass { background: #e5e7eb; color: #111; font-weight: 600; }
.choose { display: flex; flex-wrap: wrap; gap: 6px; }
.suit-btn { font-size: 1.1rem; color: var(--sc, var(--black)); background: #fff; min-width: 6em; min-height: 46px; }
.result { text-align: center; }
.result p { font-weight: 600; margin: 0 0 8px; }
.result.won p { color: var(--good); }
.result.lost p { color: var(--bad); }
.points-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 10px; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
@media (max-width: 520px) {
  .bid-group { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Zijpaneel: coach, verloop, score ---------- */

.panel {
  background: var(--panel);
  color: var(--panel-text);
  margin: 10px 12px 0;
  padding: 12px;
  border-radius: var(--radius);
}
.side-tabs { display: flex; gap: 4px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.side-tabs button { flex: 1; border: none; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--muted); font-weight: 600; }
.side-tabs button.on { color: var(--panel-text); border-bottom-color: var(--accent); }
.side-body { line-height: 1.45; }
.empty, .muted { color: var(--muted); font-size: .9rem; }
.coach-text p { margin: 0 0 6px; }
.coach-text .prompt { font-weight: 600; }
.notice { border-left: 4px solid var(--accent); padding: 4px 8px; margin: 6px 0; }
.feedback { padding: 6px 8px; border-radius: 8px; margin: 6px 0; }
.feedback .icon { font-weight: bold; }
.feedback.best { background: rgba(21, 128, 61, .15); }
.feedback.ok { background: rgba(245, 158, 11, .15); }
.feedback.mistake { background: rgba(185, 28, 28, .15); }
.advice table, .score-table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.advice td, .advice th, .score-table td, .score-table th { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--border); }
.score-table td:last-child, .score-table th:last-child { text-align: right; font-weight: 600; }
.score-table tr.me td:first-child { font-weight: 700; }
.stats { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.log-list { margin: 0; padding-left: 22px; font-size: .88rem; max-height: 320px; overflow: auto; }
.toggle { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: .9rem; }

/* ---------- Breed scherm: de tafel vult het venster, zijpaneel rechts ---------- */

@media (min-width: 1000px) {
  :root { --cw: clamp(64px, min(5.4vw, 8.6vh), 112px); --mini: clamp(26px, 2vw, 34px); }
  :root[data-size="large"] { --cw: clamp(76px, min(6vw, 10vh), 124px); }
  :root[data-size="xlarge"] { --cw: clamp(84px, min(6.6vw, 11vh), 136px); }
  .game {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 25vw, 400px);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "top top" "main side";
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 12px;
  }
  .game > .topbar { grid-area: top; }
  .main { grid-area: main; display: flex; flex-direction: column; }
  .main .table { flex: 1 1 auto; }
  .actions { min-height: 7.5rem; }
  .side {
    grid-area: side;
    display: flex;
    flex-direction: column;
    margin: 0 12px 0 0;
    min-height: 0;
  }
  .side-body { flex: 1 1 auto; overflow: auto; }
  .log-list { max-height: none; }
  .modes { grid-template-columns: repeat(3, 1fr); }
  .menu h1 { font-size: 3.5rem; }
}

/* ---------- Losse pagina's (spelregels, installeren) ---------- */

a { color: #fde68a; }
.intro { line-height: 1.5; }
.intro a { color: #fde68a; }
.links a { color: inherit; }
.static { max-width: 800px; margin: 0 auto; padding-bottom: 24px; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 16px;
}
.site-header .brand { color: #fff; font-family: Georgia, serif; font-size: 1.5rem; font-weight: bold; text-decoration: none; }
.site-header nav { display: flex; gap: 14px; flex-wrap: wrap; }
.site-header nav a { color: #fff; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-header nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.article { font-size: 1.05rem; }
.article h1 { font-family: Georgia, serif; font-size: 1.9rem; margin: .2em 0 .4em; line-height: 1.2; }
.article h2 { margin-top: 1.6em; }
.article .lead { font-size: 1.15rem; }
.article li { margin: 4px 0; }
.article .cta {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}
.toc { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin: 16px 0; }
.toc ol { margin: 6px 0 0; padding-left: 22px; }
.table-wrap { overflow-x: auto; }
.faq dt { font-weight: bold; margin-top: 14px; }
.faq dd { margin: 4px 0 0; }
.steps li { margin: 8px 0; }
.site-footer { text-align: center; padding: 16px; font-size: .9rem; }
.site-footer a { color: #fff; }

/* ---------- Beurtaanduiding, dealerknop, uitgelichte spelmodus, bevestiging ---------- */

.seat.turn .who { font-size: 1rem; animation: pulse-turn 1.4s ease-in-out infinite; }
@keyframes pulse-turn {
  0%, 100% { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(255, 255, 255, 0); }
  50% { box-shadow: 0 0 0 2px #fff, 0 0 0 8px rgba(255, 255, 255, .35); }
}
@media (prefers-reduced-motion: reduce) { .seat.turn .who { animation: none; box-shadow: 0 0 0 3px #fff; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.doing {
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 0 0 2px var(--accent);
}
.table:has(.seat.turn) .seat:not(.turn) .mini-hand { opacity: .6; }
.dealer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  background: #fff;
  color: #111;
  border: 2px solid #1f2937;
  font-size: .8rem;
  font-weight: 800;
  line-height: 1;
}
.mode-card { position: relative; }
.mode-card.featured { box-shadow: 0 0 0 3px var(--accent), 0 6px 24px rgba(245, 158, 11, .45); }
.mode-flag.soft { background: #fff; color: #111; }
.mode-card.featured h2 { font-size: 1.6rem; }
.mode-flag {
  position: absolute;
  top: -12px;
  right: 16px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: .8rem;
  font-weight: 700;
}
@media (min-width: 1000px) {
  .modes { grid-template-columns: 1.25fr 1fr 1fr; align-items: stretch; }
}
.overlay.center { justify-content: center; align-items: center; padding: 16px; }
.sheet.dialog { height: auto; width: min(420px, 100%); border-radius: 16px; }
.sheet.dialog .main-actions { margin-top: 16px; }

.trick-banner {
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translateX(-50%);
  z-index: 2;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
}
.hand { position: relative; }
.hand.active::before {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: -2px;
  transform: translateX(-50%);
  padding: 1px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: .8rem;
  font-weight: 700;
}
.hand .card.trump { box-shadow: inset 0 -5px 0 var(--accent); }
.hand.active .card.playable.trump { box-shadow: 0 0 0 2px var(--accent), inset 0 -5px 0 var(--accent), 0 3px 6px rgba(0, 0, 0, .4); }
.game .topbar button { min-height: 44px; min-width: 44px; }
.topbar .title { min-width: 0; }
.topbar small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right .btn-new { margin-right: 10px; }
@media (max-width: 600px) {
  .top-right .btn-rules { display: none; }
  .seat .who { font-size: .8rem; padding: 2px 8px; }
  .seat.turn .who { font-size: .85rem; }
}
