/* Grimshackle — encounter-builder input UI: page shell, command header, roster editor,
   action bar, mobile collapse, autocomplete. (Was inline in the page <style>.) */
  /* flex column so the footer pins to the bottom of the viewport (sticky footer) instead of being
     shoved below the fold by .gs-page's min-height. */
  body{ margin:0; min-height:100vh; display:flex; flex-direction:column; }
  .gs-page{ max-width:none; width:100%; margin:0; padding:0 24px; box-sizing:border-box; font-family:var(--gs-font-body); }
  .gs-grid{ display:grid; grid-template-columns:repeat(auto-fill, 420px); justify-content:center; align-items:start; gap:28px; }
  .gs-head{ margin-bottom:22px; text-align:center; }
  .gs-head-title{ font-family:var(--gs-font-display); font-size:32px; font-weight:600; color:#241f1b; }
  .gs-head-sub{ font-size:13px; color:#6f665c; margin-top:6px; max-width:760px; margin-left:auto; margin-right:auto; }
  .gs-controls{ margin:16px 0 26px; display:flex; gap:12px; align-items:center; flex-wrap:wrap; justify-content:center; }
  .gs-controls input{ font-family:var(--gs-font-body); font-size:14px; padding:8px 12px; border:1px solid #cdbfa2; border-radius:6px; background:#fdfcf9; width:240px; }
  .gs-controls select, .gs-controls button{ font-family:var(--gs-font-mono); font-size:11px; text-transform:uppercase; letter-spacing:.08em; padding:9px 13px; border:1px solid #cdbfa2; border-radius:6px; background:#f6efe0; color:#6a5436; cursor:pointer; }
  .gs-controls button:hover, .gs-controls select:hover{ background:#ece0c8; }
  .gs-status{ font-family:var(--gs-font-mono); font-size:11px; color:#9a8c6e; }
  .gs-empty{ font-family:var(--gs-font-body); color:#9a8c6e; font-size:14px; padding:20px 2px; }

  /* ── Multi-creature input section (v1 functionality, v2 light scheme) ── */
  /* ══ Option B input design ══════════════════════════════════════ */
  /* Option B uses its own red accent (#9a4436) — defined once here so the rest
     of the app keeps its gold (--gs-accent). Change this one value to retint. */
  .geib{ --geib-accent:#9a4436; position:relative; max-width:1000px; margin:0 auto 26px; background:#fdfcf9;
    border:none; border-radius:15px; overflow:visible;
    box-shadow:0 1px 2px rgba(40,30,20,.05), 0 16px 40px rgba(40,30,20,.09); }
  /* command header */
  .geib-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
    padding:13px 16px; background:#26211c; border-radius:15px 15px 0 0; }
  .geib-head-left{ display:flex; align-items:center; gap:11px; }
  .geib-logo{ width:23px; height:23px; border-radius:7px; background:var(--geib-accent,#9a4436);
    display:flex; align-items:center; justify-content:center; }
  .geib-title{ font-family:var(--gs-font-mono); font-size:10px; font-weight:600; letter-spacing:.18em;
    text-transform:uppercase; color:#cabfae; }
  .geib-count{ font-family:var(--gs-font-mono); font-size:10px; font-weight:700; color:#fbf1ec;
    background:#3a3228; padding:2px 8px; border-radius:999px; min-width:22px; text-align:center; }
  .geib-toggles{ display:flex; gap:7px; flex-wrap:wrap; justify-content:flex-end; align-items:stretch; }
  .geib-tog{ display:flex; flex-direction:row; align-items:center; justify-content:center; gap:9px;
    padding:7px 11px; background:#312a23; border:1px solid #423a31; border-radius:999px; cursor:pointer;
    user-select:none; }
  .geib-tog-label{ font-family:var(--gs-font-mono); font-size:8.5px; font-weight:600; letter-spacing:.1em;
    text-transform:uppercase; color:#c3b6a4; text-align:center; line-height:1.25; }
  .geib-track{ display:flex; align-items:center; width:34px; height:18px; flex:none; padding:2px;
    border-radius:999px; justify-content:flex-start; background:#4a4038; transition:background .16s; }
  .geib-knob{ width:14px; height:14px; border-radius:50%; background:#fdfcf9; }
  .geib-tog input:checked ~ .geib-track{ justify-content:flex-end; background:var(--geib-accent,#9a4436); }
  /* roster editor: tan gutter + textarea */
  .geib-editor{ display:flex; align-items:stretch; background:#fdfcf9; }
  .geib-gutter{ display:flex; flex-direction:column; padding:12px 0; background:#f6f1e8;
    border-right:1px solid #ece4d6; }
  .geib-gline{ height:24px; display:flex; align-items:center; justify-content:center; padding:0 10px; }
  .geib-badge{ display:inline-flex; align-items:center; justify-content:center; min-width:48px; height:17px;
    padding:0 8px; border-radius:5px; font-family:var(--gs-font-mono); font-size:8px; font-weight:700;
    letter-spacing:.09em; text-transform:uppercase; background:#ece4d6; color:#9a8a72; }
  .geib-badge.is-group{ background:var(--geib-accent,#9a4436); color:#fbf1ec; }
  .geib-ta{ flex:1; border:none; background:transparent; padding:12px 14px; margin:0; line-height:24px;
    font-size:13.5px; font-family:var(--gs-font-body); color:#241f1b; resize:none; outline:none; overflow:hidden; }
  .geib-ta::placeholder{ color:#b3a888; }
  /* action bar */
  .geib-actions{ display:flex; flex-direction:row; gap:9px; padding:14px 16px; border-top:1px solid #efe7da; }
  .geib-btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; height:42px; padding:0 17px;
    border-radius:10px; font-family:var(--gs-font-mono); font-size:11px; font-weight:600; letter-spacing:.13em;
    text-transform:uppercase; cursor:pointer; white-space:nowrap; transition:filter .15s, background .15s, border-color .15s, color .15s; border:1px solid transparent; }
  .geib-btn-primary{ flex:1 1 auto; padding:0 22px; background:var(--geib-accent,#9a4436); color:#fbf1ec; border:none; }
  .geib-btn-primary:hover{ filter:brightness(.92); }
  .geib-btn-sec{ flex:0 0 auto; background:#fdfcf9; color:#3c3631; border-color:#ddd1c0; }
  .geib-btn-sec:hover{ background:#f3ece1; border-color:#cdbfa9; }
  .geib-btn-ghost{ flex:0 0 auto; background:transparent; color:#837a6e; border-color:#e8dfd1; }
  .geib-btn-ghost:hover{ color:#9a4436; border-color:#e0c2b8; }
  /* mobile: collapse toggles to a stacked row, secondary buttons to icons */
  @media (max-width:600px){
    .geib-toggles{ flex-wrap:nowrap; flex:1 1 100%; justify-content:flex-start; }
    .geib-tog{ flex:1 1 0; flex-direction:column; gap:6px; padding:8px 6px; border-radius:11px; }
    .geib-btn-sec, .geib-btn-ghost{ width:42px; padding:0; }
    .geib-btn-text{ display:none; }
    .geib-btn-primary{ padding:0 14px; }
  }
  /* autocomplete dropdown (anchored under the editor) */
  .gei-ac{ position:absolute; top:auto; left:86px; right:16px; margin-top:5px; z-index:1200;
    background:#fffdf8; border:1px solid #cdbfa2; border-radius:8px; box-shadow:0 10px 30px rgba(60,46,20,.16);
    max-height:280px; overflow-y:auto; display:none; }
  .gei-ac.open{ display:block; }
  .gei-ac-item{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 12px;
    font-family:var(--gs-font-body); font-size:13.5px; color:#3f382e; cursor:pointer; }
  .gei-ac-item:hover, .gei-ac-item.gei-sel{ background:#f3ead6; }
  .gei-ac-match{ font-weight:700; color:#9a6f1e; }
  .gei-ac-rest{ color:#5a5346; }
  .gei-ac-sys{ font-family:var(--gs-font-mono); font-size:7.5px; letter-spacing:.1em; padding:2px 6px;
    border-radius:4px; background:#eadfc6; color:#7a6438; }
  .gei-ac-hint{ font-family:var(--gs-font-mono); font-size:8.5px; letter-spacing:.06em; color:#a89a7c;
    padding:6px 12px; border-top:1px solid #ece2cc; text-transform:uppercase; }
