:root {
  --bg: #000000;
  --card: #111317;
  --ink: #f1f2f5;
  --soft: rgba(241, 242, 245, 0.54);
  --line: rgba(241, 242, 245, 0.09);
  --accent: #5eead4;
  --stop: #ff6b6b;
  --mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

.rl { --tone: var(--accent); position: relative; width: min(304px, 100%); padding: 16px 16px 14px; border-radius: 26px; background: linear-gradient(180deg, #171a20, var(--card)); box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 30px 50px -30px color-mix(in srgb, var(--tone) 40%, transparent); }
.rl.is-out { --tone: var(--stop); }
.rl__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rl__head h2 { font-size: 15px; line-height: 20px; font-weight: 730; font-stretch: 102%; letter-spacing: -0.01em; }
.rl__head p { font-size: 12px; line-height: 16px; font-weight: 540; color: var(--soft); white-space: nowrap; }
.rl__status { flex: none; height: 24px; padding: 0 9px; border-radius: 12px; background: color-mix(in srgb, var(--tone) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 34%, transparent); color: var(--tone); font-family: var(--mono); font-size: 11.500px; line-height: 24px; font-weight: 640; white-space: nowrap; overflow: hidden; transition: background-color 0.3s, color 0.3s, box-shadow 0.3s; }
.rl__status b { display: block; font-weight: inherit; }

.rl__big { display: flex; align-items: baseline; gap: 7px; margin-top: 12px; height: 40px; }
.rl__big b { font-size: 38px; line-height: 40px; font-weight: 760; font-stretch: 94%; letter-spacing: -0.03em; }
.rl__big span { font-size: 13px; font-weight: 580; color: var(--soft); }

.rl__meter { display: flex; gap: 3px; height: 30px; margin-top: 10px; }
.rl__seg { position: relative; flex: 1 1 0; border-radius: 3.500px; background: rgba(241, 242, 245, 0.07); overflow: hidden; }
.rl__seg i { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: 3.500px; background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 80%, #ffffff), var(--tone)); opacity: 0; transform-origin: 50% 100%; }
.rl.is-out .rl__seg { background: color-mix(in srgb, var(--stop) 16%, transparent); }

.rl__send { position: relative; display: block; width: 100%; height: 44px; margin-top: 14px; border: 0; border-radius: 15px; background: var(--ink); color: #0c0d10; font: inherit; font-size: 14px; font-weight: 720; cursor: pointer; outline: none; overflow: hidden; -webkit-tap-highlight-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.rl__send:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.rl__send span { display: inline-block; }
.rl__send.is-wait { background: rgba(241, 242, 245, 0.07); color: var(--soft); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.rl__say { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #ffffff; stroke: #101216; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); z-index: 5; }
