/* The three areas: the town map, the downtown shopping map and the arcade hall. */
.downtown-map .map-art { background-image: url('downtown.svg'); }

.arcade-hall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 26px 22px 30px;
  border: 5px solid #2c2450;
  border-radius: 18px;
  background: radial-gradient(circle at 50% -20%, #5b4a9a 0, transparent 60%), repeating-linear-gradient(45deg, #2f2758 0 14px, #2a2350 14px 28px);
  box-shadow: 0 6px 0 #1d1838, 0 16px 30px #241c4a44;
}
.arcade-cabinet {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  justify-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 14px 16px;
  border: 4px solid #171230;
  border-radius: 22px 22px 10px 10px;
  background: linear-gradient(#7a5bc0, #5a3f9a 60%, #46307e);
  box-shadow: inset 0 -10px 0 #3a2768, 0 8px 0 #171230;
  color: #fff6e0;
  font-family: Nunito, system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
  transition: transform .15s;
}
.arcade-cabinet:hover { transform: translateY(-4px); }
.arcade-cabinet:active { transform: translateY(2px); }
.arcade-cabinet:focus-visible { outline: 4px solid #ffd86b; outline-offset: 4px; }
.cabinet-marquee {
  width: calc(100% + 28px);
  margin: 0 -14px;
  padding: 10px 8px;
  border-bottom: 4px solid #171230;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(#ffe68a, #f5b843);
  color: #3b2470;
  font: 900 17px/1.1 Nunito, system-ui, sans-serif;
  letter-spacing: .5px;
  text-shadow: 0 1px 0 #fff3c2;
  box-shadow: inset 0 0 0 3px #fff2b8;
}
.cabinet-screen {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 5px solid #171230;
  border-radius: 12px;
  background: radial-gradient(circle, #2c5c6e 0, #10232c 75%);
  box-shadow: inset 0 0 18px #7ff0f055;
  font-size: 54px;
  filter: drop-shadow(0 0 10px #7ff0f066);
}
.cabinet-text { font-size: 14px; line-height: 1.35; color: #f3eaff; }
.cabinet-skill { padding: 4px 10px; border-radius: 99px; background: #2c2450; color: #ffe08a; font-size: 12px; font-weight: 900; }
.cabinet-play {
  padding: 8px 22px;
  border: 3px solid #171230;
  border-radius: 99px;
  background: linear-gradient(#ff8fd2, #e0569f);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 3px 0 #171230;
}
.cabinet-orchard .cabinet-screen { background: radial-gradient(circle, #4f8a4a 0, #16301a 75%); }
.cabinet-library .cabinet-screen { background: radial-gradient(circle, #5a5a9a 0, #1a1a34 75%); }

@media (max-width: 900px) { .arcade-hall { grid-template-columns: 1fr 1fr; } }
@media (max-width: 650px) {
  .arcade-hall { grid-template-columns: 1fr; padding: 16px 12px 20px; gap: 16px; }
  .cabinet-screen { aspect-ratio: 16 / 7; font-size: 44px; }
}

/* Cloud save can be closed and reopened from the header. */
.cloud-heading { position: relative; padding-right: 40px; }
.cloud-close { position: absolute; top: -4px; right: -4px; width: 34px; height: 34px; padding: 0; border: 2px solid #b8d0bd; border-radius: 50%; background: #fff; color: #2b6170; font: 900 22px/1 Nunito, system-ui, sans-serif; cursor: pointer; }
.cloud-close:hover { background: #e6f0e9; }
.cloud-open { margin-left: auto; padding: 8px 14px; border: 2px solid #fff3cf88; border-radius: 99px; background: #ffffff22; color: #fff8e6; font: 900 13px Nunito, system-ui, sans-serif; cursor: pointer; }
.cloud-open:hover { background: #ffffff38; }

/* Matching line icons for the three areas. */
.nav-tab { display: inline-flex; align-items: center; gap: 7px; }
.nav-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* The area navigation sits in the header beside the town name. */
.topbar .nav-tabs { display: none; flex: 0 1 auto; gap: clamp(24px, 5vw, 72px); margin: 0 0 0 clamp(24px, 4vw, 64px); padding: 0; border: 0; border-radius: 0; background: none; overflow: visible; }
body.in-game .topbar .nav-tabs { display: flex; }
.topbar .nav-tab { padding: 9px 16px; border: 2px solid transparent; border-radius: 999px; background: transparent; color: #eaf6f5; font: 900 14px Nunito, system-ui, sans-serif; }
.topbar .nav-tab:hover { background: #ffffff26; color: #fff; }
.topbar .nav-tab.active { border-color: #fff3cf; background: #fff8e6; color: #22536e; box-shadow: 0 3px 0 #1f4a6688; }
@media (max-width: 1000px) and (min-width: 651px) { .topbar .nav-tabs { gap: 20px; margin-left: 24px; } }
@media (max-width: 650px) {
  body.in-game .topbar { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; row-gap: 8px; }
  body.in-game .topbar .nav-tabs { order: 5; width: 100%; margin: 0; gap: 10px; justify-content: space-between; }
  .topbar .nav-tab { flex: 1; justify-content: center; padding: 8px 6px; font-size: 13px; }
}
.topbar .brand h1, .cloud-open { white-space: nowrap; }
