/* BTF Grid (2026-11-20) — used in the app and on the public /grid page. */
.bg-wrap{background:#fff;border:1px solid #dbe4d6;border-radius:16px;padding:14px;color:#143528;max-width:560px;margin:0 auto}
.bg-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.bg-head b{font-size:18px}.bg-head small{display:block;color:#5c7563;font-size:12px;margin-top:2px}
.bg-left{font-size:13px;color:#3d5a47;text-align:right}.bg-left b{font-size:20px;color:#143528}
.bg-rules{font-size:13px;color:#3d5a47;margin:8px 0 12px;line-height:1.4}
.bg-grid{display:grid;grid-template-columns:72px repeat(3,1fr);gap:6px}
.bg-corner{display:grid;place-items:center;font-weight:900;color:#b8e35a;background:#173e31;border-radius:12px;font-size:13px}
.bg-team{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:64px;text-align:center}
.bg-badge{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#245a3e;color:#fff;font-weight:900;font-size:12px;border:2px solid #c9d1cc}
.bg-nick{font-size:11.5px;font-weight:700;line-height:1.1;overflow-wrap:anywhere}
.bg-cell{aspect-ratio:1;min-height:76px;border:2px solid #dbe4d6;border-radius:12px;background:#f7faf4;font:inherit;color:#143528;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4px;touch-action:manipulation}
.bg-cell:not(:disabled):hover{border-color:#7fb83a}
.bg-cell.ok{background:#e3f3cf;border-color:#3f7a1f;cursor:default;opacity:1;color:#143528;-webkit-text-fill-color:#143528}
.bg-cell.ok b{font-size:12px;line-height:1.15;text-align:center;overflow-wrap:anywhere}.bg-cell.ok small{font-size:11px;color:#3f7a1f;font-weight:700;margin-top:3px}
.bg-cell:disabled:not(.ok){background:#f0f2ee;cursor:default}
.bg-foot{display:flex;justify-content:space-between;align-items:center;margin-top:12px;font-size:13px;color:#5c7563}
.bg-giveup{border:1px solid #c9d6c3;background:#fff;color:#245a3e;border-radius:16px;padding:6px 12px;font:inherit;font-weight:700;cursor:pointer}
.bg-modal{position:fixed;inset:0;z-index:90;background:rgba(10,25,18,.55);display:flex;align-items:flex-start;justify-content:center;padding:60px 12px 12px}
.bg-sheet{position:relative;background:#fff;width:100%;max-width:480px;border-radius:16px;padding:16px;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.bg-x{position:absolute;top:8px;right:8px;width:36px;height:36px;border:0;border-radius:50%;background:#eef2e8;font-size:22px;cursor:pointer;color:#143528}
.bg-q{margin:0 40px 10px 0;font-size:15px;line-height:1.35}
#bg-input{width:100%;box-sizing:border-box;min-height:46px;border:2px solid #cfe0c4;border-radius:12px;padding:8px 12px;font:inherit;font-size:16px}
.bg-list{margin-top:8px;max-height:46vh;overflow:auto}
.bg-opt{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:46px;padding:8px 10px;border:0;border-bottom:1px solid #eef2ea;background:#fff;font:inherit;font-size:15px;color:#143528;text-align:left;cursor:pointer;touch-action:manipulation}
.bg-opt small{color:#5c7563;font-size:12px}
.bg-msg{background:#fbefe9;border-radius:10px;padding:8px 10px;font-size:14px;margin:8px 0 0}
.bg-small{color:#5c7563;font-size:12.5px;margin:8px 0 0}
.bg-done{text-align:center;margin-top:14px}.bg-score{font-size:44px;font-weight:900;margin:0}
.bg-emoji{font-size:26px;line-height:1.15;margin:4px 0 8px;font-family:inherit}
.bg-rar{margin:0 0 8px;font-size:14px}.bg-rar small{color:#5c7563}
.bg-streak{font-weight:800;margin:6px 0}
.bg-friends{text-align:left;border:1px solid #e1e8d8;border-radius:12px;padding:8px 12px;margin:8px 0;font-size:14px}
.bg-friends div{display:flex;justify-content:space-between;padding:4px 0;border-top:1px solid #eef2ea}
.bg-join{display:inline-block;background:#b8e35a;color:#102a1d;font-weight:800;text-decoration:none;border:0;border-radius:999px;padding:12px 18px;font:inherit;font-weight:800;cursor:pointer}
.bg-share{display:block;margin:12px auto 0;border:0;background:none;color:#143528;font:inherit;font-weight:700;text-decoration:underline;cursor:pointer}
@media(max-width:420px){.bg-grid{grid-template-columns:58px repeat(3,1fr);gap:5px}.bg-cell{min-height:70px}.bg-badge{width:32px;height:32px;font-size:11px}}
.bg-answers{margin-top:18px}.bg-answers h2{font-size:17px}.bg-answers li{margin:6px 0;line-height:1.4;font-size:14px}
.grid-page-head{margin:0 0 12px}.grid-page-head h1{margin:2px 0 4px}.grid-page-head p{margin:0;color:#4d6b55}
#grid-nav .grid-new{font-style:normal;font-size:10px;font-weight:800;letter-spacing:.4px;background:#c6e77a;color:#173e31;border-radius:8px;padding:1px 6px;margin-left:4px}
.bg-share-big{display:block;width:100%;margin:14px 0 0;border:0;border-radius:999px;background:#173e31;color:#c6e77a;font:inherit;font-weight:800;font-size:16px;padding:14px 18px;cursor:pointer}
.bg-help-btn{width:24px;height:24px;border-radius:50%;border:1.5px solid #9bb08f;background:#fff;color:#245a3e;font:inherit;font-weight:800;font-size:13px;line-height:1;cursor:pointer;vertical-align:2px;margin-left:4px;padding:0}
.bg-help h2{margin:0 40px 8px 0;font-size:19px}.bg-help ol{margin:0 0 10px;padding-left:20px;line-height:1.5;font-size:15px}
.bg-ex{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:14px;background:#f4f8ee;border-radius:12px;padding:8px 10px}.bg-ex .bg-badge{width:34px;height:34px;font-size:11px}
.bg-cbl{display:flex;align-items:center;gap:8px;font-size:14px;margin:10px 0 0}
.bg-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:12px 0 8px}.bg-stats div{background:#f4f8ee;border-radius:12px;padding:8px 4px}.bg-stats b{display:block;font-size:22px}.bg-stats small{font-size:11px;color:#5c7563}
.bg-dist{text-align:left;margin:6px 0 4px}.bg-dist div{display:flex;align-items:center;gap:6px;margin:2px 0;font-size:12px}.bg-dist span{width:12px;color:#5c7563}.bg-dist i{font-style:normal;background:#c9d6c3;color:#143528;border-radius:4px;padding:1px 6px;text-align:right;font-weight:700;min-width:18px}.bg-dist i.me{background:#3f7a1f;color:#fff}
.bg-next{font-size:14px;margin:8px 0 0}
.bg-cb .bg-cell.ok{background:#dbeafe;border-color:#1d4ed8}.bg-cb .bg-cell.ok small{color:#1d4ed8}.bg-cb .bg-dist i.me{background:#1d4ed8}
.bg-rules-box{margin-top:14px;border-top:1px solid #e1e8d8;padding-top:10px;font-size:13.5px;color:#33503f}.bg-rules-box b{color:#143528}.bg-rules-box ol{margin:6px 0 0;padding-left:20px;line-height:1.5}
.bg-wrap li{padding:3px 0;border:0;position:static;line-height:1.45}.bg-wrap li:before{content:none}
.bg-share-h{margin:0 40px 8px 0;font-size:19px}.bg-share-pre{background:#f4f8ee;border-radius:12px;padding:10px 12px;font:inherit;font-size:15px;line-height:1.35;white-space:pre-wrap;margin:0 0 12px}
.bg-tos{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.bg-to{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 4px;border:1px solid #dbe4d6;border-radius:12px;background:#fff;font:inherit;font-size:13px;font-weight:700;color:#143528;cursor:pointer;touch-action:manipulation}.bg-to span{font-size:22px}
.bg-ok{background:#e3f3cf}
.bg-joincard{background:#173e31;color:#fff;border-radius:16px;padding:16px 14px;margin:12px 0 4px;text-align:left}.bg-jc-h{margin:0 0 8px;font-size:18px;font-weight:900;color:#c6e77a;text-align:center}
.bg-wrap .bg-jc-l{list-style:none;margin:0 0 12px;padding:0}.bg-wrap .bg-jc-l li{font-size:14.5px;padding:3px 0;color:#eaf3e2}
.bg-join-big{display:block;text-align:center;font-size:17px;padding:14px 18px}.bg-joincard .bg-small{color:#c9dcc4;text-align:center;margin-top:8px}
