/* BQ Connect v1.1 — mobile-first, scoped to the game */
.bg-root{width:100%;max-width:660px;margin:12px auto;padding:clamp(10px,3vw,22px);border:1px solid #d9dee6;border-radius:16px;font-family:inherit;color:#1b2737;background:#fff;box-sizing:border-box;overflow:hidden}
.bg-root *{box-sizing:border-box}
.bg-header{text-align:center}
.bg-header h2{margin:0;font-size:clamp(25px,7vw,36px);line-height:1.12;letter-spacing:-.035em;color:#172e4c}
.bg-header p{margin:4px 0}
.bg-tagline{font-weight:600;font-size:clamp(12px,3.5vw,16px);color:#435b73}
.bg-puzzle-title{color:#64748b;font-size:13px;padding-top:6px}
.bg-modes,.bg-controls,.bg-footer{display:flex;justify-content:center;gap:8px;margin:12px 0}
.bg-button{appearance:none;-webkit-appearance:none;touch-action:manipulation;border:1px solid #b9c4d1;border-radius:22px;padding:11px 15px;background:#fff;color:#1b2737;cursor:pointer;font:inherit;font-size:14px;font-weight:650;line-height:1.2;min-height:44px;max-width:100%;overflow-wrap:anywhere}
.bg-button:hover{background:#e9edf3}
.bg-button:focus-visible,.bg-picker select:focus-visible{outline:3px solid #226ec7;outline-offset:2px}
.bg-button.bg-active,.bg-button.bg-primary{background:#203a58;color:#fff;border-color:#203a58}
.bg-button:disabled{opacity:.45;cursor:not-allowed}
.bg-modes .bg-button{flex:1;min-width:0}
.bg-instructions{text-align:center;font-size:13px;line-height:1.4;color:#465568;margin:9px 0 13px}
.bg-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(4px,1.5vw,9px);width:100%}
.bg-grid .bg-tile{border-radius:8px;min-width:0;width:100%;min-height:clamp(58px,17vw,82px);padding:4px 2px;background:#e9edf2;border:2px solid transparent;font-size:clamp(10px,2.6vw,15px);font-weight:750;overflow-wrap:anywhere;word-break:normal;hyphens:auto;line-height:1.15;text-align:center}
.bg-grid .bg-tile.bg-selected{background:#3b5673;color:#fff}
.bg-grid .bg-tile:focus-visible{outline:3px solid #226ec7}
.bg-mistakes{text-align:center;margin:13px 0 7px;font-size:13px}
.bg-dot{font-size:17px;color:#627184;margin:0 2px}
.bg-dot.bg-used{color:#d5dbe1}
.bg-message{text-align:center;min-height:24px;font-weight:650;font-size:13px}
.bg-solved-card{text-align:center;border-radius:8px;padding:10px 7px;margin:7px 0;color:#162235;overflow-wrap:anywhere}
.bg-solved-card strong{display:block;font-size:15px}
.bg-solved-card p{margin:6px 0 3px;font-size:13px}
.bg-solved-card small{display:block;font-size:12px}
.bg-controls .bg-button{flex:1;min-width:0}
.bg-hint{text-align:center;margin:10px auto}
.bg-hint p{background:#f4f6fa;padding:10px;border-radius:8px;font-size:13px}
.bg-picker{display:block;margin:10px 0;text-align:center;font-size:13px}
.bg-picker select{font:inherit;padding:9px;border:1px solid #b9c4d1;border-radius:8px;max-width:100%;width:100%;background:white}
.bg-brand{text-align:center;font-size:11px;color:#64748b;margin-top:10px}
@media(max-width:390px){.bg-root{margin:5px auto;padding:9px;border-radius:10px}.bg-modes,.bg-controls{gap:6px}.bg-button{font-size:12px;padding:9px 7px}.bg-grid .bg-tile{font-size:clamp(9px,2.55vw,12px);min-height:clamp(56px,16vw,70px)}.bg-instructions{font-size:12px}}
@media(max-width:320px){.bg-grid{gap:3px}.bg-grid .bg-tile{font-size:9px;min-height:53px;padding:2px 1px}.bg-root{padding:6px}.bg-button{font-size:11px}}
@media(prefers-reduced-motion:reduce){.bg-root *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

.bg-grid-3{grid-template-columns:repeat(3,minmax(0,1fr));max-width:430px;margin:0 auto}.bg-grid-3 .bg-tile{min-height:clamp(62px,20vw,86px);font-size:clamp(12px,3vw,16px)}

/* Four verses, three clues per verse: twelve tiles */
.bg-grid-12{grid-template-columns:repeat(3,minmax(0,1fr))}
.bg-grid-12 .bg-tile{min-height:clamp(55px,15vw,72px)}
