:root {
  --font-display: 'Fraunces', 'Palatino Linotype', 'Book Antiqua', serif;
  --font-ui: 'Nunito', 'Avenir Next', 'Segoe UI', sans-serif;
  --font-pixel: 'Silkscreen', 'Courier New', monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: #fff6e0;
  background: #4cabab;
  font: 600 15px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
main {
  position: relative;
  height: 100svh;
  min-height: 400px;
  overflow: hidden;
  background: linear-gradient(#8dd3c6, #469ca3);
}
#world, #scene, #labels { position: absolute; inset: 0; width: 100%; height: 100%; }
#scene { image-rendering: auto; touch-action: none; }
#scene:focus { outline: none; }
#labels { pointer-events: none; overflow: hidden; }

/* Invisible focusable 3D sign hit targets */
.sign {
  position: absolute;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  background: transparent;
  color: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}
.sign:hover, .sign:focus, .sign:focus-visible { outline: none; box-shadow: none; }

/* === 1. Pure Typographic Welcome Title Sequence (Zero Box!) === */
#welcomeOverlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px 24px 9vh;
  background: linear-gradient(to top, rgba(10, 34, 42, 0.56) 0%, rgba(10, 34, 42, 0.14) 45%, transparent 100%);
  transition: opacity 0.55s ease;
}
#welcomeOverlay.fade { opacity: 0; pointer-events: none; }
.welcome-type {
  text-align: center;
  max-width: 680px;
  animation: textRise 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.welcome-type h1 {
  margin: 0 0 22px;
  font: 700 clamp(32px, 5.2vw, 52px)/1.06 var(--font-display);
  font-variation-settings: "SOFT" 80, "WONK" 1;
  letter-spacing: -0.015em;
  color: #fff7e2;
  text-shadow: 0 3px 18px rgba(8, 28, 34, 0.55);
}
#beginBtn,
#portfolioDirectBtn,
.welcome-choice {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 264px;
  background: rgba(12, 38, 44, 0.34);
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255, 223, 131, 0.72);
  border-radius: 999px;
  color: #fff4d2;
  font: 700 17px/1.2 var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 22px;
  cursor: pointer;
  text-shadow: 0 2px 12px rgba(8, 28, 34, 0.65);
  transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
#beginBtn:hover,
#portfolioDirectBtn:hover,
.welcome-choice:hover {
  color: #ffffff;
  border-color: #ffffff;
  background: rgba(24, 68, 72, 0.58);
  transform: translateY(-2px);
}
body.intro-lock #topBar,
body.intro-lock #footBar,
body.intro-lock #voyage,
body.intro-lock #labels,
body.intro-lock #stick { opacity: 0; pointer-events: none; transition: opacity 0.45s ease; }

@keyframes textRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === 2. Whisper-Quiet Typographic Corner Navigation (No Chunky Button Rows) === */
#topBar {
  position: absolute;
  top: 16px;
  right: clamp(16px, 3vw, 36px);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}
.nav-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 2px;
  color: #fff6e0;
  font: 800 12.5px/1 var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-shadow: 0 1px 6px rgba(9, 30, 36, 0.72), 0 0 2px rgba(9, 30, 36, 0.55);
  transition: color 0.15s ease, transform 0.15s ease;
}
.nav-link:hover { color: #ffe08a; transform: translateY(-1px); }
.nav-link:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid #ffdf83; outline-offset: 4px; border-radius: 3px; }
.nav-sep { color: rgba(255, 246, 224, 0.45); font-size: 13px; text-shadow: 0 1px 4px rgba(9, 30, 36, 0.6); }

/* Room / Zone Breadcrumb (Clean floating text, top-left) */
#locationBar:not([hidden]) {
  position: absolute;
  top: 16px;
  left: clamp(16px, 3vw, 36px);
  z-index: 8;
  display: flex;
  align-items: baseline;
  gap: 14px;
  animation: textRise 0.35s ease both;
}
#locationBar strong {
  font: 700 22px/1 var(--font-display);
  color: #fff7e2;
  text-shadow: 0 2px 10px rgba(9, 30, 36, 0.68);
}
#locationBar button {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 232, 168, 0.65);
  color: #ffe394;
  font: 700 13px/1.2 var(--font-ui);
  padding: 2px 0;
  cursor: pointer;
  text-shadow: 0 1px 6px rgba(9, 30, 36, 0.7);
}
#locationBar button:hover { color: #ffffff; border-color: #ffffff; }
.in-room #labels, .in-room .foot-cam, .vista-mode #labels, .vista-mode .foot-cam { display: none; }
.arriving .foot-cam { display: none; }

/* === 3. Animated Kinetic Text Bar (Bench Time, Volleyball Score, Fishing) — NO Box! === */
.kinetic-bar:not([hidden]) {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px 10px;
  color: #fff7e2;
  text-shadow: 0 2px 12px rgba(8, 28, 34, 0.85), 0 0 3px rgba(8, 28, 34, 0.65);
  animation: textRise 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  max-width: 94vw;
}
.kinetic-bar strong { font: 700 19px/1.1 var(--font-display); color: #ffe49c; }
.kinetic-bar span { font: 700 14px/1.2 var(--font-ui); }
.kinetic-bar .meter-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.kinetic-bar button {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid rgba(255, 224, 138, 0.45);
  color: #fff6e0;
  font: 800 14px/1.2 var(--font-ui);
  padding: 5px 8px;
  cursor: pointer;
  text-shadow: 0 2px 10px rgba(8, 28, 34, 0.85);
  transition: color 0.15s, border-color 0.15s, transform 0.12s;
}
.kinetic-bar button:hover, .kinetic-bar button.active-word {
  color: #ffe08a;
  border-bottom-color: #ffe08a;
  transform: translateY(-1px);
}
.fish-meter {
  width: 96px;
  height: 6px;
  background: rgba(255, 246, 224, 0.25);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(8, 24, 28, 0.5);
}
.fish-meter i { display: block; height: 100%; background: #ffdf83; transition: width 0.04s linear; }
.fish-meter.tension i { background: #7ad696; }

/* === 4. Animated In-World Exhibit Caption (Glides In/Out Over 3D Room — ZERO Pop-Up Box!) === */
.world-caption:not([hidden]) {
  position: absolute;
  left: clamp(18px, 3.5vw, 44px);
  bottom: 70px;
  z-index: 12;
  width: min(440px, calc(100vw - 36px));
  padding: 12px 0 6px 16px;
  border-left: 3px solid #ffe08a;
  background: linear-gradient(to right, rgba(12, 34, 38, 0.72) 0%, rgba(12, 34, 38, 0.45) 75%, transparent 100%);
  color: #fff8e6;
  pointer-events: auto;
  animation: captionSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes captionSlide {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: translateX(0); }
}
.caption-eyebrow {
  font: 800 11px/1 var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffe08a;
  margin-bottom: 4px;
}
.world-caption h2 {
  margin: 0 0 6px;
  font: 700 25px/1.15 var(--font-display);
  color: #fffaf0;
  text-shadow: 0 2px 10px rgba(8, 24, 28, 0.65);
}
.world-caption p {
  margin: 0 0 10px;
  font: 600 14px/1.5 var(--font-ui);
  color: rgba(255, 248, 230, 0.92);
  text-shadow: 0 1px 6px rgba(8, 24, 28, 0.7);
}
.caption-media {
  margin: 8px 0 10px;
  max-width: 340px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(8, 24, 28, 0.45);
}
.caption-media img, .caption-media video { display: block; width: 100%; max-height: 200px; object-fit: cover; }
.caption-links { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 6px; }
.caption-links a, .caption-links button {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 1px solid #ffe08a;
  color: #ffe599;
  text-decoration: none;
  font: 800 13px/1.2 var(--font-ui);
  padding: 2px 0;
  cursor: pointer;
}
.caption-links a:hover, .caption-links button:hover { color: #ffffff; border-color: #ffffff; }
.caption-credits { max-height: 165px; overflow-y: auto; margin: 6px 0 8px; padding-right: 8px; }
.caption-credits div { font-size: 13px; padding: 3px 0; border-bottom: 1px solid rgba(255, 246, 224, 0.14); display: flex; justify-content: space-between; gap: 10px; }
.caption-credits span { color: rgba(255, 246, 224, 0.75); }

/* === 5. Animated Kinetic Achievement Callouts (Pure Text — Zero Boxed Toast Cards!) === */
#toastHost {
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.island-toast {
  text-align: center;
  color: #fff8e6;
  text-shadow: 0 2px 14px rgba(8, 28, 34, 0.88), 0 0 3px rgba(8, 28, 34, 0.7);
  animation: textRise 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.island-toast strong { display: block; font: 700 20px/1.15 var(--font-display); color: #ffe08a; }
.island-toast span { font: 600 13px/1.3 var(--font-ui); opacity: 0.92; }
.island-toast.out { opacity: 0; transform: translateY(-10px); }

/* === 6. Bottom Floating Action Prompt & Quiet Camera Controls === */
#footBar {
  position: absolute;
  bottom: 18px;
  left: clamp(16px, 3vw, 36px);
  right: clamp(16px, 3vw, 36px);
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.quiet-hint {
  font: 700 12px/1.2 var(--font-ui);
  color: rgba(255, 246, 224, 0.80);
  text-shadow: 0 1px 6px rgba(9, 30, 36, 0.75);
  justify-self: start;
}
.foot-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  pointer-events: auto;
}
.action-prompt {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid #ffe08a;
  color: #fff8e4;
  font: 700 17px/1.2 var(--font-display);
  padding: 4px 4px 5px;
  cursor: pointer;
  text-shadow: 0 2px 12px rgba(8, 28, 34, 0.85);
  animation: textRise 0.25s ease both;
  transition: color 0.15s, transform 0.15s;
}
.action-prompt:hover { color: #ffe08a; transform: translateY(-1px); }
.action-prompt.subtle { font: 800 14px/1.2 var(--font-ui); border-bottom-width: 1px; opacity: 0.92; }
.action-prompt:disabled { display: none; }
.foot-cam { justify-self: end; display: flex; align-items: center; gap: 8px; pointer-events: auto; }
#status {
  position: absolute;
  bottom: 58px;
  left: 50%;
  transform: translateX(-50%);
  font: 700 14px/1.3 var(--font-ui);
  color: #ffe49c;
  text-shadow: 0 2px 10px rgba(8, 28, 34, 0.85);
  pointer-events: none;
}
#status:empty { display: none; }

/* Bearing Arrow & Doorway Fade */
#voyage:not([hidden]) { position: absolute; z-index: 6; top: 31%; left: 50%; transform: translate(-50%, -50%); }
#bearing {
  width: 54px; height: 54px; line-height: 36px;
  font: 900 31px/1 system-ui; background: none; color: #ffdf83; border: 0; padding: 8px;
  cursor: pointer; text-shadow: 0 2px 4px rgba(18, 42, 40, 0.8);
}
#bearing span { display: block; }
#doorwayFade { position: absolute; inset: 0; pointer-events: none; background: #1e3d3c; opacity: 0; z-index: 20; }
.crossing #labels, .crossing #footBar { visibility: hidden; }

/* Photo Mode */
#photoBar:not([hidden]) {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 18;
  display: flex; align-items: center; gap: 12px;
}
.text-action {
  appearance: none; background: none; border: 0; border-bottom: 1px solid #ffe08a;
  color: #fff7e2; font: 800 14px var(--font-ui); padding: 4px 2px; cursor: pointer;
  text-shadow: 0 2px 10px rgba(8, 28, 34, 0.8);
}
body.photo-mode #topBar, body.photo-mode #footBar, body.photo-mode #labels,
body.photo-mode #voyage, body.photo-mode #stick, body.photo-mode #locationBar,
body.photo-mode #activityBar, body.photo-mode #worldCaption, body.photo-mode #mixPanel,
body.photo-mode #editorPanel { display: none !important; }

/* === 7. Handcrafted Woodgrain & Backlit Marquee Retro CRT Arcade Cabinet === */
.arcade-stage:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at center, rgba(16, 36, 39, 0.72), rgba(7, 18, 21, 0.88));
  animation: textRise 0.25s ease both;
}
.crt-cabinet {
  width: min(670px, 96vw);
  background:
    linear-gradient(90deg, #5d3b26 0px, #7b4e32 10px, #472b1a 16px, #213034 17px, #1b282b calc(100% - 17px), #472b1a calc(100% - 16px), #7b4e32 calc(100% - 10px), #5d3b26 100%);
  border: 3px solid #331e12;
  border-radius: 18px 18px 14px 14px;
  padding: 14px 26px 16px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.74), inset 0 2px 0 rgba(255, 226, 168, 0.22);
  color: #f7ebcf;
}
.crt-lightbox {
  background: linear-gradient(180deg, #ffe7a8 0%, #f4c167 48%, #d9694c 52%, #b94e38 100%);
  border: 3px solid #152124;
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 0 22px rgba(255, 214, 122, 0.34), inset 0 2px 6px rgba(255, 255, 255, 0.55);
}
.crt-brand {
  font: 700 clamp(13px, 2.2vw, 17px)/1 var(--font-pixel);
  color: #1c2e30;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(255, 245, 214, 0.85);
}
.crt-credit {
  font: 700 10px/1 var(--font-pixel);
  color: #fff5d8;
  background: #1b2a2e;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}
.crt-marquee {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.crt-tabs { display: flex; gap: 12px; flex-wrap: wrap; }
.crt-tabs button {
  appearance: none; background: rgba(13, 24, 26, 0.65); border: 1px solid rgba(255, 224, 138, 0.22);
  border-radius: 5px;
  color: rgba(247, 235, 207, 0.78); font: 700 11px/1.2 var(--font-pixel); padding: 6px 10px; cursor: pointer;
  transition: all 0.14s ease;
}
.crt-tabs button.active, .crt-tabs button:hover {
  color: #19292b; background: #ffe08a; border-color: #fff3c4;
  box-shadow: 0 0 12px rgba(255, 224, 138, 0.35);
}
.crt-exit {
  appearance: none; background: none; border: 0; border-bottom: 1px solid rgba(242, 162, 136, 0.6);
  color: #f4ad96; font: 700 11px var(--font-pixel); cursor: pointer; padding: 2px 0;
}
.crt-exit:hover { color: #ffffff; border-color: #ffffff; }
.crt-bezel {
  background: linear-gradient(145deg, #131c1e, #243336);
  padding: 10px;
  border-radius: 14px;
  border: 2px solid #0d1517;
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.75);
}
.crt-screen-wrap {
  position: relative;
  border: 3px solid #0c1315;
  border-radius: 12px;
  overflow: hidden;
  background: #142221;
  box-shadow: 0 0 24px rgba(102, 202, 190, 0.16);
}
.crt-screen-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.11) 0px, rgba(0, 0, 0, 0.11) 1px, transparent 2px, transparent 4px),
    radial-gradient(ellipse at center, transparent 58%, rgba(8, 16, 18, 0.42) 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 32%);
}
#agCanvas { display: block; width: 100%; height: auto; touch-action: none; }
.crt-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 9px 4px 8px;
  font: 700 12px/1.2 var(--font-ui);
  color: rgba(247, 235, 207, 0.88);
}
#agScore { font: 700 13px/1 var(--font-pixel); color: #ffe08a; }
.crt-deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #2b3f43 0%, #1d2c30 100%);
  border: 2px solid #131e20;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08);
}
.crt-stick-deco {
  display: flex;
  align-items: center;
  gap: 8px;
}
.crt-balltop {
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #ff9d82, #d44d38 68%, #7a2318);
  box-shadow: 0 4px 0 #10181a, 0 6px 10px rgba(0, 0, 0, 0.45);
}
.crt-led {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6ee29f;
  box-shadow: 0 0 8px #6ee29f;
}
.crt-controls { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.crt-controls button {
  appearance: none;
  background: linear-gradient(180deg, #f4e3bd, #d6bc8b);
  border: 2px solid #172326;
  border-radius: 999px;
  color: #1b2b2e;
  font: 700 10.5px/1 var(--font-pixel);
  padding: 8px 13px;
  cursor: pointer;
  box-shadow: 0 4px 0 #6e5838, 0 5px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.crt-controls button:active { transform: translateY(3px); box-shadow: 0 1px 0 #6e5838; }
.crt-controls button.btn-coral {
  background: linear-gradient(180deg, #f0866a, #c95239);
  color: #fff7e6;
  box-shadow: 0 4px 0 #6b2518, 0 5px 8px rgba(0, 0, 0, 0.35);
}
.crt-controls button.btn-teal {
  background: linear-gradient(180deg, #74bfb5, #438c84);
  color: #fff7e6;
  box-shadow: 0 4px 0 #214e4a, 0 5px 8px rgba(0, 0, 0, 0.35);
}

/* === 8. Frameless Editorial Slide-Over Sheet (ONLY for Full Resume / Credits Search / Log) === */
dialog.editorial-sheet {
  margin: 0 0 0 auto;
  height: 100svh;
  max-height: 100svh;
  width: min(560px, 100vw);
  max-width: 100vw;
  border: 0;
  border-left: 1px solid rgba(64, 52, 38, 0.18);
  border-radius: 0;
  padding: 0;
  background: #fbf6ea;
  color: #2f2a22;
  box-shadow: -14px 0 42px rgba(8, 28, 34, 0.28);
}
dialog.editorial-sheet::backdrop { background: rgba(12, 34, 38, 0.42); }
.sheet-bar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 26px 14px;
  background: rgba(251, 246, 234, 0.96);
  border-bottom: 1px solid rgba(64, 52, 38, 0.14);
  font: 700 16px var(--font-display);
  color: #1f4f4a;
}
.sheet-actions { display: flex; gap: 16px; }
.sheet-link {
  appearance: none; background: none; border: 0; border-bottom: 1px solid transparent;
  color: #21584f; font: 800 13px var(--font-ui); cursor: pointer; padding: 2px 0;
}
.sheet-link:hover { border-bottom-color: #21584f; }
.editorial-sheet article { padding: 20px 26px 40px; }
.editorial-sheet h2 { font: 700 29px/1.15 var(--font-display); margin: 0 0 10px; color: #1b3d3a; }
.editorial-sheet h3 { font: 700 17px var(--font-display); margin: 22px 0 6px; color: #21584f; }
.editorial-sheet p { margin: 6px 0 12px; color: #463d30; }
.editorial-sheet a { color: #1d5d54; font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(29, 93, 84, 0.35); }
.editorial-sheet a:hover { border-bottom-color: #1d5d54; }
.editorial-sheet figure { margin: 14px 0; }
.editorial-sheet figure img { width: 100%; max-width: 340px; display: block; border-radius: 4px; }
.credit { padding: 9px 0; border-top: 1px solid rgba(64, 52, 38, 0.12); display: grid; gap: 2px; }
.credit span { font-size: 13px; color: #665a47; }
.credit.done strong { color: #1d5d54; }
#lookup {
  display: block; width: 100%; padding: 8px 10px; margin: 6px 0 12px;
  border: 1px solid rgba(64, 52, 38, 0.28); border-radius: 4px; background: #fff; font: inherit;
}

/* === 9. Quiet Spatial Mix Bus Strip & Live Editor === */
#mixPanel:not([hidden]) {
  position: absolute;
  bottom: 58px;
  right: clamp(16px, 3vw, 36px);
  z-index: 14;
  width: min(290px, 90vw);
  padding: 12px 14px;
  background: rgba(14, 38, 42, 0.84);
  border-left: 3px solid #ffe08a;
  color: #fff6e0;
  animation: textRise 0.25s ease both;
}
#editorPanel:not([hidden]) {
  position: absolute;
  top: 56px;
  left: clamp(16px, 3vw, 36px);
  bottom: 64px;
  z-index: 16;
  width: min(340px, 90vw);
  background: #fbf6ea;
  color: #2f2a22;
  border-left: 3px solid #21584f;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(8, 28, 34, 0.35);
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 0 8px; margin-bottom: 8px; border-bottom: 1px solid rgba(255, 246, 224, 0.18);
  font: 700 15px var(--font-display); color: #ffe08a;
}
#editorPanel .panel-head { padding: 12px 14px 8px; margin: 0; color: #1f4f4a; border-bottom-color: rgba(64, 52, 38, 0.16); }
.panel-head button { appearance: none; background: none; border: 0; color: inherit; cursor: pointer; font: 800 12px var(--font-ui); }
.panel-body { overflow-y: auto; max-height: 55svh; }
#editorPanel .panel-body { padding: 10px 14px 16px; }
.bus-row { display: grid; grid-template-columns: 1fr 78px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 12px; }
.bus-meta label { display: block; margin-bottom: 3px; color: rgba(255, 246, 224, 0.9); }
.meter-track { height: 4px; background: rgba(255, 246, 224, 0.18); border-radius: 2px; overflow: hidden; }
.meter-bar { height: 100%; width: 0%; transition: width 0.05s linear; }
.ed-group { margin-bottom: 10px; }
.ed-group label { display: block; font-size: 12px; font-weight: 700; color: #1f4f4a; margin-bottom: 3px; }
.ed-group textarea { width: 100%; padding: 6px 8px; border: 1px solid rgba(64, 52, 38, 0.3); font: inherit; font-size: 13px; }
.ed-actions { display: flex; gap: 12px; margin-top: 8px; }
.ed-actions button { appearance: none; background: #21584f; color: #fff6e0; border: 0; padding: 6px 12px; border-radius: 3px; font: 800 13px var(--font-ui); cursor: pointer; }

/* Touch Stick */
#stick {
  display: none; touch-action: none; position: absolute; bottom: 72px; left: 18px;
  width: 79px; height: 79px; border-radius: 50%;
  border: 2px solid rgba(255, 240, 198, 0.75); background: rgba(20, 58, 60, 0.55); z-index: 8;
}
#stick i {
  display: block; width: 29px; height: 29px; margin: 23px;
  background: #ffe6ac; border: 2px solid #59442e; border-radius: 50%;
}
@media (pointer: coarse), (max-width: 720px) {
  #stick { display: block; }
  .quiet-hint { display: none; }
  #footBar { grid-template-columns: 1fr auto; }
  .world-caption:not([hidden]) { bottom: 158px; }
}
@media print {
  #topBar, #footBar, #world, #voyage, #stick, #activityBar, #worldCaption, #arcadeStage, #slalomBoard, #mixPanel, #editorPanel, #toastHost, #photoBar, #welcomeOverlay { display: none !important; }
  dialog.editorial-sheet { position: static; width: 100%; height: auto; max-height: none; box-shadow: none; border: 0; background: #fff; }
}

/* === 8. Coastal Arcade High-Score Board (Jet-Ski Slalom Run · 3-Letter Initials + Live Leaderboard) === */
.slalom-board:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at center, rgba(14, 46, 56, 0.62), rgba(7, 22, 30, 0.84));
  animation: textRise 0.24s ease both;
}
.sb-card {
  width: min(460px, 94vw);
  background: linear-gradient(180deg, #163740 0%, #0f272e 100%);
  border: 2px solid #e6bf6c;
  border-radius: 12px;
  padding: 20px 22px 18px;
  color: #fff6e0;
  box-shadow: 0 24px 60px rgba(4, 15, 22, 0.72), inset 0 1px 0 rgba(255, 234, 178, 0.22);
}
.sb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 1px solid rgba(255, 226, 150, 0.24); padding-bottom: 10px; margin-bottom: 12px; }
.sb-head h2 { margin: 0; font: 700 22px/1.1 var(--font-display); color: #ffe08a; }
.sb-badge { font: 700 10px/1 var(--font-pixel); color: #122c33; background: #7ad6a0; padding: 4px 7px; border-radius: 3px; letter-spacing: 0.05em; }
.sb-badge.local { background: #e8b964; }
.sb-stats { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 14px; padding: 10px 12px; background: rgba(6, 19, 24, 0.45); border-radius: 6px; }
.sb-stat { text-align: center; flex: 1; }
.sb-stat span { display: block; font: 700 11px/1.2 var(--font-ui); opacity: 0.75; text-transform: uppercase; letter-spacing: 0.06em; }
.sb-stat b { display: block; font: 700 19px/1.2 var(--font-pixel); color: #ffe49c; margin-top: 3px; }
.sb-form { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sb-input {
  width: 112px; text-align: center; text-transform: uppercase;
  font: 700 22px/1 var(--font-pixel); letter-spacing: 0.22em;
  background: #091a20; color: #ffe49c; border: 2px solid #e6bf6c; border-radius: 6px;
  padding: 8px 6px 8px 10px; outline: none;
}
.sb-input:focus { border-color: #7ad6a0; box-shadow: 0 0 0 3px rgba(122, 214, 160, 0.25); }
.sb-submit {
  flex: 1; appearance: none; background: #e6bf6c; color: #132c33; border: 0; border-radius: 6px;
  padding: 11px 14px; font: 700 13px/1 var(--font-pixel); cursor: pointer; transition: transform 0.12s, background 0.12s;
}
.sb-submit:hover { background: #ffe08a; transform: translateY(-1px); }
.sb-submit:disabled { opacity: 0.55; cursor: default; transform: none; }
.sb-msg { font: 700 12px/1.3 var(--font-ui); color: #7ad6a0; margin: -6px 0 10px; min-height: 16px; }
.sb-list { list-style: none; margin: 0 0 14px; padding: 0; max-height: 228px; overflow-y: auto; }
.sb-row {
  display: grid; grid-template-columns: 34px 66px 1fr auto; align-items: center; gap: 8px;
  padding: 6px 8px; border-bottom: 1px solid rgba(255, 240, 200, 0.1);
  font: 700 13px/1.2 var(--font-ui);
}
.sb-row.me { background: rgba(122, 214, 160, 0.18); border-radius: 4px; color: #ffe8a3; }
.sb-rank { font: 700 12px/1 var(--font-pixel); color: #e6bf6c; }
.sb-init { font: 700 14px/1 var(--font-pixel); letter-spacing: 0.08em; color: #fff8e4; }
.sb-meta { font-size: 11px; opacity: 0.78; }
.sb-pts { font: 700 14px/1 var(--font-pixel); color: #ffe08a; }
.sb-actions { display: flex; gap: 10px; }
.sb-btn {
  flex: 1; appearance: none; background: rgba(255, 244, 214, 0.12); color: #fff6e0;
  border: 1px solid rgba(255, 224, 138, 0.45); border-radius: 6px; padding: 10px 12px;
  font: 800 13px/1 var(--font-ui); cursor: pointer;
}
.sb-btn.primary { background: #3b8d83; border-color: #7ad6a0; }
.sb-btn:hover { filter: brightness(1.12); }

/* === 9. Stardew Valley-Style Vertical Fishing Bar UI === */
.fish-stardew:not([hidden]) {
  position: absolute;
  right: clamp(22px, 6vw, 76px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 19;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: textRise 0.2s ease both;
  user-select: none;
}
.fs-frame {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #8e5f3d 0%, #6b452a 100%);
  border: 3px solid #3c2414;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(6, 20, 26, 0.65), inset 0 2px 0 rgba(255, 224, 170, 0.35);
}
.fs-water {
  position: relative;
  width: 44px;
  height: 256px;
  background: linear-gradient(180deg, #2788b5 0%, #145478 55%, #0b2d47 100%);
  border: 2px solid #2b1a0f;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 0 14px rgba(4, 18, 30, 0.6);
}
.fs-zone {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 10%;
  height: 30%;
  background: linear-gradient(180deg, rgba(124, 232, 134, 0.92), rgba(74, 194, 96, 0.88));
  border: 2px solid #d9ffd8;
  border-radius: 5px;
  box-shadow: 0 0 12px rgba(102, 230, 128, 0.45);
  transition: opacity 0.08s, box-shadow 0.1s;
}
.fs-zone.miss {
  opacity: 0.46;
  box-shadow: none;
}
.fs-icon {
  position: absolute;
  left: 50%;
  bottom: 30%;
  transform: translate(-50%, 50%);
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(5, 18, 28, 0.85));
  pointer-events: none;
}
.fs-icon.jelly {
  filter: drop-shadow(0 0 10px #4cf0ff) drop-shadow(0 0 4px #b8fcff);
}
.fs-prog-track {
  position: relative;
  width: 14px;
  height: 256px;
  background: #1a2428;
  border: 2px solid #2b1a0f;
  border-radius: 6px;
  overflow: hidden;
}
.fs-prog-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(180deg, #ffe066 0%, #6ee29f 100%);
  transition: height 0.04s linear;
}
.fs-hint {
  font: 700 12px/1.2 var(--font-ui);
  color: #fff6e0;
  text-shadow: 0 2px 8px rgba(6, 20, 26, 0.9);
  background: rgba(14, 38, 44, 0.78);
  padding: 5px 10px;
  border-radius: 999px;
}

/* === 10. Minigame First-Try & View-Again How-To-Play Field Card === */
.howto-modal:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at center, rgba(14, 42, 48, 0.62), rgba(7, 20, 26, 0.84));
  animation: textRise 0.22s ease both;
}
.htp-card {
  width: min(440px, 92vw);
  background: linear-gradient(180deg, #fbf4e4 0%, #f1e4c8 100%);
  color: #243336;
  border: 3px solid #244a4d;
  border-radius: 14px;
  padding: 20px 22px 18px;
  box-shadow: 0 24px 60px rgba(6, 18, 24, 0.68);
}
.htp-eyebrow { font: 800 11px/1 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: #c45d42; margin-bottom: 4px; }
.htp-card h2 { margin: 0 0 10px; font: 700 24px/1.15 var(--font-display); color: #193f42; }
.htp-list { margin: 0 0 14px; padding-left: 18px; font: 700 14px/1.5 var(--font-ui); color: #2b3c40; }
.htp-list li { margin-bottom: 6px; }
.htp-tip {
  margin: 0 0 16px;
  padding: 9px 12px;
  background: rgba(33, 88, 79, 0.10);
  border-left: 3px solid #2a786e;
  border-radius: 4px;
  font: 700 13px/1.4 var(--font-ui);
  color: #1c4a46;
}
.htp-go {
  width: 100%;
  appearance: none;
  background: #21584f;
  color: #fff8e6;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font: 800 15px/1 var(--font-ui);
  cursor: pointer;
  transition: transform 0.12s, background 0.12s;
}
.htp-go:hover { background: #2c7065; transform: translateY(-1px); }

/* === 11. Welcome Choice Actions & Full-Bleed Editorial Portfolio / Resume View === */
.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 8px;
}
.welcome-secondary {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 1.5px solid rgba(255, 240, 200, 0.72);
  color: #fff5d8;
  font: 800 15px/1.2 var(--font-ui);
  letter-spacing: 0.04em;
  padding: 6px 2px 5px;
  cursor: pointer;
  text-shadow: 0 2px 12px rgba(7, 25, 32, 0.85);
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
}
.welcome-secondary:hover { color: #ffe08a; border-color: #ffe08a; transform: translateY(-1px); }

.portfolio-view:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow-y: auto;
  background: #f9f3e4;
  color: #1f2e30;
  animation: textRise 0.25s ease both;
}
.pv-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 48px) 72px;
}
.pv-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 16px;
  margin-bottom: 32px;
  background: rgba(249, 243, 228, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(29, 68, 70, 0.16);
}
.pv-brand { font: 700 20px/1 var(--font-display); color: #194547; }
.pv-brand span { font: 700 13px/1 var(--font-ui); color: #5f7072; margin-left: 6px; }
.pv-nav-actions { display: flex; gap: 10px; }
.pv-btn {
  appearance: none;
  background: transparent;
  color: #1b4a4b;
  border: 1.5px solid #1b4a4b;
  border-radius: 7px;
  padding: 9px 15px;
  font: 800 13px/1 var(--font-ui);
  cursor: pointer;
  transition: background 0.14s, transform 0.12s;
}
.pv-btn:hover { background: rgba(27, 74, 75, 0.08); transform: translateY(-1px); }
.pv-btn.primary { background: #1f5953; border-color: #1f5953; color: #fff7e4; }
.pv-btn.primary:hover { background: #276e66; }

.pv-hero {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 48px;
}
.pv-eyebrow { font: 800 12px/1.2 var(--font-ui); text-transform: uppercase; letter-spacing: 0.12em; color: #c45d42; margin-bottom: 10px; }
.pv-hero h1 { margin: 0 0 14px; font: 700 clamp(34px, 5vw, 52px)/1.06 var(--font-display); color: #163b3e; }
.pv-lead { margin: 0 0 20px; font: 600 17px/1.6 var(--font-ui); color: #35474a; }
.pv-links { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.pv-links a, .pv-card-link a {
  color: #1f5953;
  font: 800 14px/1.2 var(--font-ui);
  text-decoration: none;
  border-bottom: 1.5px solid #c98657;
  padding-bottom: 2px;
}
.pv-links a:hover, .pv-card-link a:hover { color: #c45d42; }
.pv-portrait { margin: 0; }
.pv-portrait img {
  width: 100%;
  border-radius: 14px;
  border: 3px solid #244a4d;
  box-shadow: 0 18px 42px rgba(20, 46, 48, 0.18);
  display: block;
}
.pv-portrait figcaption { margin-top: 8px; font: 700 12px/1.3 var(--font-ui); color: #5b6e70; text-align: center; }

.pv-section { margin-bottom: 48px; }
.pv-sec-title { margin: 0 0 18px; font: 700 26px/1.15 var(--font-display); color: #163b3e; border-bottom: 1.5px solid rgba(22, 59, 62, 0.14); padding-bottom: 8px; }
.pv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.pv-card {
  background: #fffcf4;
  border: 1.5px solid rgba(31, 74, 75, 0.18);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 26px rgba(24, 52, 54, 0.08);
}
.pv-card-img { aspect-ratio: 2 / 1; background: #0e1a1e; overflow: hidden; }
.pv-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.pv-card-tag { font: 800 11px/1.2 var(--font-ui); text-transform: uppercase; letter-spacing: 0.08em; color: #c45d42; margin-bottom: 4px; }
.pv-card-body h3 { margin: 0 0 6px; font: 700 19px/1.2 var(--font-display); color: #183d40; }
.pv-card-body p { margin: 0 0 12px; font: 600 14px/1.45 var(--font-ui); color: #3c4f52; flex: 1; }

.pv-video-wrap { max-width: 720px; border-radius: 12px; overflow: hidden; border: 2px solid #244a4d; background: #102427; box-shadow: 0 14px 36px rgba(16, 36, 39, 0.2); }
.pv-video-wrap video { width: 100%; display: block; }

.pv-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 26px; }
.pv-col { background: #fffcf4; border: 1.5px solid rgba(31, 74, 75, 0.15); border-radius: 12px; padding: 18px 20px; }
.pv-col h3 { margin: 0 0 6px; font: 700 20px/1.2 var(--font-display); color: #194547; }
.pv-col-lead { margin: 0 0 14px; font: 600 13px/1.45 var(--font-ui); color: #54696b; }
.pv-item { padding: 8px 0; border-top: 1px solid rgba(31, 74, 75, 0.1); }
.pv-item strong { display: block; font: 800 14px/1.3 var(--font-ui); color: #1e3b3e; }
.pv-item p { margin: 3px 0 0; font: 600 13px/1.45 var(--font-ui); color: #435659; }

.pv-credits-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pv-credits-head .pv-sec-title { margin: 0; border: 0; padding: 0; }
.pv-search {
  width: min(300px, 100%);
  padding: 9px 12px;
  border: 1.5px solid rgba(31, 74, 75, 0.35);
  border-radius: 8px;
  background: #fffdf7;
  font: 700 14px/1.2 var(--font-ui);
  color: #1f2e30;
}
.pv-credits-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px 16px; }
.pv-credits-grid .credit { background: #fffcf4; border: 1px solid rgba(31, 74, 75, 0.14); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.pv-credits-grid .credit strong { font: 800 14px/1.25 var(--font-ui); color: #193d40; }
.pv-credits-grid .credit span { font: 600 13px/1.35 var(--font-ui); color: #465b5e; }
.pv-credits-grid .credit a { margin-top: 3px; font: 800 12px/1.2 var(--font-ui); color: #c45d42; text-decoration: none; align-self: flex-start; border-bottom: 1px solid rgba(196, 93, 66, 0.45); }
.pv-edu { margin: -8px 0 18px; font: 700 13px/1.45 var(--font-ui); color: #485e61; }
.pv-tools { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(31, 74, 75, 0.12); font: 800 12px/1.4 var(--font-ui); color: #24605a; letter-spacing: 0.01em; }

.cred-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-bottom: 18px; }
.cred-controls.compact { margin-bottom: 12px; }
.cred-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.cred-tab {
  appearance: none;
  background: rgba(31, 74, 75, 0.07);
  color: #1e4749;
  border: 1px solid rgba(31, 74, 75, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  font: 800 12px/1.1 var(--font-ui);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.cred-tab:hover { background: rgba(31, 74, 75, 0.15); }
.cred-tab.active { background: #1f5953; border-color: #1f5953; color: #fff8e6; }
.cred-cat-group { margin-bottom: 22px; }
.cred-cat-head {
  margin: 0 0 10px;
  font: 700 17px/1.2 var(--font-display);
  color: #1b4a4c;
  border-bottom: 1px solid rgba(31, 74, 75, 0.14);
  padding-bottom: 5px;
}
.cred-cat-head span { font: 700 13px/1 var(--font-ui); color: #677d80; }
.cred-grid.compact { display: flex; flex-direction: column; gap: 6px; }
.cred-empty { font: 700 14px/1.4 var(--font-ui); color: #5f7275; }

/* === Proof Wall Triptych Strip & Upcoming Cards === */
.triptych-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.triptych-strip a, .triptych-strip .triptych-card { display: flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none; color: #ffe49c; font: 800 11px/1.2 var(--font-ui); }
.triptych-strip img { width: 100%; border-radius: 6px; border: 1.5px solid rgba(255, 224, 156, 0.45); display: block; }
.pv-upcoming-card .pv-card-body { padding: 12px 16px 14px; }
.pv-upcoming-card h3 { margin: 0; }
.sb-run-score { margin: 0 0 12px; font: 700 14px/1.3 var(--font-ui); color: #ffe49c; }

/* === Playable Eurorack 6U Modular Synth Wall & Groovebox === */
.synth-stage:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 36;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: radial-gradient(circle at center, rgba(12, 22, 28, 0.80), rgba(5, 10, 14, 0.94));
  animation: textRise 0.2s ease both;
}
.eu-case {
  width: min(1040px, 97vw);
  max-height: 95vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #1b2126 0%, #11161a 100%);
  color: #f4ead2;
  border: 6px solid #593b24;
  border-radius: 14px;
  padding: 14px 16px 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), inset 0 0 0 2px #8a6443;
}
.eu-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 2px solid #2d3840; }
.eu-badge { display: inline-block; font: 800 9px/1 var(--font-pixel); letter-spacing: 0.14em; color: #ff9c54; margin-bottom: 3px; }
.eu-brand h2 { margin: 0; font: 700 20px/1.1 var(--font-display); color: #fff6df; }
.eu-transport { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eu-tbtn { appearance: none; background: #26363a; color: #e8f4f0; border: 1.5px solid #4e6c70; border-radius: 6px; padding: 7px 13px; font: 800 11px/1 var(--font-pixel); cursor: pointer; }
.eu-tbtn.running { background: #e85a42; border-color: #ffe08a; color: #fff; box-shadow: 0 0 14px rgba(232, 90, 66, 0.55); }
.eu-bpm { display: flex; align-items: center; gap: 6px; font: 800 11px/1 var(--font-ui); color: #c8d8dc; background: #141a1e; border: 1px solid #2e3c44; border-radius: 6px; padding: 5px 8px; }
.eu-bpm b { color: #6ee29f; font-family: var(--font-pixel); min-width: 28px; text-align: right; }
.eu-bpm input { width: 76px; accent-color: #6ee29f; }
.eu-presets { display: flex; flex-wrap: wrap; gap: 4px; }
.eu-pbtn { appearance: none; background: #212b30; color: #cbd8dc; border: 1px solid #3c4c54; border-radius: 5px; padding: 5px 8px; font: 800 10px/1 var(--font-ui); cursor: pointer; }
.eu-pbtn.active { background: #6ee29f; color: #102420; border-color: #6ee29f; }
.eu-pbtn.alt { background: #2e2926; border-color: #6b523e; color: #ffe0a8; }
.synth-close { appearance: none; background: rgba(255, 240, 200, 0.1); color: #ffe8b0; border: 1px solid rgba(255, 224, 156, 0.35); border-radius: 6px; padding: 7px 12px; font: 800 13px/1 var(--font-ui); cursor: pointer; }

/* Authentic Eurorack Aluminum Rails & Faceplate Modules */
.eu-rail-row {
  position: relative;
  display: grid;
  grid-template-columns: 1.10fr 1.22fr 1.68fr 0.90fr 0.95fr;
  gap: 5px;
  padding: 9px 6px;
  margin-bottom: 10px;
  background: #0a0e10;
  border-top: 5px solid #8a959c;
  border-bottom: 5px solid #8a959c;
  border-radius: 4px;
}
.eu-cable-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; overflow: visible; }
.eu-mod {
  position: relative;
  padding: 16px 9px 10px;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.55);
}
.eu-mod.silver { background: linear-gradient(180deg, #d3d9dc 0%, #b7c0c5 100%); color: #1a2126; }
.eu-mod.dark { background: linear-gradient(180deg, #273036 0%, #1b2227 100%); color: #e8eef0; }
.eu-mod.scope { background: linear-gradient(180deg, #1f282d 0%, #151b1f 100%); color: #e8eef0; }
.eu-sc { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f0f4f6, #626c72); border: 1px solid #2b3236; }
.eu-sc.tl { top: 4px; left: 4px; } .eu-sc.tr { top: 4px; right: 4px; }
.eu-sc.bl { bottom: 4px; left: 4px; } .eu-sc.br { bottom: 4px; right: 4px; }
.eu-mhead { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5px solid currentColor; padding-bottom: 3px; opacity: 0.92; }
.eu-mhead span { font: 800 10px/1 var(--font-pixel); letter-spacing: 0.05em; }
.eu-mhead em { font: 800 9px/1 var(--font-ui); font-style: normal; opacity: 0.7; }
.eu-waves { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.sw-btn { appearance: none; background: #222a2f; color: #d8e2e6; border: 1px solid #495760; border-radius: 3px; padding: 4px 2px; font: 700 9px/1 var(--font-pixel); cursor: pointer; }
.sw-btn.active { background: #e85a42; color: #fff; border-color: #ffb88a; }
.eu-knobs { display: flex; justify-content: space-around; align-items: flex-start; gap: 4px; flex-wrap: wrap; }
.eu-knob-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 52px; user-select: none; }
.eu-knob-dial {
  position: relative;
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, #4e5a62, #151b1f 74%);
  border: 2px solid #0b0f12;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5), inset 0 1px 1.5px rgba(255, 255, 255, 0.28);
  transform: rotate(var(--ang, 0deg));
  cursor: ns-resize;
  touch-action: none;
  transition: box-shadow 0.12s;
}
.eu-env-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.eu-etab { appearance: none; background: #222a2f; color: #d0dce0; border: 1px solid #495760; border-radius: 3px; padding: 3px 2px; font: 800 8.5px/1 var(--font-pixel); cursor: pointer; }
.eu-etab.active { background: #266c5e; color: #fff; border-color: #6ee29f; }
.eu-knob-dial:hover, .eu-knob-dial.dragging {
  box-shadow: 0 0 0 2.5px #ff9c54, 0 4px 10px rgba(0, 0, 0, 0.55), inset 0 1px 1.5px rgba(255, 255, 255, 0.35);
}
.eu-knob-dial span { position: absolute; left: 50%; top: 4px; width: 3px; height: 14px; margin-left: -1.5px; background: #fff6dc; border-radius: 2px; pointer-events: none; }
.eu-klabel { font: 800 8.5px/1 var(--font-ui); letter-spacing: 0.06em; opacity: 0.88; }
.eu-kval { font: 700 8.5px/1 var(--font-pixel); color: #e85a42; }
.eu-mod.dark .eu-kval { color: #6ee29f; }
.eu-jacks { display: flex; justify-content: space-around; gap: 4px; padding-top: 4px; border-top: 1px dashed rgba(128, 128, 128, 0.35); }
.eu-jack { appearance: none; background: transparent; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; color: inherit; }
.eu-jack i {
  display: block; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle, #090c0e 38%, #8f9ba2 44%, #dce4e8 68%, #525c62 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s;
}
.eu-jack:hover i { transform: scale(1.12); }
.eu-jack.patched i { box-shadow: 0 0 0 2px #6ee29f, 0 0 8px rgba(110, 226, 159, 0.65); }
.eu-jack span { font: 800 8px/1 var(--font-ui); letter-spacing: 0.04em; }
.eu-patch-legend { font: 700 10px/1.25 var(--font-ui); color: #9eb6bc; text-align: center; background: rgba(0, 0, 0, 0.28); padding: 5px; border-radius: 4px; }
.eu-mod.scope canvas { width: 100%; height: 96px; border-radius: 5px; border: 2px solid #0c1214; display: block; }

/* Row 2: 16-Step Groovebox Sequencer & Analog Drum Grid */
.eu-seq-panel {
  position: relative;
  background: linear-gradient(180deg, #21292e 0%, #171d21 100%);
  border-top: 4px solid #8a959c;
  border-bottom: 4px solid #8a959c;
  border-radius: 4px;
  padding: 10px 12px 10px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.eu-sec-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  margin-bottom: 2px;
  border-bottom: 1px solid #303d45;
}
.eu-sec-group { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.eu-sec-lbl { font: 800 9px/1 var(--font-pixel); color: #9db6be; margin-right: 4px; }
.eu-sec-btn {
  appearance: none; background: #151c20; color: #b8ccd2; border: 1.5px solid #3c4d56;
  border-radius: 5px; padding: 4px 10px; font: 800 10px/1 var(--font-pixel); cursor: pointer;
}
.eu-sec-btn.active { background: #ff9c54; color: #161412; border-color: #ffe09a; }
.eu-sec-btn.playing-sec { box-shadow: 0 0 0 2px #6ee29f; }
.eu-sec-btn.chain-on { background: #266c5e; color: #eafff6; border-color: #6ee29f; }
.eu-seq-row { display: grid; grid-template-columns: 205px 1fr; align-items: center; gap: 8px; }
.eu-track-ctrl { display: flex; align-items: center; gap: 5px; }
.eu-track-lbl { font: 800 9px/1 var(--font-pixel); color: #d8e2e4; letter-spacing: 0.04em; min-width: 44px; }
.eu-seq-row.mel .eu-track-lbl { color: #ffcf6e; }
.eu-seq-row.bass .eu-track-lbl { color: #58c4ff; }
.eu-seq-row.pad .eu-track-lbl { color: #d48cff; }
.eu-mute {
  appearance: none; width: 19px; height: 19px; border-radius: 3px; border: 1px solid #485962;
  background: #222c32; color: #9db4bc; font: 800 9px/1 var(--font-pixel); cursor: pointer; padding: 0;
}
.eu-mute.muted { background: #a83a32; color: #fff; border-color: #ff8e82; }
.eu-mini-mix { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.eu-mini-line { display: flex; align-items: center; gap: 3px; font: 800 7.5px/1 var(--font-ui); color: #92aab2; }
.eu-mini-line span { min-width: 20px; }
.eu-mini-line input { width: 54px; height: 8px; accent-color: #6ee29f; cursor: pointer; }
.eu-mini-line input.tone { accent-color: #ff9c54; }
.eu-wave-mini {
  appearance: none; background: #182026; color: #d8e6ea; border: 1px solid #3c4d56;
  border-radius: 3px; padding: 2px 4px; font: 700 8px/1 var(--font-pixel); cursor: pointer;
}
.eu-step.bass.on { background: #267cb8; color: #fff; border-color: #72e0ff; }
.eu-step.pad.on { background: #7a42a8; color: #fff; border-color: #e4b4ff; }
.eu-step-grid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; }
.eu-step {
  appearance: none;
  height: 24px;
  border-radius: 3px;
  border: 1px solid #35434a;
  background: #141a1e;
  color: #7d9198;
  font: 700 9px/1 var(--font-pixel);
  cursor: pointer;
  padding: 0;
  transition: transform 0.06s, background 0.08s;
}
.eu-step.beat { border-color: #546670; background: #1c2429; }
.eu-step.mel.on { background: #f2b852; color: #1e160c; border-color: #ffe9a8; }
.eu-step.kick.on { background: #e85a42; border-color: #ffa896; }
.eu-step.snare.on { background: #52c4ff; border-color: #a8e4ff; }
.eu-step.hat.on { background: #6ee29f; border-color: #b8f5d2; }
.eu-step.clap.on { background: #c278ff; border-color: #e4bdff; }
.eu-step.now { box-shadow: 0 0 0 2px #fff, 0 0 10px rgba(255, 255, 255, 0.75); transform: scale(1.06); }

.synth-keys {
  position: relative;
  height: 112px;
  padding: 5px 5px 6px;
  margin-bottom: 7px;
  background: linear-gradient(180deg, #0c1114 0%, #161d21 100%);
  border: 1.5px solid #2b383e;
  border-radius: 8px;
  box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  user-select: none;
}
.synth-felt {
  position: absolute;
  top: 4px;
  left: 5px;
  right: 5px;
  height: 4px;
  background: linear-gradient(90deg, #7e1c24 0%, #b52a34 50%, #7e1c24 100%);
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.synth-white-row {
  display: flex;
  gap: 2px;
  width: 100%;
  height: 100%;
}
.skey {
  appearance: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 7px;
  gap: 2px;
  font: 800 10px/1 var(--font-ui);
  transition: transform 0.05s ease, box-shadow 0.06s ease, filter 0.06s ease;
}
.skey.white {
  flex: 1;
  height: 100%;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #e7e1d4 0%, #fdfbf5 14%, #f4efe2 86%, #dfd5be 100%);
  color: #203134;
  border: 1px solid #5c574d;
  border-top: 0;
  box-shadow: inset 0 -5px 0 rgba(162, 148, 122, 0.55), inset 1px 0 0 rgba(255, 255, 255, 0.75), 0 2px 3px rgba(0, 0, 0, 0.45);
}
.skey.white:hover { background: linear-gradient(180deg, #f2ede2 0%, #ffffff 16%, #faf6eb 88%, #e6ddc8 100%); }
.skey.white.active {
  transform: translateY(2px);
  background: linear-gradient(180deg, #d8f8e8 0%, #c8f3df 100%);
  box-shadow: inset 0 -1px 0 rgba(90, 140, 118, 0.4), inset 0 0 12px rgba(72, 212, 148, 0.55);
}
.skey.black {
  position: absolute;
  top: 5px;
  transform: translateX(-50%);
  width: 7.4%;
  height: 61%;
  z-index: 3;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(180deg, #353f46 0%, #1d2328 18%, #101417 82%, #293138 100%);
  color: #ffe299;
  border: 1px solid #06080a;
  border-top: 0;
  padding-bottom: 6px;
  box-shadow: inset 0 -5px 0 rgba(255, 255, 255, 0.08), inset 1px 0 0 rgba(255, 255, 255, 0.14), 0 4px 7px rgba(0, 0, 0, 0.72);
}
.skey.black:hover { filter: brightness(1.16); }
.skey.black.active {
  transform: translateX(-50%) translateY(2px);
  background: linear-gradient(180deg, #255a4a 0%, #15382e 100%);
  box-shadow: inset 0 0 10px rgba(110, 226, 159, 0.65), 0 2px 3px rgba(0, 0, 0, 0.6);
}
.skey em { font-style: normal; font-size: 8px; opacity: 0.65; }
.synth-foot { text-align: center; font: 700 11px/1.3 var(--font-ui); color: #b9c9cc; }
@media (max-width: 820px) { .eu-rail-row { grid-template-columns: repeat(2, 1fr); } }

/* === Film & TV Credit Format Badges (TV Series / Feature / Short) === */
.cred-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  font: 800 10px/1 var(--font-ui);
  font-style: normal;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.cred-badge.tv    { background: #d6eef4; color: #164f5e; border: 1px solid #96cddb; }
.cred-badge.feat  { background: #f8e3cc; color: #7a3e16; border: 1px solid #e0b484; }
.cred-badge.short { background: #e2eedd; color: #2b5c34; border: 1px solid #a8cca2; }

/* === Curated 4-Section Blender Bomb Museum Exhibition Sheets === */
.pv-mini-logo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; margin-bottom: 10px; border: 1.5px solid rgba(31, 74, 75, 0.22); display: block; }
.gal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1.5px solid rgba(31, 74, 75, 0.16); }
.gal-head img { width: 78px; height: 46px; object-fit: cover; border-radius: 7px; border: 1.5px solid #244a4d; flex-shrink: 0; }
.gal-head h2 { margin: 0 0 4px; }
.gal-note { margin: 0; font: 600 13px/1.45 var(--font-ui); color: #435759; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 12px; }
.gal-item { margin: 0; background: #fffcf4; border: 1px solid rgba(31, 74, 75, 0.18); border-radius: 9px; overflow: hidden; }
.gal-item img { width: 100%; max-height: 240px; object-fit: contain; background: #0d1419; display: block; transition: transform 0.18s; }
.gal-item a:hover img { transform: scale(1.04); }
.gal-item figcaption { padding: 7px 9px; font: 800 12px/1.2 var(--font-ui); color: #193e40; text-align: center; }
.freq-player { background: #0e161d; border-radius: 10px; overflow: hidden; border: 2px solid #244a4d; margin-bottom: 12px; }
.freq-player video { width: 100%; max-height: 320px; background: #070b10; display: block; }
.freq-now { padding: 10px 14px; display: flex; flex-direction: column; gap: 3px; color: #f4ead2; }
.freq-now strong { font: 700 17px/1.15 var(--font-display); color: #ffe49c; }
.freq-now span { font: 600 13px/1.35 var(--font-ui); color: #c4d6da; }
.freq-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.freq-thumb { appearance: none; padding: 0; background: #142028; color: #e8eef0; border: 2px solid transparent; border-radius: 7px; overflow: hidden; cursor: pointer; text-align: center; transition: border-color 0.14s, transform 0.12s; }
.freq-thumb:hover { transform: translateY(-1px); border-color: rgba(114, 230, 255, 0.55); }
.freq-thumb.active { border-color: #6ee29f; }
.freq-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.freq-thumb span { display: block; padding: 5px 4px; font: 800 11px/1.15 var(--font-ui); }

@media (max-width: 760px) {
  .pv-hero { grid-template-columns: 1fr; }
}
@media print {
  .portfolio-view:not([hidden]) { position: static; overflow: visible; background: #fff; }
  .pv-nav-actions, .pv-search { display: none !important; }
}

/* === 12. Edge-Style Endless Coastal Surfing Minigame Overlay === */
.surf-stage:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 23;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: radial-gradient(circle at center, rgba(11, 48, 66, 0.72), rgba(5, 22, 34, 0.90));
  animation: textRise 0.22s ease both;
}
.surf-cabinet {
  width: min(760px, 96vw);
  background: linear-gradient(180deg, #123c4d 0%, #0b2836 100%);
  border: 3px solid #e6bf6c;
  border-radius: 14px;
  padding: 12px 14px 10px;
  box-shadow: 0 26px 64px rgba(4, 15, 24, 0.75);
  color: #fff6e0;
}
.surf-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.surf-title { font: 700 20px/1 var(--font-display); color: #ffe08a; }
.surf-hud { display: flex; align-items: center; gap: 14px; font: 700 13px/1 var(--font-pixel); }
.surf-hearts { color: #ff6e7e; letter-spacing: 0.06em; }
.surf-bolts { color: #ffe066; }
.surf-top-btns { display: flex; gap: 10px; }
.surf-link {
  appearance: none; background: rgba(255, 244, 214, 0.12); color: #fff6e0;
  border: 1px solid rgba(255, 224, 138, 0.45); border-radius: 5px; padding: 6px 10px;
  font: 800 12px/1 var(--font-ui); cursor: pointer;
}
.surf-link:hover { background: rgba(255, 224, 138, 0.24); }
.surf-stage-wrap { position: relative; border-radius: 8px; overflow: hidden; border: 2px solid #081e29; background: #146e9e; }
#surfCanvas { width: 100%; height: auto; display: block; touch-action: none; }
.surf-over:not([hidden]) {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(7, 25, 36, 0.76);
}
.surf-over-card {
  width: min(340px, 88%); background: #123644; border: 2px solid #e6bf6c; border-radius: 10px;
  padding: 18px; text-align: center; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}
.surf-over-card h3 { margin: 0 0 8px; font: 700 24px/1 var(--font-display); color: #ffe08a; }
.surf-over-card p { margin: 0 0 14px; font: 700 14px/1.3 var(--font-ui); }
.surf-over-btns { display: flex; flex-direction: column; gap: 8px; }
.surf-foot { margin-top: 8px; text-align: center; font: 700 12px/1.2 var(--font-ui); opacity: 0.82; }
