/* Tuning-panel chrome. Loaded ONLY by a surface that actually mounts the panel:
   the standalone showcase (watercolor.html) and the site's ?tune escape hatch,
   which injects this file alongside watercolor/panel.js. index.html ships
   neither, so none of these bytes reach a reader of the site.

   Split out of watercolor.css on 2026-08-12 (the panel-split round). It is the
   same rule set, moved verbatim — watercolor.css keeps the background layer and
   the prototype shell's hero chrome, which the site does use. */

/* ---------------------------------------------------------------- panel */

.wc-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.wc-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--wc-text);
  background-color: color-mix(in srgb, var(--wc-paper) 92%, white);
  border: 1px solid color-mix(in srgb, var(--wc-ink) 22%, transparent);
  box-shadow:
    0 1px 2px rgba(29, 58, 66, 0.10),
    0 6px 18px rgba(29, 58, 66, 0.12);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.2s ease,
    box-shadow 0.28s cubic-bezier(0.2, 0.7, 0.3, 1),
    translate 0.2s ease-out;
}
.wc-toggle:hover {
  background-color: color-mix(in srgb, var(--wc-paper) 90%, white);
  border-color: color-mix(in srgb, var(--wc-ink) 40%, transparent);
  translate: 0 -1px;
  box-shadow:
    0 2px 4px rgba(29, 58, 66, 0.12),
    0 10px 26px rgba(29, 58, 66, 0.18);
}
.wc-toggle:active { translate: 0 0; }
.wc-toggle:focus-visible {
  outline: 2px solid var(--wc-gold);
  outline-offset: 3px;
}

.wc-drawer {
  display: grid;
  grid-template-rows: 0fr;         /* animated collapse: 0fr <-> 1fr */
  opacity: 0;
  pointer-events: none;
  width: min(300px, calc(100vw - 32px));
  border-radius: 14px;
  background-color: color-mix(in srgb, var(--wc-paper) 94%, white);
  border: 1px solid color-mix(in srgb, var(--wc-ink) 18%, transparent);
  box-shadow:
    0 1px 2px rgba(29, 58, 66, 0.08),
    0 10px 30px rgba(29, 58, 66, 0.14),
    0 32px 64px -24px rgba(29, 58, 66, 0.25);
  transition:
    grid-template-rows 0.42s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.16s ease;
}
.wc-panel.open .wc-drawer {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
  transition:
    grid-template-rows 0.42s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.22s ease 0.06s;
}
.wc-drawer-inner {
  overflow: auto;
  min-height: 0;
  max-height: min(82vh, 720px);
}
.wc-drawer-pad { padding: 14px 16px 16px; }

.wc-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.wc-panel-head h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: color-mix(in srgb, var(--wc-text) 85%, var(--wc-paper));
}
.wc-fps {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--wc-text) 65%, var(--wc-paper));
}

.wc-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  row-gap: 1px;
  margin-bottom: 8px;
}
.wc-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: color-mix(in srgb, var(--wc-text) 88%, var(--wc-paper));
}
.wc-val {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--wc-text) 70%, var(--wc-paper));
}
.wc-help {
  grid-column: 1 / -1;
  margin-top: -2px;
  font-size: 9.5px;
  line-height: 1.25;
  color: color-mix(in srgb, var(--wc-text) 58%, var(--wc-paper));
}
.wc-number {
  width: 132px;
  box-sizing: border-box;
  font: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  padding: 5px 7px;
  border-radius: 7px;
  border: 0;
  background: color-mix(in srgb, var(--wc-paper) 88%, white);
  color: var(--wc-text);
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.wc-number:focus-visible {
  outline: 2px solid var(--wc-gold);
  outline-offset: 2px;
}
.wc-seed-btn {
  grid-column: 1 / -1;
  margin-top: 4px;
}

/* ------------------------------------------------------------- sliders */

.wc-field input[type="range"] { grid-column: 1 / -1; }

input[type="range"].wc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.wc-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--wc-ink) 26%, var(--wc-paper));
}
.wc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background-color: var(--wc-ink);
  border: 2px solid color-mix(in srgb, var(--wc-paper) 92%, white);
  box-shadow: 0 1px 2px rgba(29, 58, 66, 0.35);
  transition:
    transform 0.16s ease-out,
    box-shadow 0.24s cubic-bezier(0.2, 0.7, 0.3, 1),
    background-color 0.15s ease;
}
.wc-range:hover::-webkit-slider-thumb {
  transform: scale(1.25);
  background-color: color-mix(in srgb, var(--wc-ink) 85%, black);
}
.wc-range:focus-visible { outline: none; } /* replaced by the thumb ring below */
.wc-range:focus-visible::-webkit-slider-thumb {
  box-shadow:
    0 1px 2px rgba(29, 58, 66, 0.35),
    0 0 0 4px color-mix(in srgb, var(--wc-gold) 55%, transparent);
}
.wc-range::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--wc-ink) 26%, var(--wc-paper));
}
.wc-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--wc-ink);
  border: 2px solid color-mix(in srgb, var(--wc-paper) 92%, white);
  box-shadow: 0 1px 2px rgba(29, 58, 66, 0.35);
  transition:
    transform 0.16s ease-out,
    box-shadow 0.24s cubic-bezier(0.2, 0.7, 0.3, 1),
    background-color 0.15s ease;
}
.wc-range:hover::-moz-range-thumb {
  transform: scale(1.25);
  background-color: color-mix(in srgb, var(--wc-ink) 85%, black);
}
.wc-range:focus-visible::-moz-range-thumb {
  box-shadow:
    0 1px 2px rgba(29, 58, 66, 0.35),
    0 0 0 4px color-mix(in srgb, var(--wc-gold) 55%, transparent);
}

/* --------------------------------------------------- segmented palette */

.wc-seg {
  grid-column: 1 / -1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  padding: 3px;
  margin-top: 3px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--wc-ink) 10%, transparent);
}
.wc-seg button {
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 5px 4px;
  border: 0;
  border-radius: 6px;
  background-color: transparent;
  color: color-mix(in srgb, var(--wc-text) 80%, var(--wc-paper));
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.24s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.wc-seg button:hover {
  background-color: color-mix(in srgb, var(--wc-paper) 70%, white);
  color: var(--wc-text);
}
.wc-seg button[aria-checked="true"] {
  background-color: var(--wc-paper);
  color: var(--wc-text);
  box-shadow: 0 1px 3px rgba(29, 58, 66, 0.25);
}
.wc-seg button:focus-visible {
  outline: 2px solid var(--wc-gold);
  outline-offset: 1px;
}

/* ------------------------------------------------------------- select */

.wc-select {
  font: inherit;
  font-size: 12px;
  padding: 4px 26px 4px 8px;
  border-radius: 7px;
  border: 0;
  background-color: color-mix(in srgb, var(--wc-paper) 88%, white);
  color: var(--wc-text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6"><path d="M1 1l4 4 4-4" fill="none" stroke="%232f5c63" stroke-width="1.5" stroke-linecap="round"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition:
    border-color 0.2s ease,
    box-shadow 0.25s cubic-bezier(0.2, 0.7, 0.3, 1),
    background-color 0.15s ease;
}
.wc-select:hover {
  border-color: color-mix(in srgb, var(--wc-ink) 55%, transparent);
  background-color: color-mix(in srgb, var(--wc-paper) 75%, white);
}
.wc-select:focus-visible {
  outline: 2px solid var(--wc-gold);
  outline-offset: 2px;
}

/* ------------------------------------------------------------- buttons */

.wc-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.wc-btn {
  flex: 1;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 8px;
  border: 0;
  background-color: color-mix(in srgb, var(--wc-paper) 85%, white);
  color: var(--wc-text);
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.2s ease,
    box-shadow 0.26s cubic-bezier(0.2, 0.7, 0.3, 1),
    translate 0.15s ease-out;
}
.wc-btn:hover {
  background-color: color-mix(in srgb, var(--wc-paper) 60%, white);
  border-color: color-mix(in srgb, var(--wc-ink) 48%, transparent);
  translate: 0 -1px;
  box-shadow: 0 2px 8px rgba(29, 58, 66, 0.16);
}
.wc-btn:active { translate: 0 0; }
.wc-btn:focus-visible {
  outline: 2px solid var(--wc-gold);
  outline-offset: 2px;
}
.wc-btn[aria-pressed="true"] {
  background-color: color-mix(in srgb, var(--wc-ink) 14%, var(--wc-paper));
  border-color: color-mix(in srgb, var(--wc-ink) 45%, transparent);
}

/* ------------------------------------------------------ fallback note */

.wc-note {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--wc-paper) 94%, white);
  border: 0;
  color: color-mix(in srgb, var(--wc-text) 75%, var(--wc-paper));
}

/* ------------------------------------------------------ reduced motion
   watercolor.css keeps the .hero-rise half of this pair; the panel half lives
   with the panel, so a page without the panel does not carry a rule for it. */

@media (prefers-reduced-motion: reduce) {
  .wc-panel,
  .wc-panel * { transition-duration: 0s !important; }
}
html.wc-reduced .wc-panel,
html.wc-reduced .wc-panel * { transition-duration: 0s !important; }
