    :root {
      --bg: #fdf6f5;
      --bg-panel: rgba(253, 246, 245, 0.70);
      --bg-raised: rgba(255, 255, 255, 0.5);
      --fg: #2c2424;
      --fg-dim: #7a6a6a;
      --amber: #dc143c;
      --amber-dim: #b01030;
      --muted: #9e8a8a;
      --danger: #ff4d4d;
      --ok: #d05a7e;
      --border: rgba(220, 20, 60, 0.2);
      --glow: rgba(220, 20, 60, 0.3);
      --radius: 8px;
      --font-mono: 'JetBrains Mono', 'Courier New', monospace;
      --font-pixel: 'VT323', monospace;
    }

    /* Yozakura — "night sakura." Toggled with the `theme` command. */
    body.yozakura {
      --bg: #0d0712;
      --bg-panel: rgba(20, 11, 26, 0.6);
      --bg-raised: rgba(255, 255, 255, 0.06);
      --fg: #f3e6ee;
      --fg-dim: #b79ac0;
      --amber: #ff5da2;
      --amber-dim: #c23c78;
      --muted: #7c6480;
      --danger: #ff7a8a;
      --ok: #ffb0d4;
      --border: rgba(255, 93, 162, 0.32);
      --glow: rgba(255, 93, 162, 0.6);
    }

    body,
    .terminal,
    .title-bar,
    .night-overlay {
      transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      margin: 0;
      padding: 0;
      height: 100%;
      background: var(--bg);
      color: var(--fg);
      font-family: var(--font-mono);
      overflow: hidden;
    }

    ::selection {
      background: var(--amber);
      color: #fff;
    }

    ::-moz-selection {
      background: var(--amber);
      color: #fff;
    }

    /* ---------- Sakura Glass Shell ---------- */
    .crt-wrap {
      position: relative;
      width: 100%;
      height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 28px;
      background: url('sakura_bg_v2.png') center/cover no-repeat;
      overflow: hidden;
    }

    /* Night tint over the background image — fades in for yozakura mode.
       Sits above the raw background, below the petals and terminal.
       Includes a soft radial highlight where the moon sits, so the
       lighting feels like it's actually coming from it. */
    .night-overlay {
      position: absolute;
      inset: 0;
      z-index: 0;
      background:
        radial-gradient(circle at 82% 14%, rgba(255, 214, 238, 0.14), transparent 38%),
        linear-gradient(180deg, rgba(5, 2, 12, 0.4), rgba(15, 6, 24, 0.5)),
        url('yozakura_bg.png') center/cover no-repeat;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.6s ease;
    }

    body.yozakura .night-overlay {
      opacity: 1;
    }

    .moon {
      position: absolute;
      top: 9%;
      right: 10%;
      width: 84px;
      height: 84px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 32%, #fff8f2 0%, #ffd9ee 55%, #d6a3e0 100%);
      box-shadow:
        0 0 50px 14px rgba(255, 214, 238, 0.28),
        0 0 110px 36px rgba(214, 163, 224, 0.14);
      opacity: 0;
      pointer-events: none;
      z-index: 0;
      transition: opacity 1s ease;
    }

    body.yozakura .moon {
      opacity: 1;
    }

    @media (max-width: 640px) {
      .moon {
        width: 52px;
        height: 52px;
        top: 5%;
        right: 8%;
      }
    }

    /* Falling petal canvas — sits behind the glass panel so the panel's
       backdrop-filter blur picks it up as soft drifting color too. */
    .petals-canvas {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      z-index: 1;
      pointer-events: none;
    }

    .terminal {
      position: relative;
      z-index: 2;
      width: min(880px, 100%);
      height: min(640px, 88vh);
      background: var(--bg-panel);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      animation: fade-in 0.8s ease-out;
    }

    body.yozakura .terminal {
      box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.55),
        0 0 60px -10px rgba(255, 93, 162, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    @keyframes fade-in {
      0% {
        opacity: 0;
        transform: translateY(10px);
      }

      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .title-bar {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 10px 14px;
      background: var(--bg-raised);
      border-bottom: 1px solid var(--border);
      font-size: 12px;
      letter-spacing: 0.03em;
      color: var(--fg-dim);
    }

    .title-bar .tag {
      color: var(--amber);
    }

    .screen {
      position: relative;
      flex: 1 1 auto;
      padding: 18px 20px 12px;
      overflow-y: auto;
      font-size: 14.5px;
      line-height: 1.55;
      cursor: text;
    }

    .screen::-webkit-scrollbar {
      width: 8px;
    }

    .screen::-webkit-scrollbar-thumb {
      background: var(--border);
      border-radius: 4px;
    }

    .screen::-webkit-scrollbar-track {
      background: transparent;
    }

    .line {
      white-space: pre-wrap;
      word-break: break-word;
    }

    .fg {
      color: var(--fg);
    }

    .dim {
      color: var(--fg-dim);
    }

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

    .amber {
      color: var(--amber);
    }

    .ok {
      color: var(--ok);
    }

    .danger {
      color: var(--danger);
    }

    .bold {
      font-weight: 700;
    }

    a {
      color: var(--amber);
      text-decoration: underline;
      text-decoration-color: var(--amber-dim);
      text-underline-offset: 3px;
    }

    a:hover {
      color: #ffb7c5;
    }

    .banner {
      font-family: var(--font-pixel);
      font-size: 20px;
      line-height: 1.05;
      color: var(--amber);
      text-shadow: 0 0 10px var(--glow);
      white-space: pre;
      margin: 2px 0 10px;
      overflow-x: auto;
    }

    .prompt-row {
      display: flex;
      align-items: baseline;
      flex-wrap: nowrap;
      gap: 0;
      margin-top: 2px;
      min-height: 24px;
    }

    .prompt {
      color: var(--amber);
      flex: 0 0 auto;
      white-space: nowrap;
      margin-right: 8px;
    }

    .prompt .path {
      color: var(--amber);
    }

    .input-area {
      flex: 1 1 auto;
      min-width: 0;
      position: relative;
      white-space: pre-wrap;
      word-break: break-word;
    }

    .input-mirror {
      color: var(--fg);
      font-family: var(--font-mono);
      font-size: 14.5px;
    }

    .input-mirror.hinting {
      opacity: 0.4;
    }

    .hidden-input {
      position: absolute;
      opacity: 0;
      width: 0;
      height: 0;
      padding: 0;
      border: none;
      pointer-events: none;
    }

    .cursor {
      display: inline-block;
      width: 8px;
      height: 1.1em;
      background: var(--amber);
      margin-left: 1px;
      animation: blink 1s step-end infinite;
      vertical-align: text-bottom;
    }

    body.yozakura .cursor {
      box-shadow: 0 0 10px var(--amber);
    }

    body.yozakura a {
      text-shadow: 0 0 6px var(--glow);
    }

    @keyframes blink {

      0%,
      49% {
        opacity: 1
      }

      50%,
      100% {
        opacity: 0
      }
    }

    .anchor {
      float: left;
      clear: both;
    }

    .hint {
      position: fixed;
      bottom: 12px;
      left: 0;
      right: 0;
      text-align: center;
      font-size: 11.5px;
      color: var(--muted);
      letter-spacing: 0.04em;
      z-index: 2;
    }

    .hint b {
      color: var(--fg-dim);
    }

    @media (max-width: 640px) {
      .crt-wrap {
        padding: 10px;
      }

      .terminal {
        height: 92vh;
        height: 92dvh;
      }

      .banner {
        font-size: 14px;
      }

      .screen {
        font-size: 13px;
        padding: 14px 12px 10px;
      }

      .screen::-webkit-scrollbar {
        width: 4px;
      }

      .prompt-row {
        min-height: 44px;
        align-items: center;
      }

      .hint {
        display: none;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .terminal {
        animation: none;
      }

      .cursor {
        animation: none;
        opacity: 1;
      }
    }
