:root {
  --paper: #f6e7cf;
  --card: #fff8ec;
  --rust: #b8481f;
  --pumpkin: #e88a2d;
  --mustard: #e9b949;
  --olive: #6b7a3a;
  --cocoa: #4a2c1d;
  --blush: #f2c4b0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  font-weight: 700;
  color: var(--cocoa);

  background-color: var(--paper);
  background-image: radial-gradient(rgba(184,72,31,.12) 2px, transparent 2px);
  background-size: 26px 26px;
  overflow-x: hidden;
}

.app {
  position: relative;
  z-index: 2;
  max-width: 460px;
  margin: 0 auto;
  padding: 22px 16px 60px;
}

header { text-align: center; }

h1 {
  font-family: "Chewy", "Comic Sans MS", cursive;
  font-weight: 400;
  font-size: clamp(2rem, 9vw, 2.8rem);
  margin: 0;
  color: var(--rust);
  letter-spacing: 1px;
  text-shadow: 3px 3px 0 var(--mustard);
}

.subtitle {
  font-family: "Caveat", cursive;
  font-size: 1.45rem;
  margin: 6px 0 0;
}

.card {
  position: relative;
  background: var(--card);
  border: 3px solid var(--cocoa);
  border-radius: 24px;
  padding: 22px 18px;
  margin-top: 26px;
  box-shadow: 6px 6px 0 var(--cocoa);
}

.card::before {
  content: "";
  position: absolute;
  top: -14px; left: 50%;
  width: 90px; height: 24px;
  transform: translateX(-50%) rotate(-3deg);
  background: repeating-linear-gradient(45deg, var(--mustard) 0 8px, #f3d27a 8px 16px);
  opacity: .9;
  border-radius: 3px;
}

.weather { text-align: center; transform: rotate(-1deg); }

.location { margin: 0; font-size: 1rem; }

.temp {
  font-family: "Chewy", cursive;
  font-size: clamp(6rem, 32vw, 8.5rem);
  line-height: 1;
  margin: 6px 0 0;
  color: var(--rust);
  text-shadow: 4px 4px 0 var(--mustard);
}

.condition { font-size: 1.5rem; margin: 6px 0 0; }
.feels { margin: 4px 0 0; opacity: .8; }

.wind-pill {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  background: var(--blush);
  border: 2px dashed var(--rust);
  border-radius: 999px;
  font-size: .9rem;
}

.btn {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 16px;
  font-family: "Chewy", cursive;
  font-size: 1.5rem;
  letter-spacing: .5px;
  color: #fff;
  background: var(--rust);
  border: 3px solid var(--cocoa);
  border-radius: 18px;
  box-shadow: 0 6px 0 var(--cocoa);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 9px 0 var(--cocoa); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--cocoa); }
.btn:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; }
.btn.green { background: var(--olive); font-size: 1.3rem; }

.reco { display: none; transform: rotate(1deg); text-align: center; }
.reco.show { display: block; animation: popIn .5s cubic-bezier(.2, 1.4, .4, 1); }

@keyframes popIn {
  from { opacity: 0; transform: scale(.85) translateY(20px) rotate(4deg); }
  to   { opacity: 1; transform: scale(1) translateY(0) rotate(1deg); }
}

.reco h2 {
  font-family: "Chewy", cursive;
  font-weight: 400;
  font-size: 1.9rem;
  margin: 0 0 8px;
  color: var(--rust);
}
.reco .pick { font-size: 1.2rem; margin: 0 0 8px; }
.reco .joke { font-family: "Caveat", cursive; font-size: 1.5rem; margin: 0; }

.stickers { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 16px 0; }
.sticker {
  background: #fff;
  border: 2px solid var(--cocoa);
  border-radius: 16px;
  padding: 8px 12px;
  font-size: .85rem;
  box-shadow: 3px 3px 0 var(--pumpkin);
  animation: wiggle 3s ease-in-out infinite;
}
.sticker:nth-child(even) { animation-delay: .6s; }
.sticker span { display: block; font-size: 2rem; }

@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}

.reco.emergency { background: #ffe1d6; border-color: #c0261a; box-shadow: 6px 6px 0 #c0261a; }
.reco.emergency h2 { color: #c0261a; }

h3.section-title {
  font-family: "Chewy", cursive;
  font-weight: 400;
  font-size: 1.7rem;
  margin: 0 0 4px;
  color: var(--olive);
}
.hint { margin: 0 0 14px; font-size: .95rem; opacity: .85; }

.field {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cocoa);
  background: #fff;
  border: 2px dashed var(--cocoa);
  border-radius: 12px;
}

.fit-card {
  display: none;
  margin-top: 22px;
  padding: 14px 14px 20px;
  background: #fff;
  border: 3px solid var(--cocoa);
  border-radius: 6px;
  box-shadow: 6px 6px 0 var(--pumpkin);
  text-align: center;
  transform: rotate(-2deg);
}
.fit-card.show { display: block; animation: popIn .5s cubic-bezier(.2, 1.4, .4, 1); }

.fit-card img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border: 2px solid var(--cocoa);
  border-radius: 4px;
}
.fit-title { font-family: "Chewy", cursive; font-size: 1.8rem; color: var(--rust); margin: 12px 0 0; }
.fit-weather { margin: 2px 0; }
.fit-date { font-size: .85rem; opacity: .7; margin: 0 0 8px; }
.fit-outfit { font-size: 1.05rem; margin: 6px 0; }
.fit-hype {
  font-family: "Chewy", cursive;
  font-size: 2rem;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 2px dashed var(--cocoa);
  color: var(--olive);
}

.btn.download { display: none; background: var(--pumpkin); font-size: 1.3rem; }
.btn.download.show { display: block; }

footer { text-align: center; margin-top: 34px; font-family: "Caveat", cursive; font-size: 1.3rem; }

.sticker-deco { position: absolute; font-size: 2.2rem; animation: wiggle 4s ease-in-out infinite; }
.d1 { top: -6px; left: -2px; }
.d2 { top: 4px; right: 0; animation-delay: .8s; }
.d3 { top: -22px; right: -4px; font-size: 2.6rem; }
.d4 { bottom: -16px; left: -6px; animation-delay: 1.2s; }

.leaf {
  position: fixed;
  top: -40px;
  z-index: 1;
  pointer-events: none;
  animation: fall linear infinite;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .leaf { display: none; }
}

@media (min-width: 700px) {
  .app { padding-top: 40px; }
}