/* punk-vibe.css — «What's your vibe?» after the intro (punk-vibe.js; PUNK.md call 45).
   The picker stands on the skin's own picture under a dark veil, so its words and lines are white on that veil in every
   light (literal ink on a literal veil, never a token's ink, which turns dark by day). Its name and its question take the
   skin's own faces (.t-display, .caps: each skin's sheet sets them), and its primary key the skin's material: the page
   wears the skin under the mark as the dial turns. Under the intro (z 9999), above the home. */
.vibe {
  position: fixed; inset: 0; z-index: 9990; overflow: hidden;
  display: flex; flex-direction: column; color: #fff; background: #05070d;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.vibe__scene, .vibe__veil { position: absolute; inset: 0; pointer-events: none; }
.vibe__img {
  position: absolute; inset: -2%; background: center 40% / cover no-repeat; opacity: 0;
  transition: opacity .6s ease; transform-origin: 50% 42%;
  animation: vibe-push 16s ease-in-out infinite alternate;
}
.vibe__img.on { opacity: 1; }
@keyframes vibe-push { from { transform: scale(1.0); } to { transform: scale(1.08) translateY(-1%); } }
.vibe__veil {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .12) 18%, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, .18) 50%,
      rgba(0, 0, 0, .7) 70%, rgba(0, 0, 0, .86) 100%);
}

.vibe__top { position: relative; padding: calc(var(--sat, 0px) + 26px) 24px 0; text-align: center; }
.vibe .vibe__q {
  margin: 0; font-size: 14px; line-height: 1.3; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .9);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .6);
}
.vibe__step { margin: 8px 0 0; font-size: 12.5px; letter-spacing: .08em; color: rgba(255, 255, 255, .78); font-variant-numeric: tabular-nums; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
.vibe__say { position: relative; margin-top: auto; padding: 0 24px; text-align: center; }
.vibe .vibe__name.t-display {
  margin: 0; font-size: clamp(42px, 12.5vw, 76px); line-height: 1.02; color: #fff; letter-spacing: -.005em;
  text-shadow: 0 2px 28px rgba(0, 0, 0, .55);
}
.vibe__sub { margin: 10px 0 0; font-size: 17px; line-height: 1.35; color: rgba(255, 255, 255, .84); text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
/* the skin's family over its name (punk.js FAMILIES: «A world», «A quiet room»); a drill has none */
.vibe__kind { margin: 0 0 8px; font-size: 12.5px; letter-spacing: .14em; color: rgba(255, 255, 255, .84); text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
.vibe__kind:empty { display: none; }
/* the drill under the mark, drawn (frap-figure.js drill()): white on the veil as the dial's words are, every ink the
   figure takes from the page (its accent, its inks) given back as the veil's own; the answer lit is the window lit */
.vibe__fig { width: min(272px, 74vw); margin: 14px auto 0; }
.vibe__fig:empty { display: none; }
.vibe__fig .ofig { max-width: none; margin: 0; color: rgba(255, 255, 255, .8); filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .5)); }
.vibe__fig .ofig text, .vibe__fig .ofig .c { fill: rgba(255, 255, 255, .9); }
.vibe__fig .ofig .u { fill: #fff; }
.vibe__fig .ofig .k { fill: rgba(255, 255, 255, .78); }
.vibe__fig .ofig .wave { stroke: #fff; }
.vibe__fig .ofig .caret { fill: #fff; }
.vibe__fig .ofig .chip.on rect { fill: #fff; fill-opacity: .96; stroke: #fff; }
.vibe__fig .ofig .chip.on .c { fill: #0b0e14; }
.vibe__fig .ofig .chip.on .ok { stroke: #0b0e14; }
.vibe__say--turn .vibe__name, .vibe__say--turn .vibe__sub, .vibe__say--turn .vibe__fig { animation: vibe-turn .32s cubic-bezier(.2, .8, .2, 1) both; }
.vibe__say--turn .vibe__sub { animation-delay: .04s; }
.vibe__say--turn .vibe__fig { animation-delay: .08s; }
@keyframes vibe-turn { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }

/* the dial: the windows on a ring whose top arc runs through them; a band of ticks above, turning with it; the mark */
.vibe__dial { position: relative; flex: 0 0 auto; height: 186px; margin-top: 26px; --R: 520px; --y0: 72px; }
.vibe__ring, .vibe__ticks {
  position: absolute; left: 50%; border-radius: 50%; pointer-events: none;
}
.vibe__ring {
  top: var(--y0); width: calc(var(--R) * 2); height: calc(var(--R) * 2); margin-left: calc(var(--R) * -1);
  border: 1px solid rgba(255, 255, 255, .22);
}
.vibe__ticks {
  --b: calc(var(--R) + 64px);
  top: calc(var(--y0) - 64px); width: calc(var(--b) * 2); height: calc(var(--b) * 2); margin-left: calc(var(--b) * -1);
  will-change: transform;
}
.vibe__ticks--minor {
  background: repeating-conic-gradient(rgba(255, 255, 255, .34) 0 .06deg, transparent .06deg var(--tick));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 7px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 7px));
}
.vibe__ticks--major {
  background: repeating-conic-gradient(from -.07deg, rgba(255, 255, 255, .8) 0 .14deg, transparent .14deg var(--major));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 calc(100% - 13px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 calc(100% - 13px));
}
.vibe__mark {
  position: absolute; left: 50%; top: calc(var(--y0) - 74px); width: 3px; height: 24px; margin-left: -1.5px;
  border-radius: 2px; background: #fff; box-shadow: 0 0 12px rgba(255, 255, 255, .55); pointer-events: none;
}
.vibe__wheel { position: absolute; inset: 0; }
.vibe__m {
  position: absolute; left: 50%; top: var(--y0); width: 76px; height: 76px; margin: -38px 0 0 -38px; padding: 0;
  border: 0; border-radius: 50%; background: #10131a; overflow: hidden; cursor: pointer; color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .22);
  transition: box-shadow .3s ease; will-change: transform, opacity; touch-action: none;
}
.vibe__m img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; pointer-events: none; }
.vibe__m[aria-checked="true"] {
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55), 0 0 0 2px #fff, 0 0 0 6px rgba(255, 255, 255, .16), 0 0 28px rgba(255, 255, 255, .28);
}
/* a drill's window: its sign on dark glass, its name under it; the one under the mark lit, its name the large one */
.vibe__m--sign { display: grid; place-items: center; overflow: visible; background: rgba(18, 22, 32, .88); color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .34); }
.vibe__m--sign .i { width: 30px; height: 30px; stroke-width: 1.6; pointer-events: none; }
.vibe__m--sign[aria-checked="true"] { background: rgba(255, 255, 255, .96); color: #0b0e14; }
.vibe__cap { position: absolute; left: 50%; top: calc(100% + 9px); transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: rgba(255, 255, 255, .88); text-shadow: 0 1px 8px rgba(0, 0, 0, .8); transition: opacity .2s ease; }
.vibe__m--sign[aria-checked="true"] .vibe__cap { opacity: 0; }
.vibe__wheel--in .vibe__m { animation: vibe-in .34s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes vibe-in { from { opacity: 0; } }
.vibe__m:focus { outline: none; }
.vibe__m:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(0, 0, 0, .6), 0 0 0 7px #fff; }

.vibe__go {
  position: relative; display: grid; gap: 4px; width: 100%; max-width: 440px; margin: 2px auto 0; box-sizing: border-box;
  padding: 0 24px calc(max(var(--sab, 0px), 10px) + 12px);
}
.vibe .vibe__dice { color: #fff; gap: 8px; }
.vibe .vibe__dice svg { width: 18px; height: 18px; opacity: .9; }
.vibe .vibe__dice:hover { color: #fff; }

/* kept: the words go, the scene stays while the page turns to the home; closed: the picker goes */
.vibe--go .vibe__top, .vibe--go .vibe__say, .vibe--go .vibe__dial, .vibe--go .vibe__go { opacity: 0; transition: opacity .32s ease; }
.vibe--go .vibe__img.on { transition: transform .5s ease; transform: scale(1.12); }
.vibe--out { opacity: 0; transform: scale(1.02); transition: opacity .36s ease, transform .36s ease; pointer-events: none; }

/* a short screen: the name and the dial closer together */
@media (max-height: 700px) {
  .vibe__dial { height: 168px; margin-top: 12px; }
  .vibe .vibe__name.t-display { font-size: clamp(36px, 10vw, 56px); }
  .vibe__fig { display: none; }                          /* the words say it; the dial keeps its room */
}
/* a wide screen: the windows a little larger */
@media (min-width: 960px) {
  .vibe__m { width: 88px; height: 88px; margin: -44px 0 0 -44px; }
  .vibe__dial { height: 200px; }
}
/* still: no push, no turn, no fade (reduced motion, Low power) */
.vibe--still .vibe__img { animation: none; transition: none; }
.vibe--still .vibe__say--turn .vibe__name, .vibe--still .vibe__say--turn .vibe__sub, .vibe--still .vibe__say--turn .vibe__fig, .vibe--still .vibe__wheel--in .vibe__m { animation: none; }
html[data-low="on"] .vibe__img { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .vibe__img { animation: none; transition: none; }
  .vibe__say--turn .vibe__name, .vibe__say--turn .vibe__sub, .vibe__say--turn .vibe__fig, .vibe__wheel--in .vibe__m { animation: none; }
  .vibe--out, .vibe--go .vibe__img.on { transition: none; transform: none; }
}
