/* SparkBR OS Experience 2.3 — dock, immersive portals, drag-to-arrange apps. */
:root{--os-ink:var(--world-ink,#172c26);--os-card:var(--world-card,#fff);--os-accent:var(--world-accent,#087f78);--os-line:var(--world-border,#d7e3dc);--os-soft:var(--world-soft,#edf4ed)}
.spark-os-portals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:22px 0 30px}
.spark-os-portal{position:relative;display:flex;gap:14px;align-items:center;min-height:116px;padding:18px;border-radius:22px;text-decoration:none;color:var(--os-ink)!important;background:var(--os-card);border:1px solid var(--os-line);box-shadow:0 12px 36px #10251e12;overflow:hidden;transition:transform .22s ease,box-shadow .22s ease}
.spark-os-portal:hover{transform:translateY(-3px);box-shadow:0 18px 46px #10251e1c}
.spark-os-portal:focus-visible,.spark-os-control:focus-visible{outline:3px solid var(--os-accent);outline-offset:3px}
.spark-os-icon{display:grid;place-items:center;flex:0 0 58px;width:58px;height:58px;border-radius:18px;font-size:30px;background:var(--os-soft)}
.spark-os-portal strong{display:block;font-size:16px;font-weight:900;letter-spacing:-.02em}
.spark-os-portal small{display:block;margin-top:5px;font-size:12px;line-height:1.5;color:var(--world-muted,#66736c)}
.spark-os-arrow{margin-left:auto;font-size:22px;color:var(--os-accent)}
.spark-os-overline{display:block;text-transform:uppercase;letter-spacing:.15em;font-size:10px;font-weight:900;color:var(--os-accent);margin-bottom:5px}
.spark-os-control-dock{position:fixed;z-index:99990;right:16px;bottom:16px;display:flex;gap:8px;padding:8px;border:1px solid var(--os-line);border-radius:18px;background:color-mix(in srgb,var(--os-card,#fff),transparent 5%);box-shadow:0 12px 34px #091c1824;backdrop-filter:blur(18px);font:600 12px/1.2 system-ui,sans-serif}
.spark-os-in-shell .spark-os-control-dock{bottom:88px}
.spark-os-control{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--os-line);border-radius:12px;background:var(--os-card);color:var(--os-ink);padding:10px 12px;min-height:40px;font:inherit;cursor:pointer;white-space:nowrap}
.spark-os-control.primary{background:var(--os-accent);color:var(--world-on-accent,#fff);border-color:transparent}
.spark-os-control[aria-pressed="true"]{background:var(--os-accent);color:var(--world-on-accent,#fff)}
.spark-arrange-mode .apps-grid,.spark-arrange-mode #appsGrid,.spark-arrange-mode #apps-grid{outline:2px dashed var(--os-accent);outline-offset:6px;border-radius:18px}
.spark-arrange-mode .apps-grid>* , .spark-arrange-mode #appsGrid>* ,.spark-arrange-mode #apps-grid .card-wrap{cursor:grab;touch-action:none}
.spark-arrange-mode .spark-os-sortable{box-shadow:0 0 0 2px var(--os-accent),0 12px 35px #0c756022;position:relative}
.spark-os-sortable.spark-os-dragging{opacity:.42;transform:scale(.98);cursor:grabbing}
.spark-os-sortable.spark-os-drop-target{outline:3px solid var(--os-accent);outline-offset:2px}
.spark-os-reorder-hint{font-size:12px;font-weight:750;color:var(--os-accent);padding:10px 13px;margin:12px 0;background:var(--os-soft);border:1px solid var(--os-line);border-radius:12px}
.spark-os-sidebar-links{display:grid;gap:7px;margin:16px 0;padding:14px 0;border-top:1px solid var(--os-line);border-bottom:1px solid var(--os-line)}
.spark-os-sidebar-links a{display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:12px;text-decoration:none;color:inherit;font-size:13px;font-weight:800}
.spark-os-sidebar-links a:hover{background:var(--os-soft)}
.spark-os-sidebar-links .os-mini{font-size:19px;width:24px;text-align:center}
.spark-os-shell-portals{margin:20px 0 28px}
.spark-os-shell-portals .spark-os-portals{margin-bottom:0}
html:fullscreen body{overflow:auto}
@media(max-width:800px){.spark-os-portals{grid-template-columns:1fr;gap:10px;margin:18px 0 24px}.spark-os-portal{min-height:86px;padding:14px;border-radius:18px}.spark-os-icon{flex-basis:48px;width:48px;height:48px;font-size:25px;border-radius:15px}.spark-os-portal strong{font-size:15px}.spark-os-control-dock{right:10px;bottom:calc(12px + env(safe-area-inset-bottom));gap:5px;padding:6px}.spark-os-in-shell .spark-os-control-dock{bottom:calc(80px + env(safe-area-inset-bottom))}.spark-os-control{padding:9px 10px;font-size:11px}.spark-os-control .word{display:none}}
@media(prefers-reduced-motion:reduce){.spark-os-portal{transition:none}.spark-os-portal:hover{transform:none}}

/* The same twelve worlds extend beyond the shell into games, school and Maps. */
html[data-world] body[data-spark-page="games"],html[data-world] body[data-spark-page="education"]{background:var(--w-paper)!important;color:var(--w-ink)!important}
html[data-world] body[data-spark-page="games"] .hub-top,html[data-world] body[data-spark-page="games"] .jump-card,html[data-world] body[data-spark-page="games"] .game-card,html[data-world] body[data-spark-page="games"] .searchbox,html[data-world] body[data-spark-page="games"] .filter,html[data-world] body[data-spark-page="games"] .hub-bottom,html[data-world] body[data-spark-page="games"] .hub-footer{background:var(--w-card)!important;color:var(--w-ink)!important;border-color:var(--w-line)!important}
html[data-world] body[data-spark-page="games"] .hub-hero{background:var(--w-hero)!important;border:1px solid var(--w-line)!important;border-radius:var(--w-radius)!important;box-shadow:var(--w-shadow)!important}
html[data-world] body[data-spark-page="games"] .hub-hero .hero-copy h1,html[data-world] body[data-spark-page="games"] .hub-hero .hero-copy p,html[data-world] body[data-spark-page="games"] .hub-hero .hub-stats,html[data-world] body[data-spark-page="games"] .hub-hero .hub-stats strong{color:var(--w-accent-ink)!important}
html[data-world] body[data-spark-page="games"] .eyebrow,html[data-world] body[data-spark-page="games"] .game-tag,html[data-world] body[data-spark-page="games"] .hub-stats strong{color:var(--w-highlight,var(--w-accent))!important}
html[data-world] body[data-spark-page="games"] .section-head h2,html[data-world] body[data-spark-page="games"] .jump-card strong,html[data-world] body[data-spark-page="games"] .game-card h3,html[data-world] body[data-spark-page="games"] .hub-bottom h2{color:var(--w-ink)!important}
html[data-world] body[data-spark-page="games"] .section-head p,html[data-world] body[data-spark-page="games"] .jump-card small,html[data-world] body[data-spark-page="games"] .game-card p,html[data-world] body[data-spark-page="games"] .hub-bottom p{color:var(--w-muted)!important}
html[data-world] body[data-spark-page="games"] .filter.active,html[data-world] body[data-spark-page="games"] .filter[aria-pressed="true"],html[data-world] body[data-spark-page="games"] .os-button.primary,html[data-world] body[data-spark-page="games"] .game-actions .play{background:var(--w-accent-strong)!important;border-color:var(--w-accent-strong)!important;color:var(--w-accent-ink)!important}
html[data-world] body[data-spark-page="games"] .game-icon,html[data-world] body[data-spark-page="games"] .orb{background:var(--w-accent-soft)!important;color:var(--w-accent-strong)!important;border-color:var(--w-line)!important}
html[data-world] body[data-spark-page="games"] .catalog-count{background:var(--w-accent-soft)!important;color:var(--w-accent-strong)!important;border-color:var(--w-line)!important}
html[data-world] body[data-spark-page="education"] .ed-top,html[data-world] body[data-spark-page="education"] .age-card,html[data-world] body[data-spark-page="education"] .tool-card,html[data-world] body[data-spark-page="education"] .ed-search,html[data-world] body[data-spark-page="education"] #toolFilters button,html[data-world] body[data-spark-page="education"] .ed-button{background:var(--w-card)!important;color:var(--w-ink)!important;border-color:var(--w-line)!important}
html[data-world] body[data-spark-page="education"] .ed-hero h1,html[data-world] body[data-spark-page="education"] .ed-main h2,html[data-world] body[data-spark-page="education"] .ed-brand,html[data-world] body[data-spark-page="education"] .tool-card h3,html[data-world] body[data-spark-page="education"] .age-card strong{color:var(--w-ink)!important}
html[data-world] body[data-spark-page="education"] .ed-hero h1 em,html[data-world] body[data-spark-page="education"] .eyebrow,html[data-world] body[data-spark-page="education"] .tool-icon{color:var(--w-accent)!important}
html[data-world] body[data-spark-page="education"] .ed-main p,html[data-world] body[data-spark-page="education"] .tool-card p,html[data-world] body[data-spark-page="education"] .age-card small,html[data-world] body[data-spark-page="education"] .ed-footer{color:var(--w-muted)!important}
html[data-world] body[data-spark-page="education"] .ed-button.primary,html[data-world] body[data-spark-page="education"] #toolFilters button.active{background:var(--w-accent-strong)!important;border-color:var(--w-accent-strong)!important;color:var(--w-accent-ink)!important}
html[data-world] body[data-spark-page="education"] .age-card.active,html[data-world] body[data-spark-page="education"] .age-card:hover,html[data-world] body[data-spark-page="education"] .tool-card button{background:var(--w-accent-soft)!important;border-color:var(--w-accent)!important;color:var(--w-accent-strong)!important}
html[data-world] body[data-spark-page="education"] .ed-art{background:var(--w-glow),var(--w-card)!important;border-color:var(--w-line)!important}
html[data-world] body[data-spark-page="education"] .ed-bottom{background:var(--w-accent-soft)!important;border-color:var(--w-line)!important}
html[data-world] body[data-spark-page="immersive-game"]{background:var(--w-paper)!important;color:var(--w-ink)!important}
html[data-world] body[data-spark-page="immersive-game"] .bg-slate-950,html[data-world] body[data-spark-page="immersive-game"] .bg-slate-900,html[data-world] body[data-spark-page="immersive-game"] .bg-slate-800,html[data-world] body[data-spark-page="immersive-game"] .bg-gray-950,html[data-world] body[data-spark-page="immersive-game"] .bg-gray-900{background:var(--w-side)!important;color:var(--w-ink)!important;border-color:var(--w-line)!important}
html[data-world] body[data-spark-page="immersive-game"] .text-white,html[data-world] body[data-spark-page="immersive-game"] .text-slate-100,html[data-world] body[data-spark-page="immersive-game"] .text-slate-200,html[data-world] body[data-spark-page="immersive-game"] .text-slate-300{color:var(--w-ink)!important}
html[data-world] body[data-spark-page="immersive-game"] .text-slate-400,html[data-world] body[data-spark-page="immersive-game"] .text-slate-500{color:var(--w-muted)!important}
html[data-world] body[data-spark-page="immersive-game"] .bg-emerald-500,html[data-world] body[data-spark-page="immersive-game"] .bg-emerald-600,html[data-world] body[data-spark-page="immersive-game"] .bg-indigo-600,html[data-world] body[data-spark-page="immersive-game"] .bg-blue-600{background:var(--w-accent-strong)!important;color:var(--w-accent-ink)!important}
html[data-world] body[data-spark-page="immersive-game"] .border-slate-700,html[data-world] body[data-spark-page="immersive-game"] .border-slate-800{border-color:var(--w-line)!important}
html[data-world] body[data-spark-page="immersive-game"] #mapContainer{color:initial!important;background:#dfe8e1!important}
