/* Round five: quiet gathering places and clear table information. Self-hosted and CSP-safe. */
.river-page { max-width: 1280px; gap: 26px; padding-bottom: 64px; }
.river-nav { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.river-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 15px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-size: .92rem; font-weight: 650; }
.river-nav a:hover, .river-nav a[aria-current=page] { background: var(--surface-2); color: var(--ink); }
.river-nav a[aria-current=page] { box-shadow: inset 0 -3px var(--primary); }
.eyebrow { display: block; font-size: .74rem; text-transform: uppercase; font-weight: 800; letter-spacing: .13em; color: var(--primary); }
.river-heading { gap: 12px; max-width: 760px; }
.river-heading h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.2; }
.river-heading .lede { font-size: 1.05rem; color: var(--ink-2); max-width: 630px; line-height: 1.7; }
.river-hero { position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; min-height: 280px; padding: 36px; display: grid; align-content: center; gap: 22px; }
.river-hero .river-heading { max-width: 58%; }
.river-hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
.river-scene { position: absolute; z-index: -1; right: -1px; bottom: -1px; height: 100%; width: 48%; }
.river-columns { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr); gap: 24px; align-items: start; }
.river-columns > *, .river-columns .stack, .journey-hero > * { min-width: 0; }
.river-page .panel { padding: 24px; border-radius: 20px; gap: 18px; box-shadow: 0 1px 2px rgba(14,42,59,.04); }
.river-page h2 { font-size: 1.2rem; line-height: 1.4; }
.river-page h3 { font-size: 1.02rem; line-height: 1.4; }
.section-heading, .invite-panel { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.inline-link { font-size: .9rem; text-decoration: none; font-weight: 650; }
.river-stats { display: flex; flex-wrap: wrap; gap: 26px; }
.river-stat { display: grid; gap: 1px; min-width: 62px; }
.river-stat strong { font-family: var(--f-display); font-size: 1.75rem; line-height: 1.5; color: var(--ink); }
.river-stat span, .river-stat small { font-size: .8rem; color: var(--ink-2); }
.journey-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); flex-wrap: wrap; }
.journey-strip .stack { gap: 4px; }
.journey-strip .muted { font-size: .85rem; }
.journey-strip .eyebrow { font-size: .65rem; }
.journey-strip .river-stat strong { font-size: 1.6rem; }
.river-empty { display: grid; justify-items: start; gap: 10px; padding: 16px 0 8px; }
.river-empty .muted { font-size: .94rem; max-width: 540px; }
.ripple-mark { font-size: 2rem; line-height: 1; color: var(--primary); }
.river-field { display: grid; gap: 7px; font-size: .9rem; font-weight: 650; }
.river-field input, .river-field select, .river-page textarea, .share-fallback { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 11px 12px; font: inherit; width: 100%; min-width: 0; min-height: 44px; }
.river-page textarea { resize: vertical; min-height: 84px; }
.river-page .btn { width: fit-content; max-width: 100%; min-height: 44px; white-space: normal; }
.river-form .btn { width: 100%; }
.group-list { display: grid; gap: 10px; }
.group-tile { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line-2); border-radius: 14px; color: var(--ink); text-decoration: none; }
.group-tile:hover { border-color: var(--primary); background: var(--surface-2); }
.group-tile .stack { flex: 1; gap: 4px; }
.group-tile h3 { overflow-wrap: anywhere; }
.group-tile .muted { font-size: .82rem; }
.group-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 14px; background: var(--water-1); color: var(--primary); font-size: 2rem; font-weight: 700; }
.tournament-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.tournament-tile { display: grid; gap: 9px; border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.tournament-tile:hover { border-color: var(--primary); }
.tournament-tile .chip { font-size: .7rem; }
.tournament-tile p { font-size: .85rem; }
.partner-card, .tournament-hero { display: grid; gap: 14px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; }
.partner-card p, .tournament-hero p { max-width: 620px; line-height: 1.6; }
.partner-card h2 { font-size: 1.35rem; }
.inbox-list { display: grid; gap: 18px; }
.inbox-message { display: grid; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--line-2); }
.inbox-message:last-child { border-bottom: 0; padding-bottom: 0; }
.message-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.message-heading time { font-size: .72rem; color: var(--ink-2); margin-left: auto; }
.message-text { overflow-wrap: anywhere; white-space: pre-wrap; }
.quiet-actions summary { width: fit-content; cursor: pointer; color: var(--ink-2); font-size: .78rem; min-height: 44px; display: flex; align-items: center; }
.quiet-actions .row { margin-top: 6px; }
.quiet-actions .btn { font-size: .8rem; }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-row .btn { min-height: 44px; font-size: .8rem; border-radius: 999px; background: var(--surface-2); }
.river-page .linkish { min-height: 44px; min-width: 44px; }
.river-page .section-heading .inline-link { display: inline-flex; align-items: center; min-height: 44px; }
.river-notice { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; color: var(--ink-2); }
.members-list { display: grid; gap: 18px; }
.members-list li { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.members-list li:last-child { padding-bottom: 0; border: 0; }
.members-list .chip { width: fit-content; font-size: .65rem; }
.members-list .linkish { width: fit-content; }
.invite-panel { border: 1px dashed var(--primary); border-radius: 18px; padding: 20px 24px; }
.invite-panel > div { flex: 1 1 250px; }
.journey-hero { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 32px; border-radius: 24px; border: 1px solid var(--line); flex-wrap: wrap; }
.journey-hero h2 { font-size: 1.65rem; }
.journey-hero .stack { gap: 10px; max-width: 600px; flex: 1 1 300px; }
.journey-hero progress { width: 100%; height: 10px; border: 0; border-radius: 99px; overflow: hidden; accent-color: var(--primary); }
.journey-hero progress::-webkit-progress-bar { background: var(--surface); }
.journey-hero progress::-webkit-progress-value { background: var(--primary); }
.badge-list { display: flex; gap: 12px; flex-wrap: wrap; }
.journey-badge { display: flex; gap: 9px; align-items: center; padding: 12px 15px; border: 1px solid var(--line); border-radius: 14px; font-size: .85rem; }
.journey-badge > span { color: var(--primary); font-size: 1.3rem; }
.journey-history { display: grid; gap: 4px; }
.journey-history li { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.journey-history .stack { flex: 1; gap: 3px; }
.journey-history .personal-score { font-variant-numeric: tabular-nums; font-weight: 750; }
.retirement summary { cursor: pointer; color: var(--ink-2); padding-block: 6px; min-height: 44px; }
.retirement[open] > * + * { margin-top: 12px; }
.hall-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.hall-card { display: grid; gap: 9px; padding: 26px; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; color: var(--ink); text-decoration: none; }
.hall-emblem { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--primary); font-size: 2rem; margin-bottom: 6px; }
.commitment { overflow-wrap: anywhere; font-size: .78rem; }

/* Live table: meaningful helpers use existing section switches. */
.auction .call-explain { border: 0; border-bottom: 1px dotted var(--primary); background: none; color: inherit; font: inherit; cursor: pointer; border-radius: 5px; padding: 3px; }
.auction .dealer-mark { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: .6rem; vertical-align: middle; margin-left: 3px; }
.auction-help { font-size: .73rem; color: var(--ink-2); }
.estimate-grid { display: grid; gap: 12px; }
.estimate-seat { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 6px; }
.estimate-seat.partner { border-color: var(--primary); background: var(--surface-2); }
.range-track { display: grid; grid-template-columns: repeat(38, minmax(0, 1fr)); gap: 1px; height: 8px; border-radius: 99px; overflow: hidden; background: var(--line-2); }
.range-track span.active { background: var(--primary); }
.estimate-seat h4 { margin: 0; font-size: .85rem; }
.estimate-seat p { font-size: .75rem; color: var(--ink-2); }
.contract-chance { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--primary); border-radius: 12px; background: var(--surface-2); }
.contract-chance strong { font-family: var(--f-display); font-size: 1.35rem; }
.contract-chance p { font-size: .78rem; }
.split .sp-bars { display: grid; gap: 5px; grid-template-columns: repeat(auto-fit, minmax(55px, 1fr)); }
.split .sp { display: grid; gap: 3px; font-size: .75rem; }
.split progress { width: 100%; height: 6px; accent-color: var(--primary); }
.practice-panel { gap: 10px; }
.practice-panel .btn { font-size: .84rem; min-height: 44px; }
.practice-answer { border-left: 3px solid var(--primary); padding-left: 12px; font-size: .88rem; line-height: 1.5; }
.bot-reasons { display: grid; gap: 12px; }
.bot-reasons li { padding-bottom: 10px; border-bottom: 1px solid var(--line-2); font-size: .85rem; }
.bot-reasons p { margin-top: 4px; }
.learn-review-accuracy { display: grid; gap: 16px; border: 1px solid var(--line); background: var(--surface); padding: 22px; border-radius: 14px; }
.learn-review-metrics { display: flex; flex-wrap: wrap; gap: 18px 40px; }
.learn-review-metric { display: grid; gap: 5px; max-width: 280px; }
.learn-review-metric > strong { font: 700 2rem var(--f-display); color: var(--primary); }
.mixer-note { font-size: .8rem; padding: 8px 12px; background: var(--surface-2); border-radius: 12px; color: var(--ink-2); }
.trick .tc.just-played { animation: card-arrives .24s ease-out both; }
@keyframes card-arrives { from { opacity: .25; translate: 0 12px; scale: .94; } to { opacity: 1; translate: 0 0; scale: 1; } }

/* Explicit zero-minimum grid tracks prevent an aid pill or long status from widening the table. */
.table-page .mainco { grid-template-columns: minmax(0, 1fr); }
.aidstrip-wrap { min-width: 0; }
@media (max-width: 900px) {
  .river-columns { grid-template-columns: minmax(0, 1fr); }
  .river-hero { min-height: 260px; padding: 28px; }
  .journey-strip { align-items: start; }
}
@media (max-width: 600px) {
  .river-page { gap: 20px; padding-top: 12px; }
  .river-nav { gap: 2px; }
  .river-nav a { padding: 6px 10px; font-size: .8rem; }
  .river-heading h1 { font-size: 1.9rem; }
  .river-heading .lede { font-size: .95rem; }
  .river-hero { padding: 24px; padding-bottom: 170px; }
  .river-hero .river-heading { max-width: 100%; }
  .river-scene { height: 170px; width: 100%; }
  .river-page .panel { padding: 20px; }
  .journey-strip, .journey-hero { padding: 22px; gap: 22px; }
  .river-stats { gap: 22px; }
  .journey-history li { gap: 8px; flex-wrap: wrap; }
  .message-heading time { margin-left: 0; }
  .invite-panel { padding: 20px; }
  .ap-pill { flex-wrap: wrap; gap: 3px; padding: 6px 8px; }
  .aidstrip-phone .caret { margin-left: auto; }
  .dock-head { flex-wrap: wrap; }
  .dock-head .status { margin-left: auto; }
  .table-page .pool, .table-page .dock { min-width: 0; max-width: 100%; }
  .hrow { flex-wrap: wrap; row-gap: 8px; }
  .hrow .suitgroup { max-width: 100%; }
  .table-page .dummy { max-width: 100%; flex-wrap: wrap; }
  .auction .call-explain { min-height: 44px; min-width: 44px; }
  .practice-panel { padding: 12px; }
  .topnav #nav { gap: 4px 9px; }
}
@media (max-width: 360px) {
  .table-page .dock-head .status { font-size: .7rem; padding-inline: 7px; }
  .aidstrip-phone .lbl { display: none; }
  .table-page .plate { padding-right: 6px; }
  .table-page .plate .who { max-width: 80px; }
  .river-stat strong { font-size: 1.45rem; }
  .river-stats { gap: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .trick .tc.just-played { animation: none; }
}

/* Tournament passes: the host's pass sheet and the sign-in page. */
.river-page [hidden] { display: none !important; }
.pass-fields { gap: 14px; padding: 16px; border: 1px dashed var(--line); border-radius: 14px; }
.pass-code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.15rem !important; letter-spacing: .08em; text-transform: uppercase; }
.pass-problem { color: var(--vul); font-weight: 650; }
.pass-seat { font-size: 1.05rem; }
.pass-address { overflow-wrap: anywhere; }
.pass-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pass-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 214px 150px 64px; align-items: center; gap: 6px 14px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.pass-row .pass-status { justify-self: start; }
.pass-row:nth-child(4n+1) { border-top: 2px solid var(--line); }
.pass-row:first-child { border-top: 0; }
.pass-row.gone { color: var(--ink-2); }
.pass-row.gone .pass-name { text-decoration: line-through; font-weight: 500; }
.pass-seat-label { font-size: .85rem; color: var(--ink-2); }
.pass-name { overflow-wrap: anywhere; }
.pass-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .98rem; letter-spacing: .04em; padding: 4px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); white-space: nowrap; user-select: all; }
.pass-code-none { white-space: nowrap; }
.pass-status { font-size: .72rem; white-space: nowrap; }
.pass-status.signed-in { border-color: var(--primary); color: var(--primary); }
.pass-row .quiet-actions summary { font-size: .82rem; }
.pass-row .quiet-actions[open] { grid-column: 1 / -1; }
.print-only { display: none; }
textarea.share-fallback { min-height: 160px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; }
@media (max-width: 700px) {
  .pass-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pass-seat-label { grid-column: 1 / -1; }
  .pass-code, .pass-code-none { grid-column: 1; justify-self: start; }
  .pass-row .pass-status { grid-column: 2; grid-row: 2; justify-self: end; }
  .pass-row .quiet-actions { grid-column: 1 / -1; }
  .pass-code { font-size: .92rem; letter-spacing: .02em; }
}
@media print {
  body.print-passes > :not(#main), body.print-passes .river-page > :not(.pass-panel), body.print-passes .no-print { display: none !important; }
  body.print-passes, body.print-passes .pass-panel { background: #fff !important; color: #000 !important; border: 0 !important; box-shadow: none !important; }
  body.print-passes .pass-row { grid-template-columns: 1.1fr 1.2fr auto; break-inside: avoid; border-color: #999; color: #000; }
  body.print-passes .pass-status { display: none; }
  body.print-passes .pass-code { background: #fff; border-color: #000; color: #000; }
  body.print-passes .print-only { display: inline; grid-column: 1 / -1; font-size: .8rem; }
}
