@font-face {
  font-family: 'Lynn Display';
  src: url('fonts/Anton-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* One phone and small-tablet layout, after the desktop presentation styles. */
@media (max-width: 900px) {
  html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
  body { min-width: 0; }
  main, main > section, .section > *, .content, .vote-plan-grid > * { min-width: 0; }
  h1, h2, .stage-lead, .stage-reply, .lyric-readable p,
  .lyric-finale p, .vote-name h3, .vote-date strong,
  .hero-election strong, .vote-ticker-badge > span, .vote-ticker-group a {
    font-family: 'Lynn Display', Impact, sans-serif;
    font-weight: 400;
  }

  .vote-ticker { min-height: 58px; border-width: 3px; }
  .vote-ticker-badge { padding: 10px 12px; }
  .vote-ticker-badge > span { font-size: 1.3rem; line-height: 1; }
  .vote-ticker-badge small { font-size: .4rem; letter-spacing: .04em; margin-top: 6px; }
  .vote-ticker-group { gap: 24px; padding: 0 16px; }
  .vote-ticker-group a { font-size: 1.15rem; line-height: 1.2; }
  .vote-ticker-pause { flex-basis: 44px; min-height: 44px; margin: 2px 4px; font-size: 1rem; }

  header { display: block; position: relative; padding: 12px 20px 8px; }
  header > div { display: flex; align-items: center; gap: 4px; min-height: 44px; font-size: .86rem; letter-spacing: .04em; }
  header nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 12px; width: 100%; margin-top: 4px; }
  header nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .68rem; letter-spacing: .04em; }
  header nav a[href='#music-top'] { display: none; }
  header nav .nav-vote { position: absolute; top: 12px; right: 20px; width: auto; min-height: 44px; padding: 10px 12px; font-size: .68rem; }

  .portrait-hero, .song-started.portrait-hero {
    display: grid; grid-template-columns: minmax(0,1fr); gap: 0;
    min-height: 0; padding: 0;
  }
  .portrait-hero .hero-portrait, .song-started .hero-portrait {
    grid-column: 1; grid-row: 1; position: relative; inset: auto;
    width: 100%; height: clamp(190px,54vw,250px); min-height: 0;
    mask-image: none; -webkit-mask-image: none;
  }
  .portrait-hero .hero-portrait img {
    inset: 0 auto 0 50%; width: auto; max-width: 100%; height: 100%;
    object-fit: contain; object-position: center bottom; transform: translateX(-50%);
  }
  .portrait-hero .content, .song-started.portrait-hero .content {
    grid-column: 1; grid-row: 2; width: 100%; min-height: 0;
    padding: 20px 24px 16px; text-align: left; overflow: visible;
  }
  .hero-election { min-height: 48px; gap: 10px; padding: 10px 0; margin-bottom: 16px; }
  .hero-election > span:first-child { max-width: 100px; font-size: .58rem; line-height: 1.4; }
  .hero-election strong { font-size: 1.55rem; }
  .hero-election > span:last-child { font-size: 1.3rem; }
  .portrait-hero .hero-copy .eyebrow { font-size: .59rem; letter-spacing: .08em; line-height: 1.6; }
  .portrait-hero h1 { font-size: clamp(2.7rem,12vw,4.5rem); line-height: .98; margin: 14px 0 16px; text-shadow: 2px 3px 0 var(--red); }
  .portrait-hero .intro-copy { margin: 0; font-size: 1rem; line-height: 1.5; }
  .portrait-hero .hero-actions, .song-started .hero-actions {
    display: grid; grid-template-columns: minmax(0,1fr); gap: 8px;
    margin: 20px 0; justify-content: stretch;
  }
  .portrait-hero .hero-actions .vote-primary { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 14px 12px; font-size: .76rem; letter-spacing: .04em; }
  .hero-lyrics-link { display: flex; justify-content: center; align-items: center; min-height: 44px; font-size: .85rem; }
  .hero-music, .song-started .hero-music { max-width: none; margin: 0; }
  .music-caption { margin: 0 0 10px; font-size: .65rem; }
  .audio-enhanced .hero-music .music-controls { display: grid; grid-template-columns: minmax(0,1fr) 44px; gap: 10px; }
  .hero-music .music-play { width: 100%; min-width: 0; min-height: 48px; padding: 12px; font-size: .85rem; }
  .hero-music .music-mute { grid-column: 2; grid-row: 1; width: 44px; height: 44px; min-width: 44px; }
  .hero-music .music-timeline { grid-column: 1/-1; grid-row: 2; }
  .music-timeline input { min-height: 44px; height: 44px; margin: 0; }
  .music-timeline output { font-size: .75rem; }
  .autoplay-message { font-size: .75rem; line-height: 1.5; margin: 10px 0 0; }
  .hero-fun {
    position: relative; inset: auto; grid-column: 1; grid-row: 3;
    display: flex; justify-content: center; gap: 22px;
    width: 100%; height: auto; padding: 12px 20px 24px; overflow: visible;
  }
  .hero-fun span { position: static; font-size: 1.5rem!important; transform: none; }
  .hero-fun span:nth-child(n+4) { display: none; }
  .song-started .hero-live { min-height: 280px; padding: 16px 4px 20px; align-items: flex-start; }
  .hero-live .stage-label { font-size: .65rem; margin-bottom: 18px; }
  .hero-live .stage-lead { font-size: clamp(1.85rem,8.5vw,2.6rem); line-height: 1.13; text-align: left; }
  .hero-live .stage-reply-wrap { padding-top: 20px; }
  .hero-live .stage-reply { font-size: clamp(2rem,9vw,2.9rem); line-height: 1.12; padding: 10px 12px 14px; max-width: calc(100% - 10px); box-shadow: 4px 5px 0 #d7193faa; }
  .hero-live .stage-reply.long-reply { font-size: clamp(1.5rem,6.5vw,2.2rem); }
  .hero-live .lyric-word, .lyric-stage .lyric-word { max-width: 100%; overflow-wrap: anywhere; }
  .hero-live.reply-visible .stage-reply { transform: rotate(-1deg); }

  .ticker { padding: 15px 20px; font-size: 1rem; line-height: 1.5; letter-spacing: .03em; }
  .section { grid-template-columns: minmax(0,1fr); padding: 40px 24px; gap: 24px; }
  .section h2 { font-size: clamp(2.3rem,10vw,3.4rem); line-height: 1.1; margin: 0 0 18px; }
  .section p { text-wrap: pretty; font-size: 1rem; line-height: 1.65; margin: 0 0 20px; }
  .section .cta { display: flex; justify-content: center; align-items: center; min-height: 48px; width: 100%; padding: 14px 12px; font-size: .8rem; letter-spacing: .05em; }
  .media-frame { min-height: 0; width: 100%; border-width: 4px; box-shadow: 5px 6px 0 #173766; }
  .media-frame video { min-height: 0; height: auto; width: 100%; aspect-ratio: 16/9; object-fit: contain; }
  .music-video-section { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .music-video-section > div { display: contents; }
  .music-video-section .eyebrow { order: 1; margin: 0 0 12px; font-size: .66rem; }
  .music-video-section h2 { order: 2; }
  .music-video-section > div > p { order: 3; }
  .music-video-card { order: 4; margin: 4px 0 24px; }
  .music-video-card video { border-width: 3px; box-shadow: 4px 5px 0 var(--navy); }
  .music-video-card figcaption { margin-top: 14px; font-size: .75rem; }
  .music-video-section .cta { order: 5; }
  .history-section .eyebrow { font-size: .65rem; line-height: 1.6; margin-bottom: 12px; }
  .archive-video video { border-width: 3px; box-shadow: 4px 5px 0 var(--navy); max-height: none; }
  .archive-video figcaption, .archive-note { font-size: .75rem!important; line-height: 1.6; }

  .vote-plan { padding: 40px 24px; border-top-width: 6px; }
  .vote-plan-heading { grid-template-columns: 80px minmax(0,1fr); gap: 12px 20px; align-items: center; margin-bottom: 24px; }
  .vote-plan-heading > div:nth-child(2) { display: contents; }
  .vote-date { grid-column: 1; grid-row: 1/3; width: 80px; align-self: center; }
  .vote-date > span { padding: 6px; font-size: .7rem; }
  .vote-date strong { font-size: 3.4rem; line-height: 1.15; }
  .vote-date small { padding: 6px 2px; font-size: .39rem; line-height: 1.4; }
  .vote-plan-heading .eyebrow { grid-column: 2; grid-row: 1; align-self: end; font-size: .65rem; }
  .vote-plan h2 { grid-column: 2; grid-row: 2; align-self: start; font-size: clamp(2rem,8.4vw,3.4rem); line-height: 1.1; margin: 0; }
  .vote-plan-heading p { grid-column: 1/-1; grid-row: 3; margin: 14px 0 0; font-size: 1rem; line-height: 1.65; }
  .vote-plan-grid { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .vote-name { padding: 22px 18px; gap: 14px; }
  .vote-name > span { font-size: 2rem; }
  .vote-name h3 { font-size: clamp(1.9rem,8vw,3rem); line-height: 1.1; overflow-wrap: anywhere; }
  .vote-name a { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; }
  .vote-resource { min-height: 88px; padding: 18px; gap: 14px; }
  .vote-resource small { font-size: .8rem; }
  .vote-hours, .vote-source { font-size: .82rem; line-height: 1.65; }

  .song-intro { grid-template-columns: minmax(0,1fr); padding: 40px 24px; gap: 24px; border-top-width: 6px; }
  .song-intro h2 { font-size: clamp(2.6rem,11vw,4rem); line-height: 1.1; margin: 16px 0; }
  .song-intro p { font-size: 1rem; }
  .song-intro .eyebrow { font-size: .7rem; line-height: 1.6; }
  .song-invitation, .song-intro .song-invitation { width: 100%; gap: 18px; }
  .song-invitation .scroll-song { width: 100%; max-width: none; min-height: 52px; padding: 16px; font-size: .78rem; letter-spacing: .02em; gap: 12px; box-shadow: 4px 5px 0 var(--red); }
  .lyric-modes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; gap: 6px; }
  .lyric-modes button { min-height: 44px; padding: 8px 4px; font-size: .7rem; }
  .song-listen { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; }
  .lyrics-ready.lyrics-audio:not(.lyrics-static) .lyric-stage { height: clamp(560px,85svh,720px); min-height: 560px; max-height: none; }
  .lyric-stage-top { position: absolute; top: 0; left: 0; width: 100%; padding: 24px 20px; font-size: .55rem; letter-spacing: .06em; }
  .lyric-stage .lyric-stage-center { width: 100%; max-width: none; padding: 100px 24px 130px; }
  .lyric-stage .stage-label { margin-bottom: 20px; font-size: .65rem; line-height: 1.5; }
  .lyric-stage .stage-lead { font-size: clamp(1.8rem,8vw,2.5rem); line-height: 1.15; }
  .lyric-stage .stage-reply-wrap { padding-top: 20px; }
  .lyric-stage .stage-reply { font-size: clamp(2rem,9vw,3rem); line-height: 1.15; padding: 10px 12px 14px; max-width: calc(100% - 12px); box-shadow: 4px 5px 0 #0003; }
  .lyric-stage .stage-reply.long-reply { font-size: clamp(1.5rem,6.5vw,2.2rem); line-height: 1.2; }
  .lyric-stage.reply-visible .stage-reply, .lyric-stage[data-theme=gold].reply-visible .stage-reply { transform: rotate(-1deg); }
  .lyric-stage-bottom { position: absolute; bottom: 0; left: 0; width: 100%; min-height: 68px; padding: 20px; font-size: .55rem; gap: 12px; }
  .lyric-photo { width: 68px; left: 24px; bottom: 76px; border-width: 3px; transform: rotate(-7deg); }
  .lyric-photo img { height: 57px; }
  .lyric-photo figcaption { font-size: .36rem; padding: 6px 0 2px; }
  .photo-right { display: none; }
  .fun-emoji { font-size: 1.8rem; }
  .emoji-one { top: 72px; left: 24px; }
  .emoji-two { top: 76px; right: 24px; font-size: 1.4rem; }
  .emoji-three { display: none; }
  .emoji-four { right: 30px; bottom: 100px; font-size: 2rem; }
  .lyric-steps { padding: 16px 24px; }
  .lyric-step { padding: 24px 0; }
  .lyric-readable p { font-size: clamp(1.7rem,7vw,2.5rem); line-height: 1.2; overflow-wrap: anywhere; }
  .lyric-finale { padding: 40px 24px; }
  .lyric-finale p { font-size: clamp(2.3rem,9vw,3.5rem); line-height: 1.15; }
  .lyric-finale > span { letter-spacing: .2em; }
  .lyric-finale .finale-vote-date { font-size: .85rem; line-height: 1.6; margin-bottom: 24px; }
  .lyric-finale .vote-primary { width: 100%; min-height: 48px; padding: 16px 12px; font-size: .78rem; }
  .finale-replay { min-height: 44px; }

  .music-dock { bottom: max(8px,env(safe-area-inset-bottom)); width: calc(100% - 20px); gap: 10px; padding: 10px; border-radius: 6px; }
  .music-dock .dock-title, .music-dock .music-timeline, .music-dock .music-mute { display: none; }
  .music-dock .music-controls { flex: 1; min-width: 0; }
  .music-dock .music-play { width: 100%; min-width: 0; min-height: 44px; padding: 12px; font-size: .8rem; box-shadow: none; }
  .dock-vote { min-height: 44px; padding: 9px 14px; font-size: .8rem; }
  .dock-vote span { font-size: .65rem; }
  .footer, .audio-enhanced .footer { padding: 32px 24px max(32px,env(safe-area-inset-bottom)); }
  .song-is-playing .footer { padding-bottom: 116px; }
  .footer > p { font-size: .85rem; }
  .footer-disclaimer { margin: 24px auto; padding: 20px 16px; font-size: 1.05rem; line-height: 1.65; overflow-wrap: anywhere; }
  .footer nav { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; }
  .footer nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .85rem; }
}

@media (max-width: 900px) and (max-height: 650px) {
  .song-is-playing .lyric-stage .lyric-stage-center { padding-bottom: 148px; }
  .song-is-playing .lyric-stage-bottom { bottom: calc(76px + env(safe-area-inset-bottom)); min-height: 44px; padding: 12px 20px; }
  .song-is-playing .lyric-photo, .song-is-playing .emoji-four { display: none; }
}

@media (max-width: 359px) {
  header { padding-right: 16px; padding-left: 16px; }
  header > div { font-size: .77rem; }
  header nav .nav-vote { right: 16px; padding: 10px; font-size: .61rem; }
  header nav a { font-size: .61rem; }
  .portrait-hero .content, .song-started.portrait-hero .content,
  .section, .vote-plan, .song-intro, .lyric-finale, .footer { padding-right: 20px; padding-left: 20px; }
  .hero-election strong { font-size: 1.4rem; }
  .hero-election > span:first-child { max-width: 85px; font-size: .52rem; }
  .vote-plan-heading { gap: 12px 16px; }
  .vote-name { padding: 20px 14px; gap: 10px; }
}
