/* A small adventure, told with the same curious crab. */
.journey .section-description { max-width: 330px; }
.growth-adventure { --world-sky: #eaf0e1; --world-hill: #bdceb0; --world-floor: #90ab8c; --boss: #776e9c; --charge: 95px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
[data-theme="dark"] .growth-adventure { --world-sky: #22362c; --world-hill: #34513d; --world-floor: #477351; --boss: #a392cb; }
.growth-adventure[data-stage="1"] { --boss: #56899a; }
.growth-adventure[data-stage="2"] { --boss: #72995d; }
.growth-adventure[data-stage="3"] { --boss: #b48854; }
.growth-adventure[data-stage="4"] { --boss: #7c86ac; }
.growth-adventure[data-stage="5"] { --boss: #aa7d96; }
.growth-topline { display: flex; justify-content: space-between; gap: 15px; padding: 17px 24px; border-bottom: 1px solid var(--line); color: var(--muted); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .3px; }
.growth-topline span:nth-child(2) { margin-left: auto; align-self: center; }
.growth-topline span:first-child { align-self: center; }
.growth-play { min-height: 44px; min-width: 100px; padding: 8px 13px; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 4px; font-size: 14px; letter-spacing: 0; }
.growth-play:disabled { opacity: .5; cursor: default; }
.growth-favorite { position: absolute; z-index: 5; top: 64px; left: 24px; max-width: calc(100% - 48px); margin: 0; padding: 4px 10px; border: 1px solid var(--accent); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 14px; line-height: 1.5; }
.growth-main { display: grid; grid-template-columns: 1.6fr 1fr; }
.growth-scene { position: relative; min-height: 340px; overflow: hidden; background: radial-gradient(circle at 1px 1px, var(--world-hill) 1px, transparent 0) 0 0 / 22px 22px, var(--world-sky); }
.growth-world-title { position: absolute; z-index: 2; top: 23px; left: 24px; display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 600; }
.growth-level { padding: 5px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--accent); font: 600 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.growth-mountains { position: absolute; inset: 80px 0 54px; opacity: .65; }
.growth-mountains i { position: absolute; bottom: 0; width: 200px; height: 150px; background: var(--world-hill); clip-path: polygon(0 100%, 30% 43%, 43% 65%, 70% 0, 100% 100%); }
.growth-mountains i:nth-child(1) { left: -20px; }
.growth-mountains i:nth-child(2) { left: 30%; height: 180px; width: 270px; opacity: .7; }
.growth-mountains i:nth-child(3) { right: -50px; width: 230px; opacity: .6; }
.growth-ground { position: absolute; inset: auto 0 0; height: 89px; border-top: 3px solid var(--world-floor); background: repeating-linear-gradient(90deg, transparent 0 39px, var(--world-floor) 40px 41px), repeating-linear-gradient(0deg, transparent 0 22px, var(--world-floor) 23px 24px), var(--world-hill); opacity: .55; transform: perspective(170px) rotateX(18deg) scale(1.15); transform-origin: top; }
.growth-player { position: absolute; z-index: 3; left: 12%; bottom: 43px; width: 135px; text-align: center; }
.growth-player img { display: block; width: 100%; height: auto; animation: growth-step .6s ease-in-out infinite alternate; }
.growth-player span { display: inline-block; padding: 2px 10px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 10px; }
.growth-enemy { position: absolute; z-index: 2; right: 12%; bottom: 60px; width: 95px; transform-origin: bottom; }
.growth-enemy svg { display: block; width: 100%; fill: #faf2d9; }
.growth-enemy-body { fill: var(--boss); stroke: var(--paper); stroke-width: 2; }
.growth-enemy-eyes, .growth-enemy-mouth { fill: none; stroke: #243b2c; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.growth-hp { margin-bottom: 8px; text-align: center; font-size: 10px; font-weight: 600; }
.growth-hp i { display: block; height: 5px; margin-top: 5px; border-radius: 5px; overflow: hidden; background: var(--world-hill); }
.growth-hp i::after { content: ""; display: block; height: 100%; background: var(--boss); transform-origin: left; }
.growth-strike { position: absolute; z-index: 4; left: 48%; bottom: 110px; color: #e28b32; font-size: 54px; line-height: 1; opacity: 0; }
.growth-loot { position: absolute; z-index: 5; top: 106px; right: 7%; padding: 8px 12px; border: 1px solid var(--accent); border-radius: 4px; background: var(--surface); color: var(--accent); font: 600 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; opacity: 0; }
.growth-scene-caption { position: absolute; bottom: 15px; left: 24px; color: var(--muted); font: 8px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1px; }
.growth-adventure[data-phase="battle"] .growth-player { animation: growth-charge 1.45s ease-in-out both; }
.growth-adventure[data-phase="battle"] .growth-enemy { animation: growth-hit 1.45s ease-in-out both; }
.growth-adventure[data-phase="battle"] .growth-hp i::after { animation: growth-drain 1.45s linear both; }
.growth-adventure[data-phase="battle"] .growth-strike { animation: growth-strike 1.45s ease-out both; }
.growth-adventure[data-phase="won"] .growth-enemy, .growth-adventure[data-phase="finished"] .growth-enemy { opacity: .15; transform: scale(.7); }
.growth-adventure[data-phase="won"] .growth-hp i::after, .growth-adventure[data-phase="finished"] .growth-hp i::after { transform: scaleX(0); }
.growth-adventure[data-phase="won"] .growth-loot, .growth-adventure[data-phase="finished"] .growth-loot { opacity: 1; animation: growth-loot .35s ease-out both; }
.growth-adventure[data-playing="false"] *, .growth-adventure[data-playing="false"] *::before, .growth-adventure[data-playing="false"] *::after { animation-play-state: paused; }
.growth-quest { padding: 26px; border-left: 1px solid var(--line); }
.growth-quest .eyebrow { margin-bottom: 12px; font-size: 10px; letter-spacing: .7px; }
.growth-quest h3 { margin: 0 0 5px; font-family: inherit; font-size: 26px; }
.growth-place { margin: 0; color: var(--accent); font-size: 13px; font-weight: 600; }
.growth-description { min-height: 3.5em; margin: 15px 0; color: var(--muted); font-size: 15px; line-height: 1.85; }
.growth-loadout-label { margin: 16px 0 8px; color: var(--muted); font-size: 12px; }
.growth-loadout { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; list-style: none; }
.growth-loadout li { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 55px; color: var(--muted); font-size: 12px; line-height: 1.4; text-align: center; }
.growth-loadout img, .growth-skill img { box-sizing: content-box; padding: 6px; border-radius: 6px; background: #faf9f1; object-fit: contain; }
.growth-quest .text-link { font-size: 14px; }
.growth-route { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 20px 24px 0; }
.growth-route button { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 65px; padding: 10px 4px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font-size: 14px; }
.growth-route button > span:first-child { display: block; margin-bottom: 5px; font: 600 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.growth-company-logo { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: calc(100% - 8px); max-width: 112px; height: 40px; margin: 0 auto 8px; padding: 6px; border-radius: 4px; background: #fff; object-fit: contain; }
.growth-company-logo-catarc::before { content: ""; display: block; width: 100%; max-width: 64px; aspect-ratio: 121 / 53; background: url("companies/catarc.png") left center / 413.22% 100% no-repeat; }
/* The official Yiche header contains its logo at the right end of a sprite. */
.growth-company-logo-yiche::before { content: ""; display: block; width: 100%; max-width: 80px; aspect-ratio: 268 / 90; background: url("companies/yiche-sprite.png") right center / 455.6% 100% no-repeat; }
.growth-route button[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); background: var(--tint); }
.growth-route button[data-completed="true"]::after { content: "✓"; position: absolute; top: 2px; right: 6px; color: var(--accent); font-size: 11px; }
.growth-company-marker { display: block; width: fit-content; margin: 6px auto 0; padding: 2px 4px; border: 1px solid var(--accent); border-radius: 4px; background: var(--tint); color: var(--ink); font-size: 11px; line-height: 1.4; }
.growth-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 18px 24px; }
.growth-controls button { min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 4px; background: transparent; font-size: 14px; }
.growth-controls button:disabled { opacity: .4; cursor: default; }
.growth-controls p { flex: 1 1 220px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.growth-bag { margin: 0 24px; border-top: 1px solid var(--line); }
.growth-bag summary { display: flex; align-items: center; min-height: 44px; gap: 10px; padding: 16px 0; cursor: pointer; font-size: 14px; list-style: none; }
.growth-bag summary::-webkit-details-marker { display: none; }
.growth-bag summary::before { content: ""; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 5px solid var(--muted); }
.growth-bag[open] summary::before { transform: rotate(90deg); }
.growth-bag summary span:last-child { margin-left: auto; color: var(--muted); font-size: 12px; }
.growth-inventory { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 8px; padding: 0; margin: 0 0 18px; list-style: none; }
.growth-skill { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 7px; padding: 8px 3px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.4; transition: border-color .35s; }
.growth-skill img { opacity: .45; transition: opacity .35s; }
.growth-skill[data-unlocked="true"] { color: var(--ink); border-color: var(--accent); background: var(--tint); }
.growth-skill[data-unlocked="true"] img { opacity: 1; }
.growth-note { margin: 0; padding: 0 24px 16px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.growth-note a { margin-left: 10px; text-decoration: underline; text-underline-offset: 3px; }
.growth-history { margin-top: 24px; }
.growth-history > summary { min-height: 44px; padding-block: 12px; color: var(--muted); font-size: 14px; cursor: pointer; }
@keyframes growth-step { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-5px) rotate(2deg); } }
@keyframes growth-charge { 0%, 100% { transform: translateX(0); } 35%, 70% { transform: translateX(var(--charge)); } }
@keyframes growth-hit { 0%, 35%, 100% { transform: translateX(0); } 42%, 57%, 70% { transform: translateX(7px) rotate(6deg); } 48%, 64% { transform: translateX(-5px) rotate(-4deg); } }
@keyframes growth-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes growth-strike { 0%, 25%, 80%, 100% { opacity: 0; transform: translateX(-20px) scale(.5); } 42%, 64% { opacity: 1; transform: translateX(20px) scale(1); } }
@keyframes growth-loot { from { transform: translateY(12px); } to { transform: translateY(0); } }
@media (max-width: 900px) {
  .growth-main { grid-template-columns: 1fr; }
  .growth-scene { min-height: 300px; }
  .growth-quest { border-left: 0; border-top: 1px solid var(--line); }
  .growth-description { min-height: 0; }
  .growth-quest h3 { font-size: 23px; }
}
@media (max-width: 720px) {
  .journey .section-heading { display: block; }
  .journey .section-description { max-width: none; }
  .growth-adventure { --charge: 60px; }
  .growth-topline { display: grid; grid-template-columns: 1fr auto; padding: 15px 16px; gap: 8px; font-size: 12px; letter-spacing: 0; }
  .growth-topline span:first-child { grid-column: 1 / -1; }
  .growth-topline span:nth-child(2) { margin-left: 0; }
  .growth-scene { min-height: 235px; }
  .growth-favorite { top: 50px; left: 16px; max-width: calc(100% - 32px); }
  .growth-world-title { top: 18px; left: 16px; font-size: 12px; }
  .growth-player { width: 108px; left: 7%; bottom: 43px; }
  .growth-enemy { width: 76px; right: 7%; bottom: 57px; }
  .growth-strike { bottom: 98px; font-size: 39px; }
  .growth-loot { top: 86px; right: 6%; padding: 6px 8px; font-size: 9px; }
  .growth-scene-caption { left: 16px; font-size: 10px; letter-spacing: 0; }
  .growth-quest { padding: 20px; }
  .growth-route { grid-template-columns: repeat(3, 1fr); padding: 16px 16px 0; }
  .growth-route button { min-height: 58px; font-size: 12px; }
  .growth-controls { padding: 16px; gap: 8px; }
  .growth-controls button { padding-inline: 12px; }
  .growth-controls p { flex-basis: 100%; }
  .growth-bag { margin-inline: 16px; }
  .growth-note { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .growth-adventure *, .growth-adventure *::before, .growth-adventure *::after { animation: none !important; transition: none !important; }
}
