.tb-dialog{border:1px solid #b78d51;border-radius:20px;background:#102f30;color:#fff5da;padding:12px;width:min(94vw,560px);max-height:90dvh;overflow:auto;box-shadow:0 16px 45px #0008;text-align:center}
.tb-dialog::backdrop{background:#0a1b24bb}.tb-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.tb-head h2{font-size:1.3rem;margin:4px 0}
.tb-dialog button{min-width:44px;min-height:44px;border:1px solid #d3b878!important;border-radius:12px!important;background:#f5e8ca!important;color:#1a4239!important;font:inherit;font-weight:800;box-shadow:none!important}
.tb-close{padding:7px 12px!important}.tb-board{position:relative;isolation:isolate;width:100%;aspect-ratio:16/9;background:#58412d url('/train-art/table.webp') center/cover no-repeat;border-radius:14px;margin:10px auto;overflow:hidden}
.tb-art{display:block;aspect-ratio:1;background-image:url('/train-art/parts.webp');background-size:300% 200%;background-repeat:no-repeat;pointer-events:none}
.tb-board>.tb-art,.tb-socket{position:absolute;transform:translate(-50%,-50%);z-index:2}
.tb-board .tb-engine{left:36%;top:67%;width:34%}
.tb-board .tb-chimney{left:26%;top:51%;width:12%}
.tb-board .tb-coupling{left:51%;top:72%;width:12%}
.tb-board .tb-wagon{left:65%;top:68%;width:28%}
.tb-board .tb-socket{padding:0!important;min-width:44px;min-height:44px;aspect-ratio:1;background:#f7db8f55!important;border:2px dashed #ffecc1!important;z-index:3;display:grid;place-items:center}
.tb-socket .tb-art{width:100%;opacity:.58}
.tb-status{margin:8px 0;font-size:1rem;font-weight:750}.tb-progress{font-size:.85rem;font-weight:750;color:#f2d499;margin-bottom:9px}
.tb-tray{display:flex;gap:6px;align-items:stretch;justify-content:center;margin:8px 0;position:relative;z-index:4;overflow:visible}
.tb-dialog .tb-choice{flex:1 1 0;min-width:44px;max-width:110px;padding:4px!important;display:grid;justify-items:center;align-content:start;gap:4px;font-size:11px;touch-action:none}
.tb-choice .tb-art{width:100%;max-width:80px}.tb-choice.tb-hint{outline:3px solid #f3cc70;outline-offset:2px}.tb-choice.tb-drag{position:relative;z-index:20;cursor:grabbing}
.tb-wide{display:block;width:100%;margin-top:8px;padding:8px!important}
.lw-dialog[data-festive="true"] .lw-art:is([data-lw-art="conveyor"],[data-lw-art="panel"],[data-lw-art="gear"],[data-lw-art="bench"],[data-lw-art="wrapper"],[data-lw-art="lever"],[data-lw-art="button"],[data-lw-art="wheel"],[data-lw-art="key"],[data-lw-art="propeller"]){background-image:url('/train-art/festive.webp')!important}
