
    :root {
      --bg: #0d1017;
      --surface: rgba(20, 24, 33, 0.78);
      --surface-solid: #151a23;
      --surface-2: #1b212c;
      --surface-3: #232a37;
      --border: rgba(255, 255, 255, 0.08);
      --border-strong: rgba(255, 255, 255, 0.16);
      --text: #e8eaf0;
      --muted: #969fb0;
      --accent: #d9b066;
      --accent-soft: rgba(217, 176, 102, 0.14);
      --danger: #f07575;
      --danger-soft: rgba(240, 117, 117, 0.12);
      --success: #5ad49a;
      --success-soft: rgba(90, 212, 154, 0.12);
      --radius: 12px;
      --shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.25);
      --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
      --font-display: 'Cinzel', Georgia, serif;
    }

    * { box-sizing: border-box; }

    html, body {
      margin: 0;
      padding: 0;
      height: 100%;
      background: var(--bg);
      color: var(--text);
      font-family: var(--font-ui);
      font-size: 15px;
      -webkit-font-smoothing: antialiased;
    }

    ::selection { background: var(--accent-soft); }

    /* Scrollbars */
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
    ::-webkit-scrollbar-thumb:hover { background: #2f3747; }

    /* ---------- Containers ---------- */
    #map, #journalView {
      height: 100vh;
      height: 100dvh;
      width: 100%;
    }
    #map { background: var(--bg); }

    /* ---------- Glass panel base ---------- */
    .glass, .top-btn, #menu {
      background: var(--surface);
      border: 1px solid var(--border);
      box-shadow: var(--shadow);
      -webkit-backdrop-filter: blur(14px) saturate(140%);
      backdrop-filter: blur(14px) saturate(140%);
    }

    /* ---------- Toolbar ---------- */
    .toolbar {
      position: fixed;
      top: 14px;
      right: 14px;
      z-index: 1500;
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .top-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      height: 40px;
      padding: 0 16px;
      border-radius: 999px;
      color: var(--text);
      font: 500 14px/1 var(--font-ui);
      cursor: pointer;
      transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    }
    .top-btn:hover { background: rgba(35, 42, 55, 0.9); border-color: var(--border-strong); }
    .top-btn:active { transform: scale(0.97); }
    .top-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    #viewModeToggleBtn {
      background: var(--accent);
      border-color: transparent;
      color: #1a1408;
      font-weight: 600;
    }
    #viewModeToggleBtn:hover { background: #e6c07c; }

    /* ---------- Legend ----------
       Up in the top-left corner beside the zoom buttons: the bottom-left is
       the dice tray's. Phones don't get it at all (mobile.css). */
    #menu {
      position: absolute;
      top: 14px;
      left: 58px;
      width: 220px;
      max-width: calc(100vw - 28px);
      z-index: 1000;
      padding: 6px;
      border-radius: var(--radius);
    }
    #legend {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 10px;
      border-radius: 8px;
      cursor: pointer;
      user-select: none;
      font: 600 13px/1 var(--font-ui);
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
      transition: background 0.15s ease, color 0.15s ease;
    }
    #legend:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
    #legend::after {
      content: "";
      width: 7px;
      height: 7px;
      border-right: 2px solid currentColor;
      border-bottom: 2px solid currentColor;
      transform: rotate(45deg) translate(-2px, -2px);
      transition: transform 0.2s ease;
    }
    #menu:has(#toggleButtons[style*="block"]) #legend::after {
      transform: rotate(-135deg) translate(-2px, -2px);
    }
    #toggleButtons {
      display: none;
      margin-top: 4px;
      padding-top: 4px;
      border-top: 1px solid var(--border);
    }
    .menu-button {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 7px 10px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 14px;
      transition: background 0.15s ease;
    }
    .menu-button:hover { background: rgba(255, 255, 255, 0.05); }
    .menu-button .dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--c);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent);
      flex: none;
    }
    .menu-button .lbl { flex: 1; }
    /* Switch-style checkbox */
    .menu-button input[type="checkbox"] {
      appearance: none;
      -webkit-appearance: none;
      order: 3;
      margin: 0;
      width: 30px;
      height: 18px;
      border-radius: 999px;
      background: var(--surface-3);
      border: 1px solid var(--border-strong);
      position: relative;
      cursor: pointer;
      transition: background 0.2s ease, border-color 0.2s ease;
      flex: none;
    }
    .menu-button input[type="checkbox"]::after {
      content: "";
      position: absolute;
      top: 2px;
      left: 2px;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: var(--muted);
      transition: transform 0.2s ease, background 0.2s ease;
    }
    .menu-button input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
    .menu-button input[type="checkbox"]:checked::after { transform: translateX(12px); background: #1a1408; }
    .menu-button input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

    /* ---------- Leaflet tweaks ---------- */
    .leaflet-container { font-family: var(--font-ui); }
    .leaflet-bar {
      border: 1px solid var(--border) !important;
      border-radius: 10px !important;
      overflow: hidden;
      box-shadow: var(--shadow) !important;
    }
    .leaflet-bar a, .leaflet-bar a:hover {
      background: var(--surface-solid);
      color: var(--text);
      border-bottom-color: var(--border);
      width: 34px;
      height: 34px;
      line-height: 34px;
    }
    .leaflet-bar a:hover { background: var(--surface-3); }
    .leaflet-bar a.leaflet-disabled { background: var(--surface-solid); color: #4a5263; }
    .leaflet-top.leaflet-left { top: 4px; left: 4px; }
    .leaflet-control-attribution {
      background: rgba(13, 16, 23, 0.6) !important;
      color: var(--muted) !important;
    }
    .leaflet-control-attribution a { color: var(--accent) !important; }
    .leaflet-popup-content-wrapper {
      background: var(--surface-solid);
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }
    .leaflet-popup-tip { background: var(--surface-solid); }
    .leaflet-popup-content {
      margin: 16px 18px 12px;
      font-size: 14px;
      line-height: 1.6;
    }
    .leaflet-popup-content h1, .leaflet-popup-content h2, .leaflet-popup-content h3 {
      font-family: var(--font-display);
      color: var(--accent);
      margin: 0 0 8px;
      font-size: 1.3em;
      letter-spacing: 0.02em;
    }
    .leaflet-popup-content p { margin: 8px 0; }
    .leaflet-popup-content strong { color: #fff; }
    .leaflet-container a.leaflet-popup-close-button { color: var(--muted); top: 6px; right: 6px; }
    .leaflet-container a.leaflet-popup-close-button:hover { color: var(--text); }

    /* ---------- Journal view ---------- */
    #journalView {
      display: none;
      overflow-y: auto;
      padding: 84px 20px 60px;
      background:
        radial-gradient(1200px 600px at 10% -10%, rgba(217, 176, 102, 0.10), transparent 60%),
        radial-gradient(900px 500px at 110% 10%, rgba(122, 162, 255, 0.08), transparent 60%),
        var(--bg);
    }
    #journalView > * {
      max-width: 880px;
      margin-left: auto;
      margin-right: auto;
    }
    #journalView > h1 {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: clamp(1.8rem, 4vw, 2.6rem);
      letter-spacing: 0.04em;
      text-align: center;
      margin-top: 0;
      margin-bottom: 36px;
      color: var(--text);
    }
    #journalView > h1::after {
      content: "";
      display: block;
      width: 64px;
      height: 2px;
      margin: 14px auto 0;
      background: linear-gradient(90deg, transparent, var(--accent), transparent);
    }
    .journal-section {
      background: rgba(21, 26, 35, 0.6);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 18px;
      margin-bottom: 20px;
    }
    .journal-section h2 {
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 0 0 14px;
      font-family: var(--font-display);
      font-weight: 600;
      font-size: 1.15rem;
      letter-spacing: 0.06em;
      color: var(--accent);
    }
    #journalMarkers h2 { cursor: pointer; user-select: none; }
    #journalMarkers h2 .arrow-icon { color: var(--muted); font-size: 0.9em; }

    .arrow-icon, .arrow {
      display: inline-block;
      width: 14px;
      color: var(--muted);
      font-size: 0.9em;
      text-align: center;
      flex: none;
    }

    /* Map-markers listing inside journal */
    .journal-category, .journal-entry { margin-bottom: 6px; }
    .journal-category-header, .journal-entry-header {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      padding: 10px 12px;
      border-radius: 10px;
      cursor: pointer;
      user-select: none;
      transition: background 0.15s ease, border-color 0.15s ease;
    }
    .journal-category-header {
      background: var(--surface-2);
      border: 1px solid var(--border);
      font-weight: 600;
    }
    .journal-category-header:hover { background: var(--surface-3); border-color: var(--border-strong); }
    .journal-category-content {
      display: none;
      margin: 6px 0 10px 12px;
      padding: 4px 0 4px 12px;
      border-left: 1px solid var(--border);
    }
    .journal-entry-header {
      color: var(--text);
      font-weight: 500;
      border: 1px solid transparent;
    }
    .journal-entry-header::before {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--accent);
      opacity: 0.7;
      flex: none;
    }
    .journal-entry-header:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--border); }

    /* Entry content card */
    .journal-entry-content, .journal-content {
      background: var(--surface-solid);
      border: 1px solid var(--border);
      border-left: 3px solid var(--accent);
      border-radius: 10px;
      padding: 16px 20px;
      margin: 6px 0 10px;
      line-height: 1.7;
      color: #d4d8e1;
    }
    .journal-entry-content h1, .journal-entry-content h2, .journal-entry-content h3 {
      font-family: var(--font-display);
      color: var(--accent);
      font-size: 1.3em;
      letter-spacing: 0.02em;
      margin: 0 0 10px;
      padding: 0;
      background: none;
      border: 0;
    }
    .journal-entry-content p { margin: 10px 0; }
    .journal-entry-content strong { color: #fff; }
    .journal-entry-content a { color: var(--accent); }

    /* ---------- Journal tree ---------- */
    ul.journal-list {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-height: 20px;
    }
    .journal-container > ul.journal-list {
      margin: 6px 0 4px 12px;
      padding-left: 12px;
      border-left: 1px solid var(--border);
    }
    ul.journal-list li {
      margin: 0;
      padding: 0;
      border: 0;
      background: none;
      box-shadow: none;
    }
    ul.journal-list .placeholder {
      padding: 12px;
      border: 1px dashed var(--border-strong);
      border-radius: 10px;
      color: var(--muted);
      font-size: 13px;
      text-align: center;
    }
    .journal-header {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      padding: 9px 12px;
      border-radius: 10px;
      border: 1px solid transparent;
      cursor: pointer;
      user-select: none;
      transition: background 0.15s ease, border-color 0.15s ease;
    }
    li[data-type="category"] > .journal-header {
      background: var(--surface-2);
      border-color: var(--border);
      font-weight: 600;
      font-size: 15px;
    }
    li[data-type="category"] > .journal-header:hover { background: var(--surface-3); border-color: var(--border-strong); }
    li[data-type="entry"] > .journal-header:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--border); }
    .entry-title { font-weight: 500; }
    li[data-type="entry"] > .journal-header .entry-title::before {
      content: "";
      display: inline-block;
      width: 6px;
      height: 6px;
      margin-right: 10px;
      border-radius: 50%;
      background: var(--accent);
      opacity: 0.7;
      vertical-align: middle;
    }
    .sortable-ghost { opacity: 0.4; }
    .sortable-chosen > .journal-header { border-color: var(--accent) !important; }

    .drag-handle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      color: var(--muted);
      opacity: 0.45;
      cursor: grab;
      font-size: 14px;
      flex: none;
      transition: opacity 0.15s ease;
    }
    .journal-header:hover .drag-handle { opacity: 1; }
    .drag-handle:active { cursor: grabbing; }


    /* ---------- Icons & buttons ---------- */
    .icon-btn svg, .top-btn svg, .add-row svg {
      width: 16px; height: 16px; flex: none;
      fill: none; stroke: currentColor; stroke-width: 2;
      stroke-linecap: round; stroke-linejoin: round;
    }
    .icon-btn {
      display: inline-flex; align-items: center; justify-content: center;
      width: 30px; height: 30px; padding: 0;
      border: 0; border-radius: 8px;
      background: transparent; color: var(--muted);
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease;
    }
    .icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
    .icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
    .icon-btn:focus-visible, .btn:focus-visible, .add-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
    .btn {
      height: 32px; padding: 0 16px;
      border-radius: 999px; border: 1px solid transparent;
      font: 600 13px var(--font-ui); cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }
    .btn.primary { background: var(--accent); color: #1a1408; }
    .btn.primary:hover { background: #e6c07c; }
    .btn.ghost { background: transparent; color: var(--muted); border-color: var(--border-strong); }
    .btn.ghost:hover { color: var(--text); }
    #addMarkerBtn.is-active { border-color: rgba(217, 176, 102, 0.6); color: var(--accent); }
    body.journal-mode #addMarkerBtn { display: none; }

    /* ---------- SweetAlert2 dark skin ---------- */
    body .swal2-container { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
    /* A toast (the small message at the top) sits in a holder as tall as the
       screen and as wide as itself: blurring that holder blurred a whole column
       of the page under the message. Only a real dialog dims what is behind it. */
    body.swal2-toast-shown .swal2-container,
    body .swal2-container:has(> .swal2-toast) { -webkit-backdrop-filter: none; backdrop-filter: none; }
    body .swal2-popup {
      background: var(--surface-solid);
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 16px;
      box-shadow: var(--shadow);
      font-family: var(--font-ui);
    }
    body .swal2-title { color: var(--text); font-size: 1.25em; font-weight: 600; }
    body .swal2-html-container { color: var(--muted); }
    body .swal2-input, body .swal2-textarea, body .swal2-select {
      background: var(--bg);
      color: var(--text);
      border: 1px solid var(--border-strong);
      border-radius: 10px;
      box-shadow: none;
      font-family: var(--font-ui);
    }
    body .swal2-textarea { min-height: 160px; font-size: 14px; line-height: 1.6; }
    body .swal2-select { padding: 10px 12px; }
    body .swal2-select option { background: var(--surface-solid); }
    body .swal2-input:focus, body .swal2-textarea:focus, body .swal2-select:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-soft);
    }
    body .swal2-actions { gap: 4px; }
    body .swal2-styled { border-radius: 999px; padding: 9px 20px; font-weight: 600; font-size: 14px; }
    body .swal2-styled.swal2-confirm { background: var(--accent); color: #1a1408; }
    body .swal2-styled.swal2-deny { background: var(--danger); color: #1f0a0a; }
    body .swal2-styled.swal-danger { background: var(--danger); color: #1f0a0a; }
    body .swal2-styled.swal2-cancel { background: var(--surface-3); color: var(--text); }
    body .swal2-styled:focus { box-shadow: 0 0 0 3px var(--accent-soft); }

    /* ---------- sheets written from a description (aifill.js) ---------- */
    .ai-dialog { display: flex; flex-direction: column; gap: 12px; text-align: left; }
    .ai-label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
    .ai-dialog .swal2-textarea { margin: 0; width: 100%; box-sizing: border-box; min-height: 110px; }
    .ai-modes { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--text); }
    .ai-modes label, .ai-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
    .ai-check { font-size: 13px; color: var(--text); }
    .ai-modes input, .ai-check input { accent-color: var(--accent); }
    .ai-note { margin: 0; font-size: 12.5px; color: var(--muted); }
    .ai-note b { color: var(--accent); font-weight: 600; }
    .ai-doubts { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text); line-height: 1.5; }
    .ai-doubts li + li { margin-top: 4px; }
    .ai-wait { margin: 0; font-size: 13px; }
    .ai-open { color: var(--accent); font-weight: 600; font-size: 14px; }
    body .swal2-icon.swal2-warning { border-color: var(--accent); color: var(--accent); }

    body .swal2-html-container { margin: 12px 1.6em 0; }
    .swal-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
    .swal-form .field { display: flex; flex-direction: column; gap: 6px; }
    .swal-form .field > span {
      font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
      text-transform: uppercase; color: var(--muted);
    }
    .swal-form .field > span em {
      font-style: normal; font-weight: 400; letter-spacing: 0;
      text-transform: none; opacity: 0.75; margin-left: 6px;
    }
    body .swal-form .swal2-input,
    body .swal-form .swal2-textarea,
    body .swal-form .swal2-select { margin: 0; width: 100%; max-width: none; }
    body .swal-form .swal2-input { height: 42px; font-size: 15px; padding: 0 12px; }
    body .swal-form .swal2-textarea { padding: 10px 12px; resize: vertical; }
    body .swal-form .swal2-select { height: 42px; font-size: 15px; padding: 0 10px; color: var(--text); }
    .swal-form ::placeholder, .entry-editor ::placeholder { color: #5d6575; opacity: 1; }
    
/* ---------- everyone look at this ---------- */
.focus-sheet {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: rgba(6, 8, 12, 0.94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: focus-in 0.25s ease;
}
.focus-sheet[hidden] { display: none; }
@keyframes focus-in { from { opacity: 0; } to { opacity: 1; } }
.focus-frame {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  max-width: 100%; max-height: 100%;
}
.focus-image {
  max-width: min(1400px, 96vw);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(217, 176, 102, 0.35);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}
.focus-image[hidden], .focus-handout[hidden] { display: none; }
/* a passage from the DM's notebook, as a sheet of old paper */
.focus-handout {
  width: min(720px, 92vw);
  max-height: 78vh;
  overflow-y: auto;
  padding: 34px 40px;
  border-radius: 6px;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(255, 250, 235, 0.0), rgba(120, 90, 40, 0.18)),
    #efe3c6;
  color: #2b2114;
  font: 400 clamp(17px, 2.1vw, 21px)/1.65 Georgia, "Times New Roman", serif;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), inset 0 0 60px rgba(120, 90, 40, 0.25);
}
.focus-handout p { margin: 0 0 0.8em; }
.focus-handout p:last-child { margin-bottom: 0; }
.focus-caption {
  font: 600 15px/1.5 var(--font-display, var(--font-ui));
  letter-spacing: 0.06em;
  color: var(--accent);
  text-align: center;
}
.focus-caption[hidden] { display: none; }
.focus-note {
  font: 500 12px/1.6 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.focus-stop {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(217, 176, 102, 0.5);
  background: rgba(217, 176, 102, 0.14);
  color: var(--accent);
  font: 600 13px var(--font-ui);
  letter-spacing: 0.04em;
  cursor: pointer;
}
.focus-stop:hover { background: rgba(217, 176, 102, 0.26); }
html.is-focused, html.is-focused body { overflow: hidden; }

/* ---------- the DM's notebook, in a panel on any page (notesdrawer.js) ---------- */
.notes-btn.is-active { border-color: rgba(217, 176, 102, 0.6); color: var(--accent); }
.notes-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 1700;
  width: min(480px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-left: 1px solid var(--border-strong);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
  animation: notes-in 0.18s ease;
}
.notes-drawer[hidden] { display: none; }
@keyframes notes-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.notes-drawer-head {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--border);
  font: 700 15px/1 var(--font-display); letter-spacing: 0.06em; color: var(--accent);
}
.notes-drawer-head span { flex: 1; }
.notes-drawer-link { font: 500 12.5px var(--font-ui); letter-spacing: 0; color: var(--muted); text-decoration: none; }
.notes-drawer-link:hover { color: var(--accent); }
.notes-drawer-close {
  width: 32px; height: 32px; border-radius: 9px;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer;
}
.notes-drawer-close:hover { color: var(--accent); border-color: var(--accent); }
.notes-drawer-frame { flex: 1; width: 100%; border: 0; background: var(--bg); }
/* with the panel open, the top bar and the chat step aside so both stay usable */
html.has-notes .toolbar { right: calc(min(480px, 100vw) + 14px); }
html.has-notes .chat { right: calc(min(480px, 100vw) + 16px); }
@media (max-width: 760px) {
  html.has-notes .toolbar, html.has-notes .chat { right: 14px; }
}


/* ---------- formulas worked out (formulas.js) ----------
   Marked like the rolls in the notebook: dice with a die, numbers plain,
   and what grows with a higher slot in green. */
.fx {
  display: inline; padding: 0 5px; border-radius: 5px; white-space: nowrap;
  color: var(--accent); font-weight: 600; font-size: 0.95em;
  background: rgba(217, 176, 102, 0.1); border: 1px solid rgba(217, 176, 102, 0.4);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.fx-dice::before { content: "\1F3B2"; margin-right: 4px; font-size: 0.82em; }
.fx-ref { font-style: italic; font-weight: 500; }
.fx-ref::before { content: none; }
.fx-num { background: rgba(217, 176, 102, 0.06); }
.fx-quiet { color: var(--text); font-weight: 500; background: transparent; border-style: dashed; border-color: rgba(255, 255, 255, 0.22); }
.fx-err { color: var(--danger); background: var(--danger-soft); border-color: rgba(240, 117, 117, 0.4); font-weight: 500; }
.fx-err::before { content: "\26A0"; margin-right: 4px; font-size: 0.85em; }
.fx em { font-style: normal; }
.fx-tag {
  margin-left: 5px; color: var(--muted); font: 600 0.68em/1 var(--font-ui);
  letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 0.1em;
}
.fx-grow { margin-left: 5px; color: #8fbf5f; font-weight: 600; font-size: 0.8em; }
.fx-wrap { display: block; min-width: 0; position: relative; }
.fx-wrap.is-reading > input, .fx-wrap.is-reading > textarea { display: none; }
.fx-view[hidden] { display: none; }
.fx-view { cursor: text; overflow-wrap: anywhere; }
.fx-view:focus { outline: none; }

/* the suggestions: a name, what it is in the other language, what goes in */
.fx-pick-item { align-items: center; }
.fx-pick-words { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.fx-pick-other { font: 500 11px/1.3 var(--font-ui); color: var(--muted); }
.fx-pick-code {
  flex: 0 0 auto; padding: 2px 7px; border-radius: 5px; color: var(--accent);
  background: rgba(217, 176, 102, 0.1); border: 1px solid rgba(217, 176, 102, 0.35);
  font: 500 12.5px/1.4 ui-monospace, Menlo, Consolas, monospace;
}
.fx-pick-hint {
  padding: 6px 10px 4px; margin-top: 2px; border-top: 1px solid var(--border);
  font: 500 11px/1.3 var(--font-ui); color: var(--muted);
}
