/* Owlz.fm visual identity — Milestone 2. Self-contained, responsive, no external font dependencies. */
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #252521;
  background: #fbf6e9;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
img { max-width: 100%; height: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse 62% 46% at 50% 43%, #fffcf2 0%, #fbf6e9 75%, #f8f0df 100%);
}
.site-container { width: min(100% - 56px, 1090px); margin-inline: auto; }
.site-header { padding: 20px 0 10px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { display: block; width: 150px; height: auto; }
.brand:focus-visible, .btn:focus-visible { outline: 3px solid #1f54ff; outline-offset: 5px; border-radius: 6px; }
.header-tagline { font-family: Georgia, "Times New Roman", serif; font-size: .95rem; color: #847b6b; }
.site-main { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; }
.home-hero { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; padding: 25px 20px 65px; }
.hero-art { position: relative; isolation: isolate; display: grid; place-items: center; width: min(78vw, 375px); aspect-ratio: 1; margin-bottom: 5px; }
.radio-ring { z-index: -1; position: absolute; border: 2px solid rgba(136,165,131,.19); border-radius: 50%; aspect-ratio: 1; }
.radio-ring-one { width: 64%; }
.radio-ring-two { width: 87%; border-color: rgba(136,165,131,.16); }
.radio-ring-three { width: 110%; border-color: rgba(136,165,131,.10); }
.hero-radio { display: block; width: 84%; height: auto; filter: drop-shadow(0 16px 14px rgba(65,39,18,.12)); }
.hero-wordmark { display: block; width: min(70vw, 350px); height: auto; margin: 0 auto; }
.hero-tagline { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.33rem, 3vw, 1.8rem); line-height: 1.25; letter-spacing: -.025em; margin: 0; }
.hero-description { max-width: 420px; font-size: 1rem; line-height: 1.65; color: #797164; margin: 21px 0 26px; }
.coming-soon { display: inline-block; border: 1px solid #cfc3ae; background: rgba(255,255,255,.37); border-radius: 999px; padding: 11px 26px; color: #685c49; font-size: .8rem; font-weight: 650; letter-spacing: .035em; }
.site-footer { padding: 24px 0; color: #8a7f6f; font-size: .77rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; }
/* Milestone 1 share-page placeholder retained until Milestone 3. */
.share-placeholder,.empty-state { max-width: 530px; text-align: center; padding: 70px 24px 110px; margin: auto; }
.placeholder-icon { display: grid; place-items: center; width: 74px; height: 74px; background: #e8ecfb; color: #4d70ec; border-radius: 50%; font-size: 2rem; margin: 0 auto 24px; }
.eyebrow { letter-spacing: .17em; font-weight: 700; font-size: .73rem; color: #7380a8; }
.share-placeholder h1,.empty-state h1 { font-size: clamp(1.9rem,6vw,2.5rem); letter-spacing: -.04em; line-height: 1.13; }
.share-placeholder>p:not(.eyebrow),.empty-state p { color: #797367; line-height: 1.7; }
.btn { display: inline-block; border-radius: 999px; padding: 13px 25px; text-decoration: none; font-weight: 650; margin-top: 18px; }
.btn-primary { background: #292824; color: #fff; }
.btn-primary:hover { background: #48443b; }
.loading-screen { min-height: 100vh; display: grid; place-items: center; color: #746d61; }
#blazor-error-ui { position: fixed; bottom: 0; left: 0; right: 0; background: #fff0e8; padding: 15px; color: #6b3325; z-index: 1000; }
#blazor-error-ui[hidden] { display: none; }
.dismiss { float: right; cursor: pointer; background: transparent; border: 0; font-size: 1.2rem; }
@media (max-width: 600px) {
  .site-container { width: calc(100% - 36px); }
  .site-header { padding: 12px 0 6px; }
  .brand img { width: 132px; }
  .header-tagline { max-width: 125px; font-size: .75rem; text-align: right; }
  .home-hero { padding: 20px 18px 45px; }
  .hero-art { width: min(78vw, 350px); margin-bottom: 7px; }
  .hero-wordmark { width: min(73vw, 310px); }
  .hero-description { font-size: .95rem; max-width: 335px; margin: 18px 0 23px; }
  .site-footer { padding: 19px 0; }
  .footer-inner { font-size: .7rem; }
}
@media (max-width: 370px) { .header-tagline { font-size: .69rem; } .brand img { width: 113px; } }
@media (max-height: 710px) and (min-width: 601px) { .hero-art { width: 280px; } .home-hero { padding-block: 10px 35px; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Milestone 3 — responsive public Hoot share experience */
.share-page { width: min(100% - 36px, 590px); margin: 0 auto; padding: 35px 0 65px; }
.share-intro { text-align: center; margin: 8px 0 28px; }
.share-eyebrow { font-size: .69rem; letter-spacing: .16em; font-weight: 750; color: #7b8178; margin: 0 0 8px; }
.share-intro h2 { font-size: clamp(1.6rem, 4.5vw, 2.1rem); letter-spacing: -.035em; margin: 0 0 5px; }
.share-intro>p:last-child { color: #897f72; font-size: .93rem; margin: 0; }
.hoot-card { border: 1px solid #eeeae4; border-radius: 28px; background: #fff; padding: clamp(22px,5.6vw,35px); box-shadow: 0 12px 42px rgba(49, 43, 38, .055); }
.hoot-meta { display: flex; gap: 12px; justify-content: space-between; align-items: center; color: #999; font-size: .83rem; }
.hoot-type { font-size: .68rem; font-weight: 700; letter-spacing: .12em; color: #5474ea; }
.hoot-card h1 { font-size: clamp(1.75rem, 6vw, 2.35rem); letter-spacing: -.048em; line-height: 1.16; color: #141414; margin: 34px 0 10px; overflow-wrap: anywhere; }
.hoot-description { font-size: clamp(1rem, 3.6vw, 1.17rem); color: #686868; line-height: 1.5; margin: 0 0 24px; }
.hoot-player { display: flex; min-height: 70px; align-items: center; gap: 13px; padding: 10px 14px; background: #f1f3fa; border: 1px solid #e3e7f1; border-radius: 22px; }
.player-play-icon { width: 44px; height: 44px; border-radius: 50%; background: #4d70ed; color: white; display: grid; place-items: center; flex-shrink: 0; font-size: 1rem; padding-left: 3px; }
.player-waveform { flex: 1; display: flex; height: 35px; gap: 2px; align-items: flex-end; min-width: 0; overflow: hidden; }
.waveform-bar { display: block; min-width: 1px; flex: 1; background: #bfc8e8; border-radius: 9px; }

.player-duration { flex-shrink: 0; color: #8d90a0; font-weight: 650; font-variant-numeric: tabular-nums; }
.player-notice { font-size: .7rem; line-height: 1.45; color: #898893; margin: 9px 2px 0; }
.hoot-card-bottom { display: flex; align-items: center; justify-content: flex-end; gap: 20px; margin-top: 24px; color: #757575; }
.reply-count { display: inline-flex; align-items: center; gap: 7px; font-size: .87rem; }
.share-action { appearance: none; border: 0; background: transparent; display: inline-flex; align-items: center; gap: 7px; color: #555; padding: 7px; cursor: pointer; border-radius: 9px; font-size: .83rem; }
.share-action:hover { background: #f1f3fa; }
.share-action:focus-visible { outline: 3px solid #4d70ed; outline-offset: 3px; }
.share-feedback { color: #435db9; font-size: .77rem; text-align: right; margin: 8px 0 0; }
.share-cta { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 32px 16px 12px; }
.share-cta img { width: 82px; height: 82px; object-fit: contain; }
.share-cta h2 { font: normal clamp(1.3rem,4vw,1.6rem) Georgia,serif; letter-spacing: -.025em; margin: 6px 0 9px; }
.share-cta p { max-width: 330px; color: #867d70; line-height: 1.55; font-size: .91rem; margin: 0 0 4px; }
.share-loading,.share-empty { text-align: center; padding: 70px 16px; }
.share-empty h1 { font-size: clamp(1.5rem,5vw,2.1rem); margin: 0 0 10px; }
.share-empty p { color: #857b6f; line-height: 1.55; }
@media (max-width: 600px) {
  .site-main { align-items: stretch; }
  .share-page { padding: 30px 0 50px; }
  .share-intro { margin-bottom: 25px; }
  .hoot-card { border-radius: 25px; }
  .hoot-card h1 { margin-top: 30px; }
  .hoot-player { gap: 9px; padding-inline: 10px; }
  .player-waveform { gap: 1.5px; }
}
@media (max-width: 350px) {
  .hoot-player { gap: 6px; }
  .player-play-icon { width: 37px; height: 37px; }

}

.player-play-icon { border: 0; cursor: pointer; font-family: inherit; }
.player-play-icon:disabled { opacity: .7; cursor: wait; }
.player-waveform { cursor: pointer; }
.player-waveform:focus-visible { outline: 2px solid #4d70ed; outline-offset: 4px; }
.player-waveform .waveform-bar.played { background: #4d70ed; }

/* Waveform is bottom-aligned, with each completed bar turning blue as audio advances. */
.player-waveform { align-items: flex-end; }
.waveform-bar { transition: background-color 110ms linear; }
.player-waveform .waveform-bar.played { background: #4d70ed; }
.player-play-icon { padding: 0; }
.player-control-icon { width: 22px; height: 22px; display: block; fill: currentColor; }
.player-control-play { margin-left: 2px; }
.player-loading-mark { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.45); border-top-color: white; border-radius: 50%; animation: owlz-spin .7s linear infinite; }
@keyframes owlz-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .waveform-bar { transition: none; } .player-loading-mark { animation: none; } }

/* Public Hoot waveform: bottom baseline stays flat; peaks rise upward.
   First bar begins at the leftmost edge of the waveform track. */
.player-waveform {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 2px;
  height: 39px;
  padding: 0;
  margin: 0;
  touch-action: pan-y;
}
.player-waveform .waveform-bar {
  display: block;
  align-self: flex-end;
  flex: 1 1 0;
  min-width: 1px;
  border-radius: 5px 5px 1px 1px;
  background-color: #c6cce1;
  transition: background-color 100ms linear;
}
.player-waveform .waveform-bar.played { background-color: #4d70ed; }
.player-play-icon {
  width: 49px;
  height: 49px;
  padding: 0;
  border: 0;
  background: #4d70ed;
  color: #fff;
}
.player-control-icon { width: 26px; height: 26px; fill: currentColor; }
.player-control-play { margin-left: 3px; }
@media (max-width: 600px) {
  .player-waveform { gap: 1.5px; }
  .player-play-icon { width: 45px; height: 45px; }
  .player-control-icon { width: 25px; height: 25px; }
}
@media (max-width: 350px) { .player-play-icon { width: 41px; height: 41px; } }
@media (prefers-reduced-motion: reduce) {
  .player-waveform .waveform-bar { transition: none; }
}

/* Waveform revision 2: explicit common bottom baseline, reliable in Safari. */
.player-waveform {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: end;
  justify-items: stretch;
  column-gap: 2px;
  height: 42px;
  min-height: 42px;
  overflow: hidden;
}
.player-waveform > .waveform-bar {
  display: block;
  width: 100%;
  min-width: 0;
  align-self: end;
  justify-self: stretch;
  margin: 0;
  padding: 0;
  border-radius: 4px 4px 0 0;
  background: #c6cce1;
  transform: none;
}
.player-waveform > .waveform-bar.played { background: #4d70ed; }
@media (max-width: 600px) { .player-waveform { column-gap: 1.5px; } }

/* Waveform revision 4: animation is controlled by real HTMLAudioElement events in owlz-audio.js.
   WAAPI animates transforms directly while the grid keeps the common bottom baseline. */
.player-waveform { height: 29px; min-height: 29px; }
.player-waveform > .waveform-bar { transform-origin: center bottom; }
.player-control-play { margin-left: 0; transform: translateX(-1px); }

/* Revision 5: JS transforms the current bars, including after Blazor re-renders. */
.player-waveform > .waveform-bar { transform-origin: center bottom; will-change: transform; }
@media (prefers-reduced-motion: reduce) { .player-waveform > .waveform-bar { will-change: auto; } }
