/* ============================================================
   Tweaks panel — Tokyo-pop skin
   ============================================================ */

.twk-toggle { display: none; }

.twk-panel {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 320px;
  max-height: calc(100vh - 48px);
  z-index: 9001;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 6px 6px 0 var(--ink);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 12px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  cursor: auto;
}
.twk-panel.open { display: flex; }
.twk-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--red);
  background-image: radial-gradient(rgba(0,0,0,0.18) 1.5px, transparent 2px);
  background-size: 10px 10px;
  color: #fff;
  border-bottom: 2.5px solid var(--ink);
  user-select: none;
  cursor: move;
}
.twk-hd__title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.08em;
}
.twk-hd__title::before {
  content: ''; width: 8px; height: 8px;
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  animation: pulse 1.4s ease-in-out infinite;
}
.twk-hd__close {
  width: 24px; height: 24px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 11px;
  cursor: pointer;
  border-radius: 4px;
}
.twk-hd__close:hover { background: var(--yellow); }

.twk-body {
  padding: 4px 0 8px;
  overflow-y: auto;
  max-height: calc(100vh - 130px);
  background: var(--paper);
}

.twk-section {
  padding: 12px 14px 4px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--ink);
  border-top: 2px dashed var(--ink);
}
.twk-section:first-child { border-top: 0; }

.twk-row { padding: 6px 14px 12px; }
.twk-row__label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.twk-row__label .value {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.04em;
}

/* Segmented radio */
.twk-seg {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 6px;
}
.twk-seg button {
  padding: 10px 4px;
  background: var(--paper);
  border: 2px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.06em;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s;
  box-shadow: 2px 2px 0 var(--ink);
}
.twk-seg button:hover { background: var(--yellow); transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.twk-seg button.active { background: var(--red); color: #fff; }

/* Color swatches */
.twk-swatches {
  display: flex;
  gap: 8px;
}
.twk-swatch {
  width: 32px; height: 32px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: transform .2s;
  box-shadow: 2px 2px 0 var(--ink);
}
.twk-swatch:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.twk-swatch.active {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--ink), 3px 3px 0 var(--ink);
}

/* Slider */
.twk-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%;
  height: 4px;
  background: var(--ink);
  border-radius: 999px;
  outline: 0;
  margin: 4px 0 2px;
}
.twk-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--red);
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  cursor: pointer;
}
.twk-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  background: var(--red);
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  cursor: pointer;
}

/* Footer */
.twk-ft {
  padding: 10px 14px;
  border-top: 2px dashed var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  background: var(--paper-2);
}
.twk-ft__reset {
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 12px;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.twk-ft__reset:hover { color: var(--red); }

/* States triggered by tweaks */
body[data-cursor-mode="off"] .cursor,
body[data-cursor-mode="off"] .cursor__dot {
  display: none;
}
body[data-cursor-mode="off"] { cursor: auto !important; }
body[data-cursor-mode="off"] a, body[data-cursor-mode="off"] button { cursor: pointer !important; }
body[data-cursor-mode="bold"] .cursor { border-width: 3px; width: 40px; height: 40px; }
body[data-cursor-mode="bold"] .cursor__dot { width: 8px; height: 8px; }

body[data-rays="off"] .hero__rays { display: none; }
body[data-rays="off"] .hero__halftone { display: none; }

body[data-motion="0"] *, body[data-motion="0"] *::before, body[data-motion="0"] *::after {
  animation-play-state: paused !important;
  transition: none !important;
}
body[data-motion="0"] .hero__rays { animation: none !important; }
body[data-motion="0"] .marquee__track, body[data-motion="0"] .announcement-bar__track { animation: none !important; }
