/* top-right buttons: skip (only while walking), sound, and the firefly menu */
.tools { position: fixed; z-index: 4; top: max(16px, env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); display: flex; align-items: flex-start; gap: 8px; }
.icon-btn {
  display: grid; place-items: center; box-sizing: border-box; width: 44px; height: 44px; color: var(--ink-soft);
  background: rgba(10,26,40,.45); border: 1px solid rgba(159,179,194,.3); border-radius: 50%; padding: 0; cursor: pointer;
}
.icon-btn:hover { color: var(--ink); }
.icon-btn:focus-visible, .skip-walk:focus-visible, .about button:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
.icon-btn[aria-pressed="false"] .waves { opacity: .25; }
.icon-btn[aria-expanded="true"] { color: var(--ink); border-color: rgba(220,255,122,.45); }
/* the firefly icon: at rest, head and wings. Opening draws its back, lights it, and sends rays out below. */
.fly { overflow: visible; transition: filter .5s ease .2s; }
.fly .back { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset .45s ease .05s, opacity .1s linear .05s; }
.fly .back-glow { fill: var(--glow); opacity: 0; transition: opacity .5s ease .3s; }
.fly .rays line { stroke: var(--glow); stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset .3s ease, opacity .1s linear; }
.fly .wing { transform-box: fill-box; transform-origin: 50% 100%; }
.fly .wing:not(.low) ellipse { fill: #0b1b2a; }                    /* the upper wings hide the lines of the lower pair behind them */
.icon-btn[aria-expanded="true"] .fly .wing.low { animation-delay: .1s; }
.icon-btn[aria-expanded="true"] .fly { filter: drop-shadow(0 0 4px rgba(220, 255, 122, .65)); }
.icon-btn[aria-expanded="true"] .fly .back { stroke-dashoffset: 0; opacity: 1; stroke: var(--glow); }
.icon-btn[aria-expanded="true"] .fly .back-glow { opacity: .95; animation: backPulse 2.4s ease-in-out .9s infinite; }
.icon-btn[aria-expanded="true"] .fly .rays line { stroke-dashoffset: 0; opacity: 1; animation: rayPulse 2.4s ease-in-out 1s infinite; }
.icon-btn[aria-expanded="true"] .fly .rays line:nth-child(1), .icon-btn[aria-expanded="true"] .fly .rays line:nth-child(5) { transition-delay: .45s; }
.icon-btn[aria-expanded="true"] .fly .rays line:nth-child(2), .icon-btn[aria-expanded="true"] .fly .rays line:nth-child(4) { transition-delay: .55s; }
.icon-btn[aria-expanded="true"] .fly .rays line:nth-child(3) { transition-delay: .65s; }
.icon-btn[aria-expanded="true"] .fly .wing-l { animation: flutterL .5s ease-out; }
.icon-btn[aria-expanded="true"] .fly .wing-r { animation: flutterR .5s ease-out; }
@keyframes backPulse { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes rayPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes flutterL { 0% { rotate: 0deg; } 35% { rotate: -9deg; } 70% { rotate: 3deg; } 100% { rotate: 0deg; } }
@keyframes flutterR { 0% { rotate: 0deg; } 35% { rotate: 9deg; } 70% { rotate: -3deg; } 100% { rotate: 0deg; } }
@media (prefers-reduced-motion: reduce) { .fly *, .menu .item { animation: none !important; } }
@keyframes pop { from { opacity: 0; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } }
.skip-walk {
  display: none; align-items: center; gap: 6px; box-sizing: border-box; min-height: 44px; padding: 0 16px 0 18px;
  font: 14px var(--f-type); letter-spacing: .08em; color: var(--ink-soft); background: rgba(10,26,40,.45); border: 1px solid rgba(159,179,194,.3); border-radius: 999px; cursor: pointer;
}
.skip-walk.show { display: flex; animation: pop .5s ease both; }
.skip-walk:hover { color: var(--ink); }
/* the firefly button opens two more circles: how this place works, and who made it */
.more { position: relative; }
.menu { position: absolute; top: 52px; right: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.menu[hidden] { display: none; }
.menu .item { display: flex; align-items: center; gap: 10px; animation: pop .4s ease .5s both; }     /* drops in once the back is glowing */
.menu .item:nth-child(2) { animation-delay: .62s; }
.menu .item span { white-space: nowrap; font: 13px var(--f-type); letter-spacing: .05em; color: var(--ink); text-shadow: 0 0 8px rgba(4,10,18,.95), 0 1px 2px rgba(4,10,18,.9); }

/* "about this place" and "about me" cards, and the quick fade to black used by skip */
/* the two notes from the menu: a sheet of the same brown paper you write on, settling onto the night */
.about { position: fixed; inset: 0; z-index: 6; display: none; place-items: center; padding: 20px; background: rgba(4,8,16,.5); }
.about.show { display: grid; }
.about .card {
  position: relative; max-width: 400px; max-height: calc(100dvh - 40px); overflow: auto; padding: 30px 30px 24px; text-align: left; color: #3b2410; font: 15.5px/1.65 var(--f-type);
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255,236,196,.35), transparent 60%),
    radial-gradient(90% 70% at 100% 100%, rgba(120,76,36,.28), transparent 70%),
    linear-gradient(#d2aa74, #bd915b);
  border-radius: 3px; box-shadow: 0 1px 0 rgba(255,236,196,.5) inset, 0 18px 50px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.35);
  transform: rotate(-.8deg); animation: noteIn .55s cubic-bezier(.2,.8,.2,1);
}
.about#me .card { transform: rotate(.7deg); }
@keyframes noteIn { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
.about h2 { margin: 0 0 12px; font: italic 500 28px/1.15 var(--f-poem); color: #2c1a09; }
.about p { margin: 0 0 14px; text-wrap: wrap; }              /* plain typewriter lines, each filled to the edge */
.about .card > p:first-of-type { padding-right: 34px; }      /* clear of the X */
.about a { color: #6b2f08; text-decoration: underline; text-underline-offset: 3px; }
a[href^="tel:"] { white-space: nowrap; }          /* a phone number never breaks across two lines */
.about .x { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: #3b2410; opacity: .6; background: none; border: 0; border-radius: 50%; cursor: pointer; }
.about .x:hover { opacity: 1; background: rgba(59,36,16,.1); }
.about .sign { margin: 18px 0 0; }
.about .heart { display: inline-block; vertical-align: -2px; margin-left: 4px; }
.about button:focus-visible, .about a:focus-visible { outline-color: #3b2410; }
@media (prefers-reduced-motion: reduce) { .about .card { animation: none; } }
.veil { position: fixed; inset: 0; z-index: 5; background: #040a12; opacity: 0; pointer-events: none; transition: opacity .5s ease; }
.veil.on { opacity: 1; }
.tip {
  position: fixed; left: 0; top: 0; margin: 0; translate: 14px -130%; pointer-events: none; white-space: nowrap;
  font: 13px var(--f-type); letter-spacing: .05em; color: var(--glow); text-shadow: 0 0 10px rgba(4,10,18,.95);
}

/* text for search engines and screen readers: the page itself is a picture */
.seo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
