
:root {
  --ink: #263c36;
  --green: #28764c;
  --paper: #fffdf4;
  --pink: #ffe1ed;
  --yellow: #fff0a9;
  --blue: #d9efff;
  --purple: #eee1ff;
  --mint: #dff2d8;
  --line: #d9d9c9;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: #fff8df;
  background-image:
    radial-gradient(#e9d9aa 0.8px, transparent 0.8px);
  background-size: 19px 19px;
  color: var(--ink);
  font-family: "Comic Neue", cursive;
  font-size: 16px;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px max(5%, calc((100% - 1100px) / 2));
  background: #fffdf4;
  border-bottom: 2px dashed #dfd5b7;
}

.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: 29px;
  font-weight: 700;
  text-decoration: none;
  transform: rotate(-2deg);
}

.logo-doodle {
  width: 34px;
  height: 34px;
}

.logo-dot {
  color: #e58c9f;
}

.top-note {
  padding: 7px 12px;
  border-radius: 50% 45% 48% 40%;
  background: var(--yellow);
  font-size: 13px;
  font-weight: 700;
  transform: rotate(2deg);
}

main {
  width: min(1050px, 92%);
  margin: auto;
}

.hero {
  position: relative;
  min-height: 315px;
  padding: 57px 20px 35px;
  text-align: center;
}

.hero::before {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  background: #d9efff;
  content: "";
  transform: translateX(-50%);
  clip-path: ellipse(75% 100% at 50% 0%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 13px;
  border: 1px dashed #7da5b5;
  border-radius: 30px;
  background: #f8fdff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  transform: rotate(-1deg);
}

.sparkle {
  color: #e9a72c;
  font-size: 17px;
}

h1 {
  margin: 20px 0 10px;
  font-family: "Fredoka", sans-serif;
  font-size: clamp(43px, 7vw, 76px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -1.8px;
  text-shadow: 2px 3px 0 #fffdf4;
}

h1 span {
  color: #2e794d;
  -webkit-text-stroke: 0.4px #244d37;
}

.hero-copy {
  max-width: 470px;
  margin: 15px auto 0;
  font-size: 17px;
  line-height: 1.6;
}

.sun-doodle {
  position: absolute;
  top: 26px;
  right: 3%;
  width: 95px;
  transform: rotate(8deg);
}

.cloud {
  position: absolute;
  width: 95px;
}

.cloud-one {
  top: 22px;
  left: 3%;
  transform: rotate(-6deg);
}

.hero-sticker {
  position: absolute;
  right: 7%;
  bottom: 5px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 2px solid #31583b;
  border-radius: 45% 55% 40% 50%;
  background: #fffdf4;
  font-size: 12px;
  font-weight: 700;
  transform: rotate(4deg);
}

.hero-sticker svg {
  width: 42px;
  height: 42px;
}

.paper-card {
  position: relative;
  padding: clamp(20px, 4vw, 38px);
  border: 2px solid #e4d7ad;
  border-radius: 23px 18px 25px 17px;
  background: var(--paper);
  box-shadow: 4px 6px 0 rgba(122, 103, 58, 0.09);
}

.planner {
  margin: 22px auto 28px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 25px;
}

.mini-label {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

h2 {
  margin: 0;
  font-family: "Fredoka", sans-serif;
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.5px;
}

.page-number {
  padding: 7px 11px;
  border: 1px dashed #c2b58c;
  border-radius: 7px;
  color: #8c815e;
  font-size: 10px;
  font-weight: 700;
  transform: rotate(3deg);
}

fieldset {
  min-width: 0;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

legend {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-bottom: 12px;
  padding: 7px 11px;
  border-radius: 8px 14px 9px 13px;
  font-size: 15px;
  font-weight: 700;
}

fieldset:nth-of-type(1) legend {
  background: var(--yellow);
}

fieldset:nth-of-type(2) legend {
  background: var(--blue);
}

fieldset:nth-of-type(3) legend {
  background: var(--purple);
}

fieldset:nth-of-type(4) legend {
  background: var(--mint);
}

.legend-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 29px;
  height: 29px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fffdf4;
  font-family: "Fredoka", sans-serif;
  font-size: 19px;
}

.time-icon {
  color: #bb7b26;
}

.energy-icon {
  color: #b97a21;
}

.place-icon {
  color: #8757a6;
}

.mood-icon {
  color: #c56b8b;
}

.options {
  display: grid;
  gap: 11px;
}

.three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pick-card,
.mood-card {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.pick-card input,
.mood-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.pick-content {
  display: flex;
  min-height: 122px;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 7px;
  border: 2px solid var(--line);
  border-radius: 17px 12px 16px 13px;
  background: #fffefa;
  text-align: center;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}

.pick-content svg {
  width: 54px;
  height: 48px;
  overflow: visible;
}

.pick-content strong {
  font-family: "Fredoka", sans-serif;
  font-size: 15px;
  font-weight: 500;
}

.pick-content small {
  color: #6d776e;
  font-size: 12px;
  line-height: 1.4;
}

.pick-card:hover .pick-content,
.mood-card:hover > span {
  transform: translateY(-3px) rotate(-0.5deg);
  border-color: #92bc90;
}

.pick-card input:checked + .pick-content,
.mood-card input:checked + span {
  border-color: #328254;
  background: #e8f6df;
  box-shadow: inset 0 0 0 1px #328254, 2px 4px 0 #d3e8c9;
}

.pick-card input:checked + .pick-content::after,
.mood-card input:checked + span::after {
  position: absolute;
  top: 6px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #328254;
  color: white;
  content: "✓";
  font-family: sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.pick-card input:focus-visible + .pick-content,
.mood-card input:focus-visible + span {
  outline: 3px dashed #328254;
  outline-offset: 4px;
}

.horizontal {
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  padding: 13px;
  text-align: left;
}

.horizontal svg {
  flex: 0 0 52px;
}

.horizontal > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.horizontal strong {
  font-size: 15px;
}

.mood-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mood-card > span {
  position: relative;
  display: flex;
  min-height: 95px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 3px;
  border: 2px solid var(--line);
  border-radius: 16px 12px 17px 13px;
  background: #fffefa;
  transition: transform 0.18s, border-color 0.18s;
}

.mood-card svg {
  width: 46px;
  height: 40px;
}

.mood-card small {
  font-size: 12px;
  font-weight: 700;
}

.note-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 26px 0 18px;
  padding: 14px;
  border-radius: 15px;
  background: var(--pink);
}

.note-field label {
  font-size: 14px;
  font-weight: 700;
}

.optional-label {
  margin-left: 6px;
  color: #8b6175;
  font-size: 9px;
  letter-spacing: 1px;
}

.note-field input {
  width: 100%;
  min-width: 0;
  padding: 13px;
  border: 2px solid #e4c8d3;
  border-radius: 11px;
  outline: none;
  background: #fffdfb;
  color: var(--ink);
  font-size: 14px;
}

.note-field input:focus {
  border-color: #b56d8c;
}

.note-field input::placeholder {
  color: #a68b97;
}

.generate-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #215c3d;
  border-radius: 13px 18px 14px 20px;
  background: #2e794d;
  color: white;
  cursor: pointer;
  font-family: "Fredoka", sans-serif;
  font-size: 19px;
  font-weight: 500;
  box-shadow: 0 5px 0 #b8d7a9;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.generate-button:hover {
  background: #235f3c;
  transform: translateY(-2px) rotate(-0.3deg);
  box-shadow: 0 7px 0 #b8d7a9;
}

.generate-button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #b8d7a9;
}

.generate-button svg {
  width: 30px;
  height: 30px;
}

.tiny-note {
  margin: 14px 0 0;
  color: #777b69;
  text-align: center;
  font-size: 12px;
}

.result-section {
  margin-bottom: 28px;
  animation: pop-in 0.35s ease both;
}

.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}

.result-ribbon {
  padding: 9px 15px;
  border-radius: 6px 15px 7px 14px;
  background: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  transform: rotate(-1deg);
}

.result-flower {
  width: 56px;
  height: 56px;
}

.result-title {
  margin: 8px 0 10px;
  font-family: "Fredoka", sans-serif;
  font-size: clamp(30px, 5vw, 43px);
  line-height: 1.12;
}

.result-description {
  margin: 0;
  color: #56675b;
  font-size: 16px;
  line-height: 1.65;
}

.activity-card {
  margin-top: 22px;
  padding: 20px;
  border: 2px dashed #d6c89c;
  border-radius: 17px;
  background: #fff6ce;
}

.activity-card h3 {
  margin: 0 0 12px;
  font-family: "Fredoka", sans-serif;
  font-size: 18px;
  font-weight: 500;
}

.activity-card ol {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.activity-card li {
  position: relative;
  min-height: 27px;
  padding-left: 38px;
  font-size: 15px;
  line-height: 1.5;
  counter-increment: step;
}

.activity-card li::before {
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 2px solid #31583b;
  border-radius: 50%;
  background: #8bcf7d;
  content: counter(step);
  font-weight: 700;
}

.mission {
  margin-top: 15px;
  padding: 16px 18px;
  border: 2px dashed #e0afd0;
  border-radius: 13px 19px 14px 20px;
  background: #ffe8f4;
  transform: rotate(0.2deg);
}

.mission-label {
  margin: 0 0 5px;
  color: #8c5574;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.mission p:last-child {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.result-meta span {
  padding: 8px 11px;
  border: 1.5px solid #c8d7b9;
  border-radius: 22px;
  background: #f0f7e9;
  font-size: 12px;
  font-weight: 700;
}

.another-button {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 13px;
  border: 2px solid #c9c9b5;
  border-radius: 13px 18px 13px 18px;
  background: #fffefa;
  color: var(--green);
  cursor: pointer;
  font-family: "Fredoka", sans-serif;
  font-size: 17px;
}

.another-button:hover {
  background: #eaf5df;
}

.refresh-doodle {
  display: inline-block;
  margin-right: 5px;
  font-size: 22px;
  vertical-align: middle;
}

.bottom-scene {
  position: relative;
  margin: 15px -4.3vw 0;
  padding: 20px 5% 27px;
  overflow: hidden;
  background: #dff0c2;
  text-align: center;
}

.bottom-scene svg {
  display: block;
  width: min(700px, 100%);
  height: auto;
  margin: 0 auto;
}

.bottom-scene p {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.7;
}

.bottom-scene strong {
  color: #28764c;
  font-family: "Fredoka", sans-serif;
  font-size: 20px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 5%;
  background: #fffdf4;
  color: #7c826e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-align: center;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 1100px) {
  .bottom-scene {
    margin-right: calc((1050px - 100vw) / 2);
    margin-left: calc((1050px - 100vw) / 2);
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 13px 4%;
  }

  .logo {
    font-size: 25px;
  }

  .top-note {
    font-size: 11px;
  }

  main {
    width: 94%;
  }

  .hero {
    min-height: 295px;
    padding: 57px 7px 50px;
  }

  .sun-doodle {
    top: 15px;
    right: -2px;
    width: 64px;
  }

  .cloud-one {
    top: 17px;
    left: -6px;
    width: 72px;
  }

  .hero-copy {
    max-width: 340px;
    font-size: 15px;
  }

  .hero-sticker {
    right: 50%;
    bottom: 4px;
    white-space: nowrap;
    transform: translateX(50%) rotate(2deg);
  }

  .paper-card {
    padding: 20px 14px;
    border-radius: 18px;
  }

  .three-cols {
    gap: 7px;
  }

  .pick-content {
    min-height: 112px;
    padding: 9px 4px;
  }

  .pick-content svg {
    width: 45px;
    height: 42px;
  }

  .pick-content strong {
    font-size: 13px;
  }

  .pick-content small {
    font-size: 10px;
  }

  .horizontal {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding: 10px;
  }

  .horizontal svg {
    flex-basis: auto;
    width: 43px;
    height: 42px;
  }

  .horizontal strong {
    font-size: 13px;
  }

  .horizontal small {
    font-size: 10px;
  }

  .mood-grid {
    gap: 5px;
  }

  .mood-card > span {
    min-height: 83px;
  }

  .mood-card svg {
    width: 37px;
    height: 34px;
  }

  .mood-card small {
    font-size: 10px;
  }

  .generate-button {
    font-size: 17px;
  }

  .result-meta span {
    font-size: 11px;
  }

  .bottom-scene {
    margin-right: -3.2vw;
    margin-left: -3.2vw;
  }

  footer {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 370px) {
  .top-note {
    max-width: 115px;
    text-align: center;
  }

  .three-cols {
    grid-template-columns: 1fr;
  }

  .pick-content {
    min-height: 88px;
  }

  .pick-content svg {
    width: 40px;
    height: 35px;
  }

  .two-cols {
    grid-template-columns: 1fr;
  }

  .horizontal {
    flex-direction: row;
    align-items: center;
  }

  .mood-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}