/* Royal Notes, navy velvet, cream paper and red wax. Fixed palette (the same in light and dark OS modes). */
:root {
  --bg: #eef0f4;
  --surface: #fcfbf8;
  --surface2: #e2e5ec;
  --line: rgba(31, 51, 80, .13);
  --ink: #1d2a3d;
  --muted: #6b7587;
  --accent: #b3322c;           /* you, wax red */
  --gold: #d9b25a;
  --felt: #243b5c;
  --felt2: #1a2c45;
  --paper: #fbf6ea;
  /* tutorial kit (tutorial.css) */
  --tut-accent: #d9b25a;
  --tut-accent-ink: #1d2a3d;
  --tut-bubble: #fcfbf8;
  --tut-ink: #1d2a3d;
  --tut-muted: #6b7587;
  --tut-dim: rgba(12, 20, 34, .58);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; touch-action: manipulation; min-height: 100vh; overflow-x: hidden; }
button { font: inherit; color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ico { width: 20px; height: 20px; display: inline-block; vertical-align: middle; flex: none; }

.app { position: relative; max-width: 760px; margin: 0 auto; padding: 0 12px 16px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }

/* ---------- top bar + menu ---------- */
.topbar { display: flex; align-items: center; gap: 4px; height: 50px; }
.back, .iconbtn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 22px; background: none; border: 0; cursor: pointer; padding: 0; }
.back:hover, .iconbtn:hover, .iconbtn[aria-expanded="true"] { color: var(--ink); background: var(--surface2); }
.brand { flex: 1; text-align: center; font: italic 700 21px/1 Georgia, "Times New Roman", serif; letter-spacing: .04em; color: var(--felt); }
.menu { position: absolute; right: 12px; top: 46px; z-index: 45; min-width: 190px; padding: 6px; background: var(--surface); border-radius: 14px; box-shadow: 0 14px 36px rgba(31, 51, 80, .25); display: flex; flex-direction: column; animation: pop .14s ease-out; }
.menu button { min-height: 46px; text-align: left; padding: 0 14px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-weight: 600; }
.menu button:hover, .menu button:focus-visible { background: var(--surface2); }
@keyframes pop { from { transform: translateY(-4px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- buttons ---------- */
.btn { min-height: 44px; padding: 8px 16px; border-radius: 12px; border: 0; background: var(--surface2); color: var(--ink); cursor: pointer; font-weight: 650; transition: background .15s, transform .1s, opacity .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover:not(:disabled) { background: #d3d8e2; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #9c2a25; }
.btn.danger { background: #fff; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.btn.quiet { background: transparent; }
.btn.small { min-height: 40px; padding: 4px 14px; font-size: 14px; }

/* ---------- status ---------- */
.status { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 4px 6px; font-size: 15px; color: var(--muted); text-align: center; }
.status.mine { color: var(--ink); font-weight: 600; }
.status .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.thinking::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
/* online: a short notice (connection lost, the table was updated, someone left) floats just under the
   turn line, over the table's top edge, so the board never moves */
.status { position: relative; }
.status .net-note { position: absolute; left: 50%; top: calc(100% - 8px); transform: translateX(-50%); z-index: 6; width: max-content; max-width: calc(100% - 24px);
  padding: 4px 12px; border-radius: 12px; background: var(--paper); color: var(--felt); font-size: 12.5px; font-weight: 700; line-height: 1.3; text-align: center;
  box-shadow: 0 4px 14px rgba(20, 32, 50, .3); pointer-events: none; animation: net-note-in .25s ease-out; }
@keyframes net-note-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- the table ---------- */
.table { position: relative; border-radius: 22px; padding: 10px 8px 12px; background: radial-gradient(ellipse at 50% 30%, var(--felt) 0%, var(--felt2) 100%); box-shadow: inset 0 0 0 3px #3a557c, 0 10px 24px rgba(31, 51, 80, .22); }
.seats { display: flex; gap: 8px; justify-content: center; }
.seat { position: relative; flex: 1 1 0; max-width: 170px; min-width: 0; border: 0; background: rgba(255, 255, 255, .07); color: #eef2f8; border-radius: 16px; padding: 7px 6px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; transition: box-shadow .2s, opacity .2s, background .2s; }
.seat.cur { box-shadow: 0 0 0 2.5px var(--pc); background: rgba(255, 255, 255, .12); }
.seat.out { opacity: .38; }
.seat.target { background: rgba(255, 255, 255, .2); box-shadow: 0 0 0 3px var(--gold), 0 0 18px 2px rgba(217, 178, 90, .55); animation: throb 1.2s ease-in-out infinite; }
.seat.hit { animation: flash .9s ease-out; box-shadow: 0 0 0 2.5px var(--gold); }
@keyframes throb { 0%, 100% { box-shadow: 0 0 0 3px var(--gold), 0 0 18px 2px rgba(217, 178, 90, .55); } 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 8px 0 rgba(217, 178, 90, .3); } }
@keyframes flash { 0% { background: rgba(217, 178, 90, .55); } 100% { background: rgba(255, 255, 255, .07); } }
.seat .nm { font-size: 13px; font-weight: 700; max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.15; display: flex; align-items: center; gap: 5px; text-align: center; justify-content: center; }
.seat .nm i { width: 9px; height: 9px; border-radius: 50%; background: var(--pc); flex: none; }
/* online: a friend whose page stopped checking in (a hollow dot), and seats while the table waits */
.seat.away .nm { opacity: .7; }
.seat.away .nm i { background: transparent; box-shadow: inset 0 0 0 2px var(--pc); }
.seat.waiting { cursor: default; }
.seals { display: inline-flex; gap: 2px; align-items: center; min-height: 14px; }
.seals svg { width: 14px; height: 14px; }
.seals .off { width: 10px; height: 10px; margin: 2px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .28); }
.you .seals .off { border-color: rgba(31, 51, 80, .22); }
.seat .held { position: relative; height: 50px; display: flex; align-items: center; justify-content: center; }
.seat .held .back { width: 34px; height: 48px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.seat .held .veil { position: absolute; inset: -3px -10px; display: grid; place-items: center; }
.seat .held .veil svg { width: 30px; height: 30px; position: absolute; right: -8px; bottom: -6px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); }
.seat .outtag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #f4b3bf; }
.played { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 18px; max-width: 100%; }
.chip { min-width: 17px; height: 18px; padding: 0 3px; border-radius: 5px; background: var(--rc); color: #fff; font: 800 11px/18px system-ui, sans-serif; text-align: center; }
.chip.fresh { animation: pop .35s ease-out; box-shadow: 0 0 0 2px #fff; }

/* mini face-up card (a card you saw, revealed hands) */
.mini { width: 36px; height: 50px; border-radius: 6px; background: var(--paper); border: 2px solid var(--rc); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; color: var(--ink); box-shadow: 0 2px 3px rgba(0, 0, 0, .3); position: relative; }
.mini b { font: 800 13px/1 Georgia, serif; color: var(--rc); position: absolute; top: 2px; left: 3px; }
.mini svg { width: 24px; height: 24px; margin-top: 8px; }
.mini .eye { position: absolute; bottom: -7px; right: -9px; background: var(--gold); color: var(--felt2); font-size: 9px; font-weight: 800; border-radius: 6px; padding: 0 4px; line-height: 14px; }

.center { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 128px; padding: 12px 4px 2px; color: #eef2f8; }
.deck { border: 0; background: none; color: inherit; padding: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; border-radius: 12px; flex: none; }
.deck .stack { position: relative; width: 50px; height: 70px; }
.deck .stack svg { position: absolute; left: 0; top: 0; width: 50px; height: 70px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.deck .stack svg:first-child:not(:last-child) { left: 3px; top: -3px; }
.deck .n { font-size: 12px; opacity: .85; }
.deck .n b { font-size: 15px; }
.aside { display: flex; gap: 3px; justify-content: center; }
.aside .mini, .aside svg.back { width: 26px; height: 36px; }
.aside .mini svg { width: 18px; height: 18px; margin-top: 6px; }
.aside .mini b { font-size: 10px; }
.lastplay { flex: 1 1 auto; min-width: 0; max-width: 250px; display: flex; align-items: center; gap: 10px; }
.lastplay .say { font-size: 13.5px; line-height: 1.3; min-width: 0; }
.lastplay .say b { color: #fff; }
.lastplay .res { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 800; letter-spacing: .04em; padding: 2px 8px; border-radius: 8px; background: rgba(255, 255, 255, .14); }
.lastplay .res.bad { background: #b3322c; color: #fff; }
.lastplay .res.good { background: var(--gold); color: var(--felt2); }
.lastplay .pcard { flex: none; animation: drop .35s ease-out; }
.lastplay .reveal { display: flex; gap: 6px; margin-top: 6px; align-items: center; font-size: 12px; }
.lastplay .extra { margin-top: 5px; font-size: 12.5px; opacity: .85; }
.lastplay .say > b { color: #fff; white-space: nowrap; }
.lastplay .say > b i, .entry .line > b i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--pc); margin-right: 4px; vertical-align: 1px; }
.center .idle { font-size: 13px; opacity: .7; text-align: center; }
.center .roundres { text-align: center; }
.center .roundres .big { font: 700 20px/1.2 Georgia, serif; color: #f7d774; display: flex; align-items: center; justify-content: center; gap: 6px; }
.center .roundres .big svg { width: 26px; height: 26px; }
.center .roundres .small { font-size: 12.5px; opacity: .8; margin-top: 3px; }
@keyframes drop { from { transform: translateY(-10px) scale(.95); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- a full card ---------- */
.card { position: relative; width: 100%; max-width: 150px; aspect-ratio: 5 / 7; border-radius: 12px; background: var(--paper); border: 0; padding: 0; box-shadow: 0 0 0 2px var(--rc), 0 4px 10px rgba(31, 51, 80, .2); display: flex; flex-direction: column; align-items: center; color: var(--ink); overflow: hidden; transition: transform .18s, box-shadow .18s, opacity .18s; cursor: pointer; }
.card .band { width: 100%; background: var(--rc); color: #fff; display: flex; align-items: center; gap: 6px; padding: 5px 8px; }
.card .band b { font: 800 22px/1 Georgia, serif; }
.card .band span { font-weight: 750; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card svg.art { width: 62%; height: auto; flex: 1 1 auto; min-height: 0; margin: 4px 0; }
.card .pw { font-size: 11.5px; line-height: 1.25; text-align: center; padding: 0 7px 8px; color: #44506a; min-height: 3.6em; display: flex; align-items: center; }
.card.sel { transform: translateY(-10px); box-shadow: 0 0 0 3px var(--rc), 0 0 0 6px rgba(217, 178, 90, .9), 0 12px 20px rgba(31, 51, 80, .3); }
.card.can:not(.sel):hover { transform: translateY(-3px); }
.card:disabled { cursor: default; }
.card.locked { opacity: .45; }
.card.fresh { animation: drop .35s ease-out; }
.pcard { width: 70px; aspect-ratio: 5 / 7; border-radius: 8px; background: var(--paper); box-shadow: 0 0 0 2px var(--rc), 0 3px 8px rgba(0, 0, 0, .35); display: flex; flex-direction: column; align-items: center; overflow: hidden; color: var(--ink); }
.pcard .band { width: 100%; background: var(--rc); color: #fff; font: 800 15px/1 Georgia, serif; padding: 3px 5px; }
.pcard svg { width: 46px; height: 46px; margin-top: 8px; }
.pcard small { font-size: 10px; font-weight: 700; margin-top: 2px; color: #44506a; }

/* ---------- you ---------- */
.you { background: var(--surface); border-radius: 18px; padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 12px; margin-top: 10px; transition: box-shadow .2s; }
.you.turn { box-shadow: inset 0 0 0 2px rgba(179, 50, 44, .35); }
.you.target { box-shadow: inset 0 0 0 3px var(--gold), 0 0 16px 2px rgba(217, 178, 90, .5); cursor: pointer; }
.you.hit { animation: flashyou .9s ease-out; }
@keyframes flashyou { 0% { background: #f7e6b7; } 100% { background: var(--surface); } }
.you-row { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: 13px; }
.you-row .nm { font-weight: 800; display: flex; align-items: center; gap: 5px; }
.you-row .nm i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.you-row .played { justify-content: flex-end; flex: 1; }
.you-row .tag { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 8px; background: #dbe8cf; color: #3f6a2c; }
.you-row .tag.out { background: #f4d4d2; color: var(--accent); }
.hand { display: flex; gap: 14px; justify-content: center; min-height: 170px; align-items: flex-end; padding-top: 10px; }
.hand .card { flex: 0 1 150px; }
.hand .empty { align-self: center; color: var(--muted); font-size: 14px; }
.controls { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; min-height: 44px; }
.controls .hint { font-size: 13px; color: var(--muted); text-align: center; }
.guesses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 420px; align-self: center; }
.guess { min-height: 50px; min-width: 0; border: 0; border-radius: 12px; background: var(--bg); cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 4px 8px; box-shadow: inset 0 0 0 2px var(--rc); text-align: left; animation: drop .2s ease-out; }
.guess .mini { width: 28px; height: 40px; flex: none; box-shadow: none; }
.guess .mini svg { width: 19px; height: 19px; margin-top: 7px; }
.guess .mini b { font-size: 11px; }
.guess .gn { font-size: 14px; font-weight: 750; line-height: 1.15; min-width: 0; }
.guess.gone { opacity: .42; box-shadow: inset 0 0 0 1px rgba(31, 51, 80, .2); }
.guess .cnt { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }

/* ---------- sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 32, 50, .4); }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); animation: up .18s ease-out; box-shadow: 0 -10px 40px rgba(20, 32, 50, .2); }
@keyframes up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet h3 { font: italic 700 19px/1.2 Georgia, serif; margin-bottom: 8px; color: var(--felt); }
.sheet p { margin: 6px 0; }
.sheet .actions { display: flex; gap: 8px; margin-top: 14px; }
.sheet .actions .btn { flex: 1 1 0; }
.sheet .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 12px 0 5px; }
.log { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow-y: auto; }

/* ---------- what happened (under your cards; the same lines make the full log) ---------- */
.feed { background: var(--surface); border-radius: 18px; padding: 4px 12px 8px; margin-top: 10px; }
.feed-head { display: flex; align-items: center; justify-content: space-between; min-height: 36px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.feed-head button { border: 0; background: none; min-height: 36px; padding: 0 2px 0 10px; font-size: 13px; font-weight: 700; color: var(--felt); cursor: pointer; text-transform: none; letter-spacing: 0; }
.feed-list { list-style: none; margin: 0; padding: 0; }
.entry { display: flex; gap: 8px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.35; color: var(--ink); }
.feed-list .entry:first-child { border-top: 0; }
.feed-list .fresh { animation: drop .3s ease-out; }
.feed-list .entry:not(:first-child) { color: #4a5467; }
.entry .chip { flex: none; margin-top: 1px; }
.entry .line { min-width: 0; }
.entry .line > b { white-space: nowrap; }
.entry .res { font-style: normal; font-size: 12px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--surface2); color: var(--ink); white-space: nowrap; }
.entry .res.bad { background: #f4d4d2; color: var(--accent); }
.entry .res.good { background: #f5e7bf; color: #6f5210; }
.entry .res.out { background: #e3e6ee; color: var(--felt); }
.entry .priv { display: block; margin-top: 2px; font-size: 12.5px; color: var(--felt); font-weight: 600; }
.entry.round { justify-content: center; text-align: center; color: var(--muted); font-size: 12.5px; font-weight: 650; }
.reflist { list-style: none; margin: 0; padding: 0; }
.reflist li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.reflist li .mini { flex: none; width: 30px; height: 42px; }
.reflist li .mini svg { width: 20px; height: 20px; margin-top: 7px; }
.reflist li .mini b { font-size: 11px; }
.reflist li .txt { flex: 1; min-width: 0; }
.reflist li .txt b { font-size: 14px; }
.reflist li .left { flex: none; text-align: right; font-weight: 800; font-size: 15px; min-width: 44px; }
.reflist li .left small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); }
.reflist li.none { opacity: .45; }
.setup-sheet .field { margin: 12px 0; }
.setup-sheet .label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1 1 0; min-width: 0; min-height: 46px; border-radius: 12px; border: 0; background: var(--surface2); cursor: pointer; font-weight: 650; }
.seg button.on { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.results { width: 100%; border-collapse: collapse; font-size: 14px; }
.results th, .results td { padding: 6px 4px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.results th:first-child, .results td:first-child { text-align: left; }
.results th { color: var(--muted); font-size: 12px; font-weight: 600; }
.results tr.me td { font-weight: 700; color: var(--accent); }
.results .seals .off { border-color: rgba(31, 51, 80, .22); }

/* ---------- modals ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 40; background: rgba(20, 32, 50, .45); display: flex; align-items: center; justify-content: center; padding: 12px; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 620px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(20, 32, 50, .3); }
.over-modal { max-width: 440px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.modal-head h2 { font: italic 700 21px/1.2 Georgia, serif; color: var(--felt); }
.modal-body { padding: 0 18px 14px; overflow-y: auto; }
.modal-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 16px; }
.modal-foot .btn { flex: 1 1 110px; }
.rules h3 { font-size: 15px; margin: 16px 0 4px; color: var(--felt); font-family: Georgia, serif; }
.rules p, .rules li { font-size: 14px; }
.rules ol, .rules ul { padding-left: 20px; margin: 4px 0; }
.rules li { margin: 4px 0; }
.rules .cardlist { list-style: none; padding: 0; }
.rules .cardlist li { display: flex; gap: 10px; align-items: center; }
.rules .cardlist .mini { flex: none; width: 30px; height: 42px; }
.rules .cardlist .mini svg { width: 20px; height: 20px; margin-top: 7px; }
.rules .cardlist .mini b { font-size: 11px; }
.result-banner { font: italic 800 26px/1.2 Georgia, serif; margin: 0 0 10px; }
.result-banner.win { color: var(--accent); }

@media (min-width: 700px) {
  .seat { max-width: 190px; }
  .center { min-height: 160px; }
  .hand .card { flex-basis: 160px; max-width: 160px; }
}
@media (max-width: 480px) {
  .hand { min-height: 0; padding-top: 6px; gap: 12px; }
  .hand .card { flex-basis: 128px; max-width: 128px; }
  .card .band { padding: 4px 7px; }
  .card .band b { font-size: 19px; }
  .card .band span { font-size: 13px; }
  .card .pw { font-size: 11px; padding: 0 6px 7px; }
  .you { gap: 8px; padding-bottom: 8px; }
  .center { min-height: 112px; padding-top: 8px; }
}
@media (max-width: 370px) {
  .seats { gap: 5px; }
  .seat { padding: 6px 3px; }
  .hand { min-height: 150px; }
  .card .pw { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- where the log sits (owner's setting: right, left, below or hidden) ---------- */
.game { display: flex; flex-direction: column; }
.status { order: 0; }
.table { order: 1; }
.you { order: 3; }
.feed { order: 4; }
/* beside the table when there's room; on a phone, straight under the table where the eye already is */
.log-side .feed { order: 2; }
.log-off .feed { display: none; }
@media (max-width: 899px) {
  /* A phone can't show the table, your cards and a long log at once. Show the newest line only,
     and clamp it to whole lines, capping the box's height clipped sentences in half.
     "Full log" has the rest. */
  .log-side .feed-head { min-height: 28px; }
  .log-side .feed-list .entry:not(:first-child) { display: none; }
  .log-side .feed-list .entry .line { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
/* A short phone has to fit the table, your cards and (in side mode) the log. Tighten everything a
   little rather than push the cards off the screen. */
@media (max-height: 720px) {
  .status { min-height: 28px; padding-bottom: 3px; }
  .table { padding: 6px 5px 8px; }
  .center { min-height: 76px; padding-top: 5px; }
  .you { gap: 5px; padding: 6px 10px 6px; margin-top: 8px; }
  .hand .card { flex-basis: 104px; max-width: 104px; }
  .feed { margin-top: 8px; }
  .log-side .feed-head { min-height: 24px; }
  .log-side .feed-list .entry .line { -webkit-line-clamp: 2; }
}
@media (min-width: 900px) {
  .app.log-side { max-width: 1140px; }
  .log-side .game { display: grid; column-gap: 16px; align-items: start;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    grid-template-areas: "status log" "table log" "you log"; }
  .log-left .game { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    grid-template-areas: "log status" "log table" "log you"; }
  .log-side .status { grid-area: status; }
  .log-side .table { grid-area: table; }
  .log-side .you { grid-area: you; }
  .log-side .feed { grid-area: log; margin-top: 0; position: sticky; top: 12px;
    max-height: calc(100vh - 24px); overflow-y: auto; }
}
