/* A small invitation below the Swarm, with native, crawlable disclosure text. */
.home-intro {
  position:fixed; z-index:7; left:clamp(16px,3.5vw,55px); bottom:calc(8px + env(safe-area-inset-bottom,0px));
  display:flex; flex-direction:column; align-items:flex-start; gap:26px;
  width:max-content; max-width:calc(100vw - 32px); pointer-events:none;
}
.home-intro > .sound-dock,.home-intro > .bottom-left { position:static; pointer-events:auto; }
/* Equal touch targets keep the sound and motion controls in one quiet row. */
.home-intro .home-controls { height:40px; }
.home-intro .home-controls.pill > button {
  display:flex; align-items:center; justify-content:center; flex:0 0 38px;
  width:38px; min-width:38px; height:38px; padding:0;
}
.home-controls .sound-toggle svg { width:18px; height:18px; }
.home-controls .sound-settings svg { width:14px; height:14px; }
.home-intro > .hint { position:absolute; left:0; bottom:calc(100% + 20px); transform:none; margin:0; width:max-content; max-width:calc(100vw - 32px); }
/* Keep the swatches beside the sound and motion controls. */
body > .theme-picker { bottom:calc(76px + env(safe-area-inset-bottom,0px)); }
body > .theme-picker .theme-choice { width:36px; height:36px; }
/* Retain the footer row when another panel hides the disclosure. */
.home-about-slot { min-height:44px; max-width:100%; }
.home-intro:has(.home-about[open]) { z-index:9; }
.home-intro:has(.home-about[open]) > :is(.hint,.bottom-left,.sound-dock),
body:has(.home-about[open]) > :is(.theme-picker,.zoom) { visibility:hidden; }
/* Keep threads and moving sparks sharp behind the view controls. */
#motionPanel {
  bottom:calc(132px + env(safe-area-inset-bottom,0px));
  background:#10121975;
  background:color-mix(in srgb,var(--bg) 46%,transparent);
  backdrop-filter:none; -webkit-backdrop-filter:none;
  box-shadow:0 10px 32px color-mix(in srgb,var(--panel-shadow) 35%,transparent);
  text-shadow:0 1px 2px var(--bg),0 0 6px var(--bg);
}
/* The sticky landscape heading must not become an opaque strip. */
#motionPanel > .panel-top { background:transparent; }
#soundPanel { bottom:calc(132px + env(safe-area-inset-bottom,0px)); max-height:calc(100dvh - 230px); }
.home-about {
  width:max-content; max-width:100%; color:var(--ink); pointer-events:auto;
}
.home-about[hidden],.in-draw .home-about,.panel-open .home-about { display:none!important; }
.home-about > summary {
  display:flex; align-items:center; justify-content:center; gap:10px; min-height:44px;
  padding:8px 12px; border:1px solid transparent; border-radius:12px; background:transparent;
  color:var(--muted); font-size:12px; line-height:1.35; text-align:center; cursor:pointer; list-style:none;
  -webkit-tap-highlight-color:transparent;
}
.home-about > summary::-webkit-details-marker { display:none; }
.home-about > summary::marker { content:''; }
.home-about > summary:hover { border-color:var(--line); color:var(--ink); }
.home-about > summary:focus-visible,.home-about a:focus-visible,.home-about-content:focus-visible {
  outline:2px solid var(--ice); outline-offset:4px;
}
.home-about > summary svg { flex:0 0 14px; width:14px; height:14px; transform:rotate(180deg); transition:transform .16s; }
.home-about-cue { display:none; }
.home-about-close { display:none; }
.home-about[open] {
  position:fixed; z-index:8; left:50%; bottom:calc(12px + env(safe-area-inset-bottom,0px)); transform:translateX(-50%);
  width:min(820px,calc(100vw - 32px)); max-width:none; padding-bottom:48px;
  border:1px solid var(--line); border-radius:18px; background:var(--bg);
  box-shadow:0 16px 56px #0005;
}
.home-about[open] > summary {
  position:absolute; bottom:0; left:0; width:100%; min-height:48px; border:0; border-top:1px solid var(--line);
  border-radius:0 0 18px 18px; background:transparent;
}
.home-about[open] > summary svg { transform:rotate(0); }
.home-about[open] .home-about-label,.home-about[open] .home-about-cue { display:none; }
.home-about[open] .home-about-close { display:inline; }
.home-about-content {
  max-height:min(64dvh,600px); padding:28px 30px 22px; overflow-y:auto; overscroll-behavior:contain;
  touch-action:pan-y; scrollbar-width:thin; scrollbar-color:var(--muted) transparent;
}
.home-about h1 { margin:0 0 14px; font-size:clamp(23px,3vw,30px); font-weight:500; line-height:1.2; letter-spacing:-.035em; }
.home-about p { margin:0 0 14px; color:var(--muted); font-size:14px; line-height:1.75; }
.home-about-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; margin:24px 0; }
.home-about-grid section { min-width:0; padding-top:16px; border-top:1px solid var(--line); }
.home-about h2 { margin:0 0 10px; font-size:16px; line-height:1.4; font-weight:500; }
.home-about a { color:var(--ice); font-size:13px; line-height:1.5; text-decoration:underline; text-underline-offset:4px; }
.home-about-grid a { display:inline-flex; align-items:center; min-height:44px; }
.home-about-faq { border-top:1px solid var(--line); padding-top:18px; }
.home-about-faq h2 { font-size:14px; }
.home-about-faq p { font-size:13px; }
.home-about-browse { display:inline-flex; align-items:center; min-height:44px; }
@media(max-width:640px) {
  .home-intro { left:16px; }
  .home-intro > .hint { width:calc(100vw - 32px); }
  .home-about-slot { max-width:calc(100vw - var(--theme-dock-width) - 40px); }
  .home-about > summary { font-size:11px; }
  .home-about[open] { width:calc(100vw - 24px); }
  .home-about-content { max-height:calc(100dvh - 160px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); padding:22px 20px 16px; }
  .home-about-grid { grid-template-columns:1fr; gap:14px; margin:20px 0; }
  .home-about-grid section { padding-top:14px; }
  .home-about p { font-size:13px; }
}
@media(min-width:540px) and (max-height:500px) and (orientation:landscape) {
  .home-intro {
    left:calc(12px + env(safe-area-inset-left,0px)); display:grid;
    grid-template-columns:max-content max-content; column-gap:8px; row-gap:0;
  }
  .home-intro > .bottom-left { grid-column:1; grid-row:1; }
  .home-intro > .sound-dock { grid-column:2; grid-row:1; }
  .home-about-slot { grid-column:1; grid-row:2; }
  #motionPanel,#soundPanel { bottom:calc(104px + env(safe-area-inset-bottom,0px)); max-height:none; }
  .home-about[open] { bottom:calc(8px + env(safe-area-inset-bottom,0px)); }
  .home-about-content { max-height:calc(100dvh - 120px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); }
}




/* Leave room above both rows of swatches on narrow phones. */
@media(max-width:399px) {
  .home-intro > .hint { bottom:calc(100% + 60px); }
  #motionPanel,#soundPanel { bottom:calc(172px + env(safe-area-inset-bottom,0px)); }
}
