/* Gira v4: true overflow fixes, legible outcomes and one global theme menu. */
.gira-theme-control{position:relative;display:flex;align-items:center;z-index:30}
.gira-theme-trigger{font-size:19px;line-height:1;display:grid;place-items:center}
.gira-theme-menu{position:absolute;right:0;top:calc(100% + 11px);min-width:158px;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--card);box-shadow:0 16px 50px #0002;z-index:100;color:var(--ink)}
.gira-theme-menu[hidden]{display:none!important}.gira-theme-item{display:flex;width:100%;align-items:center;gap:11px;padding:10px;border-radius:8px;background:transparent;border:0;color:var(--ink);text-align:left;font:inherit;font-size:13px;cursor:pointer}.gira-theme-item:hover,.gira-theme-item.active{background:var(--surface)}.gira-theme-tick{margin-left:auto;visibility:hidden;color:var(--blue)}.gira-theme-item.active .gira-theme-tick{visibility:visible}.gira-theme-item:focus-visible,.gira-theme-trigger:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
/* No scrollbars in the illustrated result areas; allow the document itself to grow. */
.gira-premium .tool-action-card{overflow:clip}
.tool-result,.result-content,.experience-result{min-width:0;max-width:100%}
.tool-result>*{min-width:0;max-width:100%}
.results-grid,.teams-grid,.numbered-results,.result-chips,.card-deck,.secret-grid,.color-palette,.password-results,.emoji-output,.tournament-match-list{max-height:none!important;overflow:visible!important;scrollbar-width:none;min-width:0}
.results-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr))}
.teams-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr))}
.secret-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,88px),1fr))}
.color-palette{grid-template-columns:repeat(auto-fit,minmax(min(100%,103px),1fr))}
.card-deck{align-items:flex-start}
.playing-card{flex:0 0 auto}
.result-big,.result-title,.experience-result,.tournament-choice-name,.result-card{overflow-wrap:anywhere;word-break:normal;min-width:0}
.bingo-board{grid-template-columns:repeat(10,minmax(0,1fr));min-width:0}
.bingo-board span{min-width:0}
/* Magic ball: decorative triangle, readable answer OUTSIDE its geometry. */
.magic-display{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;width:100%;min-width:0}
.magic-ball{width:clamp(180px,47vw,255px)!important;max-width:100%!important;aspect-ratio:1!important;position:relative;padding:0!important;overflow:hidden;flex:none;isolation:isolate;display:grid;place-items:center}
.magic-ball::before{content:'';position:absolute;inset:30%;clip-path:polygon(50% 3%,98% 90%,2% 90%);background:linear-gradient(145deg,#7185ff,#2f52b6 80%);filter:drop-shadow(0 6px 10px #293bcc88)}
.magic-ball .magic-symbol{position:relative;z-index:1;display:grid;place-items:center;width:58px;height:58px;padding-top:10px!important;background:transparent!important;border:0!important;clip-path:none!important;aspect-ratio:auto!important;color:#e9eeff!important;font-size:25px!important;text-shadow:0 1px 6px #08185d!important;line-height:1!important}
.magic-answer{max-width:min(100%,475px);width:100%;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:clamp(17px,3.5vw,23px);line-height:1.4;font-weight:850;letter-spacing:-.02em;border-radius:13px;padding:17px 22px;overflow-wrap:anywhere;white-space:normal;box-shadow:0 6px 20px #00000008}
/* Allow a large collection to expand on the page, not squeeze into a tiny internal scrollbar. */
.result-content .secret-grid,.result-content .color-palette,.result-content .teams-grid,.experience-result .tournament-match-list{width:100%}
/* Light/dark specific surfaces and color contrasts */
:root[data-theme=dark] .magic-answer{background:var(--surface);color:var(--ink)}
:root[data-theme=dark] .tournament-crown{color:#ffc15c}
:root[data-theme=dark] .champion-banner{background:#372e1b;color:#ffdc85}
:root[data-theme=dark] .coin-result{color:#53380e}
:root[data-theme=dark] .playing-card{background:#f8fbff;color:#263449}
:root[data-theme=dark] .playing-card.red-suit{color:#b52e4c}
:root[data-theme=dark] .bingo-ball{color:white}
/* Counteract transformed-result native scroll overflow from decorative motion. */
.gira-premium .premium-stage{overflow:clip}
.gira-premium .tool-action-card::before{inset:60px 0 60px}
@media(max-width:520px){.gira-theme-menu{right:-8px}.magic-ball{width:205px!important}.magic-answer{padding:14px;font-size:17px}.tool-result{padding-inline:0}.tournament-match-list{padding:0}.result-title{margin-bottom:12px}.color-palette{grid-template-columns:repeat(2,minmax(0,1fr))}.color-swatch{min-height:92px}}
@media(max-width:350px){.bingo-board{grid-template-columns:repeat(5,minmax(0,1fr))}.result-big{font-size:clamp(28px,9vw,55px)}.magic-ball{width:180px!important}}
@media(prefers-reduced-motion:reduce){.magic-ball,.magic-answer,.magic-symbol{animation:none!important;transition:none!important}}
