*,
:before,
::before,
:after,
::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #15171c;
  color: #edeae3;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

p {
  margin: 0;
}

ol,
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
}

button {
  appearance: none;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.Article {
  margin: 0 auto;
  max-width: 700px;
  padding: 24px 18px 48px;
}
.Article h1 {
  color: #edeae3;
  font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.Article h2 {
  color: #edeae3;
  font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.Article ul {
  display: grid;
  gap: 6px;
}
.Article li {
  color: #c6c3bb;
  font-size: 13.5px;
  line-height: 1.85;
  padding-left: 16px;
  position: relative;
}
.Article li::before {
  background-color: #5b6069;
  border-radius: 50%;
  content: "";
  height: 2px;
  left: 2px;
  position: absolute;
  top: 12px;
  width: 2px;
}
.Article li ul {
  margin-top: 6px;
}
.Article b {
  color: #edeae3;
  font-weight: 700;
}
.Article-Step {
  margin-bottom: 24px;
}

.Rock {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(14px, 2.5vw, 30px) clamp(14px, 3vw, 34px) 48px;
}

.PageTitle {
  color: #8e939c;
  font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.StepNav {
  display: flex;
  gap: clamp(2px, 0.8vw, 8px);
  margin-bottom: clamp(18px, 3vw, 30px);
  overflow-x: auto;
  scrollbar-width: none;
}
.StepNav::-webkit-scrollbar {
  display: none;
}
.StepNav-Item {
  align-items: baseline;
  color: #8e939c;
  display: flex;
  gap: 8px;
  padding: 10px 12px 13px;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}
.StepNav-Item::after {
  background: linear-gradient(90deg, #ffc46b, #f2632f);
  border-radius: 1px;
  bottom: 5px;
  content: "";
  height: 2px;
  left: 12px;
  position: absolute;
  right: 12px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.StepNav-Item:hover {
  color: #c6c3bb;
}
.StepNav-Item:focus-visible {
  outline: 2px solid #ffc46b;
  outline-offset: 2px;
}
.StepNav-Item[data-active] {
  color: #edeae3;
}
.StepNav-Item[data-active]::after {
  transform: scaleX(1);
}
.StepNav-Item[data-active] .StepNav-Number {
  color: #ffc46b;
}
.StepNav-Number {
  color: #5b6069;
  font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}
.StepNav-Label {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.Panel {
  align-items: start;
  display: none;
  gap: clamp(20px, 3vw, 40px);
  grid-template-columns: minmax(0, 1fr) clamp(252px, 30%, 340px);
}
.Panel[data-active] {
  display: grid;
}

@media (max-width: 860px) {
  .Panel[data-active] {
    display: block;
  }
  .Lesson {
    margin-top: 18px;
  }
}
.Stage {
  background: #1e222a;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.Stage-Scene {
  aspect-ratio: 1.6;
  display: block;
  height: auto;
  width: 100%;
}
.Stage[data-tree] {
  padding: clamp(6px, 1.4vw, 16px);
}
.Stage[data-chart] {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(14px, 2vw, 24px);
}

.Tree {
  display: block;
  height: auto;
  width: 100%;
}
.Tree text {
  fill: #c6c3bb;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
.Tree-Title {
  fill: #edeae3;
  font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.Tree-Family {
  fill: #edeae3;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.Tree-Group {
  fill: #edeae3;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.Tree-Rock {
  fill: #c6c3bb;
  font-size: 13px;
  font-weight: 600;
}
.Tree-Reading {
  fill: #5b6069;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
}
.Tree-Note {
  fill: #8e939c;
  font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
}
.Tree-Link {
  fill: none;
  stroke: #3a3f48;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-linecap: round;
  stroke-width: 1.4;
}
.Tree-Tick {
  fill: none;
  stroke: #3a3f48;
  stroke-width: 1.2;
}
.Tree-Node {
  opacity: 0;
}
.Tree-Node text {
  transition: fill 0.18s;
}
.Tree-Node[data-goto] {
  cursor: pointer;
}
.Tree-Node[data-goto]:hover .Tree-Family,
.Tree-Node[data-goto]:hover .Tree-Group,
.Tree-Node[data-goto]:hover .Tree-Rock {
  fill: #ffc46b;
}
.Tree[data-run] .Tree-Link {
  animation: tree-link 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: var(--delay, 0s);
}
.Tree[data-run] .Tree-Node {
  animation: tree-node 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes tree-link {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes tree-node {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.Lesson-Kicker {
  color: #ffc46b;
  font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  margin: 2px 0 10px;
}
.Lesson-Heading {
  color: #edeae3;
  font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(19px, 2.3vw, 23px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin-bottom: 16px;
}
.Lesson-PointList {
  display: grid;
  gap: 2px;
}
.Lesson-Point {
  color: #c6c3bb;
  font-size: 13.5px;
  line-height: 1.85;
  padding: 8px 8px 8px 26px;
  position: relative;
}
.Lesson-Point::before {
  background-color: #5b6069;
  content: "";
  height: 2px;
  left: 8px;
  position: absolute;
  top: 17px;
  width: 10px;
}
.Lesson-CaptionList {
  display: grid;
  gap: 2px;
}
.Lesson-Caption {
  border-radius: 2px;
  color: #8e939c;
  cursor: pointer;
  font-size: 13.5px;
  line-height: 1.85;
  padding: 9px 10px 12px 34px;
  position: relative;
  transition: color 0.25s, background 0.25s;
}
.Lesson-Caption::after {
  background: linear-gradient(90deg, #ffc46b, #f2632f);
  bottom: 6px;
  content: "";
  height: 1.5px;
  left: 34px;
  opacity: 0;
  position: absolute;
  right: 12px;
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
  transition: opacity 0.25s;
}
.Lesson-Caption[data-done] {
  color: #c6c3bb;
}
.Lesson-Caption[data-active] {
  background: rgba(255, 255, 255, 0.035);
  color: #edeae3;
}
.Lesson-Caption[data-active]::after {
  opacity: 0.9;
}
.Lesson-Caption[data-active] .Lesson-CaptionIndex {
  color: #ffc46b;
}
.Lesson-CaptionIndex {
  color: #5b6069;
  font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: 10.5px;
  left: 11px;
  letter-spacing: 0.05em;
  position: absolute;
  top: 10px;
  transition: color 0.25s;
}
.Lesson-Control {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.Lesson-Hint {
  color: #5b6069;
  font-size: 11.5px;
  line-height: 1.7;
  margin-top: 14px;
}

.Keyword {
  color: #ffc46b;
  font-weight: 700;
}
.Keyword[data-water] {
  color: #7fb6c7;
}

.ActionButton {
  align-items: center;
  background: #262b35;
  border-radius: 2px;
  color: #edeae3;
  display: inline-flex;
  font-size: 12.5px;
  gap: 8px;
  letter-spacing: 0.04em;
  padding: 8px 15px;
  transition: background 0.2s;
}
.ActionButton:hover {
  background: #2d3341;
}
.ActionButton:focus-visible {
  outline: 2px solid #ffc46b;
  outline-offset: 2px;
}
.ActionButton-Icon {
  display: none;
  fill: #ffc46b;
  height: 11px;
  width: 11px;
}
.ActionButton[data-state=play] .ActionButton-Icon[data-icon=play] {
  display: block;
}
.ActionButton[data-state=pause] .ActionButton-Icon[data-icon=pause] {
  display: block;
}
.ActionButton[data-state=replay] .ActionButton-Icon[data-icon=replay] {
  display: block;
}

.MineralChart {
  position: relative;
}
.MineralChart-Canvas {
  display: block;
  height: clamp(180px, 26vw, 236px);
  width: 100%;
}
.MineralChart-Scrub {
  cursor: ew-resize;
  height: 100%;
  inset: 0;
  margin: 0;
  opacity: 0;
  position: absolute;
  touch-action: none;
  width: 100%;
}

.MineralLegend {
  align-items: center;
  color: #c6c3bb;
  display: flex;
  flex-wrap: wrap;
  font-size: 11.5px;
  gap: 6px 14px;
}
.MineralLegend-Group {
  color: #5b6069;
  font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  margin-right: -4px;
}
.MineralLegend-Group[data-second] {
  margin-left: 8px;
}
.MineralLegend-Item {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}
.MineralLegend-Swatch {
  border-radius: 2px;
  flex: none;
  height: 10px;
  width: 10px;
}

.MineralReadout {
  align-items: center;
  background: #191c22;
  border-radius: 12px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr auto 1fr;
  padding: 14px 18px;
}
.MineralReadout-Rock {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}
.MineralReadout-Rock[data-end] {
  flex-direction: row-reverse;
  text-align: right;
}
.MineralReadout-Chip {
  border-radius: 2px;
  display: block;
  flex: none;
  height: 52px;
  width: 52px;
}
.MineralReadout-Text {
  display: block;
  min-width: 0;
}
.MineralReadout-Role {
  color: #8e939c;
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.05em;
}
.MineralReadout-Name {
  color: #edeae3;
  display: block;
  font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 700;
  line-height: 1.3;
}
.MineralReadout-Name small {
  color: #5b6069;
  display: block;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
}
.MineralReadout-Ratio {
  color: #8e939c;
  display: flex;
  flex-direction: column;
  font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: 11px;
  gap: 6px;
  text-align: center;
}
.MineralReadout-Zone {
  color: #c6c3bb;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
}
.MineralReadout-Percent b {
  color: #edeae3;
  font-weight: 500;
}

@media (max-width: 640px) {
  .MineralReadout {
    gap: 12px;
    grid-template-columns: 1fr;
  }
  .MineralReadout-Rock[data-end] {
    flex-direction: row;
    text-align: left;
  }
  .MineralReadout-Ratio {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }
}
.MineralMnemonic {
  color: #5b6069;
  font-size: 11.5px;
  line-height: 1.8;
}
.MineralMnemonic .Keyword,
.MineralMnemonic .Keyword[data-water] {
  color: #8e939c;
  font-weight: 400;
}

.RockGrid {
  display: grid;
  gap: clamp(16px, 2.5vw, 30px);
  grid-column-end: -1;
  grid-column-start: 1;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: clamp(18px, 3vw, 28px);
}
.RockGrid-Title {
  color: #c6c3bb;
  font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.RockGrid-Title small {
  color: #5b6069;
  display: block;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
  margin-top: 5px;
}
.RockGrid-CardList {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
}
.RockGrid-Acid {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.RockGrid-AcidNote {
  color: #5b6069;
  font-size: 11px;
}

.RockCard {
  background: #1e222a;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  position: relative;
}
.RockCard-Chip {
  border-radius: 2px;
  display: block;
  height: 64px;
  width: 100%;
}
.RockCard-Bubble {
  border-radius: 2px;
  height: 64px;
  left: 12px;
  pointer-events: none;
  position: absolute;
  top: 12px;
  width: calc(100% - 24px);
}
.RockCard-Name {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
}
.RockCard-Name small {
  color: #8e939c;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-left: 6px;
}
.RockCard-Grain {
  color: #ffc46b;
  font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}
.RockCard-Note {
  color: #8e939c;
  font-size: 11.5px;
  line-height: 1.7;
}
.RockCard-Tag {
  background: rgba(12, 14, 18, 0.72);
  border-radius: 2px;
  font-size: 10px;
  letter-spacing: 0.04em;
  opacity: 0;
  padding: 3px 8px;
  pointer-events: none;
  position: absolute;
  right: 19px;
  top: 19px;
  transform: translateY(-3px);
  transition: opacity 0.35s, transform 0.35s;
}
.RockCard-Tag[data-acid=yes] {
  color: #9fd08a;
}
.RockCard-Tag[data-acid=no] {
  color: #8e939c;
}
.RockCard-Tag[data-show] {
  opacity: 1;
  transform: none;
}

@media (max-width: 520px) {
  .RockGrid-CardList {
    gap: 8px;
  }
  .RockCard {
    padding: 9px;
  }
  .RockCard-Note {
    font-size: 10.5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01s !important;
    transition-duration: 0.01s !important;
  }
  .Tree-Link {
    stroke-dashoffset: 0;
  }
  .Tree-Node {
    opacity: 1;
  }
}