/* =========================================================
   32202.design — styles
   Home: centered red menu over the sunset sky.
   Design: project pages that scroll, banded 90s layout.
   Art: the piece fills the screen behind the Directory.
   --u = one pixel of the 2000-wide 16:9 mockup.
   ========================================================= */

@font-face { font-family: "Jost"; src: url("../fonts/jost-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Roboto Slab"; src: url("../fonts/roboto-slab-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Roboto Slab"; src: url("../fonts/roboto-slab-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --u: calc(min(100vw, 177.78vh) / 2000);

  --ink:     #000000;
  --active:  #2F3EF7;   /* selected tab (mockup blue) */
  --select:  #000080;   /* Win95 selection */
  --panel:   #EFEFF0;   /* mockup window grey */
  --face:    #C0C0C0;   /* Win95 button face */
  --muted:   #4A4A55;
  --sans:    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ui95:    Arial, "Helvetica Neue", Helvetica, sans-serif;

  /* Win95 bevels */
  --raised: inset -1px -1px #0A0A0A, inset 1px 1px #FFFFFF, inset -2px -2px #808080, inset 2px 2px #DFDFDF;
  --pressed: inset 1px 1px #0A0A0A, inset -1px -1px #FFFFFF, inset 2px 2px #808080, inset -2px -2px #DFDFDF;
  --sunken: inset 1px 1px #808080, inset -1px -1px #FFFFFF, inset 2px 2px #0A0A0A, inset -2px -2px #DFDFDF;
  --sunken-thin: inset 1px 1px #808080, inset -1px -1px #FFFFFF;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: #120A20; }
body {
  margin: 0;
  min-height: 100vh;
  background: #120A20;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px dotted currentColor; outline-offset: 2px; }

.futura { font-family: Futura, "Futura PT", "Jost", "Century Gothic", sans-serif; font-weight: 700; }
.slab { font-family: "Roboto Slab", Rockwell, Georgia, serif; font-weight: 400; }

/* ---------- Win95 scrollbars ---------- */

::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track {
  background-color: #DFDFDF;
  background-image: repeating-conic-gradient(#C0C0C0 0% 25%, #FFFFFF 0% 50%);
  background-size: 2px 2px;
}
::-webkit-scrollbar-thumb { background: var(--face); box-shadow: var(--raised); }
::-webkit-scrollbar-corner { background: var(--face); }
::-webkit-scrollbar-button:single-button {
  display: block;
  width: 16px;
  height: 16px;
  background-color: var(--face);
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: var(--raised);
}
::-webkit-scrollbar-button:single-button:active { box-shadow: var(--pressed); background-position: calc(50% + 1px) calc(50% + 1px); }
::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M3 0h1v1h1v1h1v1h1v1H0V3h1V2h1V1h1z'/%3E%3C/svg%3E");
}
::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h7v1H6v1H5v1H4v1H3V3H2V2H1V1H0z'/%3E%3C/svg%3E");
}
@supports not selector(::-webkit-scrollbar) {
  html, .lists { scrollbar-color: var(--face) #DFDFDF; }
}

/* ---------- Backgrounds ---------- */

#sky, .artbg, .dbg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  transition: opacity 0.6s ease;
}
#sky { display: block; }
.sky-off #sky, .no-webgl #sky { opacity: 0; }
.no-webgl body[data-mode="home"], .no-webgl body[data-mode="sky"] {
  background: linear-gradient(180deg, #120A20 0%, #2E1338 55%, #5A2740 100%);
}

.artbg { opacity: 0; pointer-events: none; background: #000; overflow: hidden; }
[data-mode="art"] .artbg { opacity: 1; }
.art-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease; }
.art-layer.on { opacity: 1; }
/* the same image, blurred, fills whatever the piece itself doesn't cover */
.art-fill {
  position: absolute;
  inset: -6%;
  background-size: cover;
  background-position: center;
  filter: blur(42px) saturate(1.15) brightness(0.72);
}
.art-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; }

.dbg { opacity: 0; pointer-events: none; }
[data-mode="design"] .dbg { opacity: 1; }

/* ---------- Shared window pieces ---------- */

.window {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  box-shadow: var(--raised);
}
.titlebar {
  display: flex;
  flex: none;
  border: 1px solid #000;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  height: max(26px, calc(37 * var(--u)));
  font-size: max(12px, calc(19 * var(--u)));
}
.titlebar > span { display: flex; align-items: center; white-space: nowrap; }
.t-dir { background: #FFF; color: #000; padding: 0 calc(10 * var(--u)) 0 calc(15 * var(--u)); }
.t-num { background: #000; color: #FFF; padding: 0 calc(15 * var(--u)); }
.t-grad { flex: 1; background: linear-gradient(90deg, #FFFFFF 0%, #2A2627 100%); }

.brand {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: calc(47.5 * var(--u));
}
.logo { display: block; width: calc(248 * var(--u)); min-width: 128px; }
.logo img { width: 100%; height: auto; }
.logo img, .jae { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)); }
.on-light .logo img, .on-light .jae { filter: none; }
.jae { width: max(18px, calc(27 * var(--u))); height: auto; margin-bottom: calc(1 * var(--u)); }

.icons { display: flex; gap: 16px; }
.icon {
  display: block;
  width: 80px;
  height: 80px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.icon img { width: 100%; height: 100%; image-rendering: pixelated; }
.icon:active img { transform: translate(2px, 2px); }

/* ---------- Home ---------- */

.home {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  justify-content: center;
  align-content: start;
  padding: 32px 16px 0;
  overflow: hidden;
  overflow: clip;
}
body:not([data-mode="home"]) .home { display: none; }
.home-col { width: min(440px, 92vw); }
.home .brand { margin-bottom: 18px; }
.home .logo { width: 42%; min-width: 150px; }
.home .jae { width: 22px; }

.win-red {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: max(420px, calc(100svh - 140px));
  padding: 12px 12px 20px;
  background: #FF0000;
  box-shadow: inset 1px 0 #FF9C9C, inset -1px 0 #3D0000, inset 0 1px #FF9C9C, inset 2px 0 #FF5B5B, inset -2px 0 #9E0000, inset 0 2px #FF5B5B;
}
/* the red keeps going past the fold, however far the page is stretched */
.win-red::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 200vh;
  background: #FF0000;
  box-shadow: inset 1px 0 #FF9C9C, inset -1px 0 #3D0000, inset 2px 0 #FF5B5B, inset -2px 0 #9E0000;
}
.tb-red { font-size: 13px; height: 28px; letter-spacing: 0; }
.tb-red .t-dir { background: #FFF200; padding: 0 9px 0 11px; }
.tb-red .t-num { padding: 0 11px; }
.tb-red .t-grad { background: linear-gradient(90deg, #FF0000 0%, #000000 100%); }

.menu { padding: 16px 6px 4px 10px; }
.menu a {
  display: block;
  padding: 2px 0;
  font-size: clamp(26px, 7vw, 40px);
  font-weight: 700;
  line-height: 1.3;
  color: #000;
  text-decoration: none;
}
.menu a:hover { text-decoration: underline; text-underline-offset: 0.1em; }

.home-note {
  margin: 6px 10px 0;
  max-width: 34ch;
  font-family: var(--ui95);
  font-size: 14px;
  line-height: 1.45;
  color: #000000;
}

.home-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 2px 0 6px; }
.home .icon { width: 44px; height: 44px; }
.home .icons { gap: 10px; }
.marks { display: grid; justify-items: end; gap: 10px; }
.marks span { display: grid; place-items: center; width: 58px; height: 58px; }
.marks img { max-width: 100%; max-height: 100%; width: auto; height: auto; }

/* ---------- Directory column (Design + Art) ---------- */

.ui {
  position: fixed;
  z-index: 3;
  left: calc(161.5 * var(--u));
  top: calc(133 * var(--u));
  width: max(320px, calc(622 * var(--u)));
  display: flex;
  flex-direction: column;
}
body[data-mode="home"] .ui { display: none; }

.ui .window {
  aspect-ratio: 622 / 581;
  min-height: 0;
  overflow: hidden;
  padding: calc(19 * var(--u)) calc(10 * var(--u)) calc(20 * var(--u)) calc(17 * var(--u));
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px calc(15 * var(--u));
  margin-top: calc(31 * var(--u));
  padding-left: calc(16.5 * var(--u));
}
.tabs button {
  margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  font-size: max(15px, calc(24.5 * var(--u)));
  font-weight: 700;
  line-height: 1.1;
}
.tabs button:hover { text-decoration: underline; text-underline-offset: 0.12em; }
.tabs button[aria-selected="true"] { color: var(--active); }

.lists {
  overflow-y: auto;
  margin-top: calc(24 * var(--u));
  padding: 0 calc(6 * var(--u)) 0 calc(13 * var(--u));
}
.list { margin: 0; padding: 0; list-style: none; display: grid; gap: 1px; }
.list[hidden] { display: none; }
.list a {
  display: block;
  padding: 1px 4px;
  font-size: max(13px, calc(18 * var(--u)));
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.list a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
.list a[aria-current="true"] { background: var(--select); color: #FFF; text-decoration: none; }

.details { display: flex; align-items: stretch; gap: 6px; margin: calc(12 * var(--u)) calc(6 * var(--u)) 0 calc(13 * var(--u)); }
.details[hidden] { display: none; }
.field {
  flex: 1;
  min-width: 0;
  padding: 5px 7px;
  background: #FFF;
  box-shadow: var(--sunken);
  font-family: var(--ui95);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.field span { color: var(--muted); }

.btn95 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 9px;
  border: 0;
  background: var(--face);
  box-shadow: var(--raised);
  color: #000;
  font-family: var(--ui95);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn95:active { box-shadow: var(--pressed); padding: 5px 11px 3px 10px; }
.btn95:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.btn95 svg { width: 11px; height: 11px; fill: #000; }

.about-wrap {
  position: relative;
  display: flex;
  flex: 0 1 auto;
  min-height: 0;
  max-height: 40%;
}
.about-wrap.sb-on { padding-right: 17px; }
.about-wrap[hidden] { display: none; }   /* a project with no data-blurb */
.about {
  overflow-y: auto;
  margin: calc(12 * var(--u)) calc(14 * var(--u)) 0 calc(16.5 * var(--u));
  padding-top: calc(10 * var(--u));
  border-top: 1px solid #B8B8BE;
  max-width: 46ch;
  font-size: max(12px, calc(15 * var(--u)));
  line-height: 1.45;
  color: var(--muted);
}

.ui .icons { margin-top: calc(30.5 * var(--u)); gap: 20px; }
@media (max-height: 780px), (max-width: 1280px) { .ui .icon { width: 40px; height: 40px; } .ui .icons { gap: 12px; } }

/* ---------- Design pages ---------- */

.design {
  position: relative;
  z-index: 1;
  display: none;
  margin-left: calc(860 * var(--u));
  padding-bottom: 0;
}
[data-mode="design"] .design { display: block; }
.viewing .design { margin-left: 0; }
.dpage[hidden] { display: none; }

.dsec {
  --pad: clamp(18px, 3vw, 56px);
  display: grid;
  justify-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  padding: clamp(36px, 4.5vw, 72px) var(--pad) clamp(44px, 5.5vw, 84px);
  background: var(--sec, #EFEFF0);
}

.header95 {
  margin: 0;
  padding: 8px 26px;
  background: #FFF;
  border: 2px solid #000;
  font-size: clamp(19px, 2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}
.header95.small { font-size: clamp(15px, 1.4vw, 20px); padding: 6px 18px; }

.lstage { display: grid; justify-items: center; gap: 18px; width: 100%; }
.lstage-frame {
  display: grid;
  place-items: center;
  width: 100%;
  padding: clamp(16px, 2.5vw, 36px);
  background: var(--stage-bg, transparent);
  transition: background 0.3s ease;
}
.lstage-frame img {
  max-height: clamp(190px, 25vw, 360px);
  width: auto;
  max-width: 100%;
}
.lstage-frame.bleed { padding: 0; }
.lstage-frame.bleed img { max-height: clamp(220px, 28vw, 400px); }

/* MS Paint-style colorway picker */
.paint {
  justify-self: stretch;
  width: calc(100% + var(--pad) * 2);
  margin-inline: calc(var(--pad) * -1);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px calc(var(--pad));
  background: var(--face);
  box-shadow: var(--raised);
}
.paint-current { position: relative; width: 42px; height: 42px; flex: none; }
.paint-current i { position: absolute; width: 26px; height: 26px; background: var(--c); box-shadow: var(--sunken-thin); }
.paint-current i:first-child { left: 0; top: 0; z-index: 1; }
.paint-current i:last-child { right: 0; bottom: 0; }
.paint-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  background: var(--face);
  box-shadow: var(--sunken);
}
.chip {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: var(--c);
  box-shadow: var(--sunken-thin);
  cursor: pointer;
}
.chip[aria-pressed="true"] { box-shadow: var(--sunken-thin), 0 0 0 2px #000; }

.swatch-row { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.sw { display: flex; align-items: center; gap: 10px; }
.sw i { width: 38px; height: 38px; display: block; }
.sw b { font-weight: 400; font-size: clamp(15px, 1.5vw, 21px); }

.dtext {
  margin: 0;
  max-width: 52ch;
  font-family: var(--ui95);
  font-weight: 700;
  font-size: clamp(13px, 1.15vw, 16px);
  line-height: 1.45;
  color: var(--dtext, #16457F);
  text-align: center;
}

/* 90s link button */
.link95 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 20px;
  background: #999999;
  box-shadow: inset -1px -1px #4D4D4D, inset 1px 1px #E2E2E2, inset -2px -2px #6E6E6E, inset 2px 2px #C6C6C6;
  color: #FFFFFF;
  font-family: var(--ui95);
  font-size: clamp(13px, 1.15vw, 17px);
  font-weight: 700;
  text-decoration: none;
}
.link95:hover { background: #A6A6A6; }
.link95:active { box-shadow: inset 1px 1px #4D4D4D, inset -1px -1px #E2E2E2, inset 2px 2px #6E6E6E, inset -2px -2px #C6C6C6; }
.link95 svg { width: 13px; height: 13px; fill: currentColor; }
.link95.dark { background: #3B342B; color: #F6F0E4; box-shadow: inset -1px -1px #100D08, inset 1px 1px #7B7060, inset -2px -2px #241F17, inset 2px 2px #5B5245; }

/* MSC extras */
.msc-color { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(20px, 3vw, 48px); }
.flag { margin: 0; display: grid; justify-items: center; gap: 10px; width: min(300px, 60vw); }
.flag-img { display: block; width: 100%; height: auto; box-shadow: var(--sunken); }
.flag figcaption { font-size: 12px; color: #444; }

.msc-type { display: grid; justify-items: center; gap: 10px; text-align: center; }
.chip95 { padding: 3px 12px; background: #23457A; color: #FFF; font-size: clamp(11px, 1vw, 14px); text-transform: uppercase; letter-spacing: 0.04em; }
.spec-h { margin: 0 0 14px; font-size: clamp(30px, 4.6vw, 66px); line-height: 1; color: #2F72B8; }
.spec-s { margin: 0; font-size: clamp(18px, 2.6vw, 38px); line-height: 1.1; color: #2A67A6; }

/* ---------- Hide-the-menu mode ---------- */

.brand, .ui .window, .ui .icons > a:not(.icon-home) { transition: opacity 0.35s ease, transform 0.5s var(--ease); }
.viewing .ui .brand, .viewing .ui .window { opacity: 0; transform: translateX(-24px); pointer-events: none; }
.viewing .ui .icons > a:not(.icon-home) { opacity: 0; pointer-events: none; }
.icon-eye { transform-origin: top left; }
.viewing .icon-eye {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 6;
  width: 40px;
  height: 40px;
}

/* ---------- Phones and narrow windows ---------- */

@media (max-width: 900px) {
  .ui { position: relative; left: auto; top: auto; width: auto; max-width: 560px; margin: 28px 16px 0; }
  .ui .window { aspect-ratio: auto; height: 380px; padding: 14px 8px 14px 12px; }
  .titlebar { height: 30px; font-size: 13px; }
  .t-dir { padding: 0 8px 0 11px; }
  .t-num { padding: 0 11px; }
  .brand { margin-bottom: 20px; }
  .logo { width: 170px; }
  .jae { width: 22px; }
  .tabs { margin-top: 20px; padding-left: 12px; gap: 4px 12px; }
  .tabs button { font-size: 18px; }
  .lists { margin-top: 14px; padding: 0 4px 0 8px; }
  .list a { font-size: 15px; }
  .details { margin: 10px 4px 0 8px; }
  .about { margin: 10px 8px 0 12px; font-size: 13px; }
  .ui .icons { margin-top: 18px; gap: 14px; }
  .ui .icon { width: 56px; height: 56px; }

  .design { margin: 28px 0 0; }
  .viewing .ui { pointer-events: none; }
  .viewing .icon-eye { pointer-events: auto; }
  .viewing .design { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  #sky, .artbg, .dbg, .art-layer, .brand, .window, .icons > a { transition: none; }
}

/* ---------- Win95 scrollbars, drawn by us so every browser gets one ---------- */

.has-fake-sb { scrollbar-width: none; -ms-overflow-style: none; }
.has-fake-sb::-webkit-scrollbar { width: 0; height: 0; display: none; }
body.sb-page { padding-right: 17px; }
body.sb-page .home { padding-right: 0; }

.w95sb {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 17px;
  z-index: 8;
  display: none;
  flex-direction: column;
  background-color: #DFDFDF;
  background-image: repeating-conic-gradient(#C0C0C0 0% 25%, #FFFFFF 0% 50%);
  background-size: 2px 2px;
  box-shadow: inset 1px 0 #808080;
  user-select: none;
  touch-action: none;
}
.w95sb.on { display: flex; }
.w95sb.inner { position: absolute; right: 0; top: 0; bottom: 0; }
.w95sb-btn {
  flex: none;
  width: 17px;
  height: 17px;
  padding: 0;
  border: 0;
  background: var(--face) center no-repeat;
  box-shadow: var(--raised);
  cursor: default;
}
.w95sb-btn:active { box-shadow: var(--pressed); background-position: calc(50% + 1px) calc(50% + 1px); }
.w95sb-btn.up { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M3 0h1v1h1v1h1v1h1v1H0V3h1V2h1V1h1z'/%3E%3C/svg%3E"); }
.w95sb-btn.down { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h7v1H6v1H5v1H4v1H3V3H2V2H1V1H0z'/%3E%3C/svg%3E"); }
.w95sb-track { position: relative; flex: 1; }
.w95sb-thumb { position: absolute; left: 0; right: 0; top: 0; background: var(--face); box-shadow: var(--raised); }

.lists-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.lists-wrap .lists { flex: 1; min-width: 0; }
.lists-wrap.sb-on { padding-right: 17px; }

@media (max-width: 900px), (pointer: coarse) {
  .w95sb { display: none !important; }
  body.sb-page { padding-right: 0; }
  .lists-wrap.sb-on { padding-right: 0; }
}

/* ---------- Win95 carousel ---------- */

.carousel {
  justify-self: stretch;
  width: calc(100% + var(--pad) * 2);
  margin-inline: calc(var(--pad) * -1);
  display: grid;
  gap: 6px;
  padding: 6px;
  background: var(--face);
  box-shadow: var(--raised);
}
.car-view {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(240px, 32vw, 460px);
  padding: clamp(12px, 2vw, 26px);
  background: #FFFFFF;
  box-shadow: var(--sunken);
}
.slide { margin: 0; display: grid; place-items: center; }
.slide[hidden] { display: none; }
.slide img { max-height: clamp(220px, 30vw, 460px); width: auto; max-width: 100%; }
.car-bar { display: flex; align-items: stretch; gap: 6px; }
.car-bar .field { flex: 1; display: flex; align-items: center; }
.car-bar .btn95 { padding-inline: 12px; }
.car-bar .btn95 svg { width: 8px; height: 12px; }

/* a taller carousel with the pictures nearly filling it (the shirts) */
.carousel.tall .car-view { min-height: clamp(340px, 52vh, 720px); }
.carousel.tight .car-view { padding: 6px; }
.carousel.tall .slide img { max-height: clamp(320px, 50vh, 700px); }

/* full-width piece (the Quartermaster poster) */
.lstage-frame.wide { padding: 0; width: calc(100% + var(--pad) * 2); margin-inline: calc(var(--pad) * -1); }
.lstage-frame.wide img { width: 100%; max-height: none; height: auto; }

/* ---------- Templates with a magnifier ---------- */

.tpl-grid {
  justify-self: stretch;
  width: calc(100% + var(--pad) * 2);
  margin-inline: calc(var(--pad) * -1);
  display: grid;
  gap: 10px;
}
.tpl { position: relative; margin: 0; background: #FFFFFF; box-shadow: var(--sunken); }
.tpl img { width: 100%; height: auto; }
.zoom-btn { position: absolute; right: 10px; bottom: 10px; }
.zoom-btn svg { width: 11px; height: 11px; fill: #000; }

/* ---------- Zoom window ---------- */

.zoom95 {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 8, 16, 0.6);
}
.zoom95[hidden] { display: none; }
.zoom-win {
  display: flex;
  flex-direction: column;
  width: min(1100px, 96vw);
  height: min(860px, 92vh);
  padding: 3px;
  background: var(--face);
  box-shadow: var(--raised);
}
.zoom-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 3px 3px 7px;
  background: linear-gradient(90deg, #000080 0%, #1084D0 100%);
  color: #FFFFFF;
  font: 700 13px var(--ui95);
}
.zoom-title { flex: 1; }
.zoom-x {
  width: 20px;
  height: 18px;
  padding: 0;
  border: 0;
  background: var(--face);
  box-shadow: var(--raised);
  color: #000;
  font: 700 11px var(--ui95);
  cursor: pointer;
}
.zoom-x:active { box-shadow: var(--pressed); }
.zoom-view {
  flex: 1;
  min-height: 0;
  margin: 3px 0;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: var(--sunken);
  cursor: grab;
  touch-action: none;
}
.zoom-view.grabbing { cursor: grabbing; }
.zoom-view img { transform-origin: 0 0; max-width: none; will-change: transform; }
.zoom-foot { display: flex; align-items: stretch; gap: 6px; }
.zoom-foot .field { width: 78px; justify-content: center; display: flex; align-items: center; }
.zoom-foot .btn95 { padding-inline: 14px; font-size: 14px; }

/* ---------- Blurb only on design pages ---------- */

body:not([data-mode="design"]) .about-wrap { display: none; }

/* ---------- Home button beside the eye ---------- */

.icon-home { display: none; transform-origin: top left; }
.viewing .icon-home {
  display: block;
  position: fixed;
  left: 62px;
  top: 14px;
  z-index: 6;
  width: 40px;
  height: 40px;
}
