:root {
  color-scheme: dark;
  font-family: "Segoe UI", "Yu Gothic UI", Meiryo, sans-serif;
  background: #0c0d12;
  color: #f5f1e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(245, 193, 95, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(80, 178, 167, 0.07) 1px, transparent 1px),
    linear-gradient(145deg, #0c0d12 0%, #15131b 52%, #111822 100%);
  background-size: 34px 34px, 34px 34px, auto;
}

.guide {
  width: min(1120px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.hero {
  position: relative;
  min-height: 360px;
  display: grid;
  align-items: start;
  overflow: hidden;
  border: 1px solid rgba(245, 241, 232, 0.18);
  border-radius: 8px;
  background: #090a0d;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 12, 0.86), rgba(7, 8, 12, 0.18) 58%, rgba(7, 8, 12, 0.68)),
    linear-gradient(0deg, rgba(7, 8, 12, 0.9), transparent 48%);
  pointer-events: none;
}

.hero-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.hero-copy,
.hero-tagline {
  position: relative;
  z-index: 1;
}

.hero-copy {
  width: min(640px, 100%);
  padding: 34px;
}

.hero-tagline {
  position: absolute;
  left: 34px;
  bottom: 34px;
  max-width: min(640px, calc(100% - 68px));
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
  color: #fff4c6;
  text-shadow: 0 0 18px rgba(245, 193, 95, 0.35);
}

.hero-tagline,
.text-stack p,
.item-grid p,
.enemy-grid p,
.chest-list p,
.ending-note {
  color: #d8d0c0;
  line-height: 1.7;
}

.hero-tagline {
  font-size: 18px;
}

.section {
  padding: 30px 0;
  border-top: 1px solid rgba(245, 241, 232, 0.16);
}

.section:first-of-type {
  border-top: 0;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.eyebrow {
  color: #51dbc7;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  font-size: 28px;
  color: #f8f0c8;
}

h3,
strong {
  display: block;
  color: #fff4c6;
  font-size: 20px;
  line-height: 1.25;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(260px, 38%) 1fr;
  gap: 24px;
  align-items: center;
}

.feature-card {
  position: relative;
  min-height: 248px;
  overflow: hidden;
  border: 1px solid rgba(245, 241, 232, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(245, 241, 232, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(245, 241, 232, 0.05) 1px, transparent 1px),
    #090a0d;
  background-size: 34px 34px, 34px 34px, auto;
}

.rule-sprite {
  display: block;
  width: 94px;
  height: 112px;
  background-repeat: no-repeat;
  background-size: 800% 200%;
  background-position: 0 0;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.36));
}

.player-sprite {
  background-image: url("assets/knight.png?v=2");
}

.story-card {
  min-height: 226px;
}

.story-hero {
  position: absolute;
  left: 74px;
  bottom: 42px;
  z-index: 2;
}

.story-traitor {
  position: absolute;
  right: 70px;
  bottom: 42px;
  width: 94px;
  height: 112px;
  margin: 0;
  z-index: 1;
  transform: scaleX(-1);
}

.story-card::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 34px;
  bottom: 34px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(245, 193, 95, 0.54), transparent);
  box-shadow: 0 0 18px rgba(245, 193, 95, 0.34);
}

.story-card::after {
  content: "";
  position: absolute;
  inset: auto 54px 26px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.44), transparent 68%);
}

.controls-card .player-sprite {
  position: absolute;
  left: 50%;
  top: 34px;
  background-position: 28.571% 0;
  transform: translateX(-50%);
  z-index: 2;
}

.key-cluster {
  position: absolute;
  right: 34px;
  bottom: 28px;
  width: 122px;
  display: grid;
  grid-template-columns: repeat(3, 38px);
  gap: 6px;
}

.key-cluster span,
.space-key {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid rgba(245, 241, 232, 0.32);
  border-radius: 6px;
  background: rgba(245, 241, 232, 0.09);
  color: #f5f1e8;
  font-weight: 900;
}

.key-cluster span:first-child {
  grid-column: 2;
}

.key-cluster span:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.key-cluster span:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.key-cluster span:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

.space-key {
  position: absolute;
  left: 30px;
  bottom: 34px;
  width: 132px;
  color: #1d1720;
  background: #f5c15f;
}

.trail-stroke {
  position: absolute;
  right: 22px;
  top: 66px;
  width: 220px;
  height: 84px;
  z-index: 1;
  transform: rotate(-8deg);
  filter: drop-shadow(0 0 8px rgba(81, 219, 199, 0.7));
}

.trail-stroke svg {
  display: block;
  width: 100%;
  height: 100%;
}

.trail-stroke path {
  fill: none;
  stroke: #51dbc7;
  stroke-width: 8;
  stroke-linecap: round;
}

.life-card {
  min-height: 214px;
}

.life-player {
  position: absolute;
  left: 62px;
  top: 56px;
}

.life-heart {
  position: absolute;
  left: 50%;
  top: 48px;
  width: 108px;
  height: 108px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 16px rgba(255, 111, 174, 0.55));
}

.life-status {
  position: absolute;
  right: 50px;
  top: 60px;
  display: grid;
  align-content: center;
  place-items: center;
  width: 92px;
  min-height: 76px;
  padding: 14px 12px 11px;
  border: 2px solid #d4a64d;
  border-radius: 7px;
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
  color: #fff4c6;
  background:
    linear-gradient(135deg, rgba(255, 247, 183, 0.72), transparent 18%),
    linear-gradient(315deg, rgba(91, 45, 18, 0.78), transparent 22%),
    linear-gradient(180deg, #f0d386 0%, #a96c27 12%, #5f3519 22%, #17131e 23%, #11101a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 243, 183, 0.6),
    inset 0 0 0 5px rgba(48, 29, 18, 0.86),
    0 9px 18px rgba(0, 0, 0, 0.34);
}

.life-status::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(234, 193, 101, 0.6);
  border-radius: 4px;
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
  background:
    radial-gradient(circle at 50% 8%, rgba(81, 219, 199, 0.2), transparent 44%),
    linear-gradient(180deg, rgba(34, 35, 54, 0.95), rgba(19, 21, 34, 0.95));
  pointer-events: none;
}

.life-status-label,
.life-status-number {
  position: relative;
  z-index: 1;
}

.life-status-label {
  margin-bottom: 7px;
  color: #e7c77a;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.life-status-number {
  color: #f8f0c8;
  font-size: 29px;
  line-height: 1;
  font-weight: 900;
  text-shadow:
    0 2px 0 rgba(55, 33, 16, 0.9),
    0 0 10px rgba(245, 193, 95, 0.3);
}

.trail-card .loop-line {
  position: absolute;
  left: 88px;
  top: 42px;
  width: 286px;
  height: 162px;
  border: 8px solid #51dbc7;
  border-radius: 50%;
  transform: rotate(-12deg);
  background: rgba(81, 219, 199, 0.1);
  box-shadow: 0 0 18px rgba(81, 219, 199, 0.38);
}

.trail-player {
  position: absolute;
  left: 42px;
  bottom: 20px;
  z-index: 2;
}

.trail-slime {
  position: absolute;
  left: 150px;
  top: 86px;
  z-index: 1;
}

.trail-orc {
  position: absolute;
  left: 232px;
  top: 62px;
  width: 74px;
  height: 89px;
  z-index: 1;
}

.chest-item-image {
  transform: scale(0.85);
  transform-origin: center;
}

.text-stack {
  display: grid;
  gap: 10px;
  font-size: 16px;
}

.item-grid,
.enemy-grid,
.chest-list {
  display: grid;
  gap: 12px;
}

.item-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.enemy-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.chest-list {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

article {
  min-width: 0;
  border: 1px solid rgba(245, 241, 232, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(245, 241, 232, 0.08), rgba(245, 241, 232, 0.04)),
    rgba(9, 10, 13, 0.72);
}

.item-grid article,
.enemy-grid article {
  min-height: 238px;
  padding: 16px;
}

.item-grid img {
  display: block;
  width: 100%;
  height: 104px;
  margin-bottom: 12px;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.36));
}

.enemy-sprite {
  display: block;
  width: 94px;
  height: 112px;
  margin: 0 auto 12px;
  background-repeat: no-repeat;
  background-size: 800% 200%;
  background-position: 0 0;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.36));
}

.slime-sprite {
  width: 94px;
  height: 112px;
  background-image: url("assets/slime.png?v=4");
}

.orc-sprite {
  background-image: url("assets/orc.png");
}

.oni-sprite {
  background-image: url("assets/oni.png");
}

.wizard-sprite {
  background-image: url("assets/wizard.png");
}

.red-knight-sprite {
  background-image: url("assets/red-knight.png?v=2");
  filter:
    brightness(0)
    drop-shadow(0 0 10px rgba(223, 37, 59, 0.55))
    drop-shadow(0 10px 14px rgba(0, 0, 0, 0.36));
  opacity: 0.88;
}

.item-grid h3,
.enemy-grid h3 {
  margin-bottom: 7px;
}

.item-grid p,
.enemy-grid p,
.chest-list p {
  font-size: 14px;
}

.chest-list article {
  padding: 14px;
}

.chest-list strong {
  margin-bottom: 7px;
  font-size: 17px;
}

.ending-note {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(81, 219, 199, 0.28);
  border-radius: 8px;
  background: rgba(81, 219, 199, 0.08);
  color: #e9f8ef;
}

@media (max-width: 1040px) {
  .item-grid,
  .enemy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .guide {
    padding-top: 14px;
  }

  .hero {
    min-height: 300px;
  }

  .hero-copy {
    padding: 24px;
  }

  .section-heading {
    display: grid;
    gap: 4px;
  }

  .feature-row,
  .item-grid,
  .enemy-grid,
  .chest-list {
    grid-template-columns: 1fr;
  }
}
