/* Loading and sign-in screens, version 2 ("liquid core"). Linked directly: it is needed before
   anything else. Theme variables only. <html data-gate="off"> keeps the old screens. */
#boot { position: fixed; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 6px; font: 600 15px system-ui, sans-serif; text-align: center; }
#boot > .v2g-emblem { display: none; }
:root[data-gate="off"] #boot { display: flex; align-items: center; justify-content: center; gap: .4em; opacity: .7; }
:root[data-gate="off"] #boot > :is(b, i, small) { font: inherit; }
:root:not([data-gate="off"]) #boot, :root[data-gate="v2"] #gate, .v2g-curtain-bg {
  background:
    radial-gradient(80% 48% at 50% 22%, color-mix(in srgb, var(--accent2) 20%, transparent), transparent 72%),
    radial-gradient(90% 55% at 88% 104%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 70%),
    radial-gradient(70% 45% at 6% 88%, color-mix(in srgb, var(--accent2) 10%, transparent), transparent 70%),
    var(--bg);
}
:root:not([data-gate="off"]) #boot { font: 1rem/1.45 var(--font); }
:root:not([data-gate="off"]) #boot > .v2g-emblem { display: block; --s: 132px; margin-bottom: 34px; animation: v2g-core-in .64s cubic-bezier(.22,1,.36,1) backwards; }
:root:not([data-gate="off"]) #boot > b { font-size: 1.15rem; letter-spacing: -.025em; }
:root:not([data-gate="off"]) #boot > i { display: none; }
:root:not([data-gate="off"]) #boot > small { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); animation: v2g-fade .64s .25s backwards; }

/* ---------------------------------------------------------------- the core */
.v2g-emblem { position: relative; width: var(--s, 168px); height: var(--s, 168px); flex: none; --v2g-light: var(--fg); --v2g-dot: var(--fg); }
@supports (color: light-dark(red, red)) { .v2g-emblem { --v2g-light: light-dark(var(--solid), var(--fg)); --v2g-dot: light-dark(var(--accent), var(--fg)); } }
.v2g-emblem > i { position: absolute; display: block; inset: 0; border-radius: 50%; pointer-events: none; }
.v2g-emblem > .v2g-halo { inset: -34%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 46%, transparent), color-mix(in srgb, var(--accent2) 22%, transparent) 50%, transparent 100%); animation: v2g-breathe 6s ease-in-out infinite; }
.v2g-emblem > .v2g-core { inset: 21%; overflow: hidden; isolation: isolate;
  background: radial-gradient(circle at 50% 46%, var(--accent), var(--accent2) 68%, color-mix(in srgb, var(--accent2) 45%, var(--bg)) 100%);
  box-shadow: 0 0 44px -8px color-mix(in srgb, var(--accent) 75%, transparent), inset 0 -12px 26px color-mix(in srgb, var(--bg) 60%, transparent);
  animation: v2g-swell 6s ease-in-out infinite; }
.v2g-core > i { position: absolute; inset: -22%; border-radius: 50%; animation: v2g-turn 13s linear infinite;
  background: radial-gradient(36% 27% at 30% 66%, color-mix(in srgb, var(--accent) 95%, transparent), transparent 100%), radial-gradient(30% 40% at 72% 36%, color-mix(in srgb, var(--accent2) 95%, transparent), transparent 100%), radial-gradient(22% 18% at 62% 74%, color-mix(in srgb, var(--v2g-light) 45%, transparent), transparent 100%); }
.v2g-core > i + i { animation: v2g-turn 21s linear infinite reverse;
  background: radial-gradient(28% 34% at 28% 32%, color-mix(in srgb, var(--accent2) 80%, transparent), transparent 100%), radial-gradient(40% 22% at 66% 66%, color-mix(in srgb, var(--accent) 75%, transparent), transparent 100%); }
/* the light on the sphere stays put while the liquid turns under it */
.v2g-core::after { content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: 1;
  background: radial-gradient(40% 30% at 34% 22%, color-mix(in srgb, var(--v2g-light) 72%, transparent), transparent 100%);
  box-shadow: inset 0 1px 1px color-mix(in srgb, var(--v2g-light) 60%, transparent), inset 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent); }
.v2g-emblem > .v2g-orbit { --a: 0deg; --k: .34; --inv: 2.94; --t: 9s; transform: rotate(var(--a)) scaleY(var(--k)); }
.v2g-emblem > .o1 { --a: -24deg; }
.v2g-emblem > .o2 { --a: 38deg; --k: .4; --inv: 2.5; --t: 13s; inset: 5%; }
.v2g-emblem > .o3 { --a: 96deg; --k: .3; --inv: 3.33; --t: 17s; inset: -5%; }
.v2g-orbit::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.v2g-orbit.o2::before { border-color: color-mix(in srgb, var(--accent2) 42%, transparent); }
.v2g-orbit.o3::before { border-color: color-mix(in srgb, var(--fg) 14%, transparent); }
.v2g-orbit > b { position: absolute; inset: 0; transform: rotate(var(--at, 62deg)); animation: v2g-round var(--t) linear infinite; animation-delay: calc(var(--t) * var(--phase, .17) * -1); }
.o2 > b { --at: 205deg; --phase: .57; } .o3 > b { --at: 318deg; --phase: .88; }
.v2g-orbit > b > i { position: absolute; left: 50%; top: 0; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; transform: rotate(calc(-1 * var(--at, 62deg))) scaleY(var(--inv)); background: var(--v2g-dot); box-shadow: 0 0 9px 3px color-mix(in srgb, var(--accent) 80%, transparent); animation: v2g-upright var(--t) linear infinite; animation-delay: calc(var(--t) * var(--phase, .17) * -1); }
.v2g-orbit.o2 > b > i { box-shadow: 0 0 9px 3px color-mix(in srgb, var(--accent2) 85%, transparent); }
@keyframes v2g-turn { to { transform: rotate(360deg); } }
@keyframes v2g-round { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes v2g-upright { from { transform: rotate(0deg) scaleY(var(--inv)); } to { transform: rotate(-360deg) scaleY(var(--inv)); } }
@keyframes v2g-breathe { 50% { transform: scale(1.12); opacity: .72; } }
@keyframes v2g-swell { 50% { transform: scale(1.045); } }
@keyframes v2g-core-in { from { opacity: 0; transform: scale(.55); } }
@keyframes v2g-fade { from { opacity: 0; } }
@keyframes v2g-up { from { opacity: 0; transform: translateY(18px); } }

/* ---------------------------------------------------------------- the sign-in screen */
:root[data-gate="v2"] body.signed-out #wallpaper { visibility: hidden; }
:root[data-gate="v2"] #gate { display: flex; flex-direction: column; overflow: hidden auto; padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom)); }
:root[data-gate="v2"] #gate[hidden] { display: none; }
/* a still field of far stars behind a slow nebula */
:root[data-gate="v2"] #gate::before, :root[data-gate="v2"] #gate::after { content: ""; position: fixed; pointer-events: none; }
:root[data-gate="v2"] #gate::before { inset: 0; opacity: .55;
  background-image: radial-gradient(1px 1px at 22px 34px, var(--fg), transparent 100%), radial-gradient(1px 1px at 148px 112px, color-mix(in srgb, var(--fg) 70%, transparent), transparent 100%), radial-gradient(1.5px 1.5px at 92px 208px, color-mix(in srgb, var(--accent) 90%, transparent), transparent 100%), radial-gradient(1px 1px at 232px 58px, color-mix(in srgb, var(--fg) 55%, transparent), transparent 100%);
  background-size: 263px 241px, 311px 283px, 397px 367px, 223px 199px; }
:root[data-theme="daylight"][data-gate="v2"] #gate::before { opacity: .2; }
:root[data-gate="v2"] #gate::after { left: 50%; top: 4%; width: 130vmax; height: 70vmax; margin-left: -65vmax; opacity: .8;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 12%, transparent), transparent 100%); animation: v2g-breathe 11s ease-in-out infinite; }

:is(#gate, .mo-melt) .v2g-card { position: relative; z-index: 1; margin: auto; width: min(380px, 100%); flex: none; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0;
  background: none; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; animation: none; text-align: center; }
:is(#gate, .mo-melt) .v2g-card.shake { animation: shake .42s cubic-bezier(.65,0,.35,1); }

.v2g-stage { --s: clamp(138px, 22vh, 188px); position: relative; width: var(--s); height: var(--s); margin: 14px 0 28px; flex: none; }
:is(#gate, .mo-melt) .v2g-card:not(.v2g-again) .v2g-stage { animation: v2g-core-in .64s cubic-bezier(.34,1.56,.64,1) backwards; }
.v2g-stage .v2g-emblem { --s: inherit; width: 100%; height: 100%; }
.v2g-title { display: block; margin: 0; font-size: 2.45rem; line-height: 1.1; letter-spacing: -.025em; font-weight: 700; }
.v2g-title span { display: inline-block; }
:is(#gate, .mo-melt) .v2g-card:not(.v2g-again) .v2g-title span { animation: v2g-letter .64s cubic-bezier(.22,1,.36,1) backwards; animation-delay: calc(60ms + var(--i) * 35ms); }
@keyframes v2g-letter { from { opacity: 0; transform: translateY(.45em) scale(.9); } }
:is(#gate, .mo-melt) .v2g-card .v2g-sub { margin: 10px 0 0; max-width: 30ch; color: var(--muted); font-size: 1.02rem; line-height: 1.5; text-wrap: balance; }
.v2g-sub b { color: var(--fg); }
:is(#gate, .mo-melt) .v2g-card .v2g-status { min-height: 2.9em; margin: 8px 0 4px; padding: 0 6px; display: grid; place-items: center; font-size: .95rem; color: var(--muted); overflow-wrap: anywhere; }
:is(#gate, .mo-melt) .v2g-card .v2g-status[data-tone="bad"] { color: var(--bad); }
:is(#gate, .mo-melt) .v2g-card .v2g-status[data-tone="warn"] { color: var(--warn); }
:is(#gate, .mo-melt) .v2g-card .v2g-status[data-tone="ok"] { color: var(--good); font-weight: 600; }
.v2g-status:not(:empty) { animation: v2g-fade .32s; }

.v2g-panel { width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--fg) 9%, transparent);
  background: color-mix(in srgb, var(--solid) 55%, transparent); backdrop-filter: blur(28px) saturate(170%); -webkit-backdrop-filter: blur(28px) saturate(170%);
  box-shadow: 0 30px 70px -34px color-mix(in srgb, var(--bg) 20%, #000), inset 0 1px 0 color-mix(in srgb, var(--fg) 12%, transparent); }
:is(#gate, .mo-melt) .v2g-card:not(.v2g-again) .v2g-panel { animation: v2g-up .5s .04s cubic-bezier(.22,1,.36,1) backwards; }
:is(#gate, .mo-melt) .v2g-card .v2g-foot { margin-top: 18px; color: var(--muted); font-size: .78rem; line-height: 1.5; text-wrap: balance; }
:is(#gate, .mo-melt) .v2g-card:not(.v2g-again) .v2g-sub, :is(#gate, .mo-melt) .v2g-card:not(.v2g-again) .v2g-foot { animation: v2g-up .64s .2s cubic-bezier(.22,1,.36,1) backwards; }

:is(#gate, .mo-melt) .v2g-card .btn { position: relative; overflow: hidden; width: 100%; height: 52px; border-radius: 12px; font-size: 1.05rem; font-weight: 620; gap: 10px; }
:is(#gate, .mo-melt) .v2g-card .btn.primary { box-shadow: 0 14px 30px -16px var(--accent), inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent); }
:is(#gate, .mo-melt) .v2g-card .btn:active:not(:disabled) { transform: scale(.97); }
:is(#gate, .mo-melt) .v2g-card .btn.v2g-working:disabled { opacity: 1; cursor: progress; }
/* a band of light crosses the button while we wait for the device */
.v2g-card .btn.v2g-working::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(105deg, transparent 30%, color-mix(in srgb, #fff 55%, transparent) 50%, transparent 70%); animation: v2g-shine 1.5s cubic-bezier(.65,0,.35,1) infinite; }
@keyframes v2g-shine { to { transform: translateX(100%); } }
:is(#gate, .mo-melt) .v2g-card .v2g-invite::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--fg); opacity: 0; animation: v2g-invite 1.8s .3s 3 ease-out; }
@keyframes v2g-invite { 0% { opacity: .9; } 100% { opacity: 0; transform: scale(1.04, 1.18); } }

/* 16px or more, or an iPhone zooms the page when a box is tapped */
:is(#gate, .mo-melt) .v2g-card input { width: 100%; height: 50px; margin: 0; padding: 0 14px; border-radius: 12px; font-size: max(16px, 1.1rem); text-align: center; color: var(--fg);
  background: var(--field); border: 1px solid color-mix(in srgb, var(--fg) 11%, transparent); outline: 0; transition: border-color .16s, box-shadow .32s; }
:is(#gate, .mo-melt) .v2g-card input::placeholder { color: var(--muted); opacity: .85; }
:is(#gate, .mo-melt) .v2g-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--tint), .2); }

/* ---------------------------------------------------------------- add this device, in three steps */
.v2g-add summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 6px; border-radius: 12px; cursor: pointer; color: var(--muted); font-size: .98rem; }
.v2g-add summary::-webkit-details-marker { display: none; }
.v2g-add summary::before { content: "+"; font-size: 1.3em; line-height: 1; transition: transform .32s cubic-bezier(.34,1.56,.64,1); }
.v2g-add[open] summary::before { transform: rotate(45deg); }
.v2g-add summary:hover { color: var(--fg); background: var(--field); }
:is(#gate, .mo-melt) .v2g-add { text-align: left; width: 100%; }
.v2g-steps { list-style: none; margin: 6px 0 2px; padding: 0; display: flex; flex-direction: column; }
.v2g-steps li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 0 2px 16px; animation: v2g-up .32s cubic-bezier(.22,1,.36,1) backwards; }
.v2g-steps li:nth-child(2) { animation-delay: 45ms; } .v2g-steps li:nth-child(3) { animation-delay: 90ms; padding-bottom: 0; }
.v2g-steps li:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--track); }
.v2g-steps li > b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .85rem; font-variant-numeric: tabular-nums; border: 1px solid var(--line-strong); color: var(--muted); transition: background .32s, color .32s, border-color .32s, transform .32s cubic-bezier(.34,1.56,.64,1); }
.v2g-steps li > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-top: 4px; }
.v2g-steps strong { font-size: .98rem; font-weight: 620; }
:is(#gate, .mo-melt) .v2g-steps small { color: var(--muted); font-size: .84rem; line-height: 1.5; margin-top: -4px; }
.v2g-steps code { font: .92em var(--mono); color: var(--fg); background: var(--track); border-radius: 6px; padding: 1px 6px; white-space: nowrap; user-select: all; -webkit-user-select: all; }
.v2g-steps[data-at="1"] li[data-step="1"] > b, .v2g-steps[data-at="2"] li[data-step="2"] > b, .v2g-steps[data-at="3"] li[data-step="3"] > b { background: var(--accent); border-color: var(--accent); color: var(--bg); transform: scale(1.1); }
.v2g-steps[data-at="2"] li[data-step="1"]::before, .v2g-steps[data-at="3"] li[data-step="1"]::before, .v2g-steps[data-at="3"] li[data-step="2"]::before { background: var(--accent); }
:is(#gate, .mo-melt) .v2g-card input[name="code"] { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
:is(#gate, .mo-melt) .v2g-card input[name="code"]::placeholder { font-family: var(--font); letter-spacing: normal; text-transform: none; }
/* while adding a device, signing in steps back and registering is the thing to press */
:is(#gate, .mo-melt) .v2g-card:has(.v2g-add[open]) .v2g-go:not(.v2g-working) { height: 44px; background: var(--field); color: var(--fg); box-shadow: none; border-color: color-mix(in srgb, var(--fg) 11%, transparent); font-size: .98rem; }
:is(#gate, .mo-melt) .v2g-card .v2g-steps[data-at="3"] .v2g-reg:not(:disabled) { color: #06101f; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; }
/* room for the steps on a small screen */
:is(#gate, .mo-melt) .v2g-card:has(.v2g-add[open]) .v2g-stage { --s: 96px; margin: 2px 0 12px; }
:is(#gate, .mo-melt) .v2g-card:has(.v2g-add[open]) .v2g-sub { display: none; }
:is(#gate, .mo-melt) .v2g-card:has(.v2g-add[open]) .v2g-title { font-size: 1.7rem; }

/* ---------------------------------------------------------------- what the core says: waiting, yes, no, cancelled */
.v2g-glyph { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--fg); stroke-width: 3.1; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.v2g-glyph > * { opacity: 0; transform-origin: 50px 50px; transition: opacity .16s; }
.v2g-glyph path, .v2g-glyph rect { stroke-dasharray: 1.02 1.02; }
.v2g-glyph .v2g-ring { stroke-width: 1.6; }
.v2g-glyph .v2g-scan { stroke: var(--accent); stroke-width: 2.2; }
.v2g-core::before { content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: 2; background: var(--solid); opacity: 0; transition: opacity .32s; }
.v2g-burst { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--good); opacity: 0; pointer-events: none; }
.v2g-stage .v2g-emblem > .v2g-orbit { transition: opacity .32s; }
/* the sphere turns into plain glass so the sign on it reads */
.v2g-stage:is([data-state="wait"], [data-state="ok"], [data-state="fail"], [data-state="cancel"]) .v2g-core::before { opacity: .74; }
.v2g-stage:is([data-state="wait"], [data-state="ok"], [data-state="fail"], [data-state="cancel"]) .v2g-orbit { opacity: .22; }
.v2g-stage:is([data-state="wait"], [data-state="ok"], [data-state="fail"], [data-state="cancel"]) .v2g-orbit > b { visibility: hidden; }
.v2g-stage[data-state="wait"][data-kind="face"] .v2g-face, .v2g-stage[data-state="cancel"][data-kind="face"] .v2g-face,
.v2g-stage[data-state="wait"][data-kind="lock"] .v2g-lock, .v2g-stage[data-state="cancel"][data-kind="lock"] .v2g-lock { opacity: 1; }
.v2g-stage[data-state="wait"] .v2g-glyph g path, .v2g-stage[data-state="wait"] .v2g-glyph g rect { animation: v2g-draw .64s cubic-bezier(.22,1,.36,1) backwards; }
.v2g-stage[data-state="wait"] .v2g-glyph g > :nth-child(n+5), .v2g-stage[data-state="wait"] .v2g-glyph .v2g-lock > :nth-child(n+2) { animation-delay: .18s; }
.v2g-stage[data-state="wait"] .v2g-face { animation: v2g-look 2.4s ease-in-out .5s infinite; }
.v2g-stage[data-state="wait"] .v2g-scan { opacity: .95; animation: v2g-scan 1.7s cubic-bezier(.65,0,.35,1) infinite; }
.v2g-stage[data-state="wait"] .v2g-ring { opacity: 1; stroke: var(--accent); stroke-width: 2.4; stroke-dasharray: 22 78; animation: v2g-turn 1.25s linear infinite; }
.v2g-stage[data-state="wait"] .v2g-halo { animation-duration: 1.6s; }
.v2g-stage[data-state="ok"] .v2g-ring { opacity: 1; stroke: var(--good); stroke-width: 2.8; stroke-dasharray: 101 101; transform: rotate(-90deg); animation: v2g-ringdraw .5s cubic-bezier(.22,1,.36,1) backwards; }
.v2g-stage[data-state="ok"] .v2g-check { opacity: 1; stroke: var(--good); stroke-width: 5; animation: v2g-draw .42s .16s cubic-bezier(.22,1,.36,1) backwards; }
.v2g-stage[data-state="ok"] .v2g-emblem { animation: v2g-pop .55s cubic-bezier(.34,1.56,.64,1); }
.v2g-stage[data-state="ok"] .v2g-burst { animation: v2g-burst .8s .1s cubic-bezier(.22,1,.36,1); }
.v2g-stage[data-state="fail"] .v2g-ring { opacity: 1; stroke: var(--bad); stroke-width: 2.6; }
.v2g-stage[data-state="fail"] .v2g-cross { opacity: 1; stroke: var(--bad); stroke-width: 4.6; }
.v2g-stage[data-state="fail"] .v2g-cross path { animation: v2g-draw .32s cubic-bezier(.22,1,.36,1) backwards; }
.v2g-stage[data-state="fail"] .v2g-cross path + path { animation-delay: .14s; }
.v2g-stage[data-state="fail"] .v2g-burst { border-color: var(--bad); animation: v2g-burst .7s cubic-bezier(.22,1,.36,1); }
.v2g-stage[data-state="cancel"] .v2g-ring { opacity: 1; stroke: var(--warn); stroke-dasharray: 2.5 3.75; }
.v2g-stage[data-state="cancel"] :is(.v2g-face, .v2g-lock) { stroke: var(--warn); animation: v2g-settle .64s cubic-bezier(.34,1.56,.64,1); }
@keyframes v2g-draw { from { stroke-dashoffset: 1.02; } }
@keyframes v2g-ringdraw { from { stroke-dashoffset: 101; } }
@keyframes v2g-scan { 0%, 100% { transform: translateY(-17px); opacity: .2; } 50% { transform: translateY(17px); opacity: .95; } }
@keyframes v2g-look { 30% { transform: translateX(2.2px); } 70% { transform: translateX(-2.2px); } }
@keyframes v2g-pop { 35% { transform: scale(1.14); } }
@keyframes v2g-burst { 0% { opacity: .9; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.75); } }
@keyframes v2g-settle { 0% { transform: scale(1.12); } }

/* ---------------------------------------------------------------- the way into the dashboard */
.v2g-curtain { position: fixed; inset: 0; z-index: 160; overflow: hidden; contain: strict; }
.v2g-curtain-bg { position: absolute; inset: 0; }
.v2g-curtain-core { position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; translate: -50% calc(-50% - 34px); }
.v2g-curtain-core .v2g-emblem { width: 100%; height: 100%; }
/* only if the dashboard takes a moment: an arc says it is still being put together */
.v2g-curtain-core::after { content: ""; position: absolute; inset: 6%; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); opacity: 0; animation: v2g-turn 1s linear infinite, v2g-appear .32s .45s forwards; }
.v2g-curtain.opening .v2g-curtain-core::after { display: none; }
@keyframes v2g-appear { to { opacity: .9; } }
.v2g-wave { position: absolute; inset: 0; border-radius: 50%; opacity: 0; border: 2px solid var(--accent); box-shadow: 0 0 24px var(--accent), inset 0 0 24px var(--accent2); }

/* short screens (a phone lying down, or with the keyboard up) */
@media (max-height: 440px) { .v2g-stage.v2g-stage { --s: 80px; margin: 0 0 6px; } :is(#gate, .mo-melt) .v2g-card .v2g-sub { margin-top: 4px; } }
@media (max-height: 640px) {
  .v2g-stage { --s: 108px; margin: 2px 0 14px; }
  .v2g-title { font-size: 1.8rem; }
  :is(#gate, .mo-melt) .v2g-card .v2g-status { min-height: 2em; margin: 4px 0; }
  :is(#gate, .mo-melt) .v2g-card .v2g-foot { margin-top: 10px; }
}
@media (min-width: 701px) and (min-height: 800px) { .v2g-stage { --s: clamp(210px, 27vh, 300px); margin: 0 0 34px; } .v2g-title { font-size: 2.9rem; } }

/* calm: the core only breathes; off and reduced motion are handled by the global rules */
:root[data-motion="calm"] .v2g-orbit > b, :root[data-motion="calm"] .v2g-orbit > b > i, :root[data-motion="calm"] .v2g-core > i { animation: none; }
:root[data-motion="calm"] :is(#gate, .mo-melt) .v2g-card:not(.v2g-again) :is(.v2g-stage, .v2g-title span, .v2g-panel, .v2g-sub, .v2g-foot) { animation: v2g-fade .32s backwards; }
