/* ============================================================
   The Green Room app (2026-09-24).

   Todd: "Once we're in the green room, I'd love it to have the feeling
   of a paid tool like Foreplay." So the Green Room is an app, not a
   page of the marketing site: one shell on every Green Room page, with
   a sidebar holding every tool (no hunting for the next one), a slim
   top bar, and the green canvas the research tools sit on. The site
   keeps css/site.css; this is the Green Room's own, smaller system.

   Tokens first. The canvas is deep green (Todd picked it over mint and
   black on the design preview, 2026-09-24).
   ============================================================ */
:root {
  --g-bg: #0b0f0e;
  --g-side: #090c0b;
  --g-raise: #111715;
  --g-line: rgba(255, 255, 255, 0.08);
  --g-line-2: rgba(255, 255, 255, 0.15);
  --g-text: #eaf4f0;
  --g-muted: rgba(234, 244, 240, 0.66);
  --g-faint: rgba(234, 244, 240, 0.44);
  --g-mint: #00ffce;
  --g-mint-ink: #05281f;
  --g-mint-soft: rgba(0, 255, 206, 0.12);
  --g-canvas: linear-gradient(155deg, #11553f 0%, #0c3b2e 50%, #082a21 100%);
  --g-canvas-line: rgba(0, 255, 206, 0.2);
  --g-card: rgba(2, 16, 12, 0.6);
  --g-card-hover: rgba(2, 16, 12, 0.82);
  --g-card-line: rgba(0, 255, 206, 0.16);
  --g-on-canvas: #eaf4f0;
  --g-on-canvas-muted: rgba(234, 244, 240, 0.7);
  --g-radius: 14px;
  --g-side-w: 250px;
}
*, *::before, *::after { box-sizing: border-box; }
/* Both, per the site's mobile rule: html alone lets body scroll sideways. */
html, body { margin: 0; overflow-x: hidden; }
body.g-app {
  background: var(--g-bg); color: var(--g-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif; font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.g-app a { color: inherit; }
.g-app svg { display: block; }
/* [hidden] must always win: .g-btn and friends set display, which would
   otherwise show a button a page has hidden on purpose. */
.g-app [hidden] { display: none !important; }
.g-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- The shell ---------- */
.g-shell { display: grid; grid-template-columns: var(--g-side-w) minmax(0, 1fr); min-height: 100vh; }

/* An aside, never a <nav>: the site's stylesheet has styled every nav as
   its fixed top bar, and a page that loads both must not fight it. */
.g-side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--g-side); border-right: 1px solid var(--g-line); padding: 16px 12px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
.g-side::-webkit-scrollbar { width: 8px; }
.g-side::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 8px; }
.g-side::-webkit-scrollbar-track { background: transparent; }
.g-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 16px; text-decoration: none; }
.g-brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--g-mint); color: var(--g-mint-ink);
  display: grid; place-items: center; flex: none;
}
.g-brand-mark svg { width: 18px; height: 18px; }
.g-brand b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.g-brand span { display: block; font-size: 11px; color: var(--g-faint); line-height: 1.3; }

.g-group { margin-top: 14px; }
.g-group-label {
  display: flex; align-items: center; gap: 8px; padding: 0 10px 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--g-faint);
}
.g-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  text-decoration: none; color: var(--g-muted); font-size: 14px; font-weight: 500;
}
.g-item svg { width: 18px; height: 18px; flex: none; }
.g-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--g-text); }
.g-item[aria-current="page"] { background: var(--g-mint-soft); color: var(--g-text); }
.g-item[aria-current="page"] svg { color: var(--g-mint); }
.g-item .g-pill { margin-left: auto; }
.g-item[hidden] { display: none; }

.g-side-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; }
.g-plan { border: 1px solid var(--g-line); border-radius: 12px; padding: 12px; background: rgba(255, 255, 255, 0.02); }
.g-plan b { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.g-plan p { margin: 6px 0 0; font-size: 12px; color: var(--g-faint); line-height: 1.45; }
.g-acct { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-top: 1px solid var(--g-line); min-height: 56px; }
.g-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  background: #1b2421; color: var(--g-mint); font-weight: 700; font-size: 13px;
}
.g-avatar img { width: 100%; height: 100%; object-fit: cover; }
.g-avatar svg { width: 16px; height: 16px; }
.g-acct-who { min-width: 0; flex: 1; }
.g-acct-who b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-acct-who button, .g-linkbtn {
  background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--g-faint); cursor: pointer;
}
.g-acct-who button:hover, .g-linkbtn:hover { color: var(--g-mint); }
.g-leave { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 12px; color: var(--g-faint); text-decoration: none; }
.g-leave svg { width: 14px; height: 14px; flex: none; }
.g-leave:hover { color: var(--g-text); }

/* ---------- The top bar ---------- */
.g-main { min-width: 0; display: flex; flex-direction: column; }
.g-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 28px;
  background: rgba(11, 15, 14, 0.84); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--g-line);
}
.g-crumb { font-size: 13px; color: var(--g-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-crumb b { color: var(--g-text); font-weight: 600; }
.g-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.g-menu, .g-top-brand { display: none; }

/* ---------- Type and buttons ---------- */
.g-content { width: 100%; max-width: 1260px; padding: 28px 28px 40px; }
.g-eyebrow { margin: 0 0 10px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--g-mint); }
.g-head h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; text-transform: none; }
.g-head p { margin: 8px 0 0; color: var(--g-muted); font-size: 15px; max-width: 62ch; }

.g-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 10px; border: 0; background: var(--g-mint); color: var(--g-mint-ink);
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s ease, box-shadow .15s ease, color .15s ease;
}
.g-btn:hover { background: #4dffdc; }
.g-btn svg { width: 16px; height: 16px; }
.g-btn.ghost { background: transparent; color: var(--g-text); box-shadow: inset 0 0 0 1px var(--g-line-2); }
.g-btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--g-mint); color: var(--g-mint); }
.g-btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.g-btn:disabled { opacity: 0.55; cursor: default; }
.g-btn:disabled:hover { background: var(--g-mint); }
.g-btn.ghost:disabled:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--g-line-2); color: var(--g-text); }
.g-btn:focus-visible, .g-chip:focus-visible, .g-item:focus-visible, .g-card:focus-visible, .g-row:focus-visible { outline: 2px solid var(--g-mint); outline-offset: 2px; }

.g-pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 6px; line-height: 1.2;
}
.g-pill.ea { background: rgba(0, 255, 206, 0.14); color: var(--g-mint); box-shadow: inset 0 0 0 1px rgba(0, 255, 206, 0.35); }
.g-pill.free { background: rgba(255, 255, 255, 0.08); color: var(--g-text); }
.g-pill.new { background: var(--g-mint); color: var(--g-mint-ink); }

/* ---------- The green canvas ---------- */
.g-canvas {
  position: relative; isolation: isolate; overflow: hidden; margin-top: 22px; padding: 26px;
  border-radius: 20px; background: var(--g-canvas); border: 1px solid var(--g-canvas-line); color: var(--g-on-canvas);
}
.g-canvas::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(620px 300px at 8% -12%, rgba(0, 255, 206, 0.26), transparent 62%),
    radial-gradient(520px 280px at 102% 112%, rgba(0, 255, 206, 0.12), transparent 60%);
}
.g-canvas::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px); background-size: 22px 22px;
}

/* The one box that starts everything: a niche goes to the Niche Scanner,
   an Ad Library link goes to the Script Ripper. */
.g-cmd {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 14px;
  background: rgba(3, 14, 11, 0.74); border: 1px solid rgba(0, 255, 206, 0.32); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.g-cmd:focus-within { border-color: var(--g-mint); box-shadow: 0 0 0 4px rgba(0, 255, 206, 0.18), 0 18px 40px rgba(0, 0, 0, 0.28); }
.g-cmd > svg { width: 20px; height: 20px; color: var(--g-mint); flex: none; }
.g-cmd input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--g-text);
  font: inherit; font-size: 16px; padding: 12px 4px;
}
.g-cmd input::placeholder { color: rgba(234, 244, 240, 0.46); }
.g-kbd { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--g-faint); border: 1px solid var(--g-line-2); border-radius: 6px; padding: 2px 7px; }
.g-cmd-hint { margin: 10px 2px 0; font-size: 13px; color: var(--g-on-canvas-muted); min-height: 1.4em; }
.g-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--g-on-canvas-muted); }
.g-chip {
  font: inherit; font-size: 13px; color: var(--g-on-canvas); background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 5px 12px; cursor: pointer;
}
.g-chip:hover { border-color: var(--g-mint); color: var(--g-mint); }

/* ---------- Sections and cards ---------- */
.g-sechead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 26px 0 12px; }
.g-sechead h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: inherit; opacity: 0.9; }
.g-sechead .g-note { margin-left: auto; font-size: 12px; color: var(--g-faint); }
.g-canvas .g-sechead .g-note { color: var(--g-on-canvas-muted); }

/* Five research tools: one row when the canvas is wide, 3 + 2 on a laptop,
   pairs on a tablet, one column on a phone. Measured on the canvas, not
   the window, because the sidebar takes its share first. */
.g-canvas { container-type: inline-size; }
.g-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 440px) { .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 700px) { .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 1000px) { .g-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.g-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 196px; padding: 16px;
  border-radius: var(--g-radius); background: var(--g-card); border: 1px solid var(--g-card-line);
  text-decoration: none; color: inherit;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.g-card[hidden] { display: none; }
.g-card:hover { transform: translateY(-2px); border-color: rgba(0, 255, 206, 0.6); background: var(--g-card-hover); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3); }
.g-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(0, 255, 206, 0.14); color: var(--g-mint); flex: none; }
.g-ico svg { width: 20px; height: 20px; }
.g-card h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; text-transform: none; }
.g-card p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--g-muted); }
.g-canvas .g-card p { color: var(--g-on-canvas-muted); }
.g-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--g-faint); }
.g-canvas .g-card-foot { color: var(--g-on-canvas-muted); }
.g-card-foot .arrow { color: var(--g-mint); font-weight: 700; transition: transform .16s ease; }
.g-card:hover .arrow { transform: translateX(3px); }
.g-card .g-pill.new { position: absolute; top: 14px; right: 14px; }

/* Write tools: a compact list, since they are one click each. */
.g-panel { background: var(--g-raise); border: 1px solid var(--g-line); border-radius: var(--g-radius); padding: 18px; min-width: 0; }
.g-panel-head { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.g-panel-head h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--g-muted); }
.g-panel-head .g-linkbtn, .g-panel-head a { margin-left: auto; font-size: 12px; color: var(--g-faint); text-decoration: none; }
.g-panel-head a:hover { color: var(--g-mint); }
.g-split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); margin-top: 16px; }
.g-list { list-style: none; margin: 0; padding: 0; }
.g-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; text-decoration: none; color: inherit; }
a.g-row:hover { background: rgba(255, 255, 255, 0.04); }
.g-row .g-ico { width: 34px; height: 34px; border-radius: 9px; }
.g-row .g-ico svg { width: 18px; height: 18px; }
.g-row-text { min-width: 0; flex: 1; }
.g-row-text b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-row-text span { display: block; font-size: 12px; color: var(--g-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-row .arrow { color: var(--g-faint); }
a.g-row:hover .arrow { color: var(--g-mint); }

.g-usage { margin: 4px 8px 12px; }
.g-usage-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.g-usage-line span { color: var(--g-faint); font-size: 12px; }
.g-meter { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 8px; }
.g-meter i { display: block; height: 100%; background: var(--g-mint); border-radius: inherit; }
.g-empty { padding: 8px; font-size: 14px; color: var(--g-muted); }
.g-empty p { margin: 0 0 12px; }
.g-empty ul { margin: 0 0 14px; padding-left: 18px; font-size: 13px; color: var(--g-faint); }

/* Then film it: the one place the Green Room points at Todd. Quiet on
   purpose (Todd: "slightly more subtle"): no fill, a small photo, a ghost
   button. */
.g-film {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-top: 16px; padding: 12px 16px;
  border-radius: var(--g-radius); background: transparent; border: 1px solid var(--g-line);
}
.g-film img { width: 56px; height: 56px; object-fit: cover; object-position: 60% 30%; border-radius: 50%; filter: grayscale(1) contrast(1.05); }
.g-film h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; text-transform: none; }
.g-film p { margin: 2px 0 0; font-size: 13px; color: var(--g-faint); }
.g-film-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; justify-content: flex-end; }
.g-film-link { font-size: 13px; color: var(--g-faint); text-decoration: none; }
.g-film-link:hover { color: var(--g-mint); }

/* Full margin, padding and background, because a tool page that still
   loads css/site.css has an element rule on every <footer>. */
.g-foot { margin: 28px 0 0; padding: 16px 0 0; background: none; text-align: left; border-top: 1px solid var(--g-line); display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; font-weight: 400; color: var(--g-faint); }
.g-foot a { text-decoration: none; color: inherit; }
.g-foot a:hover { color: var(--g-text); }

/* ============================================================
   Tool pages (2026-09-25): every Green Room tool sits in the same
   shell as the hub. app.js draws the top bar into an empty #gTop from
   the one tool list, so the crumb can never disagree with the sidebar.
   ============================================================ */
.g-crumb a { color: inherit; text-decoration: none; }
.g-crumb a:hover { color: var(--g-text); }
/* The site's film grain and the old pages' noise layer: the app has neither. */
body.g-app::before, body.g-app::after { content: none; }
.g-tool .g-content { max-width: 1040px; }
.g-tool .g-head { margin-bottom: 22px; }
.g-tool .g-head h1 { font-family: 'Inter', system-ui, sans-serif; }

/* Shared pieces for tool pages written for the app. */
.g-label { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--g-muted); }
.g-input, .g-select, .g-textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  background: var(--g-bg); border: 1px solid var(--g-line-2); color: var(--g-text);
  font: inherit; font-size: 15px;
}
.g-input::placeholder, .g-textarea::placeholder { color: var(--g-faint); }
.g-input:focus, .g-select:focus, .g-textarea:focus { outline: none; border-color: var(--g-mint); box-shadow: 0 0 0 3px rgba(0, 255, 206, 0.16); }
.g-select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2300ffce' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.g-canvas .g-input, .g-canvas .g-select { background-color: rgba(3, 14, 11, 0.74); border-color: rgba(0, 255, 206, 0.28); }
.g-status { margin: 0 0 16px; font-size: 15px; color: var(--g-muted); }
.g-status a { color: var(--g-mint); }
.g-tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); color: var(--g-muted); }
.g-fine { margin: 26px 0 0; font-size: 12px; line-height: 1.55; color: var(--g-faint); max-width: 72ch; }
.g-fine a { color: var(--g-muted); }
.g-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.g-error { margin: 10px 0 0; font-size: 14px; color: #ff9b8a; min-height: 1.2em; }

/* ============================================================
   Saved ads (green-room/boards.js, 2026-09-25): the Save button every
   tool shows on an ad, the "Save to a board" dialog, and the toast.
   ============================================================ */
/* .g-app in front so it outranks a page's own button class (the Ripper's
   .copy-btn is inline-block, which would stack the icon over the word). */
.g-app .gr-save { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: inherit; }
.gr-save svg { display: block; flex: none; }
.gr-save.is-saved { color: var(--g-mint); }
.gr-save.is-saved svg { fill: currentColor; }
/* margin: auto is what centres a modal dialog; the older pages' * { margin: 0 }
   reset would otherwise pin it to the top left. */
.g-dialog {
  margin: auto; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--g-line-2); border-radius: 16px;
  background: var(--g-raise); color: var(--g-text); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  font-family: 'Inter', system-ui, sans-serif; font-size: 14px; line-height: 1.5;
}
.g-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.g-dialog-in { display: grid; gap: 12px; padding: 18px; margin: 0; }
.g-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.g-dialog-head h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; text-transform: none; font-family: inherit; }
.g-x { background: none; border: 0; color: var(--g-faint); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.g-x:hover { color: var(--g-text); }
.g-dialog-ad { margin: 0; padding: 10px 12px; font-size: 13px; color: var(--g-muted); background: var(--g-bg); border: 1px solid var(--g-line); border-radius: 10px; }
.g-dialog-ad b { color: var(--g-text); }
.g-dialog-note { margin: 0; font-size: 13px; color: var(--g-muted); }
.g-boardlist { display: grid; gap: 6px; max-height: 240px; overflow-y: auto; }
.g-boardbtn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left;
  font: inherit; font-size: 14px; color: var(--g-text); background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--g-line); border-radius: 10px; padding: 10px 12px; cursor: pointer;
}
.g-boardbtn:hover { border-color: rgba(0, 255, 206, 0.5); }
.g-boardbtn b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-boardbtn span { flex: none; font-size: 12px; color: var(--g-faint); }
.g-boardbtn.here { border-color: var(--g-mint); background: var(--g-mint-soft); }
.g-boardbtn.here span { color: var(--g-mint); }
.g-boardbtn:disabled { opacity: 0.6; cursor: default; }
.g-newboard { display: flex; gap: 8px; }
.g-newboard .g-input { flex: 1; width: auto; min-height: 40px; font-size: 14px; }
.g-dialog .g-error { margin: 0; min-height: 0; }
.g-dialog-foot { display: flex; justify-content: space-between; gap: 10px; margin: 0; font-size: 12px; color: var(--g-faint); }
.g-dialog-foot a { color: var(--g-muted); }
.g-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 10px 14px; border-radius: 12px; background: #0f1a17; color: var(--g-text); border: 1px solid rgba(0, 255, 206, 0.4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); font-family: 'Inter', system-ui, sans-serif; font-size: 14px; transition: opacity .2s ease, transform .2s ease;
}
.g-toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.g-toast a { margin-left: 10px; color: var(--g-mint); font-weight: 600; }

/* ============================================================
   The four older tools (Script Ripper, Compare, Script Generator,
   Script Scorer) keep their own markup and scripts. body.g-legacy maps
   their stylesheets onto the app: the colors, the type, the corners.
   Never a display rule here: every show and hide on those pages
   belongs to their own [hidden] and .show rules.
   ============================================================ */
body.g-legacy {
  --bg: var(--g-bg); --bg-raise: var(--g-raise); --line: rgba(255, 255, 255, 0.1);
  --text: var(--g-text); --muted: var(--g-muted); --accent: var(--g-mint);
  --bg-dark: var(--g-bg); --bg-darker: #070a09; --bg-card: var(--g-raise);
  --text-primary: var(--g-text); --text-muted: var(--g-muted);
  font-weight: 400; line-height: 1.6;
}
.g-legacy .g-content .container { max-width: none; margin: 0; padding: 0; }
/* Apps don't fade their tools in on scroll, and a fade that never fires
   hides the form (the Compare page, until 2026-09-25). */
.g-legacy .reveal { opacity: 1; transform: none; }
.g-legacy .tool-form { margin-top: 0; }
.g-legacy :is(.tool-form, .progress, .ad, .acct, .notopen, .handoff, .score-card, .script-card, .fork-card, .slot, .gap-card, .ai-verdict) { border-radius: var(--g-radius); }
.g-legacy .results > * { border-radius: var(--g-radius); }
.g-legacy :is(.text, .recent li a, .vs-top .ad-line) { border-radius: 10px; }
.g-legacy :is(input[type="text"], input[type="url"], input[type="email"], input[type="number"], textarea, select) { border-radius: 10px; }
.g-legacy :is(.generate-btn, .cta-button, .mode-btn) { border-radius: 10px; }
.g-legacy .generate-btn { box-shadow: none; background: var(--g-mint); color: var(--g-mint-ink); }
.g-legacy .generate-btn:hover:not(:disabled) { background: #4dffdc; box-shadow: none; }
.g-legacy .field-label { font-family: 'Inter', system-ui, sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
/* The consent box sits inside .field, whose inputs are width 100%. */
.g-legacy .optin input[type="checkbox"] { width: 16px; height: 16px; padding: 0; margin: 3px 0 0; flex: 0 0 16px; }
.g-legacy :is(.copy-btn, .tab, .secondary, .wback, .wskip) { border-radius: 8px; }
/* The old headline face becomes the app's. */
.g-legacy .g-content :is(h2, h3) { font-family: 'Inter', system-ui, sans-serif; }
.g-legacy :is(.notopen h2, .batch h2, .handoff h3, .slot h2, .gap > h2, .script-head h2, .wtitle, .fork-card h3) {
  font-family: 'Inter', system-ui, sans-serif; text-transform: none; letter-spacing: -0.015em; font-weight: 700;
}
.g-legacy :is(.ad-page, .recent .rname) { font-family: 'Inter', system-ui, sans-serif; text-transform: none; letter-spacing: -0.005em; font-weight: 600; }
.g-legacy :is(.score-name, .arc-row .arc-label) { font-family: 'Inter', system-ui, sans-serif; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.05em; }
.g-legacy :is(.overall-num, .ai-verdict-badge) { font-family: 'Inter', system-ui, sans-serif; letter-spacing: -0.02em; }
.g-legacy .ai-verdict-badge { font-size: 1.1rem; letter-spacing: 0.01em; }
.g-legacy .subsection-title { font-family: 'Inter', system-ui, sans-serif; font-weight: 600; }
@media (max-width: 600px) {
  .g-legacy :is(.tool-form, .score-card, .script-card, .handoff, .notopen, .progress, .acct) { padding: 1.15rem; }
}

/* ---------- Phones and tablets: the sidebar becomes a drawer ---------- */
.g-scrim { display: none; }
@media (max-width: 1023px) {
  .g-shell { grid-template-columns: minmax(0, 1fr); }
  .g-side {
    position: fixed; top: 0; bottom: 0; left: 0; width: min(84vw, 300px); height: 100%; z-index: 60;
    transform: translateX(-102%); transition: transform .22s ease;
  }
  .g-shell.open .g-side { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, 0.6); }
  .g-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .g-shell.open .g-scrim { opacity: 1; pointer-events: auto; }
  .g-menu {
    display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px;
    background: transparent; border: 1px solid var(--g-line-2); color: var(--g-text); cursor: pointer;
  }
  .g-menu svg { width: 18px; height: 18px; }
  .g-top-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; text-decoration: none; }
  .g-top-brand .g-brand-mark { width: 26px; height: 26px; border-radius: 7px; }
  .g-top-brand .g-brand-mark svg { width: 15px; height: 15px; }
  .g-crumb, .g-kbd, .g-top .hide-sm { display: none; }
  .g-top { padding: 0 16px; }
  .g-content { padding: 18px 16px 32px; }
  .g-canvas { padding: 16px; border-radius: 16px; margin-top: 18px; }
  .g-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .g-card { min-height: 0; }
  .g-cmd .g-btn { padding: 0 14px; }
  .g-film { grid-template-columns: 48px minmax(0, 1fr); }
  .g-film img { width: 48px; height: 48px; }
  .g-film-acts { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .g-app *, .g-app *::before, .g-app *::after { transition: none !important; }
}
