/* This page uses the viewport instead of the blog's reading-column width. */
.dd-page { width: 100%; max-width: none; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) max(clamp(8px, 1.7vw, 32px), env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(clamp(8px, 1.7vw, 32px), env(safe-area-inset-left)); box-sizing: border-box; }
.dd-page > p:not(.dd-note) { max-width: 80ch; }
.dd-page-body { -webkit-text-size-adjust: 100%; }
/* Scoped to the 1v1, face-up puzzle. Its two hands always remain visible. */
.dd-table { --game-toolbar-bg: #164f59; --dd-gold: #f7d285; --dd-card-width: clamp(76px, 6vw, 112px); isolation: isolate; display: flex; flex-direction: column; min-height: min(720px, 78svh); padding: 20px 22px 24px; border: 1px solid #ba9d62; border-radius: 22px; background: radial-gradient(ellipse at 50% 38%, #29878a 0, #175660 46%, #103440 100%); box-shadow: 0 18px 44px #15384925, inset 0 0 0 4px #0b35475e, inset 0 0 70px #081f3790; color: #fff5dd; }
.dd-table::before { content: ''; position: absolute; z-index: -1; inset: 145px 35px 140px; border: 1px solid #e4c78228; border-radius: 50%; pointer-events: none; }
.dd-table [hidden] { display: none !important; }
.dd-table .dd-topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.dd-table .dd-room { color: #ffe2a7; font-size: 17px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.dd-table .dd-room > span { font-size: 24px; color: #e8c378; vertical-align: -1px; margin-right: 4px; }
.dd-table .dd-room small { margin-left: 8px; color: #c5ded8; font-size: 11px; font-weight: 400; letter-spacing: 0; }
.dd-table .dd-progress { margin-left: auto; color: #d0e2da; font-size: 11px; white-space: nowrap; }
.dd-table .dd-restart, .dd-table .dd-fullscreen { min-height: 44px; padding: 8px 12px; border: 1px solid #cce0d54d; border-radius: 9px; background: #092f425c; color: #d5e7e0; font-size: 13px; white-space: nowrap; }
.dd-table .dd-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); flex: 0 0 auto; gap: 6px; padding: 10px; margin-bottom: 19px; border: 1px solid #deba7233; border-radius: 12px; background: linear-gradient(120deg, #082d4180, #133e4580); }
.dd-table .dd-levels button { flex: 1 0 44px; min-width: 44px; min-height: 44px; border: 1px solid #8cb3b223; border-radius: 8px; background: #082e354d; color: #dceee5; }
.dd-table .dd-levels button.is-on { border-color: #ffe1a1; background: linear-gradient(#ffe8b3, #e5bf72); color: #633f16; font-weight: 800; box-shadow: 0 2px 6px #08293760; }
.dd-table .dd-levels button.is-cleared { box-shadow: inset 0 -3px 0 #85d7b8; }
.dd-table .dd-seat { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 20px; flex: 1 0 auto; align-items: center; position: relative; }
.dd-table .dd-seat-profile { text-align: center; min-width: 0; }
.dd-table .dd-avatar { width: 84px; height: 84px; box-sizing: border-box; position: relative; margin: 0 auto 12px; padding: 3px; border: 2px solid #f0cb7a; border-radius: 23px; background: linear-gradient(135deg, #f8dfa1, #ad7533 48%, #ffe6a1); box-shadow: 0 5px 14px #041e385f, inset 0 0 0 2px #6b5023; transition: box-shadow .18s ease; }
.dd-table .dd-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border: 1px solid #72592e; border-radius: 17px; }
.dd-table .dd-avatar-badge { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); white-space: nowrap; border: 1px solid #e7c375; border-radius: 12px; padding: 1px 9px; background: linear-gradient(#635b38, #393d2c); color: #fff1c4; font-size: 9px; line-height: 1.4; }
.dd-table .dd-avatar-you .dd-avatar-badge { background: linear-gradient(#326571, #204857); }
.dd-table .dd-seat.is-turn .dd-avatar, .dd-table .dd-seat.is-winner .dd-avatar { box-shadow: 0 0 0 3px #f4d78544, 0 0 28px #f8d17870; }
.dd-table .dd-label { display: flex; align-items: center; justify-content: center; gap: 5px; color: #fff4db; font-weight: 750; font-size: 14px; }
.dd-table .dd-role { font-size: 10px; color: #b5cfcb; font-weight: 400; }
.dd-table .dd-hand-count { display: block; color: #f7e3b1; font-size: 12px; margin-top: 3px; font-weight: 700; }
.dd-table .dd-seat-state { display: block; min-height: 18px; color: #bad4cb; font-size: 10px; margin-top: 2px; }
.dd-table .dd-seat.is-turn .dd-seat-state, .dd-table .dd-seat.is-winner .dd-seat-state { color: #ffe29f; }
.dd-table .dd-open-badge { display: inline-block; margin-top: 4px; border: 1px solid #b8dcd433; border-radius: 10px; padding: 2px 8px; color: #c7dfd5; font-size: 9px; }
.dd-table .dd-select-help { display: block; margin-top: 7px; color: #abcac6; font-size: 9px; line-height: 1.7; }
.dd-table .dd-hand-area { min-width: 0; }
.dd-table .dd-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 16px 7px; min-height: calc(var(--dd-card-width) * 1.43 + 26px); padding: 16px 2px 8px; margin: 0; }
.dd-table .dd-opponent-seat { padding: 0 0 10px; }
.dd-table .dd-player-seat { padding-top: 16px; border-top: 1px solid #cfdaaf24; }
.dd-table .dd-player-seat .dd-row { padding-top: 20px; touch-action: pan-y; }
.dd-table .pcard { display: block; position: relative; box-sizing: border-box; width: var(--dd-card-width); flex: 0 0 var(--dd-card-width); height: calc(var(--dd-card-width) * 1.43); aspect-ratio: auto; padding: 0; overflow: hidden; border: 1px solid #cbbd98; border-radius: 7px; color: #17283d; background: linear-gradient(125deg, #fff 15%, #fffdf5 65%, #ede7da); box-shadow: 1px 3px 5px #001b3d55; font-family: Arial, Helvetica, sans-serif; transition: transform .12s ease, box-shadow .12s ease; -webkit-tap-highlight-color: transparent; touch-action: pan-y; }
.dd-table .pcard.red { color: #ce273c; }
.dd-table .pcard > * { pointer-events: none; }
/* One proportional coordinate system for hand cards and played cards.
   Lining/tabular numerals and a fixed rank box keep 10 at the same size as 2–9. */
.dd-table .dd-corner { position: absolute; left: 4%; top: 4%; width: 34%; display: flex; flex-direction: column; align-items: center; z-index: 1; line-height: 1; }
.dd-table .pcard .dd-corner b { display: block; width: 100%; height: calc(var(--dd-card-width) * .31); font: 700 calc(var(--dd-card-width) * .27) / 1 Arial, Helvetica, sans-serif; font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; letter-spacing: -.04em; text-align: left; }
.dd-table .pcard .dd-corner i { display: block; width: 100%; height: calc(var(--dd-card-width) * .23); font: normal calc(var(--dd-card-width) * .22) / 1 Georgia, 'Times New Roman', serif; text-align: left; }
.dd-table .dd-corner-bottom { left: auto; top: auto; right: 4%; bottom: 4%; transform: rotate(180deg); }
.dd-table .dd-pips { position: absolute; inset: 17% 24%; }
.dd-table .dd-pip { position: absolute; font: calc(var(--dd-card-width) * .17) / 1 Georgia, 'Times New Roman', serif; transform: translate(-50%, -50%); }
.dd-table .dd-pip.is-flipped { transform: translate(-50%, -50%) rotate(180deg); }
.dd-table .dd-ace { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: calc(var(--dd-card-width) * .57) / 1 Georgia, 'Times New Roman', serif; text-shadow: 0 2px 1px #9d90742b; }
.dd-table .dd-court { position: absolute; left: 50%; top: 50%; width: 50%; height: auto; aspect-ratio: 98 / 166; transform: translate(-50%, -50%); object-fit: contain; border: 1px solid #cab77775; border-radius: 2px; background: #f7ecd8; }
.dd-table .pcard.is-selected { outline: 2px solid #ffd269; outline-offset: 1px; transform: translateY(-10px); background: linear-gradient(#fff8db, #fffdf3 55%, #f1e5c2); box-shadow: 0 0 11px #ffda7055, 1px 5px 7px #061d39aa; }
.dd-table .pcard:disabled { opacity: 1; cursor: default; }
.dd-table .pcard.dd-joker { color: #315794; background: radial-gradient(ellipse at 50% 48%, #fff 20%, #e7eefb); }
.dd-table .pcard.dd-joker-big { color: #ba314b; background: radial-gradient(ellipse at 50% 48%, #fff9ee 20%, #ffe3d4); }
.dd-table .dd-joker-name { position: absolute; left: 6%; top: 4%; height: calc(var(--dd-card-width) * .31); font: 700 calc(var(--dd-card-width) * .27) / 1 Arial, Helvetica, sans-serif; white-space: nowrap; }
.dd-table .dd-joker-mark { position: absolute; left: 50%; top: 50%; width: 66%; height: 48%; transform: translate(-50%, -50%); fill: none; stroke: currentColor; stroke-width: 1.7; }
.dd-table .dd-joker-mark .dd-joker-gem { fill: currentColor; stroke: none; }
.dd-table .dd-joker-word { position: absolute; bottom: 6%; width: 100%; left: 0; text-align: center; font: 700 calc(var(--dd-card-width) * .12) / 1 sans-serif; letter-spacing: .12em; }
.dd-table .dd-table-mark { display: flex; justify-content: center; align-items: center; gap: 16px; min-height: 66px; margin: 4px 0 0; color: #dfe4be88; font: 800 27px 'STKaiti', 'KaiTi', serif; letter-spacing: .14em; text-shadow: 0 2px #04354140; }
.dd-table .dd-table-mark small { display: block; margin-top: 4px; text-align: center; font: 10px sans-serif; letter-spacing: .17em; color: #c6d9c477; }
.dd-table .dd-deck-emblem { display: block; position: relative; width: 39px; height: 51px; transform: rotate(-9deg); opacity: .8; }
.dd-table .dd-deck-emblem img { position: absolute; width: 33px; height: 46px; object-fit: contain; filter: drop-shadow(0 2px 2px #08243877); }
.dd-table .dd-deck-emblem img + img { left: 8px; top: 2px; transform: rotate(17deg); }
.dd-table .dd-trick { --dd-card-width: clamp(60px, 4.5vw, 80px); min-height: calc(var(--dd-card-width) * 1.43 + 40px); flex-wrap: wrap; column-gap: 6px; row-gap: 9px; margin: 8px 0 15px; padding: 12px 10px; border-radius: 15px; background: #072d362b; border: 1px solid #c2dbc320; color: #dae5cd; font-size: 14px; }
.dd-table .dd-trick > span { flex-basis: 100%; text-align: center; font-size: 12px; color: #d8e6d4; }
.dd-table .dd-action-area { min-height: 104px; text-align: center; margin: 0 auto 5px; }
.dd-table .dd-actions, .dd-table .dd-result-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 auto 11px; }
.dd-table .dd-actions button, .dd-table .dd-result-actions button { min-width: 100px; min-height: 46px; padding: 10px 17px; border: 1px solid #eed59a; border-radius: 24px; background: linear-gradient(#fff9e7, #e6d1a1); box-shadow: inset 0 2px #ffffff9c, 0 4px #08273d66; color: #644d2c; font-size: 15px; font-weight: 800; }
.dd-table button.dd-primary { background: linear-gradient(#ffe4a0, #f0b958); color: #693c15; border-color: #fadb89; }
.dd-table .dd-actions button.is-suggested { outline: 2px solid #ffe7a3; outline-offset: 3px; }
.dd-table button:not(:disabled) { cursor: pointer; }
.dd-table button:not(.pcard):disabled { opacity: .42; cursor: default; box-shadow: none; }
.dd-table button:not(:disabled):hover { filter: brightness(1.08); }
.dd-table button:focus-visible { outline: 3px solid #ffecab; outline-offset: 3px; }
.dd-table .dd-status { color: #eff4dc; font-size: 12px; min-height: 18px; margin: 0; }
.dd-table .dd-hint-text { min-height: 20px; margin: 5px 0 0; color: #c4ded1; font-size: 12px; line-height: 1.6; }
.dd-table .dd-result { margin: 0 0 10px; }
.dd-table .dd-result strong { display: block; color: #ffe09a; font-size: 27px; font-weight: 800; }
.dd-table .dd-result > span { display: block; margin: 5px 0 15px; color: #d6e5d9; font-size: 12px; }
.dd-table .dd-dialog { width: min(380px, calc(100vw - 32px)); padding: 25px; border: 1px solid #d8b674; border-radius: 17px; background: #fffaf0; color: #294344; box-shadow: 0 15px 70px #071d46aa; }
.dd-table .dd-dialog::backdrop { background: #062d38bf; backdrop-filter: blur(3px); }
.dd-table .dd-dialog h2 { margin: 0 0 12px; font-size: 21px; font-weight: 800; }
.dd-table .dd-dialog p { color: #5d7170; font-size: 14px; line-height: 1.7; }
.dd-table .dd-dialog > div { display: flex; gap: 10px; margin-top: 23px; }
.dd-table .dd-dialog button { flex: 1; min-height: 44px; border-radius: 9px; padding: 10px 8px; background: #e3ebe5; font-size: 13px; }
.dd-table .dd-dialog #dd-restart-confirm { color: #67461d; background: #efd8a5; }
.dd-table .dd-dialog button:focus-visible { outline-color: #356963; }

@media (max-width: 760px) {
    .dd-page { padding-top: max(16px, env(safe-area-inset-top)); }
    .dd-table { --dd-card-width: 68px; padding: 14px 12px 19px; border-radius: 16px; min-height: 0; }
    .dd-table::before { inset: 150px 15px 150px; }
    .dd-table .dd-topbar { gap: 6px 8px; margin-bottom: 11px; }
    .dd-table .dd-room { flex: 1 0 100%; font-size: 17px; }
    .dd-table .dd-room > span { font-size: 22px; }
    .dd-table .dd-room small { font-size: 12px; }
    .dd-table .dd-progress { order: 3; width: 100%; margin: 0; font-size: 12px; }
    .dd-table .dd-restart, .dd-table .dd-fullscreen { font-size: 13px; padding: 8px 10px; }
    .dd-table .dd-restart { margin-left: auto; }
    .dd-table .dd-levels { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 5px; padding: 7px; margin-bottom: 12px; scrollbar-width: thin; scroll-padding-inline: 7px; }
    .dd-table .dd-levels button { flex: 0 0 44px; }
    .dd-table .dd-seat { display: block; }
    .dd-table .dd-seat-profile { display: flex; align-items: center; gap: 11px; text-align: left; min-height: 62px; }
    .dd-table .dd-avatar { flex: 0 0 56px; width: 56px; height: 56px; margin: 0 0 6px; border-radius: 16px; padding: 2px; }
    .dd-table .dd-avatar img { border-radius: 11px; }
    .dd-table .dd-avatar-badge { font-size: 8px; }
    .dd-table .dd-label { justify-content: flex-start; font-size: 14px; }
    .dd-table .dd-hand-count { font-size: 13px; margin-top: 1px; }
    .dd-table .dd-seat-state { font-size: 12px; margin-top: 0; }
    .dd-table .dd-open-badge, .dd-table .dd-select-help { margin: 0 0 0 auto; text-align: right; font-size: 11px; }
    .dd-table .dd-row { gap: 16px 6px; padding: 13px 2px 6px; }
    .dd-table .dd-player-seat .dd-row { padding-top: 17px; }
    .dd-table .dd-opponent-seat { padding-bottom: 0; }
    .dd-table .dd-table-mark { min-height: 44px; font-size: 23px; gap: 13px; margin-top: 5px; }
    .dd-table .dd-table-mark small { font-size: 10px; }
    .dd-table .dd-deck-emblem { width: 33px; height: 43px; }
    .dd-table .dd-deck-emblem img { width: 28px; height: 39px; }
    .dd-table .dd-trick { --dd-card-width: 54px; min-height: 106px; padding: 10px 6px; gap: 7px 5px; margin-bottom: 12px; }
    .dd-table .dd-player-seat { padding-top: 12px; }
    .dd-table .dd-actions, .dd-table .dd-result-actions { gap: 9px; }
    .dd-table .dd-actions button, .dd-table .dd-result-actions button { min-width: 78px; padding: 9px 14px; font-size: 16px; }
    .dd-table .dd-status, .dd-table .dd-hint-text { font-size: 13px; }
    .dd-table .dd-result strong { font-size: 24px; }
}
@media (max-width: 520px) {
    .dd-table { --dd-card-width: 64px; padding-inline: 10px; }
}
@media (max-width: 360px) {
    .dd-table { --dd-card-width: 60px; }
    .dd-table .dd-row { column-gap: 5px; }
    .dd-table .dd-actions { gap: 7px; }
    .dd-table .dd-actions button { min-width: 72px; padding: 9px 12px; }
    .dd-table .dd-select-help { font-size: 10px; }
}
/* Landscape uses two facing hands, keeping play controls close to your cards.
   A long hand can scroll sideways instead of shrinking its rank labels. */
@media (orientation: landscape) and (max-height: 560px) {
    .dd-table { --dd-card-width: 72px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "top top" "levels levels" "opp you" "trick actions" "mark mark"; gap: 8px 14px; align-content: start; min-height: 0; }
    .dd-table .dd-topbar { grid-area: top; gap: 6px; margin: 0; }
    .dd-table .dd-room { flex: 0 1 auto; font-size: 15px; }
    .dd-table .dd-room small { font-size: 10px; }
    .dd-table .dd-progress { order: 0; width: auto; margin-left: auto; font-size: 11px; }
    .dd-table .dd-restart, .dd-table .dd-fullscreen { margin: 0; font-size: 12px; padding: 8px; }
    .dd-table .dd-levels { grid-area: levels; display: flex; flex-wrap: nowrap; min-width: 0; min-height: 66px; overflow-x: auto; overflow-y: hidden; gap: 5px; padding: 6px; margin: 0; scrollbar-width: thin; }
    .dd-table .dd-levels button { flex: 0 0 44px; }
    .dd-table .dd-seat { display: block; min-width: 0; padding: 0; border: 0; }
    .dd-table .dd-opponent-seat { grid-area: opp; }
    .dd-table .dd-player-seat { grid-area: you; }
    .dd-table .dd-seat-profile { display: flex; align-items: center; gap: 7px; min-height: 48px; text-align: left; }
    .dd-table .dd-avatar { flex: 0 0 40px; width: 40px; height: 40px; margin: 0 0 6px; padding: 1px; border-radius: 12px; }
    .dd-table .dd-avatar img { border-radius: 8px; }
    .dd-table .dd-avatar-badge { padding-inline: 5px; font-size: 7px; }
    .dd-table .dd-label { justify-content: flex-start; font-size: 12px; }
    .dd-table .dd-role, .dd-table .dd-seat-state { font-size: 10px; }
    .dd-table .dd-hand-count { font-size: 11px; margin: 0; }
    .dd-table .dd-open-badge, .dd-table .dd-select-help { margin: 0 0 0 auto; text-align: right; font-size: 9px; }
    .dd-table .dd-row, .dd-table .dd-player-seat .dd-row { flex-wrap: nowrap; justify-content: flex-start; gap: 0; min-height: calc(var(--dd-card-width) * 1.43 + 24px); padding: 16px 3px 6px; overflow-x: auto; scrollbar-width: thin; touch-action: pan-x pan-y; }
    .dd-table .dd-row .pcard { touch-action: pan-x pan-y; }
    .dd-table .dd-row .pcard + .pcard { margin-left: max(calc(var(--dd-card-width) * var(--dd-overlap-limit, -.58)), min(0px, calc((100% - var(--dd-card-width)) / var(--dd-card-gaps, 1) - var(--dd-card-width)))); }
    /* Leave both characters of 小王 / 大王 visible under the next card. */
    .dd-table .dd-row .dd-joker + .pcard { --dd-overlap-limit: -.38; }
    .dd-table .dd-table-mark { grid-area: mark; min-height: 40px; margin: 0; font-size: 20px; }
    .dd-table .dd-table-mark small { font-size: 9px; }
    .dd-table .dd-deck-emblem { width: 28px; height: 34px; }
    .dd-table .dd-deck-emblem img { width: 24px; height: 33px; }
    .dd-table .dd-trick { grid-area: trick; --dd-card-width: 44px; min-height: 90px; padding: 8px 6px; margin: 0; }
    .dd-table .dd-action-area { grid-area: actions; min-height: 90px; margin: 0; }
    .dd-table .dd-actions, .dd-table .dd-result-actions { gap: 6px; margin-bottom: 6px; }
    .dd-table .dd-actions button, .dd-table .dd-result-actions button { min-width: 64px; min-height: 44px; padding: 8px 10px; font-size: 14px; }
    .dd-table .dd-status { font-size: 11px; }
    .dd-table .dd-hint-text { font-size: 11px; margin-top: 3px; }
    .dd-table .dd-result strong { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .dd-table *, .dd-table *::before { transition: none !important; animation: none !important; }
}

/* The page supplies a finite play area. Keep actions outside the scrolling
   hands, so a large puzzle never pushes the player's controls below the fold. */
.dd-table.game-view {
    --dd-card-width: clamp(64px, 5.8vw, 96px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'top' 'levels' 'opp' 'trick' 'actions' 'you';
    grid-template-rows: auto auto minmax(0, 1fr) minmax(64px, .7fr) auto minmax(0, 1fr);
    min-height: 0;
    gap: 6px;
    padding: 10px 14px;
    overflow: hidden;
}
.dd-table .dd-topbar { grid-area: top; margin: 0; gap: 6px 10px; }
.dd-table .dd-levels { grid-area: levels; display: flex; flex-wrap: nowrap; min-width: 0; min-height: 0; gap: 5px; margin: 0; padding: 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.dd-table .dd-levels button { flex: 1 0 44px; }
.dd-table .dd-seat { display: grid; grid-template-columns: 90px minmax(0, 1fr); min-height: 0; min-width: 0; gap: 10px; padding: 0; align-items: stretch; }
.dd-table .dd-opponent-seat { grid-area: opp; }
.dd-table .dd-player-seat { grid-area: you; padding-top: 0; }
.dd-table .dd-seat-profile { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 0; gap: 2px; text-align: center; }
.dd-table .dd-avatar { width: 44px; height: 44px; flex: 0 0 44px; margin: 0 0 5px; padding: 1px; border-radius: 12px; }
.dd-table .dd-avatar img { border-radius: 8px; }
.dd-table .dd-avatar-badge { font-size: 7px; padding-inline: 5px; }
.dd-table .dd-label { justify-content: center; font-size: 12px; }
.dd-table .dd-role { font-size: 10px; }
.dd-table .dd-hand-count { margin: 0; font-size: 12px; }
.dd-table .dd-seat-state { margin: 0; font-size: 11px; min-height: 14px; }
.dd-table .dd-open-badge, .dd-table .dd-select-help { display: none; }
.dd-table .dd-hand-area { min-height: 0; min-width: 0; }
.dd-table .dd-row, .dd-table .dd-player-seat .dd-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    min-height: 0;
    height: 100%;
    padding: 14px 3px 7px;
    overflow: auto;
    scrollbar-width: thin;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
}
.dd-table .dd-row .pcard { touch-action: pan-x pan-y; }
.dd-table .dd-row .pcard + .pcard { margin-left: max(calc(var(--dd-card-width) * var(--dd-overlap-limit, -.58)), min(0px, calc((100% - var(--dd-card-width)) / var(--dd-card-gaps, 1) - var(--dd-card-width)))); }
.dd-table .dd-row .dd-joker + .pcard { --dd-overlap-limit: -.38; }
.dd-table .dd-table-mark { display: none; }
.dd-table .dd-trick { grid-area: trick; --dd-card-width: 48px; min-width: 0; min-height: 0; margin: 0; padding: 5px; gap: 4px; align-content: flex-start; overflow: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.dd-table .dd-trick > span { font-size: 11px; }
.dd-table .dd-action-area { grid-area: actions; width: 100%; min-width: 0; min-height: 0; margin: 0; max-height: 132px; overflow: auto; scrollbar-width: thin; }
.dd-table .dd-actions, .dd-table .dd-result-actions { gap: 8px; margin: 0 0 3px; }
.dd-table .dd-actions button, .dd-table .dd-result-actions button { min-height: 44px; min-width: 88px; padding: 7px 12px; font-size: 14px; }
.dd-table .dd-status, .dd-table .dd-hint-text { font-size: 12px; line-height: 1.4; min-height: 0; margin: 2px 0 0; }
.dd-table .dd-hint-text:empty { display: none; }
.dd-table .dd-result { margin-bottom: 4px; }
.dd-table .dd-result strong { font-size: 20px; }
.dd-table .dd-result > span { margin: 1px 0 4px; }
.dd-table .dd-dialog { max-height: calc(100dvh - 24px); overflow: auto; }
@media (max-width: 760px) {
    .dd-table.game-view { --dd-card-width: 68px; padding: 8px; gap: 5px; }
    .dd-table .dd-topbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 6px; }
    .dd-table .dd-room { font-size: 14px; }
    .dd-table .dd-room > span { font-size: 16px; }
    .dd-table .dd-room small { display: none; }
    .dd-table .dd-progress { order: 0; width: auto; margin: 0; text-align: right; font-size: 11px; }
    .dd-table .dd-restart { margin: 0; }
    .dd-table .dd-seat { grid-template-columns: 66px minmax(0, 1fr); gap: 5px; }
    .dd-table .dd-avatar { width: 36px; height: 36px; flex-basis: 36px; }
    .dd-table .dd-role { display: none; }
    .dd-table .dd-label, .dd-table .dd-seat-state { font-size: 11px; }
    .dd-table .dd-actions button { min-width: 72px; }
}
@media (max-height: 650px) {
    .dd-table.game-view { --dd-card-width: 60px; gap: 4px; padding-block: 6px; }
    .dd-table .dd-avatar { display: none; }
    .dd-table .dd-levels { padding-block: 2px; }
    .dd-table .dd-trick { --dd-card-width: 44px; }
}
@media (orientation: landscape) and (max-height: 560px) {
    .dd-table.game-view { --dd-card-width: 64px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'top top' 'levels levels' 'opp you' 'trick actions'; grid-template-rows: auto auto minmax(0, 1fr) minmax(66px, .7fr); gap: 4px 10px; padding: 6px 10px; }
    .dd-table .dd-topbar { display: flex; flex-wrap: nowrap; }
    .dd-table .dd-room { font-size: 13px; }
    .dd-table .dd-room small { display: none; }
    .dd-table .dd-progress { margin-left: auto; }
    .dd-table .dd-seat { grid-template-columns: 60px minmax(0, 1fr); gap: 4px; }
    .dd-table .dd-seat-profile { min-height: 0; }
    .dd-table .dd-seat-state { font-size: 10px; }
    .dd-table .dd-levels { min-height: 0; padding: 2px; }
    .dd-table .dd-row, .dd-table .dd-player-seat .dd-row { padding-top: 12px; }
    .dd-table .dd-actions button, .dd-table .dd-result-actions button { min-width: 64px; padding-inline: 10px; }
    .dd-table .dd-action-area { max-height: none; }
    .dd-table .dd-status, .dd-table .dd-hint-text { font-size: 11px; }
}
