/* The Workshop (docs/ARCHITECTURE.md §11.4). Loaded on every page by src/site/layout.ts because it also holds the
   small shell additions (header cluster, Workshop pill), the "Make a game with Claude" box (/workshop/new; the front
   page's slim bar reuses its chips and caret, styled in home.css) and the "Connect your Claude" panel (also used on
   /publish/mcp).
   Sections: shell · make-a-game box (.mk) · connect panel (.cc) · Workshop list and new pages (.wk) · the studio (.ws,
   with its chat-safety controls) · Workshop rows on the editors' chat desk · the home page's "Open slots" row.
   Builds on the retro.css tokens; never recolors design-system components (.lcd, .badge-stage-*). */

/* ── Shell additions: Chat link, bell and coin slots, Workshop pill ────────── */

.hdr-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.hdr-chat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 4px 13px 4px 10px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(10, 16, 70, 0.35);
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  text-decoration: none;
}
.hdr-chat:hover, .hdr-chat[aria-current="page"] { background: rgba(255, 255, 255, 0.16); color: #fff; }
.hdr-chat-icon { position: relative; width: 18px; height: 14px; border: 2px solid currentColor; border-radius: 6px 6px 6px 2px; }
.hdr-chat-icon::after { content: ""; position: absolute; left: 3px; top: 2px; width: 8px; height: 2px; background: currentColor; box-shadow: 0 3px 0 currentColor; }
.hdr-slot { display: inline-flex; align-items: center; }
/* Header coin chip (renderCoinChip): dormant while coins are switched off, kept for when they come back. */
.coin-chip {
  gap: 5px;
  background: linear-gradient(180deg, #fff6b0 0%, #ffd23a 60%, #ffb800 100%);
  font-variant-numeric: tabular-nums;
}
.coin-chip-coin { font-size: 15px; line-height: 1; }
.coin-chip-count { font: 11px/1 var(--font-arcade); letter-spacing: 0.02em; }
.promo-workshop { margin: 10px 0 0; font-size: 12.5px; }

.nav-tabs > li.nav-li-workshop { margin-left: auto; padding: 0 0 8px 8px; }
.nav-tabs > li.nav-li-workshop + li { margin-left: 0; padding-left: 6px; }
.nav-workshop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 13px 8px 11px;
  border: 2px solid #0a1150;
  border-radius: 999px;
  background: linear-gradient(180deg, #d29bff 0%, #8a3ffc 55%, #6a22d6 100%);
  color: #fff;
  box-shadow: 0 3px 0 #0a1150, inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 0 16px rgba(210, 155, 255, 0.55);
}
.nav-workshop:hover, .nav-workshop:focus-visible { transform: translateY(-1px); color: #fff; }
.nav-workshop:focus-visible { outline-offset: 2px; }
.nav-workshop.is-active { margin: 0; padding-bottom: 8px; border-color: #0a1150; background: #fff; color: #5221a6; box-shadow: 0 3px 0 #0a1150; }
.nav-workshop-spark {
  width: 11px;
  height: 11px;
  flex: none;
  background: #ffe45c;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: ws-twinkle 2.4s ease-in-out infinite;
}
.nav-workshop.is-active .nav-workshop-spark { background: #8a3ffc; }
@media (min-width: 761px) {
  .nav-tabs { gap: 2px; padding-left: 10px; padding-right: 10px; }
  .nav-tab { padding-left: 6px; padding-right: 6px; font-size: 10.5px; }
  .nav-tabs > li.nav-li-workshop { padding-left: 4px; }
  .nav-tabs > li.nav-li-workshop + li { padding-left: 5px; }
  .nav-workshop, .nav-tabs .nav-publish { padding-left: 10px; padding-right: 10px; }
}
@keyframes ws-twinkle { 50% { transform: rotate(45deg) scale(0.8); } }

/* ── Make a game with Claude (.mk) ─────────────────────────────────────────── */

@property --mk-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

.mk {
  position: relative;
  isolation: isolate;
  margin: 0 0 18px;
  padding: 5px;
  border-radius: 24px;
  background: conic-gradient(from var(--mk-angle), #ff4fd8, #ffd400, #3ff5c4, #4f8bff, #b04fff, #ff4fd8);
  box-shadow: 0 0 0 3px var(--rr-navy), 0 9px 0 rgba(20, 32, 107, 0.32), 0 0 44px rgba(176, 79, 255, 0.45);
  animation: mk-spin 9s linear infinite;
  --focus: #ffd400;
}
@keyframes mk-spin { to { --mk-angle: 360deg; } }
.mk.is-zapped { animation: mk-spin 9s linear infinite, mk-zap 0.45s ease-out; }
@keyframes mk-zap { 30% { box-shadow: 0 0 0 3px var(--rr-navy), 0 9px 0 rgba(20, 32, 107, 0.32), 0 0 70px rgba(255, 212, 0, 0.8); } }

.mk-frame { border: 3px solid var(--rr-navy); border-radius: 20px; overflow: hidden; }
.mk-screen {
  position: relative;
  overflow: hidden;
  padding: 26px 28px 20px;
  color: #fff;
  background:
    radial-gradient(70% 60% at 50% -10%, rgba(255, 79, 216, 0.28), transparent 70%),
    radial-gradient(120% 90% at 50% 0%, #2b3fd8 0%, #16217e 48%, #0a0f44 100%);
}
.mk-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.mk-grid-floor {
  position: absolute;
  left: -25%;
  right: -25%;
  bottom: -18%;
  z-index: 0;
  height: 58%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 79, 216, 0.45) 0 2px, transparent 2px 64px),
    repeating-linear-gradient(0deg, rgba(255, 79, 216, 0.45) 0 2px, transparent 2px 44px);
  transform: perspective(320px) rotateX(62deg);
  transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(transparent 0%, #000 70%);
  mask-image: linear-gradient(transparent 0%, #000 70%);
  opacity: 0.55;
  animation: mk-grid 2.6s linear infinite;
  pointer-events: none;
}
@keyframes mk-grid { to { background-position: 0 0, 0 44px; } }
.mk-layout, .mk-cc { position: relative; z-index: 1; }

.mk-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 26px; }
.mk-main { min-width: 0; }

.mk-head { max-width: 760px; margin: 0 0 16px; }
@keyframes ws-blink { to { visibility: hidden; } }
.mk-title {
  margin: 0 0 10px;
  color: #ffd400;
  font: 28px/1.3 var(--font-arcade);
  text-shadow: 0 0 14px rgba(255, 212, 0, 0.55), 0 3px 0 #0a1150;
  overflow-wrap: anywhere;
}
.mk-title-game { color: #fff; }
.mk-title-claude {
  color: #ffb27a;
  text-shadow: 0 0 16px rgba(255, 140, 70, 0.75), 0 3px 0 #0a1150;
}
.mk-sub { margin: 0; max-width: 62ch; color: #e3e9ff; font-size: 15px; }

/* minmax(0, 1fr): the one column never grows past the box to fit a long button label (it overflowed at 375 px). */
.mk-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.mk-error { margin: 0; padding: 8px 12px; border: 2px solid #ff8a80; border-radius: 10px; background: rgba(179, 38, 30, 0.35); color: #fff; font-weight: 700; }
.mk-restored { margin: 0; padding: 8px 12px; border: 2px solid #3ff5c4; border-radius: 10px; background: rgba(15, 155, 142, 0.3); color: #fff; font-weight: 700; }
.mk-prompt-row, .mk-name-row { display: grid; gap: 6px; }
.mk-label { color: #b9c6ff; font: 700 12px/1.2 var(--font-pixel); text-transform: uppercase; letter-spacing: 0.03em; }
.mk-optional { color: #8f9bd6; text-transform: none; font: 12px/1.2 var(--font-body); letter-spacing: 0; }
.mk-prompt-wrap { position: relative; }
.mk-caret {
  position: absolute;
  left: 14px;
  top: 12px;
  color: #3ff5c4;
  font: 700 17px/1.5 var(--font-mono);
  text-shadow: 0 0 8px rgba(63, 245, 196, 0.7);
  pointer-events: none;
}
.mk .mk-prompt, .mk .mk-name {
  display: block;
  width: 100%;
  border: 2px solid #7f93ff;
  border-radius: 14px;
  background: rgba(4, 7, 36, 0.82);
  color: #effff6;
  caret-color: #3ff5c4;
  box-shadow: inset 0 0 0 1px rgba(127, 147, 255, 0.25), 0 0 22px rgba(79, 139, 255, 0.35);
}
.mk .mk-prompt { min-height: 112px; padding: 12px 16px 12px 34px; font: 16px/1.5 var(--font-mono); resize: vertical; }
.mk .mk-name { max-width: 420px; min-height: 44px; padding: 8px 14px; font: 15px/1.4 var(--font-body); }
.mk .mk-prompt::placeholder, .mk .mk-name::placeholder { color: #8f9bd6; opacity: 1; }
.mk .mk-prompt:hover, .mk .mk-name:hover { border-color: #b2bfff; }
.mk .mk-prompt:focus-visible, .mk .mk-name:focus-visible { border-color: #ffd400; outline: 3px solid rgba(255, 212, 0, 0.55); outline-offset: 1px; box-shadow: 0 0 28px rgba(255, 212, 0, 0.35); }
.mk-count { margin: 0; color: #b9c6ff; text-align: right; }

.mk-ideas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mk-ideas-label { color: #b9c6ff; font-size: 12.5px; font-weight: 700; }
.mk-idea-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mk-idea {
  min-height: 32px;
  padding: 5px 12px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: 700 12.5px/1.1 var(--font-body);
  cursor: pointer;
  transition: transform 0.12s var(--ease-out), background 0.15s, border-color 0.15s;
}
.mk-idea:hover { border-color: #ffd400; background: rgba(255, 212, 0, 0.16); transform: translateY(-2px); }

.mk-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.mk-make {
  min-height: 56px;
  padding: 0.6em 1.8em;
  font: 15px/1 var(--font-arcade);
  text-transform: uppercase;
  box-shadow: 0 5px 0 #0a1150, inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 0 26px rgba(255, 212, 0, 0.5);
  animation: mk-pulse 2.6s ease-in-out infinite;
}
.mk-make:hover { filter: brightness(1.06) saturate(1.15); }
.mk-make.is-busy { animation: none; cursor: progress; }
.mk-make-icon { flex: none; }
@keyframes mk-pulse { 50% { box-shadow: 0 5px 0 #0a1150, inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 212, 0, 0.75); } }
.mk-fine { flex: 1 1 220px; margin: 0; color: #cfd8ff; font-size: 12.5px; }
.mk-fine a, .mk-sub a { color: #ffe27a; }
.mk-fine a:hover { color: #fff; }
.mk-keys { margin: 0; color: #8f9bd6; }
.mk-keys kbd { background: rgba(255, 255, 255, 0.92); }

/* "Already use Claude Code?" */
.mk-cc { margin: 16px 0 0; border-top: 2px dashed rgba(185, 198, 255, 0.35); padding-top: 12px; }
.mk-cc-sum {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  list-style: none;
  color: #e3e9ff;
  font-size: 13.5px;
  cursor: pointer;
}
.mk-cc-sum::-webkit-details-marker { display: none; }
.mk-cc-q b { color: #ffb27a; }
.mk-cc-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 2px solid #ffb27a;
  border-radius: 999px;
  color: #ffb27a;
  font-weight: 700;
  font-size: 12.5px;
}
.mk-cc-open::after { content: "▾"; transition: transform 0.15s; }
.mk-cc[open] .mk-cc-open::after { transform: rotate(180deg); }
.mk-cc-sum:hover .mk-cc-open { background: rgba(255, 178, 122, 0.16); }
.mk-cc-sum:focus-visible { outline: 3px solid #ffd400; outline-offset: 3px; border-radius: 8px; }
.mk-cc-body { margin-top: 12px; }

.mk-page .mk-title { font-size: 24px; }
.mk-page .mk-grid-floor { opacity: 0.35; }

/* ── Connect your Claude (.cc) ─────────────────────────────────────────────── */

.cc {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 3px solid var(--rr-navy);
  border-radius: 16px;
  background:
    radial-gradient(#e3eaff 1px, transparent 1.4px) 0 0 / 14px 14px,
    #fbfcff;
  color: var(--rr-ink);
  box-shadow: 0 5px 0 rgba(20, 32, 107, 0.22);
  --focus: #14206b;
}
.cc-head { display: flex; align-items: center; gap: 14px; }
.cc-plug {
  position: relative;
  display: inline-flex;
  flex: none;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  padding-top: 8px;
  border: 3px solid var(--rr-navy);
  border-radius: 12px 12px 18px 18px;
  background: linear-gradient(180deg, #ffc49e, #e8692c);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.5), 0 3px 0 var(--rr-navy);
}
.cc-plug::after { content: ""; position: absolute; left: 50%; bottom: -12px; width: 6px; height: 10px; margin-left: -3px; border-radius: 0 0 3px 3px; background: var(--rr-navy); }
.cc-plug-prong { width: 6px; height: 14px; border: 2px solid var(--rr-navy); border-radius: 3px; background: #fff; }
.cc-head-text { min-width: 0; }
.cc-title { margin: 0; color: var(--rr-navy); font: 700 17px/1.2 var(--font-pixel); text-transform: uppercase; }
.cc-lead { margin: 4px 0 0; max-width: 70ch; font-size: 13.5px; }
.cc-sub { margin: 0; color: var(--rr-navy); font: 700 13px/1.2 var(--font-pixel); text-transform: uppercase; }

.cc-start {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
  border: 3px solid var(--rr-navy);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8c9 0%, #ffe679 100%);
  box-shadow: 0 4px 0 rgba(20, 32, 107, 0.25);
}
.cc-start-title { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--rr-navy); font: 700 14px/1.2 var(--font-pixel); text-transform: uppercase; }
.cc-start-spark {
  width: 14px;
  height: 14px;
  flex: none;
  background: #e8692c;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: ws-twinkle 2.4s ease-in-out infinite;
}
.cc-start-lead { margin: 0; font-size: 13px; color: #4d3d00; }
.cc-start-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.cc-way { display: grid; gap: 6px; min-width: 0; align-content: start; }
.cc-way-label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--rr-navy); font-weight: 700; font-size: 13px; }
.cc-way-hint { margin: 0; color: #5e4d10; font-size: 12px; }

.cc-badge {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  padding: 0 4px;
  border: 2px solid var(--rr-navy);
  border-radius: 7px;
  font: 700 11px/1 var(--font-mono);
}
.cc-badge-code { background: #0f1640; color: #3ff58a; }
.cc-badge-ai { background: linear-gradient(180deg, #ffb27a, #e8692c); color: #fff; font: 700 14px/1 var(--font-body); }

.cc-copy {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border: 2px solid var(--rr-navy);
  border-radius: 12px;
  background: #0f1640;
  overflow: hidden;
}
.cc-copy-prompt { flex: none; padding: 9px 0 9px 12px; color: #3ff58a; font: 700 13px/1.45 var(--font-mono); user-select: none; }
.cc-copy-text {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 0;
  border-radius: 0;
  background: none;
  color: #e4ecff;
  font: 13px/1.45 var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  user-select: all;
}
.cc .cc-copy-btn { flex: none; align-self: stretch; min-height: 0; margin: 0; border: 0; border-left: 2px solid var(--rr-navy); border-radius: 0; box-shadow: none; white-space: nowrap; }
.cc .cc-copy-btn:focus-visible { outline: 3px solid #ffd400; outline-offset: -4px; }
/* In a narrow card the Copy button moves under the text, so commands keep their full width. */
.cc-card, .cc-way { container-type: inline-size; }
@container (max-width: 380px) {
  .cc-copy { flex-wrap: wrap; }
  .cc-copy-text { flex-basis: 100%; }
  .cc-copy-prompt + .cc-copy-text { flex-basis: calc(100% - 2em); }
  .cc .cc-copy-btn { flex: 1 0 100%; min-height: 34px; border-left: 0; border-top: 2px solid var(--rr-navy); }
}

.cc-setup-title { margin-top: 2px; }
.cc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cc-card { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 12px 14px 14px; border: 2px solid var(--rr-navy); border-radius: 14px; background: #fff; box-shadow: 0 3px 0 rgba(20, 32, 107, 0.18); }
.cc-card-code { border-top: 6px solid #3ff58a; }
.cc-card-ai { border-top: 6px solid #e8692c; }
.cc-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; }
.cc-card-name { color: var(--rr-navy); font: 700 14px/1.2 var(--font-pixel); text-transform: uppercase; }
.cc-card-where { color: var(--rr-muted); font-size: 12px; }
.cc-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: cc; }
.cc-steps > li { display: grid; gap: 6px; min-width: 0; padding-left: 32px; position: relative; counter-increment: cc; font-size: 13px; }
.cc-steps > li::before {
  content: counter(cc);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 2px solid var(--rr-navy);
  border-radius: 50%;
  background: var(--rr-yellow);
  color: var(--rr-navy);
  font: 9px/1 var(--font-arcade);
}
.cc-step-text code, .cc-way-hint code { padding: 0 4px; border-radius: 4px; background: #e8edfb; font-size: 12px; }
.cc-steps q { font-style: italic; }
.cc-plan { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 12px; border: 2px dashed var(--rr-line); border-radius: 12px; background: #fff; font-size: 13px; }
.cc-plan-icon { flex: none; font-size: 18px; line-height: 1.1; }
.cc-next { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; color: var(--rr-muted); font-size: 12.5px; }
.cc-next li { display: inline-flex; gap: 6px; }

.cc-compact { gap: 12px; padding: 12px; }
.cc-compact .cc-cards { grid-template-columns: minmax(0, 1fr); }
.cc-compact .cc-title { font-size: 14px; }
.cc-compact .cc-plug { width: 38px; height: 38px; padding-top: 6px; }
/* On the dark hero, a light card floats on the arcade screen. */
.mk .cc { box-shadow: 0 5px 0 rgba(0, 0, 0, 0.3); }
.mk .cc-compact .cc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ── Workshop list and new pages (.wk) ─────────────────────────────────────── */

.wk-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 16px;
  padding: 20px 22px;
  overflow: hidden;
  border: 3px solid var(--rr-navy);
  border-radius: 18px;
  background: radial-gradient(90% 140% at 15% 50%, #8a3ffc 0%, #4a1fa8 55%, #2a1170 100%);
  color: #fff;
  box-shadow: 0 6px 0 rgba(20, 32, 107, 0.3);
  --focus: #ffd400;
}
.wk-hero-art { flex: none; width: 104px; height: auto; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.3)); }
.wk-hero-title { margin: 0 0 8px; color: #ffd400; font: 22px/1.3 var(--font-arcade); text-shadow: 0 3px 0 #0a1150; }
.wk-hero-lead { margin: 0 0 14px; max-width: 60ch; color: #f1e9ff; font-size: 15px; }
.wk-hero-actions { margin: 0; }

.wk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.wk-card { min-width: 0; }
.wk-card-link {
  display: grid;
  gap: 8px;
  height: 100%;
  padding: 12px 14px 14px;
  border: 3px solid var(--rr-navy);
  border-radius: 14px;
  background: #fff;
  color: var(--rr-ink);
  text-decoration: none;
  box-shadow: 0 5px 0 rgba(20, 32, 107, 0.22);
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s;
}
.wk-card-link:hover { color: var(--rr-ink); transform: translateY(-3px) rotate(-0.5deg); box-shadow: 0 8px 0 rgba(20, 32, 107, 0.24); }
.wk-card-link:hover .wk-card-title { color: var(--rr-link-hover); text-decoration: underline; }
.wk-card.is-archived .wk-card-link { background: #f1f3f9; }
.wk-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.wk-card-title { color: var(--rr-navy); font: 700 15px/1.2 var(--font-pixel); text-transform: uppercase; overflow-wrap: anywhere; }
.wk-card-game { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.wk-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--rr-muted); font-size: 12px; }
.wk-rev { color: var(--rr-navy); font-weight: 700; }
.wk-mode-create { background: #7433dc; color: #fff; }
.wk-mode-edit { background: #0b7369; color: #fff; }
.wk-role { padding: 2px 8px; border: 2px solid var(--rr-line); border-radius: 999px; background: var(--rr-soft); color: var(--rr-navy); font-size: 11.5px; font-weight: 700; }
.wk-role-host { border-color: #ffb400; background: #fff6c2; }

.wk-games { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wk-game { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border: 2px dashed var(--rr-line); border-radius: 12px; background: #fff; }
.wk-game-title { font-weight: 700; color: var(--rr-navy); }
.wk-game .inline-form { margin-left: auto; }

.wk-steps { display: grid; gap: 8px; margin: 0; padding-left: 1.3em; font-size: 13px; }
.wk-side-panel p:last-child { margin-bottom: 0; }
.wk-connect { margin: 0 0 16px; }

/* ── The studio (.ws) ──────────────────────────────────────────────────────── */

.ws [hidden] { display: none !important; }
.ws { display: grid; gap: 12px; min-width: 0; }

.ws-bar {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 3px solid var(--rr-navy);
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1.6px) 0 0 / 14px 14px,
    radial-gradient(120% 160% at 10% 0%, #3d63ff 0%, transparent 60%),
    linear-gradient(180deg, #2a46e0 0%, #1a2a9c 70%, #14206b 100%);
  box-shadow: 0 5px 0 rgba(20, 32, 107, 0.28);
  --focus: #ffd400;
}
.ws-bar a { color: #ffe27a; }
.ws-bar a:hover { color: #fff; }
.ws-bar-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ws-ident { flex: 1 1 240px; min-width: 0; }
.ws-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 12.5px; }
.ws-game-link { font-weight: 700; }
.ws-you { color: #c9d4ff; }
.ws-you b { color: #fff; }
.ws-title { margin: 0; color: #ffd400; font: 700 21px/1.15 var(--font-pixel); text-transform: uppercase; text-shadow: 0 2px 0 #0a1150; overflow-wrap: anywhere; }

.ws-status { display: grid; gap: 6px; justify-items: start; min-width: 0; }

/* The driver chip: a cabinet light that glows when someone's Claude is driving. */
.ws-driver {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin: 0;
  padding: 5px 14px 5px 6px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(5, 8, 40, 0.5);
  font-size: 12.5px;
}
.ws-driver-light { display: grid; flex: none; place-items: center; width: 26px; height: 26px; border: 2px solid #0a1150; border-radius: 50%; background: #2a3570; }
.ws-driver-bulb { width: 14px; height: 14px; border-radius: 50%; background: #ffb400; box-shadow: 0 0 10px #ffb400; animation: ws-pulse 1.4s ease-in-out infinite; }
.ws-driver.is-active { border-color: #3ff58a; background: rgba(10, 70, 40, 0.55); }
.ws-driver.is-active .ws-driver-bulb { background: #3ff58a; box-shadow: 0 0 12px #3ff58a, 0 0 22px rgba(63, 245, 138, 0.6); animation: ws-glow 2.4s ease-in-out infinite; }
.ws-driver.is-idle .ws-driver-bulb { background: #ff9d3d; box-shadow: 0 0 8px #ff9d3d; }
.ws-driver-copy { display: grid; min-width: 0; }
.ws-driver-label { color: #b9c6ff; font: 700 9.5px/1.2 var(--font-pixel); text-transform: uppercase; letter-spacing: 0.04em; }
.ws-driver-text { color: #fff; font-weight: 700; overflow-wrap: anywhere; }
.ws-driver-task { color: #c9f5d8; font-size: 12px; overflow-wrap: anywhere; }
@keyframes ws-glow { 50% { box-shadow: 0 0 6px #3ff58a, 0 0 12px rgba(63, 245, 138, 0.4); } }

.ws-conn { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 3px 10px; border-radius: 999px; background: rgba(5, 8, 40, 0.45); font-size: 11.5px; font-weight: 700; }
.ws-conn-dot { width: 9px; height: 9px; border-radius: 50%; background: #ffd400; box-shadow: 0 0 6px currentColor; }
.ws-conn.is-live .ws-conn-dot { background: #3ff58a; color: #3ff58a; }
.ws-conn.is-connecting .ws-conn-dot { animation: ws-blink 0.8s steps(2, start) infinite; }
.ws-conn.is-retry .ws-conn-dot { background: #ff9d3d; }
.ws-conn.is-gone .ws-conn-dot { background: #ff5a4f; }
.ws-conn-retry { padding: 2px 8px; border: 2px solid #ffd400; border-radius: 999px; background: transparent; color: #ffd400; font: 700 11.5px/1 var(--font-body); cursor: pointer; }

/* Side by side, not stacked: the avatars are three-letter initials, and an overlap hid the last letter and the
   online dot of everyone but the last person. */
.ws-people { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ws-person { position: relative; }
.ws-person .avatar { min-width: 32px; height: 28px; border-color: #0a1150; opacity: 0.55; }
.ws-person.is-online .avatar { opacity: 1; box-shadow: 0 0 0 2px #3ff58a; }
.ws-person.is-online::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border: 2px solid #14206b; border-radius: 50%; background: #3ff58a; }
.ws-person.is-driving .avatar { opacity: 1; background: linear-gradient(180deg, #ffc49e, #e8692c); color: #fff; }
.ws-person.is-driving::before { content: "✳"; position: absolute; top: -9px; left: 50%; z-index: 1; transform: translateX(-50%); color: #ffb27a; font: 700 12px/1 var(--font-body); text-shadow: 0 0 4px #0a1150; }
.ws-person-more { margin-left: 0; color: #c9d4ff; font-size: 12px; font-weight: 700; }

.ws-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ws .ws-on-dark { border-color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: 0 2px 0 #0a1150; }
.ws .ws-on-dark:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }

/* The connect panel band: wide open until a Claude is driving, then a one-line bar. */
.ws-connect { min-width: 0; border: 3px solid var(--rr-navy); border-radius: 16px; background: #fff; box-shadow: 0 5px 0 rgba(20, 32, 107, 0.22); overflow: hidden; }
.ws-connect-sum {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 14px;
  list-style: none;
  background: linear-gradient(180deg, #ffc49e 0%, #f08a4b 100%);
  color: var(--rr-navy);
  cursor: pointer;
}
.ws-connect-sum::-webkit-details-marker { display: none; }
.ws-connect-sum:focus-visible { outline: 3px solid var(--rr-navy); outline-offset: -5px; }
.ws-connect-plug { font-size: 18px; }
.ws-connect-name { font: 700 14px/1.2 var(--font-pixel); text-transform: uppercase; }
.ws-connect-hint { flex: 1 1 200px; color: #3a1a05; font-size: 12.5px; }
.ws-connect-toggle { width: 28px; height: 28px; flex: none; border: 2px solid var(--rr-navy); border-radius: 50%; background: #fff; }
.ws-connect-toggle::before { content: "▾"; display: grid; place-items: center; height: 100%; font: 700 14px/1 var(--font-body); transition: transform 0.15s; }
.ws-connect[open] .ws-connect-toggle::before { transform: rotate(180deg); }
.ws-connect.is-driven .ws-connect-sum { background: linear-gradient(180deg, #d6f8e1 0%, #9fe6b6 100%); }
.ws-connect-body { padding: 12px; background: #eef3ff; }
.ws-connect-body .cc { box-shadow: none; }

.ws-mtabs { display: none; }

.ws-body {
  display: grid;
  grid-template-columns: minmax(330px, 5fr) minmax(0, 7fr);
  gap: 12px;
  height: clamp(560px, calc(100vh - 200px), 980px);
  min-width: 0;
}
.ws-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 3px solid var(--rr-navy);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 0 rgba(20, 32, 107, 0.22);
}

/* Conversation */
.ws-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 14px 6px;
  background: radial-gradient(#dfe8ff 1px, transparent 1.4px) 0 0 / 16px 16px, #f7f9ff;
}
.ws-log:focus-visible { outline-offset: -4px; }
.ws-log-empty { display: grid; justify-items: center; gap: 8px; margin: 32px auto; max-width: 36ch; color: var(--rr-muted); text-align: center; }
.ws-log-empty p { margin: 0; }
.ws-log-empty img { animation: ws-float 3.2s ease-in-out infinite; }
.ws-log-empty-title { color: var(--rr-navy); font: 700 15px/1.2 var(--font-pixel); text-transform: uppercase; }
@keyframes ws-float { 50% { transform: translateY(-6px); } }
.ws-jump { position: absolute; left: 50%; bottom: 210px; z-index: 2; transform: translateX(-50%); padding: 6px 14px; border: 2px solid var(--rr-navy); border-radius: 999px; background: var(--rr-yellow); color: var(--rr-navy); font: 700 12.5px/1 var(--font-body); box-shadow: 0 3px 0 var(--rr-navy); cursor: pointer; }

.ws-msg { margin: 0 0 12px; min-width: 0; }
.ws-msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 5px; font-size: 12.5px; }
.ws-ava { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border: 2px solid var(--rr-navy); border-radius: 50%; background: #e3ebfd; color: var(--rr-navy); font: 8px/1 var(--font-arcade); }
.ws-ava-claude { background: linear-gradient(180deg, #ffb27a, #e8692c); color: #fff; font: 700 14px/1 var(--font-body); }
.ws-ava-sm { width: 20px; height: 20px; font-size: 11px; }
.ws-msg-who { color: var(--rr-navy); }
.ws-msg-meta { color: var(--rr-muted); }
.ws-msg-time { margin-left: auto; color: var(--rr-muted); font-size: 11.5px; }
.ws-msg-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ws-chat { max-width: 92%; padding: 8px 12px 10px; border: 2px solid #c6d3f0; border-radius: 14px 14px 14px 4px; background: #eaf2ff; }
.ws-chat.is-mine { margin-left: auto; border-color: #a8dcb6; border-radius: 14px 14px 4px 14px; background: #e6f8ea; }
.ws-claude { padding: 10px 14px 12px; border: 2px solid #e8692c; border-radius: 14px; background: #fffaf6; box-shadow: 0 3px 0 rgba(232, 105, 44, 0.25); }
.ws-rich { min-width: 0; overflow-wrap: anywhere; }
.ws-rich p { margin: 0 0 0.6em; white-space: pre-wrap; }
.ws-rich > :last-child { margin-bottom: 0; }
.ws-rich ul, .ws-rich ol { margin: 0 0 0.6em; }
.ws-rich-h { color: var(--rr-navy); font-weight: 700; }
.ws-rich-code { max-height: 340px; margin: 0 0 0.6em; font-size: 12px; }
.ws-rich-code.is-open { border-style: dashed; }
.ws-sys { width: fit-content; max-width: 92%; margin: 0 auto 12px; padding: 4px 12px; border-radius: 999px; background: #e6ebf7; color: var(--rr-muted); font-size: 12.5px; text-align: center; }
.ws-sys-warn { border: 2px solid #ffb400; border-radius: 12px; background: #fff6d6; color: #6b4a00; }

/* Request cards: a ticket that changes color as Claude works on it. */
.ws-req { position: relative; margin: 0 0 12px; padding: 9px 12px 11px 16px; border: 2px solid #d4a600; border-radius: 12px; background: #fff6c2; box-shadow: 0 3px 0 rgba(212, 166, 0, 0.35); }
.ws-req::before { content: ""; position: absolute; left: -2px; top: 10px; bottom: 10px; width: 5px; border-radius: 0 4px 4px 0; background: #ffb400; }
.ws-req-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 4px; font-size: 12.5px; }
.ws-req-badge { padding: 3px 7px; border: 2px solid var(--rr-navy); border-radius: 7px; background: #fff; color: var(--rr-navy); font: 8px/1 var(--font-arcade); text-transform: uppercase; }
.ws-req-text { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 700; color: #3d2f00; }
.ws-req-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: 12px; }
.ws-req-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border: 2px solid currentColor; border-radius: 999px; background: #fff; color: #6b4a00; font-weight: 700; }
.ws-req-votes { color: #6b4a00; font-weight: 700; }
.ws-req.is-waiting { border-style: dashed; }
.ws-req.is-claimed { border-color: #e8692c; background: #fff0e6; box-shadow: 0 0 0 3px rgba(232, 105, 44, 0.16), 0 3px 0 rgba(232, 105, 44, 0.3); }
.ws-req.is-claimed::before { background: #e8692c; }
.ws-req.is-claimed .ws-req-chip { color: #a3410f; }
.ws-req.is-claimed .ws-req-icon { display: inline-block; animation: ws-spin 2.4s linear infinite; }
.ws-req.is-done { border-color: #1fa34a; background: #eafaee; box-shadow: 0 3px 0 rgba(19, 122, 58, 0.25); }
.ws-req.is-done::before { background: #1fa34a; }
.ws-req.is-done .ws-req-text { color: #0f3d20; }
.ws-req.is-done .ws-req-chip { color: #137a3a; }
.ws-req.is-skipped, .ws-req.is-withdrawn, .ws-req.is-closed { border-color: #b9c3dd; background: #f3f5fb; box-shadow: none; }
.ws-req.is-skipped::before, .ws-req.is-withdrawn::before, .ws-req.is-closed::before { background: #b9c3dd; }
.ws-req.is-skipped .ws-req-text, .ws-req.is-withdrawn .ws-req-text, .ws-req.is-closed .ws-req-text { color: var(--rr-muted); }
.ws-req.is-skipped .ws-req-chip, .ws-req.is-withdrawn .ws-req-chip, .ws-req.is-closed .ws-req-chip { color: var(--rr-muted); }
.ws-req.is-needs_info { border-color: #1f6feb; background: #eaf2ff; }
.ws-req.is-needs_info::before { background: #1f6feb; }
.ws-req.is-needs_info .ws-req-chip { color: #1b4fb0; }
.ws-req-note { margin: 8px 0 0; padding: 8px 10px; border: 2px solid rgba(232, 105, 44, 0.45); border-radius: 10px; background: #fffaf6; font-size: 13px; }
.ws-req-note-who { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; color: #a3410f; font-weight: 700; font-size: 12px; }
@keyframes ws-spin { to { transform: rotate(360deg); } }

.ws-rev { margin: 0 0 12px; padding: 10px 12px 12px; border: 2px solid #1fa34a; border-radius: 14px; background: linear-gradient(180deg, #effcf2, #e1f6e7); box-shadow: 0 3px 0 rgba(19, 122, 58, 0.25); }
.ws-rev-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 6px; font-size: 12.5px; }
.ws-rev-badge { padding: 4px 8px; border: 2px solid var(--rr-navy); border-radius: 8px; background: linear-gradient(180deg, #c9f560, #7cc400); color: var(--rr-navy); font: 9px/1 var(--font-arcade); }
.ws-rev-who { color: #0f5a2b; font-weight: 700; }
.ws-rev-summary { margin: 0 0 6px; }
.ws-rev-stat { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; font: 700 12px/1.3 var(--font-mono); }
.ws-plus { color: #137a3a; font-weight: 700; }
.ws-minus { color: #b3261e; font-weight: 700; margin-left: 6px; }
.ws-files-n { color: var(--rr-muted); }
.ws-rev-files { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 8px; padding: 0; list-style: none; font-size: 12px; }
.ws-rev-file-stat { color: var(--rr-muted); font-family: var(--font-mono); }
.ws-linkish { padding: 0; border: 0; background: none; color: var(--rr-link); font: 700 12px/1.3 var(--font-mono); text-decoration: underline; cursor: pointer; }
.ws-rev-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.ws-checks { margin: 0; padding: 6px 10px; border: 2px solid; border-radius: 10px; background: #fff; font-size: 12.5px; }
.ws-checks summary { font-weight: 700; }
.ws-checks-pass { border-color: #1fa34a; }
.ws-checks-pass summary { color: #137a3a; }
.ws-checks-flag { border-color: #d99a00; }
.ws-checks-flag summary { color: #6b4a00; }
.ws-checks-fail { border-color: #c42c21; }
.ws-checks-fail summary { color: #b3261e; }
.ws-findings { display: grid; gap: 4px; margin: 8px 0; padding-left: 1.1em; }
.ws-finding-level { padding: 0 5px; border-radius: 5px; background: #e6ebf7; font: 700 10.5px/1.5 var(--font-body); text-transform: uppercase; }
.ws-finding-error .ws-finding-level { background: #b3261e; color: #fff; }
.ws-finding-flag .ws-finding-level { background: #ffcf4d; }
.ws-finding-warn .ws-finding-level { background: #fff2a8; }

/* Chat safety (§12.3): Report on what others wrote, editors' Hide / Restore, hidden entries. */
.ws-entry-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 2px 8px; margin: 4px -4px -4px 0; }
.ws-entry-actions:empty { display: none; }
.ws-act { min-height: 26px; padding: 2px 7px; border: 2px solid transparent; border-radius: 8px; background: none; color: var(--rr-muted); font: 700 11.5px/1.2 var(--font-body); cursor: pointer; }
.ws-act:hover, .ws-act[aria-expanded="true"] { border-color: currentColor; background: #fff; color: var(--rr-navy); }
.ws-act-report:hover, .ws-act-report[aria-expanded="true"] { color: var(--rr-danger); }
.ws-act-mod { border-color: currentColor; background: #fff; color: var(--rr-navy); }
.ws-act-mod.is-danger { color: var(--rr-danger); }
.ws-reported { padding: 2px 4px; color: var(--rr-muted); font-size: 11.5px; font-weight: 700; }
@media (hover: hover) {
  .ws-msg:not(:hover):not(:focus-within) .ws-act-report,
  .ws-req:not(:hover):not(:focus-within) .ws-act-report { opacity: 0.6; }
}
.ws-tray { margin: 8px 0 0; padding: 10px 12px; border: 2px solid var(--rr-navy); border-radius: 12px; background: #fff; box-shadow: 0 3px 0 rgba(20, 32, 107, 0.18); color: var(--rr-ink); font-size: 13px; }
.ws-tray-title { margin: 0 0 6px; color: var(--rr-navy); font: 700 11.5px/1.2 var(--font-pixel); text-transform: uppercase; }
.ws-tray-reasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 0 12px; }
.ws-tray-reason { display: flex; align-items: center; gap: 7px; min-height: 32px; cursor: pointer; }
.ws-tray-reason input { width: 17px; height: 17px; margin: 0; accent-color: var(--rr-danger); }
.ws-tray-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.ws-tray-hint { margin: 6px 0 0; color: var(--rr-muted); }
.ws-hidden-note { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--rr-muted); font-size: 13px; font-style: italic; }
.ws-hidden-icon { font-style: normal; }
.ws-msg.is-hidden, .ws-req.is-hidden {
  border-style: dashed;
  border-color: #aab5d3;
  background: repeating-linear-gradient(-45deg, #f4f6fc 0 10px, #edf0f9 10px 20px);
  box-shadow: none;
}
.ws-req.is-hidden::before { background: #aab5d3; }
.ws-req.is-hidden .ws-req-text { color: var(--rr-muted); }
.ws-mod-flag { width: fit-content; margin: 0 0 6px; padding: 2px 9px; border: 2px solid var(--rr-danger); border-radius: 999px; background: #fff; color: var(--rr-danger); font-size: 11.5px; font-weight: 700; }
.ws-mod-banner { display: flex; flex: none; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; border-bottom: 2px dashed var(--rr-line); background: #fff4d1; color: #4a3300; font-size: 12.5px; }
.ws-mod-banner a { color: var(--rr-link); font-weight: 700; }
.ws-mod-banner-icon { font-size: 16px; }

/* The request queue */
.ws-queue { flex: none; padding: 8px 12px; border-top: 2px dashed var(--rr-line); background: #fffbe6; max-height: 30%; overflow-y: auto; }
.ws-queue-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }
.ws-queue-title { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--rr-navy); font: 700 11.5px/1.2 var(--font-pixel); text-transform: uppercase; }
.ws-queue-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border: 2px solid var(--rr-navy); border-radius: 999px; background: #fff; font: 700 11px/1 var(--font-body); }
.ws-queue.has-items .ws-queue-count { background: var(--rr-yellow); }
.ws-approval { display: inline-flex; align-items: center; gap: 6px; color: var(--rr-muted); font-size: 12px; cursor: pointer; }
.ws-queue-empty { margin: 4px 0 0; color: var(--rr-muted); }
.ws-queue-list { display: grid; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.ws-queue-list:empty { display: none; }
.ws-q { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 6px 8px; border: 2px solid #f0d77a; border-radius: 10px; background: #fff; }
.ws-q.is-waiting { border-style: dashed; }
.ws-q.is-claimed { border-color: #e8692c; background: #fff4ec; }
.ws-q-text { grid-column: 1 / -1; display: -webkit-box; margin: 0; overflow: hidden; font-size: 13px; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.ws-q-meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; color: var(--rr-muted); font-size: 11.5px; }
.ws-q-next { color: #137a3a; font-weight: 700; }
.ws-q-now { color: #a3410f; font-weight: 700; }
.ws-q-wait { color: #6b4a00; font-weight: 700; }
.ws-q-actions { grid-column: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; }
.ws-q-actions:empty { display: none; }
.ws-upvote { min-width: 52px; min-height: 30px; padding: 4px 8px; border: 2px solid var(--rr-navy); border-radius: 10px; background: #fff; color: var(--rr-navy); font: 700 12.5px/1 var(--font-body); cursor: pointer; }
.ws-upvote.is-on { background: var(--rr-yellow); }
.ws-upvote:disabled { opacity: 0.55; cursor: default; }

.ws-composer { display: grid; gap: 8px; padding: 10px 12px 12px; border-top: 3px solid var(--rr-navy); background: #eef3ff; }
.ws-modes { display: inline-flex; width: fit-content; max-width: 100%; padding: 3px; border: 2px solid var(--rr-navy); border-radius: 999px; background: #fff; }
.ws-mode-opt { position: relative; cursor: pointer; }
.ws-mode-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ws-mode-opt > span { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 5px 12px; border-radius: 999px; color: var(--rr-navy); font-size: 12.5px; font-weight: 700; }
.ws-mode-opt input:checked + span { background: var(--rr-navy); color: #fff; }
.ws[data-kind="request"] .ws-mode-opt input[value="request"]:checked + span { background: linear-gradient(180deg, #f08a4b, #c9531c); }
.ws-mode-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.ws .ws-input { min-height: 74px; max-height: 40vh; font-size: 14px; }
.ws[data-kind="request"] .ws-input { border-color: #e8a400; background: #fffdf3; }
.ws-compose-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ws-compose-hint { flex: 1 1 200px; margin: 0; color: var(--rr-muted); }
.ws-kbd { white-space: nowrap; }
.ws-count { color: var(--rr-muted); }
.ws-send { margin-left: auto; }

/* Stage: preview, files, diff */
.ws-tabs { display: flex; gap: 4px; padding: 8px 10px 0; background: linear-gradient(180deg, #1a2a9c, #14206b); }
.ws-tabs [role="tab"] {
  padding: 8px 14px 7px;
  border: 2px solid #0a1150;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #c9d4ff;
  color: var(--rr-navy);
  font: 700 11.5px/1 var(--font-pixel);
  text-transform: uppercase;
  cursor: pointer;
}
.ws-tabs [role="tab"]:hover { background: #fff6c2; }
.ws-tabs [role="tab"][aria-selected="true"] { background: #fff; box-shadow: inset 0 4px 0 var(--rr-yellow); }
.ws-tabs [role="tab"]:focus-visible { outline: 3px solid #ffd400; outline-offset: -3px; }
.ws-view { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.ws-viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; border-bottom: 2px solid var(--rr-line); background: #f3f7ff; }
.ws-viewbar-gap { flex: 1; }
.ws .ws-select { width: auto; min-height: 32px; max-width: 100%; padding: 4px 30px 4px 10px; font-size: 13px; }
.ws-rev-chip { padding: 3px 10px; border: 2px solid var(--rr-navy); border-radius: 999px; background: #fff; color: var(--rr-navy); font: 700 11.5px/1.2 var(--font-pixel); text-transform: uppercase; }
.ws-rev-chip.is-old { background: #fff6c2; }
.ws-score-chip { padding: 3px 10px; border-radius: 999px; background: #e6f8ea; color: #0f5a2b; font-size: 12px; font-weight: 700; }
.ws-ro { color: var(--rr-muted); }

.ws-monitor { position: relative; flex: 1; min-height: 240px; background: radial-gradient(80% 80% at 50% 40%, #121a5c, #05081f); }
.ws-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.ws-monitor-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 20px; color: #dfe7ff; text-align: center; }
.ws-monitor-empty img { animation: ws-float 3.2s ease-in-out infinite; }
.ws-monitor-empty p { margin: 0; max-width: 34ch; }
.ws-monitor:fullscreen { background: #000; }
.ws-monitor.is-pseudo-fs { position: fixed; inset: 0; z-index: 60; }
.ws-perrors { max-height: 40%; overflow-y: auto; padding: 8px 12px; border-top: 3px solid #c42c21; background: #fdeceb; font-size: 12.5px; }
.ws-perr summary { color: #96221a; }
.ws-perr ul { margin: 8px 0; padding-left: 1.1em; }
.ws-perr code { white-space: pre-wrap; overflow-wrap: anywhere; }
.ws-perr-where { color: var(--rr-muted); font-family: var(--font-mono); }

.ws-files { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); flex: 1; min-height: 0; }
.ws-tree { overflow: auto; padding: 8px; border-right: 2px solid var(--rr-line); background: #fafbff; }
.ws-tree-list { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.ws-tree-dir { margin: 6px 0 2px; color: var(--rr-muted); font: 700 11px/1.3 var(--font-mono); overflow-wrap: anywhere; }
.ws-tree-file { display: block; width: 100%; padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--rr-ink); font: 12.5px/1.35 var(--font-mono); text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.ws-tree-file.is-nested { padding-left: 16px; }
.ws-tree-file:hover { background: #fff6c2; }
.ws-tree-file[aria-current="true"] { background: var(--rr-navy); color: #fff; }
.ws-viewer { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.ws-viewer-head { margin: 0; padding: 6px 10px; border-bottom: 2px solid var(--rr-line); font: 12.5px/1.4 var(--font-mono); overflow-wrap: anywhere; }
.ws-viewer-empty { margin: 30px auto; padding: 0 16px; text-align: center; }
.ws-code { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); flex: 1; min-height: 0; overflow: auto; background: #0f1640; }
.ws .ws-code pre { margin: 0; padding: 10px 12px; border: 0; border-radius: 0; background: none; font: 12.5px/1.55 var(--font-mono); overflow: visible; }
.ws .ws-gutter { position: sticky; left: 0; z-index: 1; padding-right: 10px; border-right: 1px solid #2a3570; background: #0c1235; color: #6d79b8; text-align: right; user-select: none; }
.ws .ws-src { color: #e4ecff; white-space: pre; tab-size: 2; }
.ws .ws-src:focus-visible { outline-offset: -3px; }

.ws-diffbar [data-ws-diff-file] { flex: 1 1 180px; min-width: 0; }
.ws-diff-revs { display: inline-flex; }
.ws-diff-revs .ws-select { min-width: 118px; }
.ws-diff { flex: 1; min-height: 0; overflow: auto; }
.ws-diff-head { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; padding: 6px 10px; border-bottom: 2px solid var(--rr-line); background: #fff; font: 12.5px/1.4 var(--font-mono); }
.ws-diff-scroll { position: relative; overflow-x: auto; }
.ws-difft { width: 100%; border-collapse: collapse; font: 12px/1.5 var(--font-mono); }
.ws-difft td { padding: 0 8px; vertical-align: top; }
.ws-difft .ln { width: 1%; color: #8b93b8; text-align: right; white-space: nowrap; user-select: none; }
.ws-difft .sig { width: 1%; font-weight: 700; user-select: none; }
.ws-difft .txt { white-space: pre; }
.ws-difft tr.is-add { background: #e3fbe9; }
.ws-difft tr.is-add .sig { color: #137a3a; }
.ws-difft tr.is-del { background: #ffecec; }
.ws-difft tr.is-del .sig { color: #b3261e; }
.ws-difft tr.is-skip td { padding: 4px 10px; background: #eef3ff; color: var(--rr-muted); text-align: center; font-family: var(--font-body); }

/* Dialogs */
.ws-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  padding: 0;
  overflow: auto;
  border: 3px solid var(--rr-navy);
  border-radius: 16px;
  background: #fff;
  color: var(--rr-ink);
  box-shadow: 0 8px 0 rgba(20, 32, 107, 0.35), 0 30px 80px rgba(5, 8, 40, 0.5);
}
.ws-dialog-wide { width: min(780px, calc(100vw - 32px)); }
.ws-dialog::backdrop { background: rgba(10, 15, 68, 0.6); backdrop-filter: blur(3px); }
.ws-dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; background: linear-gradient(180deg, #2a46e0, #14206b); color: #fff; --focus: #ffd400; }
.ws-dialog-title { flex: 1; margin: 0; color: #ffd400; font: 700 15px/1.25 var(--font-pixel); text-transform: uppercase; }
.ws-x { width: 32px; height: 32px; flex: none; border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 50%; background: transparent; color: #fff; font: 700 18px/1 var(--font-body); cursor: pointer; }
.ws-x:hover { background: rgba(255, 255, 255, 0.15); }
.ws-dialog-body { padding: 16px; }
.ws-dialog-body > :last-child { margin-bottom: 0; }
.ws-dialog-foot { position: sticky; bottom: -16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px -16px -16px; padding: 12px 16px; border-top: 2px dashed var(--rr-line); background: #fff; }
.ws-roles { display: grid; gap: 6px; }
.ws-invite-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.ws-invite-url { flex: 1 1 220px; min-width: 0; font: 13px/1.4 var(--font-mono, ui-monospace, monospace); background: #fff; }
.ws-invite-opts { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.ws-invite-opts .form-row { margin: 0; }
.ws-result { margin: 0; }
.ws-result ul { margin: 6px 0; }
.ws-result-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.ws-result .field-inline { margin: 8px 0 0; }
.ws-live-moved { margin: 0 0 12px; }
.ws-live-moved .field-inline { margin: 8px 0 0; }

/* People and invite links (host and co-owners, in the Invite dialog) */
.ws-manage { margin: 12px 0; padding: 8px 12px; border: 2px dashed var(--rr-line); border-radius: 12px; background: #fbfaff; }
.ws-manage[hidden] { display: none; }
.ws-manage-sum { cursor: pointer; font-weight: 700; }
.ws-manage-title { margin: 10px 0 4px; font-size: 14px; }
.ws-manage-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ws-manage-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.ws-manage-name { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.ws-manage-role { color: var(--rr-muted, #556); font-size: 12.5px; }

/* Viewers and moderating editors: what they can do instead of the Connect Claude steps */
.ws-viewer-note { margin: 0; }

/* Toasts */
.ws-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.ws-toast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 14px;
  border: 3px solid var(--rr-navy);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 0 rgba(20, 32, 107, 0.3);
  pointer-events: auto;
  animation: ws-toast-in 0.25s var(--ease-out);
  transition: opacity 0.35s, transform 0.35s;
}
.ws-toast.is-leaving { opacity: 0; transform: translateY(8px); }
.ws-toast-text { flex: 1 1 200px; margin: 0; font-size: 13px; }
.ws-toast-error { border-color: #c42c21; background: #fdeceb; }
.ws-toast-ok { border-color: #1fa34a; background: #e6f8ea; }
.ws-toast-x { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--rr-navy); font: 700 18px/1 var(--font-body); cursor: pointer; }
@keyframes ws-toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes ws-pulse { 50% { transform: scale(0.6); opacity: 0.6; } }

/* ── The editors' chat desk: Workshop rows (/admin/chat) ───────────────────── */

.chat-admin-ws { background: linear-gradient(180deg, #d29bff, #8a3ffc); color: #fff; }
.chat-admin-note { display: block; margin: 6px 0 0; padding: 5px 8px; border-left: 4px solid #e8692c; border-radius: 0 8px 8px 0; background: #fffaf6; font-size: 12.5px; }

/* ── Home: categories with games, and one "Open slots" row for the empty ones ─ */
/* With few games the category shelf is a row: the filled categories as cards, then one box of open slots that
   takes the rest of the row (or a row of its own when there is no room). */

.cat-cards.cat-cards-few { display: flex; flex-wrap: wrap; align-items: flex-start; }
.cat-cards-few > .cat-card { flex: 1 1 230px; min-width: 190px; max-width: 420px; }
.open-slots {
  flex: 1 1 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px 14px;
  border: 3px dashed #7d8cc8;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(rgba(20, 32, 107, 0.07) 1px, transparent 1.5px) 0 0 / 12px 12px,
    linear-gradient(180deg, #fffdf0, #fff6cc);
}
.open-slots-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.open-slots-title { margin: 0; color: var(--rr-navy); font: 700 15px/1.15 var(--font-pixel); text-transform: uppercase; }
.open-slots-count { padding: 2px 8px; border: 2px solid var(--rr-navy); border-radius: 999px; background: var(--rr-yellow); color: var(--rr-navy); font: 700 11px/1.2 var(--font-body); }
.open-slots-lead { margin: 0; font-size: 12.5px; }
.open-slots-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.open-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 10px 6px 7px;
  border: 2px dashed var(--accent);
  border-radius: 12px;
  background: #fff;
  color: var(--rr-navy);
  font-weight: 700;
  font-size: 12.5px;
  text-decoration: none;
  transition: transform 0.15s var(--ease-out), background-color 0.15s;
  container-type: inline-size;
}
.open-slot:hover, .open-slot:focus-visible { border-style: solid; background: var(--accent-bg); color: var(--accent-on); transform: translateY(-2px); }
.open-slot .cat-icon { width: 28px; height: 28px; flex: none; }
/* Sized to the slot, so the longest one-word name (MULTIPLAYER) fits on a phone instead of breaking mid-word. */
.open-slot-name { min-width: 0; font: 700 min(11.5px, calc((100cqi - 72px) / 10))/1.2 var(--font-pixel); text-transform: uppercase; overflow-wrap: break-word; }
.open-slot-plus { margin-left: auto; color: var(--rr-muted); font: 700 16px/1 var(--font-body); }
.open-slot:hover .open-slot-plus, .open-slot:focus-visible .open-slot-plus { color: inherit; }
.open-slots-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; }
/* Nothing published yet: the open slots are the whole shelf. */
.open-slots.is-all { flex-basis: 100%; }
.open-slots.is-all .open-slots-list { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .ws-mtabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 3px solid var(--rr-navy);
    border-radius: 999px;
    background: #fff;
  }
  .ws-mtabs [role="tab"] { min-height: 40px; border: 0; border-radius: 999px; background: none; color: var(--rr-navy); font: 700 12.5px/1 var(--font-pixel); text-transform: uppercase; cursor: pointer; }
  .ws-mtabs [role="tab"][aria-selected="true"] { background: var(--rr-navy); color: #fff; }
  .ws-dot-new { display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: var(--rr-red); vertical-align: middle; }
  .ws-body { grid-template-columns: minmax(0, 1fr); height: auto; }
  .ws-pane { height: max(480px, calc(100svh - 190px)); }
  .ws.is-js[data-pane="convo"] .ws-stage,
  .ws.is-js[data-pane="preview"] .ws-convo,
  .ws.is-js[data-pane="code"] .ws-convo { display: none; }
  .ws-jump { bottom: 220px; }
  .cc-cards, .cc-start-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .mk-screen { padding: 20px 16px 16px; }
  .mk-title { font-size: 19px; }
  .mk-sub { font-size: 14px; }
  .mk-make { width: 100%; padding-inline: 1em; white-space: normal; text-align: center; }
  .mk .cc-compact .cc-cards { grid-template-columns: minmax(0, 1fr); }
  .wk-hero { flex-direction: column; align-items: flex-start; }
  .ws-bar-actions { margin-left: 0; }
  .ws-title { font-size: 17px; }
  .ws-files { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .ws-tree { max-height: 132px; border-right: 0; border-bottom: 2px solid var(--rr-line); }
  .ws-diffbar [data-ws-diff-file] { flex-basis: 100%; }
  .cc-head { align-items: flex-start; }
}

@media (max-width: 560px) {
  .mk { border-radius: 18px; padding: 4px; }
  .mk-frame { border-radius: 15px; }
  .mk-keys { display: none; }
  .mk-cc-open { width: 100%; justify-content: center; }
  .cc { padding: 12px; }
  .cc-copy { flex-wrap: wrap; }
  .cc .cc-copy-btn { flex: 1 0 100%; min-height: 36px; border-left: 0; border-top: 2px solid var(--rr-navy); }
  .ws-bar { padding: 10px; }
  .ws-status, .ws-driver { width: 100%; }
  .ws-connect-sum { padding: 10px 12px; }
  .ws-connect-hint { order: 3; flex-basis: 100%; }
  .ws-connect-toggle { margin-left: auto; }
  .ws-connect-body { padding: 8px; }
  .ws-chat { max-width: 100%; }
  .ws-tabs [role="tab"] { padding: 8px 10px 7px; }
  .ws-dialog-body { padding: 14px; }
  .ws-dialog-foot { margin: 4px -14px -14px; padding: 12px 14px; }
  .ws-q { grid-template-columns: minmax(0, 1fr); }
  .ws-q-actions { grid-column: 1; justify-content: flex-start; }
  .ws-tray-reasons { grid-template-columns: minmax(0, 1fr); }
  .cat-cards-few > .cat-card { flex: 1 1 140px; min-width: 140px; }
  .open-slots { flex-basis: 100%; padding: 10px 12px 12px; }
  .open-slots-list, .open-slots.is-all .open-slots-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  /* Phones: two slots a row, icon over name, so even MULTIPLAYER keeps a readable size. */
  .open-slot { flex-direction: column; justify-content: center; gap: 5px; min-height: 66px; padding: 8px 6px; text-align: center; }
  .open-slot .cat-icon { width: 26px; height: 26px; }
  .open-slot-plus { display: none; }
  .open-slot-name { font-size: min(11.5px, calc((100cqi - 12px) / 9.2)); }
  .open-slots-actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .mk, .mk.is-zapped, .mk-grid-floor, .mk-make, .nav-workshop-spark, .cc-start-spark, .ws-driver-bulb, .ws-driver.is-active .ws-driver-bulb,
  .ws-req.is-claimed .ws-req-icon, .ws-log-empty img, .ws-monitor-empty img, .ws-conn-dot { animation: none !important; }
  .mk-idea:hover, .wk-card-link:hover, .open-slot:hover, .open-slot:focus-visible { transform: none; }
}

@media (forced-colors: active) {
  .mk { background: CanvasText; }
  .ws-mode-opt input:checked + span, .ws-tabs [role="tab"][aria-selected="true"] { outline: 2px solid Highlight; }
  .ws-driver.is-active .ws-driver-bulb { background: Highlight; }
}
