/* /commands: SoozyBot's chat commands. Palette, type, background stickers and
   the phone layout come from /styles.css (the link page); the title tag is the
   /music page's, copied rather than linked so the two pages stay independent. */

/* styles.css centres the link page vertically, which suits one fixed screen.
   This list grows and shrinks as you search, and centred, the title and search
   box jumped with every keystroke; pinned to the top they stay put. */
body {
  align-items: flex-start;
}

/* The link page is phone-width everywhere; a list reads better wider on a desktop. */
@media (min-width: 900px) {
  .page { max-width: 46rem; }
}

.head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0 2.2rem;
}

.head-small {
  position: relative;
  z-index: 1;
  margin-bottom: -0.7em;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  box-shadow: 2px 3px 0 var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-4deg) translateX(-2.2em);
}

.title-row { display: flex; align-items: center; gap: 10px; }

.head h1 {
  margin: 0;
  padding: 0.04em 0.3em 0.12em;
  border-radius: 18px;
  background: var(--pink);
  border: 3px solid var(--ink);
  box-shadow: 5px 6px 0 var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 14vw, 5rem);
  line-height: 1;
  transform: rotate(-2deg);
}

.title-row .bot { width: 64px; height: 64px; transform: rotate(10deg); flex-shrink: 0; }

/* ---------- search and filters ---------- */

.tools { display: flex; flex-direction: column; gap: 10px; margin: 0 0 1.4rem; }

.search {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 4px 0 var(--ink);
  font: 500 15px var(--body);
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-user-select: text;
  user-select: text;
}

.search::placeholder { color: var(--muted); }
.search::-webkit-search-decoration,
.search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* Focus lifts the box, the site's own "pressed" language in reverse, instead of
   the browser ring drawn outside the border and shadow, which read as a second
   box around it. */
.search:focus {
  outline: none;
  background: #fff;
  transform: translate(-1px, -2px);
  box-shadow: 5px 7px 0 var(--ink);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--paper);
  font: 500 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- one box per group, a divider between commands ---------- */

.group-title { font: 600 18px var(--display); color: var(--ink); margin: 1.4rem 0 0.7rem; }

.cmds {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 4px 6px 0 var(--ink);
  overflow: hidden;
}

.cmd {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px 15px;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  text-align: left;
}

.cmd:last-child { border-bottom: 0; }

.cmd-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmd-name { font: 600 18px var(--display); }
.cmd-name .alias { font: 500 12px var(--mono); color: var(--muted); margin-left: 6px; }
.cmd-top .sp { flex: 1; }

.who {
  padding: 2px 9px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font: 500 10px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.who.everyone { background: var(--mint); }
.who.subs { background: var(--lilac); }
.who.vips { background: var(--rose); }

.plat { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--ink); overflow: hidden; display: inline-flex; }
.plat img { width: 100%; height: 100%; object-fit: cover; }

.cmd p { margin: 0; font: 400 14px/1.45 var(--body); color: var(--ink-soft); }

.try { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.try code {
  font: 500 13px var(--mono);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 4px 9px;
}

.copy {
  border: 0;
  background: transparent;
  font: 500 11px var(--mono);
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status { text-align: center; font: 500 14px var(--body); color: var(--ink-soft); padding: 1rem; }

.chip:focus-visible,
.copy:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* Copyable examples are selectable; styles.css turns selection off page-wide. */
.try code {
  -webkit-user-select: text;
  user-select: text;
}

.group[hidden],
.cmd[hidden],
.status[hidden] {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }
  /* Runs when a row or group appears, including when a search shows it again
     (display: none to shown restarts a CSS animation); rows that stay on screen
     do not replay it. */
  .group,
  .cmd { animation: rise 0.18s ease-out both; }
  .search { transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease; }
  .chip { transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease; }
  .chip:active { transform: translateY(1px); }
}

/* styles.css pins the link page to exactly one phone screen; this list scrolls. */
@media (max-width: 600px) {
  body {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .head { margin: 1.2rem 0 1.8rem; }
  .title-row .bot { width: 52px; height: 52px; }
}

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