:root {
  --ink: #eaf8ff;
  --muted: #8aa8b9;
  --panel: rgba(9, 29, 42, 0.92);
  --panel-2: rgba(13, 39, 54, 0.94);
  --line: rgba(111, 205, 226, 0.18);
  --cyan: #43e6f1;
  --cyan-soft: #9af8ff;
  --green: #77f09f;
  --yellow: #ffd166;
  --orange: #ff9a62;
  --red: #ff6380;
  --blue: #5c8cff;
  --shadow: 0 24px 70px rgba(0, 5, 12, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #06101a;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 12%, rgba(20, 120, 142, 0.18), transparent 35%),
    linear-gradient(145deg, #050d15 0%, #081724 48%, #07131e 100%);
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  touch-action: manipulation;
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 3px solid rgba(67, 230, 241, 0.72);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

.app {
  position: relative;
  width: min(1500px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) clamp(14px, 2.2vw, 34px) max(20px, env(safe-area-inset-bottom));
  isolation: isolate;
}

.grid-backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  opacity: 0.42;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(83, 184, 210, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 184, 210, 0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.orb {
  position: fixed;
  z-index: -2;
  width: 420px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(105px);
  opacity: 0.12;
  pointer-events: none;
}

.orb-a {
  top: -170px;
  right: -100px;
  background: var(--cyan);
}

.orb-b {
  bottom: -220px;
  left: -160px;
  background: #3b71ff;
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  color: var(--ink);
  text-align: left;
  border: 0;
  background: none;
  cursor: pointer;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 46px;
  place-items: center;
  color: #06141d;
  clip-path: polygon(50% 0, 94% 18%, 88% 73%, 50% 100%, 12% 73%, 6% 18%);
  background: linear-gradient(145deg, var(--cyan-soft), #35b9d6);
  filter: drop-shadow(0 0 14px rgba(67, 230, 241, 0.28));
}

.brand-mark::before {
  position: absolute;
  inset: 4px;
  content: "";
  clip-path: inherit;
  background: #081a25;
}

.brand-mark i {
  position: absolute;
  inset: 8px;
  clip-path: inherit;
  background: linear-gradient(145deg, rgba(67, 230, 241, 0.36), rgba(67, 230, 241, 0.08));
}

.brand-mark b {
  position: relative;
  color: var(--cyan-soft);
  font-size: 18px;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand strong {
  font-size: 14px;
  letter-spacing: 0.16em;
}

.brand small {
  margin-top: 6px;
  color: #789bad;
  font-size: 8px;
  letter-spacing: 0.22em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.best-chip {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 104px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 28, 40, 0.68);
}

.best-chip small {
  color: #7195a7;
  font-size: 9px;
  letter-spacing: 0.15em;
}

.best-chip b {
  color: var(--yellow);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.round-button {
  display: grid;
  width: 40px;
  aspect-ratio: 1;
  padding: 0;
  place-items: center;
  color: #a7c8d6;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(9, 28, 40, 0.74);
  cursor: pointer;
  transition: 160ms ease;
}

.round-button:hover {
  color: var(--cyan-soft);
  border-color: rgba(67, 230, 241, 0.45);
  transform: translateY(-1px);
}

.screen {
  min-height: calc(100dvh - 92px);
}

.start-screen {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(480px, 1.18fr);
  grid-template-rows: 1fr auto;
  gap: 30px 4vw;
  align-items: center;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(50px, 8vh, 105px) 2vw 24px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.eyebrow > span {
  display: inline-block;
  width: 30px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.eyebrow.centered {
  justify-content: center;
}

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

.hero-copy h1 {
  margin: 0;
  color: #f3fbff;
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.055em;
  text-shadow: 0 9px 40px rgba(0, 0, 0, 0.45);
}

.hero-copy h1 em {
  color: transparent;
  font-style: normal;
  -webkit-text-stroke: 1.5px var(--cyan-soft);
  filter: drop-shadow(0 0 14px rgba(67, 230, 241, 0.23));
}

.hero-lead {
  margin: 24px 0 29px;
  color: #9fbdcb;
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.9;
}

.hero-lead strong {
  color: var(--ink);
}

.start-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.primary-button {
  position: relative;
  display: flex;
  min-width: 265px;
  min-height: 72px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 13px 72px 13px 25px;
  overflow: hidden;
  color: #05151c;
  text-align: left;
  border: 0;
  border-radius: 9px 2px 9px 2px;
  background: linear-gradient(135deg, #a7fcff, #38d7e6 64%, #2ab5d2);
  box-shadow: 0 12px 38px rgba(42, 196, 218, 0.22), inset 0 1px rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.primary-button::after {
  position: absolute;
  right: 20px;
  width: 35px;
  height: 35px;
  content: "";
  border: 1px solid rgba(5, 30, 39, 0.24);
  border-radius: 50%;
}

.primary-button:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.button-shine {
  position: absolute;
  top: -40px;
  left: -60px;
  width: 34px;
  height: 150px;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(25deg);
  animation: shine 4s ease-in-out infinite;
}

.primary-button b {
  position: relative;
  z-index: 1;
  font-size: 17px;
}

.primary-button small {
  position: relative;
  z-index: 1;
  margin-top: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.primary-button small i {
  position: absolute;
  left: calc(100% + 45px);
  font-style: normal;
  font-size: 18px;
  line-height: 8px;
}

.primary-button.compact {
  min-width: 238px;
  min-height: 62px;
}

.text-button {
  padding: 8px 0;
  color: #aac6d2;
  border: 0;
  border-bottom: 1px solid rgba(169, 202, 214, 0.32);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.text-button:hover {
  color: var(--cyan-soft);
}

.career-card {
  position: relative;
  display: flex;
  width: min(460px, 100%);
  justify-content: space-between;
  margin-top: 32px;
  padding: 13px 16px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(8, 25, 36, 0.62);
}

.career-card span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.career-card span:nth-child(2) {
  text-align: right;
}

.career-card small {
  color: #698a9b;
  font-size: 8px;
  letter-spacing: 0.15em;
}

.career-card b {
  color: #d7f8ff;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.career-card > i,
.rank-progress-card > i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.career-card > i em,
.rank-progress-card > i em {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 12px var(--cyan);
  transition: width 500ms ease;
}

.hero-visual {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  perspective: 1000px;
}

.hero-visual::before {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  content: "";
  border: 1px solid rgba(67, 230, 241, 0.08);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27, 150, 172, 0.1), transparent 63%);
  box-shadow: inset 0 0 90px rgba(67, 230, 241, 0.05);
}

.radar-ring {
  position: absolute;
  border: 1px dashed rgba(83, 213, 233, 0.18);
  border-radius: 50%;
  animation: rotate 36s linear infinite;
}

.ring-one {
  width: 88%;
  aspect-ratio: 1;
}

.ring-two {
  width: 61%;
  aspect-ratio: 1;
  animation-direction: reverse;
  animation-duration: 24s;
}

.hero-domain {
  position: absolute;
  top: 35px;
  left: 11%;
  z-index: 5;
  display: grid;
  grid-template-columns: 38px auto;
  min-width: 235px;
  padding: 12px 16px;
  border: 1px solid rgba(119, 240, 159, 0.28);
  border-radius: 6px;
  background: rgba(7, 29, 37, 0.88);
  box-shadow: var(--shadow);
  animation: float 5s ease-in-out infinite;
}

.hero-domain span {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 21px;
}

.hero-domain b {
  font-size: 13px;
}

.hero-domain small {
  margin-top: 4px;
  color: var(--green);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.hero-chain {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 100%;
  transform: rotateY(-7deg) rotateX(2deg);
}

.hero-cert {
  position: relative;
  display: flex;
  width: 30%;
  min-height: 205px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(94, 205, 228, 0.27);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(16, 49, 65, 0.98), rgba(7, 23, 34, 0.98));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.04);
}

.hero-cert::before,
.fixed-cert::before,
.candidate-card::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.12;
  pointer-events: none;
  background-image: repeating-linear-gradient(135deg, transparent 0 17px, rgba(105, 214, 233, 0.22) 18px, transparent 19px);
}

.hero-cert > span {
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  width: 55px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--cyan-soft);
  border: 1px solid rgba(67, 230, 241, 0.34);
  border-radius: 50%;
  background: rgba(67, 230, 241, 0.08);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-cert b {
  font-size: 13px;
}

.hero-cert small {
  margin-top: 7px;
  overflow: hidden;
  color: #789ead;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-cert.intermediate {
  transform: translateY(15px);
}

.hero-cert.root {
  border-color: rgba(255, 209, 102, 0.26);
  transform: translateY(30px);
}

.hero-cert.root > span {
  color: var(--yellow);
  border-color: rgba(255, 209, 102, 0.32);
  background: rgba(255, 209, 102, 0.08);
}

.chain-link {
  position: relative;
  display: flex;
  width: 5%;
  height: 1px;
  justify-content: center;
  background: rgba(67, 230, 241, 0.42);
  box-shadow: 0 0 10px rgba(67, 230, 241, 0.32);
}

.chain-link b {
  position: absolute;
  top: -12px;
  display: grid;
  width: 24px;
  aspect-ratio: 1;
  place-items: center;
  color: #071821;
  border-radius: 50%;
  background: var(--green);
  font-size: 11px;
  font-style: normal;
}

.scan-line {
  position: absolute;
  z-index: 6;
  top: 18%;
  bottom: 9%;
  width: 2px;
  background: linear-gradient(transparent, var(--cyan), transparent);
  box-shadow: 0 0 22px var(--cyan);
  opacity: 0.7;
  animation: scan 4.6s ease-in-out infinite;
}

.concept-strip {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 58px);
  padding: 19px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 25, 36, 0.34);
}

.concept-strip span {
  display: flex;
  align-items: center;
  gap: 13px;
}

.concept-strip span i {
  color: var(--cyan);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.12em;
}

.concept-strip span b {
  color: #a9c4cf;
  font-size: 12px;
}

.concept-strip > em {
  color: #2f5969;
  font-size: 22px;
  font-style: normal;
}

/* Game console */
.game-screen {
  width: min(1420px, 100%);
  margin: 0 auto;
  padding-top: 14px;
}

.hud {
  display: grid;
  grid-template-columns: 0.65fr 0.85fr 1.35fr 1.2fr 0.85fr 1fr;
  margin: 5px 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(7, 25, 36, 0.74);
}

.hud > div {
  position: relative;
  display: flex;
  min-height: 54px;
  flex-direction: column;
  justify-content: center;
  padding: 8px 16px;
  border-right: 1px solid var(--line);
}

.hud > div:last-child {
  border-right: 0;
}

.hud small,
.difficulty-chip small {
  color: #65889b;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hud b {
  margin-top: 3px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.hud b i {
  margin: 0 3px;
  color: #517285;
  font-size: 11px;
  font-style: normal;
}

.timer-stat b {
  color: var(--cyan-soft);
}

.timer-track {
  position: absolute;
  right: 12px;
  bottom: 9px;
  left: 55px;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
}

.timer-track em {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transition: width 100ms linear, background 180ms ease;
}

.integrity-stat b {
  color: var(--green);
  font-size: 14px;
  letter-spacing: 0.15em;
}

.score-stat b {
  color: var(--yellow);
}

.operation-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 74px;
  margin-bottom: 12px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(90deg, rgba(12, 39, 53, 0.94), rgba(8, 27, 39, 0.9));
  box-shadow: 0 12px 30px rgba(0, 5, 10, 0.17);
}

.traffic-light {
  display: flex;
  gap: 5px;
  margin-right: 20px;
}

.traffic-light i {
  width: 6px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #2c5868;
}

.traffic-light i:first-child {
  background: var(--green);
  box-shadow: 0 0 8px rgba(119, 240, 159, 0.55);
}

.request-domain {
  display: flex;
  align-items: center;
  gap: 13px;
}

.request-lock {
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--cyan-soft);
  border: 1px solid rgba(67, 230, 241, 0.28);
  border-radius: 50%;
  background: rgba(67, 230, 241, 0.08);
  font-size: 16px;
  font-weight: 900;
}

.request-domain p {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.request-domain small {
  color: #5e8293;
  font-size: 8px;
  letter-spacing: 0.15em;
}

.request-domain strong {
  margin-top: 5px;
  font-size: clamp(15px, 1.7vw, 21px);
  letter-spacing: 0.02em;
}

.difficulty-chip {
  display: flex;
  min-width: 112px;
  flex-direction: column;
  align-items: flex-end;
}

.difficulty-chip b {
  margin-top: 5px;
  color: var(--orange);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(340px, 0.84fr);
  gap: 12px;
}

.chain-console,
.inspection-console {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: 0 20px 45px rgba(0, 5, 10, 0.19);
}

.panel-heading {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(20, 53, 67, 0.32);
}

.panel-heading span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-heading span small {
  display: grid;
  width: 25px;
  aspect-ratio: 1;
  place-items: center;
  color: #06202a;
  border-radius: 4px;
  background: var(--cyan);
  font-size: 9px;
  font-weight: 900;
}

.panel-heading span b {
  font-size: 13px;
}

.panel-heading > em {
  color: #6f93a3;
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.1em;
}

.chain-board {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) 34px minmax(180px, 1fr) 34px minmax(180px, 1fr);
  min-height: 560px;
  align-items: center;
  gap: 2px;
  padding: clamp(16px, 2vw, 30px);
}

.fixed-cert {
  position: relative;
  min-height: 285px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid rgba(67, 230, 241, 0.33);
  border-radius: 8px 3px 8px 3px;
  background: linear-gradient(145deg, rgba(18, 57, 72, 0.98), rgba(7, 24, 35, 0.98));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05), 0 17px 34px rgba(0, 5, 10, 0.26);
}

.cert-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cert-top span {
  padding: 4px 7px;
  color: #05222b;
  border-radius: 3px;
  background: var(--cyan);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.cert-top i {
  color: #5c8394;
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.12em;
}

.cert-seal {
  position: relative;
  z-index: 1;
  display: grid;
  width: 84px;
  aspect-ratio: 1;
  margin: 35px auto 25px;
  place-items: center;
  border: 1px solid rgba(67, 230, 241, 0.28);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(67, 230, 241, 0.12), rgba(67, 230, 241, 0.02));
}

.cert-seal::before,
.cert-seal::after {
  position: absolute;
  border: 1px dashed rgba(67, 230, 241, 0.24);
  border-radius: 50%;
  content: "";
}

.cert-seal::before {
  inset: 8px;
}

.cert-seal::after {
  inset: -7px;
}

.cert-seal b {
  color: var(--cyan-soft);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.cert-seal i {
  position: absolute;
  bottom: -7px;
  width: 34px;
  height: 16px;
  background: linear-gradient(90deg, transparent, rgba(67, 230, 241, 0.28), transparent);
  clip-path: polygon(0 0, 100% 0, 75% 100%, 50% 58%, 25% 100%);
}

.fixed-cert h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  overflow: hidden;
  font-size: clamp(14px, 1.25vw, 18px);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixed-cert dl {
  position: relative;
  z-index: 1;
  margin: 0;
  border-top: 1px solid var(--line);
}

.fixed-cert dl div {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.fixed-cert dt {
  margin-bottom: 4px;
  color: #658898;
  font-size: 8px;
}

.fixed-cert dd {
  margin: 0;
  overflow: hidden;
  color: #c3e4ed;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connector {
  display: flex;
  align-items: center;
}

.connector i {
  height: 1px;
  flex: 1;
  background: #335e6d;
}

.connector b {
  display: grid;
  width: 25px;
  aspect-ratio: 1;
  place-items: center;
  color: #87a7b5;
  border: 1px solid #335e6d;
  border-radius: 50%;
  background: #0a1d29;
  font-size: 10px;
}

.connector.pass i {
  background: var(--green);
  box-shadow: 0 0 7px rgba(119, 240, 159, 0.4);
}

.connector.pass b {
  color: #062418;
  border-color: var(--green);
  background: var(--green);
}

.connector.fail i {
  background: var(--red);
  box-shadow: 0 0 7px rgba(255, 99, 128, 0.4);
}

.connector.fail b {
  color: #2a0710;
  border-color: var(--red);
  background: var(--red);
}

.candidate-stage {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.candidate-stage legend {
  width: 100%;
  margin-bottom: 10px;
  color: #6c8e9e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

.candidate-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.candidate-card {
  position: relative;
  min-height: 137px;
  padding: 14px;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(103, 177, 197, 0.2);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(15, 43, 57, 0.96), rgba(8, 26, 37, 0.96));
  cursor: pointer;
  transition: border 150ms ease, transform 150ms ease, background 150ms ease;
}

.candidate-card:hover:not(:disabled) {
  border-color: rgba(67, 230, 241, 0.48);
  transform: translateY(-2px);
}

.candidate-card.selected {
  border-color: var(--cyan);
  background: linear-gradient(145deg, rgba(20, 69, 82, 0.98), rgba(8, 33, 44, 0.98));
  box-shadow: 0 0 0 1px rgba(67, 230, 241, 0.13), 0 0 25px rgba(67, 230, 241, 0.08);
}

.candidate-card.correct {
  border-color: var(--green);
  background: linear-gradient(145deg, rgba(24, 68, 58, 0.98), rgba(8, 35, 34, 0.98));
}

.candidate-card.wrong {
  border-color: var(--red);
  background: linear-gradient(145deg, rgba(70, 35, 45, 0.98), rgba(37, 19, 27, 0.98));
}

.candidate-card:disabled {
  opacity: 0.74;
}

.candidate-card .candidate-type {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.candidate-card .candidate-type span {
  color: var(--cyan);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.candidate-card.root-option .candidate-type span {
  color: var(--yellow);
}

.candidate-card .candidate-type i {
  display: grid;
  width: 18px;
  aspect-ratio: 1;
  place-items: center;
  color: #789baa;
  border: 1px solid #315464;
  border-radius: 50%;
  font-size: 8px;
  font-style: normal;
}

.candidate-card.selected .candidate-type i {
  color: #06232a;
  border-color: var(--cyan);
  background: var(--cyan);
}

.candidate-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 9px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-card p {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  margin: 0;
  color: #638596;
  font-size: 8px;
}

.candidate-card p b {
  max-width: 68%;
  overflow: hidden;
  color: #9abac8;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspection-console {
  display: flex;
  flex-direction: column;
}

.compact-heading > em {
  color: var(--green);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 12px;
  gap: 7px;
}

.detail-grid > div {
  min-width: 0;
  min-height: 64px;
  padding: 11px;
  border: 1px solid rgba(107, 184, 201, 0.13);
  border-radius: 5px;
  background: rgba(5, 20, 30, 0.58);
}

.detail-grid small {
  display: block;
  margin-bottom: 7px;
  color: #557888;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.detail-grid b {
  display: block;
  overflow: hidden;
  color: #a9c9d5;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checklist {
  margin: 0 12px;
  border-top: 1px solid var(--line);
}

.checklist > div {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  min-height: 58px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
}

.checklist > div > i {
  display: grid;
  width: 24px;
  aspect-ratio: 1;
  place-items: center;
  color: #658899;
  border: 1px solid #2d5362;
  border-radius: 50%;
  font-size: 8px;
  font-style: normal;
}

.checklist span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.checklist span b {
  font-size: 10px;
}

.checklist span small {
  margin-top: 3px;
  overflow: hidden;
  color: #5f8190;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checklist > div > em {
  color: #668795;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.checklist > div.pass > i {
  color: #062417;
  border-color: var(--green);
  background: var(--green);
}

.checklist > div.pass > em {
  color: var(--green);
}

.checklist > div.fail > i {
  color: #2a0710;
  border-color: var(--red);
  background: var(--red);
}

.checklist > div.fail > em {
  color: var(--red);
}

.checklist > div.scanning {
  background: linear-gradient(90deg, transparent, rgba(67, 230, 241, 0.05), transparent);
}

.scanner-tools {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 8px;
  margin-top: auto;
  padding: 12px;
}

.hint-button,
.verify-button {
  min-height: 60px;
  color: var(--ink);
  border: 1px solid rgba(102, 181, 201, 0.22);
  border-radius: 6px;
  background: rgba(11, 36, 49, 0.92);
  cursor: pointer;
}

.hint-button {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  padding: 9px 10px;
  text-align: left;
}

.hint-button > span {
  grid-row: 1 / span 2;
  color: var(--yellow);
  font-size: 18px;
}

.hint-button b,
.verify-button b {
  font-size: 10px;
}

.hint-button small {
  color: #6f91a0;
  font-size: 8px;
}

.hint-button small i {
  color: var(--yellow);
  font-style: normal;
}

.hint-button:disabled {
  opacity: 0.38;
}

.verify-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #06212a;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan-soft), #42d8e7);
}

.verify-button > span {
  margin-bottom: 3px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.verify-button:disabled {
  color: #5d7781;
  border-color: rgba(99, 148, 163, 0.16);
  background: rgba(22, 48, 59, 0.7);
}

.decision-panel {
  padding: 2px 12px 12px;
}

.decision-panel > p {
  margin: 0 0 8px;
  color: #7a9aa8;
  font-size: 9px;
  text-align: center;
}

.decision-panel > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.block-button,
.allow-button {
  display: grid;
  grid-template-columns: 30px 1fr;
  min-height: 57px;
  align-items: center;
  padding: 8px 11px;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
}

.block-button {
  color: #ffc2cd;
  border: 1px solid rgba(255, 99, 128, 0.42);
  background: rgba(255, 99, 128, 0.09);
}

.allow-button {
  color: #c6ffd8;
  border: 1px solid rgba(119, 240, 159, 0.42);
  background: rgba(119, 240, 159, 0.09);
}

.block-button > span,
.allow-button > span {
  grid-row: 1 / span 2;
  font-size: 20px;
}

.block-button b,
.allow-button b {
  font-size: 10px;
}

.block-button small,
.allow-button small {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.lesson-toast {
  position: fixed;
  z-index: 50;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: 54px 1fr auto;
  width: min(780px, calc(100% - 32px));
  min-height: 105px;
  align-items: center;
  gap: 16px;
  margin: 0 auto;
  padding: 15px 16px;
  border: 1px solid rgba(119, 240, 159, 0.42);
  border-radius: 8px;
  background: rgba(8, 30, 39, 0.97);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.54), inset 0 1px rgba(255, 255, 255, 0.04);
  animation: toast-in 260ms ease both;
}

.lesson-toast.wrong-result {
  border-color: rgba(255, 99, 128, 0.48);
}

.lesson-toast > span {
  display: grid;
  width: 50px;
  aspect-ratio: 1;
  place-items: center;
  color: #062419;
  border-radius: 50%;
  background: var(--green);
  font-size: 24px;
  font-weight: 900;
}

.lesson-toast.wrong-result > span {
  color: #300914;
  background: var(--red);
}

.lesson-toast > div {
  min-width: 0;
}

.lesson-toast small {
  color: var(--green);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.lesson-toast.wrong-result small {
  color: var(--red);
}

.lesson-toast b {
  display: block;
  margin: 4px 0;
  font-size: 13px;
}

.lesson-toast p {
  margin: 0;
  color: #7f9eab;
  font-size: 10px;
  line-height: 1.5;
}

.lesson-toast button {
  min-height: 47px;
  padding: 0 17px;
  color: #071b23;
  border: 0;
  border-radius: 5px;
  background: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.lesson-toast button i {
  margin-left: 7px;
  font-style: normal;
}

/* Results */
.shift-screen,
.gameover-screen {
  display: flex;
  width: min(880px, 100%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 42px 16px 28px;
  text-align: center;
}

.shift-emblem {
  position: relative;
  display: grid;
  width: 100px;
  aspect-ratio: 1;
  margin-bottom: 24px;
  place-items: center;
  color: #082216;
  clip-path: polygon(50% 0, 93% 17%, 87% 72%, 50% 100%, 13% 72%, 7% 17%);
  background: linear-gradient(145deg, #c4ffd3, var(--green));
  filter: drop-shadow(0 0 28px rgba(119, 240, 159, 0.2));
}

.shift-emblem::before {
  position: absolute;
  inset: 7px;
  content: "";
  clip-path: inherit;
  background: #09251e;
}

.shift-emblem span {
  position: relative;
  color: var(--green);
  font-size: 39px;
  font-weight: 900;
}

.shift-emblem i {
  position: absolute;
  width: 150%;
  aspect-ratio: 1;
  border: 1px dashed rgba(119, 240, 159, 0.22);
  border-radius: 50%;
  animation: rotate 20s linear infinite;
}

.shift-screen h2,
.gameover-screen h2 {
  margin: 0;
  font-size: clamp(27px, 4vw, 45px);
  letter-spacing: -0.04em;
}

.result-lead {
  margin: 13px 0 23px;
  color: #8cabb8;
  font-size: 13px;
  line-height: 1.7;
}

.shift-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(620px, 100%);
  margin-bottom: 25px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(8, 28, 40, 0.75);
}

.shift-summary > div {
  display: flex;
  min-height: 75px;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
}

.shift-summary > div:last-child {
  border-right: 0;
}

.shift-summary small,
.final-stats small,
.final-score-card small {
  color: #648696;
  font-size: 8px;
  letter-spacing: 0.13em;
}

.shift-summary b {
  margin-top: 6px;
  color: var(--cyan-soft);
  font-size: 18px;
}

.upgrade-area {
  width: 100%;
  margin-bottom: 22px;
}

.upgrade-area > p {
  margin: 0 0 12px;
  color: #819eaa;
  font-size: 11px;
}

.upgrade-area > p span {
  margin-right: 7px;
  color: var(--yellow);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.upgrade-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.upgrade-card {
  position: relative;
  min-height: 154px;
  padding: 17px 15px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(17, 48, 62, 0.95), rgba(8, 27, 38, 0.95));
  cursor: pointer;
  transition: 160ms ease;
}

.upgrade-card:hover,
.upgrade-card.selected {
  border-color: var(--yellow);
  box-shadow: 0 0 25px rgba(255, 209, 102, 0.08);
  transform: translateY(-3px);
}

.upgrade-card > span {
  display: grid;
  width: 40px;
  aspect-ratio: 1;
  margin: 0 auto 12px;
  place-items: center;
  color: var(--yellow);
  border: 1px solid rgba(255, 209, 102, 0.28);
  border-radius: 50%;
  background: rgba(255, 209, 102, 0.07);
  font-size: 19px;
}

.upgrade-card b {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}

.upgrade-card small {
  display: block;
  color: #7896a3;
  font-size: 9px;
  line-height: 1.55;
}

.breach-icon {
  display: grid;
  width: 85px;
  aspect-ratio: 1;
  margin-bottom: 21px;
  place-items: center;
  color: var(--red);
  border: 1px solid rgba(255, 99, 128, 0.4);
  border-radius: 50%;
  background: rgba(255, 99, 128, 0.08);
  box-shadow: 0 0 40px rgba(255, 99, 128, 0.12);
  font-size: 38px;
  font-weight: 900;
}

.final-score-card {
  position: relative;
  display: flex;
  width: min(420px, 100%);
  min-height: 126px;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid rgba(67, 230, 241, 0.25);
  border-radius: 7px;
  background: rgba(8, 30, 43, 0.78);
}

.final-score-card strong {
  margin-top: 5px;
  color: var(--yellow);
  font-size: 43px;
  font-variant-numeric: tabular-nums;
}

.final-score-card b {
  position: absolute;
  top: -10px;
  right: 14px;
  padding: 5px 8px;
  color: #092117;
  border-radius: 3px;
  background: var(--green);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.final-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(520px, 100%);
  margin-bottom: 14px;
}

.final-stats span {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-right: 1px solid var(--line);
}

.final-stats span:last-child {
  border-right: 0;
}

.final-stats b {
  margin-top: 6px;
  font-size: 13px;
}

.final-stats i {
  color: var(--cyan-soft);
  font-style: normal;
}

.rank-progress-card {
  position: relative;
  width: min(520px, 100%);
  margin-bottom: 28px;
  padding: 13px 14px 17px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(8, 27, 38, 0.68);
}

.rank-progress-card p {
  display: flex;
  justify-content: space-between;
  margin: 0 0 8px;
}

.rank-progress-card small {
  color: #668797;
  font-size: 8px;
  letter-spacing: 0.13em;
}

.rank-progress-card b {
  color: var(--cyan-soft);
  font-size: 10px;
  letter-spacing: 0.09em;
}

.rank-progress-card > span {
  display: block;
  color: #7898a5;
  font-size: 8px;
  text-align: right;
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.secondary-button {
  min-width: 150px;
  min-height: 58px;
  padding: 0 18px;
  color: #a5c0cc;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(10, 31, 43, 0.7);
  font-size: 11px;
  cursor: pointer;
}

/* Help dialog */
.help-dialog {
  width: min(720px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: clamp(23px, 4vw, 42px);
  overflow-y: auto;
  color: var(--ink);
  border: 1px solid rgba(67, 230, 241, 0.28);
  border-radius: 8px;
  background: linear-gradient(145deg, #0c2736, #071822);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.65);
}

.help-dialog::backdrop {
  background: rgba(1, 7, 12, 0.8);
  backdrop-filter: blur(8px);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  color: #91adba;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(5, 19, 27, 0.6);
  cursor: pointer;
}

.help-dialog h2 {
  margin: 0 0 24px;
  font-size: clamp(27px, 5vw, 43px);
  line-height: 1.17;
  letter-spacing: -0.04em;
}

.brief-chain {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  margin-bottom: 25px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(4, 18, 27, 0.56);
}

.brief-chain span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.brief-chain span i {
  display: grid;
  width: 28px;
  aspect-ratio: 1;
  place-items: center;
  color: #06212a;
  border-radius: 50%;
  background: var(--cyan);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.brief-chain span b {
  font-size: 10px;
}

.brief-chain em {
  color: #688998;
  font-size: 8px;
  font-style: normal;
}

.help-dialog ol {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-dialog li {
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 15px;
  align-items: start;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.help-dialog li b {
  color: var(--cyan-soft);
  font-size: 11px;
}

.help-dialog li span {
  color: #90abb6;
  font-size: 10px;
  line-height: 1.65;
}

.brief-note {
  margin: 19px 0 22px;
  padding: 12px 14px;
  color: #8faab5;
  border-left: 3px solid var(--yellow);
  background: rgba(255, 209, 102, 0.05);
  font-size: 10px;
  line-height: 1.6;
}

.brief-note b {
  margin-right: 8px;
  color: var(--yellow);
  font-size: 8px;
  letter-spacing: 0.12em;
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

@keyframes float {
  50% { transform: translateY(-8px); }
}

@keyframes scan {
  0%, 100% { left: 13%; opacity: 0; }
  15%, 85% { opacity: 0.7; }
  50% { left: 87%; }
}

@keyframes shine {
  0%, 60% { left: -60px; }
  85%, 100% { left: 120%; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1080px) {
  .start-screen {
    grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
  }

  .hero-chain {
    transform: scale(0.94) rotateY(-5deg);
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .chain-board {
    min-height: 450px;
  }

  .inspection-console {
    display: grid;
    grid-template-columns: 0.9fr 1.25fr;
  }

  .inspection-console .panel-heading {
    grid-column: 1 / -1;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .checklist {
    margin: 12px 12px 0 0;
  }

  .scanner-tools,
  .decision-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .app {
    padding-right: 11px;
    padding-left: 11px;
  }

  .brand-mark {
    width: 35px;
    height: 39px;
  }

  .brand strong {
    font-size: 11px;
  }

  .brand small {
    font-size: 6px;
  }

  .best-chip {
    display: none;
  }

  .round-button {
    width: 37px;
  }

  .screen {
    min-height: calc(100dvh - 75px);
  }

  .start-screen {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 42px 4px 18px;
  }

  .hero-copy {
    width: 100%;
    text-align: center;
  }

  .eyebrow {
    justify-content: center;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .hero-lead {
    margin: 19px 0 23px;
    font-size: 14px;
  }

  .start-actions {
    flex-direction: column;
    gap: 12px;
  }

  .primary-button {
    width: min(300px, 100%);
  }

  .career-card {
    width: min(360px, 100%);
    margin: 22px auto 0;
  }

  .hero-visual {
    width: 100%;
    min-height: 370px;
  }

  .hero-domain {
    top: 4px;
    left: 2%;
    min-width: 205px;
  }

  .hero-chain {
    transform: none;
  }

  .hero-cert {
    min-height: 167px;
    padding: 11px;
  }

  .hero-cert > span {
    top: 13px;
    left: 50%;
    width: 42px;
    transform: translateX(-50%);
    font-size: 7px;
  }

  .hero-cert b {
    font-size: 9px;
    text-align: center;
  }

  .hero-cert small {
    font-size: 7px;
    text-align: center;
  }

  .chain-link {
    width: 5%;
  }

  .chain-link b {
    width: 19px;
    top: -9px;
    font-size: 8px;
  }

  .concept-strip {
    width: 100%;
    gap: 8px;
    padding: 15px 7px;
  }

  .concept-strip span {
    gap: 5px;
  }

  .concept-strip span i {
    font-size: 7px;
  }

  .concept-strip span b {
    font-size: 9px;
  }

  .concept-strip > em {
    font-size: 15px;
  }

  .game-screen {
    padding-top: 7px;
  }

  .hud {
    grid-template-columns: repeat(3, 1fr);
  }

  .hud > div {
    min-height: 48px;
    padding: 7px 9px;
    border-bottom: 1px solid var(--line);
  }

  .hud > div:nth-child(3),
  .hud > div:nth-child(6) {
    border-right: 0;
  }

  .hud > div:nth-child(n+4) {
    border-bottom: 0;
  }

  .hud small {
    font-size: 6px;
  }

  .hud b {
    font-size: 13px;
  }

  .timer-track {
    right: 7px;
    bottom: 7px;
    left: 38px;
  }

  .operation-bar {
    min-height: 65px;
    padding: 0 10px;
  }

  .traffic-light {
    display: none;
  }

  .request-lock {
    width: 33px;
  }

  .request-domain strong {
    font-size: 14px;
  }

  .difficulty-chip {
    min-width: 82px;
  }

  .difficulty-chip small {
    font-size: 6px;
  }

  .difficulty-chip b {
    font-size: 8px;
  }

  .panel-heading {
    min-height: 51px;
    padding: 9px 10px;
  }

  .panel-heading span b {
    font-size: 11px;
  }

  .panel-heading > em {
    max-width: 45%;
    overflow: hidden;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chain-board {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    gap: 9px;
    padding: 12px;
  }

  .fixed-cert {
    min-height: 164px;
    padding: 11px;
  }

  .cert-top i {
    display: none;
  }

  .cert-seal {
    position: absolute;
    top: 42px;
    left: 16px;
    width: 55px;
    margin: 0;
  }

  .fixed-cert h2 {
    margin: 24px 0 18px 75px;
    text-align: left;
  }

  .fixed-cert dl {
    margin-left: 75px;
  }

  .fixed-cert dl div {
    padding: 7px 0;
  }

  .connector {
    width: 1px;
    height: 24px;
    flex-direction: column;
    justify-self: center;
  }

  .connector i {
    width: 1px;
    height: auto;
  }

  .candidate-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .candidate-card {
    min-height: 112px;
    padding: 11px;
  }

  .candidate-card .candidate-type {
    margin-bottom: 13px;
  }

  .candidate-card h3 {
    font-size: 10px;
  }

  .candidate-card p {
    flex-direction: column;
    gap: 4px;
  }

  .candidate-card p b {
    max-width: 100%;
  }

  .inspection-console {
    display: block;
  }

  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .checklist {
    margin: 0 12px;
  }

  .scanner-tools {
    position: sticky;
    bottom: 0;
    z-index: 4;
    background: rgba(8, 27, 39, 0.97);
  }

  .lesson-toast {
    grid-template-columns: 42px 1fr;
    gap: 10px;
    padding: 12px;
  }

  .lesson-toast > span {
    width: 40px;
  }

  .lesson-toast b {
    font-size: 11px;
  }

  .lesson-toast p {
    font-size: 9px;
  }

  .lesson-toast button {
    grid-column: 1 / -1;
    min-height: 43px;
  }

  .shift-screen,
  .gameover-screen {
    justify-content: flex-start;
    padding-top: 50px;
  }

  .shift-emblem {
    width: 78px;
  }

  .upgrade-list {
    grid-template-columns: 1fr;
  }

  .upgrade-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    min-height: 88px;
    align-items: center;
    padding: 12px;
    text-align: left;
  }

  .upgrade-card > span {
    grid-row: 1 / span 2;
    margin: 0;
  }

  .upgrade-card b {
    margin: 0 0 4px;
  }

  .result-actions {
    width: 100%;
    flex-direction: column-reverse;
  }

  .result-actions > button {
    width: min(300px, 100%);
  }

  .brief-chain {
    padding: 12px 7px;
  }

  .brief-chain span b {
    font-size: 8px;
  }

  .brief-chain em {
    font-size: 6px;
  }

  .help-dialog li {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

@media (max-width: 390px) {
  .brand > span:last-child {
    display: none;
  }

  .hero-visual {
    min-height: 335px;
  }

  .hero-cert {
    min-height: 150px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .final-stats {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
