:root {
      --bg: #05070d;
      --vignette-opacity: 1;
      --text: #f7f7f7;
      --text-dim: rgba(247,247,247,0.72);
      --ui-ink: #f7f7f7;
      --ui-ink-rgb: 247,247,247;
      --ui-ink-dim: rgba(var(--ui-ink-rgb), 0.72);
      --ui-ink-soft: rgba(var(--ui-ink-rgb), 0.56);
      --ui-ink-faint: rgba(var(--ui-ink-rgb), 0.42);
      --ui-panel-bg: rgba(255,255,255,0.06);
      --ui-panel-hover-bg: rgba(255,255,255,0.08);
      --ui-panel-strong-bg: rgba(255,255,255,0.10);
      --ui-stroke: rgba(255,255,255,0.15);
      --ui-stroke-strong: rgba(255,255,255,0.26);
      --ui-input-bg: rgba(255,255,255,0.08);
      --ui-shadow: rgba(0,0,0,0.18);
      --ui-card-top-bg: rgba(255,255,255,0.16);
      --ui-card-bottom-bg: rgba(255,255,255,0.08);
      --ui-card-text: rgba(var(--ui-ink-rgb), 0.95);
      --ui-accent: #72f0ff;
      --ui-filled-ink: #11151d;
      --ui-filled-ink-rgb: 17,21,29;
      --shadow: rgba(0, 0, 0, 0.35);
      --panel: rgba(255,255,255,0.12);
      --panel-strong: rgba(255,255,255,0.16);
      --panel-soft: rgba(255,255,255,0.08);
      --stroke: rgba(255,255,255,0.15);
      --edit-bg: rgba(255,255,255,0.92);
      --edit-text: #333333;
      --edit-dialog-bg: rgba(255,255,255,0.92);
      --edit-title: #11151d;
      --edit-muted: rgba(17,21,29,0.56);
      --edit-button-bg: #4d5b75;
      --edit-button-text: #eef4ff;
      --accent: #72f0ff;
      --danger: #ff6d84;
      --ok: #82ffb2;
      --radius-xl: 50px;
      --radius-lg: 26px;
      --radius-md: 18px;
      --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      --font-display: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      --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);
    }

    * { box-sizing: border-box; }

    html, body {
      width: 100%;
      height: 100%;
      margin: 0;
      overflow: hidden;
      background: var(--bg);
      color: var(--text);
      font-family: var(--font-ui);
    }

    body {
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }

select {
  background: var(--ui-input-bg);
  color: rgba(var(--ui-ink-rgb), 0.96);
  border: 1px solid var(--ui-stroke);
}

select option, select optgroup {
  background-color: var(--bg);
  color: rgba(var(--ui-ink-rgb), 0.96);
}

select option:checked {
  background-color: rgba(var(--ui-ink-rgb), 0.18);
}

    button, input, textarea, select {
      font: inherit;
    }

    button {
      cursor: pointer;
      border: none;
      outline: none;
    }

    #app {
      position: relative;
      width: 100%;
      height: 100%;
      isolation: isolate;
      background: radial-gradient(circle at top, rgba(30,40,70,0.24), transparent 50%), #04060b;
    }

    .entry-background-image {
      position: absolute;
      inset: 0;
      z-index: 0;
      background-position: center;
      background-repeat: no-repeat;
      background-size: cover;
      opacity: 0;
      transition: opacity 240ms ease;
    }

    .entry-background-image.show {
      opacity: 1;
    }

    .entry-background-image.hidden {
      display: none;
    }

    canvas#plasma {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      z-index: 0;
      display: block;
      filter: saturate(1.04) blur(0px);
      transform: scale(1.03);
    }

    .entry-background-active canvas#plasma {
      filter: none;
      transform: none;
    }

    .vignette,
    .noise,
    .scanlines,
    .hud-glow,
    .idle-dim {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 1;
    }

    .vignette {
      background:
        radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.18) 72%, rgba(0,0,0,0.42) 100%),
        linear-gradient(180deg, rgba(0,0,0,0.12), transparent 20%, transparent 80%, rgba(0,0,0,0.16));
      mix-blend-mode: normal;
      opacity: var(--vignette-opacity, 1);
    }

    .noise {
      opacity: 0.06;
      background-image:
        radial-gradient(rgba(255,255,255,0.9) 0.45px, transparent 0.7px);
      background-size: 8px 8px;
      mix-blend-mode: soft-light;
    }

    .scanlines {
      opacity: 0.07;
      background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.4) 0px,
        rgba(255,255,255,0.4) 1px,
        transparent 2px,
        transparent 4px
      );
      mix-blend-mode: overlay;
    }

    .hud-glow {
      box-shadow: inset 0 0 180px rgba(89, 222, 255, 0.05);
    }

    .idle-dim {
      background: rgba(0,0,0,0.14);
      opacity: 0;
      transition: opacity 600ms ease;
    }

    .idle .idle-dim {
      opacity: 1;
    }

    .layer {
      position: absolute;
      inset: 0;
      z-index: 2;
    }

    .topbar {
      position: absolute;
      top: calc(18px + var(--safe-top));
      left: calc(18px + var(--safe-left));
      right: calc(18px + var(--safe-right));
      display: flex;
      align-items: center;
      justify-content: space-between;
      pointer-events: auto;
      z-index: 6;
      transition: opacity 400ms ease, transform 400ms ease;
    }

    .idle .topbar:not(.overlay-open) {
      opacity: 0;
      transform: translateY(-4px);
      pointer-events: none;
    }

    .idle .stats,
    .idle .helper-hints,
    .idle .locked-badge,
    .idle .fullscreen-toggle,
    .idle .echo-counter {
      opacity: 0 !important;
      transform: translateY(8px);
      pointer-events: none;
    }

    .display-text-hidden .topbar:not(.overlay-open),
    .display-text-hidden .stats,
    .display-text-hidden .helper-hints,
    .display-text-hidden .locked-badge,
    .display-text-hidden .fullscreen-toggle,
    .display-text-hidden .echo-counter,
    .display-text-hidden .pinned-entry-wrap,
    .display-text-hidden .entry-meta,
    .display-text-hidden .entry-external-badge,
    .display-text-hidden .entry-text {
      opacity: 0 !important;
      transform: translateY(8px);
      pointer-events: none;
    }

    .corner-cluster {
      display: flex;
      align-items: center;
      gap: 12px;
      pointer-events: auto;
    }

    .client-space-logo {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      max-width: min(440px, 52vw);
      max-height: 128px;
      padding: 16px 20px;
      border-radius: 18px;
      background: var(--ui-panel-bg);
      border: none;
      box-shadow: 0 14px 34px var(--ui-shadow);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }

    .client-space-logo.show {
      display: inline-flex;
    }

    .client-space-logo-image {
      display: block;
      width: auto;
      height: 96px;
      max-width: 100%;
      max-height: 96px;
      object-fit: contain;
    }

    .client-space-profile {
      position: absolute;
      top: calc(20px + var(--safe-top));
      right: calc(20px + var(--safe-right));
      z-index: 7;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 100px;
      height: 100px;
      border-radius: 999px;
      overflow: hidden;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
      flex: 0 0 auto;
      background: rgba(255,255,255,0.06);
      pointer-events: none;
    }

    .client-space-profile.show {
      display: inline-flex;
    }

    .client-space-profile-image {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .client-space-mode .idle .topbar:not(.overlay-open) {
      opacity: 1;
      transform: none;
      pointer-events: auto;
    }

    .client-space-mode .idle .client-space-footer {
      opacity: 0;
      transform: translateX(-50%) translateY(8px);
      pointer-events: none;
    }

    .client-space-footer {
      position: absolute;
      left: 50%;
      bottom: calc(16px + var(--safe-bottom));
      transform: translateX(-50%);
      z-index: 6;
      max-width: min(78vw, 720px);
      padding: 9px 14px;
      border-radius: 999px;
      background: var(--ui-panel-bg);
      border: 1px solid var(--ui-stroke);
      color: rgba(var(--ui-ink-rgb), 0.88);
      font-size: 12px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      text-align: center;
      box-shadow: 0 14px 34px var(--ui-shadow);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }

    .client-space-mode .unlockTopbarBtn,
    .client-space-mode .locked-badge,
    .client-space-mode .stats,
    .client-space-mode .helper-hints,
    .client-space-mode .entry-meta {
      display: none !important;
    }

    .icon-btn,
    .ghost-btn,
    .action-btn,
    .mini-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      border: 1px solid var(--ui-stroke);
      border-radius: 999px;
      color: rgba(var(--ui-ink-rgb), 0.92);
      background: linear-gradient(180deg, rgba(var(--ui-ink-rgb), 0.14), rgba(var(--ui-ink-rgb), 0.06));
      backdrop-filter: blur(18px) saturate(140%);
      -webkit-backdrop-filter: blur(18px) saturate(140%);
      box-shadow:
        0 10px 35px var(--ui-shadow),
        inset 0 1px 0 rgba(var(--ui-ink-rgb), 0.12);
      transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, opacity 180ms ease;
    }

    .icon-btn:hover,
    .ghost-btn:hover,
    .action-btn:hover,
    .mini-btn:hover {
      transform: translateY(-1px);
      border-color: var(--ui-stroke-strong);
      background: linear-gradient(180deg, rgba(var(--ui-ink-rgb), 0.18), rgba(var(--ui-ink-rgb), 0.08));
    }

    .icon-btn:active,
    .ghost-btn:active,
    .action-btn:active,
    .mini-btn:active {
      transform: translateY(0px) scale(0.99);
    }

    .icon-btn {
      min-width: 52px;
      min-height: 52px;
      padding: 0 16px;
    }

    .ghost-btn,
    .action-btn {
      padding: 12px 18px;
      min-height: 48px;
      font-size: 14px;
      letter-spacing: 0.02em;
    }

    .mini-btn {
      min-height: 36px;
      padding: 7px 12px;
      font-size: 12px;
    }

    .burger-lines {
      position: relative;
      width: 18px;
      height: 14px;
    }

    .burger-lines span {
      position: absolute;
      left: 0;
      right: 0;
      height: 2px;
      border-radius: 999px;
      background: currentColor;
      opacity: 0.92;
    }

    .burger-lines span:nth-child(1) { top: 0; }
    .burger-lines span:nth-child(2) { top: 6px; }
    .burger-lines span:nth-child(3) { top: 12px; }

    .clock {
      font-size: 14px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.86);
      padding: 0 14px;
      min-height: 48px;
      display: inline-flex;
      align-items: center;
      border-radius: 999px;
      border: 1px solid var(--stroke);
      background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      box-shadow: 0 10px 30px rgba(0,0,0,0.16);
      opacity: 0;
      transform: translateY(-8px);
      pointer-events: none;
      transition: opacity 240ms ease, transform 240ms ease;
    }

    .clock.show {
      opacity: 1;
      transform: translateY(0);
    }

    .stats {
      position: absolute;
      left: calc(20px + var(--safe-left));
      bottom: calc(84px + var(--safe-bottom));
      z-index: 3;
      display: grid;
      gap: 10px;
      opacity: 0;
      transform: translateY(8px);
      transition: opacity 240ms ease, transform 240ms ease;
      pointer-events: auto;
    }

    .stats.show {
      opacity: 1;
      transform: translateY(0);
    }

    .stats-card {
      display: flex;
      gap: 14px;
      align-items: center;
      padding: 12px 15px;
      border-radius: 18px;
      border: 1px solid rgba(255,255,255,0.11);
      background: rgba(255,255,255,0.06);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      box-shadow: 0 10px 25px rgba(0,0,0,0.16);
      color: rgba(255,255,255,0.82);
      font-size: 12px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .stats-card strong {
      display: block;
      font-size: 18px;
      letter-spacing: 0;
      text-transform: none;
      color: rgba(255,255,255,0.96);
      font-weight: 600;
    }

    .display-stage {
      position: absolute;
      inset: 0;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 10vh 10vw;
      pointer-events: auto;
    }

    .entry-external-badge {
      position: absolute;
      left: calc(20px + var(--safe-left));
      bottom: calc(20px + var(--safe-bottom));
      z-index: 4;
      font-size: 9px;
      line-height: 1;
      font-weight: 500;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.2);
      text-shadow: none;
      pointer-events: none;
    }

    .touch-hit-layer {
      position: fixed;
      inset: 0;
      z-index: 5;
      pointer-events: none;
    }

    .touch-hit-layer.hidden {
      display: none;
    }

    .touch-hitbox {
      position: fixed;
      pointer-events: auto;
      cursor: pointer;
      background: transparent;
      border: none;
      border-radius: 18px;
      touch-action: none;
      -webkit-tap-highlight-color: transparent;
      opacity: 0;
    }

    .touch-hitbox.hidden {
      display: none;
    }

    .touch-hitbox.touch-hitbox-button {
      border-radius: 999px;
      touch-action: manipulation;
    }

    .pinned-entry {
      position: absolute;
      top: calc(16px + var(--safe-top));
      left: 0;
      right: 0;
      transform: translateY(-10px);
      z-index: 4;
      display: flex;
      justify-content: center;
      padding: 0 calc(24px + var(--safe-left)) 0 calc(24px + var(--safe-right));
      pointer-events: none;
      opacity: 0;
      transition: opacity 220ms ease, transform 220ms ease;
    }

    .pinned-entry-card {
      position: relative;
      width: min(620px, 100%);
      padding: 14px 18px 16px;
      border-radius: 24px;
      border: 1px solid rgba(255,255,255,0.16);
      background:
        linear-gradient(180deg, rgba(255,255,255,0.17), rgba(255,255,255,0.05)),
        radial-gradient(circle at top, rgba(255,255,255,0.14), transparent 64%),
        linear-gradient(180deg, rgba(8,12,20,0.34), rgba(8,12,20,0.18));
      backdrop-filter: blur(20px) saturate(145%);
      -webkit-backdrop-filter: blur(20px) saturate(145%);
      box-shadow:
        0 18px 44px rgba(0,0,0,0.26),
        0 2px 18px rgba(255,255,255,0.05),
        inset 0 1px 0 rgba(255,255,255,0.14);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      overflow: hidden;
      pointer-events: auto;
      cursor: pointer;
    }

    .pinned-entry.show {
      opacity: 1;
      transform: translateY(0);
    }

    .pinned-entry.hidden {
      display: none;
    }

    .pinned-entry .entry-link-button {
      font-size: 14px;
    }

    .pinned-entry-card::before {
      content: "";
      position: absolute;
      inset: 8px;
      border-radius: 18px;
      border: 1px solid rgba(255,255,255,0.1);
      background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
      pointer-events: none;
    }

    .pinned-entry-text {
      position: relative;
      z-index: 1;
      width: 100%;
      font-family: var(--font-display);
      font-size: 14px;
      line-height: 1.45;
      font-weight: 500;
      letter-spacing: -0.01em;
      text-align: center;
      color: rgba(255,255,255,0.95);
      text-shadow: 0 6px 20px rgba(0,0,0,0.24);
      white-space: pre-wrap;
      word-break: break-word;
      overflow-wrap: anywhere;
    }

    .pinned-entry-card:hover {
      transform: translateY(-1px);
      box-shadow:
        0 22px 52px rgba(0,0,0,0.3),
        0 4px 22px rgba(255,255,255,0.06),
        inset 0 1px 0 rgba(255,255,255,0.16);
    }

    .pinned-entry-text .entry-link-button {
      --entry-link-font-size: 14px;
    }

    .entry-shell {
      position: relative;
      isolation: isolate;
      width: min(1180px, 78vw);
      max-height: 72vh;
      text-align: center;
      transition: filter 500ms ease, opacity 500ms ease, transform 320ms ease;
      cursor: pointer;
      pointer-events: auto;
    }

    .dim-display .entry-shell {
      filter: blur(2px) brightness(0.86);
      opacity: 0.34;
    }


    .display-stage,
    .entry-shell,
    .entry-text {
      touch-action: none;
      -webkit-user-select: none;
      user-select: none;
      -webkit-touch-callout: none;
      overscroll-behavior-x: contain;
    }

    .echo-counter,
    .echo-counter-btn,
    .entry-actions .mini-btn,
    .danger-btn,
    .secondary-btn,
    .primary-btn,
    .switch {
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }

    .entry-text {
      position: relative;
      z-index: 1;
      pointer-events: auto;
      cursor: pointer;
      font-family: var(--font-display);
      font-size: 50px;
      line-height: 1.24;
      font-weight: 500;
      letter-spacing: -0.022em;
      color: var(--text);
      text-shadow:
        0 10px 40px rgba(0,0,0,0.36),
        0 1px 0 rgba(255,255,255,0.05);
      white-space: pre-wrap;
      word-break: normal;
      overflow-wrap: normal;
      min-height: 1.2em;
      display: block;
      text-align: center;
    }

    .entry-text.word-mode {
      white-space: pre-wrap;
    }

    .entry-text.whole-text {
      display: block;
      opacity: 0;
      transform: translateY(7px);
      transition:
        opacity var(--fade-speed, 320ms) cubic-bezier(.22,.8,.2,1),
        transform var(--fade-duration, 560ms) cubic-bezier(.18,.84,.22,1);
      will-change: opacity, transform;
    }

    .entry-text.whole-text.show {
      opacity: 1;
      transform: translateY(0px);
    }

    .entry-text.whole-text.exit {
      opacity: 0;
      transform: translateY(-6px);
    }

    .entry-link-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      position: relative;
      z-index: 3;
      cursor: pointer;
      margin: 0 0.18em;
      padding: 0.3em 1.08em;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.78);
      background: rgba(255,255,255,0.9);
      color: transparent;
      font-family: var(--font-display);
      text-decoration: none;
      text-transform: uppercase;
      font-size: var(--entry-link-font-size, 18px);
      line-height: 1;
      font-weight: 400;
      letter-spacing: 0.14em;
      white-space: nowrap;
      vertical-align: middle;
      text-shadow: 0 0 0 rgba(9, 12, 18, 0.72);
      box-shadow:
        0 12px 26px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.48);
      transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
    }

    .entry-link-button:hover {
      transform: translateY(-1px);
      background: rgba(255,255,255,0.94);
      box-shadow:
        0 16px 32px rgba(0,0,0,0.22),
        inset 0 1px 0 rgba(255,255,255,0.54);
    }

    .entry-link-button:active {
      transform: translateY(0);
    }

    .entry-link-button:focus-visible {
      outline: 2px solid rgba(255,255,255,0.96);
      outline-offset: 3px;
    }

    .entry-word {
      display: inline-block;
      pointer-events: auto;
      cursor: pointer;
      opacity: 0;
      transform: translateY(8px);
      filter: blur(1.6px);
      transition:
        opacity var(--fade-speed, 320ms) cubic-bezier(.22,.8,.2,1),
        transform var(--fade-duration, 560ms) cubic-bezier(.18,.84,.22,1),
        filter var(--fade-duration, 560ms) ease;
      will-change: opacity, transform, filter;
    }

    .entry-pop-word {
      font-size: 1.6em;
      line-height: 1;
      vertical-align: baseline;
      display: inline-block;
    }

    .entry-word.entry-pop-word {
      transform: translateY(18px) scale(0.64);
      filter: blur(2.4px);
      transition:
        opacity max(110ms, calc(var(--fade-speed, 320ms) * 0.34)) cubic-bezier(.22,.8,.2,1),
        transform max(135ms, calc(var(--fade-duration, 560ms) * 0.26)) cubic-bezier(.2,1.08,.22,1),
        filter max(135ms, calc(var(--fade-duration, 560ms) * 0.22)) ease;
    }

    .entry-word.show {
      opacity: 1;
      transform: translateY(0px);
      filter: blur(0px);
    }

    .entry-word.exit {
      opacity: 0;
      transform: translateY(-6px);
      filter: blur(1.6px);
    }

    .entry-link-button.entry-word {
      display: inline-flex;
      pointer-events: auto;
    }

    .entry-emphasis {
      font-weight: 700;
      pointer-events: auto;
      cursor: pointer;
    }

    .entry-shell *,
    .entry-text *,
    .entry-link-button,
    .entry-link-button * {
      cursor: pointer;
    }

    body:not(.client-space-mode) .display-stage,
    body:not(.client-space-mode) .display-stage .entry-shell,
    body:not(.client-space-mode) .display-stage .entry-text,
    body:not(.client-space-mode) .display-stage .entry-text *,
    body:not(.client-space-mode) .display-stage .entry-link-button,
    body:not(.client-space-mode) .display-stage .entry-link-button * {
      cursor: pointer !important;
    }

    body.display-hover-pointer,
    body.display-hover-pointer * {
      cursor: pointer !important;
    }

    .entry-text.entry-glow {
      text-shadow:
        0 0 14px rgba(255,255,255,0.28),
        0 0 36px rgba(114,240,255,0.2),
        0 12px 46px rgba(0,0,0,0.42),
        0 1px 0 rgba(255,255,255,0.08);
    }

    .entry-text.entry-drop-shadow {
      text-shadow:
        0 var(--entry-drop-shadow-primary-y, 14px) var(--entry-drop-shadow-primary-blur, 26px) rgba(var(--entry-drop-shadow-rgb, 0, 0, 0), var(--entry-drop-shadow-primary-alpha, 0.32)),
        0 var(--entry-drop-shadow-secondary-y, 5px) var(--entry-drop-shadow-secondary-blur, 10px) rgba(var(--entry-drop-shadow-rgb, 0, 0, 0), var(--entry-drop-shadow-secondary-alpha, 0.18));
    }

    .entry-text.entry-drop-shadow-off {
      text-shadow: none;
    }

    .entry-text.entry-glow.entry-drop-shadow {
      text-shadow:
        0 0 14px rgba(255,255,255,0.28),
        0 0 36px rgba(114,240,255,0.2),
        0 12px 46px rgba(0,0,0,0.42),
        0 1px 0 rgba(255,255,255,0.08),
        0 var(--entry-drop-shadow-primary-y, 14px) var(--entry-drop-shadow-primary-blur, 26px) rgba(var(--entry-drop-shadow-rgb, 0, 0, 0), var(--entry-drop-shadow-primary-alpha, 0.32)),
        0 var(--entry-drop-shadow-secondary-y, 5px) var(--entry-drop-shadow-secondary-blur, 10px) rgba(var(--entry-drop-shadow-rgb, 0, 0, 0), var(--entry-drop-shadow-secondary-alpha, 0.18));
    }

    .entry-text.scroll-mode {
      white-space: pre-wrap;
      opacity: 0;
      will-change: opacity, transform;
    }

    .entry-text.scroll-horizontal-enter {
      animation: scrollHorizontalEnter var(--scroll-enter-duration, 620ms) cubic-bezier(.18,.84,.22,1) forwards;
    }

    .entry-text.scroll-horizontal-exit {
      animation: scrollHorizontalExit var(--scroll-exit-duration, 620ms) cubic-bezier(.18,.84,.22,1) forwards;
    }

    .entry-text.scroll-vertical-enter {
      animation: scrollVerticalEnter var(--scroll-enter-duration, 620ms) cubic-bezier(.18,.84,.22,1) forwards;
    }

    .entry-text.scroll-vertical-exit {
      animation: scrollVerticalExit var(--scroll-exit-duration, 620ms) cubic-bezier(.18,.84,.22,1) forwards;
    }

    @keyframes scrollHorizontalEnter {
      from { opacity: 0; transform: translateX(-18vw); }
      to { opacity: 1; transform: translateX(0); }
    }

    @keyframes scrollHorizontalExit {
      from { opacity: 1; transform: translateX(0); }
      to { opacity: 0; transform: translateX(18vw); }
    }

    @keyframes scrollVerticalEnter {
      from { opacity: 0; transform: translateY(-18vh); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes scrollVerticalExit {
      from { opacity: 1; transform: translateY(0); }
      to { opacity: 0; transform: translateY(18vh); }
    }

    .entry-meta {
      position: relative;
      z-index: 1;
      margin-top: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      color: var(--text-dim);
      font-size: 14px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      opacity: 0;
      transform: translateY(8px);
      transition: opacity 300ms ease, transform 300ms ease;
    }

    .entry-meta.show {
      opacity: 1;
      transform: translateY(0px);
    }


    .echo-counter {
      position: relative;
      z-index: 2;
      margin-top: 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      min-height: 54px;
      padding: 10px 12px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.06);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      box-shadow: 0 10px 25px rgba(0,0,0,0.16);
      opacity: 0;
      transform: translateY(8px);
      pointer-events: none;
      transition: opacity 240ms ease, transform 240ms ease;
    }

    .echo-counter.show {
      opacity: 1;
      transform: translateY(0px);
      pointer-events: auto;
    }

    .echo-counter.hidden {
      display: none !important;
    }

    .echo-counter-btn {
      position: relative;
      z-index: 1;
      pointer-events: auto;
      width: 42px;
      height: 42px;
      min-width: 42px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.09);
      color: rgba(255,255,255,0.96);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
      transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
    }

    .echo-counter-btn:hover {
      transform: translateY(-1px);
      background: rgba(255,255,255,0.14);
      border-color: rgba(255,255,255,0.22);
    }

    .echo-counter-btn:active {
      transform: translateY(0) scale(0.98);
    }

    .echo-counter-btn.is-pressed {
      transform: translateY(0) scale(0.95);
      background: rgba(255,255,255,0.2);
      border-color: rgba(255,255,255,0.32);
      box-shadow:
        inset 0 2px 8px rgba(0,0,0,0.18),
        0 0 0 1px rgba(255,255,255,0.04);
    }

    .echo-counter-btn.is-positive.is-pressed {
      background: rgba(130,255,178,0.24);
      border-color: rgba(130,255,178,0.34);
    }

    .echo-counter-btn.is-negative.is-pressed {
      background: rgba(255,109,132,0.24);
      border-color: rgba(255,109,132,0.34);
    }

    .echo-counter-btn.is-positive {
      background: rgba(130,255,178,0.12);
      border-color: rgba(130,255,178,0.2);
    }

    .echo-counter-btn.is-negative {
      background: rgba(255,109,132,0.12);
      border-color: rgba(255,109,132,0.2);
    }

    .echo-counter-btn > * {
      pointer-events: none;
    }

    .echo-counter-value {
      min-width: 76px;
      padding: 0 14px;
      font-size: 22px;
      font-weight: 700;
      letter-spacing: -0.02em;
      color: rgba(255,255,255,0.98);
      text-align: center;
      text-shadow: 0 6px 18px rgba(0,0,0,0.22);
    }

    .edit-echo-toggle-row {
      color: rgba(255,255,255,0.96);
    }

    .edit-echo-toggle-row .subtle {
      max-width: none;
    }

    .entry-meta .meta-pill {
      opacity: 0;
      transform: translateY(8px);
      transition:
        opacity var(--meta-pill-duration, 320ms) cubic-bezier(.22,.8,.2,1),
        transform var(--meta-pill-duration, 320ms) cubic-bezier(.18,.84,.22,1);
      will-change: opacity, transform;
    }

    .entry-meta.show .meta-pill {
      opacity: 1;
      transform: translateY(0px);
    }

    .meta-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 34px;
      padding: 0 12px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.1);
      background: rgba(255,255,255,0.06);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }

    .welcome-overlay,
    .setup-overlay,
    .modal-overlay,
    .panel-overlay,
    .menu-popover,
    .toast-layer {
      position: absolute;
      inset: 0;
      z-index: 5;
    }

    .welcome-overlay,
    .setup-overlay,
    .modal-overlay,
    .panel-overlay {
      display: none;
      align-items: center;
      justify-content: center;
      padding: 28px;
    }

    .welcome-overlay.show,
    .setup-overlay.show,
    .modal-overlay.show,
    .panel-overlay.show {
      display: flex;
    }

    #editOverlay {
      overflow-y: auto;
      overflow-x: hidden;
      align-items: flex-start;
      padding:
        calc(16px + var(--safe-top))
        calc(12px + var(--safe-right))
        calc(16px + var(--safe-bottom))
        calc(12px + var(--safe-left));
    }

    #settingsOverlay {
      overflow-y: auto;
      overflow-x: hidden;
      align-items: flex-start;
      padding:
        calc(12px + var(--safe-top))
        calc(8px + var(--safe-right))
        calc(12px + var(--safe-bottom))
        calc(8px + var(--safe-left));
    }

    #editOverlay .overlay-backdrop,
    #settingsOverlay .overlay-backdrop {
      position: fixed;
    }

    .overlay-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(3,4,8,0.34);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }

    #settingsOverlay .overlay-backdrop {
      background: rgba(3,4,8,0.12);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }

    .welcome-message {
      position: relative;
      z-index: 1;
      text-align: center;
      font-size: clamp(42px, 7vw, 92px);
      letter-spacing: -0.04em;
      font-weight: 600;
      color: rgba(255,255,255,0.97);
      text-shadow: 0 12px 40px rgba(0,0,0,0.3);
      opacity: 0;
      transform: translateY(18px) scale(0.985);
      transition: opacity 800ms ease, transform 900ms cubic-bezier(.2,.8,.2,1);
    }

    .welcome-message.show {
      opacity: 1;
      transform: translateY(0px) scale(1);
    }

    .default-intro-skip {
      position: fixed;
      left: 50%;
      bottom: calc(22px + var(--safe-bottom));
      z-index: 28;
      transform: translateX(-50%);
      min-height: 44px;
      padding: 0 20px;
      border: 1px solid rgba(255,255,255,0.28);
      border-radius: 999px;
      background: rgba(255,255,255,0.15);
      color: rgba(255,255,255,0.92);
      font-family: var(--font-ui);
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      backdrop-filter: blur(16px) saturate(140%);
      -webkit-backdrop-filter: blur(16px) saturate(140%);
      box-shadow: 0 16px 42px rgba(0,0,0,0.22);
      cursor: pointer;
    }

    .onboarding-overlay {
      position: fixed;
      inset: 0;
      z-index: 72;
      display: none;
      align-items: center;
      justify-content: center;
      padding:
        calc(18px + var(--safe-top))
        calc(18px + var(--safe-right))
        calc(18px + var(--safe-bottom))
        calc(18px + var(--safe-left));
      background:
        radial-gradient(circle at 50% 34%, rgba(255,255,255,0.14), transparent 34%),
        rgba(3,4,8,0.32);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }

    .onboarding-overlay.show {
      display: flex;
    }

    .onboarding-card {
      width: min(560px, calc(100vw - 36px));
      padding: 30px;
      border-radius: 34px;
      border: 1px solid rgba(255,255,255,0.22);
      background:
        linear-gradient(180deg, #4f5d75 0%, #33415c 48%, #271033 100%);
      color: rgba(255,255,255,0.95);
      box-shadow:
        0 30px 90px rgba(0,0,0,0.30),
        inset 0 1px 0 rgba(255,255,255,0.18);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }

    .onboarding-card .subtle {
      margin-top: 14px;
      color: rgba(255,255,255,0.76);
      font-size: 18px;
      line-height: 1.45;
    }

    .onboarding-actions {
      display: flex;
      justify-content: flex-end;
      gap: 12px;
      margin-top: 28px;
      flex-wrap: wrap;
    }

    .onboarding-controls-highlight #burgerBtn,
    .onboarding-controls-highlight #statsWrap {
      outline: 2px solid rgba(255,255,255,0.72);
      outline-offset: 6px;
      box-shadow: 0 0 0 10px rgba(255,255,255,0.12);
    }

    .stats.onboarding-stats-preview {
      left: calc(20px + var(--safe-left));
      right: auto;
      bottom: calc(84px + var(--safe-bottom));
      pointer-events: none;
    }

    .stats.onboarding-stats-preview .stats-card {
      gap: 14px;
      padding: 12px 15px;
      border-radius: 18px;
      background: rgba(22, 27, 45, 0.94);
      border: 1px solid rgba(255,255,255,0.18);
      box-shadow: 0 18px 46px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.12);
    }

    .card,
    .panel,
    .menu-card,
    .toast {
      position: relative;
      z-index: 1;
      border: 1px solid var(--ui-stroke);
      background: linear-gradient(180deg, var(--ui-card-top-bg), var(--ui-card-bottom-bg));
      backdrop-filter: blur(24px) saturate(145%);
      -webkit-backdrop-filter: blur(24px) saturate(145%);
      box-shadow:
        0 30px 80px rgba(0,0,0,0.26),
        inset 0 1px 0 rgba(var(--ui-ink-rgb), 0.11);
    }

    .card {
      width: min(760px, calc(100vw - 32px));
      padding: 34px;
      border-radius: 36px;
      color: var(--ui-card-text);
    }

    .panel {
      width: min(1100px, calc(100vw - 16px));
      max-width: calc(100vw - 16px);
      height: min(82vh, 900px);
      padding: 24px;
      border-radius: 32px;
      color: var(--ui-card-text);
      display: grid;
      grid-template-rows: auto 1fr;
      gap: 18px;
      overflow-x: hidden;
    }

    .search-panel {
      width: min(760px, calc(100vw - 24px));
      max-width: calc(100vw - 24px);
      height: min(76vh, 760px);
    }

    #settingsPanel {
      transform: translate(var(--settings-panel-x, 0px), var(--settings-panel-y, 0px));
      transition: transform 180ms ease;
      will-change: transform;
    }

    #settingsPanel.is-dragging {
      transition: none;
    }

    .panel-header,
    .card-header,
    .edit-header {
      display: flex;
      align-items: start;
      justify-content: space-between;
      gap: 18px;
    }

    #settingsPanelHeader {
      cursor: grab;
      user-select: none;
      -webkit-user-select: none;
      touch-action: none;
    }

    #settingsPanel.is-dragging #settingsPanelHeader {
      cursor: grabbing;
    }

    .save-status-card {
      width: min(560px, calc(100vw - 32px));
    }

    .save-status-body {
      display: grid;
      gap: 18px;
      margin-top: 22px;
    }

    .save-status-progress {
      position: relative;
      overflow: hidden;
      height: 12px;
      border-radius: 999px;
      background: rgba(255,255,255,0.12);
      border: 1px solid rgba(255,255,255,0.08);
    }

    .save-status-progress-bar {
      position: absolute;
      inset: 0;
      width: 42%;
      border-radius: inherit;
      background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(255,255,255,0.92), rgba(255,255,255,0.22));
      animation: saveProgressSweep 1200ms linear infinite;
      transform: translateX(-100%);
    }

    .save-status-card.is-success .save-status-progress-bar,
    .save-status-card.is-error .save-status-progress-bar {
      animation: none;
      width: 100%;
      transform: translateX(0);
    }

    .save-status-card.is-success .save-status-progress-bar {
      background: linear-gradient(90deg, rgba(140,255,186,0.55), rgba(214,255,228,0.96));
    }

    .save-status-card.is-error .save-status-progress-bar {
      background: linear-gradient(90deg, rgba(255,128,128,0.62), rgba(255,186,186,0.96));
    }

    .save-status-meta {
      display: grid;
      gap: 6px;
      padding: 14px 16px;
      border-radius: 20px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.08);
    }

    .save-status-label {
      font-size: 11px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.58);
    }

    .save-status-filename {
      font-size: 15px;
      line-height: 1.45;
      color: rgba(255,255,255,0.96);
      word-break: break-word;
    }

    @keyframes saveProgressSweep {
      0% {
        transform: translateX(-110%);
      }
      100% {
        transform: translateX(260%);
      }
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.68);
      margin-bottom: 12px;
    }

    h1, h2, h3, p {
      margin: 0;
    }

    .title-lg {
      font-size: clamp(28px, 4vw, 44px);
      letter-spacing: -0.04em;
      line-height: 1;
      font-weight: 650;
    }

    .title-md {
      font-size: clamp(22px, 3vw, 32px);
      letter-spacing: -0.03em;
      line-height: 1.05;
      font-weight: 620;
    }

    .subtle {
      color: var(--ui-ink-dim);
      font-size: 15px;
      line-height: 1.55;
      max-width: 66ch;
    }

    .stack {
      display: grid;
      gap: 16px;
    }

    .grid-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    .field {
      display: grid;
      gap: 10px;
    }

    .field label {
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: var(--ui-ink-dim);
    }

    .ui-input,
    .ui-textarea,
    .ui-select,
    input[type="color"] {
      width: 100%;
      border-radius: 18px;
      border: 1px solid var(--ui-stroke);
      background: var(--ui-input-bg);
      color: rgba(var(--ui-ink-rgb), 0.96);
      padding: 14px 16px;
      outline: none;
      box-shadow: inset 0 1px 0 rgba(var(--ui-ink-rgb), 0.08);
      transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
    }

    .ui-input::placeholder,
    .ui-textarea::placeholder {
      color: rgba(var(--ui-ink-rgb), 0.56);
      opacity: 1;
    }

    .ui-input:focus,
    .ui-textarea:focus,
    .ui-select:focus {
      border-color: color-mix(in srgb, var(--ui-accent) 52%, transparent);
      background: rgba(var(--ui-ink-rgb), 0.11);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 12%, transparent);
    }

    input[type="range"] {
      width: 100%;
      accent-color: var(--ui-accent);
    }

    input[type="color"] {
      min-height: 52px;
      padding: 4px;
      background: var(--ui-input-bg);
    }

    .setup-actions,
    .panel-actions,
    .edit-actions,
    .toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .toolbar {
      justify-content: flex-start;
    }

    .primary-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      min-height: 50px;
      padding: 0 18px;
      border-radius: 999px;
      border: 1px solid color-mix(in srgb, var(--ui-ink) 18%, rgba(255,255,255,0.86));
      background: color-mix(in srgb, white 94%, var(--ui-ink) 6%);
      color: rgba(var(--ui-filled-ink-rgb), 0.96);
      text-shadow: none;
      font-weight: 700;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.48),
        0 14px 32px rgba(0,0,0,0.18);
    }

    .secondary-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      min-height: 50px;
      padding: 0 18px;
      border-radius: 999px;
      border: 1px solid var(--ui-stroke);
      background: rgba(var(--ui-ink-rgb), 0.1);
      color: rgba(var(--ui-ink-rgb), 0.5);
      text-shadow: none;
      box-shadow:
        inset 0 1px 0 rgba(var(--ui-ink-rgb), 0.12),
        0 10px 24px rgba(0,0,0,0.14);
    }

    .secondary-btn:hover:not(.is-active),
    .secondary-btn:focus-visible:not(.is-active) {
      border-color: var(--ui-stroke-strong);
      background: rgba(var(--ui-ink-rgb), 0.18);
      color: rgba(var(--ui-ink-rgb), 0.76);
      box-shadow:
        inset 0 1px 0 rgba(var(--ui-ink-rgb), 0.18),
        0 14px 28px rgba(0,0,0,0.18);
      transform: translateY(-1px);
    }

    .secondary-btn.is-active,
    .plasma-colorway-btn.is-active {
      border-color: color-mix(in srgb, var(--ui-ink) 18%, rgba(255,255,255,0.86));
      background: color-mix(in srgb, white 94%, var(--ui-ink) 6%);
      color: rgba(var(--ui-filled-ink-rgb), 0.96);
      text-shadow: none;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.48),
        0 14px 32px rgba(0,0,0,0.18);
    }

    .manage-completed-toggle.is-active {
      background: rgba(255,255,255,0.9);
      border-color: rgba(255,255,255,0.82);
      color: rgba(var(--ui-filled-ink-rgb), 0.96);
      text-shadow: none;
    }

    .danger-btn {
      background: linear-gradient(180deg, rgba(255,109,132,0.95), rgba(255,109,132,0.74));
      color: white;
      box-shadow: 0 16px 40px rgba(255,109,132,0.2);
    }

    .toggle-row,
    .slider-row,
    .inline-row,
    .entry-row,
    .stat-grid {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .stat-grid {
      gap: 12px;
      flex-wrap: wrap;
    }

    .chip {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 34px;
      padding: 0 10px;
      border-radius: 999px;
      font-size: 12px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      border: 1px solid rgba(255,255,255,0.1);
      background: rgba(255,255,255,0.08);
      color: rgba(255,255,255,0.84);
    }

    .switch {
      position: relative;
      width: 58px;
      height: 34px;
      border-radius: 999px;
      background: rgba(255,255,255,0.1);
      border: 1px solid rgba(255,255,255,0.24);
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.12),
        0 10px 20px rgba(0,0,0,0.12);
      transition: background 220ms ease, border-color 220ms ease;
      flex-shrink: 0;
    }

    .switch::after {
      content: "";
      position: absolute;
      top: 4px;
      left: 4px;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: white;
      box-shadow: 0 6px 18px rgba(0,0,0,0.22);
      transition: transform 220ms ease;
    }

    .switch.active {
      background: rgba(255,255,255,0.94);
      border-color: rgba(255,255,255,0.86);
    }

    .switch.active::after {
      transform: translateX(24px);
    }

    .panel-body {
      min-height: 0;
      overflow: auto;
      padding-right: 6px;
    }

    .search-results {
      display: grid;
      gap: 10px;
      align-content: start;
    }

    .search-result-item {
      width: 100%;
      min-height: 58px;
      padding: 14px 16px;
      border-radius: 18px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.06);
      color: rgba(255,255,255,0.96);
      text-align: left;
      transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
    }

    .search-result-item:hover {
      background: rgba(255,255,255,0.1);
      border-color: rgba(255,255,255,0.2);
      transform: translateY(-1px);
    }

    .search-result-item:active {
      transform: translateY(0);
    }

    .search-result-text {
      display: block;
      font-size: 15px;
      line-height: 1.45;
      letter-spacing: -0.01em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .search-empty {
      padding: 20px 18px;
      border-radius: 18px;
      border: 1px dashed rgba(255,255,255,0.14);
      background: rgba(255,255,255,0.04);
      color: rgba(255,255,255,0.68);
    }

    .settings-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 18px;
      min-height: 100%;
    }

    .settings-sections,
    .preview-column {
      display: grid;
      gap: 16px;
      align-content: start;
    }

    .settings-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      flex-wrap: wrap;
      margin-bottom: 2px;
    }

    .settings-toolbar-copy {
      display: grid;
      gap: 2px;
    }

    .settings-toolbar-btn {
      min-height: 42px;
      padding-inline: 16px;
    }

    .settings-group {
      border-radius: 26px;
      border: 1px solid var(--ui-stroke);
      background: var(--ui-panel-bg);
      box-shadow: inset 0 1px 0 rgba(var(--ui-ink-rgb), 0.05);
      overflow: hidden;
    }

    .settings-group-toggle {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 18px 20px;
      text-align: left;
      border-radius: 0;
      border: 0;
      background: color-mix(in srgb, var(--ui-panel-bg) 80%, transparent);
      color: rgba(var(--ui-ink-rgb), 0.96);
    }

    .settings-group-toggle:hover {
      background: var(--ui-panel-hover-bg);
    }

    .settings-group-copy {
      display: grid;
      gap: 5px;
    }

    .settings-group-kicker {
      font-size: 11px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--ui-ink-soft);
    }

    .settings-group-title {
      font-size: 18px;
      line-height: 1.1;
      font-weight: 600;
      color: rgba(var(--ui-ink-rgb), 0.96);
    }

    .settings-group-summary {
      font-size: 13px;
      line-height: 1.45;
      color: var(--ui-ink-dim);
    }

    .settings-group-chevron {
      flex: 0 0 auto;
      font-size: 18px;
      line-height: 1;
      color: rgba(var(--ui-ink-rgb), 0.82);
      transition: transform 220ms ease;
    }

    .settings-group.is-collapsed .settings-group-chevron {
      transform: rotate(-90deg);
    }

    .settings-group-body {
      display: grid;
      gap: 14px;
      padding: 14px 16px 16px 16px;
    }

    .settings-group-body--stacked {
      gap: 12px;
    }

    .settings-group.is-collapsed .settings-group-body {
      display: none;
    }

    .settings-card-inner {
      margin: 0;
    }

    .settings-subtitle {
      font-size: 12px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--ui-ink-dim);
      margin-bottom: 2px;
    }

    .settings-subdivider {
      height: 1px;
      background: color-mix(in srgb, var(--ui-ink) 8%, transparent);
      margin: 2px 0;
    }


    .filter-pills,
    .stats-filter-options {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .filter-pill {
      min-height: 38px;
      padding: 0 14px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.14);
      background: rgba(255,255,255,0.06);
      color: rgba(255,255,255,0.94);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-size: 12px;
    }

    .filter-pill.active {
      background: rgba(88, 214, 141, 0.9);
      border-color: rgba(88, 214, 141, 0.78);
      color: transparent;
      text-shadow: 0 0 0 rgba(9, 12, 18, 0.72);
    }

    .filter-pill.exclude {
      background: rgba(255,109,132,0.12);
      border-color: rgba(255,109,132,0.24);
    }

    .filter-pill.exclude.active {
      background: rgba(255,109,132,0.9);
      border-color: rgba(255,109,132,0.78);
    }

    .filter-summary {
      color: var(--ui-ink-dim);
      font-size: 13px;
      line-height: 1.5;
    }

    .section-card,
    .preview-card,
    .entry-card {
      padding: 18px;
      border-radius: 24px;
      border: 1px solid var(--ui-stroke);
      background: var(--ui-panel-bg);
      box-shadow: inset 0 1px 0 rgba(var(--ui-ink-rgb), 0.06);
    }

    .section-title {
      margin-bottom: 14px;
      font-size: 13px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--ui-ink-dim);
    }

    .entry-list {
      display: grid;
      gap: 14px;
    }

    .entry-card {
      display: grid;
      gap: 14px;
    }

    .entry-card .entry-preview {
      font-size: 16px;
      line-height: 1.45;
      color: rgba(255,255,255,0.94);
      white-space: pre-wrap;
      word-break: break-word;
      overflow-wrap: anywhere;
    }

    .entry-card .entry-sub {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      flex-wrap: wrap;
      color: rgba(255,255,255,0.66);
      font-size: 12px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .entry-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .sort-order-list {
      display: grid;
      gap: 12px;
    }

    .sort-order-list.is-sorting {
      user-select: none;
      -webkit-user-select: none;
      touch-action: none;
    }

    .sort-entry-card {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 14px;
      padding: 16px 18px;
      border-radius: 22px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.06);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
      cursor: grab;
    }

    .sort-entry-card:active {
      cursor: grabbing;
    }

    .sort-entry-card.is-dragging {
      opacity: 0.56;
      transform: scale(0.985);
      pointer-events: none;
    }

    .sort-entry-card.drag-target {
      border-color: rgba(114,240,255,0.46);
      box-shadow: inset 0 0 0 2px rgba(114,240,255,0.18), 0 18px 40px rgba(0,0,0,0.18);
      position: relative;
    }

    .sort-entry-card.drag-target-before::before,
    .sort-entry-card.drag-target-after::after {
      content: "";
      position: absolute;
      left: 16px;
      right: 16px;
      height: 3px;
      border-radius: 999px;
      background: rgba(114,240,255,0.98);
      box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 0 18px rgba(114,240,255,0.38);
    }

    .sort-entry-card.drag-target-before::before {
      top: -7px;
    }

    .sort-entry-card.drag-target-after::after {
      bottom: -7px;
    }

    .sort-entry-index {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 34px;
      min-height: 34px;
      border-radius: 999px;
      background: rgba(255,255,255,0.08);
      color: rgba(255,255,255,0.78);
      font-size: 12px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .sort-entry-copy {
      min-width: 0;
    }

    .sort-entry-title {
      color: rgba(255,255,255,0.94);
      font-size: 16px;
      line-height: 1.35;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .sort-entry-handle {
      color: rgba(255,255,255,0.62);
      font-size: 20px;
      line-height: 1;
    }

    .recording-panel {
      width: min(720px, calc(100vw - 32px));
    }

    .recording-settings-card,
    .recording-status-card {
      gap: 16px;
    }

    .recording-resolution {
      min-height: 50px;
      display: flex;
      align-items: center;
      padding: 0 16px;
      border-radius: 16px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.06);
      color: rgba(255,255,255,0.9);
    }

    .recording-size-panel {
      width: min(820px, calc(100vw - 32px));
    }

    .recording-size-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
    }

    .recording-size-option {
      appearance: none;
      border: 1px solid rgba(255,255,255,0.16);
      border-radius: 22px;
      padding: 18px;
      min-height: 138px;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06)),
        rgba(255,255,255,0.05);
      color: rgba(255,255,255,0.92);
      cursor: pointer;
      text-align: left;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
      transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
    }

    .recording-size-option:hover {
      transform: translateY(-1px);
      border-color: rgba(255,255,255,0.34);
      background:
        linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.08)),
        rgba(255,255,255,0.07);
    }

    .recording-size-option.is-active {
      border-color: rgba(114,240,255,0.58);
      box-shadow:
        0 16px 34px rgba(114,240,255,0.12),
        inset 0 1px 0 rgba(255,255,255,0.16);
    }

    .recording-size-aspect {
      display: block;
      font-size: 30px;
      line-height: 1;
      font-weight: 700;
      letter-spacing: -0.04em;
      margin-bottom: 12px;
    }

    .recording-size-label {
      display: block;
      font-size: 13px;
      line-height: 1.35;
      color: rgba(255,255,255,0.74);
    }

    .recording-size-status {
      min-height: 1.5em;
    }

    .recording-clean-capture,
    .recording-clean-capture * {
      cursor: none !important;
    }

    .recording-clean-capture #burgerBtn,
    .recording-clean-capture #fullscreenToggle,
    .recording-clean-capture #mobilePauseToggle {
      opacity: 0 !important;
      pointer-events: none !important;
    }

    .recording-status-row {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .recording-status-chip.is-active {
      background: rgba(114,240,255,0.18);
      border-color: rgba(114,240,255,0.4);
      color: rgba(255,255,255,0.96);
      box-shadow: 0 12px 28px rgba(114,240,255,0.12);
    }

    .recording-progress {
      display: grid;
      gap: 8px;
    }

    .recording-progress.hidden {
      display: none;
    }

    .recording-progress-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: rgba(255,255,255,0.76);
      font-size: 12px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }

    .recording-progress-track,
    .recording-hud-progress {
      height: 8px;
      border-radius: 999px;
      overflow: hidden;
      background: rgba(255,255,255,0.14);
      border: 1px solid rgba(255,255,255,0.1);
    }

    .recording-progress-bar,
    .recording-hud-progress-bar {
      width: 0%;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, rgba(114,240,255,0.96), rgba(255,255,255,0.92));
      transition: width 180ms ease;
    }

    .recording-hud {
      position: fixed;
      left: 50%;
      bottom: 22px;
      transform: translateX(-50%);
      z-index: 120;
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 14px 18px;
      border-radius: 22px;
      border: 1px solid rgba(255,255,255,0.14);
      background: rgba(9,12,18,0.82);
      box-shadow: 0 20px 40px rgba(0,0,0,0.28);
      backdrop-filter: blur(10px);
      min-width: min(520px, calc(100vw - 28px));
      max-width: calc(100vw - 28px);
    }

    .recording-hud.hidden {
      display: none;
    }

    .recording-hud-copy {
      min-width: 0;
      flex: 1;
    }

    .recording-hud-title {
      font-size: 13px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.86);
      margin-bottom: 4px;
    }

    .recording-hud-subtle {
      color: rgba(255,255,255,0.72);
      font-size: 13px;
      line-height: 1.45;
    }

    .recording-hud-progress {
      margin-top: 9px;
      height: 6px;
    }

    .recording-hud-stop {
      flex-shrink: 0;
    }

    @media (max-width: 720px) {
      .recording-size-grid {
        grid-template-columns: 1fr;
      }
    }

    .edit-modal-card {
      position: relative;
      z-index: 1;
      width: min(940px, calc(100vw - 24px));
      max-width: calc(100vw - 24px);
      max-height: calc(100dvh - 24px - var(--safe-top) - var(--safe-bottom));
      overflow-y: auto;
      overflow-x: hidden;
      border-radius: 36px;
      background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08)), var(--edit-dialog-bg);
      color: var(--edit-text);
      border: 1px solid rgba(255,255,255,0.16);
      backdrop-filter: blur(24px) saturate(145%);
      -webkit-backdrop-filter: blur(24px) saturate(145%);
      box-shadow:
        0 30px 80px rgba(0,0,0,0.26),
        inset 0 1px 0 rgba(255,255,255,0.18);
      padding: 28px;
      transform: translateY(18px) scale(0.985);
      opacity: 0;
      transition: opacity 320ms ease, transform 450ms cubic-bezier(.2,.8,.2,1);
    }

    .modal-overlay.show .edit-modal-card {
      opacity: 1;
      transform: translateY(0px) scale(1);
    }

    .edit-modal-card h2 {
      color: var(--edit-title);
    }

    .edit-header .eyebrow {
      color: var(--edit-muted) !important;
    }

    .edit-hint,
    .counter,
    .muted-dark {
      color: var(--edit-muted);
    }

    .edit-body {
      margin-top: 18px;
      display: grid;
      gap: 18px;
    }

    .edit-section {
      border-radius: 28px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.06);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
      overflow: hidden;
    }

    .edit-section-header {
      padding: 16px 20px 0 20px;
    }

    .edit-section-title {
      font-size: 12px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--edit-muted);
    }

    .edit-advanced-header-row {
      padding: 18px 20px;
    }

    .edit-advanced-summary {
      display: block;
      margin-top: 7px;
      color: var(--edit-muted);
      font-size: 13px;
      letter-spacing: 0.01em;
      text-transform: none;
    }

    .edit-advanced-body {
      padding: 0 20px 20px 20px;
      display: grid;
      gap: 18px;
    }

    .edit-advanced-grid {
      padding-top: 2px;
    }

    .edit-advanced-toggle-row {
      padding: 14px 16px;
      border-radius: 22px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.08);
    }

    .edit-advanced-note {
      color: var(--edit-muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .editor {
      margin-top: 0;
      border-radius: 0;
      background: var(--edit-bg);
      border: 0;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
      padding: 0;
      overflow: hidden;
    }

    .editor textarea {
      width: 100%;
      min-height: 280px;
      max-height: 54vh;
      resize: none;
      overflow-y: auto;
      padding: 26px 28px 22px 28px;
      background: transparent;
      border: none;
      outline: none;
      color: var(--edit-text);
      font-size: 30px;
      line-height: 1.35;
      font-family: var(--font-ui);
    }

    .editor-footer {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      padding: 0 24px 20px 24px;
      align-items: center;
      flex-wrap: wrap;
    }

    .editor-actions {
      display: flex;
      align-items: center;
      gap: 12px;
      flex: 1 1 auto;
      justify-content: center;
      min-width: 220px;
    }

    .editor-line-btn {
      min-height: 44px;
      padding: 0 18px;
      border: 1px solid rgba(255,255,255,0.18);
      border-radius: 999px;
      background: rgba(255,255,255,0.12);
      color: var(--edit-text);
      font-family: var(--font-ui);
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.06em;
      cursor: pointer;
      touch-action: manipulation;
    }

    .editor-line-btn:hover {
      background: rgba(255,255,255,0.18);
    }

    .editor-shift-help {
      color: var(--edit-muted);
      font-size: 13px;
      opacity: 0;
      transform: translateY(4px);
      transition: opacity 220ms ease, transform 220ms ease;
      pointer-events: none;
      white-space: nowrap;
    }

    .editor-shift-help.show {
      opacity: 1;
      transform: translateY(0);
    }

    .counter {
      font-size: 13px;
      letter-spacing: 0.04em;
    }

    .edit-tag-row {
      display: block;
      padding: 18px;
    }

    .tag-panel {
      border-radius: 24px;
      background: rgba(0,0,0,0.9);
      border: 1px solid rgba(255,255,255,0.1);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
      padding: 18px;
    }

    .tag-input-wrap {
      width: 100%;
      display: grid;
      gap: 10px;
      text-align: left;
    }

    .tag-input-wrap label {
      font-size: 12px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.74);
    }

    .tag-combo {
      width: 100%;
      min-height: 56px;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      padding: 10px 12px;
      border-radius: 20px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.08);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
      text-align: left;
    }

    .tag-input-row {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      flex-wrap: nowrap;
    }

    .tag-select {
      width: 180px;
      min-width: 140px;
      max-width: 42%;
      min-height: 34px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 14px;
      background: rgba(255,255,255,0.08);
      color: #f3f7ff;
      padding: 0 12px;
      outline: none;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
      flex: 0 0 auto;
    }

    .tag-select:focus {
      border-color: rgba(114,240,255,0.52);
      box-shadow: 0 0 0 3px rgba(114,240,255,0.12);
    }

    .tag-combo:focus-within {
      border-color: rgba(114,240,255,0.52);
      box-shadow: 0 0 0 3px rgba(114,240,255,0.12);
    }

    .edit-tag-input {
      flex: 1 1 140px;
      min-width: 120px;
      min-height: 34px;
      border: none;
      background: transparent;
      color: #f3f7ff;
      padding: 0 6px;
      outline: none;
      text-align: left;
      box-shadow: none;
    }

    .edit-tag-input::placeholder {
      color: rgba(255,255,255,0.56);
    }

    .tag-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .edit-tag-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 34px;
      padding: 0 12px;
      border-radius: 999px;
      background: rgba(255,255,255,0.12);
      border: 1px solid rgba(255,255,255,0.14);
      color: #f3f7ff;
      font-size: 11px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .edit-tag-chip button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      padding: 0;
      border-radius: 999px;
      background: rgba(255,255,255,0.14);
      color: #f3f7ff;
      font-size: 12px;
      line-height: 1;
      cursor: pointer;
    }

    .edit-tag-chip button:hover {
      background: rgba(255,255,255,0.24);
    }

    .tag-chip {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      padding: 0 10px;
      border-radius: 999px;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.1);
      color: rgba(255,255,255,0.84);
      font-size: 11px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }


    .recent-tags-row {
      display: grid;
      gap: 8px;
      margin-top: 10px;
      justify-items: center;
    }

    .recent-tags-label {
      font-size: 11px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--edit-muted);
    }

    .recent-tags-list {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px;
    }

    .recent-tag-btn {
      min-height: 30px;
      padding: 0 10px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.08);
      color: #f3f7ff;
      font-size: 11px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
    }

    .recent-tag-btn:hover {
      background: rgba(255,255,255,0.16);
    }

    @media (max-width: 760px) {
      .tag-input-row {
        flex-wrap: wrap;
      }

      .tag-select {
        width: 100%;
        max-width: 100%;
      }
    }


    .reset-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }

    .confirm-card {
      width: min(460px, calc(100vw - 32px));
      padding: 26px;
      border-radius: 28px;
    }

    .confirm-actions {
      display: flex;
      justify-content: flex-end;
      gap: 12px;
      margin-top: 20px;
      flex-wrap: wrap;
    }

    .menu-popover {
      display: none;
      align-items: flex-start;
      justify-content: flex-start;
      padding-top: calc(78px + var(--safe-top));
      padding-left: calc(20px + var(--safe-left));
      pointer-events: none;
      z-index: 4;
    }

    .menu-popover.show {
      display: flex;
      pointer-events: none;
    }

    .menu-card {
      width: min(320px, calc(100vw - 40px));
      padding: 14px;
      border-radius: 24px;
      display: grid;
      gap: 8px;
      pointer-events: auto;
    }

    .menu-item {
      width: 100%;
      min-height: 52px;
      border-radius: 18px;
      border: 1px solid transparent;
      background: var(--ui-panel-bg);
      color: rgba(var(--ui-ink-rgb), 0.94);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 0 14px;
      transition: background 180ms ease, border-color 180ms ease;
    }

    .menu-item:hover {
      background: var(--ui-panel-hover-bg);
      border-color: var(--ui-stroke);
    }

    .menu-item small {
      color: var(--ui-ink-soft);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }

    .menu-item-link {
      text-decoration: none;
    }

    .toast-layer {
      z-index: 8;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      padding: 24px;
      pointer-events: none;
    }

    .toast {
      min-height: 52px;
      padding: 14px 18px;
      border-radius: 999px;
      color: rgba(255,255,255,0.96);
      opacity: 0;
      transform: translateY(14px) scale(0.98);
      transition: opacity 220ms ease, transform 260ms ease;
      pointer-events: none;
    }

    .toast.show {
      opacity: 1;
      transform: translateY(0px) scale(1);
    }

    html.documentation-page,
    body.documentation-page {
      min-height: 100%;
      height: auto;
      overflow-x: hidden;
      overflow-y: auto;
      background: radial-gradient(circle at top, rgba(30,40,70,0.24), transparent 50%), #04060b;
    }

    body.documentation-page {
      position: relative;
    }

    .documentation-app {
      position: relative;
      min-height: 100dvh;
      isolation: isolate;
      background: radial-gradient(circle at top, rgba(30,40,70,0.24), transparent 50%), #04060b;
    }

    .documentation-layer {
      position: relative;
      z-index: 2;
      width: min(1120px, calc(100vw - 28px));
      margin: 0 auto;
      padding: calc(88px + var(--safe-top)) calc(14px + var(--safe-right)) calc(28px + var(--safe-bottom)) calc(14px + var(--safe-left));
    }

    .documentation-hero {
      display: grid;
      gap: 18px;
      margin-bottom: 20px;
    }

    .documentation-hero-copy {
      max-width: 760px;
    }

    .documentation-kicker {
      font-size: 12px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.66);
      margin-bottom: 10px;
    }

    .documentation-title {
      margin: 0;
      font-size: clamp(34px, 5vw, 60px);
      line-height: 0.98;
      letter-spacing: -0.03em;
      font-family: var(--font-display);
      color: rgba(255,255,255,0.96);
    }

    .documentation-intro {
      margin: 14px 0 0;
      max-width: 780px;
      color: rgba(255,255,255,0.76);
      font-size: 17px;
      line-height: 1.65;
    }

    .documentation-grid {
      display: grid;
      gap: 18px;
      grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .documentation-card {
      grid-column: span 12;
      display: grid;
      gap: 14px;
    }

    .documentation-card--half {
      grid-column: span 6;
    }

    .documentation-card h2,
    .documentation-card h3 {
      margin: 0;
      color: rgba(255,255,255,0.96);
      font-size: 22px;
      line-height: 1.2;
    }

    .documentation-card p,
    .documentation-card li {
      color: rgba(255,255,255,0.78);
      line-height: 1.65;
    }

    .documentation-card ul,
    .documentation-card ol {
      margin: 0;
      padding-left: 20px;
      display: grid;
      gap: 10px;
    }

    .documentation-card code {
      padding: 2px 7px;
      border-radius: 999px;
      background: rgba(255,255,255,0.08);
      color: rgba(255,255,255,0.96);
      font-size: 0.95em;
    }

    .documentation-back-link {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
    }

    .documentation-callout {
      padding: 16px 18px;
      border-radius: 20px;
      border: 1px solid rgba(114,240,255,0.16);
      background: rgba(114,240,255,0.08);
      color: rgba(255,255,255,0.82);
    }

    @media (max-width: 860px) {
      .documentation-card--half {
        grid-column: span 12;
      }

      .documentation-layer {
        width: calc(100vw - 18px);
        padding-top: calc(82px + var(--safe-top));
      }
    }



    .topbar-unlock-btn {
      min-height: 48px;
      padding: 0 16px;
      font-size: 14px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .license-card {
      width: min(520px, calc(100vw - 32px));
      padding: 28px;
      border-radius: 30px;
    }

    .license-card .subtle {
      max-width: none;
    }

    #activateLicenseBtn {
      color: #271033;
      text-shadow: none;
    }

    .license-input-row {
      display: grid;
      gap: 12px;
      margin-top: 20px;
    }

    .shape-editor-card {
      width: min(1080px, calc(100vw - 32px));
      max-height: min(88vh, 940px);
      overflow: auto;
      padding: 28px;
      border-radius: 30px;
    }

    .shape-editor-layout {
      display: grid;
      grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
      gap: 18px;
      margin-top: 18px;
      min-width: 0;
    }

    .shape-editor-main,
    .shape-editor-sidebar {
      min-width: 0;
      display: grid;
      gap: 14px;
    }

    .shape-editor-canvas-wrap {
      border-radius: 26px;
      border: 1px solid var(--ui-stroke);
      background:
        linear-gradient(180deg, rgba(var(--ui-ink-rgb), 0.06), rgba(var(--ui-ink-rgb), 0.02)),
        rgba(255,255,255,0.03);
      padding: 16px;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    #shapeEditorCanvas {
      width: min(100%, 420px);
      aspect-ratio: 1 / 1;
      border-radius: 22px;
      border: 1px solid rgba(var(--ui-ink-rgb), 0.16);
      background: #000;
      touch-action: none;
      box-shadow: inset 0 1px 0 rgba(var(--ui-ink-rgb), 0.08);
    }

    .shape-editor-mode-toolbar {
      margin-top: 4px;
    }

    .shape-editor-shape-list {
      display: grid;
      gap: 10px;
      max-height: 420px;
      overflow: auto;
      padding-right: 4px;
    }

    .shape-editor-shape-item {
      display: grid;
      gap: 10px;
      padding: 12px 14px;
      border-radius: 18px;
      border: 1px solid rgba(var(--ui-ink-rgb), 0.10);
      background: rgba(var(--ui-ink-rgb), 0.05);
    }

    .shape-editor-shape-item.is-active {
      border-color: rgba(var(--ui-ink-rgb), 0.22);
      background: rgba(var(--ui-ink-rgb), 0.09);
    }

    .shape-editor-shape-name {
      font-size: 14px;
      color: rgba(var(--ui-ink-rgb), 0.94);
      word-break: break-word;
    }

    .shape-editor-shape-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .shape-editor-shape-actions .danger-btn {
      border-radius: 999px;
      min-height: 50px;
      padding: 0 18px;
      border: 1px solid rgba(255, 116, 144, 0.56);
    }

    @media (max-width: 860px) {
      .shape-editor-layout {
        grid-template-columns: 1fr;
      }

      .shape-editor-shape-list {
        max-height: 260px;
      }
    }

    .license-help {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-top: 18px;
    }

    .license-status {
      min-height: 20px;
      font-size: 13px;
      color: rgba(255,255,255,0.72);
    }

    .license-status.error {
      color: #ffd0d7;
    }

    .license-status.success {
      color: #caffdc;
    }

    .locked-badge {
      position: absolute;
      right: calc(20px + var(--safe-right));
      bottom: calc(20px + var(--safe-bottom));
      z-index: 4;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      min-height: 42px;
      padding: 0 14px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.14);
      background: rgba(255,255,255,0.08);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      box-shadow: 0 10px 25px rgba(0,0,0,0.16);
      color: rgba(255,255,255,0.92);
      font-size: 12px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .locked-badge.hidden {
      display: none !important;
    }

    .hidden { display: none !important; }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }


    #editOverlay .primary-btn,
    #editOverlay .secondary-btn,
    #editOverlay .icon-btn {
      background: var(--edit-button-bg) !important;
      color: var(--edit-button-text) !important;
      border-color: rgba(255,255,255,0.12) !important;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 24px rgba(0,0,0,0.18);
    }

    #editOverlay .edit-section {
      background: rgba(255,255,255,0.18);
      border-color: rgba(255,255,255,0.18);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
    }

    #editOverlay .tag-panel {
      background: rgba(0,0,0,0.95);
    }

    #editOverlay .tag-combo,
    #editOverlay .tag-select,
    #editOverlay .edit-tag-chip,
    #editOverlay .recent-tag-btn {
      background: rgba(255,255,255,0.22);
      border-color: rgba(255,255,255,0.18);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
    }

    #editOverlay .edit-tag-chip button {
      background: rgba(255,255,255,0.22);
    }

    .about-body .subtle {
      font-size: 30px;
      line-height: 1.5;
      max-width: none;
    }

    
    .stats-card {
      pointer-events: auto;
    }

    .stats-filter-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 34px;
      padding: 0 12px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.08);
      color: rgba(255,255,255,0.96);
      font: inherit;
      letter-spacing: 0;
      text-transform: none;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    }

    .stats-filter-btn:hover {
      background: rgba(255,255,255,0.14);
      border-color: rgba(255,255,255,0.2);
    }

    .stats-filter-btn strong {
      font-size: 18px;
      color: rgba(255,255,255,0.96);
      font-weight: 600;
    }

    .stats-filter-popover {
      position: fixed;
      left: calc(20px + var(--safe-left));
      top: calc(86px + var(--safe-top));
      bottom: auto;
      z-index: 4;
      width: min(1120px, calc(100vw - 40px));
      max-height: calc(100dvh - 120px - var(--safe-top) - var(--safe-bottom));
      display: none;
      padding: 12px;
      border-radius: 24px;
      border: 1px solid rgba(255,255,255,0.14);
      background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08));
      backdrop-filter: blur(22px) saturate(145%);
      -webkit-backdrop-filter: blur(22px) saturate(145%);
      box-shadow:
        0 20px 50px rgba(0,0,0,0.26),
        inset 0 1px 0 rgba(255,255,255,0.12);
      overflow-y: auto;
    }

    .stats-filter-popover.show {
      display: grid;
      gap: 8px;
    }

    .stats-filter-head {
      font-size: 11px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.62);
      padding: 4px 6px 8px 6px;
    }

    .stats-filter-option {
      width: 100%;
      min-height: 42px;
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 0 14px;
      background: rgba(255,255,255,0.04);
      color: rgba(255,255,255,0.94);
      border: 1px solid transparent;
      text-align: left;
    }

    .stats-filter-option:hover {
      background: rgba(255,255,255,0.1);
      border-color: rgba(255,255,255,0.08);
    }

    .stats-filter-option.active {
      background: rgba(114,240,255,0.14);
      border-color: rgba(114,240,255,0.24);
    }

    .stats-filter-option small {
      color: rgba(255,255,255,0.56);
      font-size: 11px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .stats-filter-legend {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      padding: 0 6px 6px 6px;
    }

    .stats-filter-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      padding-top: 6px;
    }

    .helper-hints {
      position: absolute;
      left: 50%;
      top: calc(72px + var(--safe-top));
      bottom: calc(28px + var(--safe-bottom));
      z-index: 3;
      width: min(1080px, calc(100vw - 40px - var(--safe-left) - var(--safe-right)));
      max-height: calc(100dvh - 100px - var(--safe-top) - var(--safe-bottom));
      opacity: 0;
      transform: translate(-50%, 7px);
      transition: opacity 240ms ease, transform 240ms ease;
      pointer-events: none;
      display: flex;
      align-items: flex-end;
      overflow: hidden;
    }

    .helper-hints.show {
      opacity: 1;
      transform: translate(-50%, 0px);
    }

    .helper-hints-card {
      width: 100%;
      max-height: 100%;
      border-radius: 30px;
      border: 1px solid var(--ui-stroke);
      background:
        linear-gradient(180deg, rgba(var(--ui-ink-rgb), 0.10), rgba(var(--ui-ink-rgb), 0.04)),
        var(--ui-panel-bg);
      backdrop-filter: blur(22px) saturate(140%);
      -webkit-backdrop-filter: blur(22px) saturate(140%);
      box-shadow:
        0 28px 80px var(--ui-shadow),
        inset 0 1px 0 rgba(var(--ui-ink-rgb), 0.12);
      padding: 22px 24px 20px;
      pointer-events: auto;
      overflow: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
    }

    .helper-hints-header {
      display: grid;
      gap: 6px;
      margin-bottom: 18px;
    }

    .helper-hints-kicker {
      font-size: 12px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: rgba(var(--ui-ink-rgb), 0.58);
    }

    .helper-hints-title {
      font-size: clamp(26px, 4vw, 42px);
      line-height: 0.98;
      letter-spacing: -0.04em;
      font-weight: 700;
      color: rgba(var(--ui-ink-rgb), 0.96);
    }

    .helper-hints-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 18px;
      align-items: start;
    }

    .helper-hints-section {
      min-width: 0;
      border-radius: 24px;
      border: 1px solid rgba(var(--ui-ink-rgb), 0.10);
      background: rgba(var(--ui-ink-rgb), 0.04);
      padding: 16px 18px;
    }

    .helper-hints-section-mobile {
      grid-column: 1 / -1;
    }

    .helper-hints-section-title {
      margin-bottom: 12px;
      font-size: 12px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: rgba(var(--ui-ink-rgb), 0.62);
    }

    .helper-hints-table {
      display: grid;
      grid-template-columns: minmax(0, 1.35fr) minmax(86px, 0.7fr) minmax(86px, 0.7fr);
      gap: 10px;
      align-items: center;
      padding: 8px 0;
      border-top: 1px solid rgba(var(--ui-ink-rgb), 0.08);
    }

    .helper-hints-table-header {
      padding-top: 0;
      border-top: 0;
      font-size: 11px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: rgba(var(--ui-ink-rgb), 0.46);
    }

    .helper-hints-action {
      color: rgba(var(--ui-ink-rgb), 0.9);
      font-size: 14px;
      line-height: 1.3;
    }

    .helper-hints-key,
    .helper-hints-mobile-result {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 34px;
      padding: 0 12px;
      border-radius: 999px;
      border: 1px solid rgba(var(--ui-ink-rgb), 0.12);
      background: rgba(var(--ui-ink-rgb), 0.08);
      color: rgba(var(--ui-ink-rgb), 0.92);
      font-size: 12px;
      letter-spacing: 0.04em;
      text-align: center;
      white-space: nowrap;
    }

    .helper-hints-mobile-row {
      display: grid;
      grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.9fr);
      gap: 12px;
      align-items: center;
      padding: 8px 0;
      border-top: 1px solid rgba(var(--ui-ink-rgb), 0.08);
    }

    .helper-hints-mobile-row:first-of-type {
      border-top: 0;
      padding-top: 0;
    }


    .fullscreen-toggle {
      position: fixed !important;
      top: auto !important;
      left: auto !important;
      right: calc(10px + var(--safe-right)) !important;
      bottom: calc(10px + var(--safe-bottom)) !important;
      z-index: 3;
      min-width: 52px;
      min-height: 52px;
      padding: 0 16px;
      opacity: 1;
      transform: translateY(0);
      transition: opacity 240ms ease, transform 240ms ease, background 180ms ease, border-color 180ms ease;
    }

    .fullscreen-toggle.hidden {
      display: none !important;
    }

    .fullscreen-icon {
      font-size: 20px;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .mobile-pause-toggle {
      position: fixed !important;
      top: auto !important;
      left: auto !important;
      right: 10px !important;
      bottom: 10px !important;
      z-index: 20;
      min-width: 52px;
      min-height: 52px;
      padding: 0 16px;
      opacity: 1;
      transform: translateY(0);
      transition: opacity 240ms ease, transform 240ms ease, background 180ms ease, border-color 180ms ease;
    }

    .mobile-pause-toggle.hidden {
      display: none !important;
    }

    .mobile-pause-icon {
      font-size: 20px;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .settings-grid,
    .settings-sections,
    .preview-column,
    .section-card,
    .preview-card,
    .panel-body {
      min-width: 0;
    }

    .settings-grid,
    .panel-body {
      overflow-x: hidden;
    }

    @media (max-width: 980px) {
      .settings-grid {
        grid-template-columns: 1fr;
      }

      .entry-shell {
        width: min(92vw, 900px);
      }

      .entry-text {
        font-size: 40px;
      }
    }

    @media (hover: none), (pointer: coarse), (max-width: 760px) {
      .stats-filter-popover {
        left: calc(10px + var(--safe-left));
        right: calc(10px + var(--safe-right));
        bottom: auto;
        top: calc(78px + var(--safe-top));
        width: auto;
        max-width: none;
        max-height: calc(100dvh - 92px - var(--safe-top) - var(--safe-bottom));
        padding: 14px;
        overflow-y: auto;
      }

      .stats-filter-options {
        gap: 8px;
      }
    }

    @media (max-width: 760px) {
      .display-stage,
      .entry-shell,
      .entry-text {
        touch-action: none;
      }

      .display-stage {
        padding: 14vh 6vw;
      }

      .pinned-entry {
        top: calc(12px + var(--safe-top));
        padding: 0 calc(12px + var(--safe-left)) 0 calc(12px + var(--safe-right));
      }

      .pinned-entry-card {
        width: min(92vw, 560px);
        padding: 12px 14px 14px;
        border-radius: 20px;
      }

      .pinned-entry-card::before {
        inset: 6px;
        border-radius: 15px;
      }

      .entry-text {
        font-size: 32px;
        line-height: 1.32;
      }

      .entry-meta {
        margin-top: 16px;
        font-size: 11px;
      }

      .echo-counter {
        margin-top: 14px;
        gap: 10px;
        min-height: 48px;
        padding: 8px 10px;
      }

      .echo-counter-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 17px;
      }

      .echo-counter-value {
        min-width: 62px;
        font-size: 18px;
        padding: 0 10px;
      }

      .card,
      .panel,
      .edit-modal-card {
        border-radius: 26px;
      }

      .panel {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
        height: auto;
        min-height: min(88dvh, 900px);
        max-height: calc(100dvh - 12px - var(--safe-top) - var(--safe-bottom));
        padding: 16px;
      }

      .panel-header,
      .edit-header,
      .card-header {
        gap: 12px;
      }

      .grid-2 {
        grid-template-columns: 1fr;
      }

      .toggle-row,
      .slider-row,
      .inline-row {
        flex-direction: column;
        align-items: stretch;
      }

      .slider-row > :last-child,
      .inline-row > :last-child {
        width: 100% !important;
        max-width: 100% !important;
      }

      .toggle-row {
        flex-direction: row;
        align-items: center;
      }

      .toggle-row .switch {
        width: 58px !important;
        min-width: 58px !important;
        max-width: 58px !important;
      }

      .settings-grid {
        grid-template-columns: 1fr;
        gap: 12px;
      }

      .section-card,
      .preview-card,
      .entry-card {
        padding: 14px;
      }

      .settings-group-toggle {
        padding: 16px;
      }

      .settings-group-body {
        padding: 0 12px 12px 12px;
      }

      .settings-toolbar {
        align-items: stretch;
      }

      .settings-toolbar .toolbar,
      .settings-toolbar .toolbar button {
        width: 100%;
      }

      .editor textarea {
        min-height: 180px;
        max-height: none;
        font-size: 24px;
        padding: 22px 20px 18px 20px;
      }

      .editor-footer {
        align-items: flex-start;
      }

      .editor-actions {
        order: 3;
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
      }

      .onboarding-card {
        padding: 24px;
        border-radius: 28px;
      }

      .onboarding-actions {
        justify-content: stretch;
      }

      .onboarding-actions button {
        flex: 1 1 150px;
      }

      .edit-modal-card {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
        max-height: calc(100dvh - 12px - var(--safe-top) - var(--safe-bottom));
        padding: 16px;
        margin: 0 auto;
      }

      .edit-body {
        gap: 12px;
      }

      .edit-actions {
        position: sticky;
        bottom: 0;
        background: linear-gradient(180deg, rgba(12,16,24,0), rgba(12,16,24,0.45) 22%, rgba(12,16,24,0.78));
        padding-top: 10px;
        padding-bottom: calc(4px + var(--safe-bottom));
        z-index: 2;
      }

      .edit-actions,
      .edit-actions .toolbar {
        flex-direction: column;
        align-items: stretch;
      }

      .edit-actions .toolbar,
      .edit-actions .toolbar button {
        width: 100%;
      }

      #deleteEntryBtn.hidden {
        display: none !important;
      }

      .stats,
      .helper-hints {
        max-width: 90vw;
      }

      .helper-hints {
        top: calc(64px + var(--safe-top));
        bottom: calc(18px + var(--safe-bottom));
        width: min(960px, calc(100vw - 24px - var(--safe-left) - var(--safe-right)));
        max-height: calc(100dvh - 86px - var(--safe-top) - var(--safe-bottom));
      }

      .fullscreen-toggle {
        right: calc(10px + var(--safe-right)) !important;
        bottom: calc(10px + var(--safe-bottom)) !important;
      }
    }

    @media (max-width: 900px) {
      .helper-hints-grid {
        grid-template-columns: 1fr;
      }

      .helper-hints-section-mobile {
        grid-column: auto;
      }
    }

    @media (max-width: 640px) {
      .helper-hints {
        width: calc(100vw - 16px - var(--safe-left) - var(--safe-right));
        top: calc(56px + var(--safe-top));
        bottom: calc(10px + var(--safe-bottom));
        max-height: calc(100dvh - 66px - var(--safe-top) - var(--safe-bottom));
      }

      .helper-hints-card {
        padding: 18px 16px 16px;
        border-radius: 24px;
      }

      .helper-hints-table {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
      }

      .helper-hints-table-header {
        display: none;
      }

      .helper-hints-key {
        justify-content: flex-start;
      }

      .helper-hints-mobile-row {
        grid-template-columns: minmax(0, 1fr);
      }

      .helper-hints-mobile-result {
        justify-content: flex-start;
        white-space: normal;
      }
    }

    .debug-touch-target {
      position: relative;
    }

    .debug-touch-mode .debug-touch-target {
      outline: 2px dashed rgba(255, 187, 92, 0.95);
      outline-offset: 4px;
    }

    .debug-touch-mode .debug-touch-target[data-debug-tone="shell"] {
      outline-color: rgba(255, 187, 92, 0.98);
    }

    .debug-touch-mode .debug-touch-target[data-debug-tone="text"] {
      outline-color: rgba(130, 235, 255, 0.98);
      box-shadow: inset 0 0 0 2px rgba(130, 235, 255, 0.28);
    }

    .debug-touch-mode .debug-touch-target[data-debug-tone="link"] {
      outline-color: rgba(153, 255, 170, 0.98);
      box-shadow: inset 0 0 0 2px rgba(153, 255, 170, 0.28);
    }

    .debug-touch-mode .debug-touch-target[data-debug-tone="hotspot"] {
      outline-color: rgba(114, 240, 255, 0.98);
    }

    .debug-touch-mode .debug-touch-target[data-debug-tone="counter"] {
      outline-color: rgba(255, 216, 107, 0.98);
    }

    .debug-touch-mode .debug-touch-target[data-debug-tone="positive"] {
      outline-color: rgba(98, 232, 151, 0.98);
    }

    .debug-touch-mode .debug-touch-target[data-debug-tone="negative"] {
      outline-color: rgba(255, 116, 116, 0.98);
    }

    .debug-touch-mode .debug-touch-target[data-debug-tone="menu"] {
      outline-color: rgba(187, 144, 255, 0.98);
    }

    .debug-touch-mode .debug-touch-target[data-debug-tone="system"] {
      outline-color: rgba(255, 158, 224, 0.98);
    }

    .debug-touch-mode .touch-hitbox {
      opacity: 1;
      background: rgba(114, 240, 255, 0.08);
      box-shadow: inset 0 0 0 2px rgba(114, 240, 255, 0.9);
    }

    .touch-stability-mode .entry-text,
    .touch-stability-mode .echo-counter,
    .touch-stability-mode .echo-counter-btn {
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
      backface-visibility: hidden;
      -webkit-backface-visibility: hidden;
    }

    .debug-touch-mode .debug-touch-target::after {
      content: attr(data-debug-label);
      position: absolute;
      top: -12px;
      left: 8px;
      padding: 2px 8px;
      border-radius: 999px;
      background: rgba(255, 187, 92, 0.95);
      color: rgba(15, 18, 24, 0.92);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      white-space: nowrap;
      pointer-events: none;
      z-index: 9999;
    }

    .debug-touch-legend {
      position: fixed;
      right: calc(16px + var(--safe-right));
      bottom: calc(16px + var(--safe-bottom));
      z-index: 10001;
      min-width: 220px;
      padding: 12px 14px;
      border-radius: 16px;
      border: 1px solid rgba(255,255,255,0.18);
      background: rgba(10, 14, 22, 0.82);
      box-shadow: 0 18px 40px rgba(0,0,0,0.32);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      color: rgba(255,255,255,0.95);
      font-size: 12px;
      pointer-events: auto;
    }

    .debug-touch-legend-title {
      margin-bottom: 8px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.88);
    }

    .debug-touch-legend-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 5px;
      cursor: pointer;
      pointer-events: auto;
    }

    .debug-touch-toggle {
      margin: 0;
      accent-color: rgba(114, 240, 255, 0.95);
      flex: 0 0 auto;
    }

    .debug-touch-swatch {
      width: 12px;
      height: 12px;
      border-radius: 999px;
      border: 2px solid rgba(255,255,255,0.4);
      flex: 0 0 auto;
    }

    .debug-touch-swatch[data-tone="shell"] { background: rgba(255, 187, 92, 0.95); }
    .debug-touch-swatch[data-tone="text"] { background: rgba(130, 235, 255, 0.95); }
    .debug-touch-swatch[data-tone="link"] { background: rgba(153, 255, 170, 0.95); }
    .debug-touch-swatch[data-tone="hotspot"] { background: rgba(114, 240, 255, 0.95); }
    .debug-touch-swatch[data-tone="counter"] { background: rgba(255, 216, 107, 0.95); }
    .debug-touch-swatch[data-tone="positive"] { background: rgba(98, 232, 151, 0.95); }
    .debug-touch-swatch[data-tone="negative"] { background: rgba(255, 116, 116, 0.95); }
    .debug-touch-swatch[data-tone="menu"] { background: rgba(187, 144, 255, 0.95); }
    .debug-touch-swatch[data-tone="system"] { background: rgba(255, 158, 224, 0.95); }

    .debug-touch-mode.debug-hide-shell .debug-touch-target[data-debug-tone="shell"],
    .debug-touch-mode.debug-hide-text .debug-touch-target[data-debug-tone="text"],
    .debug-touch-mode.debug-hide-link .debug-touch-target[data-debug-tone="link"],
    .debug-touch-mode.debug-hide-hotspot .debug-touch-target[data-debug-tone="hotspot"],
    .debug-touch-mode.debug-hide-counter .debug-touch-target[data-debug-tone="counter"],
    .debug-touch-mode.debug-hide-positive .debug-touch-target[data-debug-tone="positive"],
    .debug-touch-mode.debug-hide-negative .debug-touch-target[data-debug-tone="negative"],
    .debug-touch-mode.debug-hide-menu .debug-touch-target[data-debug-tone="menu"],
    .debug-touch-mode.debug-hide-system .debug-touch-target[data-debug-tone="system"] {
      outline-color: transparent;
    }

    .debug-touch-mode.debug-hide-shell .debug-touch-target[data-debug-tone="shell"]::after,
    .debug-touch-mode.debug-hide-text .debug-touch-target[data-debug-tone="text"]::after,
    .debug-touch-mode.debug-hide-link .debug-touch-target[data-debug-tone="link"]::after,
    .debug-touch-mode.debug-hide-hotspot .debug-touch-target[data-debug-tone="hotspot"]::after,
    .debug-touch-mode.debug-hide-counter .debug-touch-target[data-debug-tone="counter"]::after,
    .debug-touch-mode.debug-hide-positive .debug-touch-target[data-debug-tone="positive"]::after,
    .debug-touch-mode.debug-hide-negative .debug-touch-target[data-debug-tone="negative"]::after,
    .debug-touch-mode.debug-hide-menu .debug-touch-target[data-debug-tone="menu"]::after,
    .debug-touch-mode.debug-hide-system .debug-touch-target[data-debug-tone="system"]::after {
      display: none;
    }

    .debug-touch-mode.debug-hide-hotspot .touch-hitbox {
      opacity: 0;
      background: transparent;
      box-shadow: none;
    }

    .debug-touch-point {
      position: fixed;
      width: 30px;
      height: 30px;
      margin-left: -15px;
      margin-top: -15px;
      border-radius: 999px;
      border: 2px solid rgba(114, 240, 255, 0.98);
      background: rgba(114, 240, 255, 0.22);
      color: rgba(255,255,255,0.96);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 7px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      pointer-events: none;
      z-index: 10000;
      box-shadow: 0 0 0 6px rgba(114, 240, 255, 0.12);
      animation: debugTouchPointFade 900ms ease forwards;
    }

    @keyframes debugTouchPointFade {
      0% { opacity: 1; transform: scale(0.9); }
      100% { opacity: 0; transform: scale(1.35); }
    }
