/* ==========================================================================
   rogersteinbakk.no · Aqua-tema à la Mac OS X 10.2 «Jaguar»
   Rein CSS – ingen rammeverk, ingen byggesteg.
   ========================================================================== */

:root {
  --font-ui: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, Geneva, sans-serif;

  /* Pinstriper: aktivt vindu har litt mer kontrast enn inaktivt */
  --stripe-a: #f5f5f5;
  --stripe-b: #e4e4e4;
  --stripe-dim-a: #f8f8f8;
  --stripe-dim-b: #ededed;
  --pinstripe: repeating-linear-gradient(180deg, var(--stripe-a) 0 1px, var(--stripe-b) 1px 2px);
  --pinstripe-dim: repeating-linear-gradient(180deg, var(--stripe-dim-a) 0 1px, var(--stripe-dim-b) 1px 2px);

  --aqua: #3d7fe0;
  --aqua-deep: #1f56b5;
  --text: #000;
  --text-muted: #5c5c5c;
  --menubar-h: 22px;
  --dock-h: 74px;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  font: 13px/1.45 var(--font-ui);
  color: var(--text);
  background: #12408f;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; }
a { color: var(--aqua-deep); }
::selection { background: #b5d5ff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* --------------------------------------------------------------------------
   Skrivebordsbakgrunn
   -------------------------------------------------------------------------- */
.wallpaper {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #12408f url("../img/jaguar-swirl.svg") center / cover no-repeat;
}

/* --------------------------------------------------------------------------
   Menylinje
   -------------------------------------------------------------------------- */
.menubar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--menubar-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 12px 0 6px;
  background: repeating-linear-gradient(180deg, #fbfbfb 0 1px, #eaeaea 1px 2px);
  border-bottom: 1px solid rgba(0, 0, 0, .38);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .28);
  font-size: 13px;
  user-select: none;
}

/* Menytitler: klikkbare, og de lyser blått bare fordi de faktisk åpner en meny */
.menu-title {
  height: var(--menubar-h);
  padding: 0 10px;
  display: flex; align-items: center;
  background: none; border: 0;
  font: inherit; color: #000;
  cursor: default;
  white-space: nowrap;
}
.menu-title.app { font-weight: bold; }
.menu-title:hover,
.menu-title.open,
.menu-title:focus-visible {
  background: linear-gradient(#6b9ef0, #2f6fd9);
  color: #fff;
  outline: none;
}

.menu-title.apple { padding: 0 9px; }
.menu-title.apple svg { width: 17px; height: 17px; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .7)); }

.menubar .right { margin-left: auto; display: flex; align-items: center; }
.menubar time { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Nedtrekksmenyer (menylinja, klokka og høyreklikk på skrivebordet)
   -------------------------------------------------------------------------- */
.menu {
  position: fixed;
  z-index: 2000;
  min-width: 190px;
  padding: 4px 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .45);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .4);
  font-size: 13px;
}
.menu[hidden] { display: none; }
#m-context { border-radius: 6px; }

.menu-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 3px 24px 3px 24px;
  background: none; border: 0;
  font: inherit; color: #000; text-align: left; text-decoration: none;
  white-space: nowrap;
  cursor: default;
}
.menu-item:hover,
.menu-item:focus-visible {
  background: linear-gradient(#6b9ef0, #2f6fd9);
  color: #fff;
  outline: none;
}
.menu-item.checked::before {
  content: "✓";
  position: absolute; left: 8px;
  font-weight: bold;
}
.menu-item.ext::after {
  content: "↗";
  margin-left: 6px;
  opacity: .5;
  font-size: 11px;
}
.menu-item.disabled { color: #a9a9a9; }
.menu-item.disabled:hover { background: none; color: #a9a9a9; }

.menu-sep { height: 1px; margin: 4px 0; background: rgba(0, 0, 0, .16); }

/* Dato i klokkemenyen – en overskrift, ikke et valg */
.menu-head {
  padding: 3px 24px;
  color: #555;
  white-space: nowrap;
}

/* Valgene i Vis-menyen skjuler deler av Finder-vinduet */
body.no-toolbar .toolbar { display: none; }
body.no-statusbar .statusbar { display: none; }
body.no-dock .dock { display: none; }

/* --------------------------------------------------------------------------
   Skrivebord + ikon
   -------------------------------------------------------------------------- */
#desktop {
  position: fixed;
  top: var(--menubar-h); left: 0; right: 0; bottom: 0;
  overflow: hidden;
}

.desk-icon {
  position: absolute;
  top: 16px; right: 20px;
  width: 96px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px;
  background: none; border: 0;
  color: #fff;
  cursor: default;
}
.desk-icon svg,
.desk-icon img { width: 64px; height: 64px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.desk-icon span {
  font-size: 12px;
  padding: 0 6px; border-radius: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 4px rgba(0, 0, 0, .6);
}
.desk-icon:hover span,
.desk-icon:focus-visible span { background: rgba(61, 127, 224, .92); }
.desk-icon:focus-visible { outline: none; }

/* --------------------------------------------------------------------------
   Vinduer
   -------------------------------------------------------------------------- */
.window {
  position: absolute;
  display: flex; flex-direction: column;
  min-width: 260px;
  background: var(--pinstripe-dim);
  border-radius: 6px 6px 0 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .28), 0 12px 32px rgba(0, 0, 0, .45);
  transform-origin: bottom center;
}
.window.active {
  background: var(--pinstripe);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 18px 40px rgba(0, 0, 0, .6);
}
.window[hidden] { display: none; }
.window.dragging { user-select: none; }
.window.minimizing {
  transition: transform .25s ease-in, opacity .25s ease-in;
  transform: translateY(60vh) scale(.1);
  opacity: 0;
}
.window.zoomed {
  left: 12px !important; top: 12px !important;
  width: calc(100% - 24px) !important;
  height: calc(100% - 24px) !important;
  max-height: none !important;
}

/* Startposisjoner (kun skrivebord – mobil stabler vinduene) */
#win-finder  { left: 6vw;  top: 64px;  width: min(640px, 62vw); height: min(440px, calc(100% - 200px)); }
#win-about   { left: 46vw; top: 118px; width: 420px; max-width: calc(100vw - 24px); max-height: calc(100% - 140px); }
#win-contact { width: 400px; }
#win-trash   { width: 340px; }
#win-games   { width: 320px; height: 210px; }
#win-snake   { width: 520px; height: min(620px, calc(100% - 60px)); }
#win-gange   { width: min(760px, calc(100vw - 40px)); height: min(640px, calc(100% - 60px)); }
#win-workhorse { width: 430px; }
#win-podcast { width: min(620px, calc(100vw - 40px)); height: min(690px, calc(100% - 60px)); }
#win-mtb     { width: 430px; max-height: calc(100% - 80px); }
#win-disc    { width: 430px; max-height: calc(100% - 80px); }
#win-about-mac { width: 340px; }
#win-help { width: 460px; height: min(560px, calc(100% - 60px)); }

/* Tittellinje */
.titlebar {
  position: relative;
  flex: none;
  height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px 6px 0 0;
  cursor: default;
  touch-action: none;
}
.titlebar .title {
  display: flex; align-items: center; gap: 5px;
  max-width: calc(100% - 140px);
  font-size: 13px;
  color: #000;
  white-space: nowrap; overflow: hidden;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}
.titlebar .title svg,
.titlebar .title img { width: 16px; height: 16px; flex: none; }
.window:not(.active) .titlebar .title { color: #7d7d7d; }

/* Trafikklys */
.lights { position: absolute; left: 8px; top: 4px; display: flex; gap: 8px; }
.light {
  position: relative;
  width: 14px; height: 14px;
  padding: 0; border: 0; border-radius: 50%;
  cursor: default;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .38), 0 1px 1px rgba(255, 255, 255, .8);
}
.light::before {           /* glans */
  content: "";
  position: absolute; left: 3px; right: 3px; top: 1px; height: 6px;
  border-radius: 50%;
  background: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, 0));
}
.light::after {            /* symbol – vises når musa er over gruppa, som i OS X */
  content: "";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font: bold 10px/1 var(--font-ui);
  color: rgba(0, 0, 0, .62);
  opacity: 0;
}
.lights:hover .light::after { opacity: 1; }
.light.close { background: radial-gradient(circle at 50% 35%, #ffb1a8 0%, #f2665a 40%, #cf3225 75%, #9a1d12 100%); }
.light.close::after { content: "×"; }
.light.min   { background: radial-gradient(circle at 50% 35%, #fff2b0 0%, #f6c93e 40%, #dc9d0a 75%, #a06f00 100%); }
.light.min::after { content: "−"; }
.light.zoom  { background: radial-gradient(circle at 50% 35%, #d5f7c8 0%, #7fd463 40%, #36a824 75%, #1f7a13 100%); }
.light.zoom::after { content: "+"; }
.window:not(.active) .light { background: radial-gradient(circle at 50% 35%, #f4f4f4, #d2d2d2 60%, #ababab); }

/* Vindusinnhold */
.win-body { flex: 1 1 auto; min-height: 0; overflow: auto; }

/* Aqua-rullefelt der vinduer scroller */
.window ::-webkit-scrollbar { width: 15px; height: 15px; }
.window ::-webkit-scrollbar-track { background: var(--pinstripe-dim); border-left: 1px solid rgba(0, 0, 0, .15); }
.window ::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #4f92ec, #b3d6fc 45%, #4f92ec) padding-box;
  border: 2px solid transparent; border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Programvinduer: spillet kjører i en iframe som fyller vinduet
   -------------------------------------------------------------------------- */
.win-frame {
  flex: 1 1 auto; min-height: 0;
  background: #000;
  border-top: 1px solid rgba(0, 0, 0, .3);
}
.win-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Drar man et vindu, må iframene slippe pekeren gjennom */
body.dragging iframe { pointer-events: none; }

.frame-foot {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 5px 10px;
  border-top: 1px solid rgba(0, 0, 0, .2);
  font-size: 11px; color: var(--text-muted);
}
.frame-foot .btn,
.ep-actions .btn,
.ep-message .btn { min-width: 0; height: 19px; padding: 0 12px; font-size: 11px; line-height: 17px; }
.frame-foot-actions { display: flex; align-items: center; gap: 8px; }
.frame-zoom { display: none; } /* kun nyttig på mobil, se under */

/* App-ikoner (WorkHorse) – avrundet kvadrat, ikke rundt som profilbildet */
.appicon { display: block; border-radius: 22%; object-fit: contain; }

/* Podkastlogo brukt som ikon – trenger hårstrek for å holde formen mot hvit Finder-bakgrunn */
.logoicon {
  display: block;
  border-radius: 12%;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .28), 0 1px 2px rgba(0, 0, 0, .25);
}
/* I tittellinja er ikonet 16 px – da tar hårstreken for mye plass */
.titlebar .title .logoicon { border-radius: 3px; box-shadow: none; }

/* --------------------------------------------------------------------------
   Finder-vindu
   -------------------------------------------------------------------------- */
.toolbar {
  flex: none;
  display: flex; align-items: flex-end; gap: 2px;
  padding: 2px 10px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, .16);
}
.tool {
  width: 62px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 2px 0;
  font-size: 10px; color: #000;
  border-radius: 4px;
}
.tool svg { width: 28px; height: 28px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.tool.disabled { opacity: .45; filter: grayscale(1); }
.tool-sep { width: 1px; height: 34px; margin: 0 8px 6px; background: rgba(0, 0, 0, .22); }

.statusbar {
  flex: none;
  padding: 2px 0 3px;
  font-size: 11px; color: #333; text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, .16);
}

.finder-content {
  flex: 1 1 auto; min-height: 0; overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, 96px);
  gap: 10px 6px; align-content: start;
  padding: 14px;
  background: #fff;
}
.icon-item {
  position: relative;
  width: 96px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 2px;
  background: none; border: 0; border-radius: 6px;
  font-size: 12px; color: #000;
  cursor: default;
}

/* Liten «i» nede til høyre på ikonet: dette åpner et infovindu, det sender
   deg ikke ut av nettstedet. Ikonet er 48 px og sentrert i de 96 px brede
   knappene, så merket legges ved høyre kant av selve ikonet. */
.icon-item.has-info::after {
  content: "i";
  position: absolute;
  left: calc(50% + 13px);
  top: 33px;
  width: 18px; height: 18px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: linear-gradient(#8ec0f7, #2f6fd9);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  color: #fff;
  font: italic bold 12px/15px "Times New Roman", Georgia, serif;
  text-align: center;
}
.icon-item svg,
.icon-item img { width: 48px; height: 48px; }
.icon-item span { padding: 0 6px; border-radius: 6px; }
.icon-item:hover span,
.icon-item:focus-visible span { background: var(--aqua); color: #fff; }
.icon-item:focus-visible { outline: none; }

/* Profilbilde brukt som ikon – rundt med tynn kant, som iChat-/kontobilder */
.photo {
  display: block;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 1px 2px rgba(0, 0, 0, .3);
}

/* --------------------------------------------------------------------------
   «Vis info»-vindu (Om Roger)
   -------------------------------------------------------------------------- */
.info { padding-bottom: 6px; font-size: 13px; }
.info-head { display: flex; align-items: center; gap: 18px; padding: 18px 20px 16px; }
.info-head .photo { width: 96px; height: 96px; flex: none; }
.info-head h1 { margin: 0; font-size: 20px; font-weight: bold; letter-spacing: -.2px; }
.info-head p { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }

.section { border-top: 1px solid rgba(0, 0, 0, .18); }
.disclosure {
  width: 100%;
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px 6px;
  background: none; border: 0;
  font-size: 13px; font-weight: bold; color: #222; text-align: left;
  cursor: default;
}
.disclosure::before {
  content: "";
  width: 0; height: 0;
  border-left: 6px solid #6b6b6b;
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
  transition: transform .15s;
}
.section.open .disclosure::before { transform: rotate(90deg); }
/* Venstre luft = 14px + trekant 6px + gap 7px, så innholdet står rett under overskrifta */
.section-body { padding: 2px 16px 14px 27px; }
.section:not(.open) .section-body { display: none; }

/* Nøkkel/verdi – brukes òg i «Om denne maskinen», som beholder fete etiketter med kolon */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 3px 8px; margin: 0; }
.kv dt { font-weight: bold; color: #333; text-align: right; }
.kv dd { margin: 0; }
/* I Om Roger er etikettene grå og uten kolon – verdien er det som skal leses */
.info .kv { gap: 6px 10px; }
.info .kv dt { font-weight: normal; color: var(--text-muted); }

/* Rader: strekikon, tittel med beskrivelse under, og eventuelt en «Vis info»-knapp */
.row { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.row + .row { margin-top: 4px; }
.row svg { width: 22px; height: 22px; flex: none; color: #7a7a7a; }
.row-text { flex: 1 1 auto; min-width: 0; }
.row-text b { display: block; font-size: 13px; }
.row-text span { display: block; font-size: 12px; line-height: 1.35; color: var(--text-muted); }
.row .btn { flex: none; min-width: 0; padding: 0 14px; font-size: 12px; }

/* --------------------------------------------------------------------------
   Dialog-innhold (Kontakt, Papirkurv, 404)
   -------------------------------------------------------------------------- */
.dialog { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px 12px; }
.dialog svg,
.dialog img { width: 64px; height: 64px; flex: none; }
.dialog h1, .dialog h2 { margin: 0 0 6px; font-size: 13px; }
.dialog p { margin: 0 0 4px; font-size: 11px; }
.buttons { display: flex; justify-content: flex-end; gap: 10px; padding: 0 18px 16px; }

/* Punktene i WorkHorse-vinduet */
.steps { display: grid; gap: 7px; padding: 0 18px 4px; }
.steps div { display: flex; gap: 8px; align-items: baseline; font-size: 11px; }
.steps b { flex: none; min-width: 108px; }
.steps span { color: var(--text-muted); }
.steps div::before {
  content: "";
  flex: none;
  width: 7px; height: 7px; margin-top: 1px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #a9d2ff, var(--aqua) 70%, var(--aqua-deep));
}
.footnote { margin: 8px 18px 0; font-size: 11px; color: var(--text-muted); }

/* Lenkelistene i infovinduene (Stisykling, Diskgolf) – som i en Aqua-innrammet rute */
.list-head { margin: 10px 18px 5px; font-size: 11px; font-weight: bold; }
.links {
  list-style: none;
  margin: 0 18px;
  padding: 0;
  background: #fff;
  border: 1px solid #b5b5b5;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .15);
}
.links li + li { border-top: 1px solid #e4e4e4; }
.links a {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 9px;
  font-size: 12px; color: #000; text-decoration: none;
}
.links a:hover,
.links a:focus-visible { background: var(--aqua); color: #fff; outline: none; }
.links svg { width: 20px; height: 20px; flex: none; }
.links .where { margin-left: auto; font-size: 11px; color: var(--text-muted); }
.links a:hover .where,
.links a:focus-visible .where { color: rgba(255, 255, 255, .85); }

/* --------------------------------------------------------------------------
   Høttpodden-vinduet: børsta metall, LCD-felt og episodeliste – i slekt med
   iTunes 3, som kom samme år som Jaguar. Logikken ligger i js/player.js.
   -------------------------------------------------------------------------- */
.window.metal,
.window.metal.active {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 1px, rgba(0, 0, 0, .03) 1px 2px, transparent 2px 4px),
    linear-gradient(180deg, #dedede 0%, #c6c6c6 30%, #b3b3b3 100%);
  border-radius: 8px;
}
.window.metal:not(.active) {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 1px, rgba(0, 0, 0, .02) 1px 2px, transparent 2px 4px),
    linear-gradient(180deg, #e9e9e9 0%, #d8d8d8 30%, #cbcbcb 100%);
}
.window.metal .titlebar { border-radius: 8px 8px 0 0; }

.player-top {
  flex: none;
  display: flex; align-items: center; gap: 16px;
  padding: 4px 14px 10px;
}
.transport { flex: none; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.transport-btns { display: flex; align-items: center; gap: 6px; }

/* Runde metallknapper */
.tbtn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, .55); border-radius: 50%;
  background: radial-gradient(circle at 50% 26%, #fff 0%, #ececec 38%, #c0c0c0 74%, #a2a2a2 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .75), inset 0 -1px 2px rgba(0, 0, 0, .2);
  color: #333;
  cursor: default;
}
.tbtn svg { width: 14px; height: 14px; }
.tbtn.big { width: 38px; height: 38px; }
.tbtn.big svg { width: 18px; height: 18px; }
.tbtn:active { filter: brightness(.85); }
.tbtn:focus-visible { outline: 3px solid rgba(61, 127, 224, .55); outline-offset: 1px; }

/* Glidere: tidslinja i LCD-feltet og lydstyrken. --fill settes av skriptet. */
.slider {
  --fill: 0%;
  --ink: #2c3120;
  --rest: rgba(255, 255, 255, .4);
  -webkit-appearance: none; appearance: none;
  flex: 1 1 auto; min-width: 0;
  height: 14px; margin: 0; padding: 0;
  background: none;
  cursor: default;
}
.slider::-webkit-slider-runnable-track {
  height: 5px;
  border: 1px solid rgba(0, 0, 0, .55); border-radius: 3px;
  background: linear-gradient(90deg, var(--ink) var(--fill), var(--rest) var(--fill));
}
.slider::-moz-range-track {
  height: 3px;
  border: 1px solid rgba(0, 0, 0, .55); border-radius: 3px;
  background: var(--rest);
}
.slider::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--ink); }
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 9px; height: 9px; margin-top: -3px;
  border: 0; border-radius: 2px;
  background: var(--ink);
  transform: rotate(45deg);
}
.slider::-moz-range-thumb {
  width: 9px; height: 9px;
  border: 0; border-radius: 2px;
  background: var(--ink);
  transform: rotate(45deg);
}
.slider:disabled::-webkit-slider-thumb { visibility: hidden; }
.slider:disabled::-moz-range-thumb { visibility: hidden; }
.slider:focus-visible { outline: 2px solid rgba(61, 127, 224, .7); outline-offset: 2px; border-radius: 4px; }

.volume { display: flex; align-items: center; gap: 4px; width: 112px; color: #444; }
.volume svg { width: 12px; height: 12px; flex: none; }
.volume .slider { --ink: #4a4a4a; --rest: rgba(255, 255, 255, .55); }

/* LCD-feltet: tittel, statuslinje og tidslinje */
.lcd {
  flex: 1 1 auto; min-width: 0;
  padding: 6px 12px 5px;
  border: 1px solid rgba(0, 0, 0, .5); border-radius: 7px;
  background: linear-gradient(180deg, #c8d1ab 0%, #dde4c5 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .7);
  color: #23281a; text-align: center;
}
.lcd-title, .lcd-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcd-title { font-size: 12px; font-weight: bold; }
.lcd-sub { font-size: 11px; color: #474f35; }
.lcd-time {
  display: flex; align-items: center; gap: 8px;
  margin-top: 2px;
  font-size: 10px; font-variant-numeric: tabular-nums;
}
.lcd-time span { flex: none; min-width: 42px; }
.lcd-time span:first-child { text-align: right; }
.lcd-time span:last-child { text-align: left; }

/* Episodelista */
.ep-scroll {
  flex: 1 1 auto; min-height: 0; overflow: auto;
  margin: 0 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .5);
}
.ep-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate; border-spacing: 0;   /* collapse mister kantene på sticky-hodet */
  font-size: 11px;
  user-select: none;                              /* to raske klikk skal spille, ikke merke tekst */
}
.ep-table th {
  position: sticky; top: 0; z-index: 1;
  height: 17px; padding: 0;
  background: linear-gradient(180deg, #fff 0%, #ececec 48%, #dcdcdc 52%, #eee 100%);
  box-shadow: inset 0 -1px 0 #9a9a9a, inset -1px 0 0 #c4c4c4;
  font-weight: normal; text-align: left;
}
.ep-table th button {
  display: block;
  width: 100%; height: 17px;
  padding: 0 6px;
  background: none; border: 0;
  font-size: 11px; text-align: inherit;
  white-space: nowrap;
  cursor: default;
}
.ep-table th button:focus-visible { outline: 2px solid rgba(61, 127, 224, .7); outline-offset: -2px; }
.ep-table th.sorted {
  background: linear-gradient(180deg, #d9e9fc 0%, #a4c9f6 48%, #7fb1f0 52%, #b5d4f8 100%);
  box-shadow: inset 0 -1px 0 #5d86bd, inset -1px 0 0 #7fa3d3;
}
.ep-table th.sorted button { font-weight: bold; }
.ep-table th.sorted button::after { content: " ▲"; font-size: 8px; }
.ep-table th.sorted.desc button::after { content: " ▼"; }

.ep-num { width: 38px; text-align: center; }
.ep-time { width: 62px; text-align: right; }
.ep-date { width: 98px; }
.ep-table th.ep-num { text-align: center; }
.ep-table th.ep-time { text-align: right; }

.ep td {
  height: 19px; padding: 0 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.ep td.ep-num { padding: 0; }
.ep:nth-child(even) td { background: #edf3fe; }
.ep.selected td { background: #3875d7; color: #fff; }
.window:not(.active) .ep.selected td { background: #d0d0d0; color: #000; }

/* Navnet er en knapp, så lista virker med tastatur: ett klikk velger, ett til spiller */
.ep-pick {
  display: block;
  width: 100%; height: 19px;
  padding: 0;
  background: none; border: 0;
  line-height: 19px; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: default;
}
.ep-pick:focus-visible { outline: 2px solid rgba(61, 127, 224, .8); outline-offset: -2px; }

/* #-kolonna: tallet bytter plass med spill/pause/høyttaler alt etter tilstand */
.ep-go {
  display: grid; place-items: center;
  width: 100%; height: 19px;
  padding: 0;
  background: none; border: 0;
  color: var(--text-muted);
  cursor: default;
}
.ep.selected .ep-go { color: inherit; }
.ep-go:focus-visible { outline: 2px solid rgba(61, 127, 224, .8); outline-offset: -2px; }
.ep-go svg { display: none; width: 11px; height: 11px; }
.ep.selected .ep-go .n,
.ep.current .ep-go .n { display: none; }
.ep.selected .ep-go .g-play,
.ep.current .ep-go .g-play { display: block; }
.ep.current.playing .ep-go .g-play { display: none; }
.ep.current.playing .ep-go .g-speaker { display: block; }
@media (hover: hover) {
  .ep:hover .ep-go .n { display: none; }
  .ep:hover .ep-go .g-play { display: block; }
  .ep.current.playing:hover .ep-go .g-play,
  .ep.current.playing:hover .ep-go .g-speaker { display: none; }
  .ep.current.playing:hover .ep-go .g-pause { display: block; }
}

.ep-message { padding: 28px 18px; font-size: 12px; color: var(--text-muted); text-align: center; }
.ep-message p { margin: 0 0 10px; }

/* Om den valgte episoden */
.ep-detail {
  flex: none;
  display: flex; flex-direction: column;
  height: 144px;
  margin: 8px 8px 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .5);
  font-size: 11px; line-height: 1.5;
}
.ep-detail[hidden] { display: none; }
.ep-detail-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px 12px 4px; }
.ep-detail h3 { margin: 0; font-size: 12px; }
.ep-detail p { margin: 0 0 6px; }
.ep-detail .ep-meta { margin: 1px 0 6px; color: var(--text-muted); }
.ep-detail a { overflow-wrap: anywhere; }
.ep-actions {
  flex: none;
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 6px 12px 7px;
  border-top: 1px solid #e4e4e4;
}

.player-count {
  flex: none;
  padding: 0 10px 7px;
  font-size: 11px; color: #333; text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}

/* Lyttetjenestene – for dem som heller vil høre i sin egen app */
.services { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.services-label { margin-right: 2px; font-weight: bold; }
.services .btn {
  display: inline-flex; align-items: center; gap: 5px;
  min-width: 0; height: 21px;
  padding: 0 11px 0 7px;
  font-size: 11px; line-height: 19px;
  text-shadow: none;
}
.services button.btn { padding: 0 11px; }
.services .btn svg { width: 14px; height: 14px; flex: none; }

/* Toppraden: logo og et par linjer info, ved siden av lenkene til de andre
   lyttetjenestene. Rett under tittellinja, med en tydelig strek ned mot spilleren. */
.podcast-head {
  flex: none;
  display: flex; flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .2);
}
.podcast-intro { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 0; }
.podcast-intro img { flex: none; }
.podcast-intro h2 { margin: 0 0 2px; font-size: 12px; }
.podcast-intro p {
  margin: 0; font-size: 11px; line-height: 1.4; color: var(--text-muted);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.services-top { flex: 0 1 auto; }

/* Noteikonet i menylinja – dempet når podden står på pause */
.menu-title[hidden] { display: none; }
.player-extra { padding: 0 7px; }
.player-extra svg { width: 15px; height: 15px; }
.player-extra.paused svg { opacity: .45; }
#m-player .menu-head { max-width: 300px; overflow: hidden; text-overflow: ellipsis; color: #000; font-weight: bold; }

/* --------------------------------------------------------------------------
   Aqua-knapper
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-block;
  min-width: 82px; height: 22px;
  padding: 0 16px;
  border: 1px solid rgba(0, 0, 0, .5); border-radius: 11px;
  background: linear-gradient(180deg, #fff 0%, #e9e9e9 45%, #d3d3d3 50%, #f2f2f2 100%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  font-size: 13px; line-height: 20px; color: #000; text-align: center; text-decoration: none;
  cursor: default;
}
.btn::before {             /* glans */
  content: "";
  position: absolute; left: 4px; right: 4px; top: 1px; height: 45%;
  border-radius: 10px 10px 6px 6px / 8px 8px 4px 4px;
  background: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, .1));
  pointer-events: none;
}
.btn:active { filter: brightness(.9); }
.btn:focus-visible { outline: 3px solid rgba(61, 127, 224, .55); outline-offset: 1px; }
.btn.default {
  border-color: #1d4d9e;
  background: linear-gradient(180deg, #e9f5ff 0%, #a5d0fb 45%, #4f98ef 50%, #3f85e2 60%, #8cc8fb 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 0 6px rgba(80, 150, 240, .5);
  animation: pulse 1.1s ease-in-out infinite alternate;
}
@keyframes pulse {
  from { filter: saturate(.9) brightness(1);    box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 0 4px rgba(80, 150, 240, .35); }
  to   { filter: saturate(1.2) brightness(1.1); box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 0 10px rgba(80, 150, 240, .85); }
}

/* --------------------------------------------------------------------------
   Dock
   -------------------------------------------------------------------------- */
.dock {
  position: fixed;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  z-index: 900;
  display: flex; align-items: flex-end; gap: 2px;
  height: var(--dock-h);
  padding: 3px 6px 0;
  background: rgba(255, 255, 255, .38);
  border: 1px solid rgba(0, 0, 0, .35); border-bottom: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.dock-item {
  position: relative;
  width: 60px; height: 70px;
  padding: 0 0 12px;
  display: flex; align-items: flex-end; justify-content: center;
  background: none; border: 0;
  cursor: default;
}
.dock-item svg,
.dock-item img {
  width: 52px; height: 52px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
  transform-origin: bottom center;
  transition: transform .12s ease-out;
}
.dock-item:hover svg,
.dock-item:hover img,
.dock-item:focus-visible svg,
.dock-item:focus-visible img { transform: scale(1.28) translateY(-2px); }
.dock-item:focus-visible { outline: none; }
.dock-item .label {
  position: absolute; bottom: calc(100% + 4px); left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px; color: #000;
  text-shadow: 0 0 2px #fff, 0 0 4px #fff, 0 1px 0 #fff;
  opacity: 0; pointer-events: none;
}
.dock-item:hover .label,
.dock-item:focus-visible .label { opacity: 1; }
.dock-item.running::after {  /* svart trekant under kjørende program */
  content: "";
  position: absolute; bottom: 2px; left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid #000;
  opacity: .85;
}
/* Grønt notemerke på Høttpodden-ikonet mens podden spiller (settes av js/player.js) */
.dock-item.playing::before {
  content: "♪";
  position: absolute; right: 1px; top: 4px; z-index: 1;
  width: 18px; height: 18px;
  border: 1.5px solid #fff; border-radius: 50%;
  background: linear-gradient(#8ee07a, #2f9a1f);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  color: #fff;
  font: bold 11px/15px var(--font-ui);
  text-align: center;
}
.dock-sep { width: 0; height: 56px; margin: 0 6px 8px; border-left: 1px dashed rgba(0, 0, 0, .45); }

/* --------------------------------------------------------------------------
   «Om denne maskinen»
   -------------------------------------------------------------------------- */
.about-mac { padding: 18px 20px 4px; text-align: center; }
.about-mac .bigapple { width: 46px; height: 46px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.about-mac h1 { margin: 4px 0 0; font-size: 20px; font-weight: normal; letter-spacing: .2px; }
.about-mac .version { margin: 1px 0 14px; font-size: 11px; color: var(--text-muted); }
.about-mac .kv {
  justify-content: center;
  margin: 0 auto;
  font-size: 11px;
  text-align: left;
}
.about-mac .footnote {
  margin: 14px 0 0;
  font-size: 10px; line-height: 1.5; color: var(--text-muted);
  text-align: left;
}
.about-mac .buttons { padding: 14px 0 12px; justify-content: center; }

/* --------------------------------------------------------------------------
   Hjelpviser
   -------------------------------------------------------------------------- */
.win-body.help { padding: 0 18px 18px; background: #fff; }
.help-head {
  position: sticky; top: 0;
  display: flex; align-items: center; gap: 10px;
  margin: 0 -18px 4px;
  padding: 12px 18px 10px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, .14);
}
.help-head svg { width: 34px; height: 34px; flex: none; }
.help-head h1 { margin: 0; font-size: 15px; font-weight: bold; }
.win-body.help h2 {
  margin: 16px 0 5px;
  font-size: 12px; font-weight: bold;
  color: #1b4a9c;
}
.win-body.help p { margin: 0 0 8px; font-size: 12px; line-height: 1.5; }
.win-body.help ul { margin: 0 0 8px; padding-left: 20px; font-size: 12px; line-height: 1.55; }
.win-body.help li { margin-bottom: 3px; }

/* --------------------------------------------------------------------------
   404-varsel
   -------------------------------------------------------------------------- */
.alert {
  left: 50%; top: 40%;
  transform: translate(-50%, -50%);
  width: 440px; max-width: calc(100vw - 24px);
}

/* --------------------------------------------------------------------------
   Mobil: vinduene stables som kort, Dock krymper
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  body { overflow: auto; }

  /* Plass til Finder, Gå, Hjelp og klokka – resten hører hjemme på en stor skjerm */
  .menu-title[data-menu="m-edit"],
  .menu-title[data-menu="m-view"],
  .menu-title[data-menu="m-window"] { display: none; }
  .menu-title { padding: 0 8px; }
  .menu { max-width: calc(100vw - 8px); }

  #desktop {
    position: static;
    display: flex; flex-direction: column; gap: 14px;
    min-height: 100vh;
    margin-top: var(--menubar-h);
    padding: 12px 12px calc(var(--dock-h) + 14px);
  }
  .desk-icon { display: none; }

  .window {
    position: static !important;
    width: auto !important; height: auto !important;
    max-height: none !important;
    transform: none !important;
  }
  .window[hidden] { display: none; }
  #win-about { order: -1; }
  #win-finder .finder-content { min-height: 140px; }

  .light::after { opacity: 1; }          /* ingen hover på touch */

  /* Vinduene er auto-høye på mobil, så iframene må få høyde selv */
  .win-frame { height: 72vh; min-height: 340px; max-height: 560px; }

  /* Fullskjerm: kortet dekker alt under menylinja (også Dock), fast posisjonert,
     så spillet får et stabilt touch-område uten at sida bak scroller med.
     Mål og z-index må ha !important for å slå skrivebordsregelen og den inline
     z-indexen desktop.js setter når vinduet får fokus. */
  .frame-zoom { display: inline-block; }
  .window.zoomed {
    position: fixed !important;
    inset: var(--menubar-h) 0 0 !important;
    width: auto !important; height: auto !important;
    max-width: none !important;
    z-index: 950 !important;
    border-radius: 0;
  }
  .window.zoomed .titlebar { border-radius: 0; }
  .window.zoomed .win-frame {
    height: auto !important;
    min-height: 0;
    max-height: none !important;
  }
  body.mobile-zoomed { overflow: hidden; }

  /* Spilleren: LCD-feltet øverst, store knapper under. Lista ruller for seg selv,
     så knappene aldri er langt unna – i fullskjerm fyller den resten av kortet. */
  .player-top { flex-direction: column-reverse; align-items: stretch; gap: 10px; padding: 6px 12px 10px; }
  .volume { display: none; }             /* iOS lar ikke nettsider styre lydstyrken */
  .tbtn { width: 42px; height: 42px; }
  .tbtn svg { width: 18px; height: 18px; }
  .tbtn.big { width: 50px; height: 50px; }
  .tbtn.big svg { width: 22px; height: 22px; }
  .transport-btns { gap: 14px; }
  .lcd { padding: 8px 12px 7px; }
  .slider { height: 24px; }
  .ep-scroll { max-height: 46vh; }
  .window.zoomed .ep-scroll { max-height: none; }
  .ep-table { font-size: 12px; }
  .ep td, .ep-go { height: 38px; }
  .ep-pick { height: auto; padding: 5px 0; line-height: 1.3; white-space: normal; }
  .ep-detail { height: auto; font-size: 12px; }
  .window.zoomed .ep-detail { max-height: 30vh; }
  .services .btn { height: 28px; line-height: 26px; font-size: 12px; }   /* fingervennlig */

  .dock { --dock-h: 62px; max-width: 100vw; }
  .dock-item { width: 50px; height: 58px; }
  .dock-item svg,
  .dock-item img { width: 42px; height: 42px; }
  .dock-item .label { display: none; }
}

/* Smale telefoner: Dock-en har fått flere programmer og må krympe for å få plass */
@media (max-width: 560px) {
  .dock { --dock-h: 56px; padding: 3px 3px 0; gap: 0; }
  .dock-item { width: 40px; height: 52px; }
  .dock-item svg,
  .dock-item img { width: 34px; height: 34px; }
  .dock-sep { margin: 0 2px 8px; height: 46px; }
  .dock-item.playing::before { top: 2px; right: -2px; width: 15px; height: 15px; font-size: 9px; line-height: 12px; }

  /* Dato står uansett i feltet under lista – navnet trenger plassen */
  .ep-date { display: none; }
}

/* De aller smaleste: ti ikon må fortsatt få plass innenfor skjermbredda */
@media (max-width: 420px) {
  .dock { --dock-h: 50px; padding: 2px 2px 0; }
  .dock-item { width: 33px; height: 46px; padding-bottom: 9px; }
  .dock-item svg,
  .dock-item img { width: 28px; height: 28px; }
  .dock-sep { margin: 0 1px 7px; height: 40px; }

  /* Vindushodet i Om Roger: mindre bilde, så navnet får plass på ei linje */
  .info-head { gap: 14px; padding: 16px 16px 14px; }
  .info-head .photo { width: 80px; height: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn.default { animation: none; }
  .dock-item svg, .dock-item .photo, .disclosure::before, .window.minimizing { transition: none; }
}
