:root {
    color-scheme: dark;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
    background: #10171a;
    color: #e8efec
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    padding: 16px;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left))
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 1400px;
    margin: auto
}

h1 {
    font-size: 25px;
    margin: 4px 0
}

h2 {
    font-size: 17px;
    margin: 0 0 12px
}

p {
    line-height: 1.6;
    color: #a8bcb5;
    margin: 6px 0
}

a {
    color: #89ddbb
}

button,
select,
input {
    font: inherit;
    min-height: 44px;
    border: 1px solid #496058;
    border-radius: 8px;
    background: #24372f;
    color: #fff;
    padding: 8px 12px
}

button {
    cursor: pointer
}

button:hover:not(:disabled) {
    background: #365446
}

button:disabled {
    opacity: .4;
    cursor: default
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid #efcc73;
    outline-offset: 3px
}

.panel {
    background: #182520;
    border: 1px solid #34493f;
    border-radius: 14px;
    padding: 18px;
    max-width: 1400px;
    margin: 14px auto
}

.setup {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px
}

.setup label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #adc2b8
}

.setup button {
    align-self: end
}

#notice {
    max-width: 1400px;
    min-height: 24px;
    margin: 0 auto;
    color: #e4c785;
    font-size: 14px
}

.summary {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap
}

#summary {
    line-height: 1.8
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

main {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
    gap: 16px;
    max-width: 1400px;
    margin: auto
}

main>.panel {
    margin: 0;
    min-width: 0;
    width: 100%
}

.play {
    background: radial-gradient(ellipse at 50% 25%, #235741, #15281e)
}

.cards {
    display: flex;
    gap: 8px;
    justify-content: center;
    min-height: 65px;
    margin: 20px 0
}

.card {
    display: block;
    position: relative;
    background: linear-gradient(165deg, #FFFEF8 0%, #F7F3E8 55%, #EFE8D8 100%);
    border: 1px solid #2c2c2c;
    color: #1a1a1a;
    border-radius: 8px;
    min-width: 43px;
    min-height: 60px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .6);
    overflow: hidden;
    box-sizing: border-box
}

.card .corner {
    position: absolute;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1
}
.card .corner.tl { top: 3px; left: 3px }
.card .corner.br { right: 3px; bottom: 3px; transform: rotate(180deg) }
.card .r { font-size: 12px; font-weight: 800 }
.card .s { font-size: 10px }
.card .pip {
    position: absolute;
    left: 50%; top: 52%;
    transform: translate(-50%, -50%);
    font-size: 26px; font-weight: 600; line-height: 1
}

.card.red {
    color: #C41E3A
}

.card.blue { color: #1B4F9C }
.card.green { color: #0F7A3A }

.card.back {
    color: transparent;
    border: 2.5px solid #F4F1E6;
    background-color: #0C2340;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(212, 175, 55, .22) 0 7%, transparent 8%),
        repeating-linear-gradient(45deg, transparent 0 4px, rgba(255, 255, 255, .1) 4px 5px),
        repeating-linear-gradient(-45deg, transparent 0 4px, rgba(212, 175, 55, .12) 4px 5px),
        linear-gradient(160deg, #143868 0%, #0C2340 55%, #08182e 100%);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28), inset 0 0 0 3px #0C2340
}
.card.back .corner, .card.back .pip { display: none }

.seats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px
}

.seat {
    border: 1px solid #416351;
    border-radius: 10px;
    padding: 12px;
    background: #12281ddc;
    min-height: 114px;
    overflow: hidden
}

.seat.hero {
    border-color: #92cefd;
    background: #1b3542
}

.seat.active {
    box-shadow: 0 0 0 2px #e6c362
}

.seat.folded {
    opacity: .5
}

.seat .cards {
    margin: 9px 0 0;
    min-height: 38px;
    gap: 5px
}

.seat .card {
    min-width: 27px;
    min-height: 38px;
    font-size: 16px
}

.seat strong,
.seat small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.seat small {
    color: #adc9b9;
    margin-top: 5px
}

.controls {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #43614e
}

.controls input {
    width: 130px;
    margin: 0 8px 12px
}

.controls>div {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.controls button {
    flex: 1;
    min-width: 85px
}

#fold {
    background: #65353a
}

#raise,
#allin {
    background: #67501d
}

.table-status {
    padding: 10px 0;
    border-bottom: 1px solid #34493f;
    line-height: 1.6
}

.standings {
    max-height: 460px;
    overflow: auto
}

table {
    width: 100%;
    border-collapse: collapse
}

th,
td {
    text-align: left;
    padding: 9px 5px;
    border-bottom: 1px solid #34493f
}

th {
    color: #a5c3b5;
    font-size: 13px
}

details {
    line-height: 1.7
}

summary {
    cursor: pointer;
    min-height: 44px;
    display: list-item;
    padding-top: 8px
}

pre {
    white-space: pre-wrap;
    font: 12px/1.8 ui-monospace, monospace;
    overflow-wrap: anywhere
}

aside h2:not(:first-child) {
    margin-top: 22px
}

@media(max-width:1000px) {
    main {
        grid-template-columns: 1fr
    }

    .standings {
        max-height: 300px
    }
}

@media(min-width:1024px) and (orientation:portrait) {
    main {
        grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr)
    }
}

@media(max-width:600px) {
    body {
        padding: 12px;
        padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left))
    }

    .panel {
        padding: 13px
    }

    h1 {
        font-size: 22px
    }

    .seats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px
    }

    .seat {
        padding: 9px;
        min-height: 105px
    }

    .seat.hero {
        grid-column: 1/-1
    }

    .controls {
        position: sticky;
        bottom: 0;
        background: #182b20;
        padding: 12px 0 max(12px, env(safe-area-inset-bottom));
        z-index: 1
    }

    .controls button {
        min-width: 65px
    }

    .setup label {
        flex: 1;
        min-width: 120px
    }

    .setup button {
        flex: 1
    }

    .toolbar button {
        flex: 1
    }

    header p {
        font-size: 13px
    }

    .card {
        min-width: 36px;
        min-height: 52px;
        font-size: 18px
    }
}

@media(orientation:landscape) and (max-height:500px) {
    .seats {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }

    .seat {
        min-height: 85px;
        padding: 7px
    }

    .cards {
        margin: 8px 0
    }

    .controls {
        position: static
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        scroll-behavior: auto
    }
}

@media(max-width:600px) {
    .setup button {
        flex: 1 1 calc(50% - 10px)
    }

    .toolbar button {
        flex: 1 1 calc(50% - 8px)
    }
}

.rules-banner {
    max-width: 1400px;
    margin: 12px auto;
    padding: 10px 14px;
    border-left: 3px solid #d7b96c;
    background: #282b1d;
    color: #e8cf8a;
    font-size: 13px;
    overflow-wrap: anywhere
}

.setup [hidden] {
    display: none !important
}

.setup select,
.setup input {
    max-width: 100%;
    min-width: 0
}

#saveStatus {
    font-size: 13px;
    overflow-wrap: anywhere
}

/* Table first; event state remains a separate controller/sidebar. */
.table-topbar {
    max-width: 1400px;
    margin: 14px auto 8px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap
}

#tableLabel {
    font-weight: 700;
    color: #d5e8dd
}

#miniEvent {
    font-size: 13px;
    color: #9ebbad
}

.mtt-main {
    grid-template-columns: minmax(0, 1fr) 340px
}

.play {
    background: #152019;
    padding: 16px
}

.event-sidebar details+details {
    border-top: 1px solid #34493f;
    margin-top: 12px;
    padding-top: 10px
}

.event-sidebar summary {
    font-weight: 700;
    color: #d1dfd7
}

.event-sidebar .summary {
    padding: 0;
    margin: 14px 0;
    background: none;
    border: 0
}

.event-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 12px 0
}

.event-grid small,
.event-grid strong {
    display: block
}

.event-grid small {
    font-size: 12px;
    color: #a6bdb2
}

.event-grid strong {
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere
}

.event-grid #blindCountdown {
    font-variant-numeric: tabular-nums;
    color: #f4d385;
    font-size: 23px
}

.clock-help {
    font-size: 11px;
    color: #9eb0a7
}

.level-pending,
.move-notice {
    color: #f2cf7b;
    font-size: 13px
}

.roster-mine {
    background: #243e46;
    font-weight: 700
}

.event-sidebar .toolbar button {
    flex: 1 1 calc(50% - 8px)
}

.event-sidebar .setup {
    padding: 0
}

.event-sidebar .setup label {
    min-width: 120px;
    flex: 1
}

.event-sidebar .setup button {
    flex: 1 1 40%
}

.event-sidebar #fieldPreview,
.event-sidebar #saveStatus {
    font-size: 12px;
    line-height: 1.7
}

.event-sidebar .standings {
    max-height: 350px;
    font-size: 12px
}

.event-sidebar th,
.event-sidebar td {
    padding: 8px 4px
}

.mtt-controls {
    margin-top: 34px;
    border: 0;
    padding: 14px 0 0;
    position: static
}

.mtt-controls .quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px
}

.mtt-controls .quick button {
    flex: 1;
    min-width: 70px;
    font-size: 12px;
    padding: 8px
}

.mtt-controls .amount-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.mtt-controls .amount-row label {
    font-size: 13px
}

.mtt-controls input {
    margin: 0;
    min-width: 0
}

.mtt-controls #amountSlider {
    flex: 1;
    min-width: 90px
}

.mtt-controls #amount {
    width: 120px
}

.mtt-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px
}

.mtt-actions button {
    flex: 1;
    min-width: 80px
}

.hand-actions {
    max-height: 180px;
    overflow: auto;
    font-size: 13px;
    line-height: 1.8
}

.hand-actions .hero-action {
    color: #99d2f0
}

.hand-log {
    margin-top: 16px
}

.poker-surface .table {
    overflow: visible
}

.play>h2 {
    margin: 0
}

.play>#turn {
    min-height: 24px;
    font-size: 14px
}

.play .move-notice:empty {
    display: none
}

@media(max-width:1100px) {
    .mtt-main {
        grid-template-columns: minmax(0, 1fr) 300px
    }

    .play {
        padding: 12px
    }

    .event-sidebar {
        padding: 12px
    }
}

@media(max-width:900px) {
    .mtt-main {
        grid-template-columns: 1fr
    }

    .event-sidebar {
        width: 100%
    }

    .event-sidebar .standings {
        max-height: 280px
    }
}

@media(max-width:600px) {
    .play {
        padding: 8px
    }

    .mtt-controls .mtt-actions button {
        flex: 1 1 calc(50% - 8px)
    }

    .mtt-controls .amount-row label {
        width: 100%
    }

    .mtt-controls #amountSlider {
        min-width: 100px
    }

    .mtt-controls #amount {
        width: 100px
    }

    .table-topbar {
        gap: 8px
    }

    .event-grid {
        grid-template-columns: 1fr 1fr
    }

    .event-sidebar .standings {
        font-size: 12px
    }

    .event-sidebar summary {
        min-height: 48px
    }

    .poker-surface .table {
        margin-bottom: 20px
    }
}

.mobile-event-tabs,
#mobileClock {
    display: none
}

@media(max-width:600px) {
    .mobile-event-tabs {
        display: flex;
        gap: 6px;
        margin-bottom: 10px
    }

    .mobile-event-tabs button {
        flex: 1;
        font-size: 13px;
        padding: 8px 4px
    }

    .mobile-event-tabs [aria-selected=true] {
        background: #41664e;
        border-color: #a0c5ac
    }

    .event-sidebar>details:not(.mobile-panel-active) {
        display: none
    }

    #mobileClock {
        display: block;
        width: 100%;
        font-size: 13px;
        font-variant-numeric: tabular-nums;
        color: #f3d898
    }

    .table-topbar {
        position: sticky;
        top: 0;
        background: #10171af5;
        z-index: 20;
        padding: 6px 0
    }

    .poker-surface .seat .badge {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 10px;
        padding: 1px 4px
    }
}

.table-round-controls {
    display: flex;
    gap: 10px;
    margin-top: 12px
}

.table-round-controls button {
    flex: 1;
    min-height: 44px
}

#tableNext {
    background: #335b44;
    border-color: #7eab90
}

@media(max-width:600px) {
    .play {
        scroll-margin-top: 120px
    }
}

@media(max-width:600px) {
    .event-sidebar>details#storagePanel {
        display: block
    }
}

.mtt-main {
    align-items: start
}

/* === VIEWPORT FIT one-screen play (mtt) === */
html:has(body.play-page),
body.play-page.mtt-page {
    height: 100%;
}

body.play-page.mtt-page {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding: 8px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    padding-left: max(8px, env(safe-area-inset-left));
}

body.mtt-page>header {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
    margin: 0;
    gap: 10px
}

body.mtt-page>header h1 {
    font-size: 18px;
    margin: 0
}

body.mtt-page>header p {
    display: none
}

body.mtt-page>.audio-panel {
    flex: 0 0 auto;
    margin: 4px 0 0;
    padding: 2px 10px;
    max-width: none
}

body.mtt-page>.table-topbar {
    flex: 0 0 auto;
    margin: 6px 0 4px;
    gap: 8px;
    max-width: none;
    width: 100%
}

body.mtt-page>#notice {
    flex: 0 0 auto;
    min-height: 0;
    margin: 0;
    max-width: none;
    width: 100%;
    font-size: 12px
}

body.mtt-page>.rules-banner {
    flex: 0 0 auto;
    margin: 4px 0;
    padding: 4px 10px;
    max-width: none;
    width: 100%;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.mtt-page>main.mtt-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    max-width: none;
    width: 100%;
    margin: 0;
    gap: 10px;
    align-items: stretch;
}

body.mtt-page .play {
    min-height: 0;
    overflow: hidden;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

body.mtt-page .play>h2 {
    margin: 0 0 2px;
    font-size: 15px
}

body.mtt-page .play>#turn {
    min-height: 0;
    margin: 0 0 4px;
    font-size: 12px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

body.mtt-page .play>.move-notice {
    margin: 0 0 4px
}

body.mtt-page .play .tablewrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.mtt-page .play .tablewrap>.table,
body.mtt-page .poker-surface>.table {
    width: auto;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    aspect-ratio: 1.85;
    margin: 0 auto;
}

body.mtt-page .mtt-controls {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 30;
    margin-top: 6px;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(21, 32, 25, 0), #152019 18%);
    border: 0;
}

body.mtt-page .mtt-controls .quick {
    margin-bottom: 6px
}

body.mtt-page .mtt-controls .quick button {
    padding: 6px;
    min-height: 36px
}

body.mtt-page .mtt-actions button {
    min-height: 40px
}

body.mtt-page .table-round-controls {
    margin-top: 8px
}

body.mtt-page .table-round-controls button {
    min-height: 40px
}

body.mtt-page .play>.hand-log,
body.mtt-page .play>details {
    flex: 0 0 auto;
    margin-top: 4px;
    max-height: 64px;
    overflow: auto;
    font-size: 12px;
}

body.mtt-page .hand-actions {
    max-height: 48px
}

body.mtt-page .event-sidebar {
    min-height: 0;
    overflow: auto;
    padding: 10px;
}

body.mtt-page>details.panel {
    display: none
}

/* rules appendix off first screen */
@media (max-width:900px) {
    body.mtt-page>main.mtt-main {
        grid-template-columns: 1fr;
        overflow: auto
    }

    body.mtt-page {
        overflow: hidden
    }

    body.mtt-page .event-sidebar {
        max-height: 28vh
    }
}

@media (max-height:760px) {
    body.mtt-page>.rules-banner {
        display: none
    }

    body.mtt-page .play>.hand-log,
    body.mtt-page .play>details {
        display: none
    }
}

@media (max-width:600px) {

    body.mtt-page .play .tablewrap>.table,
    body.mtt-page .poker-surface>.table {
        aspect-ratio: 1.2
    }

    body.mtt-page .mtt-controls {
        position: sticky;
        bottom: 0
    }
}

/* === 2026-11-05 polish: fly chips, hand result, nav, allin, shortcuts, avatars === */
.fly {
  position: absolute;
  transform: translate(-50%, -50%);
  transition: left .42s cubic-bezier(.4, 0, .2, 1), top .42s cubic-bezier(.4, 0, .2, 1), opacity .35s ease .12s;
  z-index: 8;
  pointer-events: none;
}

.hand-result {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.hand-result.show {
  opacity: 1;
  pointer-events: auto;
}
.hand-result[hidden] { display: none !important; }
.hand-result-card {
  min-width: min(86vw, 320px);
  max-width: 420px;
  padding: 16px 18px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 24, 30, .94), rgba(10, 12, 16, .96));
  border: 1px solid rgba(255, 213, 74, .35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
  text-align: center;
  pointer-events: auto;
}
.hand-result-net {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.1;
  margin-bottom: 6px;
}
.hand-result-net.pos { color: #7dffb2; }
.hand-result-net.neg { color: #ff8f9d; }
.hand-result-net.flat { color: #d7e0ea; }
.hand-result-detail {
  font-size: 13px;
  color: #b7c4cf;
  line-height: 1.45;
  margin-bottom: 12px;
  max-height: 3.2em;
  overflow: hidden;
}
.hand-result-skip {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid #4a7eae;
  background: linear-gradient(180deg, #2f5f8a, #24496e);
  color: #e8f4ff;
  font-weight: 650;
  cursor: pointer;
}

.nav-pill {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 4px 12px !important;
  border-radius: 999px;
  border: 1px solid #3d4f46;
  background: linear-gradient(180deg, #24352e, #1a2721);
  color: #d7ebe1 !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.nav-pill:hover {
  filter: brightness(1.08);
  border-color: #5f8a76;
}
.audio-mute-btn {
  min-width: 36px;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}
.audio-mute-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, #3a2a2e, #2a1c20);
  border-color: #7a4a55;
  color: #ffd0d8 !important;
}

.act.allin {
  background: linear-gradient(180deg, #8a3d2a, #642716);
  border-color: #c86a48;
  color: #ffe8df;
}

.shortcut-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: #9eb0a8;
  font-size: 12px;
}
.shortcut-hint button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid #496058;
  background: #24372f;
  color: #dfece5;
  cursor: pointer;
}

.tablewrap { position: relative; }

@media (max-width: 600px) {
  .seat .avatar,
  .poker-surface .seat .avatar {
    display: block !important;
    width: 28px !important;
    height: 28px !important;
  }
  .seat .avatar > svg:first-child,
  .poker-surface .seat .avatar > svg:first-child {
    width: 28px !important;
    height: 28px !important;
  }
  .seat .ring,
  .poker-surface .seat .ring {
    width: 36px;
    height: 36px;
    inset: -4px;
  }
  body.play-page .seat .avatar,
  body.play-page .seat .avatar > svg:first-child {
    display: block !important;
    width: 28px !important;
    height: 28px !important;
  }
  .act kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fly, .hand-result { transition: none; }
}


/* MTT action buttons align with regular act style */
body.mtt-page .mtt-actions.mainbtns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
body.mtt-page .mtt-actions .act {
  flex: 1;
  min-width: 72px;
  min-height: 52px;
  padding: 14px 8px;
  font-size: 16px;
  font-weight: 750;
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: transform .1s, filter .12s, box-shadow .12s;
  color: inherit;
}
body.mtt-page .mtt-actions .act.fold {
  background: linear-gradient(180deg, #7a3340, #5a2530);
  border-color: #9a4a56;
  color: #ffe8ec;
}
body.mtt-page .mtt-actions .act.call {
  background: linear-gradient(180deg, #2f7a52, #1f5a3a);
  border-color: #3f9a68;
  color: #e8fff2;
}
body.mtt-page .mtt-actions .act.raise {
  background: linear-gradient(180deg, #b87828, #8a5414);
  border-color: #d49a3a;
  color: #fff6e6;
}
body.mtt-page .mtt-actions .act.allin {
  background: linear-gradient(180deg, #8a3d2a, #642716);
  border-color: #c86a48;
  color: #ffe8df;
}
body.mtt-page .mtt-actions .act:hover:not(:disabled) { filter: brightness(1.08); }
body.mtt-page .mtt-actions .act:active:not(:disabled) {
  transform: translateY(1px) scale(.985);
  box-shadow: 0 1px 4px rgba(0,0,0,.35), inset 0 2px 6px rgba(0,0,0,.28);
}
body.mtt-page .mtt-actions .act kbd {
  display: inline-block;
  font-size: 10px;
  opacity: .7;
  font-family: inherit;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.18);
  vertical-align: middle;
}
body.mtt-page header .hbtns { gap: 8px; }
@media (max-width: 600px) {
  body.mtt-page .mtt-actions .act kbd { display: none; }
}


.fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  overflow: visible;
}


.cold-start {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; box-sizing: border-box;
  background: rgba(6, 16, 12, .72);
  backdrop-filter: blur(2px);
}
.cold-start[hidden] { display: none !important; }
.cold-card {
  width: min(520px, 96vw); max-height: 90%; overflow: auto;
  border-radius: 16px; padding: 18px 18px 16px;
  background: linear-gradient(165deg, #163528, #0d1f18 60%, #0a1812);
  border: 1px solid rgba(120, 200, 150, .28);
  color: #e8fff2; box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.cold-eyebrow { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #9fd6b8; }
.cold-card h2 { margin: 4px 0 8px; font-size: 22px; }
.cold-lede { margin: 0 0 12px; color: #c7e6d5; font-size: 14px; line-height: 1.45; }
.cold-blinds h3 { margin: 0 0 6px; font-size: 13px; color: #b7dcc8; }
.cold-blinds table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cold-blinds th, .cold-blinds td { padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: right; }
.cold-blinds th:first-child, .cold-blinds td:first-child { text-align: left; }
.cold-note { margin: 8px 0 0; font-size: 11px; color: #8fb59f; line-height: 1.4; }
.cold-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cold-primary, .cold-secondary {
  appearance: none; border-radius: 11px; padding: 10px 14px; font-weight: 750; cursor: pointer; font-size: 14px;
}
.cold-primary { border: 1px solid #4caf7a; background: linear-gradient(180deg,#2f8f58,#1d6b3f); color: #e9fff2; }
.cold-secondary { border: 1px solid rgba(180,210,190,.35); background: transparent; color: #d7efe3; }
body.mtt-page .play { position: relative; }


/* === 2026-11-05 MTT breathing room: table first, chrome compact === */
body.mtt-page > header {
  padding: 2px 0;
  min-height: 0;
}
body.mtt-page > header h1 {
  font-size: 15px;
}
body.mtt-page > header .hbtns .nav-pill {
  min-height: 28px;
  padding: 2px 10px !important;
  font-size: 12px;
}
body.mtt-page > .audio-panel {
  display: none !important; /* mute lives in header nav */
}
body.mtt-page > #notice:empty {
  display: none;
}
body.mtt-page > #notice {
  margin: 0;
  padding: 0 4px;
  font-size: 11px;
  line-height: 1.3;
  max-height: 1.4em;
  overflow: hidden;
}
body.mtt-page > .rules-banner {
  display: none; /* version/rules moved out of first screen */
}
body.mtt-page > .table-topbar {
  margin: 2px 0 2px;
  padding: 2px 0;
  gap: 6px;
  font-size: 12px;
  flex-wrap: wrap;
  align-items: center;
}
body.mtt-page > .table-topbar button {
  min-height: 28px;
  padding: 3px 10px;
  font-size: 12px;
}
body.mtt-page > .table-topbar .ghost-chip {
  background: transparent;
  border: 1px dashed #4a6356;
  color: #9ebbad;
}
body.mtt-page > .table-topbar #miniEvent,
body.mtt-page > .table-topbar #mobileClock {
  font-size: 11px;
  opacity: .75;
}

body.mtt-page > main.mtt-main {
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 8px;
}
body.mtt-page.mtt-sidebar-collapsed > main.mtt-main {
  grid-template-columns: minmax(0, 1fr) 0px;
}
body.mtt-page.mtt-sidebar-collapsed .event-sidebar {
  display: none;
}

body.mtt-page .event-sidebar {
  padding: 6px 8px !important;
  font-size: 12px;
}
body.mtt-page .event-sidebar summary {
  font-size: 12px;
  min-height: 28px;
  padding: 2px 0;
}
body.mtt-page .event-sidebar .event-grid {
  gap: 6px;
  margin: 6px 0;
}
body.mtt-page .event-sidebar .event-grid strong {
  font-size: 13px;
}
body.mtt-page .event-sidebar .event-grid #blindCountdown {
  font-size: 18px;
}
body.mtt-page .event-sidebar .clock-help,
body.mtt-page .event-sidebar #storagePanel,
body.mtt-page .event-sidebar .level-pending:empty {
  display: none;
}
body.mtt-page .event-sidebar .standings {
  max-height: min(42vh, 360px);
  font-size: 11px;
}
body.mtt-page .event-sidebar th,
body.mtt-page .event-sidebar td {
  padding: 4px 2px;
}
body.mtt-page .event-sidebar .toolbar button {
  min-height: 30px;
  font-size: 12px;
  padding: 4px 6px;
}

body.mtt-page .play {
  padding: 6px 8px 4px !important;
}
body.mtt-page .play > h2 {
  display: none; /* tableLabel in topbar already names the table */
}
body.mtt-page .play > #turn {
  margin: 0 0 2px;
  font-size: 11px;
  line-height: 1.25;
  -webkit-line-clamp: 1;
  max-height: 1.3em;
  opacity: .85;
}
body.mtt-page .play > .move-notice:empty {
  display: none;
}
body.mtt-page .play > .move-notice {
  margin: 0 0 2px;
  font-size: 11px;
  line-height: 1.25;
  max-height: 1.3em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body.mtt-page .play > .hand-log,
body.mtt-page .play > details {
  display: none; /* free vertical space; actions still in sidebar/log if needed */
}

/* Table owns the column */
body.mtt-page .play .tablewrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
body.mtt-page .play .tablewrap > .table,
body.mtt-page .poker-surface > .table {
  width: auto;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  aspect-ratio: 1.85;
  margin: 0 auto;
  overflow: visible;
}
body.mtt-page .poker-surface .table #seats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
body.mtt-page .poker-surface .table #seats .seat,
body.mtt-page .poker-surface .table #seats .bet,
body.mtt-page .poker-surface .table #seats .dealer,
body.mtt-page .poker-surface .table #seats .fly {
  pointer-events: auto;
}

/* Compact action dock under the felt */
body.mtt-page .mtt-controls {
  flex: 0 0 auto;
  position: relative;
  bottom: auto;
  z-index: 5;
  margin-top: 4px;
  padding: 4px 0 max(4px, env(safe-area-inset-bottom));
  background: transparent;
  max-height: none;
}
body.mtt-page .mtt-controls .quick {
  margin-bottom: 4px;
  gap: 4px;
}
body.mtt-page .mtt-controls .quick button {
  padding: 3px 4px;
  min-height: 28px;
  font-size: 11px;
}
body.mtt-page .mtt-controls .amount-row {
  gap: 6px;
  margin-bottom: 2px;
}
body.mtt-page .mtt-controls .amount-row label {
  font-size: 11px;
}
body.mtt-page .mtt-controls #amount {
  width: 88px;
  min-height: 28px;
  font-size: 12px;
}
body.mtt-page .mtt-controls #amountSlider {
  min-height: 22px;
}
body.mtt-page .mtt-actions {
  margin-top: 4px;
  gap: 6px;
}
body.mtt-page .mtt-actions button,
body.mtt-page .mtt-actions .act {
  min-height: 34px !important;
  padding: 6px 4px !important;
  font-size: 13px !important;
}
body.mtt-page .table-round-controls {
  margin-top: 4px;
  gap: 6px;
}
body.mtt-page .table-round-controls button {
  min-height: 32px !important;
  font-size: 13px;
  padding: 4px 8px;
}
body.mtt-page .shortcut-hint {
  margin-top: 4px;
  padding: 3px 8px;
  font-size: 11px;
}
body.mtt-page .shortcut-hint[hidden] {
  display: none !important;
}

/* Smaller nameplates so 9 seats clear each other on the oval */
body.mtt-page .poker-surface .seat {
  width: 128px;
  z-index: 6;
}
body.mtt-page .poker-surface .seat.hero {
  z-index: 7;
  /* slight lift so south plate clears the dock without eating the oval */
  transform: translate(-50%, calc(-50% - 10px));
}
body.mtt-page .poker-surface .seat .plate {
  gap: 5px;
  padding: 2px 6px 2px 2px;
  border-radius: 28px;
  margin-top: -6px;
}
body.mtt-page .poker-surface .seat .avatar,
body.mtt-page .poker-surface .seat .avatar > svg:first-child {
  width: 34px;
  height: 34px;
}
body.mtt-page .poker-surface .seat .ring {
  width: 42px;
  height: 42px;
  inset: -4px;
}
body.mtt-page .poker-surface .seat .nm {
  font-size: 11px;
}
body.mtt-page .poker-surface .seat .stk {
  font-size: 12px;
}
body.mtt-page .poker-surface .seat .cards {
  height: 44px;
  gap: 2px;
}
body.mtt-page .poker-surface .seat .card {
  width: 30px;
  height: 42px;
}
body.mtt-page .poker-surface .seat.hero .cards {
  height: 56px;
}
body.mtt-page .poker-surface .seat.hero .card {
  width: 40px;
  height: 56px;
}
body.mtt-page .poker-surface .center {
  z-index: 3;
}
body.mtt-page .poker-surface .pot {
  font-size: 15px;
}
body.mtt-page .poker-surface .msg {
  font-size: 12px;
}

@media (max-height: 780px) {
  body.mtt-page .mtt-controls .quick button {
    min-height: 26px;
    padding: 2px 3px;
    font-size: 10px;
  }
  body.mtt-page .poker-surface .seat {
    width: 112px;
  }
  body.mtt-page .poker-surface .seat .avatar,
  body.mtt-page .poker-surface .seat .avatar > svg:first-child {
    width: 28px;
    height: 28px;
  }
}
@media (max-width: 900px) {
  body.mtt-page .play .tablewrap {
    min-height: 0;
  }
}
@media (max-width: 1100px) {
  body.mtt-page > main.mtt-main {
    grid-template-columns: minmax(0, 1fr) 180px;
  }
}
@media (max-width: 900px) {
  body.mtt-page > main.mtt-main {
    grid-template-columns: 1fr;
  }
  body.mtt-page .event-sidebar {
    max-height: 22vh;
  }
  body.mtt-page.mtt-sidebar-collapsed .event-sidebar {
    display: none;
  }
  body.mtt-page .play .tablewrap {
    min-height: 0;
  }
}


/* === 2026-11-05 MTT air pass 2: smaller plates, no duplicate dock === */
@media (min-width: 901px) {
  /* Desktop sidebar already has 继续/下一轮 — drop the duplicate full-width dock */
  body.mtt-page:not(.mtt-sidebar-collapsed) .table-round-controls {
    display: none;
  }
}
body.mtt-page .poker-surface .seat {
  width: 108px;
}
body.mtt-page .poker-surface .seat .plate {
  gap: 4px;
  padding: 1px 5px 1px 1px;
  border-radius: 24px;
  margin-top: -4px;
}
body.mtt-page .poker-surface .seat .avatar,
body.mtt-page .poker-surface .seat .avatar > svg:first-child {
  width: 28px;
  height: 28px;
}
body.mtt-page .poker-surface .seat .ring {
  width: 36px;
  height: 36px;
}
body.mtt-page .poker-surface .seat .nm {
  font-size: 10px;
}
body.mtt-page .poker-surface .seat .stk {
  font-size: 11px;
}
body.mtt-page .poker-surface .seat .cards {
  height: 38px;
}
body.mtt-page .poker-surface .seat .card {
  width: 26px;
  height: 36px;
}
body.mtt-page .poker-surface .seat.hero .cards {
  height: 50px;
}
body.mtt-page .poker-surface .seat.hero .card {
  width: 34px;
  height: 48px;
}
body.mtt-page .poker-surface .seat.hero {
  transform: translate(-50%, calc(-50% - 6px));
}
body.mtt-page .mtt-actions button,
body.mtt-page .mtt-actions .act {
  min-height: 32px !important;
  padding: 4px 4px !important;
  font-size: 12px !important;
}
body.mtt-page .mtt-controls .amount-row label {
  font-size: 10px;
}
body.mtt-page > main.mtt-main {
  grid-template-columns: minmax(0, 1fr) 176px;
}
body.mtt-page .event-sidebar .toolbar {
  gap: 4px;
}
body.mtt-page .event-sidebar .toolbar button {
  min-height: 28px;
  font-size: 11px;
  padding: 3px 4px;
}
