:root {
  color-scheme: light;
  --sky-top: #c7ecff;
  --sky-bottom: #fef1d2;
  --leaf: #2f7a5f;
  --wood: #c07a45;
  --wood-dark: #7b4a27;
  --ink: #2b1c12;
  --cream: #fff7e6;
  --accent: #f0544f;
  --accent-dark: #b83632;
  --shadow: rgba(43, 28, 18, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "M PLUS Rounded 1c", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
  overflow-x: hidden;
}

.sky {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, #ffffffaa 0, transparent 50%),
    radial-gradient(circle at 80% 10%, #ffffff77 0, transparent 45%),
    radial-gradient(circle at 50% 80%, #ffffff55 0, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.cloud {
  position: fixed;
  width: 220px;
  height: 80px;
  background: #ffffffcc;
  border-radius: 999px;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.08));
  z-index: 0;
}

.cloud::after,
.cloud::before {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 999px;
}

.cloud::before {
  width: 80px;
  height: 80px;
  left: 30px;
  top: -30px;
}

.cloud::after {
  width: 110px;
  height: 110px;
  right: 20px;
  top: -50px;
}

.cloud-1 {
  top: 12vh;
  left: 6vw;
  animation: drift 18s ease-in-out infinite;
}

.cloud-2 {
  top: 24vh;
  right: 8vw;
  animation: drift 22s ease-in-out infinite reverse;
}

.cloud-3 {
  top: 60vh;
  left: 20vw;
  opacity: 0.7;
  animation: drift 26s ease-in-out infinite;
}

@keyframes drift {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(30px);
  }
}

.back-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 6vw 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.back-link::before {
  content: "<-";
}

.layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding: 0 6vw 4rem;
}

.hero {
  max-width: 760px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--wood-dark);
}

h1 {
  font-family: "Rammetto One", cursive;
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin: 0.4rem 0 1rem;
  color: var(--wood-dark);
}

.intro {
  font-size: 1.05rem;
  max-width: 55ch;
  line-height: 1.6;
  margin: 0 0 1.2rem;
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

button {
  font-family: inherit;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 20px var(--shadow);
}

button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 22px rgba(240, 84, 79, 0.35);
}

button.ghost {
  background: transparent;
  border: 2px dashed var(--wood-dark);
  color: var(--wood-dark);
}

.dashboard {
  background: var(--cream);
  border-radius: 24px;
  padding: 1.5rem 2rem;
  box-shadow: 0 18px 40px rgba(43, 28, 18, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.stat {
  background: #ffffff;
  border-radius: 18px;
  padding: 0.9rem 1rem;
  box-shadow: inset 0 0 0 2px rgba(123, 74, 39, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--wood-dark);
}

.stat .value {
  font-size: 1.6rem;
  font-weight: 700;
}

.status {
  background: #fff0d2;
  border-radius: 16px;
  padding: 0.85rem 1rem;
  font-weight: 500;
}

.game {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 2rem;
  align-items: start;
}

.tower {
  background: linear-gradient(180deg, #ffe6c0, #f7c48c);
  border-radius: 28px;
  padding: 1.6rem 1.2rem;
  box-shadow: inset 0 0 0 2px rgba(123, 74, 39, 0.12);
}

.tower-title {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--wood-dark);
}

.tower-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tower-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.8);
  color: var(--wood-dark);
}

.tower-list li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff6e8;
  border: 2px solid rgba(123, 74, 39, 0.2);
  font-weight: 700;
}

.tower-list li.current {
  background: var(--accent);
  color: white;
}

.tower-list li.current span {
  background: white;
  color: var(--accent-dark);
  border-color: transparent;
}

.tower-list li.done {
  background: rgba(47, 122, 95, 0.2);
  color: var(--leaf);
}

.event {
  background: #fffaf0;
  border-radius: 30px;
  padding: 2rem 2.4rem;
  box-shadow: 0 20px 45px rgba(43, 28, 18, 0.15);
  min-height: 320px;
  animation: rise 0.6s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.event-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.6rem;
}

.floor-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--wood);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2);
}

.floor-title {
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0;
}

.floor-sub {
  margin: 0.2rem 0 0;
  color: #5a3a22;
}

.floor-description {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0.8rem 0 1.4rem;
}

.choices {
  display: grid;
  gap: 0.8rem;
}

.choice {
  border-radius: 18px;
  background: #fff0d8;
  border: 2px solid transparent;
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
  line-height: 1.4;
}

.choice:hover {
  border-color: var(--accent);
}

.result {
  margin-top: 1.1rem;
  padding: 0.9rem 1rem;
  background: rgba(47, 122, 95, 0.1);
  border-radius: 16px;
  font-weight: 500;
}

.next {
  margin-top: 1.2rem;
}

@media (max-width: 960px) {
  .game {
    grid-template-columns: 1fr;
  }

  .tower {
    order: 2;
  }
}

@media (max-width: 720px) {
  .layout {
    padding: 0 7vw 3rem;
  }

  .event {
    padding: 1.5rem;
  }

  .tower-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .tower-list li {
    flex: 1 1 70px;
  }
}
