:root {
  --ink: #243141;
  --muted: #66758a;
  --paper: #fffdf6;
  --panel: #ffffff;
  --sea: #bfe7f7;
  --sea-deep: #69b7d8;
  --land: #dff1c9;
  --route: #2f86a6;
  --route-risk: #d95745;
  --amber: #f8bd3d;
  --orange: #ef8f36;
  --green: #287446;
  --blue: #2369a8;
  --red: #d95050;
  --purple: #7a75c9;
  --shadow: 0 14px 36px rgba(36, 49, 65, 0.14);
  font-family:
    Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic",
    system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62) 0 25%, transparent 25% 50%, rgba(255, 255, 255, 0.38) 50% 75%, transparent 75%),
    linear-gradient(140deg, #f3fbff 0%, #f9f3de 46%, #edf7e7 100%);
  background-size: 34px 34px, auto;
  color: var(--ink);
  min-height: 100vh;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.title-block h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.02;
  letter-spacing: 0;
}

.title-block p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.lesson-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.phase-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.phase-steps span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(36, 49, 65, 0.12);
  color: #617184;
  font-size: 13px;
  font-weight: 900;
}

.phase-steps b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(36, 49, 65, 0.08);
  color: #41566d;
}

.phase-steps .active {
  background: #eaf5ff;
  border-color: rgba(74, 144, 217, 0.44);
  color: #255f9a;
  box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.1);
}

.phase-steps .active b {
  background: var(--blue);
  color: white;
}

.phase-steps .done {
  background: #e9f7ed;
  color: #2f7650;
}

.phase-steps .done b {
  background: var(--green);
  color: white;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #38536e;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(73, 119, 143, 0.18);
}

.round-panel {
  min-width: 260px;
  padding: 16px;
  background: var(--panel);
  border: 2px solid rgba(36, 49, 65, 0.1);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.round-panel .eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.round-panel .week {
  display: flex;
  align-items: end;
  gap: 8px;
}

.round-panel .week strong {
  font-size: 36px;
  line-height: 1;
}

.round-panel .week span {
  color: var(--muted);
  font-weight: 700;
  padding-bottom: 4px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.board-card,
.side-card,
.intro-card,
.result-card {
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid rgba(36, 49, 65, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.board-card {
  padding: 14px;
  perspective: 1200px;
}

.game-board {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    linear-gradient(0deg, rgba(105, 183, 216, 0.22), rgba(105, 183, 216, 0.22)),
    linear-gradient(160deg, var(--sea) 0%, #d7f2fb 42%, #9ed8eb 100%);
  background-size: 36px 36px, 36px 36px, auto, auto;
  border: 2px solid rgba(47, 134, 166, 0.24);
  box-shadow:
    inset 0 18px 40px rgba(255, 255, 255, 0.42),
    inset 0 -26px 42px rgba(40, 121, 151, 0.16);
  transform: rotateX(2.4deg);
  transform-origin: center top;
}

.game-board::before,
.game-board::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.game-board::before {
  background:
    repeating-linear-gradient(
      -8deg,
      transparent 0 32px,
      rgba(255, 255, 255, 0.2) 32px 34px
    );
  animation: seaDrift 9s linear infinite;
}

.game-board::after {
  border: 12px solid rgba(255, 255, 255, 0.25);
  border-radius: inherit;
}

.land {
  position: absolute;
  border: 3px solid rgba(88, 143, 83, 0.3);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.5), transparent),
    var(--land);
  border-radius: 8px;
  box-shadow:
    0 16px 28px rgba(50, 100, 70, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.land.producer-land {
  left: 4%;
  top: 10%;
  width: 25%;
  height: 72%;
  transform: rotate(-3deg);
}

.land.consumer-land {
  right: 4%;
  top: 12%;
  width: 26%;
  height: 70%;
  transform: rotate(3deg);
}

.map-route {
  position: absolute;
  left: 29%;
  right: 30%;
  height: 12px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    90deg,
    rgba(47, 134, 166, 0.95) 0 24px,
    rgba(255, 255, 255, 0.75) 24px 34px
  );
  background-size: 68px 12px;
  box-shadow: 0 4px 0 rgba(47, 134, 166, 0.15);
  animation: routeFlow 2.1s linear infinite;
}

.map-route.close {
  top: 44%;
}

.map-route.close.risky {
  background: repeating-linear-gradient(
    90deg,
    rgba(217, 87, 69, 0.95) 0 24px,
    rgba(255, 255, 255, 0.82) 24px 34px
  );
  background-size: 68px 12px;
}

.map-route.active {
  filter: saturate(1.18);
  box-shadow:
    0 4px 0 rgba(47, 134, 166, 0.15),
    0 0 0 6px rgba(255, 255, 255, 0.32);
}

.map-route.far {
  top: 65%;
  height: 10px;
  opacity: 0.78;
  background: repeating-linear-gradient(
    90deg,
    rgba(122, 117, 201, 0.9) 0 18px,
    rgba(255, 255, 255, 0.78) 18px 28px
  );
  background-size: 56px 10px;
  animation-duration: 3s;
}

.route-label {
  position: absolute;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #31526a;
  font-weight: 900;
  font-size: 13px;
  border: 1px solid rgba(49, 82, 106, 0.14);
  box-shadow: 0 8px 18px rgba(36, 49, 65, 0.1);
}

.route-label.close {
  left: 44%;
  top: 37%;
}

.route-label.far {
  left: 43%;
  top: 69%;
}

.map-node {
  position: absolute;
  display: grid;
  gap: 8px;
  justify-items: center;
  width: min(210px, 22%);
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.94);
  border: 2px solid rgba(36, 49, 65, 0.12);
  box-shadow: 0 10px 22px rgba(36, 49, 65, 0.14);
  text-align: center;
  transform: translateZ(0);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.map-node:hover {
  transform: translateY(-2px);
}

.map-node.producer {
  left: 7%;
  top: 20%;
}

.map-node.storage {
  left: 28%;
  top: 8%;
}

.map-node.consumer {
  right: 7%;
  top: 22%;
}

.map-node.reserve {
  right: 9%;
  bottom: 8%;
}

.map-node.consumer.shortage,
.map-node.storage.overflow {
  border-color: rgba(217, 80, 80, 0.56);
  box-shadow:
    0 10px 22px rgba(36, 49, 65, 0.14),
    0 0 0 6px rgba(217, 80, 80, 0.12);
  animation: cardNudge 520ms ease 1;
}

.map-node.consumer.supplied {
  border-color: rgba(78, 170, 114, 0.44);
  box-shadow:
    0 10px 22px rgba(36, 49, 65, 0.14),
    0 0 0 6px rgba(78, 170, 114, 0.12);
}

.map-node.storage.full,
.map-node.storage.warm {
  border-color: rgba(239, 143, 54, 0.45);
}

.feedback-badge {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(36, 49, 65, 0.08);
  color: #405166;
  font-size: 11px;
  font-weight: 900;
}

.feedback-badge.shortage {
  background: #ffe6e1;
  color: #b63f32;
}

.feedback-badge.supplied {
  background: #e4f7e9;
  color: #2f8655;
}

.node-icon {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.tank-visual {
  position: relative;
  width: 54px;
  height: 68px;
  overflow: hidden;
  border: 4px solid #243141;
  border-radius: 8px 8px 12px 12px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), transparent 38%),
    #f8fbff;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.48),
    0 10px 20px rgba(36, 49, 65, 0.16);
}

.tank-visual::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: -8px;
  height: 12px;
  border: 4px solid #243141;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f8fbff;
}

.tank-visual i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.12), transparent 62%),
    linear-gradient(90deg, #6ba7df, #4a90d9);
  transition: height 520ms ease;
}

.tank-visual i::after {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  top: -5px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  animation: liquidWave 2.4s ease-in-out infinite;
}

.tank-visual.warning i {
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.12), transparent 62%),
    linear-gradient(90deg, #f7a94e, var(--orange));
}

.tank-visual.danger i {
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.12), transparent 62%),
    linear-gradient(90deg, #e76e60, var(--red));
}

.node-title {
  display: block;
  font-size: 16px;
  font-weight: 900;
}

.node-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mini-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.mini-stat span {
  min-width: 32px;
  font-size: 12px;
  font-weight: 900;
  color: #38536e;
}

.progress {
  position: relative;
  flex: 1;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(36, 49, 65, 0.1);
}

.progress > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--blue);
  transition: width 240ms ease;
}

.progress.warning > i {
  background: var(--orange);
}

.progress.danger > i {
  background: var(--red);
}

.ship-marker {
  position: absolute;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(47, 134, 166, 0.22);
  box-shadow:
    0 12px 28px rgba(36, 49, 65, 0.18),
    0 0 0 8px rgba(255, 255, 255, 0.22);
  transition: left 620ms cubic-bezier(0.2, 0.8, 0.2, 1), top 620ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 500ms ease;
}

.ship-marker img {
  width: 48px;
  height: 48px;
  animation: shipBob 2.2s ease-in-out infinite;
}

.ship-marker::after {
  content: "";
  position: absolute;
  left: -16px;
  right: 50%;
  bottom: 12px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  filter: blur(1px);
}

.ship-marker.risk-jiggle {
  border-color: rgba(217, 80, 80, 0.42);
  animation: riskPulse 650ms ease 1;
}

.ship-marker.at-port {
  left: 34%;
  top: 36%;
}

.ship-marker.close-route {
  left: 52%;
  top: 35%;
}

.ship-marker.far-route {
  left: 53%;
  top: 57%;
}

.ship-marker.arrived {
  left: 70%;
  top: 36%;
}

.ship-marker.waiting {
  left: 47%;
  top: 57%;
  transform: rotate(-8deg);
}

.map-note {
  position: absolute;
  left: 34%;
  bottom: 8%;
  width: min(310px, 34%);
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.94);
  border: 2px dashed rgba(36, 49, 65, 0.16);
  color: #46576b;
  font-size: 14px;
  line-height: 1.55;
}

.board-token-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.board-token {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 7px 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(36, 49, 65, 0.08);
  font-size: 11px;
  font-weight: 900;
}

.board-token img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.side-stack {
  display: grid;
  gap: 12px;
}

.phase-panel {
  align-content: start;
}

.side-card {
  padding: 14px;
}

.focus-card {
  background: #f7fbff;
  border-color: rgba(74, 144, 217, 0.22);
}

.focus-card p {
  margin: 0;
  color: #4d6074;
  line-height: 1.55;
}

.compact-card {
  background: rgba(255, 255, 255, 0.86);
}

.step-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(74, 144, 217, 0.11);
  color: #285f95;
  font-size: 12px;
  font-weight: 900;
}

.side-card h2,
.side-card h3 {
  margin: 0 0 10px;
  line-height: 1.25;
}

.event-card {
  border-color: rgba(239, 143, 54, 0.32);
  background: #fff9ec;
  animation: cardFlipIn 280ms ease 1;
}

.event-card.risk {
  border-color: rgba(217, 80, 80, 0.42);
  background: #fff3ef;
}

.event-card.caution {
  border-color: rgba(248, 189, 61, 0.46);
}

.event-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 900;
  color: #885019;
}

.event-card p {
  margin: 0;
  color: #5e4d37;
  line-height: 1.55;
}

.actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.action-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px;
  border-radius: 8px;
  background: #f7fbff;
  color: var(--ink);
  border: 2px solid rgba(74, 144, 217, 0.16);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.action-button:hover {
  transform: translateY(-1px);
  border-color: rgba(74, 144, 217, 0.38);
  background: #ffffff;
}

.action-button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.reason-box textarea:focus-visible {
  outline: 4px solid rgba(74, 144, 217, 0.28);
  outline-offset: 3px;
}

.action-button.selected {
  border-color: var(--blue);
  background: #eaf5ff;
  box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.12);
}

.action-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.action-button strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

.action-button span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.action-count {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(36, 49, 65, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.reason-box {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.reason-box label {
  font-size: 13px;
  font-weight: 900;
  color: #34495d;
}

.reason-box textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border: 2px solid rgba(36, 49, 65, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: #fffdf8;
  color: var(--ink);
  line-height: 1.45;
}

.reason-box textarea:focus {
  outline: 3px solid rgba(74, 144, 217, 0.22);
  border-color: rgba(74, 144, 217, 0.5);
}

.reason-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}

.primary-button {
  flex: 1;
  background: var(--green);
  color: white;
  box-shadow: 0 8px 18px rgba(78, 170, 114, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(78, 170, 114, 0.34);
}

.primary-button:disabled {
  background: #7f8e83;
  cursor: not-allowed;
  box-shadow: none;
}

.secondary-button {
  background: #edf2f7;
  color: #34495d;
}

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

.criteria-list li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7fbff;
  border: 1px solid rgba(74, 144, 217, 0.14);
}

.criteria-list b {
  color: #214d7c;
  font-size: 13px;
}

.criteria-list span {
  color: #4d6074;
  font-size: 13px;
  line-height: 1.4;
}

.metric-list {
  display: grid;
  gap: 10px;
}

.metric {
  display: grid;
  gap: 6px;
}

.metric-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  font-weight: 900;
}

.metric-head b {
  color: #2f4357;
}

.metric-head span {
  color: var(--muted);
}

.log-list {
  display: grid;
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
}

.log-item {
  padding: 9px 10px;
  border-radius: 8px;
  background: #f7f7ee;
  border-left: 5px solid var(--amber);
  color: #3f4d5d;
  font-size: 13px;
  line-height: 1.45;
  animation: cardFlipIn 220ms ease 1;
}

.log-tag {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 22px;
  margin-right: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(74, 144, 217, 0.12);
  color: #315f91;
  font-size: 11px;
  font-weight: 900;
}

.learning-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #405166;
  line-height: 1.55;
  font-size: 14px;
}

.intro-screen,
.result-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.intro-card,
.result-card {
  width: min(980px, 100%);
  padding: 36px;
}

.intro-card h1,
.result-card h1 {
  margin: 0 0 14px;
  font-size: 56px;
  line-height: 1;
}

.intro-card p,
.result-card p {
  color: #4c5d70;
  line-height: 1.65;
  font-size: 17px;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.intro-feature {
  padding: 14px;
  border-radius: 8px;
  background: #f4f9ff;
  border: 1px solid rgba(74, 144, 217, 0.16);
}

.intro-feature strong {
  display: block;
  margin-bottom: 6px;
}

.intro-feature span {
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}

.result-box {
  padding: 16px;
  border-radius: 8px;
  background: #f7fbff;
  border: 1px solid rgba(74, 144, 217, 0.18);
}

.result-box h2 {
  margin: 0 0 10px;
}

.result-box ul,
.result-box ol {
  margin: 0;
  padding-left: 20px;
  color: #405166;
  line-height: 1.62;
}

.result-history {
  margin-top: 14px;
}

.summary-table {
  display: grid;
  gap: 6px;
}

.summary-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.2fr) minmax(0, 1.6fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(74, 144, 217, 0.12);
  color: #405166;
  font-size: 13px;
  line-height: 1.45;
}

.summary-head {
  background: #eaf5ff;
  color: #214d7c;
  font-weight: 900;
}

.concept-line {
  padding: 14px 16px;
  border-radius: 8px;
  background: #fff7d7;
  border: 2px solid rgba(248, 189, 61, 0.3);
  font-weight: 900;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes routeFlow {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 68px 0;
  }
}

@keyframes seaDrift {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(36px);
  }
}

@keyframes shipBob {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-4px) rotate(2deg);
  }
}

@keyframes liquidWave {
  0%,
  100% {
    transform: translateX(-4px);
  }

  50% {
    transform: translateX(4px);
  }
}

@keyframes cardNudge {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

@keyframes riskPulse {
  0%,
  100% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.06);
  }
}

@keyframes cardFlipIn {
  from {
    opacity: 0.72;
    transform: translateY(4px) rotateX(-5deg);
  }

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

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

  .game-board {
    transform: none;
  }
}

@media (max-width: 1050px) {
  .topbar,
  .main-grid {
    grid-template-columns: 1fr;
  }

  .round-panel {
    min-width: 0;
  }

  .game-board {
    min-height: 620px;
  }

  .map-node {
    width: 28%;
  }

  .map-node.storage {
    left: 36%;
    top: 5%;
  }

  .map-note {
    left: 30%;
    width: 40%;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px;
  }

  .title-block h1 {
    font-size: 34px;
  }

  .intro-card h1,
  .result-card h1 {
    font-size: 38px;
  }

  .intro-card,
  .result-card {
    padding: 22px;
  }

  .game-board {
    min-height: 760px;
    transform: none;
  }

  .land.producer-land {
    left: 3%;
    top: 7%;
    width: 43%;
    height: 34%;
  }

  .land.consumer-land {
    right: 3%;
    top: 7%;
    width: 43%;
    height: 34%;
  }

  .map-node {
    width: 40%;
    padding: 10px;
  }

  .map-node.producer {
    left: 5%;
    top: 10%;
  }

  .map-node.storage {
    left: 5%;
    top: 47%;
  }

  .map-node.consumer {
    right: 5%;
    top: 10%;
  }

  .map-node.reserve {
    right: 5%;
    top: 47%;
    bottom: auto;
  }

  .map-route {
    left: 20%;
    right: 20%;
  }

  .map-route.close {
    top: 37%;
  }

  .map-route.far {
    top: 69%;
  }

  .route-label.close {
    left: 32%;
    top: 39%;
  }

  .route-label.far {
    left: 34%;
    top: 72%;
  }

  .ship-marker.at-port,
  .ship-marker.close-route,
  .ship-marker.arrived {
    top: 34%;
  }

  .ship-marker.at-port {
    left: 23%;
  }

  .ship-marker.close-route {
    left: 44%;
  }

  .ship-marker.arrived {
    left: 64%;
  }

  .ship-marker.far-route,
  .ship-marker.waiting {
    top: 62%;
    left: 45%;
  }

  .map-note {
    left: 5%;
    right: 5%;
    bottom: 6%;
    width: auto;
  }

  .intro-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .summary-row {
    grid-template-columns: 1fr;
  }

  .summary-head {
    display: none;
  }
}
