.tabletop-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:3}
.board-stage canvas.coin-canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;touch-action:auto;z-index:2}
/* World transforms must track the camera/pointer immediately, never ease. */
.tabletop-object{position:absolute;left:0;top:0;transform-origin:0 0;pointer-events:auto;user-select:none;margin:0;transition:none!important}
.tabletop-object button{transition:background .15s;transform:none}
.tabletop-object:focus-visible,.card-drag-bar:focus-visible{outline:3px solid #9adcf6;outline-offset:3px}
.tabletop-coin{width:52px;height:52px;min-height:0;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;touch-action:none;cursor:grab;z-index:3}
.tabletop-coin:hover{background:#ffedb511}
.tabletop-coin.is-dragging{cursor:grabbing;z-index:5}
.tabletop-card{width:240px;min-height:145px;border:1px solid #d6caa1;border-radius:4px;background:#fbf0c9;color:#39301f;font:16px/1.4 Georgia,serif;box-shadow:2px 5px 10px #0005;z-index:1}
.tabletop-card.is-dragging,.tabletop-card.is-editing{z-index:4}
.card-header{display:flex;height:30px;align-items:stretch;background:#e4d6a9;border-bottom:1px solid #c5b685;border-radius:3px 3px 0 0}
.card-drag-bar{flex:1;padding:3px 10px;background:transparent;color:#68552a;font:12px/1.5 system-ui;text-align:left;cursor:grab;touch-action:none;letter-spacing:.3px}
.card-drag-bar:hover{background:#d4c38f}.is-dragging .card-drag-bar{cursor:grabbing}
.card-menu-button{width:30px;background:transparent;color:#68552a;font-size:21px;line-height:1}
.card-content{display:block;width:100%;min-height:113px;max-height:300px;overflow:auto;padding:16px;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;text-align:left;cursor:text;touch-action:pan-y}
.card-content:hover{background:#fff5d7}
.card-editor-form{padding:10px;color:#39301f}
.card-editor{display:block;width:100%;min-height:110px;resize:vertical;max-height:360px;background:#fff9e5;color:#39301f;border:1px solid #a78a4b;border-radius:2px;padding:7px;font:16px/1.4 Georgia,serif;user-select:text;touch-action:auto}
.card-editor-form p{font:12px/1.4 system-ui;margin-top:6px;color:#8d321f;overflow-wrap:anywhere}
.card-editor-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.card-editor-actions button{background:#e3d4a3;color:#39301f;padding:5px 8px;border:1px solid #b8a16b;border-radius:3px;font:12px system-ui}
.card-editor-actions button[type=submit]{background:#5b714a;color:#fff;border-color:#5b714a}
.tabletop-menu{position:fixed;z-index:30;min-width:160px;max-width:calc(100vw - 16px);padding:5px;background:#28312e;border:1px solid #6f7e65;border-radius:6px;box-shadow:0 6px 24px #0008}
.tabletop-menu button{display:block;width:100%;padding:10px 12px;background:transparent;color:#f2eddf;border-radius:3px;text-align:left;font-size:13px}
.tabletop-menu button:hover:not(:disabled),.tabletop-menu button:focus-visible{background:#485345}
.tabletop-menu button:disabled{cursor:not-allowed}

.tabletop-image { cursor: grab; touch-action: none; z-index: 0; }
.tabletop-image img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.tabletop-image.is-dragging { cursor: grabbing; }
