@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Nunito:wght@400;600;700&display=swap");

/* =======================================================
   LITTLE WINGS — nursery theme
   Palette: milk, powder blue, blush, butter, sage, cocoa ink
   Devices: scalloped edges, stitched seams, sticker buttons
======================================================= */

:root {
  color-scheme: light;

  --milk: #fffcf7;
  --cloud: #ffffff;
  --sky: #a8d5ef;
  --sky-deep: #74b7dd;
  --blush: #ffc2ce;
  --blush-deep: #ef97ab;
  --butter: #ffe1a0;
  --butter-deep: #e8bf6a;
  --sage: #bee3c6;
  --sage-deep: #86c297;

  --ink: #4c4239;
  --ink-soft: #857466;
  --line: #f0e4d7;

  --shadow: 0 10px 24px rgba(180, 146, 116, 0.14);
  --radius: 26px;

  font-family: "Nunito", system-ui, sans-serif;
  font-size: 17px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--milk);
  background-image:
    radial-gradient(60ch 40ch at 12% -10%, rgba(255, 194, 206, 0.35), transparent 70%),
    radial-gradient(60ch 40ch at 92% 2%, rgba(168, 213, 239, 0.35), transparent 70%),
    radial-gradient(50ch 34ch at 50% 100%, rgba(190, 227, 198, 0.28), transparent 70%);
  background-attachment: fixed;
  line-height: 1.65;
}

/* --- type ------------------------------------------- */

h1,
h2,
h3,
.brand,
.stat strong,
.answer-label {
  font-family: "Baloo 2", "Nunito", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
}

h2 {
  font-size: 1.55rem;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

p {
  max-width: 62ch;
}

[hidden] {
  display: none !important;
}

button,
select,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

button,
a,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--blush-deep);
  outline-offset: 3px;
}

a {
  color: #2b7fa8;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

i.bi {
  font-style: normal;
}

/* --- top bar with scalloped hem ---------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 14px 26px;
  background: var(--cloud);
  box-shadow: 0 6px 18px rgba(180, 146, 116, 0.1);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -13px;
  height: 13px;
  background: radial-gradient(circle at 13px 0, var(--cloud) 12.5px, transparent 13px) repeat-x;
  background-size: 26px 13px;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: 1.15rem;
  color: #b57f4d;
  background: var(--butter);
  border-radius: 60% 60% 55% 55% / 70% 70% 45% 45%;
}

.brand-accent {
  color: var(--blush-deep);
}

nav {
  order: 3;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 94%, transparent);
  mask-image: linear-gradient(to right, #000 94%, transparent);
}

nav::-webkit-scrollbar {
  display: none;
}

.nav-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  font-weight: 700;
  color: var(--ink-soft);
  background: transparent;
  border: 2px solid transparent;
  border-radius: 999px;
}

.nav-button:hover {
  color: var(--ink);
  background: #fdf3e6;
}

.nav-button.active {
  color: var(--ink);
  background: var(--butter);
  border-color: var(--butter-deep);
}

.saved-count {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-weight: 700;
  background: var(--sage);
  border-radius: 999px;
}

.saved-count span {
  font-family: "Baloo 2", sans-serif;
  font-size: 1.15rem;
}

/* --- buttons: pastel stickers ------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 11px 22px;
  font-weight: 700;
  color: var(--ink);
  background: var(--cloud);
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--line);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.button:hover:not(:disabled) {
  background: #fffaf2;
}

.button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--line);
}

.button.primary {
  background: var(--sky);
  border-color: var(--sky-deep);
  box-shadow: 0 4px 0 var(--sky-deep);
}

.button.primary:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--sky-deep);
}

.button.subtle {
  min-height: 44px;
  padding: 8px 18px;
  background: #fdf3e6;
  border-color: #f0dfc6;
  box-shadow: 0 4px 0 #f0dfc6;
}

.button.collected {
  color: #3c6b4c;
  background: var(--sage);
  border-color: var(--sage-deep);
  box-shadow: 0 4px 0 var(--sage-deep);
  opacity: 1;
}

/* --- explore ----------------------------------------- */

main {
  padding: 34px 26px 60px;
}

.explorer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 26px;
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
}

.globe-stage {
  position: relative;
  padding: 30px 30px 26px;
  background: var(--cloud);
  border-radius: 40px;
  box-shadow: var(--shadow);
}

.globe-heading h1 {
  margin-top: 6px;
}

.globe-heading p {
  margin-top: 10px;
  color: var(--ink-soft);
}

#globe {
  height: min(56vh, 480px);
  margin: 14px 0 6px;
  cursor: grab;
}

#globe canvas {
  display: block;
}

.eyebrow {
  display: inline-block;
  padding: 5px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #a4657a;
  background: #ffeef2;
  border-radius: 999px;
}

.globe-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.globe-actions p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.country-panel {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  background: var(--cloud);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.field-label {
  font-weight: 700;
  font-size: 0.95rem;
}

select {
  width: 100%;
  min-height: 50px;
  padding: 10px 16px;
  font-weight: 600;
  background: #fdf3e6;
  border: 2px solid #f0dfc6;
  border-radius: 18px;
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 0.9rem;
}

.status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 1.5rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.bird-list {
  display: grid;
  gap: 16px;
  max-height: 62vh;
  padding-right: 4px;
  overflow-y: auto;
}

.explore-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  max-width: 1280px;
  margin: 30px auto 0;
  font-weight: 600;
  color: var(--ink-soft);
}

.explore-footer span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --- bird cards -------------------------------------- */

.bird-card {
  overflow: hidden;
  background: var(--cloud);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.bird-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, #e9f4fb, #fff1f4);
}

.bird-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.7), transparent 60%);
}

.bird-photo img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-credit {
  padding: 8px 16px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: #fdf7ef;
}

.photo-credit:empty {
  display: none;
}

.bird-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
}

.scientific {
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.bird-description {
  font-size: 0.98rem;
}

.chip {
  align-self: flex-start;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #3c6b4c;
  background: var(--sage);
  border-radius: 999px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.card-actions a,
a.external {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.92rem;
}

.card-facts {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 20px;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

details {
  font-size: 0.94rem;
}

summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink-soft);
}

/* --- inner pages ------------------------------------- */

.page {
  max-width: 1180px;
  margin: 0 auto;
}

.page.narrow {
  max-width: 760px;
}

.page-heading {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin-bottom: 26px;
}

.center,
.page-heading.center {
  justify-items: center;
  text-align: center;
}

.center p,
.page-heading.center p {
  margin-inline: auto;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat {
  display: grid;
  gap: 2px;
  padding: 22px;
  text-align: center;
  background: var(--cloud);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat:nth-child(1) {
  background: #eaf5fc;
}

.stat:nth-child(2) {
  background: #fff2f5;
}

.stat:nth-child(3) {
  background: #f1faf3;
}

.stat strong {
  font-size: 2.4rem;
}

.stat span {
  font-weight: 600;
  color: var(--ink-soft);
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 40px 0 18px;
}

.stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-weight: 700;
  background: var(--butter);
  border: 2px dashed #d9a95f;
  border-radius: 999px;
  transform: rotate(-2deg);
}

.stamp:nth-child(even) {
  background: var(--blush);
  border-color: var(--blush-deep);
  transform: rotate(2deg);
}

.stamp:nth-child(3n) {
  background: var(--sky);
  border-color: var(--sky-deep);
  transform: rotate(-1deg);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.empty {
  grid-column: 1 / -1;
  padding: 30px;
  text-align: center;
  color: var(--ink-soft);
  background: var(--cloud);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}

/* --- games: stitched panels -------------------------- */

.game-panel {
  position: relative;
  display: grid;
  gap: 18px;
  justify-items: center;
  padding: 34px 28px;
  background: var(--cloud);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.game-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px dashed #f0e0e5;
  border-radius: 26px;
  pointer-events: none;
}

.game-panel > * {
  position: relative;
}

.sound-orb {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  font-size: 2.2rem;
  color: #2b7fa8;
  background: var(--sky);
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(168, 213, 239, 0.28);
}

audio {
  width: 100%;
  max-width: 460px;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  width: 100%;
}

.answer {
  overflow: hidden;
  padding: 0 0 14px;
  text-align: center;
  background: var(--cloud);
  border: 2px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 4px 0 var(--line);
}

.answer:hover:not(:disabled) {
  border-color: var(--sky-deep);
}

.answer .bird-photo {
  aspect-ratio: 1 / 1;
}

.answer-label {
  display: block;
  padding: 12px 12px 0;
  font-size: 1.02rem;
}

.answer.correct {
  background: var(--sage);
  border-color: var(--sage-deep);
  box-shadow: 0 4px 0 var(--sage-deep);
}

.answer.wrong {
  background: var(--blush);
  border-color: var(--blush-deep);
  box-shadow: 0 4px 0 var(--blush-deep);
}

.result {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.result p {
  margin-inline: auto;
}

.source-details {
  width: 100%;
  max-width: 520px;
  padding: 12px 18px;
  font-size: 0.85rem;
  background: #fdf7ef;
  border-radius: 18px;
}

.source-details div {
  margin-top: 8px;
  color: var(--ink-soft);
}

.mystery-photo .bird-photo {
  width: min(100%, 460px);
  border-radius: 26px;
  overflow: hidden;
}

.mystery-photo .photo-credit {
  margin-top: 8px;
  text-align: center;
  background: transparent;
}

.clues {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  margin: 0;
  padding-left: 26px;
}

.clues li {
  padding: 12px 16px;
  font-weight: 600;
  background: #fdf3e6;
  border-radius: 18px;
}

.battle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-bottom: 24px;
}

.battle .bird-photo {
  aspect-ratio: 1 / 1;
}

.battle .button {
  width: 100%;
}

/* --- missions ---------------------------------------- */

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.mission {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 24px;
  background: var(--cloud);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mission.complete {
  background: #f1faf3;
  border-color: var(--sage-deep);
}

.mission-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  font-size: 1.5rem;
  color: #2b7fa8;
  background: #eaf5fc;
  border-radius: 60% 60% 55% 55% / 70% 70% 45% 45%;
}

.mission.complete .mission-icon {
  color: #3c6b4c;
  background: var(--sage);
}

.mission p {
  font-size: 0.96rem;
  color: var(--ink-soft);
}

progress {
  width: 100%;
  height: 14px;
  appearance: none;
  border: none;
}

progress::-webkit-progress-bar {
  background: #f4ece2;
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: var(--sky-deep);
  border-radius: 999px;
}

progress::-moz-progress-bar {
  background: var(--sky-deep);
  border-radius: 999px;
}

.mission.complete progress::-webkit-progress-value {
  background: var(--sage-deep);
}

.mission.complete progress::-moz-progress-bar {
  background: var(--sage-deep);
}

.mission-progress {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.mission.complete .mission-progress {
  color: #3c6b4c;
}

/* --- notices ----------------------------------------- */

.notice,
.warning {
  position: relative;
  margin-top: 34px;
  padding: 22px 26px;
  background: #fdf3e6;
  border-radius: var(--radius);
}

.notice::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px dashed #ecd9bd;
  border-radius: 20px;
  pointer-events: none;
}

.notice p {
  margin-top: 6px;
  color: var(--ink-soft);
}

.warning {
  margin: 20px 26px 0;
  font-weight: 600;
  background: #ffeef2;
  border: 2px solid var(--blush-deep);
}

.site-footer {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 40px 26px 50px;
  text-align: center;
  color: var(--ink-soft);
}

.site-footer span {
  font-weight: 700;
  color: var(--ink);
}

.site-footer p {
  max-width: 74ch;
  font-size: 0.85rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 40;
  max-width: min(92vw, 420px);
  padding: 14px 24px;
  font-weight: 700;
  text-align: center;
  background: var(--cloud);
  border: 2px solid var(--sage-deep);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(180, 146, 116, 0.24);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --- responsive -------------------------------------- */



@media (max-width: 1100px) {
  .explorer {
    grid-template-columns: minmax(0, 1fr);
  }

  .country-panel {
    position: static;
  }

  .bird-list {
    max-height: none;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    font-size: 16px;
  }

  .topbar {
    padding: 12px 16px;
  }

  main {
    padding: 28px 16px 50px;
  }

  .globe-stage {
    padding: 22px 18px 20px;
    border-radius: 30px;
  }

  #globe {
    height: min(48vh, 360px);
  }

  .country-panel,
  .game-panel {
    padding: 22px 18px;
  }

  .warning {
    margin: 18px 16px 0;
  }
}

@media (max-width: 460px) {
  .answer-grid,
  .card-grid,
  .mission-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .button {
    width: 100%;
  }

  .globe-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- become a bird ----------------------------------- */

.journey {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 24px;
  align-items: start;
}

.journey-stage {
  padding: 20px;
  background: var(--cloud);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

#journey-globe {
  height: min(50vh, 420px);
  cursor: grab;
}

.meters {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.meter {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
}

.meter-label {
  font-weight: 700;
  font-size: 0.92rem;
}

.meter-value {
  font-weight: 700;
  font-size: 0.92rem;
  text-align: right;
  color: var(--ink-soft);
}

.meter.day-count {
  grid-template-columns: 128px minmax(0, 1fr);
  padding-top: 6px;
  border-top: 2px dashed var(--line);
}

.meter.day-count strong {
  font-family: "Baloo 2", sans-serif;
  font-size: 1.4rem;
}

.journey-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 28px;
  background: var(--cloud);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.leg-place {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.leg-result {
  padding: 14px 18px;
  font-size: 0.95rem;
  background: #eaf5fc;
  border-radius: 20px;
}

.choices {
  display: grid;
  gap: 12px;
  width: 100%;
  margin-top: 6px;
}

.choice {
  display: grid;
  gap: 4px;
  justify-items: start;
  width: 100%;
  padding: 16px 20px;
  font-weight: 700;
  text-align: left;
  color: var(--ink);
  background: #fdf3e6;
  border: 2px solid #f0dfc6;
  border-radius: 22px;
  box-shadow: 0 4px 0 #f0dfc6;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.choice:hover {
  background: var(--butter);
  border-color: var(--butter-deep);
  box-shadow: 0 4px 0 var(--butter-deep);
}

.choice:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--butter-deep);
}

.choice-cost {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.journey-log {
  display: grid;
  gap: 14px;
  width: 100%;
  margin: 6px 0 0;
  padding-left: 22px;
}

.journey-log p {
  margin-top: 4px;
  color: var(--ink-soft);
}

@media (max-width: 1100px) {
  .journey {
    grid-template-columns: minmax(0, 1fr);
  }

  .journey-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .journey-stage,
  .journey-panel {
    padding: 18px;
  }

  #journey-globe {
    height: min(42vh, 320px);
  }

  .meter {
    grid-template-columns: 104px minmax(0, 1fr) 40px;
  }
}

/* --- account panel ----------------------------------- */

.account {
  display: grid;
  gap: 12px;
  margin-bottom: 26px;
  padding: 24px 26px;
  background: var(--cloud);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}

.account:empty {
  display: none;
}

.account-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.account-name {
  font-weight: 700;
}

.account-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.account-field {
  display: grid;
  gap: 5px;
}

.account-field input {
  min-height: 48px;
  padding: 10px 16px;
  background: #fdf3e6;
  border: 2px solid #f0dfc6;
  border-radius: 18px;
}

.account-field input:focus-visible {
  border-color: var(--sky-deep);
}

/* --- song shapes ------------------------------------- */

.spectro {
  display: block;
  width: 100%;
  height: auto;
  background: var(--milk);
  border: 2px solid var(--line);
  border-radius: 22px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chip-button {
  min-height: 44px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--ink);
  background: #fdf3e6;
  border: 2px solid #f0dfc6;
  border-radius: 999px;
  box-shadow: 0 3px 0 #f0dfc6;
}

.chip-button:hover {
  background: var(--butter);
  border-color: var(--butter-deep);
  box-shadow: 0 3px 0 var(--butter-deep);
}

.chip-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--butter-deep);
}

.source-details input[type="file"] {
  margin-top: 10px;
  max-width: 100%;
}

/* --- kind city --------------------------------------- */

.city {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 24px;
  align-items: start;
}

.city-stage {
  padding: 24px;
  background: var(--cloud);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.city-cell {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font-size: 1.6rem;
  color: #8d7d6e;
  background: #f6efe5;
  border: 2px solid transparent;
  border-radius: 18px;
}

.city-cell.improved {
  color: #3c6b4c;
  background: var(--sage);
  border-color: var(--sage-deep);
}

.city-meter progress::-webkit-progress-value {
  background: var(--sage-deep);
}

.city-meter progress::-moz-progress-bar {
  background: var(--sage-deep);
}

.city-meter.risk progress::-webkit-progress-value {
  background: var(--blush-deep);
}

.city-meter.risk progress::-moz-progress-bar {
  background: var(--blush-deep);
}

.project-list {
  display: grid;
  gap: 12px;
}

.project {
  display: grid;
  gap: 6px;
  justify-items: start;
  width: 100%;
  padding: 18px 20px;
  text-align: left;
  background: var(--cloud);
  border: 2px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 4px 0 var(--line);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.project:hover {
  border-color: var(--sky-deep);
}

.project:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--line);
}

.project.picked {
  background: #f1faf3;
  border-color: var(--sage-deep);
  box-shadow: 0 4px 0 var(--sage-deep);
}

.project-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Baloo 2", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.project.picked .project-head {
  color: #3c6b4c;
}

.project-detail {
  font-weight: 400;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.project-cost {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* --- notebook ---------------------------------------- */

.notebook-results {
  display: grid;
  gap: 6px;
  margin-top: 26px;
}

.notebook-results h3 {
  margin-bottom: 2px;
}

.notebook-results .button {
  justify-self: start;
  margin-top: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 12px;
}

.bar-label {
  font-weight: 700;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.bar-track {
  height: 18px;
  background: #f4ece2;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--sky-deep);
  border-radius: 999px;
}

.bar-value {
  font-weight: 700;
  font-size: 0.92rem;
  text-align: right;
  color: var(--ink-soft);
}

.site-footer .button {
  margin-top: 6px;
}

@media (max-width: 1100px) {
  .city {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .city-stage {
    padding: 18px;
  }

  .city-cell {
    font-size: 1.25rem;
    border-radius: 14px;
  }

  .bar-row {
    grid-template-columns: 118px minmax(0, 1fr) 42px;
  }
}
