/* Chicken Strip interactive tour. Self-contained page styles. */

:root {
  --cs-red: #c22a20;
  --cs-red-dark: #8e1712;
  --cs-cream: #f4ecdb;
  --cs-cream-dim: #d8ceb6;
  --cs-ink: #4a3b28;
  --cs-mustard: #e3a81e;
  --cs-bg: #171a1b;
  --cs-bg-raise: #22272a;
  --cs-line: #343b3f;
  --toolbar-h: 52px;
  --label-font: "Avenir Next Condensed", "Oswald", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body.tour-page {
  background: radial-gradient(1200px 700px at 50% -10%, #232a2d 0%, var(--cs-bg) 60%);
  color: var(--cs-cream);
  font-family: "Nunito Sans", system-ui, sans-serif;
  min-height: 100vh;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 60;
  background: var(--cs-cream); color: var(--cs-ink);
  padding: 8px 14px; border-radius: 8px; font-weight: 700;
  transition: top 120ms ease;
}
.skip-link:focus { top: 8px; }

/* ---------------------------------------------------------------- toolbar */

.tour-toolbar {
  height: var(--toolbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 14px;
  background: linear-gradient(180deg, #26120f 0%, #1c0e0c 100%);
  border-bottom: 2px solid var(--cs-red-dark);
  position: sticky; top: 0; z-index: 40;
}

.tt-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.tt-home {
  color: var(--cs-cream); text-decoration: none; font-weight: 700; font-size: 14px;
  white-space: nowrap;
}
.tt-home:hover { color: #fff; text-decoration: underline; }

.tt-sep { width: 1px; height: 22px; background: #4a2521; }

.tt-title {
  font-family: "Oswald", var(--label-font);
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 13px; color: #d9a23c; white-space: nowrap;
}

.tt-views { display: flex; gap: 6px; flex: 1; justify-content: center; flex-wrap: wrap; }

.tt-views button {
  font: 600 12px/1 "Oswald", var(--label-font);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cs-cream-dim); background: transparent;
  border: 1px solid #3d2320; border-radius: 999px;
  padding: 7px 12px; cursor: pointer;
}
.tt-views button:hover { color: #fff; border-color: #6b3a34; }
.tt-views button[aria-current="true"] {
  background: var(--cs-red); border-color: var(--cs-red-dark); color: #fff6e6;
}

.tt-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.tt-actions button {
  font: 600 12px/1 "Nunito Sans", system-ui, sans-serif;
  color: var(--cs-cream); background: #2b1512;
  border: 1px solid #4a2521; border-radius: 8px;
  padding: 7px 10px; cursor: pointer; white-space: nowrap;
}
.tt-actions button:hover { background: #3a1c18; }
.tt-actions button[aria-pressed="true"] {
  background: var(--cs-mustard); border-color: #a87a10; color: #241703;
}
.tt-actions button.tt-primary {
  background: var(--cs-red); border-color: var(--cs-red-dark); color: #fff6e6;
}
.tt-actions button.tt-primary:hover { background: #d63428; }

/* ------------------------------------------------------------------ stage */

.tour-stage {
  display: grid; place-items: center;
  min-height: calc(100vh - var(--toolbar-h));
  padding: 18px 16px 12px;
}

.plugin-shell {
  position: relative;
  width: min(100%, 1622px);
  aspect-ratio: 1622 / 970;
  user-select: none;
  touch-action: none;
  border-radius: 6px;
  box-shadow: 0 24px 70px rgb(0 0 0 / 55%);
}

.screen-art,
.overlay-svg,
.hotspot-layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
}

.screen-art {
  display: block; object-fit: contain; pointer-events: none;
  border-radius: 6px;
}

.overlay-svg { pointer-events: none; }

.stage-note {
  margin: 12px 0 0; font-size: 12px; color: #8a949a; text-align: center;
}
.stage-note a { color: #b8c2c8; }

/* --------------------------------------------------------------- hotspots */

.hotspot-layer { pointer-events: none; }

.spot-group { position: absolute; inset: 0; pointer-events: none; }
.spot-group[hidden] { display: none; }

.hotspot {
  position: absolute;
  pointer-events: auto;
  background: transparent;
  border: 0; padding: 0; margin: 0;
  border-radius: 8px;
  cursor: pointer;
  color: transparent;
  font-size: 0;
}
.hotspot.knob-spot { cursor: ns-resize; }
.hotspot.node-spot { cursor: grab; border-radius: 50%; }
.hotspot.node-spot.dragging { cursor: grabbing; }
.hotspot.fader-spot { cursor: ns-resize; }

.hotspot:focus-visible {
  outline: 3px solid #ffd23e;
  outline-offset: 2px;
  border-radius: 8px;
}
.hotspot.node-spot:focus-visible { border-radius: 50%; }

.tour-page.debug .hotspot {
  background: rgb(255 0 0 / 16%);
  outline: 1px solid rgb(255 0 0 / 65%);
}
.tour-page.debug .hotspot::after {
  content: attr(data-id);
  position: absolute; left: 0; top: -14px;
  font: 700 9px/1 monospace; color: #ff5945;
  background: rgb(0 0 0 / 70%); padding: 1px 3px; border-radius: 3px;
  white-space: nowrap; pointer-events: none;
}

/* -------------------------------------------------------- overlay svg text */

.overlay-svg text { user-select: none; }

.t-val {
  font-family: var(--label-font);
  font-weight: 600; font-size: 13px; fill: #6b5b41;
  letter-spacing: 0.02em; text-anchor: middle;
}
.t-val-lcd { font-family: var(--label-font); font-weight: 600; font-size: 14px; fill: #ede4cb; letter-spacing: 0.05em; text-anchor: middle; }
.t-btn { font-family: var(--label-font); font-weight: 700; font-size: 13px; letter-spacing: 0.07em; text-anchor: middle; }
.t-banner { font-family: var(--label-font); font-weight: 700; font-size: 17px; letter-spacing: 0.07em; text-anchor: middle; }
.t-tiny { font-family: var(--label-font); font-weight: 600; font-size: 10px; text-anchor: middle; }
.t-grid { font-family: var(--label-font); font-weight: 600; font-size: 10px; fill: #7e938c; }
.t-lcd-track { font-family: var(--label-font); font-weight: 700; font-size: 18px; fill: #e6ded9; letter-spacing: 0.08em; }
.t-lcd-sub { font-family: var(--label-font); font-weight: 700; font-size: 15px; fill: #e6c83e; letter-spacing: 0.08em; }

/* ------------------------------------------------------- tooltip and toast */

.tour-tooltip {
  position: fixed; z-index: 55;
  max-width: 260px;
  background: #100b08; color: #f6efdd;
  border: 1px solid #4a3b28; border-radius: 8px;
  padding: 8px 10px; font-size: 12.5px; line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 8px 22px rgb(0 0 0 / 45%);
}
.tour-tooltip strong { color: #ffd76e; font-family: "Oswald", var(--label-font); letter-spacing: 0.06em; }
.tour-tooltip .tip-value { font-variant-numeric: tabular-nums; font-weight: 700; }

.tour-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 56;
  background: #100b08; color: #f6efdd;
  border: 1px solid var(--cs-mustard); border-radius: 999px;
  padding: 10px 18px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 10px 30px rgb(0 0 0 / 50%);
}

/* ------------------------------------------------------------- tour guide */

.tour-guide-layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.tour-guide-layer[hidden] { display: none; }

.tg-highlight {
  position: absolute;
  border: 3px solid var(--cs-mustard);
  border-radius: 10px;
  box-shadow: 0 0 0 6px rgb(227 168 30 / 25%), 0 0 40px rgb(227 168 30 / 35%);
  transition: all 260ms ease;
}

.tg-card {
  position: absolute;
  width: min(340px, calc(100vw - 32px));
  background: #fdf7e8; color: #33281a;
  border-radius: 12px;
  border-top: 6px solid var(--cs-red);
  box-shadow: 0 18px 50px rgb(0 0 0 / 55%);
  padding: 14px 16px 12px;
  pointer-events: auto;
  transition: all 260ms ease;
}
.tg-card h2 {
  margin: 0 0 6px;
  font: 700 15px/1.2 "Oswald", var(--label-font);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--cs-red-dark);
}
.tg-card p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.45; }
.tg-card .tg-row { display: flex; align-items: center; gap: 8px; }
.tg-card .tg-step { font-size: 12px; color: #8a7a58; font-weight: 700; margin-right: auto; }
.tg-card button {
  font: 700 12.5px/1 "Nunito Sans", system-ui, sans-serif;
  border-radius: 8px; padding: 8px 12px; cursor: pointer;
  border: 1px solid #cbbd9c; background: #f1e7cf; color: #4a3b28;
}
.tg-card button:hover { background: #e9dcbd; }
.tg-card button.tg-next { background: var(--cs-red); border-color: var(--cs-red-dark); color: #fff6e6; }
.tg-card button.tg-next:hover { background: #d63428; }

/* ---------------------------------------------------------------- overlays */

.help-layer {
  position: fixed; inset: 0; z-index: 52;
  display: grid; place-items: center;
  background: rgb(10 8 6 / 62%);
}
.help-layer[hidden] { display: none; }
.tour-tooltip[hidden], .tour-toast[hidden] { display: none; }
.help-card {
  width: min(560px, calc(100vw - 32px));
  max-height: min(80vh, 640px); overflow: auto;
  background: #fdf7e8; color: #33281a;
  border-radius: 14px; border-top: 8px solid var(--cs-red);
  box-shadow: 0 24px 70px rgb(0 0 0 / 60%);
  padding: 20px 22px;
}
.help-card h2 {
  margin: 0 0 8px;
  font: 700 20px/1.2 "Oswald", var(--label-font);
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--cs-red-dark);
}
.help-card h3 {
  margin: 16px 0 6px;
  font: 700 13px/1.2 "Oswald", var(--label-font);
  letter-spacing: 0.08em; text-transform: uppercase; color: #8a6a1c;
}
.help-card p, .help-card li { font-size: 13.5px; line-height: 1.5; }
.help-card ul { margin: 6px 0; padding-left: 18px; }
.help-card kbd {
  background: #efe5cb; border: 1px solid #cbbd9c; border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; font: 600 11.5px/1.4 monospace; color: #4a3b28;
}
.help-card .help-close {
  float: right;
  font: 700 12px/1 "Nunito Sans", system-ui, sans-serif;
  background: var(--cs-red); color: #fff6e6; border: 1px solid var(--cs-red-dark);
  border-radius: 8px; padding: 8px 14px; cursor: pointer;
}
.help-card a { color: var(--cs-red-dark); font-weight: 700; }

/* -------------------------------------------------------- off menu hint dot */

.offmenu-hint {
  position: absolute; z-index: 5;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--cs-mustard);
  box-shadow: 0 0 0 4px rgb(227 168 30 / 30%);
  pointer-events: none;
  animation: hint-pulse 1.6s ease-in-out infinite;
}
@keyframes hint-pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.35); opacity: 0.5; }
}

.noscript-note {
  margin: 40px auto; max-width: 480px; text-align: center;
  color: var(--cs-cream);
}
.noscript-note a { color: #ffd76e; }

/* ------------------------------------------------------------- small sizes */

@media (max-width: 900px) {
  .tt-title { display: none; }
  .tour-toolbar { flex-wrap: wrap; height: auto; padding: 8px 10px; row-gap: 6px; }
  .tour-stage { min-height: 0; }
}

@media (max-width: 700px) and (orientation: portrait) {
  .tour-stage::before {
    content: "Best viewed in landscape. Rotate your phone to explore the strip.";
    display: block; margin-bottom: 10px;
    font-size: 12.5px; color: #d9a23c; text-align: center;
  }
}

/* --------------------------------------------------------------- fullscreen */

.tour-stage:fullscreen {
  background: var(--cs-bg);
  padding: 24px;
}
.tour-stage:fullscreen .stage-note { color: #6a747a; }

/* ------------------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
  .offmenu-hint { animation: none; }
  .tg-highlight, .tg-card, .skip-link { transition: none; }
}
