/* Give the phone layouts a little breathing room without changing their artwork. */
@media (max-width: 520px) {
  .home-main {
    min-height: calc(100vh - 110px);
    min-height: calc(100svh - 110px);
    padding-bottom: 40px;
  }

  .hero { padding-top: clamp(92px, 11.5vh, 110px); }
  .hero h1 {
    font-size: clamp(36px, 11.5vw, 46px);
    line-height: 1.48;
    letter-spacing: .08em;
  }
  .hero h1 .headline-line:nth-child(2) { padding-left: .8em; }
  .hero h1 .headline-char:nth-child(3n+1) { transform: translateY(-2px) rotate(-1.5deg); }
  .hero h1 .headline-char:nth-child(3n+2) { transform: translateY(2px) rotate(1.5deg); }
  .hero h1 .headline-char:nth-child(3n) { transform: translateY(4px) rotate(-1deg); }
  .hero-carousel { margin-top: 34px; }
  .hero-carousel .art { height: 250px; }
  .hero-carousel .carousel-slide .cover-art {
    left: 0;
    top: 58px;
    width: 100%;
    height: 188px;
  }
  .welcome { padding-top: 40px; }
  .home-trail { margin-top: 28px; }

  .content.is-picker-page { margin-top: 0; }
  .picker-refresh .picker-hero {
    min-height: 216px;
    padding: 56px 4px 0;
  }
  .picker-refresh .picker-hero-copy h2 { font-size: clamp(33px, 9vw, 38px); }
  .picker-refresh .picker-hero-copy p { font-size: 12px; }
}

/* Center the visible illustration and title together, without shifting either off-center. */
.picker-refresh .picker-hero { justify-content: center; gap: clamp(12px, 4vw, 18px); }
.picker-refresh .picker-hero-art {
  display: block;
  flex: 0 0 clamp(104px, 30vw, 140px);
  width: clamp(104px, 30vw, 140px);
  height: clamp(104px, 30vw, 140px);
}
.picker-refresh[data-mode="drink"] .picker-hero-art { transform: translateY(-13px); }
.picker-refresh .picker-hero-copy {
  flex: 0 0 auto;
  padding: 0;
  transform: none;
  text-align: center;
}
.picker-refresh .picker-hero-art,
.picker-refresh .picker-hero-copy { position: relative; left: calc(-1 * clamp(14px, 4vw, 20px)); }

/* An unobstructed, temporary cutout in the center of the screen. */
.picker-empty-notice[hidden] { display: none; }
.picker-empty-notice {
  position: fixed;
  z-index: 100;
  top: 50%;
  left: 50%;
  width: min(84vw, 300px);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.picker-empty-notice img {
  display: block;
  width: min(62vw, 230px);
  height: auto;
}
.picker-empty-notice p {
  margin: 4px 0 0;
  color: #513327;
  font-size: clamp(18px, 5vw, 22px);
  line-height: 1.5;
  letter-spacing: .04em;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 3px #f8f6ee, 0 0 7px #f8f6ee;
}

/* The saving animation floats above the previous page after the form closes. */
.record-saving[hidden] { display: none; }
.record-saving {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
.record-saving img {
  display: block;
  width: min(58vw, 220px);
  height: auto;
}
.record-saving p {
  margin: 3px 0 0;
  color: #513327;
  font-size: clamp(16px, 4.5vw, 20px);
  letter-spacing: .04em;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
  -webkit-text-stroke: 3px #faf8f1;
  paint-order: stroke fill;
  text-shadow: 0 1px 3px #faf8f1, 0 0 7px #faf8f1;
}

/* The diary keeps the same warm paper and hand-drawn character as the picker. */
#content.is-tracks-page {
  margin-top: 0;
  padding-top: clamp(58px, 8vh, 76px);
}
.tracks-heading {
  display: block;
  padding: 0 0 28px;
  border-bottom: 1px solid #e8ded2;
}
.tracks-heading-inner { width: min(100%, 340px); margin: 0 auto; }
.tracks-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tracks-heading .tracks-cheers-bear {
  width: clamp(76px, 22vw, 96px);
  height: clamp(76px, 22vw, 96px);
}
.tracks-title-copy { min-width: 0; text-align: center; }
.tracks-heading h2 {
  display: block;
  margin: 0 0 6px;
  font-size: clamp(32px, 8vw, 40px);
  line-height: 1.2;
  letter-spacing: .04em;
  white-space: nowrap;
}
.tracks-heading .tracks-kicker {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  letter-spacing: .16em;
  color: #aa9586;
}
.tracks-list-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 28px 0 15px;
}
.tracks-list-title { display: flex; align-items: baseline; gap: 10px; }
.tracks-list-heading h3 { font-size: 19px; letter-spacing: .05em; }
.tracks-list-heading .badge {
  padding: 0;
  background: transparent;
  color: #a99181;
  font-size: 12px;
}
button.tracks-add {
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid #d9cabb;
  border-radius: 24px;
  background: #f2e9dd;
  color: #725544;
  font-size: 14px;
}
#track-list { display: grid; gap: 10px; }
#track-list .item {
  min-height: 76px;
  padding: 14px 16px;
  gap: 12px;
  border: 1px solid #eadfd2;
  border-radius: 12px;
  background: rgba(255, 253, 247, .48);
}
#track-list .item-icon { display: none; }
#track-list .item-main strong { font-size: 17px; font-weight: 400; }
#track-list .item-main small { display: block; margin-top: 6px; font-size: 12px; }
#track-list .item button {
  flex: none;
  min-height: 44px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #a08b7d;
  font-size: 12px;
}
#track-list .empty {
  padding: 26px 18px;
  border: 1px dashed #e1d3c3;
  border-radius: 12px;
  text-align: center;
  line-height: 1.7;
}
