    * {
      box-sizing: border-box;
    }
    body {
      margin: 0;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, sans-serif;
      background: radial-gradient(circle at top, #1e293b 0, #020617 45%, #000 100%);
      color: #e5e7eb;
      height: 100vh;
      display: flex;
    }
    .app-root {
      display: flex;
      width: 100%;
      height: 100%;
    }
    .left-panel {
      flex: 0 0 58%;
      border-right: 1px solid rgba(148, 163, 184, 0.4);
      padding: 1.5rem 1.75rem;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    .right-panel {
      flex: 0 0 42%;
      padding: 1.5rem 1.75rem;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    h1, h2, h3 {
      margin: 0;
      font-weight: 650;
      letter-spacing: 0.03em;
    }
    h1 {
      font-size: 1.6rem;
    }
    h2 {
      font-size: 1.05rem;
      text-transform: uppercase;
    }
    .subtitle {
      margin-top: 0.35rem;
      font-size: 0.8rem;
      color: #9ca3af;
    }
    .panel-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 1rem;
    }
    .panel-header-right {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .mode-toggle {
      display: inline-flex;
      padding: 0.15rem;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.9);
      border: 1px solid rgba(148, 163, 184, 0.6);
      font-size: 0.7rem;
    }
    .mode-toggle button {
      border: none;
      background: transparent;
      color: #cbd5f5;
      padding: 0.15rem 0.5rem;
      border-radius: 999px;
      cursor: pointer;
    }
    .mode-toggle button.active {
      background: linear-gradient(135deg, var(--neonA), var(--neonB));
      color: #0b1120;
    }
    .animal-toggle, .folklore-toggle {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      font-size: 0.75rem;
      color: #cbd5f5;
      padding: 0.15rem 0.6rem;
      border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.6);
      background: rgba(15, 23, 42, 0.9);
      cursor: pointer;
      user-select: none;
    }
    .animal-toggle input,
    .folklore-toggle input {
      accent-color: var(--neonA);
    }
    .btn {
  border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.9);
      padding: 0.35rem 0.9rem;
      font-size: 0.8rem;
      background: radial-gradient(circle at top left, rgba(96, 165, 250, 0.35), rgba(15, 23, 42, 0.95));
      color: #e5e7eb;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      white-space: nowrap;
    }
    .btn:hover {
      border-color: var(--neonA);
      box-shadow: 0 0 0 1px rgba(255, 154, 61, 0.28);
    }
    .search-row {
      margin-top: 0.75rem;
    }
    .search-input {
      width: 100%;
      padding: 0.45rem 0.75rem;
      border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.6);
      background: rgba(15, 23, 42, 0.85);
      color: #e5e7eb;
      font-size: 0.8rem;
    }
    .search-input::placeholder {
      color: #6b7280;
    }
    .tag-scroll {
      flex: 1 1 auto;
      overflow-y: auto;
      padding-right: 0.75rem;
      margin-top: 0.5rem;
    }
    .category-section {
      margin-bottom: 1.1rem;
      padding-bottom: 0.7rem;
      border-bottom: 1px dashed rgba(55, 65, 81, 0.7);
    }
    .category-header {
      display: flex;
      align-items: baseline;
      gap: 0.5rem;
      margin-bottom: 0.45rem;
    }
    .category-title-row {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex: 1 1 auto;
    }
    .category-hint {
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: #6b7280;
    }
    .category-controls {
      display: flex;
      gap: 0.35rem;
      flex-wrap: wrap;
    }
    .mini-btn {
      border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.6);
      padding: 0.15rem 0.6rem;
      font-size: 0.7rem;
      background: rgba(15, 23, 42, 0.9);
      color: #d1d5db;
      cursor: pointer;
      white-space: nowrap;
    }
    .mini-btn.toggle-on {
      background: linear-gradient(135deg, var(--neonA), var(--neonB));
      color: #0b1120;
      border-color: var(--neonA);
    }

    .mini-btn:hover {
      border-color: var(--neonA);
      border-color: var(--neonA);
    }
    .tags-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
      margin-top: 0.3rem;
    }
    .tag {
      display: inline-flex;
      align-items: flex-start;
      max-width: 100%;
      padding: 0.3rem 0.65rem;
      border-radius: 999px;
      border: 1px solid rgba(75, 85, 99, 0.9);
      background: rgba(15, 23, 42, 0.9);
      font-size: 0.75rem;
      cursor: pointer;
      gap: 0.35rem;
    }
    .tag.selected {
      border-color: var(--neonA);
      background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.3), rgba(15, 23, 42, 0.95));
      box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5);
    }
    .tag .label {
      flex: 1 1 auto;
      min-width: 0;
      white-space: normal;
      overflow: visible;
      text-overflow: clip;
      word-break: break-word;
      line-height: 1.15;
    }
    .tag .x {
      margin-left: 0;
      font-size: 0.7rem;
      opacity: 0.7;
      white-space: nowrap;
      align-self: flex-start;
    }
    .tag.random-gen {
      border-style: dashed;
      border-color: rgba(96, 165, 250, 0.8);
      background: rgba(15, 23, 42, 0.85);
    }

    .right-panel h2 {
      margin-bottom: 0.2rem;
    }
    .field-group {
      margin-bottom: 0.55rem;
      font-size: 0.8rem;
    }
    .field-label {
      font-size: 0.78rem;
      color: #9ca3af;
      margin-bottom: 0.1rem;
    }
    select, textarea, input[type="text"] {
      width: 100%;
      font-size: 0.8rem;
      background: rgba(15, 23, 42, 0.9);
      color: #e5e7eb;
      border-radius: 0.5rem;
      border: 1px solid rgba(148, 163, 184, 0.7);
      padding: 0.35rem 0.5rem;
    }
    select {
      height: 1.9rem;
    }
    textarea {
      resize: vertical;
      min-height: 5rem;
    }
    .chars-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      margin-top: 0.4rem;
      margin-bottom: 0.25rem;
    }
    .char-list {
      border-radius: 0.5rem;
      border: 1px solid rgba(55, 65, 81, 0.8);
      background: rgba(15, 23, 42, 0.9);
      padding: 0.35rem 0.4rem;
      max-height: 7.5rem;
      overflow-y: auto;
      font-size: 0.78rem;
    }
    .char-row {
      display: grid;
      grid-template-columns: minmax(0, 1.2fr) minmax(0, 2.2fr) auto;
      gap: 0.25rem;
      align-items: center;
      margin-bottom: 0.3rem;
    }
    .dialogue-notes-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 0.5rem;
      margin-top: 0.25rem;
    }
    .dialogue-notes-grid.multiple {
      grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    }
    .dialogue-col-label {
      font-size: 0.72rem;
      color: #9ca3af;
      margin-bottom: 0.15rem;
    }
    .dialogue-notes-grid textarea {
      width: 100%;
      min-height: 4.5rem;
      resize: vertical;
      border-radius: 0.5rem;
      border: 1px solid rgba(55, 65, 81, 0.8);
      background: rgba(15, 23, 42, 0.95);
      color: #e5e7eb;
      font-size: 0.78rem;
      padding: 0.4rem 0.5rem;
    }

    .char-row input {
      width: 100%;
      font-size: 0.75rem;
      padding: 0.25rem 0.35rem;
      border-radius: 0.4rem;
      border: 1px solid rgba(55, 65, 81, 0.8);
      background: rgba(15, 23, 42, 0.95);
      color: #e5e7eb;
    }
    .char-row select {
      width: auto;
      height: 1.7rem;
      font-size: 0.7rem;
      padding: 0.1rem 0.3rem;
    }
    .char-row button {
      border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.7);
      background: transparent;
      color: #9ca3af;
      cursor: pointer;
      font-size: 0.75rem;
      padding: 0.1rem 0.4rem;
    }
    .outputs {
      margin-top: 0.75rem;
      flex: 1 1 auto;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      overflow: hidden;
    }
    .output-block {
      flex: 1 1 0;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }
    .output-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.78rem;
      color: #9ca3af;
    }
    .output-header span {
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }
    .output-textarea {
      flex: 1 1 auto;
      width: 100%;
      resize: none;
      min-height: 4.2rem;
    }
    .footer-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 0.4rem;
      font-size: 0.7rem;
      color: #6b7280;
    }
    .muted {
      color: #6b7280;
      font-size: 0.72rem;
    }
  
/* --- FUTUREMODE THEME OVERRIDES (non-destructive) --------------------- */
:root{
  --bg0:#0b2f1a;
  --bg1:#072314;
  --panel: rgba(8, 30, 18, 0.62);
  --panel2: rgba(10, 38, 22, 0.55);
  --stroke: rgba(255,255,255,0.20);
  --stroke2: rgba(255,154,61,0.45);
  --text: #ffffff;
  --muted: rgba(255,255,255,0.70);
  --neonA:#ff9a3d;
  --neonB:#ffd1a3;
  --neonC:#86efac;
  --shadow: 0 18px 60px rgba(0,0,0,0.55);
  --glow: 0 0 0 1px rgba(255,154,61,0.18), 0 0 22px rgba(255,209,163,0.14);
}

body{
  background:
    radial-gradient(1200px 800px at 15% 10%, rgba(255,255,255,0.22), transparent 55%),
    radial-gradient(1000px 700px at 85% 20%, rgba(255,154,61,0.14), transparent 60%),
    radial-gradient(900px 700px at 55% 90%, rgba(255,209,163,0.10), transparent 65%),
    radial-gradient(circle at top, rgba(255,255,255,0.78) 0, #0b2f1a 46%, #03170b 100%);
  color: var(--text);
  overflow: hidden;
}

/* Ambient HUD layer */
.fx-bg{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.fx-bg::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.02), rgba(0,0,0,0.04)),
    repeating-linear-gradient(to right, rgba(22,155,98,0.08) 0 1px, transparent 1px 58px),
    repeating-linear-gradient(to bottom, rgba(22,155,98,0.07) 0 1px, transparent 1px 58px);
  opacity: 0.34;
  mask-image: radial-gradient(circle at 55% 45%, rgba(0,0,0,1), rgba(0,0,0,0.15) 55%, rgba(0,0,0,0) 75%);
  animation: gridDrift 18s linear infinite;
}
.fx-bg::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.028) 0 1px, transparent 1px 4px);
  opacity: 0.12;
  mix-blend-mode: overlay;
  animation: scan 6.5s linear infinite;
}
@keyframes gridDrift{
  from{ transform: translate3d(0,0,0); }
  to{ transform: translate3d(-120px,-60px,0); }
}
@keyframes scan{
  0%{ transform: translateY(-12px); }
  100%{ transform: translateY(12px); }
}

/* Put the app above FX */

/* Language banner (mobile) */
.lang-banner{
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  backdrop-filter: blur(10px);
  background: rgba(2, 6, 23, 0.75);
}

.app-root{ position: relative; z-index: 1; }

/* Glass panels */
.left-panel, .right-panel{
  background: linear-gradient(180deg, var(--panel), rgba(2,6,23,0.35));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}
.left-panel{
  border-right: 1px solid rgba(148,163,184,0.22);
}
.right-panel{
  border-left: 1px solid rgba(148,163,184,0.16);
}

/* Softer typography + holo suffix */
h1{
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.holo-suffix{
  font-weight: 700;
  font-size: 0.78em;
  margin-left: 0.35rem;
  color: rgba(226,232,240,0.75);
  text-shadow: 0 0 12px rgba(22,155,98,0.22);
}
.subtitle{
  color: var(--muted);
}

/* Inputs: neon focus rings */
.search-input, select, textarea, input[type="text"]{
  border-color: rgba(148,163,184,0.38);
  background: linear-gradient(180deg, rgba(9,15,32,0.72), rgba(6,10,24,0.92));
}
.search-input:focus, select:focus, textarea:focus, input[type="text"]:focus{
  outline: none;
  border-color: rgba(22,155,98,0.75);
  box-shadow: 0 0 0 3px rgba(22,155,98,0.16), 0 0 18px rgba(99,102,241,0.14);
}

/* Buttons: holographic sheen */
.btn, .mini-btn, .mode-toggle, .animal-toggle{
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.btn{
  position: relative;
  overflow: hidden;
  border-color: rgba(148,163,184,0.45);
  background:
    radial-gradient(circle at 20% 20%, rgba(22,155,98,0.22), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(99,102,241,0.22), transparent 55%),
    rgba(15, 23, 42, 0.82);
  box-shadow: var(--glow);
}
.btn::after{
  content:"";
  position:absolute;
  inset:-2px;
  background: linear-gradient(120deg, transparent 0 35%, rgba(255,255,255,0.12) 45%, transparent 55% 100%);
  transform: translateX(-60%);
  opacity: 0;
  transition: opacity .18s ease;
}
.btn:hover{
  border-color: rgba(22,155,98,0.75);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(22,155,98,0.28), 0 0 28px rgba(22,155,98,0.16), 0 0 34px rgba(99,102,241,0.14);
}
.btn:hover::after{
  opacity: 1;
  animation: sheen 1.05s ease both;
}
@keyframes sheen{
  from{ transform: translateX(-60%); }
  to{ transform: translateX(60%); }
}

.mode-toggle{
  background: rgba(6, 10, 24, 0.62);
  border-color: rgba(148,163,184,0.45);
}
.mode-toggle button{
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mode-toggle button.active{
  box-shadow: 0 0 0 1px rgba(56,189,248,0.25), 0 0 18px rgba(99,102,241,0.18);
}

.mini-btn{
  background: rgba(6,10,24,0.72);
  border-color: rgba(148,163,184,0.38);
}
.mini-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(22,155,98,0.75);
  box-shadow: 0 0 0 1px rgba(22,155,98,0.16);
}
.mini-btn.toggle-on{
  box-shadow: 0 0 0 1px rgba(56,189,248,0.24), 0 0 18px rgba(99,102,241,0.16);
}

/* Sections: subtle circuitry */
.category-section{
  position: relative;
  padding: 0.9rem 0.85rem 0.75rem;
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: 14px;
  background:
    radial-gradient(420px 220px at 18% 0%, rgba(56,189,248,0.10), transparent 60%),
    radial-gradient(420px 220px at 88% 0%, rgba(99,102,241,0.10), transparent 60%),
    rgba(2,6,23,0.28);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.28);
}
.category-section::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: 14px;
  background:
    linear-gradient(90deg, transparent 0 40%, rgba(56,189,248,0.08) 50%, transparent 60% 100%);
  opacity: 0;
  pointer-events:none;
}
.category-section:hover::after{
  opacity: 1;
  animation: sectionSweep 1.15s ease both;
}
@keyframes sectionSweep{
  from{ transform: translateX(-18%); }
  to{ transform: translateX(18%); }
}

.category-hint{
  color: rgba(226,232,240,0.52);
}

/* Tags: neon chips */
.tag{
  border-color: rgba(148,163,184,0.30);
  background:
    radial-gradient(circle at 20% 20%, rgba(56,189,248,0.10), transparent 45%),
    rgba(6,10,24,0.72);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.tag:hover{
  transform: translateY(-1px);
  border-color: rgba(56,189,248,0.65);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.18);
}
.tag.selected{
  border-color: rgba(56,189,248,0.92);
  background:
    radial-gradient(circle at 20% 20%, rgba(56,189,248,0.18), rgba(15, 23, 42, 0.75) 55%),
    linear-gradient(135deg, rgba(56,189,248,0.10), rgba(99,102,241,0.10));
  box-shadow: 0 0 0 1px rgba(56,189,248,0.30), 0 0 22px rgba(99,102,241,0.16);
}

/* Scrollbars */
.tag-scroll::-webkit-scrollbar, .char-list::-webkit-scrollbar, textarea::-webkit-scrollbar{
  width: 10px;
}
.tag-scroll::-webkit-scrollbar-track, .char-list::-webkit-scrollbar-track, textarea::-webkit-scrollbar-track{
  background: rgba(2,6,23,0.45);
  border-radius: 999px;
}
.tag-scroll::-webkit-scrollbar-thumb, .char-list::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(56,189,248,0.50), rgba(99,102,241,0.45));
  border-radius: 999px;
  border: 2px solid rgba(2,6,23,0.55);
}

/* Small detail polish */
.output-header span{
  color: rgba(226,232,240,0.70);
}
.footer-row{
  color: rgba(226,232,240,0.46);
}

  





/* --- COCA-COLA RED / GREEN / WHITE THEME OVERRIDES --------------------- */
:root{
  --bg0:#0b2f1a;
  --bg1:#072314;
  --panel: rgba(8, 30, 18, 0.62);
  --panel2: rgba(10, 38, 22, 0.55);
  --stroke: rgba(255,255,255,0.20);
  --stroke2: rgba(255,154,61,0.45);
  --text: #ffffff;
  --muted: rgba(255,255,255,0.70);
  --neonA:#ff9a3d;
  --neonB:#ffd1a3;
  --neonC:#86efac;
  --shadow: 0 18px 60px rgba(0,0,0,0.55);
  --glow: 0 0 0 1px rgba(255,154,61,0.18), 0 0 22px rgba(255,209,163,0.14);
}

body{
  background:
    radial-gradient(1300px 850px at 8% 0%, rgba(255,144,144,0.96), transparent 55%),
    radial-gradient(1300px 850px at 92% 10%, rgba(255,106,106,0.92), transparent 60%),
    radial-gradient(1100px 720px at 50% 100%, rgba(0,148,68,0.55), transparent 72%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color: var(--text);
}

/* Panels float over Coke red with subtle red tint at the bottom */
.left-panel, .right-panel{
  background:
    linear-gradient(180deg,
      rgba(255,255,255,0.94),
      rgba(255,255,255,0.86),
      rgba(244,0,9,0.26)
    );
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.18);
  -webkit-backdrop-filter: blur(16px) saturate(1.18);
}

.left-panel{
  border-right: 1px solid rgba(248,180,180,0.65);
}
.right-panel{
  border-left: 1px solid rgba(248,180,180,0.50);
}

.app-header{
  background: linear-gradient(90deg,
    rgba(76,0,12,0.98),
    rgba(244,0,9,0.99),
    rgba(244,63,94,0.98),
    rgba(0,148,68,0.96),
    rgba(255,255,255,0.99)
  );
  border-bottom: 1px solid rgba(140,0,20,0.9);
  box-shadow: 0 10px 34px rgba(76,0,12,0.55);
}

.subtitle{
  color: var(--muted);
}

.search-input{
  background: rgba(255,255,255,0.97);
  border-color: rgba(140,0,20,0.55);
  color: var(--text);
}
.search-input::placeholder{
  color: rgba(107,114,128,0.85);
}

.btn, .mini-btn{
  background: linear-gradient(135deg, rgba(255,255,255,0.99), rgba(220,252,231,0.99));
  border-color: rgba(140,0,20,0.80);
  color: #064e3b;
}
.btn:hover, .mini-btn:hover{
  border-color: rgba(244,0,9,0.95);
  box-shadow: 0 0 0 1px rgba(244,0,9,0.78), 0 0 22px rgba(0,148,68,0.65);
}

.mode-toggle{
  background: rgba(255,255,255,0.97);
  border-color: rgba(248,113,113,0.65);
}
.mode-toggle button{
  color: #374151;
}
.mode-toggle button.active{
  background: rgba(220,252,231,0.99);
  box-shadow: 0 0 0 1px rgba(0,148,68,0.9);
}

#sel-count{
  color: rgba(140,0,20,0.96) !important;
}

.tag{
  background: rgba(255,255,255,0.98);
  border-color: rgba(248,113,113,0.60);
  color: #111827;
}
.tag.selected{
  background: linear-gradient(135deg, rgba(220,252,231,0.99), rgba(255,255,255,0.99));
  border-color: rgba(0,148,68,0.98);
  box-shadow: 0 0 0 1px rgba(0,148,68,0.85);
}
.tag.random-gen{
  border-style: dashed;
  border-color: rgba(0,148,68,0.9);
  background: rgba(255,255,255,0.98);
}

.char-pill{
  background: rgba(255,255,255,0.99);
  border-color: rgba(248,113,113,0.70);
  color: #111827;
}

.output-textarea,
.dialogue-note,
.char-dialogue-input{
  background: rgba(255,255,255,0.97);
  border-color: rgba(248,113,113,0.70);
  color: #111827;
}

.animal-toggle{
  background: rgba(255,255,255,0.98);
  border-color: rgba(248,113,113,0.80);
  color: #111827;
}
.animal-toggle input{
  accent-color: rgba(244,0,9,0.96);
}

/* Scrollbars: green + white */
.tag-scroll::-webkit-scrollbar-track,
.char-list::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track{
  background: #ffffff;
  border-radius: 999px;
}
.tag-scroll::-webkit-scrollbar-thumb,
.char-list::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, #22c55e, #15803d);
  border-radius: 999px;
  border: 2px solid #ffffff;
}

.output-header span{
  color: rgba(140,0,20,0.96);
}
.footer-row{
  color: rgba(107,114,128,0.82);
}
/* --- Layout tweak: keep synthesize button clear & prominent --- */
.panel-header-right{
  flex-wrap: wrap;
  justify-content: flex-end;
}

#random-all-btn{
  flex: 1 1 100%;
  justify-content: center;
  text-align: center;
  margin-top: 0.4rem;
}


/* =========================
   Responsive (mobile-first)
   ========================= */

:root{
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

/* Keep layout from over-stretching on ultra-wide monitors */
.app-root{
  max-width: 1600px;
  margin: 0 auto;
}

/* Make interactive targets friendlier */
button, .tag-pill, .tag-btn, .chip, select, input, textarea{
  touch-action: manipulation;
}

@media (max-width: 900px){
  .lang-banner{
    display: flex;
    position: sticky;
    top: 0;
    z-index: 60;
  }

  /* Allow page to scroll naturally on mobile browsers */
  body{
    height: auto;
    min-height: 100vh;
    display: block;
    /* Desktop theme uses `overflow: hidden` to keep split-pane scroll contained.
       On mobile we switch to normal document scrolling. */
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .app-root{
    height: auto;
    min-height: 100vh;
    flex-direction: column;
    max-width: none;
    margin: 0;
  }
/* Stack panels full width */
  .left-panel, .right-panel{
    width: 100%;
    flex: none;
    padding: 1.0rem 0.95rem calc(1.2rem + var(--safe-bottom));
    overflow: visible;
    border-right: none;
  }
  .left-panel{
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  }
/* Header goes vertical; make room for small screens */
  .panel-header{
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .panel-header-right{
    justify-content: space-between;
    width: 100%;
  }

  h1{
    font-size: 1.25rem;
    line-height: 1.25;
  }
  h2{
    font-size: 1.05rem;
  }
  .subtitle{
    font-size: 0.95rem;
  }

  /* Improve form sizing for thumbs */
  textarea, input[type="text"], select{
    font-size: 1rem;
    padding: 0.6rem 0.7rem;
    border-radius: 0.65rem;
  }
  select{ height: 2.35rem; }

  /* Avoid nested scroll traps */
  .tag-scroll{
    overflow: visible;
    padding-right: 0;
  }

  /* Buttons and pills: bigger hit areas */
  .mode-toggle{
    font-size: 0.85rem;
  }
  .mode-toggle button{
    padding: 0.45rem 0.7rem;
  }
  .tag-pill{
    padding: 0.45rem 0.7rem;
    font-size: 0.9rem;
  }
}

/* Tablet: keep both panels visible but soften the split */
@media (min-width: 901px) and (max-width: 1200px){
  body{
    height: 100dvh;
  }
  .app-root{
    max-width: none;
  }
  .left-panel{ flex: 0 0 56%; }
  .right-panel{ flex: 0 0 44%; }
  h1{ font-size: 1.35rem; }
  textarea, input[type="text"], select{ font-size: 0.9rem; }
}

/* Small landscape phones / short viewports */
@media (max-height: 700px) and (max-width: 900px){
  .subtitle{ display: none; }
}

/* --- IRELAND GREEN + ORANGE THEME OVERRIDES ---------------------------------
   Deep Irish green background with soft white highlight, and orange secondary accents.
------------------------------------------------------------------------- */
:root{
  /* Site background (behind everything) */
  --bg0:#50C878; /* St. Patrick / emerald green */
  --bg1:#3FB565; /* slightly deeper green */
  --panel: rgba(255,255,255,0.90);
  --panel2: rgba(255,255,255,0.96);
  --stroke: rgba(17,24,39,0.14);
  --stroke2: rgba(22,155,98,0.42); /* Irish flag green accent */
  --text:#111827;
  --muted: rgba(17,24,39,0.62);
  --neonA:#169B62; /* Irish flag green */
  --neonB:#50C878; /* emerald highlight */
  --neonC:#169B62; /* Irish green */
  --shadow: 0 18px 55px rgba(0,0,0,0.14);
  --glow: 0 0 0 1px rgba(255,154,61,0.16), 0 0 26px rgba(255,209,163,0.14);
}

body{
  /* Background behind everything: emerald green with a subtle white highlight */
  background:
    radial-gradient(1200px 900px at 20% 0%, rgba(255,255,255,0.28), transparent 60%),
    linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 100%);
  color: var(--text);
}


/* Tone down the HUD overlay for a bright theme */
.fx-bg::before{ opacity: 0.18; }
.fx-bg::after{ opacity: 0.14; }

/* Panels / separators */
.left-panel{
  border-right: 1px solid rgba(22,155,98,0.22) !important;
}
.right-panel{
  border-left: 1px solid rgba(22,155,98,0.18) !important;
}

/* Header accents (tricolor bar feel) */
.panel-header{
  border-bottom: 1px solid rgba(17,24,39,0.10);
}
h1{ color: var(--text); }
.subtitle{ color: var(--muted); }

/* Inputs */
.search-input, textarea, input[type="text"], select{
  background: rgba(255,255,255,0.92) !important;
  color: var(--text) !important;
  border-color: rgba(17,24,39,0.16) !important;
}
.search-input::placeholder, textarea::placeholder{
  color: rgba(17,24,39,0.45);
}

/* Toggles */
.animal-toggle, .folklore-toggle, .mode-toggle button{
  color: rgba(17,24,39,0.78) !important;
}
.animal-toggle input, .folklore-toggle input{
  accent-color: var(--neonA) !important;
}
.mode-toggle{
  background: rgba(255,255,255,0.82) !important;
  border-color: rgba(22,155,98,0.18) !important;
}
.mode-toggle button.active{
  background: linear-gradient(135deg, var(--neonA), var(--neonB)) !important;
  color: #ffffff !important;
}

/* Buttons */
.btn, .mini-btn{
  background: rgba(255,255,255,0.92) !important;
  color: var(--text) !important;
  border-color: rgba(22,155,98,0.32) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.btn:hover, .mini-btn:hover{
  border-color: rgba(22,155,98,0.55) !important;
  box-shadow: 0 0 0 1px rgba(11,107,60,0.18), 0 10px 30px rgba(0,0,0,0.10);
}
#random-btn,
#random-all-btn{
  /* Keep primary buttons white too (user requested white buttons) */
  background: rgba(255,255,255,0.94) !important;
  color: #0b5a33 !important;
  border-color: rgba(11,90,51,0.28) !important;
}

/* Per-section custom tag input (match light theme) */
.custom-tag-box{
  background: rgba(255,255,255,0.70) !important;
  border-color: rgba(17,24,39,0.12) !important;
}
.custom-tag-input{
  background: rgba(255,255,255,0.94) !important;
  color: var(--text) !important;
  border-color: rgba(17,24,39,0.16) !important;
}
.custom-send-link{
  color: rgba(17,24,39,0.68) !important;
}

/* Tags */
.tag{
  background: rgba(255,255,255,0.94) !important;
  color: var(--text) !important;
  border-color: rgba(17,24,39,0.12) !important;
}
.tag:hover{
  border-color: rgba(22,155,98,0.45) !important;
}
.tag.selected{
  background: rgba(22,155,98,0.12) !important;
  border-color: rgba(22,155,98,0.78) !important;
  box-shadow: 0 0 0 1px rgba(22,155,98,0.22) !important;
}
.tag.random-gen{
  border-style: dashed !important;
  border-color: rgba(11,107,60,0.70) !important;
  background: rgba(255,255,255,0.96) !important;
}

/* Scrollbars */
.tag-scroll::-webkit-scrollbar-track, .char-list::-webkit-scrollbar-track, textarea::-webkit-scrollbar-track{
  background: rgba(17,24,39,0.06) !important;
}
.tag-scroll::-webkit-scrollbar-thumb, .char-list::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(255,154,61,0.55), rgba(11,107,60,0.45)) !important;
  border: 2px solid rgba(255,255,255,0.70) !important;
}


/* Toast notifications */
.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: min(720px, calc(100vw - 28px));
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.35);
  background: rgba(2,6,23,0.78);
  color: #e5e7eb;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 50;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.toast.show{ opacity: 1; transform: translateX(-50%) translateY(-2px); }
.toast.ok{ border-color: rgba(34,197,94,0.45); box-shadow: 0 0 0 3px rgba(34,197,94,0.12); }
.toast.err{ border-color: rgba(239,68,68,0.45); box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }

/* Per-section custom tag input */
.custom-tag-box{
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.2rem 0 0.35rem;
  padding: 0.35rem 0.45rem;
  border-radius: 14px;
  border: 1px dashed rgba(148,163,184,0.28);
  background: rgba(2,6,23,0.35);
}
.custom-tag-input{
  width: 100%;
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.38);
  background: rgba(15,23,42,0.72);
  color: #e5e7eb;
  font-size: 0.8rem;
}
.custom-send-link{
  align-self: flex-start;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0 0.1rem;
  font-size: 0.72rem;
  color: rgba(226,232,240,0.8);
  opacity: 0.85;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.custom-send-link:hover{ opacity: 1; }


/* Visibility fix: make folklore toggle text white */
.folklore-toggle, .folklore-toggle span { color: #FFFFFF !important; }


/* Visibility fix: make folklore toggle text white */
.folklore-toggle, .folklore-toggle span { color: #FFFFFF !important; }
