/* ═══════════════════════════════════════
   The Vibe Dial (FFDial, /assets/dial.js). SHARED by / (Classic) and /cinematic/.
   Linked as ?v=<8-char content hash>.
   ═══════════════════════════════════════ */
.ffd { width: 100%; max-width: 560px; margin: 0 auto; }
.ffd[hidden] { display: none; }
/* The button is one of its page's chips; only "a slider is set" is its own look. */
/* A control, not a prompt: the purple sets it apart from the pills beside it. `button.` outranks
   each page's own pill rule (.vibe-chip, .chip), and :hover outranks theirs. */
button.ffd-toggle {
  flex: none; font-weight: 600; color: #e9d5ff;
  background: rgba(124, 58, 237, 0.28); border: 1px solid rgba(167, 139, 250, 0.75);
}
button.ffd-toggle:hover { background: rgba(124, 58, 237, 0.42); color: #fff; border-color: #c4b5fd; }
button.ffd-toggle[hidden] { display: none; }
button.ffd-toggle.on, button.ffd-toggle.on:hover { background: #fff; color: #000; border-color: #fff; }
.ffd-panel {
  margin-top: 8px; padding: 12px 16px 8px; text-align: start;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px;
}
.ffd-panel[hidden] { display: none; }
.ffd-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); align-items: center; gap: 12px; min-height: 44px; }
.ffd-end { font-size: 13.5px; line-height: 1.2; color: rgba(255, 255, 255, 0.55); overflow-wrap: anywhere; transition: color 0.15s ease; }
.ffd-end[data-end="neg"] { text-align: end; }
.ffd-end.on { color: #fff; font-weight: 600; }

/* The five stops are drawn on the track, so a stop always reads as a place to land. */
.ffd-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0;
  background: none; cursor: pointer; touch-action: pan-y;
}
/* A 24px thumb stops 12px short of each end, so the marks are inset to match. */
.ffd-range {
  --ffd-mark: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));
  --ffd-marks:
    var(--ffd-mark) 10.5px center / 3px 100% no-repeat,
    var(--ffd-mark) calc(25% + 5.25px) center / 3px 100% no-repeat,
    var(--ffd-mark) 50% center / 3px 100% no-repeat,
    var(--ffd-mark) calc(75% - 5.25px) center / 3px 100% no-repeat,
    var(--ffd-mark) calc(100% - 10.5px) center / 3px 100% no-repeat,
    rgba(255, 255, 255, 0.18);
}
.ffd-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--ffd-marks); }
.ffd-range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--ffd-marks); }
.ffd-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px;
  background: #fff; border: 0; border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.ffd-range::-moz-range-thumb { width: 24px; height: 24px; background: #fff; border: 0; border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.ffd-range:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 8px; }

.ffd-foot { display: flex; justify-content: flex-end; gap: 8px; min-height: 8px; }
.ffd-foot button {
  min-height: 36px; padding: 0 14px; margin-top: 6px;
  font: inherit; font-size: 13px; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, 0.08); border: 0; border-radius: 999px; cursor: pointer;
}
.ffd-foot button[hidden] { display: none; }
.ffd-see { margin-inline-end: auto; background: #fff !important; color: #000 !important; }
@media (min-width: 900px) { .ffd-see { display: none; } }   /* the results are already in view */
@media (max-width: 480px) {
  .ffd-row { grid-template-columns: 88px minmax(0, 1fr) 88px; gap: 8px; }
  .ffd-end { font-size: 12.5px; }
}
