:root {
  --bg: #03060c;
  --ink: #e8f6ff;
  --dim: #7f93a8;
  --line: rgba(120, 190, 230, .16);
  --glass: rgba(8, 16, 26, .72);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 400 13px/1.45 ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
}

body { overflow: hidden; }

#sea {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* --- telefonlink --- */
.tel {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  color: var(--dim);
  text-decoration: none;
  letter-spacing: .14em;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color .25s, background .25s;
  mix-blend-mode: screen;
}
.tel:hover { color: var(--ink); background: rgba(255,255,255,.06); }

/* --- toggle-knap --- */
.toggle {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.toggle:hover { border-color: rgba(150, 220, 255, .45); transform: translateY(-1px); }
.dots {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  gap: 3px;
}
.dots i { width: 4px; height: 4px; background: var(--ink); opacity: .55; border-radius: 1px; }
.dots i:nth-child(2), .dots i:nth-child(6), .dots i:nth-child(7) { opacity: 1; }

/* uden JavaScript er der intet hav — så vis i det mindste nummeret */
.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 7vw 6vw;
  font-size: 15px;
  line-height: 1.6;
  color: var(--dim);
}
.noscript p { margin: 0; max-width: 46ch; }
.noscript strong { color: var(--ink); letter-spacing: .12em; }
.noscript a { color: var(--ink); }

/* preview-tilstand (?og=1): ren flade uden betjening */
.og .toggle { display: none; }

/* --- panel --- */
.panel {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(340px, 100vw);
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%);
  border-left: 1px solid var(--line);
  animation: slide .28s cubic-bezier(.2,.8,.3,1);
}
.panel[hidden] { display: none; }
@keyframes slide { from { transform: translateX(100%); } }

.panel header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 22px;
}
.ptitle {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--dim);
}
.close {
  border: 0; background: none; color: var(--dim);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.close:hover { color: var(--ink); }

.panel section { margin-bottom: 24px; }

.byline {
  margin: -12px 0 22px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(127, 147, 168, .75);
}

.about {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.55;
  color: rgba(127, 147, 168, .9);
  min-height: 2.5em;
}
.pgroup {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(127, 147, 168, .8);
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--dim);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11px;
  cursor: pointer;
  transition: .18s;
}
.chips button:hover { color: var(--ink); border-color: rgba(150,220,255,.4); }
.chips button[aria-pressed="true"] {
  color: #03060c;
  background: var(--ink);
  border-color: var(--ink);
}
.palettes button::before {
  content: "";
  display: inline-block;
  width: 22px; height: 8px;
  border-radius: 2px;
  margin-right: 7px;
  vertical-align: -1px;
  background: var(--sw);
}

/* --- slidere --- */
.row { margin-bottom: 15px; }
.row .lbl {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--dim); margin-bottom: 5px;
}
.row .val { font-variant-numeric: tabular-nums; color: var(--ink); opacity: .75; }
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 18px; background: none; cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 2px; background: rgba(255,255,255,.14); border-radius: 2px;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px; height: 10px; margin-top: -4px;
  background: var(--ink); border-radius: 2px;
  box-shadow: 0 0 10px rgba(120,220,255,.5);
}
input[type=range]::-moz-range-track { height: 2px; background: rgba(255,255,255,.14); }
input[type=range]::-moz-range-thumb {
  width: 10px; height: 10px; border: 0; border-radius: 2px; background: var(--ink);
}

.switch { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--dim); margin-bottom: 12px; }
.switch input { accent-color: #7fe3ff; }

.panel footer {
  display: flex; align-items: center; gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.ghost {
  border: 1px solid var(--line);
  background: none; color: var(--dim);
  border-radius: 6px; padding: 6px 10px; font-size: 11px; cursor: pointer;
}
.ghost:hover { color: var(--ink); }
.fps { margin-left: auto; font-size: 10px; color: rgba(127,147,168,.6); font-variant-numeric: tabular-nums; }

@media (max-width: 520px) {
  .panel { width: 100vw; }
}
@media (prefers-reduced-motion: reduce) {
  .panel { animation: none; }
}
