/* packages/web/global.css */
:root {
  --bg: #0a1220;
  --bg-soft: #13213a;
  --panel: #1c3053;
  --panel-2: #26406a;
  --line: #3c5680;
  --line-soft: #2b4066;
  --text: #f2f7ff;
  --text-sub: #b6c8e4;
  --text-faint: #94a9c9;
  --brand: #35e0c8;
  --brand-strong: #14b8a6;
  --brand-soft: #35e0c824;
  --brand-text: #062b26;
  --player-a: #55a8ff;
  --player-a-deep: #2f7fd6;
  --player-a-soft: #55a8ff29;
  --player-b: #ffa245;
  --player-b-deep: #d97b1f;
  --player-b-soft: #ffa24529;
  --ok: #57d86e;
  --ok-soft: #57d86e26;
  --warn: #ffd166;
  --warn-soft: #ffd16626;
  --danger: #ff6b6b;
  --danger-soft: #ff6b6b26;
  --cell-empty: #14213a;
  --cell-empty-2: #172642;
  --cell-brick: #b07a4a;
  --cell-brick-hi: #c98f5c;
  --cell-brick-weak: #7d5634;
  --cell-steel: #66788f;
  --cell-steel-hi: #8b9cb3;
  --cell-water: #1d4f8a;
  --cell-water-hi: #2f6cb3;
  --grid-line: #7896c812;
  --shrink-danger: #ff6b6b4d;
  --shrink-wall: #4b3a54;
  --missile: #ffe066;
  --missile-trail: #ffe06659;
  --explosion: #ff9f43;
  --barrier-arc: #35e0c88c;
  --supply: #ffd166;
  --path-guide: #57d86ecc;
  --lead-guide: #ff6b9d;
  --chart-axis: #4a5f80;
  --chart-grid: #7896c81f;
  --chart-hit: #57d86e;
  --chart-miss: #ff6b6b;
  --heat-low: #ff6b6b1a;
  --heat-high: #ff6b6bd9;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow-base: #060c17;
  --shadow-brand: #0c4d44;
  --shadow-warn: #5c450a;
  --shadow: 0 6px 0 var(--shadow-base);
  --shadow-solid: 0 4px 0 var(--shadow-base);
  --shadow-solid-sm: 0 2px 0 var(--shadow-base);
  --shadow-pressed: 0 0 0 transparent;
  --highlight-top: 1px solid #ffffff21;
  --highlight-brand: 1px solid #ffffff73;
  --brand-hi: #44f0d7;
  --bg-deep: #080f1d;
  --bg-inset: #070d18;
  --topbar-bg: #0a1220e0;
  --brand-glow: #35e0c84d;
  --brand-glow-strong: #35e0c88c;
  --text-glow: #fff3;
  --ink: #000;
  --grid-pattern: linear-gradient(#2c416626 1px, transparent 1px), linear-gradient(90deg, #2c416626 1px, transparent 1px);
  --font: "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", sans-serif;
  --font-mono: "Cascadia Code", "Consolas", "BIZ UDGothic", "MS Gothic", monospace;
}

/* packages/web/app.css */
* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  background-color: var(--bg);
  background-image: var(--grid-pattern);
  color: var(--text);
  font-family: var(--font);
  --buncss-light: ;
  --buncss-dark: initial;
  color-scheme: dark;
  background-size: 28px 28px;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.6;
}

body {
  min-height: 100vh;
}

button {
  font-family: inherit;
}

canvas {
  display: block;
}

#app {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.topbar {
  display: flex;
  border-bottom: 2px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
  align-items:  center;
  gap: 14px;
  padding: 10px 16px;
}

.topbar .logo {
  letter-spacing: .02em;
  text-shadow: 0 2px 0 var(--ink), 0 0 12px var(--brand-soft);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  font-size: 22px;
  font-weight: 900;
}

.topbar .logo .accent {
  color: var(--brand);
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 640px) {
  .topbar {
    flex-wrap: nowrap;
  }

  .topbar nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .navbtn {
    white-space: nowrap;
    flex: none;
    padding: 8px 10px;
  }
}

.navbtn {
  border: 1px solid var(--line-soft);
  border-bottom: 2px solid var(--line);
  background: var(--panel);
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px 14px;
  transition: transform 50ms, background .1s;
  font-size: 15px;
  font-weight: 600;
}

.navbtn:hover {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line);
  transform: translateY(-1px);
}

.navbtn.active {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand-strong);
  border-bottom-color: var(--brand);
  box-shadow: inset 0 2px 4px #0000004d;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: var(--highlight-top);
  border-radius: var(--radius);
  box-shadow: var(--shadow-solid);
  padding: 18px;
}

.btn {
  display: inline-flex;
  border: 1px solid var(--line);
  border-top: var(--highlight-top);
  background: var(--panel-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-solid-sm);
  justify-content: center;
  align-items:  center;
  gap: 8px;
  padding: 10px 18px;
  transition: transform 50ms, box-shadow 50ms, filter .1s;
  font-size: 15px;
  font-weight: 700;
}

.btn:hover {
  filter: brightness(1.2);
  box-shadow: 0 3px 0 var(--shadow-base);
  transform: translateY(-1px);
}

.btn:active {
  box-shadow: var(--shadow-pressed);
  transform: translateY(2px);
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.btn.primary {
  background: linear-gradient(180deg, var(--brand-hi) 0%, var(--brand) 100%);
  border-color: var(--brand-strong);
  border-top: var(--highlight-brand);
  color: var(--brand-text);
  box-shadow: 0 4px 0 var(--shadow-brand), 0 0 16px var(--brand-soft);
  font-weight: 900;
}

.btn.primary:hover {
  box-shadow: 0 5px 0 var(--shadow-brand), 0 0 22px var(--brand-glow);
  transform: translateY(-1px);
}

.btn.primary:active {
  box-shadow: var(--shadow-pressed);
  transform: translateY(4px);
}

.btn.danger {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.btn.ghost {
  background: none;
}

.btn.big {
  padding: 13px 24px;
  font-size: 17px;
}

.btn.small {
  padding: 7px 13px;
  font-size: 13.5px;
  font-weight: 700;
}

.tag {
  display: inline-block;
  background: var(--panel-2);
  color: var(--text-sub);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 700;
}

.tag.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.tag.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.tag.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.tag.brand {
  background: var(--brand-soft);
  color: var(--brand);
}

.tag.a {
  background: var(--player-a-soft);
  color: var(--player-a);
}

.tag.b {
  background: var(--player-b-soft);
  color: var(--player-b);
}

.sub {
  color: var(--text-sub);
  font-size: 15px;
}

.faint {
  color: var(--text-faint);
  font-size: 13.5px;
}

h1 {
  margin: 18px 0 6px;
  font-size: 27px;
}

h2 {
  margin: 14px 0 8px;
  font-size: 21px;
}

h3 {
  margin: 10px 0 6px;
  font-size: 17px;
}

.menu-body {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.2vh, 26px);
}

.menu-body > [data-status]:empty {
  display: none;
}

.hero {
  text-align: center;
  padding: clamp(12px, 2.6vh, 26px) 10px clamp(4px, .8vh, 10px);
}

.hero h1 {
  letter-spacing: -.02em;
  text-shadow: 0 2px 0 var(--ink), 0 4px 16px var(--brand-glow);
  margin: 0 0 6px;
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 900;
}

.hero .accent {
  color: var(--brand);
}

.hero .sub {
  max-width: 44em;
  margin: 0 auto;
  font-size: clamp(15px, 1.35vw, 17px);
}

.menu-deck {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, .85fr);
  align-items:  start;
  gap: clamp(12px, 1.4vw, 18px);
}

.menu-mission {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  overflow: hidden;
  background: radial-gradient(130% 110% at 0% 0%, var(--brand-soft) 0%, transparent 58%), linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 58%);
  border-color: var(--line);
  box-shadow: var(--shadow-solid), 0 0 24px #00000059;
  gap: clamp(14px, 2vw, 26px);
  padding: clamp(16px, 1.8vw, 24px);
}

.menu-mission:before {
  content: "";
  position: absolute;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-strong) 45%, transparent 100%);
  height: 3px;
  inset: 0 0 auto;
}

.menu-mission-main {
  min-width: 0;
}

.menu-mission-label {
  letter-spacing: .06em;
  color: var(--brand);
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 800;
}

.menu-mission-title {
  letter-spacing: -.01em;
  text-shadow: 0 2px 0 var(--ink);
  margin: 0 0 6px;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 900;
  line-height: 1.3;
}

.menu-mission-lead {
  color: var(--text-sub);
  margin: 0 0 16px;
  font-size: 15.5px;
}

.menu-mission-lead b {
  font-family: var(--font-mono);
  color: var(--text);
  font-size: 17px;
}

.menu-mission-boss {
  color: var(--text-sub);
  margin: 12px 0 0;
  font-size: 14px;
}

.menu-mission-boss b {
  color: var(--warn);
}

.menu-mission-foot {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line-soft);
  color: var(--text-faint);
  margin: 4px 0 0;
  padding-top: 12px;
  font-size: 13.5px;
}

.btn.huge {
  letter-spacing: .01em;
  border-radius: var(--radius);
  text-align: center;
  width: 100%;
  padding: 16px 26px;
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 900;
}

.btn.primary.huge {
  box-shadow: 0 6px 0 var(--shadow-brand), 0 0 26px var(--brand-glow);
}

.btn.primary.huge:hover {
  box-shadow: 0 8px 0 var(--shadow-brand), 0 0 34px var(--brand-glow-strong);
  transform: translateY(-2px);
}

.btn.primary.huge:active {
  box-shadow: var(--shadow-pressed);
  transform: translateY(6px);
}

.menu-gauge {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  align-self: stretch;
  min-width: 0;
  padding: 14px;
  box-shadow: inset 0 2px 6px #00000080;
}

.menu-gauge-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0 0 8px;
}

.menu-gauge-head b {
  font-family: var(--font-mono);
  letter-spacing: -.03em;
  color: var(--brand);
  text-shadow: 0 0 12px var(--brand-glow);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.menu-gauge-head span {
  color: var(--text-sub);
  font-size: 14px;
}

.menu-gauge-note {
  color: var(--text-faint);
  margin: 8px 0 0;
  font-size: 13.5px;
}

.menu-pips {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
}

.menu-pip {
  display: flex;
  border: 1px solid var(--line);
  border-top: var(--highlight-top);
  border-radius: var(--radius-sm);
  background: var(--panel);
  box-shadow: var(--shadow-solid-sm);
  font-family: var(--font-mono);
  color: var(--text-faint);
  flex: 1 1 0;
  justify-content: center;
  align-items:  center;
  min-width: 30px;
  height: 30px;
  font-size: 14px;
  font-weight: 900;
}

.menu-pip.done {
  background: var(--brand);
  border-color: var(--brand-strong);
  color: var(--brand-text);
}

.menu-pip.current {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: var(--shadow-solid-sm), 0 0 10px var(--brand-glow);
}

.menu-pip.locked {
  box-shadow: none;
  background: none;
  border-style: dashed;
  font-size: 12px;
}

.menu-record {
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding-top: 10px;
}

.menu-record > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.menu-record dt {
  color: var(--text-sub);
  font-size: 13.5px;
}

.menu-record dd {
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.menu-flow {
  display: grid;
  list-style: none;
  align-content:  start;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-top: var(--highlight-top);
  border-left: 4px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-solid-sm);
  align-items:  start;
  gap: 12px;
  padding: 12px 14px;
}

.flow-step:not(:last-child):before {
  content: "";
  position: absolute;
  background: var(--line);
  width: 2px;
  height: 10px;
  top: 100%;
  left: 28px;
}

.flow-step .flow-ico {
  font-size: 26px;
  line-height: 1.1;
}

.flow-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.flow-body b {
  font-size: 15.5px;
  font-weight: 900;
}

.flow-desc {
  color: var(--text-sub);
  font-size: 13.5px;
}

.flow-count {
  background: var(--bg-inset);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  color: var(--brand);
  border-radius: 999px;
  justify-self: start;
  margin-top: 4px;
  padding: 1px 9px;
  font-size: 13.5px;
  font-weight: 900;
}

.flow-step.now {
  border-left-color: var(--brand);
  background: linear-gradient(180deg, var(--brand-soft) 0%, var(--panel) 70%);
  box-shadow: var(--shadow-solid-sm), 0 0 14px var(--brand-soft);
}

.flow-step.now b {
  color: var(--brand);
}

.flow-step.now b:after {
  content: "いまここ";
  background: var(--brand);
  color: var(--brand-text);
  vertical-align: 2px;
  white-space: nowrap;
  border-radius: 999px;
  margin-left: 8px;
  padding: 1px 7px;
  font-size: 11.5px;
  font-weight: 900;
}

.flow-meter {
  background: var(--bg-inset);
  border: 1px solid var(--line-soft);
  overflow: hidden;
  border-radius: 999px;
  width: 100%;
  height: 8px;
  box-shadow: inset 0 1px 3px #00000080;
}

.flow-meter-fill {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-strong), var(--brand));
  box-shadow: 0 0 8px var(--brand-glow);
  height: 100%;
}

.flow-cpu-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.flow-cpu {
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: 3px;
  width: 13px;
  height: 13px;
}

.flow-cpu.beaten {
  background: var(--brand);
  border-color: var(--brand-strong);
  box-shadow: 0 0 5px var(--brand-glow);
}

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

.hero-panel {
  padding: 14px;
}

.hero-panel-title {
  color: var(--text-sub);
  margin-bottom: 8px;
  font-size: 14.5px;
  font-weight: 800;
}

.hero-panel .kt-frame {
  overflow-y: auto;
  max-height: min(600px, 62vh);
}

.demo-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  min-height: 0;
}

.demo-canvas {
  aspect-ratio: 20 / 15;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  width: 100%;
}

.demo-play {
  position: absolute;
  width: -moz-fit-content;
  width: fit-content;
  height: -moz-fit-content;
  height: fit-content;
  margin: auto;
  inset: 0;
}

.menu-status {
  display: grid;
  gap: 10px;
}

.menu-status p {
  margin: 0;
}

.menu-status-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.menu-links .btn {
  box-shadow: none;
  color: var(--text-faint);
  background: none;
  border-color: #0000;
  font-weight: 600;
}

.menu-links .btn:hover {
  filter: none;
  background: var(--panel);
  border-color: var(--line-soft);
  color: var(--brand);
}

@media (max-width: 1120px) {
  .menu-deck {
    grid-template-columns: minmax(0, 1fr);
  }

  .menu-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .flow-step:not(:last-child):before {
    width: 10px;
    height: 2px;
    top: 22px;
    left: 100%;
  }
}

@media (max-width: 760px) {
  .menu-mission, .menu-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-step:not(:last-child):before {
    width: 2px;
    height: 10px;
    top: 100%;
    left: 28px;
  }

  .hero-panels {
    grid-template-columns: minmax(0, 1fr);
  }
}

.about {
  display: grid;
  gap: clamp(14px, 1.8vh, 22px);
  margin: clamp(40px, 6vh, 72px) 0 0;
}

.about-sec {
  margin: 0;
  padding: clamp(18px, 2.2vw, 30px);
}

.about-sec:nth-of-type(odd) {
  background: var(--panel);
}

.about-sec:nth-of-type(2n) {
  background: var(--bg-soft);
}

.about-sec h2 {
  display: flex;
  align-items:  center;
  gap: 12px;
  margin: 0 0 16px;
  font-size: clamp(19px, 1.9vw, 23px);
  font-weight: 900;
  line-height: 1.45;
}

.about-sec h2:before {
  content: "";
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-strong) 100%);
  box-shadow: 0 0 10px var(--brand-glow);
  border-radius: 2px;
  flex: none;
  width: 6px;
  height: 26px;
}

.about-sec h3 {
  color: var(--brand);
  margin: 0 0 4px;
  font-size: 16.5px;
}

.about-sec p {
  margin: 0 0 12px;
  font-size: 15.5px;
  line-height: 1.85;
}

.about-sec ul {
  margin: 0 0 10px;
  padding-left: 1.3em;
}

.about-sec li {
  margin-bottom: 8px;
  font-size: 15.5px;
  line-height: 1.8;
}

.about-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  align-items:  start;
  gap: clamp(18px, 2.4vw, 32px);
}

.about-roadmap .about-cols {
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.35fr);
}

.about-text > :last-child {
  margin-bottom: 0;
}

.about-text {
  max-width: 40em;
}

.about-figure {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  padding: clamp(12px, 1.3vw, 16px);
  box-shadow: inset 0 2px 8px #00000073;
}

.about-figure-title {
  letter-spacing: .04em;
  color: var(--text-faint);
  font-weight: 800;
  margin: 0 0 10px !important;
  font-size: 13.5px !important;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px !important;
}

.about-links a {
  color: var(--brand);
  font-size: 15px;
  font-weight: 700;
}

.about-steps {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.about-step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: var(--highlight-top);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-solid-sm);
  text-align: center;
  flex: 1 1 0;
  min-width: 0;
  padding: 11px 9px;
}

.about-step b {
  display: block;
  margin-bottom: 9px;
  font-size: 13.5px;
}

.about-step .faint {
  font-size: 12.5px;
}

.about-step-arrow {
  display: flex;
  color: var(--text-faint);
  align-items:  center;
  font-size: 18px;
}

.about-bar {
  background: var(--panel-2);
  border-radius: 3px;
  height: 11px;
  margin: 0 auto 4px;
}

.about-bar.on {
  background: var(--brand-soft);
  border: 1px solid var(--brand-strong);
}

.about-bar.warn {
  background: var(--warn-soft);
  border: 1px solid var(--warn);
}

.about-code {
  font-family: var(--font-mono);
  color: var(--text-sub);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.7;
}

.about-charts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.about-chart {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 9px;
}

.about-chart-title {
  color: var(--text-sub);
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
}

.about-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.about-chapters {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}

.about-chapters li {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-top: var(--highlight-top);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-solid-sm);
  align-content:  center;
  align-items:  center;
  gap: 3px 12px;
  margin: 0;
  padding: 9px 12px 9px 10px;
}

.about-chapters li:before {
  content: attr(data-chapter);
  grid-row: 1 / span 3;
  display: flex;
  font-family: var(--font-mono);
  color: var(--warn);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-shadow: 0 0 8px var(--warn-soft);
  justify-content: center;
  align-items:  center;
  height: 38px;
  font-size: 20px;
  font-weight: 900;
  box-shadow: inset 0 2px 4px #00000080;
}

.about-chapters li:last-child {
  border-left: 5px solid var(--warn);
  padding-left: 6px;
}

.about-chapters b {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.45;
}

.about-chapters span {
  color: var(--text-sub);
  font-size: 13.5px;
  line-height: 1.5;
}

.about-chapters em {
  color: var(--brand);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

.about-badges {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px !important;
  padding: 0 !important;
}

.about-badge {
  display: inline-flex;
  background: var(--ok-soft);
  border: 1px solid var(--ok);
  color: var(--text);
  box-shadow: var(--shadow-solid-sm);
  border-radius: 999px;
  align-items:  center;
  gap: 6px;
  margin: 0;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.about-tablet {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
}

.about-sec.about-adults {
  background: var(--bg-soft);
  margin-top: clamp(8px, 1.4vh, 16px);
}

.about-adults h2 {
  color: var(--text-sub);
  font-size: 19px;
}

.about-adults h2:before {
  background: var(--line);
  box-shadow: none;
}

.about-adults p {
  color: var(--text-sub);
  font-size: 15px;
}

.about-adult-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.about-adult-links a {
  display: grid;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: var(--highlight-top);
  border-radius: var(--radius);
  box-shadow: var(--shadow-solid);
  color: var(--text);
  text-decoration: none;
  gap: 4px;
  padding: 14px 16px;
  transition: transform 60ms, box-shadow 60ms, border-color .1s;
}

.about-adult-links a:hover {
  box-shadow: 0 6px 0 var(--shadow-base);
  border-color: var(--brand);
  transform: translateY(-2px);
}

.about-adult-links a:active {
  box-shadow: var(--shadow-pressed);
  transform: translateY(4px);
}

.about-adult-links b {
  color: var(--brand);
  font-size: 15.5px;
}

.about-adult-links span {
  color: var(--text-sub);
  font-size: 14px;
}

@media (max-width: 1040px) {
  .about-chapters {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .about-cols, .about-roadmap .about-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .about-text {
    max-width: none;
  }

  .about-adult-links {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .about-charts {
    gap: 6px;
  }

  .about-chart {
    padding: 6px;
  }

  .about-figure {
    padding: 10px;
  }
}

.garage {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 330px;
  grid-template-areas: "list editor side";
  gap: 14px;
  margin-top: 14px;
}

.garage > [data-pane="list"] {
  grid-area: list;
}

.garage > [data-pane="editor"] {
  grid-area: editor;
}

.garage > [data-pane="side"] {
  grid-area: side;
}

@media (max-width: 1000px) {
  .garage {
    grid-template-columns: 1fr;
    grid-template-areas: "list" "editor" "side";
  }
}

.garage[data-layout="kantan"] {
  grid-template-columns: minmax(0, 1fr) 330px;
  grid-template-areas: "list side" "editor side";
  row-gap: 10px;
}

@media (max-width: 1000px) {
  .garage[data-layout="kantan"] {
    grid-template-columns: 1fr;
    grid-template-areas: "list" "editor" "side";
  }
}

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

.botbar-more {
  margin-top: 8px;
}

.botbar-more > summary {
  cursor: pointer;
  color: var(--text-sub);
  padding: 4px 0;
  font-size: 13.5px;
}

.botlist .item {
  display: flex;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid #0000;
  justify-content: space-between;
  align-items:  center;
  gap: 6px;
  margin-bottom: 4px;
  padding: 9px 12px;
}

.botlist .item:hover {
  background: var(--panel-2);
}

.botlist .item.active {
  background: var(--brand-soft);
  border-color: var(--brand-strong);
}

.botlist .item .name {
  overflow-wrap: anywhere;
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}

.botlist .item .name .kind {
  margin-right: 2px;
  font-size: 12px;
}

.editor-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  overflow: hidden;
}

.editor-gutter {
  position: absolute;
  background: var(--panel);
  color: var(--text-faint);
  font-family: var(--font-mono);
  text-align: right;
  overflow: hidden;
  user-select: none;
  border-right: 1px solid var(--line-soft);
  white-space: pre;
  width: 44px;
  padding: 12px 8px 12px 0;
  font-size: 14px;
  line-height: 1.55;
  top: 0;
  bottom: 0;
  left: 0;
}

.editor-area {
  display: block;
  resize: vertical;
  outline: none;
  color: var(--text);
  caret-color: var(--brand);
  font-family: var(--font-mono);
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
  tab-size: 4;
  background: none;
  border: 0;
  width: 100%;
  min-height: 420px;
  padding: 12px 12px 12px 56px;
  font-size: 14px;
  line-height: 1.55;
}

.editor-area::selection {
  background: var(--brand-soft);
}

.errorbox {
  border: 1px solid var(--danger);
  background: var(--danger-soft);
  border-radius: var(--radius-sm);
  margin-top: 10px;
  padding: 10px 14px;
  font-size: 14px;
}

.errorbox .title {
  color: var(--danger);
  font-weight: 700;
}

.errorbox ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.errorbox details {
  color: var(--text-faint);
  margin-top: 6px;
  font-size: 12.5px;
}

.okbox {
  border: 1px solid var(--ok);
  background: var(--ok-soft);
  color: var(--ok);
  border-radius: var(--radius-sm);
  margin-top: 10px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
}

.runlog {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 180px;
  padding: 8px 10px;
  font-size: 12.5px;
}

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

.runlog .prn {
  color: var(--text-sub);
}

.meter {
  background: var(--bg-inset);
  border: 1px solid var(--line);
  overflow: hidden;
  border-radius: 999px;
  height: 12px;
  box-shadow: inset 0 2px 4px #0009;
}

.meter > div {
  background: var(--ok);
  height: 100%;
  transition: width .2s;
}

.meter.warn > div {
  background: var(--warn);
}

.meter.danger > div {
  background: var(--danger);
}

.battle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 1000px) {
  .battle-layout {
    grid-template-columns: 1fr;
  }
}

.battle-card {
  --arena-h: clamp(200px, calc(100vh - 296px), 900px);
  max-width: calc(var(--arena-h) * 4 / 3 + 26px);
  margin-inline-start: auto;
  margin-inline-end: auto;
}

@supports (height: 100dvh) {
  .battle-card {
    --arena-h: clamp(200px, calc(100dvh - 296px), 900px);
  }
}

.arena-canvas-wrap {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.arena-canvas-wrap canvas {
  width: 100%;
  height: auto;
}

.result-overlay {
  position: absolute;
  display: flex;
  text-align: center;
  background: #0b1424d1;
  flex-direction: column;
  justify-content: center;
  align-items:  center;
  gap: 10px;
  inset: 0;
}

.result-overlay .big-label {
  font-size: 40px;
  font-weight: 900;
}

.playbar {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 8px;
  padding: 10px 2px 0;
}

.playbar input[type="range"] {
  accent-color: var(--brand);
  flex: 1;
  min-width: 90px;
}

.hpbar {
  display: flex;
  gap: 4px;
}

.hpbar .seg {
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  width: 26px;
  height: 12px;
}

.hpbar.a .seg.on {
  background: var(--player-a);
  border-color: var(--player-a-deep);
}

.hpbar.b .seg.on {
  background: var(--player-b);
  border-color: var(--player-b-deep);
}

.sidepanel .row {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  padding: 4px 0;
  font-size: 14px;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.stage-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: var(--highlight-top);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-solid);
  cursor: pointer;
  padding: 16px;
  transition: transform 60ms, box-shadow 60ms, border-color .1s;
}

.stage-card:hover {
  box-shadow: 0 6px 0 var(--shadow-base);
  border-color: var(--brand);
  transform: translateY(-2px);
}

.stage-card:active {
  box-shadow: var(--shadow-pressed);
  transform: translateY(4px);
}

.stage-card.cleared {
  border-color: var(--ok);
}

.stage-card.locked {
  opacity: .55;
}

.stage-card .num {
  color: var(--warn);
  letter-spacing: 1px;
  font-size: 14px;
  font-weight: 700;
}

.stage-card .title {
  margin: 2px 0;
  font-size: 16px;
  font-weight: 800;
}

.quest-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: 14px;
  margin-top: 12px;
}

@media (max-width: 1000px) {
  .quest-layout {
    grid-template-columns: 1fr;
  }
}

.quest-layout.one-col {
  grid-template-columns: minmax(0, 1fr);
}

.quest-layout.one-col > .quest-brief {
  max-width: 980px;
}

.ws-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.ws-tab {
  border: 1px solid var(--line-soft);
  background: var(--panel);
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 700;
}

.ws-tab:hover {
  background: var(--panel-2);
  color: var(--text);
}

.ws-tab.active {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand-strong);
}

.ws-wide-toggle {
  margin-left: auto;
}

#view.ws-expanded .garage {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "editor";
}

#view.ws-expanded .garage > [data-pane="list"], #view.ws-expanded .garage > [data-pane="side"] {
  display: none;
}

#view.ws-expanded .quest-layout {
  grid-template-columns: minmax(0, 1fr);
}

.ws-notice {
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  padding: 8px 12px;
  font-size: 13.5px;
  line-height: 1.6;
}

.ws-notice.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.ws-notice.info {
  background: var(--panel-2);
  color: var(--text-sub);
}

.workspace {
  container-type: inline-size;
  --ws-h: clamp(300px, calc(100vh - 330px), 1040px);
}

@supports (height: 100dvh) {
  .workspace {
    --ws-h: clamp(300px, calc(100dvh - 330px), 1040px);
  }
}

.ws-panes.mode-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.ws-panes.mode-blocks .blocks-canvas, .ws-panes.mode-split .blocks-canvas {
  height: var(--ws-h);
  min-height: 0;
  max-height: none;
}

.ws-panes.mode-blocks .blocks-root, .ws-panes.mode-split .blocks-root {
  align-items: stretch;
}

.ws-panes.mode-blocks .blocks-palette, .ws-panes.mode-split .blocks-palette {
  contain: size;
  height: auto;
  max-height: none;
}

.ws-panes.mode-python .editor-area {
  min-height: var(--ws-h);
}

.ws-panes.mode-split .editor-wrap {
  display: flex;
  flex-direction: column;
}

.ws-panes.mode-split .editor-area {
  min-height: var(--ws-h);
  flex: auto;
}

@container (width <= 840px) {
  .ws-panes.mode-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .ws-panes.mode-split .blocks-canvas {
    height: calc(var(--ws-h) * .55);
  }

  .ws-panes.mode-split .editor-area {
    min-height: calc(var(--ws-h) * .55);
  }
}

.ws-pane {
  min-width: 0;
}

.ws-dncl {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  height: var(--ws-h);
  overflow: auto;
  font-family: var(--font-mono);
  color: var(--text);
  white-space: pre;
  margin: 0;
  padding: 14px;
  font-size: 14px;
  line-height: 1.8;
}

.blocks-root {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items:  start;
  gap: 10px;
}

@container (width <= 840px) {
  .blocks-root {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 8px;
  }

  .blocks-toolbar .sub {
    display: none;
  }
}

.ws-panes.mode-split .blocks-root {
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px;
}

.ws-panes.mode-split .blocks-toolbar .sub {
  display: none;
}

@container (width <= 560px) {
  .blocks-root, .ws-panes.mode-split .blocks-root {
    grid-template-columns: minmax(0, 1fr);
  }

  .ws-panes.mode-blocks .blocks-palette, .ws-panes.mode-split .blocks-palette {
    height: auto;
    max-height: 200px;
    contain: none;
  }
}

.blocks-palette {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow-y: auto;
  max-height: 620px;
  padding: 8px;
}

.pal-level {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.pal-lv {
  border: 1px solid var(--line-soft);
  background: var(--panel-2);
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  flex: 1;
  padding: 5px 4px;
  font-size: 12.5px;
  font-weight: 700;
}

.pal-lv.active {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand-strong);
}

.pal-group {
  margin-bottom: 12px;
}

.pal-title {
  display: inline-block;
  border-radius: 999px;
  margin-bottom: 6px;
  padding: 3px 8px;
  font-size: 12.5px;
  font-weight: 800;
}

.pal-note {
  color: var(--text-faint);
  margin: 0 0 8px;
  font-size: 11.5px;
  line-height: 1.5;
}

.pal-item {
  display: block;
  text-align: left;
  border: 1px solid var(--line-soft);
  background: var(--panel-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: grab;
  border-left-width: 4px;
  width: 100%;
  min-height: 36px;
  margin-bottom: 4px;
  padding: 8px 9px;
  font-size: 13px;
  line-height: 1.4;
}

.pal-item:hover {
  filter: brightness(1.25);
}

.pal-item:active {
  cursor: grabbing;
}

.blocks-main {
  min-width: 0;
}

.blocks-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 6px;
  margin-bottom: 8px;
}

.blocks-canvas {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: auto;
  min-height: 300px;
  max-height: 620px;
  padding: 12px;
}

.blocks-canvas:focus-visible {
  outline: 2px solid var(--brand);
}

.blocks-empty {
  color: var(--text-faint);
  text-align: center;
  padding: 40px 10px;
  font-size: 14px;
}

.blk-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 28px;
  padding-left: 2px;
}

.blk {
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 7px 10px;
}

.blk:focus-visible {
  outline: 2px solid var(--brand);
}

.blk.selected {
  border-color: var(--brand-strong);
  box-shadow: 0 0 0 2px var(--brand-soft);
}

.blk-head {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 6px;
  font-size: 13.5px;
}

.blk-body {
  border-left: 2px dashed var(--line);
  margin: 6px 0 0 10px;
  padding-left: 10px;
}

.blk-sub {
  color: var(--text-sub);
  margin: 6px 0 2px;
  font-size: 12.5px;
  font-weight: 700;
}

.blk-label {
  color: var(--text-sub);
  font-size: 13px;
}

.blk-op {
  color: var(--brand);
  font-family: var(--font-mono);
  font-weight: 700;
}

.blk-trailing {
  color: var(--text-faint);
  margin-left: auto;
  font-size: 12px;
}

.blk-grip {
  color: var(--text-faint);
  cursor: grab;
  touch-action: none;
  user-select: none;
  border-radius: 4px;
  padding: 2px 3px;
  font-size: 15px;
  line-height: 1;
}

.blk-grip:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.blk-grip:active {
  cursor: grabbing;
}

.blk-expr, .blk-text, .blk-select, .blk-pick, .blk-num, .blk-strv {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-mono);
  border-radius: 6px;
  flex-shrink: 1;
  min-width: 3ch;
  max-width: 100%;
  padding: 3px 7px;
  font-size: 12.5px;
}

.blk-expr:focus, .blk-text:focus, .blk-strv:focus, .blk-num:focus {
  outline: 2px solid var(--brand);
  border-color: var(--brand-strong);
}

.blk-expr.bad {
  border-color: var(--danger);
  color: var(--danger);
}

.blk-select, .blk-pick {
  font-family: var(--font);
  cursor: pointer;
}

.blk-slot {
  display: inline-flex;
  align-items:  center;
  gap: 3px;
  min-width: 0;
}

.blk-pick {
  background: var(--panel-2);
  border-color: var(--line-soft);
  color: var(--text);
  max-width: 22ch;
  font-weight: 600;
}

.blk-pick:focus-visible {
  outline: 2px solid var(--brand);
}

.blk-num {
  text-align: right;
  width: 9ch;
  min-width: 6ch;
}

.blk-strv {
  min-width: 5ch;
}

.blk-cond-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 4px;
  min-width: 0;
}

.blk-cond {
  display: inline-flex;
  background: var(--warn-soft);
  border-radius: 999px;
  flex-wrap: wrap;
  align-items:  center;
  gap: 4px;
  min-width: 0;
  padding: 2px 5px;
}

.blk-cond .blk-cond {
  background: none;
  padding: 0;
}

.blk-mini {
  border: 1px solid var(--line-soft);
  background: var(--panel);
  color: var(--text-faint);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
}

.blk-mini:hover {
  color: var(--brand);
  border-color: var(--brand-strong);
}

.blk-add {
  border: 1px dashed var(--line);
  color: var(--text-faint);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
  align-self:  flex-start;
  padding: 3px 12px;
  font-size: 12px;
}

.blk-add:hover {
  color: var(--brand);
  border-color: var(--brand-strong);
}

.blk-add.ghost {
  margin-top: 4px;
}

.blk-raw {
  font-family: var(--font-mono);
  white-space: pre-wrap;
  color: var(--text-sub);
  background: var(--bg);
  overflow-x: auto;
  border-radius: 6px;
  width: 100%;
  margin: 4px 0 0;
  padding: 6px 8px;
  font-size: 12px;
}

.blk-ghost {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  background: var(--panel-2);
  border: 1px solid var(--brand-strong);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius-sm);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: .95;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

.blk-dropline {
  position: fixed;
  z-index: 59;
  pointer-events: none;
  background: var(--brand);
  box-shadow: 0 0 6px var(--brand);
  border-radius: 999px;
  height: 3px;
}

.blocks-root.dragging, .blocks-root.dragging .blk {
  cursor: grabbing;
}

.blk.blk-dragging {
  opacity: .4;
}

.b-move {
  border-left-color: var(--player-a);
}

.pal-item.b-move, .pal-title.b-move {
  border-left-color: var(--player-a);
  background: var(--player-a-soft);
}

.b-attack {
  border-left-color: var(--player-b);
}

.pal-item.b-attack, .pal-title.b-attack {
  border-left-color: var(--player-b);
  background: var(--player-b-soft);
}

.b-control {
  border-left-color: var(--warn);
}

.pal-item.b-control, .pal-title.b-control {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.b-var {
  border-left-color: var(--brand);
}

.pal-item.b-var, .pal-title.b-var {
  border-left-color: var(--brand);
  background: var(--brand-soft);
}

.b-other {
  border-left-color: var(--text-faint);
}

.pal-item.b-other, .pal-title.b-other {
  border-left-color: var(--text-faint);
  background: var(--panel-2);
}

.b-comment {
  border-left-color: var(--ok);
  background: var(--ok-soft);
}

.b-raw {
  border-left-color: var(--danger);
  background: var(--bg);
}

.blk.unused {
  background: var(--bg-soft);
  border-style: dashed;
}

.blk-unused {
  display: inline-flex;
  color: var(--warn);
  align-items:  center;
  gap: 6px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
}

.blk-return {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.kt-root {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}

@container (width <= 840px) {
  .kt-root {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 8px;
  }

  .kt-card-hint {
    display: none;
  }
}

@container (width <= 560px) {
  .kt-root {
    grid-template-columns: minmax(0, 1fr);
  }

  .kt-root .kt-palette {
    contain: none;
    max-height: 240px;
    margin-bottom: 0;
  }
}

.kt-palette {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow-y: auto;
  contain: size;
  margin-bottom: 26px;
  padding: 10px;
}

.kt-level {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items:  center;
  gap: 4px 8px;
}

.kt-level-name {
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
}

.kt-pal-note {
  color: var(--text-sub);
  margin: 2px 0 10px;
  font-size: 12.5px;
  line-height: 1.5;
}

.kt-pal-group {
  margin-bottom: 12px;
}

.kt-pal-title {
  display: inline-block;
  border-radius: 999px;
  margin-bottom: 6px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 800;
}

.kt-card {
  position: relative;
  display: flex;
  text-align: left;
  touch-action: pan-y;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-height: 48px;
  margin-bottom: 6px;
  padding: 8px 10px 8px 36px;
  font-size: 15px;
  font-weight: 700;
}

.kt-card:hover {
  filter: brightness(1.2);
}

.kt-card-main {
  display: flex;
  align-items:  center;
  gap: 8px;
}

.kt-card-hint {
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.kt-ico {
  font-size: 20px;
  line-height: 1;
}

.kt-card.locked {
  cursor: help;
  color: var(--text-faint);
  background: none;
  border-style: dashed;
}

.kt-card.locked:hover {
  filter: none;
  border-color: var(--line);
}

.kt-card.locked > .kt-grip {
  background: var(--line-soft);
  cursor: help;
  touch-action: pan-y;
}

.kt-card.locked > .kt-grip:after {
  color: var(--text-faint);
}

.kt-pal-more {
  color: var(--text-faint);
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.5;
}

.kt-lockinfo {
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.6;
}

.kt-lockinfo .btn {
  margin-top: 4px;
}

.kt-mini.dim {
  opacity: .45;
}

.kt-trash {
  display: none;
  position: absolute;
  border: 3px dashed var(--danger);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--danger);
  justify-content: center;
  align-items:  center;
  font-size: 18px;
  font-weight: 800;
  inset: 0;
}

.kt-root.dragging .kt-palette {
  overflow: hidden;
}

.kt-root.dragging .kt-trash {
  display: flex;
}

.kt-root.kt-over-trash .kt-trash {
  background: var(--danger-soft);
}

.kt-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 6px;
  margin-bottom: 8px;
}

.kt-toolbar .btn.small {
  min-height: 40px;
}

.kt-stepup {
  border-color: var(--brand-strong);
  color: var(--brand);
  margin-left: auto;
}

.kt-canvas {
  height: var(--ws-h);
  overflow: auto;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.kt-canvas:focus-visible {
  outline: 2px solid var(--brand);
}

.kt-frame {
  border: 2px solid var(--brand-strong);
  border-radius: var(--radius);
  background: var(--bg-deep);
  box-shadow: inset 0 2px 6px #0009, var(--shadow-solid);
  overflow: hidden;
}

.kt-frame-head {
  display: flex;
  background: linear-gradient(180deg, var(--brand-soft) 0%, transparent 100%);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  align-items:  center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 14px;
  font-weight: 900;
}

.kt-frame-sub {
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 400;
}

.kt-frame-default {
  color: var(--text-sub);
  background: var(--brand-soft);
  padding: 0 14px 8px;
  font-size: 13px;
}

.kt-frame > .kt-list {
  padding: 10px 12px 10px 16px;
}

.kt-frame-foot {
  display: flex;
  color: var(--text-sub);
  background: var(--brand-soft);
  cursor: pointer;
  align-items:  center;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 14px;
}

.kt-frame-head:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 1px;
}

.kt-frame-foot:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 1px;
}

.kt-if-head:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 1px;
}

.kt-if-else:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 1px;
}

.kt-if-foot:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 1px;
}

.kt-blk:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 1px;
}

.kt-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 44px;
}

.kt-blk {
  position: relative;
  border: 1px solid var(--line);
  border-top: var(--highlight-top);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  box-shadow: var(--shadow-solid-sm);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  min-height: 48px;
  padding-left: 28px;
}

.kt-grip {
  position: absolute;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--line);
  cursor: grab;
  touch-action: none;
  width: 28px;
  top: 0;
  bottom: 0;
  left: 0;
  box-shadow: inset 1px 0 #fff3, inset -1px 0 2px #0006;
}

.kt-grip:after {
  content: "⋮⋮";
  position: absolute;
  display: flex;
  color: var(--bg);
  letter-spacing: -2px;
  justify-content: center;
  align-items:  center;
  font-size: 13px;
  inset: 0;
}

.kt-line {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 6px 8px;
  min-height: 48px;
  padding: 4px 10px;
  font-size: 16px;
  font-weight: 700;
}

.kt-move > .kt-grip {
  background: var(--player-a);
}

.kt-attack > .kt-grip {
  background: var(--player-b);
}

.kt-card.kt-move, .kt-pal-title.kt-move {
  border-left-color: var(--player-a);
  background: var(--player-a-soft);
}

.kt-card.kt-attack, .kt-pal-title.kt-attack {
  border-left-color: var(--player-b);
  background: var(--player-b-soft);
}

.kt-card.kt-control, .kt-pal-title.kt-control {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.kt-card.kt-control > .kt-grip {
  background: var(--warn);
}

@container (width <= 840px) {
  .kt-card {
    padding-left: 30px;
  }

  .kt-card > .kt-grip {
    width: 24px;
  }
}

.kt-blk.kt-if {
  box-shadow: none;
  background: none;
  border: 0;
  padding-left: 0;
}

.kt-if-head {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--warn-soft);
  cursor: pointer;
  border-bottom: 0;
  border-left: 0;
  padding-left: 28px;
}

.kt-if-head > .kt-grip {
  background: var(--warn);
  border-radius: var(--radius-sm) 0 0 0;
}

.kt-if-body {
  border-left: 28px solid var(--warn);
  background: var(--panel);
  padding: 6px;
}

.kt-if-else {
  display: flex;
  border-left: 28px solid var(--warn);
  background: var(--warn-soft);
  cursor: pointer;
  align-items:  center;
  gap: 8px;
  min-height: 40px;
  padding: 2px 12px;
  font-weight: 800;
}

.kt-if-foot {
  display: flex;
  border: 1px solid var(--line-soft);
  border-top: 0;
  border-left: 28px solid var(--warn);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--warn-soft);
  cursor: pointer;
  align-items:  center;
  gap: 8px;
  min-height: 40px;
  padding: 2px 12px;
}

.kt-foot-text {
  color: var(--text-sub);
  font-size: 13px;
}

.kt-chip {
  border: 2px solid var(--player-a);
  background: var(--panel);
  box-shadow: var(--shadow-solid-sm);
  color: var(--text);
  cursor: pointer;
  border-radius: 999px;
  min-height: 40px;
  padding: 4px 14px;
  font-size: 15px;
  font-weight: 800;
}

.kt-chip:active {
  box-shadow: none;
  transform: translateY(2px);
}

.kt-chip:after {
  content: " ▾";
  color: var(--text-faint);
}

.kt-chip.kt-sensor {
  border-color: var(--warn);
}

.kt-and {
  color: var(--warn);
  font-weight: 800;
}

.kt-mini {
  border: 1px dashed var(--line);
  color: var(--text-sub);
  cursor: pointer;
  background: none;
  border-radius: 999px;
  min-height: 36px;
  padding: 2px 12px;
  font-size: 13px;
  font-weight: 700;
}

.kt-mini:hover {
  color: var(--brand);
  border-color: var(--brand-strong);
}

.kt-mini.on {
  border-style: solid;
  border-color: var(--warn);
  background: var(--warn-soft);
  color: var(--warn);
}

.kt-blk.selected:not(.kt-if), .kt-if.selected > .kt-if-head {
  box-shadow: 0 0 0 3px var(--brand);
}

.kt-tools {
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
}

.kt-tool {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  min-width: 44px;
  min-height: 40px;
  font-size: 16px;
}

.kt-tool.danger {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.kt-blk.overridden:not(.kt-if), .kt-if.overridden > .kt-if-head {
  background: var(--bg-soft);
  border-style: dashed;
}

.kt-over {
  color: var(--warn);
  font-size: 12.5px;
  font-weight: 600;
}

.kt-cursor {
  display: flex;
  border: 2px dashed var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand);
  animation: kt-blink 1.4s ease-in-out infinite;
  align-items:  center;
  min-height: 40px;
  padding: 0 12px;
  font-weight: 800;
}

@keyframes kt-blink {
  50% {
    opacity: .55;
  }
}

.kt-root.dragging .kt-cursor {
  display: none;
}

.kt-fill {
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-faint);
  text-align: left;
  cursor: pointer;
  background: none;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
}

.kt-list:has( > .kt-drop) > .kt-fill {
  display: none;
}

.kt-drop {
  display: flex;
  border: 2px dashed var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand);
  pointer-events: none;
  align-items:  center;
  min-height: 48px;
  padding: 0 12px;
  font-weight: 800;
}

.kt-blk.kt-dragging {
  opacity: .35;
}

.kt-ghost {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  border: 1px solid var(--brand-strong);
  border-left: 8px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text);
  box-shadow: var(--shadow);
  min-height: 48px;
  padding: 11px 16px;
  font-size: 16px;
  font-weight: 800;
}

.kt-ghost.kt-move {
  border-left-color: var(--player-a);
}

.kt-ghost.kt-attack {
  border-left-color: var(--player-b);
}

.kt-ghost.kt-control {
  border-left-color: var(--warn);
}

.kt-note {
  color: var(--warn);
  min-height: 22px;
  margin-top: 4px;
  font-size: 13.5px;
}

.kt-python {
  margin-top: 6px;
}

.kt-python-head {
  color: var(--text-sub);
  margin-bottom: 4px;
  font-size: 13px;
}

.kt-py {
  overflow: auto;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  white-space: pre;
  max-height: 320px;
  margin: 0;
  padding: 10px 0;
  font-size: 13px;
  line-height: 1.6;
}

.kt-py-line {
  display: block;
  padding: 0 12px;
}

.kt-py-line.hl {
  background: var(--brand-soft);
  box-shadow: inset 4px 0 0 var(--brand);
}

.kt-py-no {
  display: inline-block;
  text-align: right;
  color: var(--text-faint);
  user-select: none;
  width: 2.2em;
  margin-right: 12px;
}

.kt-chooser {
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: min(760px, 100%);
  max-height: 85vh;
  padding: 18px;
}

.kt-chooser-title {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 800;
}

.kt-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.kt-tile {
  display: flex;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  flex-direction: column;
  align-items:  center;
  gap: 4px;
  min-height: 96px;
  padding: 10px 8px;
}

.kt-tile:hover {
  border-color: var(--brand-strong);
}

.kt-tile:focus-visible {
  outline: 3px solid var(--brand);
}

.kt-tile.current {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.kt-tile-ico {
  font-size: 30px;
  line-height: 1.1;
}

.kt-tile-label {
  font-size: 15px;
  font-weight: 800;
}

.kt-tile-hint {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.4;
}

.kt-preview .kt-blk {
  cursor: default;
  min-height: 0;
  padding-left: 0;
}

.kt-preview .kt-line {
  min-height: 36px;
  font-size: 14px;
}

.kt-preview .kt-frame-head, .kt-preview .kt-frame-foot {
  cursor: default;
  min-height: 36px;
}

.kt-badge, .blk-badge {
  display: inline-flex;
  background: var(--brand);
  color: var(--brand-text);
  border-radius: 999px;
  justify-content: center;
  align-items:  center;
  min-width: 24px;
  height: 24px;
  margin-right: 4px;
  font-size: 13px;
  font-weight: 800;
}

.ws-stage-label {
  display: inline-flex;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand);
  align-items:  center;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 800;
}

.ws-back-kantan {
  border-style: dashed;
}

.stepup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 10px 0;
}

@media (max-width: 760px) {
  .stepup-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.stepup-col h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.stepup-col .blocks-root {
  display: block;
}

.stepup-col .blocks-palette, .stepup-col .blocks-toolbar {
  display: none;
}

.stepup-col .blocks-canvas {
  height: auto;
  min-height: 0;
  max-height: 46vh;
}

.stepup-col .kt-frame {
  overflow-y: auto;
  max-height: 46vh;
}

.modal.wide {
  max-width: 1040px;
}

.intro-choices {
  display: grid;
  gap: 8px;
  margin: 12px 0 6px;
}

.intro-choice {
  display: flex;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  flex-direction: column;
  align-items:  flex-start;
  gap: 2px;
  min-height: 56px;
  padding: 10px 14px;
}

.intro-choice:hover {
  border-color: var(--brand);
  outline: none;
}

.intro-choice:focus-visible {
  border-color: var(--brand);
  outline: none;
}

.intro-choice.picked {
  border-color: var(--brand-strong);
  background: var(--brand-soft);
}

.intro-choice b {
  font-size: 16px;
}

.intro-choice span {
  color: var(--text-sub);
  font-size: 13px;
}

.adv-summary {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 12px;
  margin: 12px 0 6px;
}

.adv-chapter {
  margin-top: 26px;
}

.adv-ch-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.adv-ch-head h2 {
  margin: 0;
  font-size: 21px;
}

.adv-ch-no {
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 14px;
  font-weight: 800;
}

.adv-ch-parts {
  color: var(--text-sub);
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
}

.adv-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  margin-top: 10px;
}

.stage-card.adv {
  border-left: 6px solid var(--line);
}

.stage-card.adv.battle {
  border-left-color: var(--player-b);
}

.stage-card.adv.boss {
  border-color: var(--warn);
  background: linear-gradient(180deg, var(--warn-soft) 0%, var(--panel) 100%);
  box-shadow: 0 4px 0 var(--shadow-warn);
  border-width: 2px 2px 2px 6px;
}

.stage-card.adv.next {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--brand-soft) 0%, var(--panel) 100%);
  animation: stage-glow 2s infinite alternate ease-in-out;
}

@keyframes stage-glow {
  0% {
    border-color: var(--brand-strong);
    box-shadow: 0 4px 0 var(--shadow-base), 0 0 8px var(--brand-soft);
  }

  100% {
    border-color: var(--brand);
    box-shadow: 0 4px 0 var(--shadow-base), 0 0 18px var(--brand-glow);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-card.adv.next {
    animation: none;
    box-shadow: 0 4px 0 var(--shadow-base), 0 0 14px var(--brand-soft);
  }
}

.stage-card.adv.cleared {
  border-color: var(--ok);
}

.adv-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.adv-challenges {
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  margin-top: 10px;
  padding: 10px 12px;
}

.adv-chal-head {
  color: var(--text-sub);
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 800;
}

.adv-chal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.adv-chal {
  display: inline-flex;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  flex-wrap: wrap;
  align-items:  center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 12px;
  font-size: 13.5px;
}

.adv-chal:hover {
  border-color: var(--brand-strong);
}

.adv-chal.cleared {
  border-color: var(--ok);
}

.adv-chal-note {
  color: var(--text-faint);
  font-size: 12px;
}

.adv-ace {
  margin-top: 10px;
  font-size: 14.5px;
}

.adv-series {
  margin-bottom: 10px;
}

.adv-series.ok {
  border-color: var(--ok);
}

.adv-series-head {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 12px;
}

.big-marks {
  letter-spacing: 2px;
  font-size: 26px;
  font-weight: 800;
}

.adv-series-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.menu-card.main {
  border: 2px solid var(--brand-strong);
  background: var(--panel-2);
}

.ace-toggle {
  min-width: 36px;
  padding-left: 4px;
  padding-right: 4px;
  font-size: 16px;
}

.ace-toggle.on {
  color: var(--warn);
}

.series-big {
  margin-bottom: 6px;
  font-size: 16px;
}

.side-map select {
  width: 100%;
}

.cpu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.hintline {
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
  margin-top: 8px;
  padding: 6px 9px;
  font-size: 12.5px;
  line-height: 1.5;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.chart-card canvas {
  width: 100%;
  height: auto;
}

.statcards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.statcard {
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 10px 12px;
}

.statcard .value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 8px var(--text-glow);
  font-size: 22px;
  font-weight: 900;
}

.statcard .label {
  color: var(--text-sub);
  font-size: 12.5px;
}

.diagnosis {
  border-left: 4px solid var(--warn);
  background: var(--warn-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 8px 0;
  padding: 10px 14px;
}

.diagnosis .q {
  font-weight: 700;
}

textarea.hypothesis {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  resize: vertical;
  width: 100%;
  min-height: 70px;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
}

.help table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0;
  font-size: 14px;
}

.help th, .help td {
  border: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  padding: 6px 10px;
}

.help th {
  background: var(--panel-2);
}

.help code {
  font-family: var(--font-mono);
  background: var(--bg-soft);
  color: var(--brand);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 13px;
}

.help pre {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: var(--font-mono);
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.modal-back {
  position: fixed;
  display: flex;
  z-index: 50;
  background: #050a14b3;
  justify-content: center;
  align-items:  center;
  padding: 16px;
  inset: 0;
}

.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-y: auto;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  padding: 22px;
}

.progress {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  overflow: hidden;
  border-radius: 999px;
  height: 14px;
}

.progress > div {
  background: var(--brand);
  height: 100%;
  transition: width .15s;
}

kbd {
  display: inline-block;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  border-bottom-width: 3px;
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.doc-link {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 12.5px;
  font-weight: 600;
}

.doc-link:hover {
  text-decoration-thickness: 2px;
}

.kt-why, .blk-why {
  white-space: nowrap;
  margin-left: 6px;
}

.help-rescue .doc-link {
  font-size: 15px;
}
