:root {
  --ink: #211815;
  --paper: #e4d2ae;
  --blood: #81231f;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  font-family: var(--sans);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  position: relative;
  display: grid;
  min-height: 100svh;
  margin: 0;
  padding: clamp(1rem, 3vw, 2.5rem);
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
  background: #cdb993 url('haverfield-background.webp') center / cover fixed;
}
body::before {
  position: fixed;
  inset: 0;
  content: '';
  pointer-events: none;
  background: linear-gradient(90deg, rgba(34,23,19,.25), transparent 40%, rgba(34,23,19,.08)), linear-gradient(0deg, rgba(34,23,19,.2), transparent 35%);
}
body::after {
  position: fixed;
  inset: 0;
  content: '';
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.brand { position: relative; z-index: 3; justify-self: end; width: min(35rem, 54vw); }
.brand > img:first-child { display: block; width: 100%; height: auto; filter: drop-shadow(0 .55rem .35rem rgba(48,25,20,.25)); }
.brand__ville { display: block; width: min(22%, 8rem); height: auto; margin: -.15rem 1% 0 auto; }
.player-layout { position: relative; z-index: 2; display: grid; width: 100%; min-height: 0; place-items: center; }
.player-layout--message { place-items: center; }
.portrait { position: fixed; z-index: 1; bottom: 0; left: max(0px, env(safe-area-inset-left)); display: block; width: clamp(14rem, 29vw, 35rem); max-width: 48vw; max-height: min(72vh, 46rem); object-fit: contain; object-position: left bottom; opacity: .58; filter: saturate(.8); pointer-events: none; }
.panel { position: relative; width: min(38rem, calc(100vw - 2 * clamp(1rem, 3vw, 2.5rem))); margin: 2rem auto; padding: clamp(2rem, 5vw, 4.2rem); border: 1px solid rgba(61,39,31,.24); background: rgba(231,215,181,.72); box-shadow: 0 28px 90px rgba(47,27,21,.2); backdrop-filter: blur(12px); }
.eyebrow { margin: 0 0 .8rem; color: var(--blood); font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .3em; }
h1 { margin: 0 0 1.6rem; font-family: var(--serif); font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 400; line-height: .95; }
.connection { display: flex; min-height: 3.4rem; align-items: flex-start; gap: .7rem; }
.connection > span { flex: 0 0 auto; width: .48rem; height: .48rem; margin-top: .55rem; border-radius: 50%; background: #8d755d; box-shadow: 0 0 0 5px rgba(141,117,93,.13); }
.status { margin: 0; color: #68554b; font-size: .83rem; line-height: 1.55; }
button, .audio-link { display: inline-flex; width: 100%; min-height: 50px; margin: 1rem 0 2rem; padding: .8rem 1.2rem; border: 1px solid var(--ink); align-items: center; justify-content: center; color: #f0dfc5; background: var(--ink); cursor: pointer; font: 800 .67rem var(--sans); text-decoration: none; text-transform: uppercase; letter-spacing: .15em; transition: color .2s, background .2s, transform .2s; }
button:hover, button:focus-visible, .audio-link:hover, .audio-link:focus-visible { color: #fff0db; background: var(--blood); transform: translateY(-2px); }
button.hidden { display: none; }
.volume-control { padding-top: 1.2rem; border-top: 1px solid rgba(73,48,38,.18); }
label { display: flex; justify-content: space-between; margin-bottom: .7rem; color: #5f4d45; font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
input[type=range] { width: 100%; accent-color: var(--blood); }
.hint { margin: 1.8rem 0 0; color: #78675e; font-family: var(--serif); font-size: .85rem; font-style: italic; line-height: 1.5; }
code { color: var(--blood); }
footer { position: relative; z-index: 2; color: #6f5b52; font-size: .56rem; font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: .16em; }
@media (max-width: 760px) {
  body { padding: 1rem; }
  .brand { width: min(100%, 29rem); }
  .portrait { left: max(0px, env(safe-area-inset-left)); width: 20rem; max-width: 72vw; opacity: .24; }
  .panel { width: min(38rem, calc(100vw - 2rem)); }
}
@media (max-width: 460px) {
  .brand { margin-top: .5rem; }
  .panel { padding: 2rem 1.35rem; }
  h1 { font-size: 2.8rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
