/* PROF. BYTE PER-APP HELPER — the "?" title-bar button, the one-time
   first-open corner tip, and the in-window tips walkthrough. Brutalist
   look shared with tour.css (hard borders, riso offset shadows), scaled
   down to live comfortably inside a single app window. */

/* --- the "?" title-bar button --------------------------------------- */
.byte-help-btn {
  width: 18px; height: 18px;
  background: var(--ink); color: var(--c, var(--accent));
  border: 0; padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 11px;
  cursor: pointer;
}
.byte-help-btn:hover { background: var(--paper); color: var(--ink); }
.byte-help-btn:focus-visible { outline: 2px solid var(--hover); outline-offset: 1px; }
.cat-app-title .byte-help-btn { width: 20px; height: 20px; }

/* --- first-open corner tip ------------------------------------------- */
.byte-first {
  position: absolute; right: 14px; bottom: 14px;
  z-index: 90;
  display: flex; align-items: flex-end; gap: 8px;
  max-width: min(320px, calc(100% - 28px));
  cursor: pointer;
  animation: byte-first-in 0.28s steps(4) both;
}
.byte-first.byte-noanim { animation: none; }
@keyframes byte-first-in {
  0%   { transform: translate(24px, 24px); opacity: 0; }
  100% { transform: translate(0, 0); opacity: 1; }
}
.byte-first-bot {
  width: 44px; height: 44px; flex: 0 0 auto;
  image-rendering: pixelated;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.5));
}
.byte-first-bubble {
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--hover);
  padding: 8px 10px; font-family: Inter, sans-serif;
}
.byte-first-tip { font-size: 11.5px; line-height: 1.4; max-width: 240px; }
.byte-first-hint {
  margin-top: 5px; font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--hover);
}

/* --- in-window walkthrough overlay ------------------------------------ */
.byte-ovl {
  position: absolute; inset: 0; z-index: 95;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 5, 16, 0.78);
  padding: 16px;
}
.byte-card {
  position: relative;
  display: flex; align-items: flex-end; gap: 10px;
  max-width: 92%;
}
.byte-close {
  position: absolute; top: -14px; right: -14px;
  width: 24px; height: 24px;
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--paper);
  font-size: 12px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
}
.byte-close:hover { background: var(--hover); }
.byte-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.byte-bot-wrap {
  position: relative; flex: 0 0 auto;
  animation: byte-pop 0.3s steps(4) both, byte-bob 2.4s steps(2) 0.5s infinite;
  transform-origin: bottom center;
}
.byte-ovl.byte-noanim .byte-bot-wrap { animation: none; }
.byte-bot {
  width: 90px; image-rendering: pixelated; display: block;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.55));
}
@keyframes byte-pop {
  0%   { transform: translateY(24px) scale(0.6); opacity: 0; }
  60%  { transform: translateY(-4px) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes byte-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

.byte-bubble {
  background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--hover);
  padding: 12px 14px 10px; position: relative; min-width: 220px; max-width: 300px;
}
.byte-bubble::before {
  content: ''; position: absolute; left: -14px; bottom: 20px;
  border: 7px solid transparent; border-right: 14px solid var(--ink);
}
.byte-bubble::after {
  content: ''; position: absolute; left: -8px; bottom: 23px;
  border: 4px solid transparent; border-right: 9px solid var(--paper);
}
.byte-name {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 9.5px; letter-spacing: 0.7px; text-transform: uppercase;
  color: var(--hover); margin-bottom: 4px;
}
.byte-copy { font-family: Inter, sans-serif; font-size: 12.5px; line-height: 1.5; min-height: 3.2em; }

.byte-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.byte-prev, .byte-next {
  background: var(--accent); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  font-family: Geologica, sans-serif; font-weight: 900; font-size: 11px;
  width: 26px; height: 24px; cursor: pointer;
  transition: transform 0.06s, box-shadow 0.06s;
}
.byte-prev:hover, .byte-next:hover { background: var(--hover); color: var(--white); }
.byte-prev:active, .byte-next:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.byte-dots { display: flex; gap: 4px; }
.byte-dots span { width: 7px; height: 7px; background: #cfcfc6; border: 1px solid var(--ink); }
.byte-dots span.on { background: var(--accent); }
