/*
 * The hand played: the product page's hero, a table drawn to the width it is given and timed over
 * sixteen seconds, and everything a reader can open on it - a seat's popup, a figure from every seat,
 * and a player's notes with the hand a note was taken on.
 *
 * The table's own sizes are in em, off a font size that is a share of the film's width, so the whole
 * picture scales like a video. What opens over it - the popup and the notes - opens in the browser's
 * top layer at the application's own sizes, so it reads as the felt reads whatever the table's size.
 * The colors that are not the theme's are the felt's literal ones (HudOverlay.xaml, ThePopupAsDrawn),
 * because a panel is drawn over a poker client, not over the application.
 */

.film { margin: 0; container: film / inline-size; }
.film__frame {
    position: relative; aspect-ratio: 16 / 11.5; overflow: hidden;
    font-size: 1.45cqw; border-radius: 22px;
    background: radial-gradient(ellipse at 50% 30%, var(--bg-raised), var(--bg-canvas) 75%);
    box-shadow: 0 0 0 1px var(--border-strong), 0 40px 90px -30px rgba(37, 198, 133, 0.35), 0 30px 60px -30px rgba(0, 0, 0, 0.8);
    transform: perspective(1600px) rotateY(-7deg) rotateX(3deg);
    transition: transform 600ms cubic-bezier(.2, .7, .2, 1);
}
.film__frame:hover { transform: none; }

.film__live, .film__hint {
    position: absolute; top: 1.4em; z-index: 3;
    display: inline-flex; align-items: center; gap: 0.6em; padding: 0.45em 0.9em; border-radius: 2em;
    font-size: max(0.95em, 11px); font-weight: 600;
}
.film__live { left: 1.4em; background: rgba(13, 17, 23, 0.7); border: 1px solid var(--border-strong); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-primary); }
.film__live::before { content: ""; width: 0.65em; height: 0.65em; border-radius: 50%; background: var(--status-loss); animation: film-blink 1.6s ease-in-out infinite; }
.film__hint { right: 1.4em; background: #102a26; border: 1px solid rgba(37, 198, 133, 0.45); color: var(--accent-primary); }
.film__hint::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 50%; background: currentColor; animation: film-ping 2s ease-out infinite; }

.film__felt {
    position: absolute; left: 10%; right: 10%; top: 15%; bottom: 25%; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 50% 40%, #1d6b51 0%, var(--bg-felt) 55%, #0a2a20 100%);
    box-shadow: 0 0 0 1.1em #1a2029, 0 0 0 1.25em var(--border-strong), inset 0 0 4em rgba(0, 0, 0, 0.55), 0 2em 4em rgba(0, 0, 0, 0.5);
}
.film__logo { font-size: 2.2em; font-weight: 700; letter-spacing: -0.02em; color: rgba(233, 238, 245, 0.13); }
.film__logo::before { content: "\2660 PokerLens"; }

/* ── A seat: its panel, the notes icon on its name bar, and the button where the dealer is ────── */

.film__seat { position: absolute; z-index: 2; transform: translate(-50%, -50%); }
.film__seat:hover, .film__seat:focus-within { z-index: 6; }
.film__seat--villain { left: 83%; top: 20%; animation: film-arrive 16s ease-in-out infinite; }
.film__seat--right-low { left: 85%; top: 64%; }
.film__seat--top { left: 50%; top: 9%; }
.film__seat--left-high { left: 17%; top: 20%; }
.film__seat--left-low { left: 15%; top: 64%; }

/* A HUD panel as the application draws one on the felt: the marker is the left edge. */
.film__panel {
    position: relative; width: 14em; padding: 0.5em 0.7em 0.55em; border-radius: 0.6em;
    display: flex; flex-direction: column; gap: 0.35em;
    text-align: left; color: var(--text-primary); cursor: pointer;
    background: rgba(20, 20, 20, 0.92); border: 1px solid #3a3a3a; border-left: 0.3em solid var(--text-muted);
    box-shadow: 0 0.6em 1.6em rgba(0, 0, 0, 0.45);
    transition: background 150ms ease, border-color 150ms ease;
}
.film__panel:hover { background: rgba(32, 32, 32, 0.97); border-top-color: #5a5a5a; border-right-color: #5a5a5a; border-bottom-color: #5a5a5a; }
.film__panel:has(.film__open:focus-visible) { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
/* The name bar is the button the panel is pressed through, stretched over the whole panel. */
.film__open { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.film__open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.film__open:focus-visible { outline: none; }
.film__panel--reg { border-left-color: var(--marker-reg); }
.film__panel--whale { border-left-color: var(--marker-whale); }
.film__panel--fish { border-left-color: var(--marker-fish); }
.film__name { display: flex; align-items: baseline; gap: 0.45em; padding-right: 2.6em; white-space: nowrap; }
.film__who { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: max(1.05em, 11px); font-weight: 600; color: #bfbfbf; }
.film__count { margin-left: auto; font-size: max(0.85em, 11px); font-weight: 600; color: #8a8a8a; }
.film__position { font-size: max(0.85em, 11px); font-weight: 600; color: #8a8a8a; }
.film__figures { display: flex; justify-content: space-between; }
/* Each statistic is a button of its own above the stretched name bar: pressed, it opens the popup too. */
.film__cell {
    z-index: 1; display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
    font-family: inherit; font-size: max(0.7em, 11px); font-weight: 600; letter-spacing: 0.06em; text-align: left; color: var(--text-muted);
}
.film__cell:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; border-radius: 0.2em; }
.film__cell > b { font-size: max(1.9em, 14px); letter-spacing: -0.01em; color: var(--text-primary); transition: color 120ms ease; }
.film__cell:hover > b, .film__cell:focus-visible > b { color: var(--accent-primary); }
.film__at-seat { display: none; }

.film__notes {
    position: absolute; z-index: 1; top: 0.5em; right: 0.6em;
    display: inline-flex; align-items: center; gap: 0.25em; padding: 0.1em 0.15em; border: 0; border-radius: 0.3em;
    background: none; cursor: pointer; color: var(--accent-primary); font: 700 max(0.85em, 11px)/1 "Inter", sans-serif;
}
.film__notes svg { width: 1.15em; height: 1.15em; }
.film__notes--none { color: #bfbfbf; }
.film__notes--none svg { opacity: 0.35; }
.film__notes:hover svg, .film__notes:focus-visible svg { opacity: 1; }
.film__notes:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 1px; }
.film__seat--villain .film__notes { animation: film-notes-glow 16s ease-in-out infinite; }

.film__dealer {
    position: absolute; left: -1.1em; bottom: -0.9em;
    width: 1.8em; height: 1.8em; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--card-face); color: var(--card-pip-black); font-size: max(0.9em, 11px); font-weight: 700;
    box-shadow: 0 0.2em 0.5em rgba(0, 0, 0, 0.5);
}

/* The latest note, read by stopping on the icon; green where there is one, quiet where there is none. */
.film-notes-tip {
    display: none; position: absolute; top: calc(100% + 0.5em); right: -0.4em; width: 19em;
    padding: 0.6em 0.8em; border-radius: 0.5em; background: rgba(20, 20, 20, 0.96); border: 1px solid var(--accent-primary);
    box-shadow: 0 0.8em 2em rgba(0, 0, 0, 0.55); color: #fff; font-size: max(1.15em, 12px); font-weight: 500; line-height: 1.4; text-align: left; white-space: normal;
}
.film__notes--none .film-notes-tip { border-color: #3a3a3a; color: #bfbfbf; }
.film__notes:hover .film-notes-tip, .film__notes:focus-visible .film-notes-tip { display: block; }
.film__seat--left-high .film-notes-tip, .film__seat--left-low .film-notes-tip { right: auto; left: -12em; }

/* A figure from every seat (HUD-35): beside the panel, right first, left where the panel is on the right. */
.film-tip {
    display: none; position: absolute; z-index: 3; top: 0; left: calc(100% + 0.5em);
    flex-direction: column; gap: 0.3em; width: max-content; padding: 0.6em 0.75em; border-radius: 0.45em;
    background: rgba(20, 20, 20, 0.97); border: 1px solid #3a3a3a; box-shadow: 0 0.8em 2em rgba(0, 0, 0, 0.55);
    font-size: max(1.43em, 12px); font-weight: 500; letter-spacing: normal; color: #fff; text-align: left;
}
.film__seat--villain .film-tip, .film__seat--right-low .film-tip { left: auto; right: calc(100% + 0.5em); }
.film__cell:hover .film-tip, .film__cell:focus-visible .film-tip { display: flex; }
.film-tip__head { margin-bottom: 0.2em; font-size: 0.95em; color: rgba(255, 255, 255, 0.7); }
.film-tip__head b { color: #fff; }
.film-tip__bar { display: grid; grid-template-columns: 2.6em 7em 2.8em auto; align-items: center; gap: 0.5em; font-size: 0.92em; }
.film-tip__bar--thin { opacity: 0.45; }
.film-tip__seat { font-weight: 600; color: #bfbfbf; }
.film-tip__track { height: 0.5em; border-radius: 0.25em; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.film-tip__track span { display: block; height: 100%; border-radius: 0.25em; background: var(--accent-primary); }
.film-tip__figure { font-weight: 600; text-align: right; }
.film-tip__sample { font-size: max(0.9em, 11px); color: #8a8a8a; }

/* ── The hand on the felt ─────────────────────────────────────────────────── */

.film__note {
    position: absolute; z-index: 3; left: 58%; top: 33%; width: 19em; transform: translateX(-50%);
    padding: 0.8em 1em; border-radius: 0.9em; display: flex; flex-direction: column; gap: 0.4em;
    background: rgba(29, 37, 48, 0.96); border: 1px solid rgba(48, 164, 108, 0.6);
    box-shadow: 0 1em 2.5em rgba(0, 0, 0, 0.55), 0 0 2em rgba(48, 164, 108, 0.25);
    font-size: max(1.1em, 11px); font-weight: 500; line-height: 1.45; color: var(--text-primary);
    opacity: 0; pointer-events: none; animation: film-note 16s ease-in-out infinite;
}
.film__note-day { display: inline-flex; align-items: center; gap: 0.4em; font-size: max(0.75em, 11px); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-primary); }
.film__note-day .icon { width: 1.3em; height: 1.3em; }

.film__hero { position: absolute; z-index: 2; left: 50%; top: 70%; transform: translate(-50%, -50%); display: flex; align-items: flex-end; gap: 0.35em; }
.film__card {
    width: 3.2em; height: 4.4em; border-radius: 0.45em; padding: 0.3em 0.4em;
    display: flex; flex-direction: column; line-height: 1;
    background: var(--card-face); color: var(--card-pip-black); font-size: max(1.15em, 11px); font-weight: 700;
    box-shadow: 0 0.5em 1.2em rgba(0, 0, 0, 0.5);
    animation: film-peek 16s ease-in-out infinite;
}
.film__card small { font-size: 1.1em; }
.film__card--red { color: var(--card-pip-red); transform: rotate(-6deg); }
.film__card + .film__card { transform: rotate(6deg); }
.film__seat-name { margin-left: 0.4em; padding: 0.25em 0.6em; border-radius: 1em; background: rgba(13, 17, 23, 0.8); border: 1px solid var(--border-strong); font-size: max(0.9em, 11px); font-weight: 600; }

.film__chip {
    position: absolute; z-index: 2; width: 1.7em; height: 1.7em; border-radius: 50%; opacity: 0; pointer-events: none;
    background: repeating-conic-gradient(var(--chip-five) 0 30deg, var(--chip-one) 30deg 45deg);
    box-shadow: inset 0 0 0 0.3em var(--chip-five), 0 0.3em 0.6em rgba(0, 0, 0, 0.5);
    left: var(--from-left); top: var(--from-top);
}
.film__chip--limp { --from-left: 79%; --from-top: 29%; --to-left: 55%; --to-top: 48%; animation: film-chip-limp 16s ease-in-out infinite; }
.film__chip--raise { --from-left: 49%; --from-top: 60%; --to-left: 46%; --to-top: 49%; animation: film-chip-raise 16s ease-in-out infinite; }
.film__chip--second { --from-left: 51%; --to-left: 48.5%; --to-top: 47%; }

.film__captions {
    position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; height: 22%; pointer-events: none;
    background: linear-gradient(transparent, rgba(8, 12, 17, 0.92) 55%);
}
.film__caption {
    position: absolute; left: 6%; right: 6%; bottom: 1.6em; text-align: center; text-wrap: balance;
    font-size: 1.75em; font-weight: 600; letter-spacing: -0.01em; color: #fff;
    opacity: 0; animation: film-caption 16s ease-in-out infinite backwards;
}
.film__caption:nth-child(2) { animation-delay: 4s; }
.film__caption:nth-child(3) { animation-delay: 8s; }
.film__caption:nth-child(4) { animation-delay: 12s; }
.film__progress { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(233, 238, 245, 0.12); }
.film__progress span { display: block; height: 100%; width: 0; background: var(--accent-primary); animation: film-progress 16s linear infinite; }

/* The film holds still while a reader stops on a seat or has anything open over the table. */
.film:has(:popover-open) .film__frame *,
.film:has(.film__seat:hover) .film__frame * { animation-play-state: paused; }
.film:has(:popover-open) .film-tip, .film:has(:popover-open) .film-notes-tip { display: none; }

@keyframes film-blink { 50% { opacity: 0.3; } }
@keyframes film-ping { 0% { box-shadow: 0 0 0 0 rgba(37, 198, 133, 0.6); } 70%, 100% { box-shadow: 0 0 0 0.6em rgba(37, 198, 133, 0); } }
@keyframes film-progress { to { width: 100%; } }
@keyframes film-arrive {
    0% { opacity: 0; translate: 0 -0.8em; scale: 0.95; }
    5%, 94% { opacity: 1; translate: 0 0; scale: 1; }
    100% { opacity: 0; }
}
@keyframes film-mark {
    0%, 27% { border-left-color: var(--text-muted); box-shadow: 0 0.6em 1.6em rgba(0, 0, 0, 0.45); }
    31% { border-left-color: var(--marker-fish); box-shadow: 0 0 0 0.3em rgba(48, 164, 108, 0.35), 0 0 2.5em rgba(48, 164, 108, 0.5); }
    42%, 100% { border-left-color: var(--marker-fish); box-shadow: 0 0 1.4em rgba(48, 164, 108, 0.3); }
}
.film__seat--villain .film__panel { animation: film-mark 16s ease-in-out infinite; }
@keyframes film-notes-glow {
    0%, 27%, 45%, 100% { filter: none; }
    31% { filter: drop-shadow(0 0 0.5em var(--accent-primary)); }
}
@keyframes film-note {
    0%, 27% { opacity: 0; transform: translateX(-50%) translateY(0.8em) scale(0.96); }
    31%, 72% { opacity: 1; transform: translateX(-50%); }
    76%, 100% { opacity: 0; transform: translateX(-50%) translateY(-0.4em); }
}
@keyframes film-chip-limp {
    0%, 50% { opacity: 0; left: var(--from-left); top: var(--from-top); }
    53% { opacity: 1; left: var(--from-left); top: var(--from-top); }
    61%, 94% { opacity: 1; left: var(--to-left); top: var(--to-top); }
    98%, 100% { opacity: 0; left: var(--to-left); top: var(--to-top); }
}
@keyframes film-chip-raise {
    0%, 76% { opacity: 0; left: var(--from-left); top: var(--from-top); }
    79% { opacity: 1; left: var(--from-left); top: var(--from-top); }
    87%, 94% { opacity: 1; left: var(--to-left); top: var(--to-top); }
    98%, 100% { opacity: 0; left: var(--to-left); top: var(--to-top); }
}
@keyframes film-peek { 0%, 74%, 92%, 100% { translate: 0 0; } 78%, 88% { translate: 0 -0.5em; } }
@keyframes film-caption {
    0% { opacity: 0; transform: translateY(0.6em); }
    3%, 22% { opacity: 1; transform: none; }
    25%, 100% { opacity: 0; transform: translateY(-0.4em); }
}

/* ── What opens over the table: a seat's popup and a player's notes ────────────────────────── */

.film-popup, .film-notes {
    margin: 0; padding: 7px 10px 9px; border-radius: 6px; color: #fff;
    background: rgba(20, 20, 20, 0.97); border: 1px solid #3a3a3a; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
    font: 500 13px/1.4 "Inter", system-ui, sans-serif;
}
.film-popup--fish, .film-notes__dot--fish { --seat-marker: var(--marker-fish); }
.film-popup--reg, .film-notes__dot--reg { --seat-marker: var(--marker-reg); }
.film-popup--whale, .film-notes__dot--whale { --seat-marker: var(--marker-whale); }
.film-popup--unknown, .film-notes__dot--unknown { --seat-marker: var(--text-muted); }
.film-popup { width: 300px; border-color: var(--seat-marker); }
.film-popup__head { display: flex; align-items: center; gap: 7px; height: 28px; }
.film-popup__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--seat-marker); }
.film-popup__who { flex: 1; font-weight: 600; color: #e9eef5; }
.film-popup__hands { font-size: 12px; color: #8a8a8a; }
.film-popup__close {
    width: 26px; height: 26px; border: 0; border-radius: 6px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; color: #8a8a8a; cursor: pointer;
}
.film-popup__close svg { width: 15px; height: 15px; }
.film-popup__close:hover, .film-popup__close:focus-visible { background: #2a2a2a; color: #fff; }
.film-popup__tabs { display: flex; flex-wrap: wrap; gap: 3px; margin: 4px 0 6px; }
.film-popup__tab { position: relative; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; color: #8a8a8a; cursor: pointer; text-transform: capitalize; }
.film-popup__tab input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.film-popup__tab:hover { color: #fff; }
.film-popup__tab:has(input:checked) { background: var(--bg-raised); color: #fff; }
.film-popup__tab:has(input:focus-visible) { outline: 2px solid var(--accent-primary); }
.film-popup__rows { display: none; }
.film-popup:has(input[value="preflop"]:checked) [data-street="preflop"],
.film-popup:has(input[value="flop"]:checked) [data-street="flop"],
.film-popup:has(input[value="turn"]:checked) [data-street="turn"],
.film-popup:has(input[value="river"]:checked) [data-street="river"],
.film-popup:has(input[value="hands"]:checked) [data-street="hands"] { display: block; }
.film-popup__row { display: grid; grid-template-columns: 1fr 72px 56px; align-items: center; height: 24px; }
.film-popup__row span:first-child { color: #bfbfbf; }
.film-popup__row b { font-size: 14px; text-align: right; }
.film-popup__row span:last-child { font-size: 12px; color: #8a8a8a; text-align: right; }
.film-popup__shown { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; align-items: center; height: 26px; font-size: 12.5px; font-weight: 600; }
.film-popup__board { font-size: 11.5px; color: #bfbfbf; }
.film-popup__lost { color: var(--status-loss); }
.film-popup__won { color: var(--status-win); }
.film-cards span + span { margin-left: 0.3em; }
.film-cards__red { color: #ff5c61; }

.film-notes { width: 420px; max-width: calc(100vw - 24px); max-height: min(80vh, 660px); overflow: auto; padding: 10px 12px 12px; }
.film-notes__head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid #2a2a2a; }
.film-notes__head b { flex: 1; font-weight: 600; color: #e9eef5; }
.film-notes__title { margin-right: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-primary); }
.film-notes__empty { padding: 6px 2px; font-size: 13px; line-height: 1.55; color: var(--text-secondary); }
.film-notes__row { display: flex; flex-direction: column; gap: 9px; padding: 10px 12px; border-radius: 8px; background: var(--bg-surface); border: 1px solid var(--border-subtle); }
.film-notes__row + .film-notes__row { margin-top: 8px; }
.film-notes__row--hand { border-color: rgba(48, 164, 108, 0.55); box-shadow: 0 0 24px rgba(48, 164, 108, 0.12); }
.film-notes__when { display: flex; align-items: center; gap: 10px; }
.film-notes__on { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--accent-primary); }
.film-notes__on .icon { width: 13px; height: 13px; }
.film-notes__stood { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 11.5px; color: var(--text-secondary); text-transform: lowercase; }
.film-notes__stood .film-cards, .film-notes__lettering { font-weight: 600; color: #fff; text-transform: none; }
.film-notes__text { font-size: 14px; font-weight: 500; line-height: 1.5; color: #fff; }

/* The hand as it played: a street a line, every seat in the color of its position, the player underlined. */
.film-hand { display: flex; flex-direction: column; gap: 6px; padding: 9px 10px; border-radius: 6px; background: #121212; border: 1px solid #262626; font-size: 11.5px; }
.film-hand__dealt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-bottom: 6px; border-bottom: 1px dashed #2a2a2a; font-weight: 600; }
.film-hand__dealt .film-hand__seat + b { margin-right: 2px; }
.film-hand__dealt .film-cards { margin-right: 10px; }
.film-hand__street { display: grid; grid-template-columns: 50px 72px 1fr; gap: 6px; align-items: baseline; }
.film-hand__name { font-size: 11px; font-weight: 600; color: #929292; text-transform: capitalize; }
.film-hand__board { font-weight: 600; }
.film-hand__actions { display: flex; flex-wrap: wrap; gap: 3px 9px; }
.film-hand__action { white-space: nowrap; font-weight: 600; color: #d8dde3; }
.film-hand__action--subject { border-bottom: 2px solid var(--accent-primary); padding-bottom: 1px; }
.film-hand__seat { margin-right: 3px; font-size: 11px; font-weight: 700; }
.film-hand__seat--utg { color: #9aa7b6; }
.film-hand__seat--hj { color: #5c99dc; }
.film-hand__seat--co { color: #a57ff0; }
.film-hand__seat--btn { color: #25c685; }
.film-hand__seat--sb { color: #f5a524; }
.film-hand__seat--bb { color: #ff6b6f; }

/* Where the browser can tie a popover to the panel that opened it, it opens beside that panel. */
@supports (anchor-name: --a) {
    .film-popup, .film-notes {
        inset: auto; margin: 8px; position-area: bottom span-right;
        position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
    }
}

/* A table at rest: the same table on a feature page, set down with nothing playing on it. */
.film--still .film__frame { transform: none; aspect-ratio: 16 / 10; }
.film--still .film__felt { bottom: 16%; }
.film--still .film__hero { top: 77%; }
.film--still .film__seat--left-low, .film--still .film__seat--right-low { top: 66%; }
.film--still .film__seat--villain, .film--still .film__seat--villain .film__panel, .film--still .film__notes, .film--still .film__card { animation: none; }
.film--still .film__seat--villain .film__panel { border-left-color: var(--marker-fish); }

/* ── Tablets and phones ────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .film__frame { transform: none; }
}

/* On a phone what opens over the table opens in the middle of the screen, where a thumb can reach it. */
@media (max-width: 640px) {
    .film-popup, .film-notes { position-area: none; inset: 0; margin: auto; }
}

/* On a phone the table stands taller, its seats close in, and the seat at the top steps away. */
@container film (max-width: 560px) {
    .film__frame { aspect-ratio: 4 / 5; font-size: 2.75cqw; }
    .film__live { display: none; }
    .film__hint { left: 50%; right: auto; translate: -50% 0; white-space: nowrap; }
    .film__felt { left: 7%; right: 7%; top: 22%; bottom: 30%; }
    .film__seat--top { display: none; }
    .film__seat--villain { left: 71%; top: 21%; }
    .film__seat--left-high { left: 29%; top: 21%; }
    .film__seat--left-low { left: 25%; top: 58%; }
    .film__seat--right-low { left: 75%; top: 58%; }
    .film--still .film__frame { aspect-ratio: 1 / 1; }
    .film--still .film__felt { bottom: 22%; }
    .film--still .film__hero { top: 74%; }
    .film--still .film__seat--left-low, .film--still .film__seat--right-low { top: 60%; }
    .film__hero { top: 69%; }
    .film__note { left: 50%; top: 33%; width: 24em; }
    .film__chip--limp { --from-left: 68%; --from-top: 28%; --to-left: 53%; --to-top: 43%; }
    .film__chip--raise { --from-top: 63%; --to-top: 45%; }
    .film__captions { height: 20%; }
    .film__caption { font-size: 1.6em; bottom: 1.2em; }
}

/* ── For a reader who asks for less motion: the moment the note comes back, standing still ──── */

@media (prefers-reduced-motion: reduce) {
    .film *, .film *::before { animation: none !important; }
    .film__frame { transition: none; }
    .film__seat--villain .film__panel { border-left-color: var(--marker-fish); }
    .film__note { opacity: 1; }
    .film__caption:nth-child(2) { opacity: 1; }
    .film__chip, .film__progress { display: none; }
}
