body.is-playing main { max-width: 1480px; padding-top: 24px; }
.workspace-toolbar > .workspace-actions { gap: 14px; flex-shrink: 0; }
.fullscreen-toggle { display: none; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 6px 10px; border: 1px solid #d9e3d0; border-radius: 7px; background: #edf3e7; color: var(--green); font-size: 11px; white-space: nowrap; }
.fullscreen-toggle .icon { width: 15px; height: 15px; }
.fullscreen-toggle:hover { background: #e3ecd9; }
.is-playing .fullscreen-toggle { display: inline-flex; }
.fullscreen-controls { display: none; align-items: center; gap: 5px; }
.fullscreen-controls button { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: #8a9781; }
.fullscreen-controls .icon { width: 16px; height: 16px; }
.fullscreen-controls button[aria-pressed="true"] { color: var(--green); background: #edf3e7; border-color: #bdcdb2; }
.is-playing .intro, .is-playing .how-it-works { display: none; }
.is-playing .studio { grid-template-columns: 252px minmax(0,1fr); }
.is-playing .settings { padding: 25px 20px; }
.is-playing .tiny-label { display: none; }
.is-playing .game-stats strong { font-size: 21px; }
.is-playing .game-stats > div + div { padding-left: 12px; }
.is-playing .game-stats { grid-template-columns: 1fr 1.1fr; }
.is-playing .workspace-toolbar { height: 58px; padding-inline: 23px; flex-shrink: 0; }
.is-playing footer { margin-top: 22px; }
#game-area { padding: 0 18px; background: #fbfcf7; }
.table-toolbar { display: flex; justify-content: space-between; gap: 10px; align-items: center; min-height: 52px; }
.table-piece-count { display: flex; align-items: center; gap: 6px; color: #87947b; font-size: 11px; white-space: nowrap; }
.table-piece-count .icon { width: 15px; height: 15px; color: var(--green); }
.table-piece-count b { font-weight: 500; color: var(--green); font-variant-numeric: tabular-nums; }
.table-mode { border: 1px solid #dce5d3; background: #f0f5e9; color: #8b9a7d; padding: 3px 7px; border-radius: 5px; font-size: 9px; margin-left: 4px; }
.table-tools { display: flex; align-items: center; gap: 6px; }
.table-tools > button { font-size: 15px; color: #6d8264; min-width: 28px; min-height: 30px; padding: 3px; border-radius: 6px; }
.table-tools > button:hover { background: #e9efdf; }
.table-tools .text-button { display: flex; gap: 5px; font-size: 10px; padding-inline: 5px; }
.table-tools .icon { width: 13px; height: 13px; }
.table-tool-divider { width: 1px; height: 14px; background: var(--line); margin-inline: 3px; }
#zoom-level { font-size: 10px; color: #929c86; min-width: 35px; text-align: center; font-variant-numeric: tabular-nums; }
#zoom-fit { font-size: 10px; padding-inline: 7px; }
.table-surface { position: relative; border-radius: 12px; overflow: hidden; }
.table-viewport { height: clamp(440px, 68dvh, 740px); width: 100%; max-width: none; margin: 0; overflow: auto; overscroll-behavior: contain; background-color: #e9eee1; background-image: radial-gradient(#a6b59a40 .8px, transparent .8px), linear-gradient(135deg,#f0f3e9,#e5ebdc); background-size: 12px 12px,100% 100%; border: 1px solid #dce3d1; box-shadow: inset 0 0 50px #aebf9b12; scrollbar-color: #b8c6a8 #e9eee1; scrollbar-width: thin; }
#game-board { display: block; width: 100%; height: 100%; max-height: none; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
#game-board.panning { cursor: grabbing; }
.table-group { cursor: grab; touch-action: none; filter: drop-shadow(0 3px 2px #3f513c35); outline: none; }
.table-group.dragging { cursor: grabbing; filter: drop-shadow(0 7px 5px #3f513c55); }
.table-piece-outline { fill: url(#table-photo); stroke: #fffef4bb; stroke-width: .8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.table-group:hover .table-piece-outline { stroke: #fff; }
.table-group.selected .table-piece-outline, .table-group:focus-visible .table-piece-outline { stroke: #527c5b; stroke-width: 1.8; }
.table-hint { opacity: 0; transition: opacity .25s; }
.table-hint rect { fill: #f8faef; stroke: #98ad87; stroke-width: 2; stroke-dasharray: 8 8; }
.table-hint image { opacity: .3; }
.show-hint .table-hint { opacity: 1; }
.paused #game-board { visibility: hidden; }
.table-instruction { display: flex; justify-content: space-between; gap: 12px; margin: 13px 2px 16px; font-size: 9px; color: #94a086; line-height: 1.8; }
.table-instruction > span { color: #a2ac94; }
.just-connected { animation: table-connect .35s ease-out; }
@keyframes table-connect { 50% { filter: drop-shadow(0 0 9px #7aab6188); } }
@media (max-width: 1050px) { .is-playing .studio { grid-template-columns: 228px minmax(0,1fr); } .is-playing .settings { padding-inline: 17px; } .table-mode { display: none; } .table-instruction > span { display: none; } }
@media (max-width: 760px) {
  body.is-playing main { padding: 15px 12px 0; }
  .is-playing .studio { display: flex; flex-direction: column; }
  .is-playing .settings { padding: 15px 18px 12px; }
  .is-playing .settings-title { display: none; }
  .is-playing #game-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .is-playing .game-info { grid-column: 1; grid-row: 1; font-size: 10px; margin: 0; align-self: center; }
  .is-playing .game-stats { grid-column: 2; grid-row: 1; margin: 0; gap: 0; }
  .is-playing .game-stats strong { font-size: 15px; letter-spacing: -.5px; }
  .is-playing .game-stats .icon { width: 12px; height: 12px; }
  .is-playing .game-stats > div { grid-template-columns: 12px 1fr; column-gap: 5px; }
  .is-playing .game-stats > div + div { padding-left: 8px; }
  .is-playing .game-stats span { display: none; }
  .is-playing .progress-heading { display: none; }
  .is-playing .progress-track { grid-column: 1/-1; grid-row: 2; margin: 12px 0; height: 3px; }
  .is-playing .reference-image { display: none; }
  .is-playing .game-actions { grid-column: 1; grid-row: 3; flex-direction: row; margin: 0; gap: 6px; }
  .is-playing .secondary-button { font-size: 9px; min-height: 34px; padding: 7px 5px; gap: 4px; }
  .is-playing .secondary-button .icon { width: 13px; height: 13px; }
  .is-playing .restart-button { grid-column: 2; grid-row: 3; width: auto; justify-self: start; font-size: 9px; padding: 7px 9px; min-height: 34px; margin: 0; }
  .is-playing #new-game-button { grid-column: 2; grid-row: 3; width: auto; font-size: 9px; margin: 0 0 0 auto; padding-left: 7px; max-width: 70px; line-height: 1.7; text-align: left; }
  .is-playing #new-game-button span { display: none; }
  .is-playing .play-note { display: none; }
  .is-playing .workspace-toolbar { height: 47px; padding-inline: 14px; }
  .is-playing .workspace-toolbar strong { font-size: 10px; }
  #game-area { padding: 0 8px; }
  .table-toolbar { min-height: 46px; gap: 5px; }
  .table-piece-count { font-size: 9px; gap: 4px; }
  .table-tools { gap: 2px; }
  .table-tools > button { min-width: 25px; }
  .table-tools .text-button { font-size: 9px; gap: 3px; }
  #zoom-level { font-size: 9px; min-width: 29px; }
  #zoom-fit { font-size: 9px; padding-inline: 4px; }
  .table-tool-divider { margin-inline: 1px; }
  .table-viewport { height: clamp(390px, 62dvh, 700px); }
  .table-instruction { font-size: 8px; justify-content: center; text-align: center; margin: 10px 0 12px; }
  .is-playing .workspace-footnote { font-size: 8px; padding: 10px; }
  .is-playing footer { margin-top: 13px; }
}
@media (max-width: 360px) { .is-playing .settings { padding-inline: 12px; } .is-playing #new-game-button { max-width: 58px; font-size: 8px; } .is-playing .restart-button { font-size: 8px; padding-inline: 5px; } .is-playing #game-controls { column-gap: 8px; } }
@media (prefers-reduced-motion: reduce) { .just-connected { animation: none; } }

body.is-table-fullscreen { overflow: hidden; }
body.is-playing.is-table-fullscreen main { position: fixed; inset: 0; z-index: 20; width: 100%; max-width: none; margin: 0; padding: 0; background: var(--paper); }
.is-table-fullscreen .site-header, .is-table-fullscreen footer, .is-table-fullscreen .settings, .is-table-fullscreen .workspace-footnote, .is-table-fullscreen .table-instruction { display: none; }
.is-playing.is-table-fullscreen .studio { display: flex; height: 100%; width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.is-playing.is-table-fullscreen .workspace { height: 100%; width: 100%; min-height: 0; flex: 1; border: 0; }
.is-playing.is-table-fullscreen .workspace-toolbar { height: 48px; min-height: 48px; padding-inline: 16px; }
.is-table-fullscreen .fullscreen-controls { display: flex; }
.is-table-fullscreen #game-area { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0 12px 12px; }
.is-table-fullscreen .table-toolbar { min-height: 44px; flex-shrink: 0; }
.is-table-fullscreen .table-surface { flex: 1; min-height: 0; }
.is-table-fullscreen .table-viewport { height: 100%; }
@media (max-width: 480px) {
  .is-playing .workspace-toolbar #preview-count, .is-playing .workspace-toolbar .toolbar-divider { display: none; }
  .workspace-toolbar > .workspace-actions { gap: 8px; }
  .fullscreen-toggle { padding-inline: 7px; font-size: 10px; gap: 4px; }
  .is-table-fullscreen .workspace-toolbar > .workspace-actions { gap: 5px; }
  .is-table-fullscreen .workspace-toolbar { padding-inline: 10px; }
  .is-table-fullscreen .preview-original span, .is-table-fullscreen .fullscreen-toggle span { display: none; }
  .is-table-fullscreen .fullscreen-controls { gap: 4px; }
  .is-table-fullscreen .fullscreen-controls button { width: 29px; height: 29px; }
  .is-table-fullscreen #game-area { padding: 0 7px 7px; }
}
