:root {
  --bg: #0a0b0e;
  --card: #13151b;
  --ink: #eceae4;
  --soft: rgba(236, 234, 228, 0.52);
  --line: rgba(236, 234, 228, 0.09);
  --accent: #f0a23a;
  --gut: 66px;
}

*, *::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: 8px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
ol { list-style: none; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.gb { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); width: min(372px, 100%); border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1.500px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 50px -30px #000000; overflow: hidden; }
.gb__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; height: 46px; padding: 0 12px 0 16px; border-bottom: 1.500px solid var(--line); }
.gb__file { font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: 12px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb__file b { font-weight: 600; color: var(--ink); }
.gb__switch { flex: none; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 5px 0 10px; border-radius: 15px; font-size: 12px; font-weight: 660; color: var(--soft); transition: color 0.3s ease; }
.gb__switch[aria-checked="true"] { color: var(--ink); }
.gb__switch i { position: relative; display: block; width: 34px; height: 20px; border-radius: 10px; background: rgba(236, 234, 228, 0.16); transition: background-color 0.3s ease; }
.gb__switch[aria-checked="true"] i { background: var(--accent); }
.gb__switch u { position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.gb__switch:focus-visible { box-shadow: 0 0 0 2px var(--ink); }

/* the lines: a gutter that says who and how long ago, tinted by age, then the code */
.gb__code { position: relative; padding: 8px 0; font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: 12px; }
.gb__line { position: relative; display: flex; align-items: center; height: 24px; cursor: default; }
.gb__line::before { content: ""; position: absolute; inset: 0; background: var(--accent); opacity: 0; transition: opacity 0.2s ease; }
.gb__line.is-on::before { opacity: 0.1; }
.gb__who { position: relative; flex: none; display: flex; align-items: center; gap: 6px; width: var(--gut); height: 24px; padding-left: 12px; overflow: hidden; white-space: nowrap; }
.gb__who::after { content: ""; position: absolute; right: 6px; top: 0; bottom: 0; width: 2.500px; background: var(--age, rgba(236, 234, 228, 0.2)); }
.gb__who b { font-family: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif; font-size: 10.500px; font-weight: 740; color: var(--ink); }
.gb__who em { font-family: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif; font-style: normal; font-size: 10.500px; font-weight: 580; color: var(--soft); }
.gb__line code { position: relative; display: block; min-width: 0; padding-right: 12px; font: inherit; line-height: 24px; color: rgba(236, 234, 228, 0.86); white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.k { color: #c79bf2; }
.f { color: #7fb8ff; }
.n { color: #f0a23a; }

.gb__foot { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 14px 0 12px; border-top: 1.500px solid var(--line); background: rgba(0, 0, 0, 0.22); }
.gb__av { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 22%, transparent); font-size: 11px; font-weight: 760; color: var(--accent); }
.gb__msg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; min-width: 0; flex: 1; }
.gb__clip { display: block; height: 15px; line-height: 15px; overflow: hidden; white-space: nowrap; font-size: 11.500px; font-weight: 580; color: var(--soft); }
.gb__clip span { display: block; overflow: hidden; text-overflow: ellipsis; }
.gb__clip--tall { height: 18px; line-height: 18px; font-size: 13px; font-weight: 700; color: var(--ink); }
.gb__sha { flex: none; height: 22px; padding: 0 7px; border-radius: 7px; background: rgba(236, 234, 228, 0.08); font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: 11px; line-height: 22px; color: var(--soft); }

.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: #f2ede4; stroke: #0a0b0e; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); z-index: 6; }

@media (max-width: 350px) { .gb__code { font-size: 11px; } .gb__sha { display: none; } :root { --gut: 56px; } .gb__who { padding-left: 9px; gap: 5px; } }
@media (max-height: 400px) { .gb__line { height: 23px; } .gb__foot { height: 52px; } .gb__head { height: 42px; } }
@media (prefers-reduced-motion: reduce) { .gb__switch, .gb__switch i, .gb__line::before { transition: none; } }
