/* Table layout: centred stock, continuous orders, and two direct physical actions. */
.durian-playing { --order-width:200px; --table-header:94px; }
.durian-playing .topbar { height:54px; padding:0 max(24px,calc((100vw - 1340px)/2)); }
.durian-playing .brand img { width:30px; height:30px; }
.durian-playing .brand>span { font-size:21px; }
.durian-playing .brand small { display:none; }
.durian-playing .room-wrap {
  max-width:1340px; height:calc(100dvh - var(--table-header)); min-height:560px;
  padding:10px 24px 16px; display:flex; flex-direction:column; gap:10px;
}
.durian-playing .room-heading { margin:0; min-height:30px; flex-shrink:0; }
.durian-playing .room-heading .eyebrow { display:none; }
.durian-playing .room-heading h1 { margin:0; font-size:18px; }
.durian-playing .room-code { padding:5px 10px; flex-direction:row; gap:8px; }
.durian-playing .room-code b { font-size:18px; letter-spacing:2px; }
.durian-playing .room-code small,.durian-playing .room-code>span { font-size:10px; }
.durian-playing .room-wrap>.seats {
  flex:none; flex-wrap:nowrap; gap:14px; margin:0; padding:4px 2px 6px;
  overflow-x:auto; scrollbar-width:thin;
}
.durian-playing .seat { flex:1 1 0; min-width:132px; max-width:192px; padding:8px 10px 6px; }
.durian-playing .seat:first-child { margin-inline-start:auto; }
.durian-playing .seat:last-child { margin-inline-end:auto; }
.durian-playing .seat-label { gap:6px; margin-bottom:6px; }
.durian-playing .seat-label b { font-size:12px; }
.durian-playing .seat-label .avatar { width:21px; height:21px; font-size:10px; }
.durian-playing .seat-status { font-size:9px; }
.durian-playing .inventory { max-width:154px; padding-bottom:5px; }
.durian-playing .inventory .fruit-card { width:100%; max-width:100%; transform:none; animation:none; }
.durian-playing .wood-stand { height:7px; }
.durian-playing .seat-bottom { margin-top:4px; min-height:19px; }
.durian-playing .seat-bottom>span { font-size:9px; }
.durian-playing .score { font-size:17px; }
.durian-playing .score small { font-size:9px; }
.durian-playing .score-track { height:2px; margin-top:4px; }
.durian-playing .takeover { font-size:9px; padding:3px; margin-top:3px; }
.durian-playing .play-layout { flex:1; min-height:0; grid-template-columns:minmax(0,1fr) 180px; gap:20px; align-items:stretch; }
.durian-playing .table-surface {
  min-height:0; padding:12px 20px; display:grid;
  grid-template-rows:auto auto minmax(0,1fr); gap:8px; border-radius:12px;
  background-image:radial-gradient(ellipse at 52% 40%,#079781 0,transparent 80%);
}
.durian-playing .table-topline { padding-bottom:7px; font-size:10px; }
.durian-playing .table-overview { text-align:center; }
.durian-playing .order-heading { margin:0; display:block; }
.durian-playing .order-heading h2 { font-size:14px; }
.durian-playing .order-heading>span,.durian-playing .table-bottomline { display:none; }
.durian-playing .decision-table {
  min-height:0; display:grid; grid-template-columns:minmax(230px,.95fr) minmax(300px,1.05fr);
  gap:clamp(20px,3vw,48px); align-items:stretch;
}
.durian-playing .order-ledger { order:1; min-height:0; height:100%; display:flex; flex-direction:column; align-items:center; }
.durian-playing .ledger-markers { flex:none; width:var(--order-width); max-width:100%; display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:0 3px; margin:0 0 6px; }
.durian-playing .ledger-marker {
  display:flex; align-items:center; justify-content:center; gap:5px; height:40px;
  border-radius:16px 16px 4px 4px; box-shadow:0 3px 0 #004c4540,inset 0 1px 0 #fff5;
}
.durian-playing .ledger-marker.rejected { color:#1d3630; background:#eeeede; }
.durian-playing .ledger-marker.accepted { color:#faffee; background:#64cfb0; }
.durian-playing .ledger-marker svg { width:28px; height:28px; }
.durian-playing .ledger-marker span { font-size:9px; font-weight:700; }
.durian-playing .orders {
  width:100%; flex:1; min-height:0; display:flex; flex-direction:column; align-items:center;
  gap:0; padding:0 5px; overflow-y:auto; overscroll-behavior:contain;
  scrollbar-width:thin; scrollbar-color:#7ac5a8 #005b50; scrollbar-gutter:stable both-edges;
}
.durian-playing .order-tile { flex-shrink:0; width:var(--order-width); max-width:100%; margin:0; padding:0; line-height:0; }
.durian-playing .order-tile .fruit-card,.durian-playing .pending-order-card .fruit-card {
  width:100%; max-width:none; aspect-ratio:3.2; padding:5px 4px; border-radius:0; box-shadow:none; animation:none;
}
.durian-playing .order-tile:first-child .fruit-card { border-radius:4px 4px 0 0; }
.durian-playing .order-tile:last-child .fruit-card { border-radius:0 0 4px 4px; }
.durian-playing .order-ledger .half.unused { opacity:.65; }
.durian-playing .order-ledger .half .icon { max-width:46px; max-height:49px; }
.durian-playing .flip-mode .order-tile:not(:disabled) { outline:2px dashed #f4df38; outline-offset:-2px; border-radius:0; }
.durian-playing .flip-mode .order-tile:not(:disabled):hover { transform:none; filter:brightness(1.2); }
.durian-playing .empty-orders { width:var(--order-width); max-width:100%; min-height:130px; flex-shrink:0; font-size:11px; }
/* No confirmation dialog: the bell and deck are the actions themselves. */
.table-actions {
  order:2; align-self:center; justify-self:center; width:100%; max-width:420px;
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding-bottom:20px;
}
.table-action {
  min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  height:188px; padding:16px 8px; gap:15px; border-radius:18px;
  background:#005d5038; border:1px solid #b8e3ca38; color:#fff6d2;
  box-shadow:inset 0 1px 0 #ffffff12,0 7px 16px #003f3620;
}
.table-action strong { font-size:16px; letter-spacing:2px; }
.table-action-art { height:100px; width:100%; display:grid; place-items:center; }
.table-bell .table-action-art>.icon { height:100px; width:96px; filter:drop-shadow(0 9px 5px #003c3b50); transition:transform .2s; transform-origin:50% 20%; }
.table-action:not(:disabled):hover { background:#0caa8b50; border-color:#f1e48499; transform:translateY(-3px); }
.table-bell:not(:disabled):hover .icon { transform:rotate(-9deg); }
.table-action:not(:disabled):active { transform:translateY(2px); }
.table-bell:not(:disabled):active .icon { transform:rotate(13deg); }
.table-action:disabled { opacity:.45; }
.draw-stack { position:relative; display:block; width:140px; max-width:85%; aspect-ratio:2.5; transform:rotate(-8deg); transition:transform .2s; }
.draw-stack::before,.draw-stack::after { content:''; position:absolute; inset:0; border-radius:5px; border:2px solid #e6f6d8; background:#11a788; box-shadow:0 3px 5px #003e342a; }
.draw-stack::before { transform:translate(7px,7px) rotate(5deg); }
.draw-stack::after { transform:translate(3px,3px) rotate(2deg); }
.draw-stack .fruit-card { animation:none; position:relative; z-index:1; width:100%; height:100%; max-width:100%; border:2px solid #e6f6d8; box-shadow:0 5px 10px #003e3450; }
.table-draw:not(:disabled):hover .draw-stack { transform:rotate(-3deg) translateY(-4px); }
.table-gorilla { order:2; align-self:center; justify-self:center; width:100%; text-align:center; color:#fff2cb; }
.table-gorilla h2 { font-size:18px; margin-bottom:15px; }
.table-gorilla .fruit-card { margin:auto; width:220px; max-width:95%; }
.table-gorilla p { font-size:11px; margin-top:12px; color:#c3dfcc; }
/* A drawn card stays in the stack; its rotation remains local until confirmed. */
.durian-playing .pending-order { width:var(--order-width); max-width:100%; flex-shrink:0; margin:0; padding:0 0 5px; }
.pending-order-card { position:relative; }
.pending-order-card::after { content:''; position:absolute; inset:0; border:2px dashed #ffe569; pointer-events:none; }
.pending-order-label { color:#fff1b1; font-size:11px; line-height:1.5; margin:5px 0; text-align:center; }
.pending-order-controls { display:grid; grid-template-columns:1fr 1.2fr; gap:5px; }
.pending-order-controls button { display:flex; align-items:center; justify-content:center; gap:4px; min-height:36px; padding:8px 4px; border-radius:4px; background:#e8f2df; color:#193f33; font-size:12px; font-weight:750; border:1px solid #a8c9b3; }
.pending-order-controls .confirm-order { background:#ffe569; color:#303722; border-color:#ffe569; }
.pending-order-controls svg { width:15px; height:15px; flex-shrink:0; }
.pending-order-controls button:disabled { opacity:.65; }
.durian-playing .side-panel { min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:16px; }
.durian-playing .shop-note { padding:12px; }
.durian-playing .note-heading h3,.durian-playing .activity h3 { font-size:12px; }
.durian-playing .note-heading .icon { width:25px; height:25px; }
.durian-playing .anger-scale { margin:10px 0; gap:3px; }
.durian-playing .anger-scale span { font-size:10px; padding:4px; }
.durian-playing .shop-note p,.durian-playing .log-list p { font-size:10px; }
.durian-playing .mini-rules { display:none; }
/* The audit occupies the action area without moving the orders. */
.durian-playing .decision-table .table-audit { justify-self:center; }
@media(min-width:1500px) { .durian-playing { --order-width:228px; } }
@media(max-width:1050px) {
  .durian-playing .play-layout { grid-template-columns:1fr; }
  .durian-playing .side-panel { display:none; }
  .durian-playing .room-wrap { padding-left:16px; padding-right:16px; }
  .durian-playing .seat { min-width:124px; max-width:176px; }
  .durian-playing .decision-table { gap:20px; }
}
@media(max-width:600px) {
  .durian-playing { --order-width:100%; --table-header:80px; }
  .durian-playing .topbar { height:40px; padding:0 12px; }
  .durian-playing .brand img { width:23px; height:23px; }
  .durian-playing .brand>span { font-size:17px; }
  .durian-playing .top-links { gap:9px; }
  .durian-playing .text-button { font-size:10px; }
  .durian-playing .room-wrap { min-height:520px; padding:5px 8px 8px; gap:6px; }
  .durian-playing .room-heading { min-height:25px; }
  .durian-playing .room-heading h1 { font-size:12px; }
  .durian-playing .room-code { padding:3px 6px; gap:3px; }
  .durian-playing .room-code small { display:none; }
  .durian-playing .room-code b { font-size:14px; }
  .durian-playing .room-tools { gap:7px; }
  .durian-playing .room-wrap>.seats { gap:6px; padding-top:2px; }
  .durian-playing .seat { flex:1 0 112px; min-width:112px; max-width:125px; padding:5px 6px; }
  .durian-playing .seat-label { min-height:16px; margin-bottom:3px; gap:4px; }
  .durian-playing .seat-label b { font-size:10px; }
  .durian-playing .seat-label .avatar { display:none; }
  .durian-playing .seat-status { font-size:8px; }
  .durian-playing .seat-bottom>span { font-size:8px; }
  .durian-playing .seat-bottom { min-height:18px; margin-top:3px; }
  .durian-playing .inventory { padding-bottom:4px; }
  .durian-playing .score { font-size:13px; }
  .durian-playing .score-track { margin-top:3px; }
  .durian-playing .table-surface { padding:8px; gap:7px; border-radius:8px; }
  .durian-playing .table-topline { font-size:8px; padding-bottom:5px; }
  .durian-playing .order-heading h2 { font-size:12px; }
  .durian-playing .decision-table { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:9px; }
  .durian-playing .ledger-markers { padding:0; gap:3px; margin-bottom:5px; }
  .durian-playing .ledger-marker { height:30px; gap:0; border-radius:12px 12px 3px 3px; }
  .durian-playing .ledger-marker svg { width:20px; height:20px; }
  .durian-playing .ledger-marker span { font-size:7px; }
  .durian-playing .orders { padding:0 3px; scrollbar-gutter:auto; }
  .durian-playing .order-tile .fruit-card,.durian-playing .pending-order-card .fruit-card { aspect-ratio:3; padding:4px 3px; }
  .durian-playing .order-ledger .half .icon { max-width:38px; max-height:42px; }
  .table-actions { gap:6px; align-self:start; padding:35px 0 0; }
  .table-action { height:118px; gap:10px; padding:8px 3px; border-radius:10px; }
  .table-action strong { font-size:12px; letter-spacing:1px; }
  .table-action-art { height:62px; }
  .table-bell .table-action-art>.icon { width:53px; height:62px; }
  .draw-stack { width:60px; max-width:78%; }
  .draw-stack .fruit-card { padding:3px; border-width:1px; }
  .draw-stack::before,.draw-stack::after { border-width:1px; }
  .table-gorilla { align-self:start; padding-top:20px; }
  .table-gorilla h2 { font-size:13px; margin-bottom:10px; }
  .table-gorilla p { font-size:9px; }
  .pending-order-label { font-size:10px; }
  .pending-order-controls button { min-height:38px; font-size:12px; }
}
@media(prefers-reduced-motion:reduce) {
  .table-action,.table-bell .table-action-art>.icon,.draw-stack { transition:none; }
}
.durian-playing .table-overview { display:grid; grid-template-columns:minmax(230px,.95fr) minmax(300px,1.05fr); gap:clamp(20px,3vw,48px); }
@media(max-width:1050px) { .durian-playing .table-overview { gap:20px; } }
@media(max-width:600px) { .durian-playing .table-overview { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:9px; } }
/* The drawn gorilla stays beside the order it flipped, outside the fruit faces. */
.durian-playing .order-tile { position:relative; overflow:visible; }
.order-gorilla { position:absolute; left:calc(100% + 4px); top:50%; transform:translateY(-50%); width:40px; pointer-events:auto; }
.durian-playing .order-gorilla .fruit-card { width:40px; height:28px; aspect-ratio:auto; padding:2px!important; border-radius:3px; border:1px solid #f4ebce70; box-shadow:0 2px 3px #003d3540; display:flex; }
.durian-playing .order-gorilla .gorilla-value { font-size:13px; gap:0; }
.durian-playing .order-gorilla .gorilla-value .icon { width:9px; height:11px; }
.durian-playing .order-gorilla .gorilla-face { width:21px; height:23px; }
@media(min-width:601px) {
  .durian-playing { --order-width:172px; }
  .durian-playing .room-wrap { max-width:1480px; }
  .durian-playing .play-layout { grid-template-columns:minmax(0,1fr); }
  .durian-playing .side-panel { display:none; }
  .durian-playing .decision-table,.durian-playing .table-overview { grid-template-columns:minmax(0,1fr) 280px; gap:24px; }
  .durian-playing .order-ledger { min-width:0; }
  .durian-playing .order-ledger>.ledger-markers { display:none; }
  .durian-playing .orders { flex-direction:row; align-items:flex-start; gap:16px; overflow-x:auto; overflow-y:hidden; padding:0 4px 6px; scrollbar-gutter:auto; }
  .durian-playing .order-column { flex:0 0 calc(var(--order-width) + 44px); display:flex; flex-direction:column; align-items:flex-start; gap:0; }
  .durian-playing .order-column:first-child { margin-left:auto; }
  .durian-playing .order-column:last-child { margin-right:auto; }
  .durian-playing .ledger-markers { height:36px; margin-bottom:6px; }
  .durian-playing .ledger-marker { height:36px; }
  .durian-playing .order-tile { height:calc(var(--order-width)/3.2); }
  .durian-playing .order-tile>.fruit-card { height:100%; }
  .table-actions { gap:10px; }
  .table-action { height:160px; padding:12px 5px; gap:10px; }
  .table-action-art { height:90px; }
  .table-bell .table-action-art>.icon { height:86px; width:82px; }
  .draw-stack { width:102px; }
}
@media(min-width:1500px) { .durian-playing { --order-width:200px; } }
@media(min-width:601px) and (max-width:900px) {
  .durian-playing { --order-width:150px; }
  .durian-playing .decision-table,.durian-playing .table-overview { grid-template-columns:minmax(0,1fr) 220px; gap:14px; }
}
@media(max-width:600px) {
  .durian-playing .orders { padding-right:30px; }
  .order-gorilla { width:26px; left:calc(100% + 2px); }
  .durian-playing .order-gorilla .fruit-card { width:26px; height:24px; padding:1px!important; }
  .durian-playing .order-gorilla .gorilla-value { font-size:10px; }
  .durian-playing .order-gorilla .gorilla-face { width:14px; height:18px; }
  .durian-playing .order-gorilla .gorilla-value .icon { width:6px; }
}

.table-orders-title { display:none; }
@media(min-width:601px) {
  .durian-playing .table-surface { grid-template-rows:auto minmax(0,1fr); }
  .durian-playing .table-overview { display:none; }
  .durian-playing .table-topline { position:relative; min-height:26px; }
  .table-orders-title { display:block; position:absolute; left:50%; transform:translateX(-50%); color:#e9fff1; font-size:12px; }
}
.durian-playing .order-gorilla .gorilla-value { width:16px; height:20px; aspect-ratio:auto; flex:none; }
.durian-playing .order-gorilla .gorilla-face { width:16px; height:22px; flex:none; }
.durian-playing .order-gorilla .gorilla-value .icon { right:-2px; bottom:-1px; }
@media(max-width:600px) {
  .durian-playing .order-gorilla .gorilla-value { width:10px; height:15px; }
  .durian-playing .order-gorilla .gorilla-face { width:11px; height:17px; }
}

@media(min-width:601px) {
  .durian-playing .order-column.has-side-controls { flex-basis:calc(var(--order-width) + 160px); }
  .durian-playing .pending-tools-beside { position:relative; padding-bottom:0; }
  .pending-tools-beside .pending-order-tools { position:absolute; left:calc(100% + 8px); bottom:0; width:148px; }
  .pending-tools-beside .pending-order-label { margin:0 0 5px; }
}
