/* The class desk (/pizarra). The portal's no-gradients.css forbids CSS background images, so
   artwork is an <img> and patterns are inline SVG. The desk covers the whole window. */
.bd{position:fixed;inset:0;z-index:200;background:#f3f0fa;color:#28164f;font:16px/1.4 Arial,sans-serif;overflow:hidden;outline:none}
.bd *{box-sizing:border-box}
.bd-bg{position:absolute;inset:0;background-color:#fff}
.bd-bg img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.bd-bg .bd-veil{position:absolute;inset:0;background-color:#ffffff66}
.bd[data-desk-dark=true] .bd-veil{background-color:#1d1b261a}
.bd-pattern{position:absolute;inset:0;width:100%;height:100%}
.bd-pattern line{stroke:#2a1a5c22;stroke-width:1;vector-effect:non-scaling-stroke}.bd-pattern line.is-strong{stroke:#2a1a5c55;stroke-width:3}
.bd[data-desk-dark=true] .bd-pattern line{stroke:#ffffff3a}.bd[data-desk-dark=true] .bd-pattern line.is-strong{stroke:#ffffff80}
.bd-canvas{position:absolute;inset:56px 0 108px;touch-action:none}
.bd-cards{position:absolute;inset:0}
.bd-ink{position:absolute;inset:0;width:100%;height:100%;z-index:500;pointer-events:none}
.bd[data-desk-tool=draw] .bd-ink{pointer-events:auto;touch-action:none;cursor:crosshair}
.bd[data-desk-draw-tool=erase] .bd-ink [data-stroke]{pointer-events:visibleStroke;cursor:pointer}
.bd[data-desk-draw-tool=erase] .bd-ink [data-stroke][fill]:not([fill=none]){pointer-events:visible}
.bd[data-desk-draw-tool=erase] .bd-ink [data-stroke]:hover{opacity:.4}

/* Top: title, full screen, back. */
.bd-top{position:absolute;left:0;right:0;top:0;z-index:700;height:56px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 16px;pointer-events:none}
.bd-top>*{pointer-events:auto}
.bd-title{margin:0;display:flex;align-items:baseline;gap:8px;padding:6px 12px;border-radius:12px;background:#ffffffcc;font-size:13px;color:#5f567a;letter-spacing:.06em;text-transform:uppercase}
.bd-title strong{font-size:15px;letter-spacing:0;text-transform:none;color:#28164f}
.bd-top-actions{display:flex;gap:8px}
.bd .bd-top-button{min-height:40px;padding:8px 14px;border:1px solid #cfc3ea;border-radius:12px;background:#fff;color:#48209e;font:700 14px/1.2 Arial,sans-serif;cursor:pointer;box-shadow:0 4px 12px #28164f1a}
.bd .bd-top-leave{background:#a1ee77;border-color:#8bd863;color:#1b3a10}

/* Cards. */
.bd-card{position:absolute;display:flex;flex-direction:column;min-width:60px;min-height:48px;border-radius:18px;background:#fff;box-shadow:0 10px 30px #28164f24;outline:none;overflow:hidden}
.bd-card:focus-within,.bd-card:focus{box-shadow:0 0 0 3px #48209e, 0 10px 30px #28164f24}
.bd-grip{position:absolute;left:0;right:0;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:8px;height:26px;padding:0 6px 0 12px;background:#ece6fbee;color:#48209e;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;cursor:grab;opacity:0;transition:opacity .15s}
.bd-card:hover .bd-grip,.bd-card:focus-within .bd-grip,.bd-card:focus .bd-grip,.bd.is-dragging .bd-grip{opacity:1}
.bd-grip:active{cursor:grabbing}
.bd .bd-card-close{width:26px;height:26px;border:0;border-radius:50%;background:transparent;color:#48209e;font:800 18px/1 Arial,sans-serif;cursor:pointer;padding:0}
.bd .bd-card-close:hover{background:#fff}
.bd .bd-resize{position:absolute;right:0;bottom:0;width:26px;height:26px;border:0;padding:0;background:transparent;cursor:nwse-resize;opacity:0}
.bd .bd-resize::after{content:"";position:absolute;right:6px;bottom:6px;width:12px;height:12px;border-right:3px solid #48209e;border-bottom:3px solid #48209e;border-radius:2px}
.bd-card:hover .bd-resize,.bd-card:focus-within .bd-resize,.bd-card:focus .bd-resize{opacity:1}
.bd.is-dragging iframe{pointer-events:none}
.bd.is-dragging{user-select:none}

/* Text card: the sheet shows through; only a soft panel keeps it readable on artwork. */
.bd-card-text{background:#ffffffe6;border:2px dashed #cfc3ea}
.bd-card-text:hover,.bd-card-text:focus-within,.bd-card-text.is-active{border-style:solid;border-color:#48209e}
.bd-card-text .bd-grip{top:-2px;left:-2px;right:-2px}
.bd-text{flex:1;min-height:0;position:relative}
/* fresco.css styles every textarea in the portal at (0,4,1); the card owns its type, so these win outright. */
.bd .bd-card .bd-text-input,.bd .bd-card .bd-text-words{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:14px 18px;border:0;border-radius:0;outline:none;box-shadow:none;background:transparent;resize:none;color:var(--text-color)!important;font-family:Arial,sans-serif!important;font-size:var(--text-size,54px)!important;font-weight:var(--text-weight,500)!important;line-height:1.3!important;text-align:var(--text-align,left)!important;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto}
.bd .bd-card .bd-text-input::placeholder{color:#8d82a9;font-weight:500}
.bd-text-words button{font:inherit;color:inherit;background:transparent;border:0;border-radius:6px;padding:0 2px;cursor:pointer;line-height:inherit}
.bd-text-words button.is-marked{background:#e5fa8f;box-shadow:0 3px #a1bc36}
.bd[data-desk-dark=true] .bd-text-words button.is-marked{color:#28164f}
.bd-text-empty{color:#8d82a9;font-size:16px;font-weight:500}

/* Game card: class games as chips, the Wordwall below. */
.bd-game{flex:1;min-height:0;display:flex;flex-direction:column;padding-top:0}
.bd-card-game .bd-grip{position:static;opacity:1;height:22px;background:#ece6fb}
.bd-game-chips{display:flex;flex-wrap:wrap;gap:4px;padding:6px 8px;background:#f6f2ff;cursor:grab}
.bd .bd-game-chips button{min-height:28px;padding:3px 10px;border:1px solid #cfc3ea;border-radius:999px;background:#fff;color:#48209e;font:700 12px/1.2 Arial,sans-serif;cursor:pointer}
.bd .bd-game-chips button[aria-pressed=true]{background:#48209e;border-color:#48209e;color:#fff}
.bd-game iframe{flex:1;min-height:0;width:100%;border:0;background:#111}

/* Image card. */
.bd-image{flex:1;min-height:0;position:relative;cursor:grab;background:#fff;padding-top:0}
.bd-image img{width:100%;height:100%;object-fit:contain;display:block}
.bd .bd-image-credit{position:absolute;right:8px;bottom:6px;font-size:11px;color:#48209e;background:#ffffffcc;padding:2px 6px;border-radius:6px;text-decoration:none}

/* Bottom bar (boardDock) and its panels. */
.bd .tb-dock{position:absolute;left:0;right:0;bottom:0;z-index:700;display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:10px;padding:0 16px 14px;pointer-events:none}
.bd .tb-dock>*{pointer-events:auto}
.bd .tb-dock-bar{display:flex;align-items:stretch;gap:2px;max-width:calc(100vw - 300px);overflow-x:auto;scrollbar-width:none;padding:8px 10px;background:#fff;border:1px solid #e3dcf2;border-radius:20px;box-shadow:0 10px 30px #28164f24}
.bd .tb-dock-item{display:grid;justify-items:center;align-content:center;gap:4px;min-width:58px;min-height:62px;padding:6px 8px;border:0;border-radius:14px;background:transparent;color:#28164f;font:600 12px/1.2 Arial,sans-serif;cursor:pointer;position:relative}
.bd .tb-dock-item .ui-icon{width:26px;height:26px}
.bd .tb-dock-item:hover{background:#f3eeff}
.bd .tb-dock-item[aria-pressed=true],.bd .tb-dock-item[aria-expanded=true]{background:#ece3ff;color:#48209e}
.bd .tb-dock-item:disabled{opacity:.38;cursor:default}
.bd .tb-dock-item .bd-badge{position:absolute;top:4px;right:8px;min-width:18px;padding:1px 5px;border-radius:999px;background:#cf334b;color:#fff;font-size:11px;font-weight:800;text-align:center}
.bd .tb-dock-separator{flex:0 0 1px;background:#e3dcf2;margin:8px 4px}
.bd .tb-dock-panel{position:absolute;bottom:calc(100% - 6px);z-index:5;touch-action:pan-y;display:grid;gap:10px;width:min(420px,calc(100vw - 16px));max-height:min(62vh,560px);overflow:auto;padding:14px;background:#fff;border:1px solid #e3dcf2;border-radius:18px;box-shadow:0 18px 40px #28164f2e}
.bd .tb-dock-panel[hidden]{display:none}
.bd .tb-dock-panel-title{margin:0;font-weight:800;color:#48209e;text-align:center}
.bd-choices{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.bd-choices-draw,.bd-choices-more,.bd-choices-text{flex-direction:column;align-items:stretch}
.bd-choices-text>div{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.bd-choices-draw>div{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.bd .bd-choices button{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 14px;border:1px solid #cfc3ea;border-radius:12px;background:#fff;color:#28164f;font:700 14px/1.2 Arial,sans-serif;cursor:pointer}
.bd .bd-choices button .ui-icon{width:18px;height:18px}
.bd .bd-choices button[aria-pressed=true]{background:#48209e;border-color:#48209e;color:#fff}
.bd .bd-choices button:disabled{opacity:.4;cursor:default}
.bd .bd-choices-color .tb-colors{display:flex;gap:8px;justify-content:center}
.bd .classroom-swatch{width:36px;height:36px;border:2px solid transparent;border-radius:50%;background:transparent;padding:0;display:grid;place-items:center;cursor:pointer}
.bd .classroom-swatch[aria-pressed=true]{border-color:#28164f}
.bd .classroom-swatch span{display:block;width:24px;height:24px;border-radius:50%;background:var(--swatch);border:1px solid #0002}
.bd-custom-color{display:flex;align-items:center;justify-content:center;gap:8px;font-size:14px;font-weight:700}
.bd-custom-color input{width:36px;height:36px;border:1px solid #cfc3ea;border-radius:10px;padding:2px;background:#fff}
.bd-note{margin:4px 0 0;font-size:12px;color:#5f567a;text-align:center;line-height:1.4}
.bd-backgrounds{display:grid;gap:6px}
.bd-backgrounds p{margin:4px 0 0;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#5f567a}
.bd-backgrounds>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.bd-backgrounds .bd-backgrounds-art{grid-template-columns:repeat(3,minmax(0,1fr))}
.bd .bd-backgrounds button{display:grid;gap:4px;justify-items:stretch;padding:5px;border:2px solid transparent;border-radius:12px;background:#faf8ff;color:#28164f;font:600 12px/1.2 Arial,sans-serif;cursor:pointer;text-align:center}
.bd .bd-backgrounds button[aria-pressed=true]{border-color:#48209e;background:#efe8ff}
.bd-bg-swatch{display:block;height:40px;border:1px solid #ded6ef;border-radius:8px;overflow:hidden;position:relative;background:#fff}
.bd-bg-swatch .bd-pattern{position:absolute}
.bd .bd-backgrounds img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:8px;display:block}
.bd-images{display:grid;gap:8px}
.bd-images>p{margin:0;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#5f567a}
.bd-image-search{display:grid;grid-template-columns:1fr auto auto;gap:6px;align-items:end}
.bd-image-search label{display:grid;gap:4px;font-size:12px;font-weight:700}
.bd .bd-image-search input,.bd .bd-image-search select,.bd .bd-games-picker select{min-height:40px;padding:6px 10px;border:1px solid #cfc3ea;border-radius:10px;background:#fff;color:#28164f;font:500 14px/1.2 Arial,sans-serif}
.bd .bd-image-search button{min-height:40px}
.bd-image-status{margin:0;font-size:13px;color:#5f567a}
.bd-image-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.bd .bd-image-grid button{aspect-ratio:1;padding:0;border:2px solid transparent;border-radius:10px;overflow:hidden;background:#faf8ff;cursor:pointer}
.bd .bd-image-grid button:hover{border-color:#48209e}
.bd .bd-image-grid img{width:100%;height:100%;object-fit:cover;display:block}
.bd-games-picker{display:grid;gap:8px}
.bd-games-picker p{margin:0;font-size:14px;line-height:1.4}
.bd-games-picker label{display:grid;gap:4px;font-size:12px;font-weight:700}

/* Sheets, bottom right. */
.bd-sheets{position:absolute;right:16px;bottom:14px;display:flex;align-items:center;gap:4px;padding:6px 8px;background:#fff;border:1px solid #e3dcf2;border-radius:16px;box-shadow:0 10px 30px #28164f24;z-index:700}
.bd .bd-sheets button{min-height:36px;padding:4px 10px;border:1px solid #d8cdef;border-radius:10px;background:transparent;color:#28164f;font:700 13px/1.2 Arial,sans-serif;cursor:pointer}
.bd .bd-sheets button:disabled{opacity:.4;cursor:default}
.bd .bd-sheets span{min-width:92px;text-align:center;font-weight:700;font-size:14px}

@media(max-width:800px){
  .bd-canvas{inset:52px 0 150px}
  .bd-title span{display:none}
  .bd .tb-dock{padding:0 8px 8px;gap:6px}
  .bd .tb-dock-item{min-width:58px;min-height:56px}
  .bd-sheets{position:static;order:-1}
  .bd .tb-dock{flex-direction:column;align-items:center}
  .bd-backgrounds>div,.bd-image-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .bd-image-search{grid-template-columns:1fr}
}
.bd:fullscreen{background:#f3f0fa}
/* Phones: cards stack full width, the sheet bar sits above the tool bar, text never wraps letter by letter. */
@media(max-width:800px){
  .bd .tb-dock-bar{max-width:100%}
  /* No free layout on a phone: cards stack in a scrolling column, in the order they were added. */
  .bd-cards{display:flex;flex-direction:column;gap:10px;padding:8px;overflow:auto}
  .bd-card{position:static!important;width:auto!important;height:auto!important;min-height:140px;flex:none}
  .bd-card-game{height:min(70vh,520px)!important}
  .bd-card-image{height:40vh!important}
  .bd-text{min-height:140px}
  .bd .bd-text-input,.bd-text-words{position:static;min-height:140px}
  .bd-title{max-width:38vw;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block}
  .bd .bd-text-input,.bd-text-words{font-size:min(var(--text-size),9vw)}
  .bd-sheets{position:absolute;right:8px;bottom:92px;order:0}
  .bd .tb-dock{flex-direction:row}
  .bd-top{height:52px;padding:0 8px}
  .bd .bd-top-button{min-height:36px;padding:6px 10px;font-size:13px}
  .bd-canvas{inset:52px 0 100px}
}
/* While drawing, the ink covers the cards: say so, with the way back. */
.bd-mode-hint{position:absolute;left:50%;top:64px;transform:translateX(-50%);z-index:650;padding:6px 14px;border-radius:999px;background:#28164fe6;color:#fff;font-size:13px;font-weight:700;pointer-events:none;white-space:nowrap}
.bd-mode-hint[hidden]{display:none}
.bd-text-card-note{margin:0;font-size:12px;color:#5f567a;text-align:center}
.bd .tb-dock-bar::-webkit-scrollbar{display:none}
/* Draw toolbar: pens, shapes, colours and widths; sits above the main bar only in draw mode. */
.bd[data-desk-tool=draw] .tb-dock-bar{display:none}
.bd-drawbar{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);z-index:700;display:flex;align-items:center;gap:10px;max-width:calc(100vw - 16px);padding:8px 12px;background:#fff;border:1px solid #e3dcf2;border-radius:18px;box-shadow:0 10px 30px #28164f24;overflow-x:auto;scrollbar-width:none}
.bd-drawbar::-webkit-scrollbar{display:none}
.bd-drawbar[hidden]{display:none}
.bd-drawbar-tools,.bd-drawbar-widths{display:flex;gap:2px;flex:none}
.bd-drawbar-colors{display:grid;grid-template-columns:repeat(7,auto);gap:2px 4px;flex:none;padding:0 6px;border-left:1px solid #e3dcf2;border-right:1px solid #e3dcf2}
.bd .bd-drawbar button{display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:10px;background:transparent;color:#28164f;cursor:pointer}
.bd .bd-drawbar button .ui-icon{width:22px;height:22px}
.bd .bd-drawbar button:hover{background:#f3eeff}
.bd .bd-drawbar button[aria-pressed=true]{background:#ece3ff;color:#48209e}
.bd .bd-drawbar-tools button:nth-child(4){margin-left:6px;border-left:1px solid #e3dcf2;border-radius:0 10px 10px 0}
.bd .bd-drawbar-done{width:auto;gap:6px;padding:0 12px 0 8px;font:700 13px/1 Arial,sans-serif;color:#1b3a10;background:#a1ee77}
.bd .bd-drawbar-done:hover{background:#8bd863}
.bd-drawbar-history{display:flex;gap:2px;flex:none;padding-left:6px;border-left:1px solid #e3dcf2}
.bd .bd-drawbar button:disabled{opacity:.35;cursor:default}
.bd-icon{width:24px;height:24px}
.bd .bd-drawbar-widths i{display:block;width:var(--dot);height:var(--dot);border-radius:50%;background:currentColor}
.bd .bd-swatch{width:28px;height:28px;padding:0;border:2px solid transparent;border-radius:50%;background:transparent;display:grid;place-items:center;cursor:pointer}
.bd .bd-swatch span{display:block;width:20px;height:20px;border-radius:50%;background:var(--swatch);border:1px solid #0002}
.bd .bd-swatch[aria-pressed=true]{border-color:#28164f}
.bd .bd-swatch-custom{position:relative;overflow:hidden}
.bd .bd-swatch-custom span{background:#fff;border:2px dashed #48209e;position:relative}
.bd .bd-swatch-custom span::after{content:"+";position:absolute;inset:0;display:grid;place-items:center;color:#48209e;font:800 14px/1 Arial,sans-serif}
.bd .bd-swatch-custom input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
/* Text toolbar: above the active text card. */
.bd-textbar{position:absolute;z-index:650;display:flex;align-items:center;gap:2px;padding:4px 6px;background:#fff;border:1px solid #e3dcf2;border-radius:14px;box-shadow:0 10px 30px #28164f24;white-space:nowrap}
.bd-textbar[hidden]{display:none}
.bd .bd-textbar button{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:36px;height:36px;padding:0 8px;border:0;border-radius:9px;background:transparent;color:#28164f;font:700 13px/1 Arial,sans-serif;cursor:pointer}
.bd .bd-textbar button .ui-icon{width:20px;height:20px}
.bd .bd-textbar button:hover{background:#f3eeff}
.bd .bd-textbar button[aria-pressed=true]{background:#ece3ff;color:#48209e}
.bd .bd-textbar button:disabled{opacity:.35;cursor:default}
.bd-textbar-size{min-width:76px;text-align:center;font-size:12px;font-weight:700;color:#5f567a}
.bd-textbar-sep{width:1px;height:24px;background:#e3dcf2;margin:0 4px}
.bd-textbar-colors{display:inline-flex;gap:1px}
.bd .bd-textbar .bd-swatch{width:26px;height:26px}.bd .bd-textbar .bd-swatch span{width:18px;height:18px}
@media(max-width:800px){.bd-drawbar{bottom:8px;max-width:calc(100vw - 8px)}.bd-drawbar-colors{grid-template-columns:repeat(6,auto)}.bd-textbar{left:8px!important;right:8px;overflow-x:auto;scrollbar-width:none}}
/* Widgets: cards whose insides scale with the card (container units). Students see the face;
   the controls show on hover or focus. */
.bd-card-timer,.bd-card-names,.bd-card-score,.bd-card-sticker{container-type:size}
.bd-widget{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:6px;color:var(--widget-color,#48209e);overflow:hidden}
.bd-widget-controls{display:none;flex-direction:column;align-items:center;gap:4px}
.bd-card:hover .bd-widget-controls,.bd-card:focus-within .bd-widget-controls,.bd-card.is-active .bd-widget-controls{display:flex}
.bd-widget-row{display:flex;flex-wrap:wrap;justify-content:center;gap:4px}
.bd .bd-widget button{min-height:30px;padding:3px 9px;border:1px solid currentColor;border-radius:9px;background:#fff;color:inherit;font:700 12px/1.2 Arial,sans-serif;cursor:pointer}
.bd .bd-widget button[aria-pressed=true]{background:var(--widget-color,#48209e);color:var(--widget-ink,#fff);border-color:var(--widget-color,#48209e)}
.bd .bd-widget button:disabled{opacity:.4;cursor:default}
.bd .bd-widget .bd-widget-main{background:var(--widget-color,#48209e);color:var(--widget-ink,#fff);border-color:var(--widget-color,#48209e);padding:3px 14px}
.bd .bd-widget button .bd-icon{width:16px;height:16px}
.bd-widget-settings{display:grid;gap:4px}.bd-widget-settings[hidden]{display:none}
/* Timer */
.bd-card-timer{background:#fff;border:3px solid var(--widget-color,#48209e)}
.bd-timer{width:100%;height:100%}
.bd-timer[data-widget-style=solid]{background:var(--widget-color);color:var(--widget-ink)}
.bd-card-timer:has(.bd-timer[data-widget-style=solid]){background:var(--widget-color,#48209e)}
.bd-timer-time{font:800 min(42cqw,55cqh)/1 Arial,sans-serif;font-variant-numeric:tabular-nums;letter-spacing:-.02em;text-align:center}
.bd-timer.is-done .bd-timer-time{font-size:min(28cqw,40cqh)}
.bd-card-timer:has(.is-done){outline:5px solid #f4cc32;outline-offset:3px}
/* Names wheel */
.bd-card-names{background:#fff}
.bd-names{gap:6px;justify-content:flex-start;overflow-y:auto;scrollbar-width:thin}
.bd-names:has([data-names-panel]:not([hidden])) .bd-wheel-wrap{width:min(60cqw,34cqh)}
.bd-wheel-wrap{position:relative;width:min(88cqw,58cqh);aspect-ratio:1;flex:none;margin-top:14px}
.bd-wheel{width:100%;height:100%;border-radius:50%;box-shadow:0 6px 18px #28164f2e;transition:transform 4.2s cubic-bezier(.12,.72,.08,1)}
.bd-wheel svg{display:block;width:100%;height:100%}
.bd-wheel-pointer{position:absolute;left:50%;top:-4px;transform:translateX(-50%);border:11px solid transparent;border-top:18px solid #28164f;filter:drop-shadow(0 2px 2px #0004)}
.bd-names-result{font:800 min(16cqw,14cqh)/1.1 Arial,sans-serif;text-align:center;color:#28164f;overflow-wrap:anywhere;max-width:100%}
.bd-names-result.is-hint{font-size:min(9cqw,8cqh);color:#5f567a;font-weight:600}
.bd-names-edit{display:grid;gap:4px;width:100%;font-size:12px;font-weight:700;color:#28164f}
.bd-names-edit[hidden]{display:none}
.bd .bd-names-edit textarea{width:100%;min-height:90px;font:500 14px/1.4 Arial,sans-serif!important;color:#28164f!important;background:#faf8ff!important;border:1px solid #c9bde3!important;border-radius:10px;padding:8px!important;resize:vertical}
.bd-names-edit small{font-weight:400;color:#5f567a}
/* Scoreboard */
.bd-card-score{background:#fff}
.bd-score{justify-content:flex-start;gap:6px;padding:8px}
.bd-score-teams{display:grid;gap:4px;width:100%;flex:1;min-height:0;align-content:center}
.bd-score-team{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:6px;padding:4px 6px 4px 10px;border-radius:12px;background:var(--team);color:var(--team-ink)}
.bd .bd-score-team input{min-width:0;border:0!important;background:transparent!important;color:inherit!important;font-family:Arial,sans-serif!important;font-weight:800!important;font-size:min(7cqw,6cqh,18px)!important;line-height:1.2!important;padding:2px 0!important;box-shadow:none!important;min-height:0!important}
.bd .bd-score-team input:focus{outline:2px solid #fff8;border-radius:6px}
.bd .bd-score-team .bd-score-points{min-width:2.2em;border:0;background:#ffffffd9;color:#28164f;font:900 min(10cqw,9cqh,32px)/1.1 Arial,sans-serif;padding:2px 8px;border-radius:10px}
.bd-score-steps{display:none;gap:2px}
.bd-card:hover .bd-score-steps,.bd-card:focus-within .bd-score-steps{display:inline-flex}
.bd .bd-score-steps button{min-height:26px;width:26px;padding:0;border-color:#ffffff88;background:#ffffffcc;color:#28164f;font-size:16px}
/* Stickers */
.bd-card-sticker{background:transparent;box-shadow:none;overflow:visible}
.bd-sticker{padding:0;cursor:grab}
.bd-sticker svg,.bd-sticker img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 4px 8px #28164f33)}
.bd-card-sticker .bd-grip{opacity:0}.bd-card-sticker:hover .bd-grip,.bd-card-sticker:focus-within .bd-grip,.bd-card-sticker:focus .bd-grip{opacity:1}
.bd-stickers{display:grid;gap:8px}
.bd-sticker-heading{margin:4px 0 0;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#5f567a}
.bd-sticker-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
.bd .bd-sticker-grid button{aspect-ratio:1;padding:6px;border:2px solid transparent;border-radius:12px;background:#faf8ff;cursor:pointer}
.bd .bd-sticker-grid button:hover{border-color:#48209e;background:#efe8ff}
.bd .bd-sticker-grid svg,.bd .bd-sticker-grid img{width:100%;height:100%;object-fit:contain;display:block}
/* Class video card: dragged by the strip above the player. */
.bd-video{flex:1;min-height:0;display:flex;flex-direction:column;background:#111}
.bd-grip-strip{height:22px;flex:none;background:#ece6fb;cursor:grab}
.bd-video iframe{flex:1;min-height:0;width:100%;border:0;background:#000}

/* Categories and browser-local favorites in the sticker library. */
.bd-sticker-categories{display:flex;flex-wrap:wrap;gap:6px}
.bd .bd-sticker-categories button{border:1px solid #ded3f2;border-radius:14px;padding:6px 9px;background:#faf8ff;color:#28164f;font:600 12px/1.3 Arial,sans-serif;cursor:pointer}
.bd .bd-sticker-categories button[aria-pressed=true]{background:#48209e;border-color:#48209e;color:#fff}
.bd-sticker-choice{position:relative;min-width:0;padding-bottom:22px}
.bd .bd-sticker-choice>[data-sticker]{display:block;width:100%}
.bd .bd-sticker-choice .bd-sticker-favorite{position:absolute;right:0;bottom:0;width:28px;height:26px;min-height:0;aspect-ratio:auto;padding:0;border:0;border-radius:8px;background:#f3eefc;color:#5f567a;font:20px/1 Arial,sans-serif}
.bd .bd-sticker-choice .bd-sticker-favorite[aria-pressed=true]{color:#946300;background:#fff3b0}
.bd-stickers button:focus-visible{outline:3px solid #1768c4;outline-offset:2px}
