:root{
  --pink:#ebacab;
  --green:#c1dc9c;
  --yellow:#ffdea2;
  --darkyellow:#f3b153;
  --blue:#acdbd2;
  --darkblue:#3f4065;
  --darkgray:#333333;

  --bg:#0b0c12;            /* diepe basis, zodat pastels knallen */
  --card:rgba(255,255,255,.09);
  --card2:rgba(255,255,255,.06);
  --stroke:rgba(255,255,255,.16);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.72);
  --shadow: 0 18px 55px rgba(0,0,0,.45);

  --radius:24px;
  --ease:cubic-bezier(.2,.8,.2,1);
  --dur:720ms;

  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

*{ box-sizing:border-box; }
html,body{ height:100%; min-height:100vh; }

/* Use dynamic viewport units for better iOS Safari behavior */
@supports (height: 100dvh){
  html,body,.app{ 
    height:100dvh; 
    min-height:100dvh; 
  }
}

/* iOS Safari-specific: ensure proper height calculation */
@supports (-webkit-touch-callout: none){
  .app{
    /* For older iOS versions that don't support dvh */
    min-height: -webkit-fill-available;
  }
}
body{
  margin:0;
  font-family:"Be Vietnam Pro", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 10% 10%, rgba(172,219,210,.22), transparent 60%),
              radial-gradient(1200px 900px at 90% 20%, rgba(235,172,171,.18), transparent 60%),
              radial-gradient(900px 700px at 40% 90%, rgba(193,220,156,.16), transparent 62%),
              var(--bg);
  color:var(--text);
  overflow:hidden;
  /* iOS-specific: prevent rubber-band scrolling */
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

/* container */
.app{
  height:100%;
  width:100%;
  min-height:100vh;
  position:relative;
  overflow:hidden;
  padding-bottom: var(--safe-bottom);
}

.app::before,
.app::after{
  content:"";
  position:absolute;
  left:0; right:0;
  z-index:1;
  pointer-events:none;
}
.app::before{
  top:0;
  height:120px;
  background: linear-gradient(180deg, rgba(0,0,0,.8), transparent);
}
.app::after{
  bottom:0;
  height:140px;
  background: linear-gradient(0deg, rgba(0,0,0,.85), transparent 60%);
}

/* animated background blobs */
.blobs{ position:absolute; inset:-20vmax; pointer-events:none; filter: blur(38px) saturate(1.08); opacity:.95; }

.blob{
  position:absolute;
  width:42vmax;
  height:42vmax;
  border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%;
  animation: float 9.5s var(--ease) infinite;
  mix-blend-mode: screen;
}
.blob.b1{ left: -6vmax; top: -2vmax; background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.35), transparent 45%), rgba(172,219,210,.55); animation-duration: 11.5s; }
.blob.b2{ right:-10vmax; top: 6vmax; background: radial-gradient(circle at 40% 40%, rgba(255,255,255,.30), transparent 45%), rgba(235,172,171,.55); animation-duration: 13s; animation-delay:-2s; }
.blob.b3{ left: 18vmax; bottom:-12vmax; background: radial-gradient(circle at 45% 45%, rgba(255,255,255,.28), transparent 45%), rgba(243,177,83,.55); animation-duration: 14s; animation-delay:-3.6s; }

@keyframes float{
  0%{ transform: translate3d(0,0,0) rotate(0deg) scale(1); }
  25%{ transform: translate3d(6vmax, -4vmax, 0) rotate(14deg) scale(1.05); }
  50%{ transform: translate3d(-5vmax, 5vmax, 0) rotate(-12deg) scale(.96); }
  75%{ transform: translate3d(4vmax, 2vmax, 0) rotate(10deg) scale(1.02); }
  100%{ transform: translate3d(0,0,0) rotate(0deg) scale(1); }
}

/* top UI */
.topbar{
  position:fixed; /* changed from absolute for better iOS behavior */
  top:0;
  left:0;
  right:0;
  padding: max(14px, calc(14px + var(--safe-top))) 18px 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  z-index:5;
  /* Ensure visibility above iOS Safari's dynamic UI */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.masthead{
  position:fixed; /* changed from absolute for better iOS behavior */
  top: calc(62px + max(0px, var(--safe-top)));
  left:0; right:0;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:center;
  gap:6px;
  z-index:5;
  pointer-events:none;
  /* Ensure visibility above iOS Safari's dynamic UI */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.masthead-logo{
  height:32px;
  width:auto;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
  opacity:0.95;
}

.masthead-title{
  font-weight:500;
  letter-spacing:0.12px;
  font-size:16px;
  line-height:1.02;
  text-transform:lowercase;
  color: rgba(255,255,255,.82);
  transform: translateY(1px);
}

.masthead-brand{
  font-weight:600;
  color: rgba(255,255,255,.92);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  user-select:none;
}
.logo{
  width:34px;height:34px;
  border-radius:12px;
  background: linear-gradient(135deg, rgba(235,172,171,1), rgba(172,219,210,1));
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.22);
}
.brand .title{
  font-weight:800;
  letter-spacing:.2px;
  line-height:1.05;
}
.brand .subtitle{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
  font-weight:500;
}

.progress{
  display:flex;
  align-items:center;
  gap:6px;
  padding: 10px 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  min-width: 220px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 12px 28px rgba(0,0,0,.25);
}

.progress-bar{
  flex:1;
  height:8px;
  background: rgba(255,255,255,.14);
  border-radius:999px;
  overflow:hidden;
  position:relative;
  cursor:pointer;
  transition: transform 160ms var(--ease);
}
.progress-bar:hover{ transform: translateY(-1px); }

.progress-fill{
  position:absolute;
  inset:0;
  width:0;
  background: rgba(255,255,255,.92);
  border-radius:999px;
  transition: width 240ms linear;
}

/* slides */
.stage{
  position:relative;
  inset:0;
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  padding: 152px 14px calc(96px + var(--safe-bottom));
  z-index:2;
  overflow:hidden;
}

.slide{
  width:min(960px, 100%);
  height:min(760px, 100%);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow);
  position:absolute;
  top: calc(50% + var(--slide-offset, 0px));
  left:50%;
  overflow:hidden;
  opacity:0;
  transform: translate(-50%, -50%) translate3d(40px, 24px, 0) scale(.98);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  will-change: transform, opacity;
  touch-action: pan-y;
}

.slide.active{
  opacity:1;
  transform: translate(-50%, -50%) translate3d(0,0,0) scale(1);
  z-index:3;
}

.slide.out-left{ opacity:0; transform: translate(-50%, -50%) translate3d(-50px, 12px, 0) scale(.98); }
.slide.out-right{ opacity:0; transform: translate(-50%, -50%) translate3d(50px, 12px, 0) scale(.98); }

.slide::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(900px 420px at 10% 15%, var(--accentA), transparent 55%),
              radial-gradient(900px 520px at 90% 25%, var(--accentB), transparent 55%),
              radial-gradient(780px 500px at 40% 110%, var(--accentC), transparent 60%);
  opacity:.95;
  pointer-events:none;
  filter: saturate(1.08);
}

.content{
  position:relative;
  height:100%;
  padding: 24px 20px calc(110px + var(--safe-bottom));
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:16px;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  background: transparent;
  width:100%;
  max-width:100%;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.content::-webkit-scrollbar{ width:6px; height:0; }
.content::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.22); border-radius:999px; }
.content::-webkit-scrollbar-track{ background: transparent; }
.content{ scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; }

.content > * {
  max-width:100%;
  overflow-wrap:break-word;
  word-wrap:break-word;
}

.top{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:6px;
  width:100%;
}

.sound-btn{
  position:fixed; /* changed from absolute for better iOS behavior */
  right:18px;
  /* Increased minimum for better iPhone home indicator clearance */
  bottom: max(18px, calc(18px + env(safe-area-inset-bottom)));
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font: inherit;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
  border-radius: 50%;
  cursor:pointer;
  user-select:none;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
  transition: transform 160ms var(--ease), background 160ms var(--ease);
  z-index:7;
  /* Ensure visibility above iOS Safari's dynamic UI */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.sound-btn:hover{ 
  background: rgba(255,255,255,.12); 
  transform: translateY(-1px) translateZ(0); 
  -webkit-transform: translateY(-1px) translateZ(0);
}
.sound-btn:active{ 
  transform: translateY(0px) scale(.98) translateZ(0); 
  -webkit-transform: translateY(0px) scale(.98) translateZ(0);
}
.sound-btn::before,
.sound-btn::after{
  content:"";
  position:absolute;
  width:22px;
  height:22px;
  background: currentColor;
  top:50%;
  left:50%;
  transform: translate(-50%, -50%);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
.sound-btn::before{
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 9v6h4l5 4V5l-5 4H5z'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 9v6h4l5 4V5l-5 4H5z'/></svg>");
}
.sound-btn::after{
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 8.5c1.5 1.1 2.5 2.9 2.5 4.5 0 1.6-1 3.4-2.5 4.5'/><path d='M13.5 10c.8.6 1.5 1.6 1.5 3s-.7 2.4-1.5 3'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 8.5c1.5 1.1 2.5 2.9 2.5 4.5 0 1.6-1 3.4-2.5 4.5'/><path d='M13.5 10c.8.6 1.5 1.6 1.5 3s-.7 2.4-1.5 3'/></svg>");
  opacity:1;
}
.sound-btn.is-muted::after{
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='6' y1='6' x2='18' y2='18'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='6' y1='6' x2='18' y2='18'/></svg>");
  width:20px;
  height:20px;
}

.stack{
  display:flex;
  flex-direction:column;
  gap:10px;
  width:100%;
  max-width:100%;
  overflow:visible;
  box-sizing: border-box;
}

.stack > .card,
.stack > .card.primary{
  max-width:100%;
  box-sizing: border-box;
  overflow:visible;
}

.scrollable{
  overflow:auto;
  max-height:100%;
  padding-right:6px;
  scrollbar-width: thin;
}
.scrollable::-webkit-scrollbar{ width:6px; }
.scrollable::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.22); border-radius:999px; }
.scrollable::-webkit-scrollbar-track{ background: transparent; }

.kicker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.14);
  backdrop-filter: blur(10px);
  width: fit-content;
  margin-left:auto;
  margin-right:auto;
  text-align:center;
  font-weight:600;
  font-size:13px;
  color: rgba(255,255,255,.92);
}

.headline{
  margin: 12px 0 0;
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.03;
  font-size: clamp(34px, 4.3vw, 64px);
  text-align:center;
}

.subline{
  margin: 10px 0 0;
  font-size: clamp(15px, 1.9vw, 18px);
  color: rgba(255,255,255,.82);
  max-width: 70ch;
  line-height:1.45;
  font-weight: 500;
  white-space: pre-line;
}

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
  margin-top: 14px;
}

.card{
  border-radius: 18px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.16);
  padding: 16px 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px rgba(0,0,0,.26);
  max-width: 100%;
  box-sizing: border-box;
}

.card.primary{
  padding: 18px 18px;
  background: rgba(0,0,0,.22);
  border-color: rgba(255,255,255,.18);
}

.card.awards{
  background: rgba(0,0,0,.24);
  border-color: rgba(255,255,255,.22);
  padding: 18px 18px;
  box-shadow: 0 18px 44px rgba(0,0,0,.30);
}

.card.awards .list{ gap:12px; }

.card.awards .item{
  align-items:flex-start;
  gap:8px;
  background: linear-gradient(135deg, rgba(235,172,171,.12), rgba(172,219,210,.12));
  border-color: rgba(255,255,255,.18);
}

.card.awards .meta{
  font-size: clamp(32px, 9vw, 56px);
  letter-spacing: -0.6px;
  line-height: 1;
}

.card.awards .name{
  font-size: 14px;
  color: rgba(255,255,255,.85);
  white-space: pre-line;
}

.card.awards .name.award-label{
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.primary .label{ margin-top:10px; font-size:15px; color: rgba(255,255,255,.82); }

.big{
  font-weight: 900;
  font-size: clamp(48px, 8vw, 118px);
  letter-spacing: -1.6px;
  line-height: 0.95;
  margin: 0;
}

.label{ color: rgba(255,255,255,.78); font-weight:600; margin-top:8px; line-height:1.3; }

.list{
  margin: 0;
  padding: 0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}

.item .name{
  font-weight:700;
  color: rgba(255,255,255,.88);
  font-size:15px;
}
.item .meta{
  color: rgba(255,255,255,.94);
  font-weight:800;
  font-size: clamp(18px, 4.4vw, 24px);
}

/* bottom controls */
.controls{
  position:fixed; /* changed from absolute for better iOS behavior */
  left:0; right:0; bottom:0;
  /* Increased minimum padding for iPhone home indicator */
  padding: 12px 18px max(18px, calc(18px + env(safe-area-inset-bottom)));
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  z-index:6;
  /* Ensure visibility above iOS Safari's dynamic UI */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.footer-logo{
  height:28px;
  width:auto;
  opacity:0.92;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.35));
}

.btns{ display:flex; gap:10px; }
button{
  font: inherit;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  border-radius: 999px;
  padding: 10px 14px;
  cursor:pointer;
  user-select:none;
  backdrop-filter: blur(10px);
  transition: transform 160ms var(--ease), background 160ms var(--ease);
  /* iOS-specific: ensure buttons are tappable */
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255,255,255,.1);
}
button:hover{ background: rgba(255,255,255,.09); transform: translateY(-1px); }
button:active{ transform: translateY(0px) scale(.98); }

#play{
  width:44px;
  height:44px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  position:relative;
}
#play::before,#play::after{
  content:"";
  position:absolute;
  background: currentColor;
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
#play:not(.is-playing)::before{
  width:22px;
  height:22px;
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M8 4.5l10.5 7.5-10.5 7.5z'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M8 4.5l10.5 7.5-10.5 7.5z'/></svg>");
  transform: translateX(1px);
}
#play:not(.is-playing)::after{ opacity:0; }
#play.is-playing::before,
#play.is-playing::after{
  width:3px;
  height:16px;
  border-radius:2px;
  top:50%;
  transform: translateY(-50%);
  mask-image:none;
  -webkit-mask-image:none;
}
#play.is-playing::before{ left:14px; }
#play.is-playing::after{ right:14px; }

/* number reveal animation */
.reveal{ transform: translateY(10px); opacity:0; transition: transform 520ms var(--ease), opacity 520ms var(--ease); }
.slide.active .reveal{ transform: translateY(0); opacity:1; }

/* small screens */
@media (max-width: 820px){
  .stage{ display:grid; place-items:center; padding: 120px 12px 120px; overflow:hidden; }
  .slide{ position:absolute; top:50%; left:50%; transform: translate(-50%, -50%); margin:0; width: calc(100% - 12px); max-width: 720px; height: calc(100vh - 220px); min-height: calc(100vh - 220px); max-height:none; overflow:hidden; }
  .slide.active{ transform: translate(-50%, -50%); }
  .slide.out-left{ transform: translate(-50%, -50%) translateX(-36px); }
  .slide.out-right{ transform: translate(-50%, -50%) translateX(36px); }
  .content{ padding: 18px 14px 18px; overflow-y:auto; overflow-x:hidden; }
  .topbar{ padding-left: 12px; padding-right: 12px; }
  .masthead{ top: calc(58px + var(--safe-top)); }
  .masthead-logo{ height:28px; }
  :root{ --slide-offset: 18px; }
  .stack > .card,
  .stack > .card.primary{
    max-height:none;
    overflow-y:auto;
    overflow-x:hidden;
  }
  .stack > .card.pills-only{ align-self:center; text-align:center; width:100%; }
  .card.pills-only .pillrow{ justify-content:center; }
}

@media (max-width: 640px){
  .grid{ align-items:center; }
  .card{ text-align:center; }
  .primary{ text-align:center; }
  .item{ flex-direction:column; align-items:center; justify-content:center; }
  .item .name, .item .meta{ text-align:center; width:100%; }
  .top{ align-items:center; }
  .kicker{ align-self:center; }
  .card.awards{ text-align:left; }
  .card.awards .item{ align-items:flex-start; }
  .card.awards .name, .card.awards .meta{ text-align:left; }
}

@media (min-width: 960px){
  .grid{ grid-template-columns: 1.1fr .9fr; }
  .content{ padding: 30px 30px 22px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  .blob{ animation:none; }
  .slide{ transition:none; }
  .reveal{ transition:none; }
  button{ transition:none; }
}

/* subtle gradient frame */
.frame{
  display:none;
}

/* tiny footer */
.tiny{ display:none; }

.pillrow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 12px;
  justify-content:center;
  align-items:center;
  margin-left:auto;
  margin-right:auto;
}
.pill{
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.16);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.86);
}

.hero-logo{
  width:120px;
  height:auto;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.35));
  margin-bottom: 10px;
}

.stack > .card.pills-only{
  align-self:center;
  text-align:center;
}
.card.pills-only .pillrow{ justify-content:center; }

.slide.hero .content{
  justify-content:center;
  align-items:center;
  text-align:center;
  gap:22px;
}

.slide.hero .frame{ display:none; }
.slide.hero .kicker{ margin: 0 auto; }
.slide.hero .hero-logo{ width:150px; margin: 0 auto 6px; }
.slide.hero .headline{ font-size: clamp(52px, 7vw, 92px); margin: 6px 0 0; }
.slide.hero .subline{ margin-top: 6px; font-size: 18px; color: rgba(255,255,255,.82); }

/* iOS-specific: ensure controls are always visible above home indicator and URL bars */
@supports (-webkit-touch-callout: none){
  /* For devices with notch/home indicator (iPhone X and later) */
  @media (max-width: 820px){
    .controls{
      /* Ensure extra padding on notched devices */
      padding-bottom: max(24px, calc(24px + env(safe-area-inset-bottom)));
    }
    .sound-btn{
      /* Ensure extra padding on notched devices */
      bottom: max(24px, calc(24px + env(safe-area-inset-bottom)));
    }
    .topbar{
      /* Ensure controls are above minimal Safari UI */
      padding-top: max(18px, calc(18px + env(safe-area-inset-top)));
    }
  }
  
  /* Additional spacing for very small screens (iPhone SE, Mini) */
  @media (max-width: 390px){
    .controls{
      padding-left: 12px;
      padding-right: 12px;
      gap: 8px;
    }
    button{
      padding: 8px 12px;
      font-size: 16px;
    }
    #prev, #next{
      min-width: 42px;
    }
  }
}
