@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,800&family=Nunito:wght@500;700;800&display=swap");

:root {
  color-scheme: dark;
  --terminal-bg: #000;
  --terminal-text: #d8ffe1;
  --terminal-muted: #79a884;
  --terminal-green: #39ff6a;
  --terminal-line: #15381f;
  --terminal-panel: #07120b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--terminal-bg);
}

body {
  min-height: 100vh;
  overflow: hidden;
  color: var(--terminal-text);
  font-family: "Press Start 2P", monospace;
}

body.sheet-loaded {
  overflow: auto;
  font-family: "Nunito", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.terminal-root {
  width: 100vw;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background: #000;
  image-rendering: pixelated;
}

.access-panel {
  width: min(720px, 100%);
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 3px solid rgba(126, 126, 126, 0.95);
  background:
    linear-gradient(180deg, rgba(57, 255, 106, 0.08), rgba(4, 24, 10, 0.18)),
    repeating-linear-gradient(
      135deg,
      rgba(57, 255, 106, 0.035) 0 10px,
      rgba(0, 0, 0, 0.16) 10px 20px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(57, 255, 106, 0.018) 0 2px,
      rgba(0, 0, 0, 0.06) 2px 4px
    ),
    radial-gradient(circle at top left, rgba(57, 255, 106, 0.12), transparent 28%),
    linear-gradient(180deg, #102016, #07120b 42%, #030805 100%);
  box-shadow:
    inset 0 0 0 2px rgba(57, 255, 106, 0.18),
    inset 0 0 0 5px rgba(0, 28, 9, 0.72),
    0 0 36px rgba(57, 255, 106, 0.1),
    0 24px 50px rgba(0, 0, 0, 0.54);
}

.access-title {
  margin: 0;
  padding: 10px 12px;
  border: 3px solid rgba(57, 255, 106, 0.48);
  background: rgba(3, 12, 6, 0.82);
  color: var(--terminal-green);
  font-size: clamp(34px, 6vw, 72px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 0 12px rgba(57, 255, 106, 0.5),
    3px 3px 0 rgba(0, 40, 12, 0.95);
  box-shadow:
    inset 0 0 0 3px rgba(0, 28, 9, 0.74),
    inset 0 1px 0 rgba(57, 255, 106, 0.12);
}

.access-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.access-input,
.access-button {
  min-height: 76px;
  border: 3px solid rgba(57, 255, 106, 0.58);
  background: linear-gradient(180deg, rgba(10, 48, 20, 0.88), rgba(0, 8, 3, 0.96));
  color: var(--terminal-green);
  font-size: clamp(20px, 2.6vw, 34px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(57, 255, 106, 0.5),
    2px 2px 0 rgba(0, 40, 12, 0.95);
  box-shadow: inset 0 0 0 3px rgba(0, 28, 9, 0.82);
}

.access-input {
  min-width: 0;
  padding: 0 14px;
}

.access-button {
  padding: 0 18px;
  cursor: pointer;
}

.access-input:focus,
.access-button:focus-visible,
.access-button:hover {
  outline: none;
  border-color: rgba(57, 255, 106, 0.78);
  box-shadow:
    inset 0 0 0 3px rgba(0, 28, 9, 0.82),
    0 0 14px rgba(57, 255, 106, 0.18);
}

.access-status {
  min-height: 18px;
  margin: 0;
  color: var(--terminal-muted);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
  text-transform: uppercase;
}

.content-view {
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 18px;
  border: 3px solid rgba(57, 255, 106, 0.48);
  background: var(--terminal-panel);
  box-shadow:
    inset 0 0 0 3px rgba(0, 28, 9, 0.74),
    0 0 36px rgba(57, 255, 106, 0.1);
}

.sheet-inventory {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
}

.sheet-inventory header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sheet-inventory h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.sheet-inventory button,
.sheet-inventory input {
  min-height: 34px;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 6px;
  font: inherit;
  font-weight: 800;
}

.sheet-inventory button {
  padding: 0 10px;
  cursor: pointer;
}

.sheet-inventory input {
  min-width: 0;
  padding: 0 8px;
}

.sheet-inventory-list {
  display: grid;
  gap: 8px;
}

.sheet-inventory-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 78px 78px 72px auto;
  gap: 8px;
  align-items: center;
}

.sheet-inventory-head {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 78px 78px 72px auto;
  gap: 8px;
  align-items: center;
}

.sheet-inventory-head span {
  color: rgba(94, 43, 19, 0.72);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.midewd-inventory-section {
  display: grid;
  gap: 8px;
}

.midewd-coins {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.midewd-coins label {
  display: grid;
  gap: 4px;
}

.midewd-coins span {
  color: rgba(94, 43, 19, 0.72);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.midewd-inventory-section + .midewd-inventory-section {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.16);
}

.midewd-inventory-section h3 {
  margin: 0;
  color: rgba(198, 68, 18, 0.82);
  font-family: "Fraunces", Georgia, serif;
  font-size: 18px;
  line-height: 1;
}

.midewd-inventory-row button {
  white-space: nowrap;
}

.sheet-inventory-empty {
  margin: 0;
  opacity: 0.7;
  font-weight: 800;
}

.sheet-checks {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
}

.sheet-checks h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.sheet-checks header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sheet-checks header button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-height: 34px;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.d20-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  aspect-ratio: 1;
  clip-path: polygon(50% 0, 91% 19%, 100% 62%, 70% 100%, 30% 100%, 0 62%, 9% 19%);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.3), transparent 36%),
    var(--d20-icon-fill, #6f2d0e);
  color: var(--d20-icon-ink, #fff7db);
  font-family: "Fraunces", Georgia, serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.d20-icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  clip-path: polygon(50% 0, 88% 20%, 100% 60%, 70% 100%, 30% 100%, 0 60%, 12% 20%);
  border: 1px solid rgba(255, 251, 215, 0.5);
}

.d20-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(30deg, transparent 46%, rgba(255, 251, 215, 0.36) 47% 52%, transparent 53%),
    linear-gradient(150deg, transparent 46%, rgba(111, 45, 14, 0.22) 47% 52%, transparent 53%);
  mix-blend-mode: soft-light;
}

.sheet-checks header button.has-active-check {
  background: #ff681f;
  color: #180b04;
  --d20-icon-fill: #fff7db;
  --d20-icon-ink: #7c1e09;
}

.sheet-check-result {
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.22);
  font-weight: 900;
}

.sheet-check-result.is-success {
  background: #147a32;
  color: #fff;
}

.sheet-check-result.is-fail {
  background: #a51616;
  color: #fff;
}

.sheet-check-list {
  display: grid;
  gap: 8px;
}

.sheet-check {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
}

.sheet-check strong {
  font-size: 14px;
  text-transform: uppercase;
}

.sheet-check p {
  margin: 0;
  font-weight: 800;
}

.sheet-check div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sheet-check button {
  min-height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.sheet-player-name {
  color: inherit;
  font-family: inherit;
  font-size: 0.48em;
  font-weight: 800;
  line-height: 1;
  opacity: 0.78;
  white-space: nowrap;
}

.late-sheet h1 .sheet-player-name,
.gm-character-control h2 > .sheet-player-name:only-child {
  font-size: 1em;
}

.sheet-d20-stage {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  perspective: 760px;
  perspective-origin: 50% 42%;
  transition: opacity 120ms ease;
}

.sheet-d20-stage.is-rolling {
  opacity: 1;
}

.sheet-d20-stage.is-physics-rolling .sheet-d20 {
  opacity: 0;
}

.sheet-d20-3d-host,
.sheet-d20-canvas,
.sheet-d20-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sheet-d20-canvas,
.sheet-d20-svg {
  display: block;
}

.sheet-d20-svg {
  overflow: visible;
  filter:
    drop-shadow(0 22px 18px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 18px rgba(255, 104, 31, 0.32));
}

.sheet-d20-svg-result {
  transition: opacity 160ms ease;
}

.sheet-d20-svg-result circle {
  fill: rgba(58, 10, 2, 0.84);
  stroke: #fff0b5;
  stroke-width: 6;
}

.sheet-d20-svg-result text {
  fill: #fff7c7;
  font-family: "Fraunces", Georgia, serif;
  font-size: 48px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.42);
  stroke-width: 4;
}

.sheet-d20-face-number {
  fill: #fff7c7;
  font-family: "Fraunces", Georgia, serif;
  font-size: 18px;
  font-weight: 900;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(58, 10, 2, 0.58);
  stroke-width: 3;
}

.sheet-d20-svg .is-winning-face polygon {
  stroke: #fff7c7;
}

.sheet-d20-svg .is-winning-face .sheet-d20-face-number {
  fill: #ffffff;
  font-size: 22px;
  stroke-width: 4;
}

.sheet-d20 {
  position: absolute;
  left: 0;
  top: 0;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0%, 86% 15%, 100% 50%, 86% 85%, 50% 100%, 14% 85%, 0% 50%, 14% 15%);
  background:
    linear-gradient(122deg, transparent 0 46%, rgba(255, 245, 189, 0.38) 47% 50%, transparent 51%),
    linear-gradient(34deg, transparent 0 42%, rgba(101, 16, 5, 0.38) 43% 47%, transparent 48%),
    conic-gradient(from 22deg at 50% 50%, #ffb142, #ff681f 16%, #c73212 31%, #ff8a26 48%, #8f1809 62%, #f15a18 79%, #ffd066 100%);
  border: 4px solid rgba(255, 240, 184, 0.72);
  color: #fff;
  font-family: "Fraunces", Georgia, serif;
  font-size: 44px;
  font-weight: 800;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.55),
    0 0 14px rgba(255, 241, 184, 0.58);
  box-shadow:
    inset 16px 12px 18px rgba(255, 241, 184, 0.24),
    inset -18px -18px 22px rgba(80, 9, 4, 0.48);
  filter: drop-shadow(0 28px 24px rgba(0, 0, 0, 0.55));
  transform-style: preserve-3d;
  will-change: transform;
}

.sheet-d20::before,
.sheet-d20::after {
  content: "";
  position: absolute;
  inset: 13%;
  pointer-events: none;
  clip-path: polygon(50% 0%, 90% 24%, 77% 78%, 23% 78%, 10% 24%);
}

.sheet-d20::before {
  border: 2px solid rgba(255, 242, 190, 0.46);
  transform: translateZ(18px) rotate(7deg);
}

.sheet-d20::after {
  inset: 22%;
  background:
    linear-gradient(132deg, rgba(255, 255, 255, 0.28), transparent 36%),
    linear-gradient(315deg, rgba(77, 9, 4, 0.32), transparent 52%);
  transform: translateZ(26px) rotate(-14deg);
}

.sheet-d20.is-settled {
  filter:
    drop-shadow(0 26px 24px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 18px rgba(255, 104, 31, 0.28));
}

.sheet-d20-result {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: inherit;
  color: #fff7c7;
  position: relative;
  z-index: 1;
  transform: translateZ(34px);
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.6),
    0 0 16px rgba(255, 124, 34, 0.72);
}

.sheet-d20-outcome {
  position: fixed;
  left: 50%;
  top: 42%;
  z-index: 2;
  min-width: 132px;
  padding: 8px 12px;
  border: 3px solid rgba(255, 247, 199, 0.88);
  border-radius: 8px;
  background: rgba(58, 10, 2, 0.92);
  color: #fff7c7;
  font-family: "Fraunces", Georgia, serif;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  text-align: center;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.52);
  transform: translate(-50%, -50%) scale(0.92);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  white-space: nowrap;
}

.sheet-d20-outcome.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.sheet-d20-outcome.is-success {
  border-color: #bcffc9;
  background: rgba(20, 122, 50, 0.96);
  color: #f2fff4;
}

.sheet-d20-outcome.is-fail {
  border-color: #ffd0c8;
  background: rgba(165, 22, 22, 0.96);
  color: #fff3ef;
}

.sheet-message-stack {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 0;
  right: 0;
  width: auto;
  display: grid;
  justify-items: center;
  gap: 8px;
  pointer-events: none;
}

.sheet-message {
  width: min(720px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
}

.sheet-message.is-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: auto;
  padding: 14px clamp(18px, 4vw, 54px);
  border: 0;
  border-bottom: 4px solid rgba(255, 232, 204, 0.62);
  border-radius: 0;
  background: #b10f0f;
  color: #fff3e7;
  font-size: clamp(22px, 3.2vw, 42px);
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 16px 40px rgba(88, 0, 0, 0.48);
}

.sheet-message.is-secret {
  background: #050505;
}

.sheet-message-stack.is-dart .sheet-message.is-secret {
  position: fixed;
  top: 32vh;
  left: clamp(82px, 7vw, 150px);
  width: max(130px, min(190px, calc((100vw - 1100px) / 2 - 110px)));
  max-height: 58vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(2, 22, 18, 0.68);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(15px, 2.2vw, 28px);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  opacity: 0.66;
  overflow: hidden;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(29, 54, 45, 0.12),
    0 0 10px rgba(0, 8, 7, 0.52);
  text-transform: none;
  transform: rotate(-10deg);
  box-shadow: none;
  overflow-wrap: anywhere;
}

.midewd-rhythm-stage {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  pointer-events: none;
}

.midewd-rhythm-stage.is-active {
  display: block;
}

.midewd-rhythm-shell {
  position: absolute;
  inset: 0;
  color: #fff7c7;
  font-family: "Nunito", Arial, sans-serif;
}

.midewd-rhythm-shell header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid rgba(255, 104, 31, 0.58);
  border-radius: 8px;
  background: rgba(34, 10, 4, 0.82);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.34);
  transform: translateX(-50%);
}

.midewd-rhythm-shell header strong {
  color: #ff681f;
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  line-height: 1;
}

.midewd-rhythm-shell header span {
  min-width: 76px;
  color: #fff7c7;
  font-size: 15px;
  font-weight: 900;
  text-align: right;
}

.midewd-rhythm-board {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(46px, 72px));
  justify-content: center;
  gap: clamp(8px, 1.6vw, 18px);
  overflow: hidden;
}

.midewd-rhythm-hit-line {
  position: fixed;
  left: 0;
  right: 0;
  top: 52vh;
  height: 5px;
  background: #ff241f;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.18),
    0 0 22px rgba(255, 36, 31, 0.7);
}

.midewd-rhythm-stage.is-active .midewd-rhythm-hit-line {
  animation: midewd-hit-line-in 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.midewd-rhythm-lane {
  position: relative;
  height: 100vh;
  border-left: 1px solid rgba(255, 247, 199, 0.12);
  border-right: 1px solid rgba(255, 247, 199, 0.12);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(255, 104, 31, 0.08) 52%, rgba(0, 0, 0, 0.03));
}

.midewd-rhythm-stage.is-active .midewd-rhythm-lane {
  animation: midewd-lane-in 620ms ease 260ms both;
}

.midewd-rhythm-beat-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 4;
  height: 4px;
  pointer-events: none;
  transform: translateY(-80px);
  will-change: transform, opacity;
}

.midewd-rhythm-beat-bar.is-main {
  background: rgba(215, 215, 215, 0.58);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.22);
}

.midewd-rhythm-beat-bar.is-half {
  height: 2px;
  background: rgba(215, 215, 215, 0.3);
}

.midewd-rhythm-beat-bar.is-sub {
  height: 1px;
  background: rgba(215, 215, 215, 0.2);
}

.midewd-rhythm-beat-bar.is-past {
  opacity: 0.12;
  transition: opacity 160ms ease;
}

.midewd-rhythm-target,
.midewd-rhythm-note {
  position: absolute;
  left: 50%;
  display: grid;
  place-items: center;
  width: clamp(34px, 5.4vw, 52px);
  aspect-ratio: 1;
  border: 3px solid #ff681f;
  border-radius: 999px;
  background: rgba(58, 10, 2, 0.88);
  color: #fff7c7;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(20px, 3.4vw, 30px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.48);
  transform: translateX(-50%);
}

.midewd-rhythm-target {
  top: calc(52vh - clamp(17px, 2.7vw, 26px));
  z-index: 1;
  border-color: rgba(255, 247, 199, 0.9);
  background: rgba(255, 104, 31, 0.94);
  color: #180b04;
  box-shadow:
    0 0 0 5px rgba(255, 104, 31, 0.2),
    0 0 22px rgba(255, 104, 31, 0.5);
}

.midewd-rhythm-stage.is-active .midewd-rhythm-target {
  animation: midewd-target-in 520ms ease 520ms both;
}

.midewd-rhythm-target span {
  position: absolute;
  bottom: -21px;
  color: #fff7c7;
  font-family: "Nunito", Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.72);
}

.midewd-rhythm-note {
  top: 0;
  z-index: 3;
  border-color: #fff7c7;
  background: linear-gradient(180deg, #ff9f38, #ff4d1f);
  color: #240b03;
  will-change: transform, opacity;
}

.midewd-rhythm-note.is-hit {
  opacity: 0;
  transform: translateX(-50%) scale(1.25) !important;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.midewd-rhythm-note.is-missed {
  opacity: 0.22;
  filter: grayscale(0.8);
}

.midewd-rhythm-shell footer {
  position: fixed;
  isolation: isolate;
  left: 50%;
  bottom: 28px;
  z-index: 2;
  min-width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  padding: 10px 16px;
  border: 2px solid rgba(255, 247, 199, 0.42);
  border-radius: 8px;
  background: rgba(34, 10, 4, 0.84);
  color: #fff7c7;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.midewd-rhythm-shell footer::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: var(--rhythm-meter, 55%);
  background: rgba(214, 179, 76, 0.48);
  transition: width 260ms ease, background 220ms ease;
}

.midewd-rhythm-shell footer.is-rising {
  border-color: rgba(69, 207, 106, 0.78);
  box-shadow: 0 0 18px rgba(69, 207, 106, 0.24);
}

.midewd-rhythm-shell footer.is-rising::before {
  background: rgba(37, 170, 77, 0.62);
}

.midewd-rhythm-shell footer.is-falling {
  border-color: rgba(255, 87, 64, 0.78);
  box-shadow: 0 0 18px rgba(255, 87, 64, 0.22);
}

.midewd-rhythm-shell footer.is-falling::before {
  background: rgba(177, 28, 28, 0.68);
}

@keyframes midewd-hit-line-in {
  from {
    opacity: 0;
    transform: translateY(-18px) scaleX(0.08);
  }

  to {
    opacity: 1;
    transform: translateY(0) scaleX(1);
  }
}

@keyframes midewd-lane-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes midewd-target-in {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.7);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

.terminal-root:has(.slippy-sheet) {
  position: relative;
  display: block;
  min-height: 100vh;
  padding: 0;
  overflow: auto;
  background:
    radial-gradient(circle at 16% 9%, rgba(255, 126, 41, 0.16), transparent 18%),
    radial-gradient(circle at 72% 6%, rgba(255, 156, 63, 0.09), transparent 18%),
    linear-gradient(135deg, #010504 0%, #03100b 48%, #06170f 100%);
  image-rendering: auto;
}

.terminal-root:has(.slippy-sheet)::before,
.terminal-root:has(.slippy-sheet)::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.terminal-root:has(.slippy-sheet)::before {
  z-index: 0;
  background:
    radial-gradient(ellipse at 21% 15%, rgba(255, 130, 42, 0.12), transparent 24%),
    radial-gradient(ellipse at 64% 20%, rgba(6, 32, 22, 0.8), transparent 42%),
    radial-gradient(ellipse at 52% 72%, rgba(0, 7, 6, 0.86), transparent 52%),
    linear-gradient(160deg, rgba(4, 18, 14, 0.98), rgba(0, 5, 4, 0.99));
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  animation: slippy-water-breath 22s ease-in-out infinite;
}

.terminal-root:has(.slippy-sheet)::after {
  z-index: 2;
  background-image:
    radial-gradient(circle at 10% 18%, rgba(255, 122, 31, 0.28), transparent 16%),
    radial-gradient(circle at 92% 16%, rgba(255, 142, 39, 0.15), transparent 14%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='mud' x1='0' x2='1' y1='0' y2='0'%3E%3Cstop stop-color='%237a4e2e' stop-opacity='.94'/%3E%3Cstop offset='.42' stop-color='%23533825' stop-opacity='.82'/%3E%3Cstop offset='.78' stop-color='%232a2118' stop-opacity='.54'/%3E%3Cstop offset='1' stop-color='%2311281b' stop-opacity='.16'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23mud)' d='M-90 0H274C228 20 194 48 175 88C150 140 120 172 98 216C68 276 58 330 64 396C70 460 56 502 43 548C25 612 30 674 46 732C63 795 62 842 86 878C96 892 111 898 130 900H-90Z'/%3E%3Cpath fill='url(%23mud)' opacity='.78' d='M1690 0H1438C1486 28 1510 60 1524 108C1542 171 1567 230 1573 298C1580 366 1566 430 1568 502C1571 573 1589 628 1582 704C1575 782 1548 844 1504 900H1690Z'/%3E%3Cpath fill='%23513623' opacity='.46' d='M320 0C410 14 500 17 590 0H320Z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%, 100% 100%, 100% 100%;
  opacity: 0.88;
  transition:
    opacity 220ms ease,
    background-size 260ms cubic-bezier(0.17, 0.84, 0.32, 1);
  animation: slippy-candle-glow 4.8s ease-in-out infinite;
}

body.pond-stepped .terminal-root:has(.slippy-sheet)::after {
  opacity: 1;
  background-size: 108% 108%, 104% 104%, 106% 100%;
}

.content-view:has(.slippy-sheet) {
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: 100vh;
  max-height: none;
  overflow: visible;
  padding: clamp(18px, 3vw, 36px);
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pond-wet-edge {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='wet' x1='0' x2='1' y1='0' y2='0'%3E%3Cstop stop-color='%2332241a' stop-opacity='.72'/%3E%3Cstop offset='.58' stop-color='%23222b1c' stop-opacity='.56'/%3E%3Cstop offset='1' stop-color='%23071610' stop-opacity='.04'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23wet)' d='M-90 0H274C228 20 194 48 175 88C150 140 120 172 98 216C68 276 58 330 64 396C70 460 56 502 43 548C25 612 30 674 46 732C63 795 62 842 86 878C96 892 111 898 130 900H-90Z'/%3E%3Cpath fill='url(%23wet)' opacity='.72' d='M1690 0H1438C1486 28 1510 60 1524 108C1542 171 1567 230 1573 298C1580 366 1566 430 1568 502C1571 573 1589 628 1582 704C1575 782 1548 844 1504 900H1690Z'/%3E%3Cpath fill='%23242b1d' opacity='.3' d='M320 0C410 14 500 17 590 0H320Z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 108% 100%;
  opacity: 0;
  transition: opacity 180ms ease;
}

body.pond-receding .pond-wet-edge {
  opacity: 0.68;
}

@keyframes slippy-water-breath {
  0%,
  100% {
    filter: saturate(1) brightness(1);
    transform: scale(1);
  }

  47% {
    filter: saturate(1.05) brightness(1.08);
    transform: scale(1.006);
  }

  62% {
    filter: saturate(1.03) brightness(1.03);
    transform: scale(1.002);
  }
}

@keyframes slippy-candle-glow {
  0%,
  100% {
    filter: brightness(0.9) saturate(1);
  }

  38% {
    filter: brightness(1.05) saturate(1.15);
  }

  46% {
    filter: brightness(0.96) saturate(1.05);
  }

  58% {
    filter: brightness(1.12) saturate(1.2);
  }
}

.slippy-sheet {
  --slippy-ink: #d2a06a;
  --slippy-leaf: #102e1d;
  --slippy-leaf-dark: #081b11;
  --slippy-moss: #26492f;
  --slippy-bark: #c4854f;
  --slippy-panel: #0d2719;
  --slippy-panel-soft: #143421;
  --slippy-orange: #ff681f;
  --slippy-gold: #d09a48;
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  gap: clamp(18px, 2.5vw, 28px);
  color: var(--slippy-ink);
  font-family: "Nunito", Arial, sans-serif;
}

.slippy-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
}

.slippy-portrait-card,
.slippy-card {
  border: 1px solid rgba(255, 104, 31, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 104, 31, 0.045), rgba(0, 0, 0, 0.06)),
    linear-gradient(135deg, var(--slippy-panel-soft), var(--slippy-panel));
  box-shadow:
    inset 0 0 0 1px rgba(255, 221, 154, 0.06),
    0 18px 48px rgba(0, 0, 0, 0.34);
}

.slippy-portrait-card {
  min-height: 480px;
  overflow: hidden;
  background: #06140e;
}

.slippy-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slippy-hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(22px, 4vw, 48px);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 104, 31, 0.14), transparent 22%),
    linear-gradient(135deg, #123520, #0b2115 62%, #06150e);
  border: 1px solid rgba(255, 104, 31, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(255, 221, 154, 0.06),
    0 18px 48px rgba(0, 0, 0, 0.34);
}

.slippy-kicker {
  width: fit-content;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--slippy-orange);
  color: #180b04;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(255, 104, 31, 0.28);
}

.slippy-sheet h1,
.slippy-sheet h2,
.slippy-sheet h3,
.slippy-sheet p {
  margin: 0;
}

.slippy-sheet h1,
.slippy-sheet h2,
.slippy-sheet h3 {
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: 0;
}

.slippy-sheet h1 {
  color: #f4b15a;
  font-size: clamp(64px, 11vw, 142px);
  font-weight: 800;
  line-height: 0.86;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.slippy-tagline {
  max-width: 700px;
  color: var(--slippy-ink);
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 700;
  line-height: 1.42;
}

.slippy-quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.slippy-quick-stats span {
  padding: 8px 10px;
  border: 1px solid rgba(255, 104, 31, 0.38);
  border-radius: 999px;
  background: rgba(255, 104, 31, 0.1);
  color: #f0a458;
  font-size: 13px;
  font-weight: 800;
}

.slippy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.slippy-card {
  padding: clamp(18px, 2.4vw, 28px);
}

.slippy-card h2 {
  margin-bottom: 14px;
  color: var(--slippy-orange);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1;
  text-shadow: 0 0 14px rgba(255, 104, 31, 0.18);
}

.slippy-card p,
.slippy-card li {
  color: var(--slippy-ink);
  font-size: 16px;
  line-height: 1.55;
}

.slippy-profile {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 104, 31, 0.08), transparent 48%),
    linear-gradient(180deg, #143821, #0c2618);
}

.slippy-profile-image {
  width: 128px;
  aspect-ratio: 1;
  border: 4px solid rgba(242, 112, 46, 0.78);
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(56, 35, 19, 0.28);
}

.slippy-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
}

.slippy-list strong {
  color: #efb263;
}

.slippy-highlight {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 104, 31, 0.16), transparent 34%),
    linear-gradient(180deg, #143821, #0c2618);
}

.slippy-talent-list {
  display: grid;
  gap: 12px;
}

.slippy-talent-list div {
  padding: 14px;
  border-left: 6px solid var(--slippy-orange);
  border-radius: 6px;
  background: rgba(5, 17, 11, 0.48);
}

.slippy-talent-list span {
  display: block;
  margin-bottom: 4px;
  color: #f0a458;
  font-size: 17px;
  font-weight: 800;
}

.slippy-wide {
  grid-column: 1 / -1;
}

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

.slippy-move {
  padding: 16px;
  border-radius: 8px;
  background: rgba(5, 17, 11, 0.48);
  border: 1px solid rgba(255, 104, 31, 0.18);
}

.slippy-move h3 {
  margin-bottom: 8px;
  color: var(--slippy-orange);
  font-size: 24px;
  line-height: 1.05;
}

.slippy-content {
  display: grid;
  gap: 18px;
  color: var(--terminal-text);
}

@media (max-width: 860px) {
  .slippy-hero,
  .slippy-grid,
  .slippy-move-grid {
    grid-template-columns: 1fr;
  }

  .slippy-portrait-card {
    min-height: 0;
  }

  .slippy-portrait {
    max-height: 620px;
  }
}

@media (max-width: 560px) {
  .content-view:has(.slippy-sheet) {
    padding: 12px;
  }

  .slippy-profile {
    grid-template-columns: 1fr;
  }

  .slippy-profile-image {
    width: 112px;
  }
}

.dart-sheet {
  --mucus-level: 70%;
  --toxicity-level: 30%;
  --dart-ink: #6f2d0e;
  position: relative;
  width: min(1080px, 100%);
  min-height: min(720px, calc(100vh - 72px));
  grid-template-columns: minmax(0, 1fr) 168px;
  align-content: start;
  gap: 28px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(94, 58, 28, 0.68);
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 255, 255, 0.14), transparent 20%),
    linear-gradient(135deg, rgba(88, 58, 30, 0.08), transparent 36%),
    #d4c17f;
  box-shadow:
    inset 0 0 0 1px rgba(255, 251, 215, 0.42),
    inset 0 0 52px rgba(83, 53, 27, 0.2),
    0 24px 60px rgba(0, 0, 0, 0.36);
}

.dart-roll-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10001;
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 62px;
  height: 58px;
  border: 3px solid #6f2d0e;
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 36%),
    #f3d778;
  color: #6f2d0e;
  cursor: pointer;
  font-family: "Fraunces", Georgia, serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 251, 215, 0.5),
    0 8px 18px rgba(66, 42, 22, 0.24),
    0 0 0 4px rgba(111, 45, 14, 0.08);
}

.dart-roll-button .d20-icon {
  width: 38px;
  --d20-icon-fill: #6f2d0e;
  --d20-icon-ink: #fff7db;
  font-size: 14px;
}

.dart-roll-button.has-active-check .d20-icon,
.dart-roll-button[data-active-check="true"] .d20-icon,
.dart-roll-button[aria-pressed="true"] .d20-icon {
  --d20-icon-fill: #fff7db;
  --d20-icon-ink: #7c1e09;
}

.dart-roll-button:hover,
.dart-roll-button:focus-visible {
  outline: none;
  border-color: #b94610;
  box-shadow:
    inset 0 0 0 1px rgba(255, 251, 215, 0.64),
    0 0 0 4px rgba(185, 70, 16, 0.16);
}

.dart-roll-button.has-active-check,
.dart-roll-button[data-active-check="true"],
.dart-roll-button[aria-pressed="true"] {
  border-color: #7c1e09;
  background: #ff681f !important;
  color: #fff7db !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 251, 215, 0.42),
    0 8px 18px rgba(66, 42, 22, 0.32),
    0 0 0 5px rgba(255, 104, 31, 0.24),
    0 0 22px rgba(255, 104, 31, 0.54);
}

.dart-roll-button:disabled,
.dart-roll-button.is-rolling {
  cursor: wait;
  opacity: 0.82;
  transform: translateY(1px);
  filter: saturate(0.86);
}

.dart-main {
  min-width: 0;
  display: grid;
  gap: 20px;
}

.dart-header {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dart-profile {
  width: 118px;
  aspect-ratio: 1;
  border: 3px solid var(--dart-ink);
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(66, 42, 22, 0.25);
}

.dart-identity {
  display: grid;
  gap: 6px;
}

.dart-role {
  color: #9f3b0d;
  font-family: "Fraunces", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
}

.dart-sheet h1 {
  color: #b94610;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 800;
  line-height: 0.95;
  text-shadow: none;
}

.dart-trait-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dart-note {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 2px solid rgba(111, 45, 14, 0.28);
  border-radius: 8px;
  background: rgba(244, 231, 176, 0.46);
}

.dart-wide {
  grid-column: 1 / -1;
}

.dart-warning {
  background: rgba(185, 70, 16, 0.1);
}

.dart-note h2 {
  margin: 0;
  color: #b94610;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1;
}

.dart-note p,
.dart-note li {
  color: var(--dart-ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.dart-note p,
.dart-note ul {
  margin: 0;
}

.dart-note ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.dart-vitals {
  display: grid;
  justify-items: center;
  align-self: start;
}

.dart-vial-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-top: 4px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dart-vial-heading,
.dart-toxicity-label {
  color: var(--dart-ink);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.dart-vertical-vial {
  position: relative;
  width: 132px;
  height: 380px;
  display: grid;
  justify-items: center;
  align-items: end;
  padding-bottom: 34px;
}

.dart-vial-heading {
  position: absolute;
  right: -2px;
  top: 188px;
  transform: rotate(90deg);
  transform-origin: center;
}

.dart-vial-svg {
  width: 86px;
  height: 332px;
  overflow: visible;
  filter: drop-shadow(0 10px 16px rgba(66, 42, 22, 0.22));
}

.dart-vial-empty {
  fill: rgba(236, 224, 174, 0.5);
}

.dart-mucus-svg-fill {
  fill: url("#dart-mucus-gradient");
}

.dart-mucus-svg-glow {
  fill: url("#dart-mucus-glow");
}

.dart-vial-shine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 4;
  stroke-linecap: round;
}

.dart-vial-outline {
  fill: none;
  stroke: var(--dart-ink);
  stroke-width: 5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.dart-toxicity-ring {
  --ring-size: 84px;
  position: absolute;
  bottom: 0;
  left: 50%;
  width: var(--ring-size);
  height: var(--ring-size);
  display: grid;
  place-items: center;
  border-radius: 999px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle, #e8dca9 0 52%, transparent 53%),
    conic-gradient(from 90deg, #ff681f 0 var(--toxicity-level), rgba(23, 18, 10, 0.18) var(--toxicity-level) 100%);
  box-shadow: 0 8px 18px rgba(66, 42, 22, 0.22);
}

.dart-toxicity-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 3px solid var(--dart-ink);
  border-radius: inherit;
}

.dart-toxicity-ring::after {
  content: "";
  position: absolute;
  right: -11px;
  top: calc(50% - 2px);
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: var(--dart-ink);
}

.dart-toxicity-ring span {
  position: relative;
  z-index: 1;
  color: var(--dart-ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.gm-sheet {
  --gm-ink: #d2a06a;
  --gm-panel: #0d2719;
  --gm-orange: #ff681f;
  width: min(980px, 100%);
  display: grid;
  gap: 12px;
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid rgba(255, 104, 31, 0.32);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 104, 31, 0.14), transparent 22%),
    linear-gradient(135deg, #143821, var(--gm-panel));
  color: var(--gm-ink);
  font-family: "Nunito", Arial, sans-serif;
  box-shadow:
    inset 0 0 0 1px rgba(255, 221, 154, 0.06),
    0 18px 48px rgba(0, 0, 0, 0.34);
}

.terminal-root:has(.gm-sheet) {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: clamp(18px, 3vw, 36px);
  overflow: auto;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 126, 41, 0.14), transparent 18%),
    linear-gradient(135deg, #010504 0%, #03100b 48%, #06170f 100%);
  image-rendering: auto;
}

.content-view:has(.gm-sheet) {
  width: min(1020px, 100%);
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.gm-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.gm-sheet h1,
.gm-sheet p {
  margin: 0;
}

.gm-sheet h1 {
  color: #f4b15a;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 800;
  line-height: 0.95;
}

.gm-kicker,
.gm-connection-status,
.gm-field span {
  color: #f0a458;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.gm-connection-status {
  padding: 6px 8px;
  border: 1px solid rgba(255, 104, 31, 0.38);
  border-radius: 999px;
  background: rgba(5, 17, 11, 0.48);
  white-space: nowrap;
}

.gm-console-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 104, 31, 0.24);
  border-radius: 8px;
  background: rgba(5, 17, 11, 0.48);
}

.gm-field {
  display: grid;
  gap: 4px;
}

.gm-compact-input,
.gm-send-button {
  min-height: 36px;
  border: 2px solid rgba(255, 104, 31, 0.42);
  border-radius: 6px;
  background: rgba(5, 17, 11, 0.62);
  color: var(--gm-ink);
  font-size: 15px;
  font-weight: 900;
}

.gm-compact-input {
  min-width: 0;
  padding: 0 10px;
}

.gm-send-button {
  padding: 0 14px;
  color: #180b04;
  background: var(--gm-orange);
  cursor: pointer;
}

.gm-close-button {
  background: #4a1610;
  color: #ffd0b8;
}

.gm-compact-input:focus,
.gm-send-button:focus-visible,
.gm-send-button:hover {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 104, 31, 0.2);
}

.gm-form-note {
  color: #f0a458;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.gm-character-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gm-character-control {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
  border: 1px solid rgba(255, 104, 31, 0.24);
  border-radius: 8px;
  background: rgba(5, 17, 11, 0.48);
}

.gm-character-control header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.gm-character-control h2 {
  margin: 0;
  color: var(--gm-orange);
  font-family: "Fraunces", Georgia, serif;
  font-size: 24px;
  line-height: 1;
}

.gm-trait-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.gm-check-row {
  display: grid;
  grid-template-columns: 72px 72px auto auto;
  gap: 6px;
  align-items: center;
}

.gm-special-check-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.gm-mini-button,
.gm-category-button {
  min-height: 32px;
  border: 1px solid rgba(255, 104, 31, 0.42);
  border-radius: 6px;
  background: rgba(255, 104, 31, 0.12);
  color: var(--gm-ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.gm-category-button {
  width: 100%;
}

.gm-mini-button:hover,
.gm-mini-button:focus-visible,
.gm-category-button:hover,
.gm-category-button:focus-visible {
  outline: none;
  background: var(--gm-orange);
  color: #180b04;
}

.gm-empty-traits {
  color: rgba(210, 160, 106, 0.68);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.gm-character-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 104, 31, 0.24);
  border-radius: 8px;
  background: rgba(5, 17, 11, 0.48);
}

.gm-character-panel h2 {
  margin: 0;
  color: var(--gm-orange);
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  line-height: 1;
}

.gm-character-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gm-character-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 104, 31, 0.18);
  border-radius: 8px;
  background: rgba(13, 39, 25, 0.72);
  color: var(--gm-ink);
  font-size: 15px;
  font-weight: 800;
}

.gm-character-list span {
  color: #f0a458;
  font-size: 12px;
  text-transform: uppercase;
}

.gm-character-empty {
  color: rgba(210, 160, 106, 0.68);
}

.gm-message-panel,
.gm-check-panel,
.gm-random-panel,
.gm-inventory-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 104, 31, 0.24);
  border-radius: 8px;
  background: rgba(5, 17, 11, 0.48);
}

.gm-message-panel h2,
.gm-check-panel h2,
.gm-random-panel h2,
.gm-inventory-panel h2 {
  margin: 0;
  color: var(--gm-orange);
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  line-height: 1;
}

.gm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gm-message-text {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid rgba(255, 104, 31, 0.42);
  border-radius: 6px;
  background: rgba(5, 17, 11, 0.72);
  color: var(--gm-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 8px;
}

.gm-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(255, 104, 31, 0.18);
  border-radius: 6px;
}

.gm-targets legend {
  padding: 0 4px;
  color: #f0a458;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.gm-targets label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 900;
}

.gm-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gm-dice-buttons,
.gm-random-custom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gm-random-custom .gm-compact-input {
  width: 90px;
}

.gm-active-messages {
  display: grid;
  gap: 8px;
}

.gm-active-message {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 104, 31, 0.18);
  border-radius: 6px;
  background: rgba(13, 39, 25, 0.72);
}

.gm-active-message header,
.gm-active-message div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.gm-active-message strong {
  color: #f0a458;
  font-size: 12px;
  text-transform: uppercase;
}

.gm-active-message p {
  color: var(--gm-ink);
  font-size: 14px;
  font-weight: 800;
}

.gm-active-message span {
  color: rgba(210, 160, 106, 0.78);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.gm-check-progress {
  position: relative;
  min-height: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 247, 199, 0.16);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
}

.gm-check-progress::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--check-progress, 0%);
  background: linear-gradient(90deg, rgba(255, 104, 31, 0.62), rgba(37, 170, 77, 0.62));
  transition: width 260ms ease;
}

.gm-check-progress span {
  position: relative;
  z-index: 1;
  display: block;
  padding: 4px 8px;
  color: #fff7c7;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.gm-check-progress.is-song {
  min-height: 18px;
  margin-top: 6px;
}

.gm-check-progress.is-song::before {
  background: linear-gradient(90deg, rgba(255, 247, 199, 0.48), rgba(210, 160, 106, 0.58));
}

.gm-check-progress.is-song span {
  padding: 2px 8px;
  color: rgba(255, 247, 199, 0.84);
  font-size: 11px;
}

.gm-check-history-entry.is-success {
  border-color: rgba(69, 207, 106, 0.62);
  background: rgba(20, 122, 50, 0.24);
}

.gm-check-history-entry.is-fail {
  border-color: rgba(255, 87, 64, 0.62);
  background: rgba(165, 22, 22, 0.2);
}

.gm-inventory-table {
  display: grid;
  gap: 4px;
  overflow-x: auto;
}

.gm-inventory-actions {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) auto;
  gap: 8px;
  align-items: center;
}

.gm-coin-pools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 6px;
  min-width: 760px;
}

.gm-coin-pool {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) repeat(3, minmax(54px, 70px));
  gap: 6px;
  align-items: end;
  padding: 6px;
  border: 1px solid rgba(255, 104, 31, 0.18);
  border-radius: 6px;
  background: rgba(13, 39, 25, 0.58);
}

.gm-coin-pool strong {
  color: #f0a458;
  font-size: 12px;
  line-height: 1.1;
}

.gm-coin-pool label {
  display: grid;
  gap: 2px;
}

.gm-coin-pool label span {
  color: rgba(210, 160, 106, 0.78);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.gm-coin-pool input {
  min-width: 0;
  min-height: 28px;
  padding: 3px 5px;
  border: 1px solid rgba(255, 104, 31, 0.24);
  border-radius: 4px;
  background: rgba(5, 17, 11, 0.72);
  color: var(--gm-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.gm-inventory-head,
.gm-inventory-row {
  display: grid;
  grid-template-columns: 100px minmax(140px, 1fr) 64px 78px 64px 120px 82px;
  gap: 6px;
  min-width: 760px;
  align-items: center;
}

.gm-inventory-head span,
.gm-inventory-row span,
.gm-inventory-row input,
.gm-inventory-row select {
  padding: 5px 6px;
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(255, 104, 31, 0.18);
  border-radius: 4px;
  background: rgba(13, 39, 25, 0.72);
  color: var(--gm-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.gm-inventory-head span {
  color: #f0a458;
  text-transform: uppercase;
}

.gm-inventory-row .gm-inventory-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 0;
  min-height: 0;
  border: 0;
  background: transparent;
}

.gm-snapshot-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid rgba(255, 104, 31, 0.42);
  border-radius: 8px;
  background: #0d2719;
  color: var(--gm-ink);
  padding: 18px;
}

.gm-snapshot-dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.gm-snapshot-dialog h2 {
  margin: 0 0 8px;
  color: var(--gm-orange);
  font-family: "Fraunces", Georgia, serif;
  font-size: 28px;
}

.gm-history-dialog {
  max-height: min(720px, calc(100vh - 32px));
  overflow: auto;
}

.gm-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.waslwars-sheet {
  --wasl-paper: #eee8d5;
  --wasl-ink: #40352b;
  --wasl-muted: #7a6655;
  --wasl-line: rgba(64, 53, 43, 0.32);
  --wasl-red: #b94132;
  width: min(1040px, 100%);
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid rgba(64, 53, 43, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(64, 53, 43, 0.045) 0 1px, transparent 1px 28px),
    linear-gradient(0deg, rgba(64, 53, 43, 0.04) 0 1px, transparent 1px 28px),
    var(--wasl-paper);
  color: var(--wasl-ink);
  font-family: "Nunito", Arial, sans-serif;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    0 24px 60px rgba(0, 0, 0, 0.35);
}

.terminal-root:has(.waslwars-sheet) {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: clamp(18px, 3vw, 36px);
  overflow: auto;
  background:
    radial-gradient(circle at 12% 14%, rgba(238, 232, 213, 0.14), transparent 24%),
    linear-gradient(135deg, #10100d, #242116 50%, #11100c);
  image-rendering: auto;
}

.content-view:has(.waslwars-sheet) {
  width: min(1080px, 100%);
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.waslwars-header {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.waslwars-emblem {
  width: 104px;
  aspect-ratio: 1;
  border: 3px solid var(--wasl-ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
  color: var(--wasl-red);
  cursor: pointer;
  font-family: "Fraunces", Georgia, serif;
  font-size: 58px;
  font-weight: 800;
  line-height: 1;
}

.waslwars-kicker,
.waslwars-role {
  margin: 0;
  color: var(--wasl-muted);
  font-weight: 900;
  line-height: 1.3;
}

.waslwars-kicker {
  color: var(--wasl-red);
  font-size: 13px;
  text-transform: uppercase;
}

.waslwars-sheet h1,
.waslwars-sheet h2,
.waslwars-sheet p {
  margin: 0;
}

.waslwars-sheet h1 {
  color: var(--wasl-ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(48px, 8vw, 94px);
  font-weight: 800;
  line-height: 0.9;
}

.waslwars-character-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: stretch;
}

.waslwars-sketch,
.waslwars-notes {
  min-height: 340px;
  border: 2px solid var(--wasl-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.26);
}

.waslwars-sketch {
  position: relative;
  overflow: hidden;
}

.waslwars-sketch::before {
  content: "";
  position: absolute;
  inset: 54px 50%;
  width: 92px;
  height: 132px;
  border: 6px solid var(--wasl-ink);
  border-radius: 42% 42% 30% 30%;
  transform: translateX(-50%);
}

.waslwars-sketch::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 52px;
  width: 150px;
  height: 82px;
  border-bottom: 8px solid var(--wasl-ink);
  border-left: 6px solid var(--wasl-ink);
  border-right: 6px solid var(--wasl-ink);
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.waslwars-sketch[data-wasl-wars-sketch="jimmy"] {
  background:
    radial-gradient(circle at 60% 34%, transparent 0 5px, var(--wasl-ink) 6px 8px, transparent 9px),
    radial-gradient(circle at 44% 34%, transparent 0 5px, var(--wasl-ink) 6px 8px, transparent 9px),
    rgba(255, 255, 255, 0.26);
}

.waslwars-sketch[data-wasl-wars-sketch="cow"]::before {
  width: 128px;
  height: 112px;
  border-radius: 36px 36px 18px 18px;
}

.waslwars-sketch[data-wasl-wars-sketch="cow"] {
  background:
    linear-gradient(45deg, transparent 0 45%, var(--wasl-ink) 46% 48%, transparent 49%),
    linear-gradient(-45deg, transparent 0 45%, var(--wasl-ink) 46% 48%, transparent 49%),
    rgba(255, 255, 255, 0.26);
}

.waslwars-sketch[data-wasl-wars-sketch="squiggly"]::before {
  width: 58px;
  height: 168px;
  border-radius: 999px;
  transform: translateX(-50%) rotate(-8deg);
}

.waslwars-sketch[data-wasl-wars-sketch="froggy"]::before {
  border-radius: 999px 999px 40px 40px;
}

.waslwars-notes {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: clamp(18px, 2.5vw, 28px);
}

.waslwars-notes h2 {
  color: var(--wasl-red);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.waslwars-notes ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

.waslwars-notes li {
  color: var(--wasl-ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.42;
}

.norman-sheet {
  --norman-ink: #24170f;
  --norman-hide: #b98946;
  --norman-hide-dark: #6b4526;
  --norman-red: #9f231b;
  --norman-panel: rgba(255, 234, 186, 0.62);
  width: min(1040px, 100%);
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 32px);
  border: 3px solid var(--norman-hide-dark);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 12%, rgba(159, 35, 27, 0.16), transparent 24%),
    linear-gradient(135deg, #d4aa62, var(--norman-hide) 48%, #8f6034);
  color: var(--norman-ink);
  font-family: "Nunito", Arial, sans-serif;
  box-shadow:
    inset 0 0 0 2px rgba(255, 239, 198, 0.28),
    0 24px 60px rgba(0, 0, 0, 0.36);
}

.terminal-root:has(.norman-sheet) {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: clamp(18px, 3vw, 36px);
  overflow: auto;
  background:
    radial-gradient(circle at 80% 18%, rgba(159, 35, 27, 0.12), transparent 22%),
    linear-gradient(135deg, #120d09, #2d1d12 52%, #0d0906);
  image-rendering: auto;
}

.content-view:has(.norman-sheet) {
  width: min(1080px, 100%);
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.norman-header {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.norman-mark {
  width: 104px;
  aspect-ratio: 1;
  border: 4px solid var(--norman-ink);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(159, 35, 27, 0.18), rgba(255, 234, 186, 0.28)),
    #7f542d;
  color: #ffeaba;
  cursor: pointer;
  font-family: "Fraunces", Georgia, serif;
  font-size: 78px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 3px 3px 0 var(--norman-red);
}

.norman-kicker,
.norman-role {
  margin: 0;
  color: #4d2b18;
  font-weight: 900;
  line-height: 1.3;
}

.norman-kicker {
  color: var(--norman-red);
  font-size: 13px;
  text-transform: uppercase;
}

.norman-sheet h1,
.norman-sheet h2,
.norman-sheet p {
  margin: 0;
}

.norman-sheet h1 {
  color: var(--norman-ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(56px, 9vw, 104px);
  font-weight: 800;
  line-height: 0.88;
  text-shadow: 3px 3px 0 rgba(255, 234, 186, 0.28);
}

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

.norman-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 2px solid rgba(36, 23, 15, 0.28);
  border-radius: 8px;
  background: var(--norman-panel);
}

.norman-wide {
  grid-column: 1 / -1;
}

.norman-danger {
  background: rgba(159, 35, 27, 0.14);
}

.norman-card h2 {
  color: var(--norman-red);
  font-family: "Fraunces", Georgia, serif;
  font-size: 32px;
  line-height: 1;
}

.norman-card p,
.norman-card li {
  color: var(--norman-ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.norman-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.late-sheet {
  --late-ink: #f5efe7;
  --late-muted: #a8b0a4;
  --late-panel: #171916;
  --late-panel-soft: #20231f;
  --late-line: rgba(245, 239, 231, 0.16);
  --late-accent: #d94f31;
  --late-gold: #d3b56b;
  width: min(1100px, 100%);
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--late-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(217, 79, 49, 0.08), rgba(211, 181, 107, 0.045)),
    var(--late-panel);
  color: var(--late-ink);
  font-family: "Nunito", Arial, sans-serif;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 24px 60px rgba(0, 0, 0, 0.34);
}

.terminal-root:has(.late-sheet) {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: clamp(18px, 3vw, 36px);
  overflow: auto;
  background:
    radial-gradient(circle at 14% 10%, rgba(217, 79, 49, 0.14), transparent 24%),
    linear-gradient(135deg, #080908, #171916 58%, #090807);
  image-rendering: auto;
}

.content-view:has(.late-sheet) {
  width: min(1140px, 100%);
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.late-header {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.late-mark {
  width: 96px;
  aspect-ratio: 1;
  border: 2px solid rgba(217, 79, 49, 0.62);
  border-radius: 8px;
  background: rgba(217, 79, 49, 0.14);
  color: var(--late-accent);
  cursor: pointer;
  font-family: "Fraunces", Georgia, serif;
  font-size: 58px;
  font-weight: 800;
  line-height: 1;
}

.late-kicker,
.late-role,
.late-sheet h1 {
  margin: 0;
}

.late-kicker {
  color: var(--late-accent);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.late-sheet h1 {
  color: var(--late-ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.92;
}

.late-sheet h1 span {
  display: block;
  color: var(--late-gold);
  font-size: 0.46em;
  line-height: 1.1;
}

.late-role {
  color: var(--late-muted);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.late-overview,
.late-layout,
.late-stat-grid,
.late-skill-grid {
  display: grid;
  gap: 12px;
}

.late-overview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.late-overview article,
.late-panel {
  border: 1px solid var(--late-line);
  border-radius: 8px;
  background: rgba(32, 35, 31, 0.82);
}

.late-overview article {
  padding: 12px 14px;
}

.late-overview span,
.late-panel h2,
.late-facts dt,
.late-stat-grid dt,
.late-list dt,
.late-skill-grid dt {
  color: var(--late-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.late-overview strong {
  display: block;
  margin-top: 4px;
  color: var(--late-ink);
  font-size: 18px;
  line-height: 1.15;
}

.late-layout {
  grid-template-columns: minmax(220px, 0.78fr) minmax(320px, 1.08fr) minmax(260px, 0.92fr);
  align-items: start;
}

.late-column {
  display: grid;
  gap: 12px;
}

.late-panel {
  padding: 14px;
}

.late-panel h2,
.late-panel p,
.late-panel ul,
.late-panel dl {
  margin: 0;
}

.late-panel h2 {
  margin-bottom: 10px;
  color: var(--late-gold);
}

.late-panel p,
.late-text-list li,
.late-chip-list li {
  color: var(--late-ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.late-facts,
.late-list,
.late-stat-grid,
.late-skill-grid {
  display: grid;
  gap: 8px;
}

.late-facts div,
.late-list div,
.late-skill-grid div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(245, 239, 231, 0.1);
}

.late-facts div:last-child,
.late-list div:last-child,
.late-skill-grid div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.late-facts dd,
.late-list dd,
.late-skill-grid dd {
  margin: 0;
  color: var(--late-ink);
  font-size: 20px;
  font-weight: 900;
}

.late-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.late-stat-grid div {
  min-height: 74px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  border: 1px solid rgba(245, 239, 231, 0.12);
  border-radius: 8px;
  background: rgba(12, 13, 12, 0.32);
}

.late-stat-grid dd {
  margin: 0;
  color: var(--late-ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.late-skill-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}

.late-chip-list,
.late-text-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.late-chip-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.late-chip-list li,
.late-text-list li {
  position: relative;
  padding-left: 16px;
}

.late-chip-list li::before,
.late-text-list li::before {
  position: absolute;
  left: 0;
  color: var(--late-accent);
  content: "*";
}

.late-sheet .sheet-inventory,
.late-sheet .sheet-checks {
  border-color: var(--late-line);
  border-radius: 8px;
  background: rgba(32, 35, 31, 0.74);
  color: var(--late-ink);
}

.robotech-sheet {
  --robo-ink: #e4d3b8;
  --robo-muted: #a8b0a4;
  --robo-panel: #151b17;
  --robo-panel-soft: #202721;
  --robo-line: rgba(229, 187, 97, 0.28);
  --robo-amber: #e5bb61;
  --robo-red: #d84a35;
  width: min(1080px, 100%);
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--robo-line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 10%, rgba(229, 187, 97, 0.14), transparent 22%),
    linear-gradient(135deg, #242a22, #111714 62%, #0a0d0c);
  color: var(--robo-ink);
  font-family: "Nunito", Arial, sans-serif;
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 198, 0.05),
    0 24px 60px rgba(0, 0, 0, 0.38);
}

.terminal-root:has(.robotech-sheet) {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: clamp(18px, 3vw, 36px);
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(216, 74, 53, 0.09) 0 1px, transparent 1px 92px),
    linear-gradient(0deg, rgba(229, 187, 97, 0.06) 0 1px, transparent 1px 92px),
    radial-gradient(circle at 80% 12%, rgba(229, 187, 97, 0.1), transparent 22%),
    linear-gradient(135deg, #090c0b, #181d18 54%, #0b0f0d);
  image-rendering: auto;
}

.content-view:has(.robotech-sheet) {
  width: min(1120px, 100%);
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.robotech-header {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.robotech-avatar {
  position: relative;
  width: 104px;
  aspect-ratio: 1;
  border: 2px solid var(--robo-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(229, 187, 97, 0.1), rgba(216, 74, 53, 0.08)),
    #111714;
  cursor: pointer;
}

.robotech-avatar-helmet {
  position: absolute;
  inset: 18px 22px;
  border: 4px solid var(--robo-amber);
  border-bottom-width: 10px;
  border-radius: 42px 42px 18px 18px;
}

.robotech-avatar-helmet::before,
.robotech-avatar-helmet::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
}

.robotech-avatar-helmet::before {
  top: 22px;
  height: 10px;
  border-radius: 999px;
  background: var(--robo-red);
}

.robotech-avatar-helmet::after {
  bottom: -22px;
  height: 16px;
  border-radius: 0 0 8px 8px;
  background: var(--robo-amber);
}

.robotech-identity {
  display: grid;
  gap: 6px;
}

.robotech-kicker,
.robotech-role {
  margin: 0;
  color: var(--robo-muted);
  font-weight: 800;
  line-height: 1.25;
}

.robotech-kicker {
  color: var(--robo-amber);
  font-size: 13px;
  text-transform: uppercase;
}

.robotech-sheet h1,
.robotech-sheet h2,
.robotech-sheet p {
  margin: 0;
}

.robotech-sheet h1 {
  color: var(--robo-amber);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(48px, 8vw, 92px);
  font-weight: 800;
  line-height: 0.9;
}

.robotech-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.robotech-tab {
  min-height: 46px;
  border: 1px solid var(--robo-line);
  border-radius: 8px;
  background: rgba(21, 27, 23, 0.82);
  color: var(--robo-ink);
  cursor: pointer;
  font-weight: 900;
}

.robotech-tab.is-active,
.robotech-tab:hover,
.robotech-tab:focus-visible {
  outline: none;
  background: var(--robo-amber);
  color: #17120a;
}

.robotech-panel {
  display: none;
  gap: 16px;
}

.robotech-panel.is-active {
  display: grid;
}

.robotech-stat-grid,
.robotech-mech-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.robotech-stat,
.robotech-card,
.robotech-loadout label {
  border: 1px solid var(--robo-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(229, 187, 97, 0.045), rgba(216, 74, 53, 0.025)),
    var(--robo-panel);
}

.robotech-stat {
  display: grid;
  gap: 4px;
  min-height: 88px;
  align-content: center;
  padding: 12px;
}

.robotech-stat span,
.robotech-loadout span {
  color: var(--robo-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.robotech-stat strong {
  color: var(--robo-amber);
  font-family: "Fraunces", Georgia, serif;
  font-size: 38px;
  line-height: 0.9;
}

.robotech-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.robotech-card h2 {
  color: var(--robo-amber);
  font-family: "Fraunces", Georgia, serif;
  font-size: 30px;
  line-height: 1;
}

.robotech-card p,
.robotech-card li {
  color: var(--robo-ink);
  font-size: 16px;
  line-height: 1.5;
}

.robotech-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.robotech-loadout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.robotech-loadout label {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.robotech-loadout select {
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(229, 187, 97, 0.34);
  border-radius: 6px;
  background: #0c110f;
  color: var(--robo-ink);
  font: inherit;
  font-weight: 800;
}

@media (max-width: 820px) {
  .robotech-stat-grid,
  .robotech-mech-grid,
  .robotech-loadout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .dart-sheet {
    grid-template-columns: 1fr;
  }

  .dart-header {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .dart-profile {
    width: 104px;
  }

  .dart-vitals {
    justify-items: start;
  }

  .dart-trait-grid {
    grid-template-columns: 1fr;
  }

  .dart-wide {
    grid-column: auto;
  }

  .gm-header,
  .gm-console-actions,
  .gm-character-controls,
  .gm-character-control header,
  .gm-trait-row,
  .gm-check-row,
  .gm-special-check-row,
  .gm-inventory-actions {
    grid-template-columns: 1fr;
  }

  .gm-header {
    display: grid;
  }

  .sheet-message-stack.is-dart .sheet-message.is-secret {
    left: 14px;
    width: min(160px, calc(100vw - 28px));
    font-size: 15px;
  }

  .gm-connection-status,
  .gm-send-button,
  .gm-mini-button {
    width: 100%;
  }

  .waslwars-header,
  .waslwars-character-card,
  .norman-header,
  .norman-grid,
  .late-header,
  .late-overview,
  .late-layout,
  .late-skill-grid,
  .late-chip-list {
    grid-template-columns: 1fr;
  }

  .norman-wide {
    grid-column: auto;
  }

  .robotech-header,
  .robotech-stat-grid,
  .robotech-mech-grid,
  .robotech-loadout {
    grid-template-columns: 1fr;
  }
}

.slippy-content h1,
.slippy-content p {
  margin: 0;
}

.slippy-content h1 {
  color: var(--terminal-green);
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(57, 255, 106, 0.45);
}

.slippy-content p {
  color: var(--terminal-muted);
  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 620px) {
  .terminal-root {
    padding: 14px;
  }

  .access-form {
    grid-template-columns: 1fr;
  }

  .access-button {
    width: 100%;
  }
}
