/* Own cards remain part of the table: no dialog surface or blocking backdrop. */
.card-choice-panel{position:fixed;left:50%;bottom:max(8px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:70;display:grid;justify-items:center;gap:6px;width:min(368px,calc(100vw - 16px));max-height:164px;min-width:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;overflow:visible;color:#eff9f2;pointer-events:none}
.card-choice-panel[hidden]{display:none!important}
.card-choice-heading{position:absolute;right:50%;top:-16px;transform:translateX(50%);display:flex;align-items:center;justify-content:center;gap:7px;pointer-events:none}
.card-choice-heading .android-hand-rank:not([hidden]) {
  padding:1px 5px;
  border-radius:4px;
  background:#102c27;
  color:#c9f7ed;
  font-size:11px;
  font-weight:700;
  line-height:1.15;
  white-space:nowrap;
}
.card-choice-copy-r59,.card-choice-button small{position:absolute;width:1px;height:1px;padding:0!important;margin:-1px!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.card-choice-panel .card-choice-cards{display:flex;justify-content:center;align-items:flex-end;gap:10px;min-height:108px;margin:0;padding:0;pointer-events:none}
.card-choice-panel .card-choice-button{position:relative;display:block;flex:none;width:70px;height:100px;min-width:0;min-height:0;padding:0;border:0;border-radius:6px;background:transparent;color:#fff;box-shadow:none;pointer-events:auto;touch-action:manipulation;transition:transform .2s ease}
.card-choice-panel .card-choice-button .card{pointer-events:none;display:inline-flex;vertical-align:middle;position:relative;transform:none!important;width:70px;height:100px;font-size:43px;border-radius:6px;box-shadow:0 2px 5px #0005}
.card-choice-panel .card-choice-button[aria-pressed=true]{transform:translateY(-5px);background:transparent;border:0;box-shadow:none}
.card-choice-panel .card-choice-button[aria-pressed=true] .card{outline:2px solid #65dbff;outline-offset:2px}
.card-choice-panel .card-choice-button[aria-pressed=true]::after{content:'✓';position:absolute;right:-5px;top:-5px;display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#155977;color:#fff;font:800 12px/1 system-ui;pointer-events:none}
.card-choice-panel .card-choice-button:focus-visible{outline:2px solid #fff;outline-offset:4px}
.card-choice-panel .card-choice-actions{display:flex;justify-content:center;gap:4px;flex-wrap:nowrap;width:max-content;max-width:100%;pointer-events:none}
.card-choice-panel .card-choice-actions button{flex:none;min-width:76px;max-width:92px;min-height:36px;max-height:38px;margin:0;padding:6px 8px;border-radius:6px;font-size:12px;line-height:1.2;pointer-events:auto;touch-action:manipulation;white-space:nowrap}
@media(max-width:700px){.card-choice-panel{width:min(328px,calc(100vw - 16px));max-height:146px;gap:5px}.card-choice-panel .card-choice-cards{min-height:97px;gap:9px}.card-choice-panel .card-choice-button,.card-choice-panel .card-choice-button .card{width:62px;height:88px}.card-choice-panel .card-choice-button .card{font-size:38px}.card-choice-panel .card-choice-actions button{font-size:11px;padding:6px;min-height:36px}}
@media(max-height:500px){.card-choice-panel{bottom:max(5px,env(safe-area-inset-bottom));max-height:118px;gap:4px;width:min(304px,calc(100vw - 16px))}.card-choice-panel .card-choice-cards{min-height:76px;gap:8px}.card-choice-panel .card-choice-button,.card-choice-panel .card-choice-button .card{width:50px;height:70px}.card-choice-panel .card-choice-button .card{font-size:31px}.card-choice-panel .card-choice-actions button{min-height:32px;max-height:34px;padding:4px 7px;font-size:11px}}
@media(prefers-reduced-motion:reduce){.card-choice-panel .card-choice-button{transition:none}.card-choice-panel .card-choice-button[aria-pressed=true]{transform:none}}

.card > .android-card-face { display:none; }
body[data-view=table] #table-view .squeeze-layer > .card.filled:has(>.android-card-face) {
  background:linear-gradient(#fffef7,#f2f1e9);
  border:0;
}
body[data-view=table] #table-view .squeeze-layer > .card.filled:has(>.android-card-face) > :is(.card-rank-main,.card-suit,.court-art) {
  display:none;
}
body[data-view=table] #table-view .squeeze-layer > .card.filled > .android-card-face {
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  pointer-events:none;
}
.squeeze-layer .peel-alternate-corner { display:none; }
:is([data-squeeze-mode=top][data-squeeze-direction=left],[data-squeeze-mode=bottom][data-squeeze-direction=right])
  .squeeze-layer .android-card-corner { display:none; }
:is([data-squeeze-mode=top][data-squeeze-direction=left],[data-squeeze-mode=bottom][data-squeeze-direction=right])
  .squeeze-layer .peel-alternate-corner { display:inline; }
.card.squeeze-joker > .android-squeeze-joker-face {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
}

@media (max-width:700px) and (orientation:portrait) {
  body[data-view=table] :where(#table-view :is(#table-stage,.card-choice-panel)) .card.filled:has(>.android-card-face) {
    background:linear-gradient(#fffff8,#e5e7df);
    border:0;
  }
  body[data-view=table] :where(#table-view :is(#table-stage,.card-choice-panel)) .card.filled:has(>.android-card-face) > :is(.card-rank-main,.card-suit,.court-art) {
    display:none;
  }
  body[data-view=table] :where(#table-view :is(#table-stage,.card-choice-panel)) .card > .android-card-face {
    position:absolute;
    inset:0;
    display:block;
    width:100%;
    height:100%;
    pointer-events:none;
  }
  .android-card-face .android-card-indices { opacity:var(--squeeze-indices,1); }

  body[data-view=table] #table-view .game-bottom-bar:has(> #card-choice-panel:not([hidden])) {
    min-height:48px;
    padding:2px 8px;
  }
  body[data-view=table] #table-view #card-choice-panel:not([hidden]) {
    position:fixed;
    inset:auto !important;
    top:var(--card-strip-top,auto) !important;
    left:var(--card-strip-left,0) !important;
    transform:none;
    width:max-content;
    max-width:100vw;
    max-height:none;
    margin:0;
    gap:0;
  }
  body[data-view=table] #table-view #card-choice-panel .card-choice-heading {
    position:static;
    transform:none;
    height:16px;
  }
  body[data-view=table] #table-view #card-choice-panel .card-choice-cards {
    height:98px;
    gap:8px;
    align-items:center;
  }
  body[data-view=table] #table-view #card-choice-panel .card-choice-button {
    width:62px;
    height:88px;
    padding:2px;
    -webkit-tap-highlight-color:transparent;
  }
  body[data-view=table] #table-view #card-choice-panel .card-choice-button .card {
    width:58px;
    height:84px;
    border-radius:5px;
  }
  body[data-view=table] #table-view #card-choice-panel .card-choice-button[aria-pressed=true] {
    transform:none;
  }
  body[data-view=table] #table-view #card-choice-panel .card-choice-button[aria-pressed=true]::after {
    right:0;
    top:0;
  }
  body[data-view=table] #table-view #card-choice-panel .card-choice-button[aria-pressed=true] .card {
    outline:2px solid #65dbff;
    outline-offset:0;
  }
  body[data-view=table] #table-view #card-choice-panel .card-choice-actions button {
    width:78px;
    min-width:78px;
    min-height:36px;
    max-height:36px;
    background:#13221b99;
    border:1px solid #355341;
    border-radius:5px;
    padding:0 5px;
    font-size:11px;
  }
}
