/* The interface unfolds with the world: cardstock -> illustration -> glass. */
body {
  background-color: #eee8d8;
  background-image: repeating-linear-gradient(0deg, #88765306 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, #88765305 0 1px, transparent 1px 7px);
  transition: background-color 1.8s, color 1.8s;
}
.journey-bar { display: flex; align-items: center; gap: 25px; margin: 0 0 24px; }
.journey-intro { flex: 1; min-width: 190px; }
.journey-intro p { color: #827f6a; font-size: 9px; line-height: 1.6; margin: 8px 0 0; }
.journey-steps { display: flex; gap: 10px; flex: 2; }
.journey-step { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; color: #838872; padding: 12px 13px; background: #faf6e9; border: 1px solid #d7d2bf; border-radius: 2px; box-shadow: 2px 3px 0 #665b3810; transition: background 1s, border-color 1s, box-shadow 1s; }
.journey-step>span { font: 20px Georgia, serif; color: #a3a58e; }
.journey-step b { display: block; font-size: 10px; font-weight: 500; }
.journey-step small { display: block; font-size: 8px; margin-top: 5px; color: #93977e; }
.journey-step i { margin-left: auto; font-size: 14px; font-style: normal; }
.journey-step.selected { color: #3f5f40; background: #e3e7cf; border-color: #859470; }
.journey-step.selected>span { color: #688057; }
.journey-step:disabled { opacity: 1; cursor: default; }
.journey-step:disabled i { visibility: hidden; }
.journey-step.selected:disabled i { visibility: visible; }
.plane-stats { display: flex; margin: 0 0 18px; border: 1px dashed #c4c5af; border-radius: 2px; background: #efeeda; padding: 10px 0; }
.plane-stats>div { flex: 1; text-align: center; border-right: 1px solid #d7d8c4; }
.plane-stats>div:last-child { border: 0; }
.plane-stats dt { font-size: 8px; color: #7d836c; }
.plane-stats dd { margin: 7px 0 0; }
.plane-stats b { font: 21px Georgia, serif; }
.plane-stats dd span { display: block; font-size: 8px; color: #8b917b; margin-top: 4px; }
.design-description { margin-bottom: 12px; min-height: 30px; }
.aircraft-tag { font-size: 8px; letter-spacing: 1px; color: #819071; margin-top: 14px; }
.level-progress { position: absolute; top: 147px; left: 25px; right: 25px; max-width: 365px; pointer-events: none; }
.level-progress>div { display: flex; justify-content: space-between; gap: 15px; font-size: 8px; letter-spacing: .5px; color: #546b47; }
.level-progress b { font-weight: 500; }
.level-progress>div>span { font-size: 8px; letter-spacing: 0; }
.level-progress progress { display: block; width: 100%; height: 4px; margin-top: 9px; border: 0; border-radius: 2px; overflow: hidden; background: #596a4521; appearance: none; }
.level-progress progress::-webkit-progress-bar { background: #596a4521; }
.level-progress progress::-webkit-progress-value { background: #7b915a; transition: width .2s; }
.level-progress progress::-moz-progress-bar { background: #7b915a; }
.stage-grain { opacity: calc(var(--paper-amount) * .35); }
.workshop { position: relative; transition: background 1.5s, box-shadow 1.5s, border-color 1.5s, border-radius 1.5s; }
.workshop::before { content: ''; position: absolute; top: -9px; right: 35px; width: 76px; height: 19px; z-index: 2; background: #d1b67862; border-left: 2px dashed #f3e9d24d; border-right: 2px dashed #f3e9d24d; transform: rotate(4deg); opacity: var(--paper-amount); pointer-events: none; }
.flight-stage { transition: border-color 1.5s, box-shadow 1.5s, border-radius 1.5s; }
.stage-top, .flight-hud, .level-progress, .stage-bottom, .welcome-copy { z-index: 1; }
.zone-toast { z-index: 2; top: 35%; max-width: calc(100% - 30px); white-space: normal; width: max-content; font-size: 18px; }
.game-overlay { z-index: 3; }
.flight-hud { gap: 26px; }
.integrity-row span:last-child { font-size: 20px; letter-spacing: 1px; white-space: nowrap; }
.world-preview-note { color: #89947f; }

body[data-world="0"] .flight-stage { border: 7px solid #fff9e9; outline: 1px solid #c8bea4; border-radius: 2px 5px 1px 4px; box-shadow: 4px 6px 0 #76654816, 0 12px 25px #6654360b; }
body[data-world="0"] .workshop { border-color: #d3c9ad; border-radius: 2px 5px 1px 3px; box-shadow: 4px 5px 0 #76654816; background: #fff9e9; }
body[data-world="0"] .location-tag { background: #f7efd6; border: 1px dashed #989876; border-radius: 1px; box-shadow: 2px 3px 0 #58684417; transform: rotate(-1deg); }
body[data-world="0"] .flight-hud>div { padding: 7px 11px; background: #fff8e1e6; box-shadow: 2px 3px 0 #58684418; transform: rotate(-1deg); }
body[data-world="0"] .flight-hud>div:nth-child(2) { transform: rotate(1deg); }
body[data-world="0"] .flight-hud { top: 75px; gap: 12px; }
body[data-world="0"] .level-progress { top: 163px; }
body[data-world="0"] .primary-button { border-radius: 1px 4px 2px 3px; box-shadow: 3px 3px 0 #a6ac8770; }
body[data-world="0"] .stage-bottom { color: #4c623a; text-shadow: 0 1px #fff8dc; }
body[data-world="0"] .paper-preview { border: 1px solid #ded7bf; box-shadow: inset 0 1px 8px #7d6e4310; }
body[data-world="0"] .overlay-card { border-radius: 2px; background: #fff9e6; box-shadow: 5px 6px 0 #2e463e3d; }

body[data-world="1"] { background-color: #f0f0e9; }
body[data-world="1"] .flight-stage { border: 4px solid #fcfbf3; border-radius: 8px; box-shadow: 0 9px 28px #4b604416; }
body[data-world="1"] .workshop { background: #fdfcf5; box-shadow: 0 8px 20px #4b60440b; }
body[data-world="1"] .location-tag { background: #fbf4daaa; border-color: #93a18c70; }
body[data-world="1"] .journey-step.selected { background: #dfe9df; }

body[data-world="2"] { --ink: #243f50; --green: #356d7e; --line: #d9e2e8; background-color: #ecf2f6; background-image: none; }
body[data-world="2"] .flight-stage { border: 1px solid #bacfda; border-radius: 14px; box-shadow: 0 20px 45px #27496020; }
body[data-world="2"] .workshop { border-radius: 14px; background: #ffffffed; border-color: #d6e2e9; box-shadow: 0 12px 35px #2749600e; }
body[data-world="2"] .intro h1 em { color: #698b9e; }
body[data-world="2"] .journey-step { border-radius: 8px; box-shadow: none; background: #ffffff; border-color: #d3e0e5; }
body[data-world="2"] .journey-step.selected { color: #315e79; background: #dfeef6; border-color: #91b7cc; }
body[data-world="2"] .journey-step.selected>span { color: #5286a1; }
body[data-world="2"] .location-tag, body[data-world="2"] .round-button { color: #294e65; background: #ffffffa6; border-color: #d2e5ed; backdrop-filter: blur(12px); }
body[data-world="2"] .flight-hud { width: max-content; max-width: calc(100% - 40px); padding: 12px 18px; top: 72px; border: 1px solid #ffffffa0; border-radius: 10px; background: #edf7ffb5; backdrop-filter: blur(10px); box-shadow: 0 4px 20px #32546a12; }
body[data-world="2"] .flight-hud b { font-family: Arial, sans-serif; font-size: 26px; font-weight: 400; color: #294b60; }
body[data-world="2"] .flight-hud .gold-text { color: #ac7b2b; }
body[data-world="2"] .level-progress { top: 165px; }
body[data-world="2"] .level-progress>div { color: #365b6b; }
body[data-world="2"] .level-progress progress::-webkit-progress-value { background: #6099b3; }
body[data-world="2"] .plane-stats { background: #f1f7f9; border-style: solid; border-color: #dbe6eb; border-radius: 6px; }
body[data-world="2"] .star-tip { background: #f6f3e8; }
body[data-world="2"] .overlay-card { border-radius: 15px; background: #f8fbfd; }
body[data-world="2"] .stage-grain { opacity: 0; }

@media (max-width: 1100px) {
  .journey-bar { align-items: stretch; flex-direction: column; gap: 13px; }
  .journey-intro { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .journey-intro p { margin: 0; }
}
@media (max-width: 760px) {
  .journey-bar { margin-bottom: 20px; }
  .journey-intro { display: block; }
  .journey-intro p { margin-top: 7px; font-size: 8px; }
  .journey-steps { gap: 6px; }
  .journey-step { padding: 10px 8px; gap: 7px; }
  .journey-step>span { font-size: 16px; }
  .journey-step b { font-size: 9px; line-height: 1.4; }
  .journey-step small, .journey-step i { display: none; }
  .level-progress { left: 16px; right: 16px; }
  body[data-world="0"] .flight-hud { left: 12px; right: 12px; gap: 8px; }
  body[data-world="0"] .flight-hud>div { padding: 7px 8px; }
  .flight-hud b { font-size: 25px; }
  .flight-hud>div>span { font-size: 6px; letter-spacing: .8px; }
  body[data-world="2"] .flight-hud { left: 12px; padding: 10px 12px; gap: 18px; }
  .stage-bottom { font-size: 7px; }
  .stage-bottom span:last-child { max-width: 95px; text-align: right; }
  .mode-flight .level-progress { max-width: none; }
  .mode-flight .flight-stage { min-height: 540px; }
}
@media (prefers-reduced-motion: reduce) { body, .workshop, .flight-stage, .journey-step, .level-progress progress::-webkit-progress-value { transition: none; } }
