/* Alma — Gadget · business card (minimal, high-contrast) */

:root {
  --bg: #030304;
  --ease-soft: cubic-bezier(0.45, 0, 0.55, 1);
  --glass-bg: rgba(255, 255, 255, 0.028);
  --glass-border: rgba(255, 255, 255, 0.078);
  --glass-inner: rgba(255, 255, 255, 0.022);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: rgba(255, 255, 255, 0.9);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body:not(.alma-ready) {
  overflow: hidden;
}

body:not(.alma-ready) .gadget-main,
body:not(.alma-ready) .top-glass-dock,
body:not(.alma-ready) .bottom-glass,
body:not(.alma-ready) .audio-corner {
  visibility: hidden;
  pointer-events: none;
}

.gadget-skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.gadget-skip:focus {
  left: max(0.5rem, env(safe-area-inset-left));
  top: max(0.5rem, env(safe-area-inset-top));
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: #111;
  z-index: 200010;
  outline: 1px solid rgba(255, 255, 255, 0.3);
}

.top-glass {
  position: fixed;
  top: max(0.65rem, calc(env(safe-area-inset-top) + 0.35rem));
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.15rem, 1.2vw, 0.45rem);
  padding: 0.42rem clamp(0.45rem, 1.5vw, 0.65rem);
  border-radius: 9999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 1px 0 var(--glass-inner) inset;
  backdrop-filter: blur(14px) saturate(1.04);
  -webkit-backdrop-filter: blur(14px) saturate(1.04);
  pointer-events: auto;
  max-width: calc(100vw - 1.25rem);
}

.top-glass nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0.05rem, 0.8vw, 0.28rem);
}

.top-glass a {
  font-size: clamp(0.52rem, 1.05vw, 0.62rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.52);
  padding: 0.32rem 0.42rem;
  border-radius: 9999px;
  transition: color 0.35s var(--ease-soft), background 0.35s var(--ease-soft);
}

.top-glass a:hover,
.top-glass a:focus-visible {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.04);
}

.top-glass a.top-glass__here {
  color: rgba(230, 236, 255, 0.95);
  background: rgba(255, 255, 255, 0.06);
}

.top-glass__lab-home {
  color: rgba(200, 210, 255, 0.75) !important;
}

.gadget-main {
  position: relative;
  z-index: 100;
  min-height: 100dvh;
  padding: clamp(5rem, 12vh, 6.5rem) clamp(1rem, 4vw, 2rem) clamp(6rem, 14vh, 8rem);
  max-width: min(72rem, 100%);
  margin: 0 auto;
}

@media (max-width: 640px) {
  .gadget-main {
    padding-top: max(clamp(5.85rem, 15vw, 7.25rem), calc(env(safe-area-inset-top, 0px) + 4.35rem));
  }
}

.gadget-main::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(90, 26, 46, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 80% 70%, rgba(26, 39, 68, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(45, 74, 63, 0.08) 0%, transparent 45%);
}

.gadget-hero {
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
  text-align: start;
}

.gadget-hero__page-title {
  font-size: clamp(1.05rem, 3vw, 1.55rem);
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 252, 255, 0.88);
  margin: 0 0 0.65rem;
}

.gadget-hero__avail {
  font-size: clamp(0.74rem, 1.4vw, 0.86rem);
  line-height: 1.65;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.58);
  max-width: 40rem;
  margin: 0 0 clamp(0.85rem, 2vw, 1.15rem);
  text-align: start;
}

.gadget-hero__avail strong {
  font-weight: 400;
  color: rgba(255, 250, 245, 0.88);
}

.gadget-hero__avail-muted {
  color: rgba(255, 255, 255, 0.38);
  font-weight: 300;
}

.gadget-hero__avail-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.gadget-hero__avail-link:hover,
.gadget-hero__avail-link:focus-visible {
  color: rgba(230, 236, 255, 0.95);
}

@media (min-width: 520px) {
  .gadget-hero__avail-break {
    display: block;
    height: 0.35rem;
  }
}

.gadget-tool-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(0.75rem, 2.5vw, 1.15rem);
  margin-bottom: clamp(1rem, 2.5vw, 1.35rem);
  max-width: 48rem;
}

.gadget-tool-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-radius: 1.05rem;
  padding: clamp(1rem, 2.2vw, 1.25rem) clamp(1.05rem, 2.4vw, 1.35rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 6, 12, 0.55);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 0 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  min-height: 6.5rem;
}

.gadget-tool-card--active {
  border-color: rgba(200, 195, 255, 0.42);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28) inset,
    0 0 56px rgba(190, 180, 255, 0.12),
    0 0 120px rgba(255, 252, 248, 0.06);
}

.gadget-tool-card--soon {
  opacity: 0.72;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.14);
}

.gadget-tool-card__glow {
  position: absolute;
  inset: -40%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 70% at 28% 32%, rgba(255, 252, 248, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse 65% 60% at 72% 58%, rgba(200, 210, 255, 0.12) 0%, transparent 58%),
    radial-gradient(ellipse 50% 45% at 50% 100%, rgba(255, 248, 238, 0.08) 0%, transparent 50%);
  filter: blur(18px);
  opacity: 0.75;
  animation: gadget-tool-glow 9s ease-in-out infinite;
}

.gadget-tool-card__glow--muted {
  opacity: 0.38;
  animation-duration: 12s;
}

@keyframes gadget-tool-glow {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(1) translate(0, 0);
  }
  40% {
    opacity: 0.85;
    transform: scale(1.03) translate(1%, -1%);
  }
  70% {
    opacity: 0.72;
    transform: scale(0.99) translate(-1%, 1%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gadget-tool-card__glow {
    animation: none;
    opacity: 0.55;
  }
}

.gadget-tool-card__badge {
  position: relative;
  z-index: 1;
  margin: 0 0 0.5rem;
  align-self: flex-start;
  font-size: clamp(0.42rem, 0.85vw, 0.5rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.gadget-tool-card__badge--live {
  color: rgba(220, 255, 230, 0.92);
  background: rgba(40, 120, 90, 0.25);
  border-color: rgba(120, 220, 170, 0.35);
  box-shadow: 0 0 20px rgba(100, 200, 150, 0.12);
}

.gadget-tool-card__badge--soon {
  color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.04);
}

.gadget-tool-card__title {
  position: relative;
  z-index: 1;
  font-size: clamp(0.72rem, 1.45vw, 0.88rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 252, 255, 0.94);
  margin: 0 0 0.45rem;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.12);
}

.gadget-tool-card__meta {
  position: relative;
  z-index: 1;
  font-size: clamp(0.58rem, 1.05vw, 0.68rem);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.48);
  margin: 0;
  line-height: 1.45;
}

.gadget-tool-card__soon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.32rem 0.65rem;
  border-radius: 9999px;
  font-size: clamp(0.48rem, 0.92vw, 0.55rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 24px rgba(200, 190, 255, 0.08);
}

.gadget-hero__eyebrow {
  font-size: clamp(0.48rem, 0.95vw, 0.55rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.5rem;
}

.gadget-hero__lead {
  font-size: clamp(0.74rem, 1.35vw, 0.86rem);
  line-height: 1.65;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.52);
  max-width: 40rem;
  margin: 0 0 clamp(0.85rem, 2vw, 1.15rem);
  text-align: start;
}

.gadget-hero__lead strong {
  font-weight: 400;
  color: rgba(255, 250, 245, 0.88);
}

.gadget-hero__lead:last-child {
  margin-bottom: 0;
}

.gadget-hero__ethos {
  font-size: clamp(0.68rem, 1.22vw, 0.8rem);
  line-height: 1.62;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.44);
  max-width: 42rem;
  margin: 0;
  padding-top: clamp(0.75rem, 1.8vw, 1rem);
  border-top: 1px solid rgba(200, 195, 255, 0.12);
  text-align: start;
}

.gadget-hero__ethos strong {
  font-weight: 400;
  color: rgba(215, 218, 255, 0.88);
}

.gadget-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

@media (max-width: 900px) {
  .gadget-grid {
    grid-template-columns: 1fr;
  }

  .gadget-panel {
    order: 2;
  }

  .gadget-preview-wrap {
    order: 1;
  }
}

.gadget-panel {
  border-radius: 1rem;
  padding: clamp(1rem, 2.4vw, 1.35rem);
  background: rgba(6, 6, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
  backdrop-filter: blur(12px) saturate(1.03);
  -webkit-backdrop-filter: blur(12px) saturate(1.03);
}

.gadget-panel__title {
  font-size: clamp(0.62rem, 1.1vw, 0.72rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1rem;
}

.gadget-field {
  margin-bottom: 0.85rem;
}

.gadget-field label {
  display: block;
  font-size: clamp(0.5rem, 0.9vw, 0.58rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 0.35rem;
}

.gadget-field input[type="text"],
.gadget-field input[type="email"],
.gadget-field input[type="tel"],
.gadget-field input[type="url"],
.gadget-field textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: clamp(0.72rem, 1.2vw, 0.82rem);
}

.gadget-field textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.gadget-field__hint {
  font-size: clamp(0.55rem, 1vw, 0.62rem);
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.25rem;
}

.gadget-field__err {
  font-size: clamp(0.55rem, 1vw, 0.62rem);
  color: rgba(255, 160, 150, 0.85);
  margin-top: 0.25rem;
  min-height: 1em;
}

.gadget-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(0.65rem, 1.15vw, 0.75rem);
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.gadget-toggle input {
  accent-color: rgba(200, 190, 255, 0.9);
}

/* Build panel: same handle legend as Preview, always visible (not only square). */
.gadget-build__handles {
  margin: 0.65rem 0 0.35rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25) inset;
}

.gadget-build__handles__title {
  margin: 0 0 0.35rem;
  font-size: clamp(0.52rem, 0.95vw, 0.62rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 230, 210, 0.72);
}

.gadget-build__handles__body {
  margin: 0;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.42);
}

.gadget-build__handles__body strong {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.gadget-photo-shapes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.gadget-photo-shapes--primary .gadget-photo-shape {
  min-width: 5.5rem;
  justify-content: center;
}

.gadget-photo-zoom-row {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gadget-photo-zoom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: clamp(0.52rem, 0.95vw, 0.62rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.35rem;
}

.gadget-photo-zoom__value {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.72);
}

.gadget-photo-zoom-row input[type="range"] {
  width: 100%;
  accent-color: rgba(200, 190, 255, 0.85);
  cursor: pointer;
}

.gadget-photo-shape {
  font: inherit;
  font-size: clamp(0.52rem, 0.95vw, 0.62rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: color 0.3s var(--ease-soft), background 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft);
}

.gadget-photo-shape[aria-pressed="true"] {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(200, 190, 255, 0.14);
  border-color: rgba(200, 190, 255, 0.42);
  box-shadow: 0 0 20px rgba(180, 160, 255, 0.12);
}

.gadget-photo-shape:hover,
.gadget-photo-shape:focus-visible {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.28);
  outline: none;
}

.gadget-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.gadget-swatch {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.gadget-swatch[aria-checked="true"] {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 255, 255, 0.15);
}

.gadget-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.gadget-btn {
  font: inherit;
  font-size: clamp(0.58rem, 1.05vw, 0.68rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.65rem 1.1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft);
}

.gadget-btn:hover,
.gadget-btn:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 28px rgba(200, 190, 255, 0.12);
}

.gadget-btn--quiet {
  margin-top: 0.5rem;
  padding-block: 0.45rem;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.14);
}

.gadget-photo-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 5.5rem;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: border-color 0.3s var(--ease-soft), background 0.3s var(--ease-soft);
}

.gadget-photo-dropzone:hover,
.gadget-photo-dropzone:focus-visible {
  border-color: rgba(200, 190, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.gadget-photo-dropzone--drag {
  border-color: rgba(200, 190, 255, 0.75);
  background: rgba(200, 190, 255, 0.08);
}

.gadget-photo-dropzone__text {
  font-size: clamp(0.62rem, 1.1vw, 0.72rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.gadget-photo-dropzone__sub {
  font-size: clamp(0.5rem, 0.9vw, 0.55rem);
  color: rgba(255, 255, 255, 0.35);
}

.gadget-photo-dropzone__browse {
  font-size: clamp(0.55rem, 1vw, 0.65rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(210, 200, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gadget-preview-wrap {
  position: sticky;
  top: max(5rem, calc(env(safe-area-inset-top) + 4rem));
}

.gadget-preview__handles-hint {
  margin: -0.15rem 0 0.55rem;
  max-width: 28rem;
}

.gadget-preview__handles-hint strong {
  font-weight: 500;
  color: rgba(235, 232, 255, 0.78);
}

.gadget-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gadget-card--single {
  --card-bg: #0a0a0c;
  --card-fg: #f4f0eb;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  aspect-ratio: 1.75 / 1;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: visible;
  position: relative;
  background: var(--card-bg);
  color: var(--card-fg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transition: border-color 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft);
}

.gadget-card--single.gadget-card--minimal {
  border: none;
  box-shadow: none;
  border-radius: 0.5rem;
}

.gadget-card__drop-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s var(--ease-soft);
}

.gadget-card__drop-layer.gadget-card__drop-layer--active {
  pointer-events: auto;
  opacity: 1;
  background: rgba(200, 190, 255, 0.12);
  border: 2px dashed rgba(200, 190, 255, 0.55);
}

.gadget-card--single .gadget-card__veil {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, transparent 36%, transparent 64%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
  z-index: 1;
}

.gadget-card--single.gadget-card--minimal .gadget-card__veil {
  opacity: 0.85;
}

.gadget-card--single .gadget-card__brand-top {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  right: 0.55rem;
  font-size: clamp(0.5rem, 1.65vw, 0.66rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.35;
  text-align: center;
  z-index: 3;
  pointer-events: none;
  transition: text-align 0.2s ease;
}

.gadget-card--single.gadget-card--has-photo .gadget-card__brand-top {
  text-align: left;
  right: 52%;
}

.gadget-card--single .gadget-card__brand-bottom {
  position: absolute;
  bottom: 0.45rem;
  left: 0.45rem;
  right: 0.45rem;
  font-size: clamp(0.34rem, 1.15vw, 0.46rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.4;
  text-align: center;
  z-index: 3;
  pointer-events: none;
}

.gadget-card--single.gadget-card--has-photo .gadget-card__brand-bottom {
  text-align: left;
  right: 52%;
}

.gadget-card--single .gadget-card__footer {
  position: absolute;
  bottom: 0.35rem;
  left: 0.45rem;
  right: 0.45rem;
  text-align: center;
  font-size: clamp(0.3rem, 1vw, 0.4rem);
  letter-spacing: 0.1em;
  line-height: 1.4;
  opacity: 0.82;
  z-index: 3;
  pointer-events: none;
}

.gadget-card--single.gadget-card--has-photo .gadget-card__footer {
  text-align: left;
  right: 52%;
}

.gadget-card--single .gadget-card__footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gadget-card__qr-slot {
  position: absolute;
  z-index: 4;
  background: #fff;
  border-radius: 0.2rem;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  touch-action: none;
  overflow: hidden;
}

.gadget-card__qr-slot[data-qr-shape="square"] {
  border-radius: 0.35rem;
  aspect-ratio: 1 / 1;
  height: auto !important;
}

.gadget-card__qr-slot[data-qr-shape="circle"] {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  height: auto !important;
}

.gadget-card__qr-slot[data-qr-shape="pillar"] {
  border-radius: 0.35rem;
  aspect-ratio: 2 / 3;
  height: auto !important;
}

.gadget-card__qr-slot[data-qr-shape="rect"] {
  border-radius: 0.2rem;
}

.gadget-card__qr-slot .gadget-card__qr {
  width: 88%;
  height: 88%;
  display: grid;
  place-items: center;
}

.gadget-card__qr-slot .gadget-card__qr img,
.gadget-card__qr-slot .gadget-card__qr canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.gadget-card__photo-slot {
  position: absolute;
  z-index: 2;
  border-radius: 0.25rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  touch-action: none;
}

.gadget-card__photo-slot[data-photo-shape="square"] {
  border-radius: 0.4rem;
  aspect-ratio: 1 / 1;
  height: auto !important;
}

.gadget-card__photo-slot[data-photo-shape="circle"] {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  height: auto !important;
}

.gadget-card__photo-slot[data-photo-shape="pillar"] {
  border-radius: 0.4rem;
  aspect-ratio: 2 / 3;
  height: auto !important;
}

.gadget-card__photo-slot[data-photo-shape="rect"] {
  border-radius: 0.25rem;
}

.gadget-card__photo-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, transparent 40%, transparent 65%, rgba(0, 0, 0, 0.48) 100%);
}

.gadget-card__photo-slot .gadget-card__photo-host {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.gadget-card__photo-slot .gadget-card__photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  touch-action: none;
  cursor: grab;
}

.gadget-card__photo-slot .gadget-card__photo.gadget-card__photo--panning {
  cursor: grabbing;
}

/* Portrait stacks above QR so move/resize handles are not buried under the code (both are draggable). */
.gadget-card--single.gadget-card--has-photo .gadget-card__qr-slot {
  z-index: 5;
}

.gadget-card--single.gadget-card--has-photo .gadget-card__photo-slot {
  z-index: 6;
}

.gadget-card__nub {
  position: absolute;
  z-index: 5;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.25rem;
  background: rgba(8, 8, 14, 0.88);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.65rem;
  line-height: 1;
  cursor: move;
  display: grid;
  place-items: center;
  opacity: 0.9;
  transition: opacity 0.25s var(--ease-soft), transform 0.2s var(--ease-soft), border-color 0.2s var(--ease-soft);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
}

.gadget-card__qr-slot:hover .gadget-card__nub,
.gadget-card__qr-slot:focus-within .gadget-card__nub,
.gadget-card__photo-slot:hover .gadget-card__nub,
.gadget-card__photo-slot:focus-within .gadget-card__nub {
  opacity: 1;
}

.gadget-card__nub:hover,
.gadget-card__nub:focus-visible {
  opacity: 1;
  border-color: rgba(200, 190, 255, 0.55);
  transform: scale(1.05);
}

@media (pointer: coarse) {
  .gadget-card__nub {
    width: 1.55rem;
    height: 1.55rem;
    font-size: 0.72rem;
    opacity: 1;
  }
}

.gadget-card__nub--move {
  top: -0.15rem;
  left: -0.15rem;
}

.gadget-card__nub--resize {
  bottom: -0.15rem;
  right: -0.15rem;
  cursor: nwse-resize;
}

.gadget-card__nub--zoom-inner {
  bottom: -0.15rem;
  left: -0.15rem;
  cursor: ns-resize;
  font-size: 0.55rem;
}

.gadget-card--single:not(.gadget-card--has-photo) .gadget-card__nub--move,
.gadget-card--single:not(.gadget-card--has-photo) .gadget-card__nub--resize {
  top: auto;
  left: auto;
  bottom: auto;
  right: auto;
}

.gadget-card--single:not(.gadget-card--has-photo) .gadget-card__nub--move {
  top: -0.2rem;
  left: 50%;
  transform: translateX(-50%);
}

.gadget-card--single:not(.gadget-card--has-photo) .gadget-card__nub--resize {
  bottom: -0.2rem;
  right: 50%;
  transform: translateX(50%);
}

/* Footer shell: alma-universal.css (.alma-media-foot--segments = liquid glass) */

/* Hub: tool tiles — links and the Breathe button share the same chrome */
a.gadget-tool-card,
button.gadget-tool-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    transform 0.35s var(--ease-soft),
    border-color 0.35s var(--ease-soft),
    box-shadow 0.35s var(--ease-soft);
}

button.gadget-tool-card {
  appearance: none;
  font: inherit;
  text-align: inherit;
  width: 100%;
  margin: 0;
}

a.gadget-tool-card:hover,
a.gadget-tool-card:focus-visible,
button.gadget-tool-card:hover,
button.gadget-tool-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(220, 215, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28) inset,
    0 0 64px rgba(190, 180, 255, 0.16),
    0 0 120px rgba(255, 252, 248, 0.08);
}

a.gadget-tool-card:focus-visible,
button.gadget-tool-card:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.35);
  outline-offset: 3px;
}

.gadget-hero__crumb {
  font-size: clamp(0.58rem, 1vw, 0.68rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin: 0 0 0.75rem;
  text-align: start;
}

.gadget-hero__crumb a {
  color: rgba(220, 215, 255, 0.78);
  text-decoration: none;
  border-bottom: 1px solid rgba(220, 215, 255, 0.28);
}

.gadget-hero__crumb a:hover,
.gadget-hero__crumb a:focus-visible {
  color: rgba(255, 252, 255, 0.92);
  border-bottom-color: rgba(255, 252, 255, 0.45);
}

/* Segmented gadget rail — Card · Logo · Breathe (shared across tool pages) */
.gadget-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.18rem;
  margin: 0 0 1rem;
  align-self: flex-start;
  padding: 0.2rem;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 9999px;
  background: rgba(4, 4, 12, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 6px 28px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
}

.gadget-switcher__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.78rem;
  border-radius: 9999px;
  text-decoration: none;
  font-size: clamp(0.52rem, 0.95vw, 0.62rem);
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(200, 198, 235, 0.58);
  border: 1px solid transparent;
  transition:
    color 0.28s var(--ease-soft),
    background 0.28s var(--ease-soft),
    border-color 0.28s var(--ease-soft),
    box-shadow 0.28s var(--ease-soft),
    transform 0.22s var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
}

.gadget-switcher__link:hover {
  color: rgba(255, 252, 255, 0.92);
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

.gadget-switcher__link:focus-visible {
  outline: 1px solid rgba(200, 190, 255, 0.5);
  outline-offset: 2px;
  color: rgba(255, 252, 255, 0.95);
}

.gadget-switcher__link--current {
  color: rgba(255, 252, 255, 0.96);
  background: linear-gradient(
    165deg,
    rgba(200, 190, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.05) 48%,
    rgba(120, 200, 190, 0.08) 100%
  );
  border-color: rgba(200, 190, 255, 0.42);
  box-shadow:
    0 0 28px rgba(180, 170, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  cursor: default;
  pointer-events: none;
  transform: none;
}

.gadget-switcher__ico {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.28rem;
  height: 1.28rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(195, 192, 245, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.gadget-switcher__link--current .gadget-switcher__ico {
  background: rgba(200, 190, 255, 0.18);
  color: rgba(255, 252, 255, 0.95);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 12px rgba(180, 170, 255, 0.2);
}

.gadget-switcher__ico svg {
  width: 0.74rem;
  height: 0.74rem;
  display: block;
}

.gadget-switcher__label {
  line-height: 1.05;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .gadget-switcher {
    width: 100%;
    justify-content: center;
  }

  .gadget-switcher__link {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
    padding-inline: 0.55rem;
    letter-spacing: 0.08em;
  }
}

/* —— Gadget hub (index): Schedule-style liquid glass, tiles only —— */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gadget-main--hub {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(82dvh, 48rem);
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 3vw, 1.75rem);
}

.gadget-hub-liquid {
  position: relative;
  width: 100%;
  max-width: min(48rem, 96vw);
  border-radius: 1.35rem;
  padding: clamp(1.15rem, 3vw, 1.75rem);
  background:
    var(--alma-liquid-shine),
    linear-gradient(165deg, rgba(255, 255, 255, 0.045) 0%, rgba(0, 0, 0, 0.22) 100%);
  border: 1px solid var(--alma-liquid-border, rgba(255, 255, 255, 0.14));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 24px 80px rgba(0, 0, 0, 0.42),
    0 0 80px rgba(200, 190, 255, 0.06);
  backdrop-filter: blur(22px) saturate(1.06);
  -webkit-backdrop-filter: blur(22px) saturate(1.06);
  overflow: hidden;
  animation: gadget-hub-frame-breathe 14s var(--ease-soft) infinite;
}

.gadget-hub-liquid::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  mix-blend-mode: screen;
  opacity: 0.55;
}

@keyframes gadget-hub-frame-breathe {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.4) inset,
      0 1px 0 rgba(255, 255, 255, 0.06) inset,
      0 24px 80px rgba(0, 0, 0, 0.42),
      0 0 70px rgba(200, 190, 255, 0.05);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.36) inset,
      0 1px 0 rgba(255, 255, 255, 0.08) inset,
      0 28px 96px rgba(0, 0, 0, 0.38),
      0 0 110px rgba(210, 200, 255, 0.12),
      0 0 140px rgba(255, 248, 240, 0.05);
  }
}

.gadget-tool-strip--hub {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
  gap: clamp(0.85rem, 2.5vw, 1.25rem);
  margin: 0;
  max-width: none;
}

.gadget-hub-ethos {
  position: relative;
  z-index: 1;
  margin: clamp(1rem, 2.6vw, 1.4rem) auto 0;
  padding-top: clamp(0.9rem, 2.2vw, 1.15rem);
  max-width: 36rem;
  border-top: 1px solid rgba(200, 195, 255, 0.14);
  font-size: clamp(0.58rem, 1.28vw, 0.7rem);
  line-height: 1.58;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  text-align: center;
  text-wrap: balance;
}

.gadget-hub-ethos strong {
  font-weight: 400;
  color: rgba(225, 222, 255, 0.9);
  letter-spacing: 0.1em;
}

.gadget-tool-card--hub {
  position: relative;
  isolation: isolate;
  min-height: clamp(8rem, 22vw, 10.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.35rem, 3vw, 1.85rem);
  border-radius: 1.12rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(155deg, rgba(255, 252, 248, 0.07) 0%, rgba(8, 8, 14, 0.45) 100%),
    rgba(4, 4, 10, 0.35);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 0 40px rgba(190, 180, 255, 0.07),
    0 0 72px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px) saturate(1.04);
  -webkit-backdrop-filter: blur(16px) saturate(1.04);
  overflow: hidden;
  animation: gadget-hub-tile-breathe 8s var(--ease-soft) infinite;
  transition:
    transform 0.45s var(--ease-soft),
    border-color 0.45s var(--ease-soft),
    box-shadow 0.45s var(--ease-soft);
}

.gadget-tool-card--hub:nth-child(1) {
  animation-delay: 0s;
}

.gadget-tool-card--hub:nth-child(2) {
  animation-delay: 1.1s;
}

.gadget-tool-card--hub:nth-child(3) {
  animation-delay: 2.2s;
}

@keyframes gadget-hub-tile-breathe {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.35) inset,
      0 1px 0 rgba(255, 255, 255, 0.05) inset,
      0 0 44px rgba(190, 180, 255, 0.06),
      0 0 64px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.3) inset,
      0 1px 0 rgba(255, 255, 255, 0.08) inset,
      0 0 64px rgba(200, 190, 255, 0.16),
      0 0 100px rgba(255, 248, 238, 0.06);
  }
}

.gadget-tool-card__glow--hub {
  opacity: 0.8;
  animation: gadget-hub-aura 9s var(--ease-soft) infinite !important;
  filter: blur(20px) saturate(1.2);
}

.gadget-tool-card--hub:nth-child(2) .gadget-tool-card__glow--hub {
  animation-delay: 1.5s !important;
}

.gadget-tool-card--hub:nth-child(3) .gadget-tool-card__glow--hub {
  animation-delay: 3s !important;
}

@keyframes gadget-hub-aura {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 0.92;
    transform: scale(1.07);
  }
}

.gadget-tool-card__title--hub {
  margin: 0;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 252, 255, 0.94);
  text-shadow:
    0 0 40px rgba(255, 255, 255, 0.08),
    0 0 80px rgba(200, 190, 255, 0.12);
  z-index: 1;
}

a.gadget-tool-card--hub:hover,
a.gadget-tool-card--hub:focus-visible,
button.gadget-tool-card--hub:hover,
button.gadget-tool-card--hub:focus-visible {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(230, 225, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28) inset,
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 0 72px rgba(198, 190, 255, 0.22),
    0 0 120px rgba(255, 252, 248, 0.1);
}

html.alma-safari .gadget-hub-liquid {
  background: linear-gradient(168deg, rgba(255, 252, 248, 0.1) 0%, rgba(22, 22, 26, 0.06) 100%), rgba(6, 6, 8, 0.42);
}

html.alma-safari .gadget-tool-card--hub {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.08) 0%, rgba(10, 10, 18, 0.5) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .gadget-hub-liquid,
  .gadget-tool-card--hub,
  .gadget-tool-card__glow--hub {
    animation: none !important;
  }
}

/* ========== Mobile (≤900px): Card + Logo — preview strip on top, settings get most of the viewport ========== */

.gadget-mobile-stage__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.gadget-mobile-stage__head .gadget-panel__title {
  margin-bottom: 0;
}

.gadget-mobile-split-hint {
  display: none;
  font-size: clamp(0.54rem, 2.8vw, 0.64rem);
  letter-spacing: 0.05em;
  line-height: 1.5;
  color: rgba(200, 210, 255, 0.55);
  margin: -0.35rem 0 0.75rem;
  max-width: 36rem;
}

.gadget-mobile-preview-dismiss {
  flex-shrink: 0;
  margin: 0;
  padding: 0.32rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(200, 195, 255, 0.35);
  background: rgba(18, 16, 32, 0.9);
  color: rgba(230, 232, 255, 0.92);
  font: inherit;
  font-size: clamp(0.5rem, 2.6vw, 0.58rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.25s cubic-bezier(0.45, 0, 0.55, 1),
    border-color 0.25s cubic-bezier(0.45, 0, 0.55, 1);
  -webkit-tap-highlight-color: transparent;
}

.gadget-mobile-preview-dismiss:hover,
.gadget-mobile-preview-dismiss:focus-visible {
  background: rgba(40, 36, 62, 0.95);
  border-color: rgba(220, 215, 255, 0.5);
  outline: none;
}

@media (max-width: 900px) {
  /*
   * Card + Logo (phone): after Enter (alma-ready), main is one viewport tall, hero collapses
   * and fades, flex column grid keeps preview on top and Build/Name panel as the scrollport.
   */
  body.card-gadget .gadget-main,
  body.logo-maker-gadget .gadget-main {
    display: flex;
    flex-direction: column;
  }

  body.card-gadget.alma-ready .gadget-main,
  body.logo-maker-gadget.alma-ready .gadget-main {
    height: 100dvh;
    height: 100svh;
    max-height: 100dvh;
    max-height: 100svh;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
  }

  body.card-gadget:not(.alma-ready) .gadget-main,
  body.logo-maker-gadget:not(.alma-ready) .gadget-main {
    min-height: 100dvh;
    min-height: 100svh;
  }

  body.card-gadget .gadget-hero,
  body.logo-maker-gadget .gadget-hero {
    transition:
      opacity 0.42s ease,
      max-height 0.62s cubic-bezier(0.4, 0, 0.2, 1),
      margin 0.48s ease,
      visibility 0s linear;
  }

  body.card-gadget:not(.alma-ready) .gadget-hero,
  body.logo-maker-gadget:not(.alma-ready) .gadget-hero {
    flex-shrink: 0;
    max-height: min(320vh, 200rem);
    opacity: 1;
    visibility: visible;
  }

  body.card-gadget.alma-ready .gadget-hero,
  body.logo-maker-gadget.alma-ready .gadget-hero {
    flex: 0 0 auto;
    min-height: 0;
    max-height: 0;
    margin: 0;
    margin-bottom: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition:
      opacity 0.42s ease,
      max-height 0.62s cubic-bezier(0.4, 0, 0.2, 1),
      margin 0.48s ease,
      visibility 0s linear 0.4s;
  }

  @media (prefers-reduced-motion: reduce) {
    body.card-gadget .gadget-hero,
    body.card-gadget.alma-ready .gadget-hero,
    body.logo-maker-gadget .gadget-hero,
    body.logo-maker-gadget.alma-ready .gadget-hero {
      transition: none;
    }
  }

  body.card-gadget.alma-ready,
  body.logo-maker-gadget.alma-ready {
    --gadget-mobile-preview-fr: 3;
    --gadget-mobile-settings-fr: 6;
  }

  body.card-gadget .gadget-grid,
  body.logo-maker-gadget .gadget-grid.logo-maker-grid {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: clamp(0.12rem, 0.55vw, 0.28rem);
    align-items: stretch;
    overflow: hidden;
  }

  /*
   * Preview vs settings: flex shares (default ~33% / ~67% — more room for settings).
   * User-adjustable via --gadget-mobile-* (gadget-mobile-split.js + drag handle).
   */
  body.card-gadget .gadget-grid > .gadget-preview-wrap,
  body.logo-maker-gadget .gadget-grid.logo-maker-grid > .gadget-preview-wrap {
    order: -1;
    flex: var(--gadget-mobile-preview-fr, 3) 1 0;
    position: relative;
    top: auto;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    margin-bottom: 0;
    padding-bottom: 0.28rem;
    scrollbar-gutter: stable;
  }

  body.card-gadget:not(.gadget-mobile--preview-expanded) .gadget-preview-wrap > .gadget-panel,
  body.logo-maker-gadget:not(.gadget-mobile--preview-expanded) .gadget-preview-wrap > .gadget-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.card-gadget:not(.gadget-mobile--preview-expanded) .gadget-preview-wrap .gadget-mobile-stage__head,
  body.card-gadget:not(.gadget-mobile--preview-expanded) .gadget-preview-wrap .gadget-mobile-split-hint,
  body.card-gadget:not(.gadget-mobile--preview-expanded) .gadget-preview-wrap .gadget-preview__handles-hint {
    flex-shrink: 0;
  }

  body.card-gadget:not(.gadget-mobile--preview-expanded) .gadget-preview-wrap .gadget-cards {
    flex: 1 1 0%;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    overflow: hidden;
    container-type: size;
    container-name: gadget-card-preview;
  }

  body.logo-maker-gadget:not(.gadget-mobile--preview-expanded) .gadget-preview-wrap .logo-results-stage {
    display: flex;
    flex-direction: column;
    flex: 1 1 0%;
    min-height: 0;
    min-width: 0;
  }

  body.logo-maker-gadget:not(.gadget-mobile--preview-expanded) .logo-results-stage .gadget-mobile-stage__head,
  body.logo-maker-gadget:not(.gadget-mobile--preview-expanded) .logo-results-stage .gadget-mobile-split-hint,
  body.logo-maker-gadget:not(.gadget-mobile--preview-expanded) .logo-results-stage .logo-maker-empty {
    flex-shrink: 0;
  }

  body.logo-maker-gadget:not(.gadget-mobile--preview-expanded) .logo-results-stage .logo-badge-grid {
    flex: 1 1 0%;
    min-height: 0;
    min-width: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    container-type: size;
    container-name: logo-preview-badges;
    align-content: start;
  }

  body.card-gadget:not(.gadget-mobile--preview-expanded) .gadget-preview-wrap {
    cursor: pointer;
  }

  body.card-gadget .gadget-grid > .gadget-mobile-split-handle {
    order: 1;
    flex: 0 0 auto;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.2rem 0;
    margin: -0.04rem 0;
    border-radius: 9999px;
    touch-action: none;
    cursor: row-resize;
    -webkit-tap-highlight-color: transparent;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(200, 195, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25) inset;
  }

  body.card-gadget.alma-ready:not(.gadget-mobile--preview-expanded) .gadget-grid > .gadget-mobile-split-handle,
  body.logo-maker-gadget.alma-ready:not(.gadget-mobile--preview-expanded) .gadget-grid > .gadget-mobile-split-handle {
    display: flex;
  }

  .gadget-mobile-split-handle:focus-visible {
    outline: 2px solid rgba(200, 195, 255, 0.65);
    outline-offset: 2px;
  }

  .gadget-mobile-split-handle__grip {
    width: 2.6rem;
    height: 0.32rem;
    border-radius: 9999px;
    pointer-events: none;
    background: repeating-linear-gradient(
      90deg,
      rgba(220, 218, 255, 0.58) 0 5px,
      transparent 5px 11px
    );
  }

  /* While dragging the split, avoid text selection and scroll stealing from preview/settings. */
  body.gadget-mobile-split--dragging {
    user-select: none;
    -webkit-user-select: none;
  }

  body.gadget-mobile-split--dragging .gadget-grid > .gadget-preview-wrap,
  body.gadget-mobile-split--dragging .gadget-grid > section.gadget-panel:first-of-type {
    pointer-events: none;
    will-change: flex-grow;
  }

  body.gadget-mobile-split--dragging .gadget-grid > .gadget-mobile-split-handle {
    pointer-events: auto;
  }

  body.card-gadget .gadget-grid > section.gadget-panel:first-of-type,
  body.logo-maker-gadget .gadget-grid.logo-maker-grid > section.gadget-panel:first-of-type {
    order: 2;
    flex: var(--gadget-mobile-settings-fr, 6) 1 0;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: clamp(0.38rem, 1.35vw, 0.52rem) clamp(0.45rem, 1.55vw, 0.62rem);
    border-radius: 12px;
  }

  body.card-gadget .gadget-grid > section.gadget-panel:first-of-type .gadget-panel__title,
  body.logo-maker-gadget .gadget-grid.logo-maker-grid > section.gadget-panel:first-of-type .gadget-panel__title {
    margin-bottom: 0.38rem;
    font-size: clamp(0.46rem, 2.35vw, 0.54rem);
    letter-spacing: 0.14em;
  }

  body.card-gadget .gadget-grid > section.gadget-panel:first-of-type .gadget-field,
  body.logo-maker-gadget .gadget-grid.logo-maker-grid > section.gadget-panel:first-of-type .gadget-field {
    margin-bottom: 0.32rem;
  }

  body.card-gadget .gadget-grid > section.gadget-panel:first-of-type .gadget-field label,
  body.logo-maker-gadget .gadget-grid.logo-maker-grid > section.gadget-panel:first-of-type .gadget-field label {
    margin-bottom: 0.16rem;
    font-size: clamp(0.4rem, 2.05vw, 0.48rem);
  }

  body.card-gadget .gadget-grid > section.gadget-panel:first-of-type .gadget-field__hint,
  body.logo-maker-gadget .gadget-grid.logo-maker-grid > section.gadget-panel:first-of-type .gadget-field__hint {
    margin-top: 0.22rem;
    font-size: clamp(0.42rem, 2.15vw, 0.5rem);
    line-height: 1.32;
  }

  body.card-gadget .gadget-grid > section.gadget-panel:first-of-type .gadget-actions,
  body.logo-maker-gadget .gadget-grid.logo-maker-grid > section.gadget-panel:first-of-type .gadget-actions {
    margin-top: 0.28rem;
    gap: 0.32rem;
  }

  body.card-gadget .gadget-mobile-stage__head {
    margin-bottom: 0.45rem;
  }

  body.card-gadget .gadget-preview__handles-hint {
    margin: -0.05rem 0 0.32rem;
    max-width: none;
    font-size: clamp(0.4rem, 2vw, 0.48rem);
    line-height: 1.34;
  }

  body.card-gadget .gadget-preview-wrap > .gadget-panel,
  body.logo-maker-gadget .gadget-preview-wrap .logo-results-stage {
    border-radius: 16px;
    background: radial-gradient(
      ellipse 85% 70% at 50% 42%,
      rgba(200, 195, 255, 0.07) 0%,
      rgba(4, 6, 14, 0.35) 55%,
      rgba(2, 3, 8, 0.5) 100%
    );
    border: 1px solid rgba(200, 195, 255, 0.12);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 12px 40px rgba(0, 0, 0, 0.25);
  }

  body.card-gadget .gadget-mobile-split-hint,
  body.logo-maker-gadget .gadget-mobile-split-hint {
    display: block;
    margin: -0.28rem 0 0.38rem;
    font-size: clamp(0.44rem, 2.2vw, 0.52rem);
    line-height: 1.38;
  }

  body.gadget-mobile--preview-expanded .gadget-mobile-split-hint {
    display: none;
  }

  body.gadget-mobile--preview-expanded .gadget-grid > .gadget-mobile-split-handle {
    display: none !important;
  }

  body.gadget-mobile--preview-expanded.card-gadget .gadget-grid > .gadget-preview-wrap,
  body.gadget-mobile--preview-expanded.logo-maker-gadget .gadget-grid.logo-maker-grid > .gadget-preview-wrap {
    flex: 5 1 0;
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    cursor: default;
  }

  body.gadget-mobile--preview-expanded.card-gadget .gadget-grid > section.gadget-panel:first-of-type,
  body.gadget-mobile--preview-expanded.logo-maker-gadget .gadget-grid.logo-maker-grid > section.gadget-panel:first-of-type {
    flex: 2 1 0;
    max-height: none;
    min-height: 0;
    overflow-y: auto;
  }

  body.gadget-mobile--preview-expanded.card-gadget .gadget-preview-wrap > .gadget-panel,
  body.gadget-mobile--preview-expanded.logo-maker-gadget .gadget-preview-wrap > .gadget-panel {
    overflow: visible;
  }

  body.gadget-mobile--preview-expanded.card-gadget .gadget-preview-wrap .gadget-cards {
    container-type: size;
    container-name: gadget-card-preview;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: min(52vh, 22rem);
    overflow: hidden;
  }

  /* Card fallback before @container (older browsers) */
  body.card-gadget.alma-ready:not(.gadget-mobile--preview-expanded) .gadget-preview-wrap .gadget-card--single {
    width: min(100%, 400px);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  body.logo-maker-gadget:not(.gadget-mobile--preview-expanded) .logo-badge-grid:not(.logo-badge-grid--pattern-focus) {
    grid-template-columns: repeat(auto-fill, minmax(5.35rem, 1fr));
    gap: 0.5rem;
  }

  body.logo-maker-gadget:not(.gadget-mobile--preview-expanded) .logo-badge-card {
    padding: 0.32rem 0.42rem;
    cursor: pointer;
  }

  body.gadget-mobile--preview-expanded.logo-maker-gadget .logo-badge-card:not(.logo-badge-card--mobile-expanded) {
    display: none !important;
  }

  body.gadget-mobile--preview-expanded.logo-maker-gadget .logo-badge-card--mobile-expanded {
    max-width: min(96vw, 32rem);
    margin-left: auto;
    margin-right: auto;
    cursor: default;
    padding: clamp(0.65rem, 2vw, 1rem);
  }

  body.gadget-mobile--preview-expanded.card-gadget .gadget-card--single {
    max-width: min(96vw, 34rem);
  }

  /*
   * Fit preview visuals to the pane (container queries): business card uses 1.75∶1; logo
   * spotlight uses the badge grid’s box so the hero stays fully visible without excess scroll.
   */
  @container gadget-card-preview (min-width: 0px) {
    body.card-gadget .gadget-preview-wrap .gadget-card--single {
      box-sizing: border-box;
      width: min(100cqw - 2px, calc((100cqh - 2px) * 1.75));
      max-width: 100%;
      max-height: min(100cqh - 2px, calc((100cqw - 2px) / 1.75));
      aspect-ratio: 1.75 / 1;
      height: auto;
      margin-left: auto;
      margin-right: auto;
      align-self: center;
      justify-self: center;
    }
  }

  @container logo-preview-badges (min-width: 0px) {
    body.logo-maker-gadget .logo-badge-grid:not(.logo-badge-grid--pattern-focus) {
      grid-template-columns: repeat(auto-fill, minmax(min(5.35rem, 30cqw), 1fr));
    }

    body.logo-maker-gadget .logo-badge-grid--pattern-focus .logo-badge-card--pattern-focus {
      width: min(98cqw, 100cqh) !important;
      max-width: min(98cqw, 100cqh) !important;
      max-height: 100cqh;
      box-sizing: border-box;
    }
  }

  /* No container queries: keep spotlight hero usable in the preview band */
  @supports not (container-type: size) {
    body.logo-maker-gadget:not(.gadget-mobile--preview-expanded) .logo-badge-grid--pattern-focus .logo-badge-card--pattern-focus {
      width: min(96vw, 26rem) !important;
      max-width: 100% !important;
      max-height: min(52vh, 28rem);
      box-sizing: border-box;
    }
  }
}

/* Card / Logo / Breathe — only inside the ⋯ panel on narrow screens, never inline with site pills */
.gadget-mobile-dock__gadgets {
  display: none !important;
}

/* ⋯ Phone + tablet: site + gadget switcher flyout (Card, Logo, Gadget hub) */
.gadget-mobile-nav-fab,
.gadget-mobile-nav-scrim {
  display: none;
}

@media (max-width: 1199px) {
  body.card-gadget.alma-ready .gadget-main,
  body.logo-maker-gadget.alma-ready .gadget-main,
  body.gadget-hub-page.alma-ready .gadget-main {
    padding-top: max(2.75rem, calc(env(safe-area-inset-top, 0px) + 1.75rem));
  }

  body.card-gadget.alma-ready .gadget-mobile-nav-fab,
  body.logo-maker-gadget.alma-ready .gadget-mobile-nav-fab,
  body.gadget-hub-page.alma-ready .gadget-mobile-nav-fab {
    display: inline-flex;
    position: fixed;
    z-index: 12600;
    top: max(0.42rem, calc(env(safe-area-inset-top, 0px) + 0.22rem));
    right: max(0.42rem, calc(env(safe-area-inset-right, 0px) + 0.22rem));
    align-items: center;
    justify-content: center;
    width: 2.72rem;
    height: 2.72rem;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    cursor: pointer;
    color: rgba(232, 230, 255, 0.94);
    background: rgba(10, 8, 20, 0.52);
    border: 1px solid rgba(200, 195, 255, 0.38);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.38) inset,
      0 12px 44px rgba(0, 0, 0, 0.48),
      0 0 36px rgba(150, 140, 255, 0.18);
    backdrop-filter: blur(16px) saturate(1.1);
    -webkit-backdrop-filter: blur(16px) saturate(1.1);
    transition:
      transform 0.38s cubic-bezier(0.34, 1.25, 0.64, 1),
      box-shadow 0.3s ease,
      border-color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
  }

  body.card-gadget.alma-ready .gadget-mobile-nav-fab:hover,
  body.card-gadget.alma-ready .gadget-mobile-nav-fab:focus-visible,
  body.logo-maker-gadget.alma-ready .gadget-mobile-nav-fab:hover,
  body.logo-maker-gadget.alma-ready .gadget-mobile-nav-fab:focus-visible,
  body.gadget-hub-page.alma-ready .gadget-mobile-nav-fab:hover,
  body.gadget-hub-page.alma-ready .gadget-mobile-nav-fab:focus-visible {
    border-color: rgba(225, 220, 255, 0.58);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.32) inset,
      0 16px 52px rgba(0, 0, 0, 0.52),
      0 0 52px rgba(185, 175, 255, 0.28);
    outline: none;
    transform: scale(1.05);
  }

  body.card-gadget.alma-ready.gadget-mobile--nav-open .gadget-mobile-nav-fab,
  body.logo-maker-gadget.alma-ready.gadget-mobile--nav-open .gadget-mobile-nav-fab,
  body.gadget-hub-page.alma-ready.gadget-mobile--nav-open .gadget-mobile-nav-fab {
    transform: scale(1.02) rotate(90deg);
  }

  .gadget-mobile-nav-fab__glow {
    position: absolute;
    inset: -32%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 195, 255, 0.22) 0%, transparent 72%);
    opacity: 0.62;
    animation: gadgetMobileNavFabPulse 2.85s ease-in-out infinite;
    pointer-events: none;
  }

  .gadget-mobile-nav-fab__dots {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
  }

  .gadget-mobile-nav-fab__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 12px rgba(200, 195, 255, 0.5);
    opacity: 0.88;
    animation: gadgetMobileNavDotPulse 1.55s ease-in-out infinite;
  }

  .gadget-mobile-nav-fab__dot:nth-child(2) {
    animation-delay: 0.12s;
  }

  .gadget-mobile-nav-fab__dot:nth-child(3) {
    animation-delay: 0.24s;
  }

  body.card-gadget.alma-ready.gadget-mobile--nav-open .gadget-mobile-nav-fab__glow,
  body.logo-maker-gadget.alma-ready.gadget-mobile--nav-open .gadget-mobile-nav-fab__glow,
  body.gadget-hub-page.alma-ready.gadget-mobile--nav-open .gadget-mobile-nav-fab__glow {
    animation: none;
    opacity: 0.32;
  }

  body.card-gadget.alma-ready .gadget-mobile-nav-scrim:not([hidden]),
  body.logo-maker-gadget.alma-ready .gadget-mobile-nav-scrim:not([hidden]),
  body.gadget-hub-page.alma-ready .gadget-mobile-nav-scrim:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 12540;
    background: rgba(2, 3, 12, 0.52);
    backdrop-filter: blur(8px) saturate(1.06);
    -webkit-backdrop-filter: blur(8px) saturate(1.06);
  }

  body.card-gadget.alma-ready .gadget-mobile-nav-scrim[hidden],
  body.logo-maker-gadget.alma-ready .gadget-mobile-nav-scrim[hidden],
  body.gadget-hub-page.alma-ready .gadget-mobile-nav-scrim[hidden] {
    display: none !important;
  }

  body.card-gadget.alma-ready:not(.gadget-mobile--nav-open) #gadgetMobileTopDock,
  body.logo-maker-gadget.alma-ready:not(.gadget-mobile--nav-open) #gadgetMobileTopDock,
  body.gadget-hub-page.alma-ready:not(.gadget-mobile--nav-open) #gadgetMobileTopDock {
    transform: translate3d(-50%, calc(-100% - 2.75rem), 0) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition:
      transform 0.46s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.32s ease,
      visibility 0.46s step-end !important;
  }

  body.card-gadget.alma-ready.gadget-mobile--nav-open #gadgetMobileTopDock,
  body.logo-maker-gadget.alma-ready.gadget-mobile--nav-open #gadgetMobileTopDock,
  body.gadget-hub-page.alma-ready.gadget-mobile--nav-open #gadgetMobileTopDock {
    transform: translate3d(-50%, 0, 0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 12550 !important;
    transition:
      transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.28s ease,
      visibility 0s !important;
  }

  body.card-gadget.alma-ready.gadget-mobile--nav-open,
  body.logo-maker-gadget.alma-ready.gadget-mobile--nav-open,
  body.gadget-hub-page.alma-ready.gadget-mobile--nav-open {
    overflow: hidden;
  }

  body.card-gadget.alma-ready.gadget-mobile--nav-open #gadgetMobileTopDock .gadget-mobile-dock__gadgets,
  body.logo-maker-gadget.alma-ready.gadget-mobile--nav-open #gadgetMobileTopDock .gadget-mobile-dock__gadgets,
  body.gadget-hub-page.alma-ready.gadget-mobile--nav-open #gadgetMobileTopDock .gadget-mobile-dock__gadgets {
    display: block !important;
    flex: 1 1 100%;
    width: 100%;
    margin-top: 0.55rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: auto;
  }

  #gadgetMobileTopDock .gadget-mobile-dock__switcher {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.38rem 0.55rem;
  }

  #gadgetMobileTopDock .gadget-mobile-dock__switcher a,
  #gadgetMobileTopDock .gadget-mobile-dock__switcher .gadget-mobile-dock__current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.72rem;
    border-radius: 9999px;
    font-size: clamp(0.5rem, 1.2vw, 0.6rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.2);
    color: rgba(235, 232, 255, 0.82);
    -webkit-tap-highlight-color: transparent;
  }

  #gadgetMobileTopDock .gadget-mobile-dock__switcher a:hover,
  #gadgetMobileTopDock .gadget-mobile-dock__switcher a:focus-visible {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    outline: none;
  }

  #gadgetMobileTopDock .gadget-mobile-dock__switcher .gadget-mobile-dock__current {
    background: rgba(200, 195, 255, 0.14);
    border-color: rgba(200, 195, 255, 0.38);
    color: rgba(240, 238, 255, 0.95);
    cursor: default;
  }
}

@keyframes gadgetMobileNavFabPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.48;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.88;
  }
}

@keyframes gadgetMobileNavDotPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.72;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gadget-mobile-nav-fab__glow,
  .gadget-mobile-nav-fab__dot {
    animation: none !important;
  }

  body.card-gadget.alma-ready:not(.gadget-mobile--nav-open) #gadgetMobileTopDock,
  body.card-gadget.alma-ready.gadget-mobile--nav-open #gadgetMobileTopDock,
  body.logo-maker-gadget.alma-ready:not(.gadget-mobile--nav-open) #gadgetMobileTopDock,
  body.logo-maker-gadget.alma-ready.gadget-mobile--nav-open #gadgetMobileTopDock,
  body.gadget-hub-page.alma-ready:not(.gadget-mobile--nav-open) #gadgetMobileTopDock,
  body.gadget-hub-page.alma-ready.gadget-mobile--nav-open #gadgetMobileTopDock {
    transition: none !important;
  }
}
