*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0; min-height: 100vh;
  background: #f4c430;
  color: #2b2116;
  font-family: "Comic Sans MS", "Comic Neue", "Chalkboard SE", "Segoe Print", "Marker Felt", "Bradley Hand", cursive, sans-serif;
  overflow-x: hidden;
}
button, a { font: inherit; color: inherit; }
:focus-visible { outline: 3px dashed #2b2116; outline-offset: 5px; }

.sketchbook { padding: 2.5rem 1.5rem; }
.page {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem; align-items: center;
  background-color: #fffdf3;
  background-image: repeating-linear-gradient(180deg, transparent 0 33px, #d6e4ee 33px 34px);
  border: 2px solid #2b2116;
  border-radius: 6px 18px 8px 22px;
  box-shadow: 8px 8px 0 #2b2116;
  padding: 2.5rem 2.5rem 2.5rem 4rem;
  position: relative;
}
.page::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 2.4rem;
  border-left: 2px solid #f19a9a;
}
.page.single { grid-template-columns: minmax(0, 1fr); max-width: 560px; }

.doodle { margin: 0; }
.doodle img { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; user-select: none; }
.doodle.wobbling picture { display: block; animation: wobble .6s ease-in-out infinite; }
@keyframes wobble {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-4deg) scale(1.02); }
  75% { transform: rotate(4deg); }
}

.scribble-title { margin: 0 0 .4rem; font-size: 1rem; font-weight: 700; display: inline-block; border-bottom: 3px solid #f4c430; }
h1 { margin: 0 0 .6rem; font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.2; font-weight: 700; }
.instruction { margin: 0 0 1rem; font-size: 1.05rem; line-height: 1.6; }
.instruction a { text-underline-offset: 4px; display: inline-block; padding: .3rem 0; }
.speech {
  margin: 0 0 1.2rem; min-height: 3.2em; font-size: 1.1rem; line-height: 1.5;
  padding: .6rem .9rem; border: 2px solid #2b2116; border-radius: 16px 16px 16px 2px;
  background: #ffffff;
}
.try-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.try {
  background: #2b2116; color: #fff5cc; border: 0; cursor: pointer;
  padding: .75rem 1.4rem; min-height: 48px; font-size: 1.1rem; font-weight: 700;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  transform: rotate(-1.5deg); transition: transform .15s ease;
}
.try:hover { transform: rotate(1deg) scale(1.03); }
.try:disabled { opacity: .7; cursor: default; transform: none; }
.tally { margin: 0; font-size: 1rem; }
.tally-count {
  display: inline-grid; place-items: center; min-width: 2.1em; height: 2.1em; padding: 0 .3em;
  border: 2px solid #2b2116; border-radius: 50% 45% 55% 48%; font-weight: 700; margin-left: .2rem;
}

.sticky {
  font-style: normal; display: inline-flex; flex-direction: column; gap: .1rem;
  background: #fff3a8; padding: .8rem 1rem 1rem; max-width: 100%;
  transform: rotate(1.5deg); box-shadow: 2px 4px 0 rgba(43, 33, 22, .25);
  position: relative; font-size: .95rem;
}
.sticky::before {
  content: ""; position: absolute; top: -10px; left: 50%; width: 60px; height: 18px; margin-left: -30px;
  background: rgba(255, 255, 255, .7); transform: rotate(-4deg);
}
.sticky-title { font-weight: 700; }
.sticky a { padding: .15rem 0; min-height: 26px; text-underline-offset: 3px; overflow-wrap: anywhere; }

@media (max-width: 780px) {
  .sketchbook { padding: 1rem .8rem 2rem; }
  .page { grid-template-columns: minmax(0, 1fr); padding: 1.4rem 1.2rem 1.8rem 2.4rem; gap: .5rem; box-shadow: 5px 5px 0 #2b2116; }
  .page::before { left: 1.4rem; }
  .doodle img { max-width: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
