/* Create By Asking: gravity simulator (projects/gravity-simulator.html).
   Loaded after style.css, tools.css and advanced.css; reuses .adv-shell, .adv-label, .adv-group and .chip-dark.
   Same visual language as sand.css. */

.gv { gap: 12px; }

/* scenes */
.gv-scenes { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gv-scene { border: 0; cursor: pointer; border-radius: 999px; padding: 8px 13px; background: rgba(255, 255, 255, 0.08); color: #E2DAFA; font: 600 var(--step--1)/1 var(--body); white-space: nowrap; transition: background 0.15s, transform 0.1s; }
.gv-scene:hover { background: rgba(255, 255, 255, 0.16); }
.gv-scene:active { transform: scale(0.97); }
.gv-scene[aria-pressed="true"] { background: #FFC93C; color: #1C0F3F; }

/* the space itself */
.gv-stage { position: relative; aspect-ratio: 16 / 9; max-height: 72vh; border-radius: 14px; overflow: hidden; background: #0A0620; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 40px -18px rgba(0, 0, 0, 0.7); touch-action: none; user-select: none; -webkit-user-select: none; }
.gv-stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; -webkit-tap-highlight-color: transparent; outline: none; }
.gv-stage canvas:focus-visible { box-shadow: inset 0 0 0 3px #FFC93C; }

.gv-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); font: 700 0.9rem/1.25 var(--body); color: #fff; background: rgba(12, 6, 30, 0.75); padding: 10px 16px; border-radius: 99px; pointer-events: none; text-align: center; box-shadow: 0 6px 20px -8px #000; animation: gv-bob 2.2s ease-in-out infinite; }
.gv-hint[hidden] { display: none; }
.gv-hint b { color: #FFC93C; }
@keyframes gv-bob { 50% { transform: translate(-50%, -5px); } }

.gv-count { position: absolute; left: 10px; top: 10px; font: 600 0.72rem/1 var(--mono); color: rgba(255, 255, 255, 0.72); background: rgba(12, 6, 30, 0.55); padding: 6px 9px; border-radius: 8px; pointer-events: none; }
.gv-count b { color: #fff; }
.gv-paused { position: absolute; right: 10px; top: 10px; font: 800 0.78rem/1 var(--body); letter-spacing: 0.04em; color: #1C0F3F; background: #FFC93C; padding: 6px 10px; border-radius: 8px; pointer-events: none; }
.gv-paused[hidden] { display: none; }

.gv-toast { position: absolute; left: 50%; top: 44px; transform: translate(-50%, -6px); width: max-content; max-width: min(520px, calc(100% - 24px)); background: rgba(255, 201, 60, 0.96); color: #1C0F3F; font: 700 0.85rem/1.3 var(--body); padding: 9px 14px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; text-align: center; }
.gv-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* controls */
.gv-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.gv-bar .adv-group { gap: 5px; }
.gv .chip-dark { padding: 8px 12px; white-space: nowrap; }
.gv .chip-dark:hover { background: rgba(255, 255, 255, 0.16); }
.gv .chip-dark[aria-pressed="true"]:hover { background: #FFD766; }
.gv-size { display: inline-flex; align-items: center; gap: 7px; border: 0; cursor: pointer; border-radius: 999px; padding: 6px 13px 6px 7px; background: rgba(255, 255, 255, 0.08); color: #E2DAFA; font: 700 var(--step--1)/1 var(--body); white-space: nowrap; transition: background 0.15s; }
.gv-size:hover { background: rgba(255, 255, 255, 0.16); }
.gv-size[aria-pressed="true"] { background: #FFC93C; color: #1C0F3F; }
.gv-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; }
.gv-dot::before { content: ""; display: block; border-radius: 50%; }
.gv-dot-moon::before { width: 8px; height: 8px; background: radial-gradient(circle at 35% 35%, #fff, #D9D2EE 55%, #7d74a0); }
.gv-dot-small::before { width: 11px; height: 11px; background: radial-gradient(circle at 35% 35%, #ffd6e6, #FF6FA5 55%, #8a2d55); }
.gv-dot-giant::before { width: 19px; height: 19px; background: radial-gradient(circle at 35% 35%, #eadcff, #B88CFF 55%, #5a3d8c); }
.gv-dot-planet::before { width: 14px; height: 14px; background: radial-gradient(circle at 35% 35%, #c8fff8, #4FD1C5 55%, #1d6c66); }
.gv-dot-star::before { width: 20px; height: 20px; background: radial-gradient(circle at 40% 40%, #fff, #FFF2C4 45%, #FFB800); box-shadow: 0 0 10px 2px rgba(255, 201, 60, 0.6); }
.gv-sep { width: 1px; align-self: stretch; background: rgba(255, 255, 255, 0.1); }

.gv-note { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between; }
.gv-toggles { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.gv-check { display: inline-flex; align-items: center; gap: 7px; font-size: var(--step--1); color: #CBBFE8; cursor: pointer; }
.gv-check input { accent-color: #FFC93C; width: 16px; height: 16px; margin: 0; }

@media (max-width: 560px) {
  .gv-stage { aspect-ratio: 4 / 5; max-height: 68vh; }
  .gv-scenes { flex-wrap: wrap; }
  .gv-scenes::-webkit-scrollbar { display: none; }
  .gv-scenes .adv-label { display: none; }
  .gv-hint { font-size: 0.82rem; padding: 9px 13px; border-radius: 14px; }
  .gv-toast { top: 40px; font-size: 0.8rem; }
  .gv-bar { gap: 10px 12px; }
  .gv-sep { display: none; }
  .gv-size { padding: 6px 11px 6px 6px; }
}
