.city-intro {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 260;
  overflow: hidden;
  background: #c8eea4;
  color: #263f32;
  isolation: isolate;
}
.city-intro[hidden] {
  display: none;
}
.city-intro-stage {
  --ci-offset:0ms;
  --ci-peel:0%;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  background:
    linear-gradient(
      #4e879f,
      #657656 65%,
      #5d7856);
  isolation: isolate;
}
.ci-map {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
}
.ci-map img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ci-bright {
  background:
    linear-gradient(
      #4db8e7 0%,
      #97d8be 35%,
      #cce39a 75%,
      #72c0b9);
}
.ci-ruined img,
.ci-bright img {
  animation-name: ci-map;
}
.ci-poster {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  clip-path: polygon(0 var(--ci-peel), 100% var(--ci-peel), 100% 100%, 0 100%);
  z-index: 2;
}
.ci-vow {
  position: absolute;
  top: 14%;
  left: 50%;
  width: max-content;
  max-width: 80%;
  padding: 9px 22px 7px;
  transform: translateX(-50%) rotate(-5deg);
  background: #fff9d9;
  color: #356547;
  border: 3px solid #284732;
  border-radius: 5px;
  box-shadow: 5px 6px 0 #28473244;
  font-size: clamp(23px, 7vw, 35px);
  font-weight: 950;
  letter-spacing: 3px;
  text-align: center;
}
.ci-vow small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 800;
}
.ci-roll {
  display: none;
  position: absolute;
  z-index: 5;
  top: var(--ci-peel);
  left: -14%;
  width: 128%;
  height: 65px;
  transform: translateY(-60%) rotate(-5deg);
  background:
    linear-gradient(
      #f1dfaa,
      #fff8dc 33%,
      #dfcb97 70%,
      #917c52);
  border-block: 2px solid #5f684f;
  box-shadow: 0 -8px 12px #1114, 0 8px 0 #faf6d033;
  border-radius: 45% 10% 35% 8%;
}
.ci-roll i {
  position: absolute;
  top: 15%;
  right: 4%;
  bottom: 15%;
  left: 4%;
  border-block: 2px solid #a28e5b66;
  border-radius: 50%;
}
.city-intro-stage[data-peeling=true] .ci-roll {
  display: block;
}
.ci-actor {
  position: absolute;
  left: 3%;
  bottom: 12%;
  height: 35%;
  aspect-ratio: 4/5;
  z-index: 10;
  transform-origin: 50% 96%;
  animation-name: ci-actor;
}
.ci-pose {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.city-intro-stage[data-pose=boast] .ci-boast,
.city-intro-stage[data-pose=pull] .ci-pull,
.city-intro-stage[data-pose=panic] .ci-panic {
  display: block;
}
.ci-punchline {
  position: absolute;
  top: 27%;
  left: 8%;
  right: 8%;
  margin: 0;
  color: #fffbe5;
  font-size: clamp(26px, 7vw, 35px);
  font-weight: 950;
  line-height: 1.4;
  text-align: center;
  text-shadow:
    0 3px 0 #344e41,
    2px 0 #344e41,
    -2px 0 #344e41;
  z-index: 11;
  animation-name: ci-punch;
}
.ci-caption {
  position: absolute;
  bottom: 7%;
  left: 5%;
  right: 5%;
  margin: 0;
  padding: 6px 8px;
  background: #fffbe9ec;
  border: 1px solid #6e825c88;
  border-radius: 9px;
  text-align: center;
  color: #3c5439;
  font-size: 12px;
  line-height: 19px;
  font-weight: 800;
  z-index: 20;
  animation-name: ci-caption;
}
.ci-green {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 8;
  background: #c8eea4;
  animation-name: ci-green;
}
.ci-cards {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 15;
  pointer-events: none;
}
.ci-card {
  position: absolute;
  top: 43%;
  left: calc(50% + (var(--i) - 1)*70px);
  width: 72px;
  height: 88px;
  margin-left: -36px;
  padding: 6px 5px 4px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 17px;
  justify-items: center;
  gap: 2px;
  border: 2px solid #809164;
  border-radius: 9px;
  background: #fffdf1;
  box-shadow: 0 5px 0 #859b65;
  transform-origin: 50% 90%;
  animation-name: ci-card;
  box-sizing: border-box;
}
.ci-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  min-height: 0;
}
.ci-card b {
  font-size: 11px;
  line-height: 17px;
  white-space: nowrap;
  color: #2f713b;
  font-weight: 800;
}
.ci-seven {
  position: absolute;
  bottom: 13%;
  left: 6%;
  right: 6%;
  height: 55px;
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  border: 3px solid #8b774c;
  border-radius: 9px;
  background: #baa276;
  z-index: 14;
  animation-name: ci-seven;
}
.ci-seven i {
  background: #d5c399;
  border: 1px solid #ad986c;
  border-radius: 3px;
}
.ci-dust {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  z-index: 7;
}
.ci-dust i {
  position: absolute;
  left: calc(10% + var(--i)*10%);
  top: calc(33% + var(--i)*4%);
  width: 12px;
  height: 17px;
  border: 1px solid #b8ad82;
  background: #fff1bf;
  animation-name: ci-dust;
}
.ci-map img,
.ci-actor,
.ci-punchline,
.ci-caption,
.ci-green,
.ci-card,
.ci-seven,
.ci-dust i {
  animation-duration: 6000ms;
  animation-timing-function: linear;
  animation-delay: var(--ci-offset);
  animation-fill-mode: both;
  animation-play-state: paused;
}
@keyframes ci-map {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.025);
  }
  58%, 100% {
    transform: scale(1.045);
  }
}
@keyframes ci-actor {
  0%, 9.9% {
    opacity: 0;
    transform: translateX(-30px) scale(.9);
  }
  10% {
    opacity: 1;
    transform: translateX(-15px) scale(.94);
  }
  18%, 29.9% {
    opacity: 1;
    transform: none;
  }
  30% {
    transform: rotate(3deg);
  }
  38% {
    transform: translate(-5px, 1px) rotate(-4deg);
  }
  45% {
    transform: translate(-12px, 3px) rotate(-8deg);
  }
  55% {
    transform: translate(-18px, 6px) rotate(-11deg);
  }
  58.3% {
    transform: translate(4px, -12px) rotate(8deg);
  }
  64% {
    transform: translateY(4px) rotate(-3deg);
  }
  70%, 78% {
    opacity: 1;
    transform: none;
  }
  86%, 100% {
    opacity: 0;
    transform: translateY(20px) scale(.9);
  }
}
@keyframes ci-punch {
  0%, 58.2% {
    opacity: 0;
    transform: scale(.8);
  }
  58.3% {
    opacity: 1;
    transform: scale(1.08) rotate(-2deg);
  }
  63%, 74.9% {
    opacity: 1;
    transform: none;
  }
  84%, 100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}
@keyframes ci-green {
  0%, 74.9% {
    opacity: 0;
  }
  94%, 100% {
    opacity: 1;
  }
}
@keyframes ci-caption {
  0%, 12% {
    opacity: 0;
  }
  18%, 84% {
    opacity: 1;
  }
  94%, 100% {
    opacity: 0;
  }
}
@keyframes ci-card {
  0%, 74.9% {
    opacity: 0;
    transform: translateY(50px) scale(.3);
  }
  80% {
    opacity: 1;
    transform: translateY(-5px) rotate(calc((var(--i) - 1)*9deg)) scale(1.08);
  }
  87% {
    opacity: 1;
    transform: rotate(calc((var(--i) - 1)*6deg));
  }
  94% {
    opacity: 1;
    transform: translateY(-30px) scale(.9);
  }
  100% {
    opacity: 0;
    transform: translateY(-70px) scale(.75);
  }
}
@keyframes ci-seven {
  0%, 84.9% {
    opacity: 0;
    transform: translateY(30px);
  }
  94%, 100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes ci-dust {
  0%, 30% {
    opacity: 0;
    transform: scale(.3);
  }
  35% {
    opacity: 1;
    transform: translate(-5px, 0) rotate(25deg);
  }
  56% {
    opacity: .8;
    transform: translate(12px, 120px) rotate(180deg);
  }
  65%, 100% {
    opacity: 0;
    transform: translate(30px, 180px) rotate(250deg);
  }
}
.ci-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px;
}
.ci-nav > div {
  display: flex;
  gap: 7px;
}
.ci-nav button {
  min-height: 44px;
  padding: 7px 13px;
  border: 1px solid #819a70;
  border-radius: 24px;
  background: #fffceded;
  color: #365333;
  font: 800 12px/20px system-ui;
  box-shadow: 0 2px 0 #30482d22;
}
.ci-nav button:focus-visible {
  outline: 3px solid #244d34;
  outline-offset: 2px;
}
.ci-nav .ci-sound {
  width: 44px;
  padding: 4px;
  font-size: 19px;
}
.ci-sound[aria-pressed=true] {
  background: #487e40;
  color: #fffde8;
}
.ci-sound[aria-pressed=false] {
  color: #9a7955;
  background: #f1e4cf;
  text-decoration: line-through;
}
.city-intro[data-cards-ready=true][data-waiting=false] .ci-load-note {
  display: none;
}
.ci-loading {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  background: #c8eea4;
  font-size: 15px;
  font-weight: 800;
}
.city-intro[data-ready=true] .ci-loading {
  display: none;
}
.ci-load-note {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 2%;
  z-index: 35;
  margin: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #294e32;
  text-shadow: 0 1px #fff9;
  padding: 3px 5px;
  border-radius: 7px;
  background: #e8f4d1b0;
}
.city-intro[data-waiting=true] .ci-loading {
  display: none;
}
.city-intro[data-waiting=true] .city-intro-stage {
  background: #c8eea4;
}
.city-intro[data-waiting=true] .ci-cards .ci-card {
  animation: none;
  opacity: 1;
  transform: rotate(calc((var(--i) - 1)*7deg));
}
.city-intro[data-waiting=true] .ci-load-note {
  bottom: 31%;
  font-size: 13px;
}
.city-intro[data-waiting=true] .ci-sound {
  display: none;
}
.city-intro[data-waiting=true][data-cards-ready=false] :is(.ci-cards, .ci-seven) {
  display: none;
}
.city-intro[data-waiting=true][data-cards-ready=false][data-ready=true] .ci-actor {
  animation: none;
  opacity: 1;
  height: 30%;
  left: 50%;
  bottom: 43%;
  transform: translateX(-50%);
}
.city-intro[data-waiting=true][data-cards-ready=false] .ci-actor .ci-pose {
  display: none;
}
.city-intro[data-waiting=true][data-cards-ready=false][data-ready=true] .ci-actor .ci-pull {
  display: block;
}
.city-intro[data-waiting=true][data-cards-ready=false] .ci-caption {
  animation: none;
  opacity: 1;
  bottom: 22%;
}
.city-intro-stage[data-reduced=true] * {
  animation: none !important;
}
.city-intro-stage[data-reduced=true] .ci-map img {
  transform: none;
}
.city-intro-stage[data-reduced=true] .ci-roll,
.city-intro-stage[data-reduced=true] .ci-dust {
  display: none;
}
.city-intro-stage[data-reduced=true] .ci-punchline,
.city-intro-stage[data-reduced=true] .ci-green,
.city-intro-stage[data-reduced=true] .ci-card,
.city-intro-stage[data-reduced=true] .ci-seven {
  display: none;
}
.city-intro-stage[data-reduced=true][data-beat="2"] .ci-punchline {
  display: block;
}
.city-intro-stage[data-reduced=true][data-beat="3"] .ci-green,
.city-intro-stage[data-reduced=true][data-beat="3"] .ci-card,
.city-intro-stage[data-reduced=true][data-beat="3"] .ci-seven {
  display: grid;
}
.city-intro-stage[data-reduced=true] .ci-card {
  transform: rotate(calc((var(--i) - 1)*6deg));
}
@media (max-height: 650px) {
  .ci-actor {
    height: 37%;
    bottom: 12%;
  }
  .ci-vow {
    top: 15%;
    font-size: 23px;
    padding: 5px 16px;
  }
  .ci-caption {
    font-size: 11px;
    bottom: 5%;
    padding: 4px;
  }
  .ci-seven {
    height: 45px;
    bottom: 12%;
  }
  .ci-card {
    width: 65px;
    height: 77px;
    margin-left: -32px;
    left: calc(50% + (var(--i) - 1)*61px);
  }
  .ci-punchline {
    font-size: 27px;
    top: 28%;
  }
}
