.oi { position: fixed; display: none; width: min(640px, calc(100vw - 32px)); max-width: none; max-height: min(92vh, 820px); max-height: min(92dvh, 820px);
  margin: auto; padding: 0; border: 0; border-radius: 24px; background: var(--wit); color: var(--tekst);
  box-shadow: 0 24px 70px rgba(8, 49, 60, .35); overflow: hidden; }
.oi[open] { display: flex; flex-direction: column; animation: oi-in .35s cubic-bezier(.2, .9, .3, 1.2); }
.oi.oi-weg { animation: oi-uit .18s ease-in forwards; }
.oi::backdrop { background: rgba(8, 49, 60, .55); }
.oi p { margin: 0; line-height: 1.55; }
.oi h3 { margin: 0 0 4px; font-size: 1.02rem; line-height: 1.3; color: var(--zee); }

.oi-inhoud { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 40px 28px 20px; }
.oi-kop { margin: 0 44px 14px 0; }
.oi-kop h2 { margin: 0; font-family: var(--font-kop); font-size: clamp(1.7rem, 5.5vw, 2.3rem); line-height: 1.1; color: var(--zee); }
.oi-kop h2:focus, .oi-kop h2:focus-visible { outline: none; box-shadow: none; }
.oi .oi-knipoog { margin-top: 2px; font-family: var(--font-kop); font-style: italic; font-size: 1.15rem; color: var(--zon-donker); }
.oi .oi-welkom { margin-bottom: 16px; font-size: 1.04rem; }

.oi-sluit { position: absolute; top: 30px; right: 14px; z-index: 3; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--zand); color: var(--tekst); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.oi-sluit:hover { background: var(--zee-licht); }

.oi-blok { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; padding: 14px 16px; border-radius: 16px; }
.oi-blok p { font-size: .96rem; }
.oi-blok-test { background: var(--zand); }
.oi-blok-hulp { background: var(--dijk-licht); }
.oi-kever { flex: none; width: 36px; height: 36px; margin-top: 2px; animation: oi-wiebel 3.2s ease-in-out infinite; transform-origin: 50% 60%; }
.oi-blok-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-top: 2px; border-radius: 50%; background: var(--dijk); color: var(--wit); }
.oi-blok-ic .ic { width: 20px; height: 20px; }

.oi .oi-tussenkop { margin: 18px 0 8px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tekst-zacht); }
.oi-routes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.oi-route { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; height: 100%; padding: 12px 14px; border: 2px solid var(--rand); border-radius: 14px;
  background: var(--wit); color: var(--tekst); text-decoration: none; transition: border-color .15s, transform .15s; }
.oi-route:hover, .oi-route:focus-visible { border-color: var(--zee); transform: translateY(-2px); }
.oi-route > .ic { flex: none; width: 28px; height: 28px; color: var(--zee); }
.oi-route span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.oi-route strong { color: var(--zee); }
.oi-route small { font-size: .86rem; line-height: 1.35; color: var(--tekst-zacht); }

.oi-voet { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 28px 16px; border-top: 1px solid var(--rand); background: var(--wit); }
.oi-voet .knop { min-height: 46px; }
.oi-voet .knop-geel { min-width: 140px; }

.oi-vlaggen { position: absolute; inset: 0 0 auto; z-index: 2; height: 24px; display: flex; justify-content: space-between; padding: 0 6px; pointer-events: none; }
.oi-vlaggen::before { content: ''; position: absolute; left: 0; right: 0; top: 2px; height: 2px; background: var(--rand); }
.oi-vlaggen span { position: relative; width: 22px; height: 20px; clip-path: polygon(0 0, 100% 0, 50% 100%); background: var(--zee);
  transform-origin: 50% 0; animation: oi-vlag 2.6s ease-in-out infinite; }
.oi-vlaggen span:nth-child(3n+2) { background: var(--zon); animation-delay: -.6s; }
.oi-vlaggen span:nth-child(3n) { background: var(--dijk); animation-delay: -1.2s; }

.oi-feest { position: absolute; inset: 0 0 auto; z-index: 1; height: 240px; pointer-events: none; overflow: hidden; }
.oi-feest i { position: absolute; top: -14px; left: 50%; width: 8px; height: 12px; border-radius: 2px; background: var(--zon); opacity: 0;
  animation: oi-val 1.7s ease-in forwards; }
.oi-feest i:nth-child(3n+1) { background: var(--zee); }
.oi-feest i:nth-child(3n+2) { background: var(--dijk); width: 10px; height: 8px; }
.oi-feest i:nth-child(4n) { width: 8px; height: 8px; border-radius: 50%; background: var(--rood); }
.oi-feest i:nth-child(1) { left: 4%; animation-delay: .05s; }
.oi-feest i:nth-child(2) { left: 10%; animation-delay: .3s; }
.oi-feest i:nth-child(3) { left: 16%; animation-delay: .12s; }
.oi-feest i:nth-child(4) { left: 22%; animation-delay: .45s; }
.oi-feest i:nth-child(5) { left: 28%; animation-delay: .2s; }
.oi-feest i:nth-child(6) { left: 34%; animation-delay: .55s; }
.oi-feest i:nth-child(7) { left: 40%; animation-delay: .08s; }
.oi-feest i:nth-child(8) { left: 46%; animation-delay: .38s; }
.oi-feest i:nth-child(9) { left: 52%; animation-delay: .16s; }
.oi-feest i:nth-child(10) { left: 58%; animation-delay: .5s; }
.oi-feest i:nth-child(11) { left: 64%; animation-delay: .25s; }
.oi-feest i:nth-child(12) { left: 70%; animation-delay: .6s; }
.oi-feest i:nth-child(13) { left: 76%; animation-delay: .1s; }
.oi-feest i:nth-child(14) { left: 82%; animation-delay: .42s; }
.oi-feest i:nth-child(15) { left: 88%; animation-delay: .18s; }
.oi-feest i:nth-child(16) { left: 94%; animation-delay: .35s; }
.oi-feest i:nth-child(17) { left: 13%; animation-delay: .7s; }
.oi-feest i:nth-child(18) { left: 67%; animation-delay: .75s; }

@keyframes oi-in { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes oi-uit { to { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes oi-vlag { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes oi-val { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(230px) rotate(540deg); } }
@keyframes oi-wiebel { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-12deg); } 82% { transform: rotate(10deg); } 88% { transform: rotate(-6deg); } }

@media (max-width: 640px) {
  .oi { width: 100vw; max-height: 94vh; max-height: 94dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .oi[open] { animation-name: oi-in-onder; }
  .oi-inhoud { padding: 38px 16px 16px; }
  .oi-sluit { top: 28px; right: 10px; }
  .oi-routes { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .oi-route { flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; }
  .oi-voet { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .oi-voet .knop { flex: 1 1 100%; }
  @keyframes oi-in-onder { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .oi[open], .oi.oi-weg, .oi-vlaggen span, .oi-kever { animation: none; }
  .oi-feest { display: none; }
  .oi-route { transition: none; }
}
.oi.oi-stil .oi-feest { display: none; }
