*{box-sizing:border-box}body{--tone:#254d94;--art:url('/ui/bg-0.webp');margin:0;color:#192d37;background:#f6f5ef var(--art) center/cover fixed;font:16px/1.45 system-ui,sans-serif;min-height:100svh}header{display:flex;justify-content:space-between;align-items:center;padding:16px max(6vw,22px);background:#fffc;border-bottom:1px solid #fff9}header b{letter-spacing:.08em;text-transform:uppercase;font-size:13px}button,input,select{font:inherit}button,select{cursor:pointer}button{background:white;color:#21333b;border:1px solid #cad4d6;border-radius:14px;padding:9px 15px}button:disabled{opacity:.5;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #2377a8;outline-offset:3px}.primary{background:var(--tone);color:white;border:0;padding:13px 23px;font-weight:650}main{max-width:880px;margin:auto;padding:42px 22px 220px}h1{font-size:clamp(34px,7vw,70px);line-height:1.04;letter-spacing:-.047em;overflow-wrap:break-word;margin:14px 0 30px}h2{font-size:24px;margin:8px 0 18px}.intro{max-width:720px;padding:5vh 0}.kicker{font-weight:700;letter-spacing:.12em;font-size:12px;text-transform:uppercase}.panel,dialog{background:#fff;border:1px solid #dce1e1;border-radius:20px;padding:22px;box-shadow:0 12px 38px #10293417}.login{max-width:440px;margin:8vh auto}.login h1{font-size:40px}.login form{display:grid;gap:14px}input,select{border:1px solid #b8c7c6;background:white;color:#172c32;border-radius:10px;padding:10px;max-width:100%}nav{position:fixed;bottom:0;left:0;right:0;display:flex;gap:5px;align-items:stretch;overflow-x:auto;overscroll-behavior-x:contain;background:#fffffff5;padding:8px max(10px,calc((100vw - 1080px)/2)) max(9px,env(safe-area-inset-bottom));box-shadow:0 -3px 20px #182d341a;scroll-snap-type:x proximity;z-index:2}nav button{flex:0 0 167px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;padding:5px 6px;border:0;background:transparent;font-size:12px;font-weight:650;line-height:1.2;scroll-snap-align:center}nav img{height:43px;width:52px;object-fit:contain;mix-blend-mode:multiply}nav button[aria-current=true]{background:color-mix(in srgb,var(--tone) 15%,white);box-shadow:inset 0 -3px var(--tone)}[hidden]{display:none!important}.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.reader{padding:12px;max-width:760px}.reader img{display:block;width:100%;height:auto;cursor:zoom-in}.picture{display:block;width:100%;padding:0;border:none}.reader .row{justify-content:space-between;margin:8px 0}.reader h2{font-size:18px}.slot{margin:12px 0;padding:16px}.slot p{margin:5px 0 12px}.slot strong{font-size:18px}dialog{max-width:min(960px,96vw);max-height:94dvh;overflow:auto}dialog::backdrop{background:#18282edb}dialog img{width:min(100%,1000px);height:auto}dialog code{font-size:20px;display:block;padding:14px;background:#edf3f4;user-select:all}#notice:not(:empty){position:fixed;top:50px;left:50%;transform:translateX(-50%);background:#472838;color:white;border-radius:10px;padding:10px 15px;z-index:4}
header{position:relative;background:linear-gradient(105deg,#05372f,#103d38 72%,#123e35);padding-top:20px;padding-bottom:24px}
header:after{content:"";position:absolute;bottom:-9px;left:0;width:100%;height:22px;background:url('/ui/goldwelle.svg') center/100% 100% no-repeat;pointer-events:none}
.brand{display:block;width:clamp(190px,50vw,310px);height:auto}header button{background:#ffffff12;color:#fff;border-color:#ffffff45}
body:has(.intro[data-course="9"]){background-color:#083a31;background-size:cover;background-position:center}
.intro[data-course="9"]{padding-top:2vh;color:#f0fff5}.intro[data-course="9"] h1{max-width:14em;font-size:clamp(32px,8.4vw,70px);text-shadow:0 1px #a8ddbf,0 3px #386453,0 5px #174938,0 8px 12px #032b24}.year{display:block;font-size:1.55em;color:#d2f5d3}.intro[data-course="9"] .primary{background:linear-gradient(#299769,#055336);border:1px solid #94e9bb;box-shadow:0 4px 0 #073c2b,0 5px 15px #063c35}
@media(min-width:800px){body:has(.intro[data-course="9"]){background-size:auto 130vh;background-repeat:no-repeat;background-position:center 45%}}

body:has(.intro[data-course="9"]) {
  background: linear-gradient(155deg, #00685866, transparent 57%),
    var(--art) center bottom / cover no-repeat fixed #075b50;
}
body:has(.intro[data-course="9"]) header {
  background: transparent;
  border-bottom: 0;
  padding-bottom: 12px;
}
body:has(.intro[data-course="9"]) header::after { display: none; }
.intro[data-course="9"] { padding-top: clamp(16px, 4vh, 48px); }
.intro[data-course="9"] h1 {
  font-size: clamp(26px, 7.25vw, 65px);
  line-height: 1.13;
  letter-spacing: -.035em;
  text-shadow: 0 2px #6ab19c, 0 4px #155b4f, 0 7px 12px #062d27;
}
.intro[data-course="9"] .year { color: #d4ffeb; font-size: 1.4em; margin-top: .12em; }
.intro[data-course="9"] .primary {
  background: linear-gradient(#35dca3, #078864);
  box-shadow: inset 0 1px 3px #bdffdc, 0 4px 0 #08624e, 0 0 20px #39ffb26b;
  border-color: #8dffd0;
}
body:has(.intro[data-course="9"]) nav {
  left: 10px;
  right: 10px;
  bottom: max(8px, env(safe-area-inset-bottom));
  padding: 7px;
  border: 1px solid #d9fff467;
  border-radius: 22px;
  background: #105f55be;
  backdrop-filter: blur(16px);
}
body:has(.intro[data-course="9"]) nav button { color: #effffa; }
body:has(.intro[data-course="9"]) nav img { mix-blend-mode: normal; }
body:has(.intro[data-course="9"]) nav button[aria-current=true] {
  background: linear-gradient(145deg, #327f86, #258657);
  box-shadow: inset 0 0 0 1px #aaffcaac, 0 3px 10px #002e28a0;
}
main:has(.reader) { max-width: 1150px; padding: 18px 4px 155px; }
.reader { max-width: none; padding: 8px; }
.reader .row { gap: 6px; }
.page-viewport { overflow-x: auto; background: white; }
.page-viewport .picture { max-width: none; border-radius: 0; }

/* The original cow artwork is shared. Each course keeps its own accent. */
body, body:has(.intro[data-course="9"]) {
  background: linear-gradient(165deg, color-mix(in srgb,var(--tone) 88%,#081c27) 0%,
    color-mix(in srgb,var(--tone) 54%,transparent) 53%, transparent 82%),
    url('/ui/bg-9.webp') center bottom / cover no-repeat fixed, var(--tone);
}
body:has(.intro) header { background: transparent; border: 0; padding-bottom: 12px; }
body:has(.intro) header::after { display: none; }
.intro { color: #f4fffc; text-shadow: 0 2px 12px #102729c9; }
.intro .primary {
  background: linear-gradient(color-mix(in srgb,var(--tone) 58%,#a2ffdc),var(--tone));
  border: 1px solid #dcfff6ad;
  box-shadow: inset 0 1px 2px #ffffff70, 0 4px 14px #071e265e;
}
body nav, body:has(.intro[data-course="9"]) nav {
  width: min(620px, calc(100% - 20px));
  left: 50%; right: auto;
  transform: translateX(-50%);
  bottom: max(8px, env(safe-area-inset-bottom));
  padding: 4px;
  gap: 4px;
  border-radius: 18px;
  border: 1px solid #effff594;
  background: linear-gradient(150deg,#ffffff42,#ffffff17),
    color-mix(in srgb,var(--tone) 56%,#102633b8);
  box-shadow: inset 0 1px 1px #ffffff82, 0 8px 26px #071e2666;
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  scrollbar-width: none;
}
nav::-webkit-scrollbar { display: none; }
body nav button, body:has(.intro[data-course="9"]) nav button {
  flex-basis: clamp(106px, 29vw, 142px);
  font-size: 11px;
  padding: 3px 5px;
  gap: 2px;
  color: #f7fffc;
}
body nav img, body:has(.intro[data-course="9"]) nav img { height: 29px; width: 38px; mix-blend-mode: normal; }
body nav button[aria-current=true], body:has(.intro[data-course="9"]) nav button[aria-current=true] {
  background: linear-gradient(145deg,#ffffff4a,#ffffff17);
  box-shadow: inset 0 0 0 1px #e9fff4a8, 0 2px 7px #08242e70;
}
.swipe-hint {
  margin: 6px 0;
  padding: 8px;
  border-radius: 8px;
  background: #eaf2f2;
  text-align: center;
  color: #284946;
  font-size: 12px;
  touch-action: pan-y pinch-zoom;
}

/* Course themes frame the artwork. The image is rendered in its own colors. */
body, body:has(.intro[data-course="9"]) {
  background: linear-gradient(155deg, color-mix(in srgb,var(--tone) 68%,#0d2931),
    color-mix(in srgb,var(--tone) 25%,#071822)) fixed;
}
body:has(.reader), body:has(.slot) { background: #edf2f3; }
body:has(.intro) main { padding: clamp(12px, 3vh, 30px) 18px 120px; }
.intro, .intro[data-course="9"] { padding: 0; max-width: none; }
.intro h1, .intro[data-course="9"] h1 {
  max-width: 21ch;
  margin: 0 0 20px;
  font-size: clamp(28px, 7vw, 60px);
  line-height: 1.08;
  text-shadow: 0 2px 8px #071c25a0;
}
.intro[data-course="9"] .year { font-size: 1.42em; }
/* The artwork blends into the page through its quiet upper edge. */
body:has(.intro) main {
  max-width: none;
  padding: 0 0 75px;
}
.intro, .intro[data-course="9"] {
  isolation: isolate;
  position: relative;
  min-height: calc(100svh - 148px);
  padding: clamp(16px, 4vh, 44px) max(5vw, calc((100vw - 850px) / 2)) 0;
}
.course-art {
  display: block;
  position: relative;
  z-index: -1;
  width: min(100vw, 1100px);
  height: auto;
  margin: clamp(-12px, 1vh, 10px) 0 0;
  left: 50%;
  transform: translateX(-50%);
  mask-image: linear-gradient(to bottom, transparent, black 15%);
}
@media (min-width: 1100px) {
  .course-art {
    mask-image: linear-gradient(to bottom, transparent, black 15%),
      linear-gradient(to right, transparent, black 7% 93%, transparent);
    mask-composite: intersect;
  }
}
body:has(.login) {
  background: radial-gradient(ellipse at 24% 12%, #247978, transparent 50%),
    linear-gradient(150deg, #123f49, #081f2b 78%);
}
body:has(.login)::before {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: min(46svh, 405px);
  background: url('/ui/dairy-9.webp') center bottom / min(100%, 700px) auto no-repeat;
  mask-image: linear-gradient(transparent, black 29%);
  pointer-events: none;
}
body:has(.login) header { background: #12414c45; border: 0; }
body:has(.login) header::after { display: none; }
body:has(.login) main { position: relative; padding: 6vh 18px 24px; }
.login {
  margin: 0 auto;
  padding: clamp(20px, 5vw, 34px);
  border: 1px solid #d8fff786;
  border-radius: 24px;
  background: linear-gradient(135deg, #b2fff52e, #102c42aa);
  color: #edfff9;
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  box-shadow: inset 0 1px 2px #e7fff990, 0 18px 44px #031e2b8c;
}
.login h1 {
  color: #d5fff1;
  text-shadow: 0 1px #fff, 0 3px #28756c, 0 5px 13px #061f2d;
}
.login label { color: #edfffb; font-weight: 650; }
.login input { background: #0b303dba; border-color: #cefef080; color: white; }
.login .primary {
  background: linear-gradient(#207c71, #07594f);
  border: 1px solid #b2ffe4ae;
  box-shadow: inset 0 1px 2px #d6fff9a8, 0 4px 13px #0e3b428c;
}

/* Full-bleed cover and reflected light around each course scene. */
body:has(.intro), body:has(.intro[data-course="9"]) {
  background:
    radial-gradient(ellipse at 104% 35%, color-mix(in srgb,var(--tone) 65%,#c7ecce), transparent 47%),
    radial-gradient(ellipse at -15% 4%, color-mix(in srgb,var(--tone) 62%,#6ca4bc), transparent 45%),
    linear-gradient(151deg, #071e2a, color-mix(in srgb,var(--tone) 72%,#0b2330) 52%, #071b26);
  background-attachment: fixed;
}
body:has(.intro) { overflow-x: clip; }
body:has(.intro) header { z-index: 1; }
body:has(.intro) main { padding-bottom: 0; }
.intro, .intro[data-course="9"] {
  min-height: calc(100svh - 66px);
  padding-bottom: clamp(300px, 50svh, 560px);
}
.intro::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -80px 0 15%;
  background:
    radial-gradient(ellipse at 87% 19%, #dbffff85 0, #a9fcf524 6%, transparent 24%),
    radial-gradient(ellipse at 15% 61%, #caffec38, transparent 42%),
    repeating-linear-gradient(122deg, transparent 0 15%, #c4ffed1a 22%, transparent 29%);
  pointer-events: none;
}
.course-art {
  position: absolute;
  inset: auto 0 0;
  transform: none;
  margin: 0;
  width: 100%;
  height: clamp(310px, 55svh, 660px);
  object-fit: cover;
  object-position: 50% 72%;
  mask-image: linear-gradient(to bottom, transparent 0%, #0009 13%, #000 27%);
  mask-composite: add;
}
@media (min-width: 760px) {
  .course-art { object-position: 50% 64%; }
}
.intro h1, .intro[data-course="9"] h1 {
  font-weight: 850;
  text-shadow: 0 1px #9dc3c1, 0 3px #315b60, 0 5px #122e36, 0 9px 16px #04151ddd;
}
.intro[data-course="9"] .year {
  color: #c8fae0;
  text-shadow: 0 1px #f6fff8, 0 3px #75bca9, 0 5px #347668, 0 8px #143e39, 0 12px 18px #062327;
}
.intro .primary, .intro[data-course="9"] .primary {
  border-radius: 999px;
  box-shadow: inset 0 2px 3px #ecfffbc9, inset 0 -3px 5px #082b356c,
    0 4px 0 #102b30, 0 0 25px color-mix(in srgb,var(--tone) 48%,#8cffdc);
}
body nav, body:has(.intro[data-course="9"]) nav {
  background: linear-gradient(150deg,#e0fff36c,#294b55a8 42%,#061e2dda);
  box-shadow: inset 0 1px 1px #f5fff9df, 0 6px 24px #02141cc2;
}
body nav img, body:has(.intro[data-course="9"]) nav img {
  width: 47px;
  height: 39px;
  filter: drop-shadow(0 2px 0 #04191cbc) drop-shadow(0 4px 4px #071923b3) brightness(1.15);
}
body nav button[aria-current=true] img {
  filter: drop-shadow(0 2px 0 #082f2b) drop-shadow(0 0 7px #a3ffe7b8) brightness(1.23);
}
body nav button[aria-current=true], body:has(.intro[data-course="9"]) nav button[aria-current=true] {
  background: radial-gradient(ellipse at 34% 0%, #76fbd96b, transparent 75%), #062930b4;
  box-shadow: inset 0 1px 2px #e1fff4ba, inset 0 0 9px #69ffdc54, 0 3px 8px #081e26a0;
}

/* Reserve a separate row for navigation so the whole cover remains visible. */
body:has(.intro) {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
}
body:has(.intro) main { width: 100%; margin: 0; }
.intro, .intro[data-course="9"] {
  min-height: 0;
  padding-bottom: 0;
}
.course-art {
  position: relative;
  inset: auto;
  left: 50%;
  transform: translateX(-50%);
  width: min(100vw, 1000px);
  height: auto;
  object-fit: contain;
  margin: clamp(14px, 3vh, 30px) 0 0;
  mask-image: linear-gradient(to bottom, transparent, #000 18%);
}
body:has(.intro) nav, body:has(.intro[data-course="9"]) nav {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  margin: 10px auto max(8px, env(safe-area-inset-bottom));
  align-self: end;
}
body:has(.intro) #notice:empty { display: none; }
.reader-controls {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 0;
  background: white;
}
.reader-page { margin: 18px 0 26px; scroll-margin-top: 68px; }
.reader-page h3 { margin: 0 0 8px; font-size: 14px; }
.reader-page .picture { width: var(--page-width); }
.reader-page img { aspect-ratio: 210 / 297; object-fit: contain; background: white; }

/* One portrait scene fills each cover, including the area behind the heading. */
body:has(.intro), body:has(.intro[data-course="9"]), body:has(.login) {
  position: relative;
  isolation: isolate;
  background: #091a23;
}
body:has(.intro)::before, body:has(.login)::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: min(100%, 1250px);
  min-height: 100svh;
  background: var(--cover, url('/ui/dairy-10.webp')) center / cover no-repeat;
  mask-image: none;
  pointer-events: none;
}
body:has(.intro) header, body:has(.login) header {
  position: relative;
  padding: max(16px,env(safe-area-inset-top)) max(16px,5vw) 30px;
  background: linear-gradient(180deg,#07151dbf,#07151d38);
  border: 0;
  gap: 12px;
}
body:has(.intro) header::after, body:has(.login) header::after {
  display: block;
  bottom: -7px;
  height: 27px;
}
body:has(.intro) .brand, body:has(.login) .brand {
  width: min(100%,380px);
  min-width: 0;
  filter: drop-shadow(0 3px 6px #050b10bc);
}
body:has(.intro) #logout {
  font-size: 12px;
  padding: 6px 9px;
  flex: 0 0 auto;
}
body:has(.intro) main {
  min-width: 0;
  display: grid;
}
.intro, .intro[data-course="9"] {
  padding: clamp(26px,5svh,62px) 5vw clamp(320px,43svh,540px);
  text-align: center;
}
.intro::before { content: none; }
.intro h1, .intro[data-course="9"] h1 {
  max-width: 19ch;
  margin: 0 auto 22px;
  font: italic 750 clamp(30px,8vw,69px)/1.04 Georgia, serif;
  letter-spacing: -.035em;
  color: color-mix(in srgb,#fffcef 89%,var(--tone));
  text-shadow: 0 1px #fff9, 0 3px color-mix(in srgb,var(--tone),#2b2114 55%), 0 6px 15px #091119;
}
.intro[data-course="9"] .year { color: #e5fff1; }
.intro .primary, .intro[data-course="9"] .primary {
  color: #fffef5;
  border: 1px solid #f4cd85;
  background: linear-gradient(color-mix(in srgb,var(--tone) 82%,#e6ead7),color-mix(in srgb,var(--tone) 57%,#090f17));
  box-shadow: inset 0 1px 3px #fff5, 0 3px 0 #100f16, 0 0 20px #e8bb5b38;
}
body:has(.intro) nav, body:has(.intro[data-course="9"]) nav {
  margin-top: 0;
  background: linear-gradient(150deg,#e6eff36b,#203b4a80 42%,#071923d9);
}
body:has(.login) main { padding-top: clamp(30px,7svh,82px); }
.login {
  background: linear-gradient(143deg,#d9fff433,#0a292bbd 72%);
  border-color: #ffe4a68f;
  box-shadow: inset 0 1px 2px #f3f8dbac, 0 18px 44px #020e18a8;
}
.login h1 { font: italic 750 clamp(33px,8vw,50px)/1.1 Georgia, serif; }
@media (min-width: 650px) {
  body:has(.intro)::before, body:has(.login)::before {
    background-size: auto 100%;
    background-position: center top;
  }
}

/* Keep the login card above the calf's face on portrait screens. */
body:has(.login) main { padding-top: clamp(18px, 3svh, 32px); }
.login {
  max-width: 400px;
  padding: clamp(14px, 4vw, 22px);
}
.login h1 {
  margin: 0 0 12px;
  font-size: clamp(29px, 7vw, 44px);
}
.login form { gap: 8px; }
.login .primary { padding-block: 10px; }
