/* Neo-brutalist / NN-LAB — dot grid, hard shadows, mono + pixel */

:root {
  --lab-bg: #f4f4f4;
  --lab-ink: #000000;
  --lab-paper: #ffffff;
  --lab-mint: #d1f7e6;
  --lab-lav: #f0e6ff;
  --lab-yellow: #fff9c4;
  --lab-pink: #ff80bf;
  --lab-teal: #2dd4bf;
  --lab-neon: #50e3c2;
  --lab-border: 2px solid var(--lab-ink);
  --lab-shadow: 8px 8px 0 0 var(--lab-ink);
  --lab-shadow-pink: 10px 10px 0 0 var(--lab-pink);
  --lab-shadow-teal: 8px 8px 0 0 var(--lab-teal);
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-pixel: "Press Start 2P", monospace;
  --font-sans: "Inter", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body.lab {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--lab-ink);
  background: var(--lab-bg);
  font-family: var(--font-sans);
  position: relative;
}

.mono {
  font-family: var(--font-mono);
}

.lab-dots {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(circle at center, #9ca3af 0.85px, transparent 0.9px);
  background-size: 14px 14px;
}

.lab-top {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 12px clamp(16px, 4vw, 40px) 8px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.lab-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lab-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  background: var(--lab-paper);
  border: var(--lab-border);
  box-shadow: var(--lab-shadow);
  font-family: var(--font-pixel);
  font-size: clamp(9px, 1.8vw, 11px);
  line-height: 1.6;
  letter-spacing: 0.04em;
  transform: translateY(20px);
}

.lab-logo__ver {
  font-size: 8px;
  opacity: 0.85;
  position: relative;
  top: 2px;
}

.lab-status {
  margin: 0;
  display: inline-block;
  width: fit-content;
  padding: 8px 12px;
  background: var(--lab-ink);
  color: var(--lab-paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  transform: translateY(20px);
}

.lab-util {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.lab-clock {
  display: inline-block;
  padding: 8px 12px;
  background: var(--lab-paper);
  border: var(--lab-border);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.lab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.lab-nav__btn {
  min-width: 0;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  background: var(--lab-paper);
  border: var(--lab-border);
  color: var(--lab-ink);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
  position: relative;
}

.lab-nav__btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 0 var(--lab-ink);
}

.lab-nav__btn.is-active {
  box-shadow: 4px 4px 0 0 var(--lab-ink);
  transform: translate(-1px, -1px);
}

.lab-nav__btn:focus-visible {
  outline: 3px solid var(--lab-neon);
  outline-offset: 2px;
}

.lab-main {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 16px;
}

/* 工作经历：从顶栏下紧跟排列，不贴视口底部 */
.lab-main:has(#view-work.is-active:not([hidden])) {
  justify-content: flex-start;
  padding-top: clamp(8px, 1.2vw, 14px);
  padding-bottom: 16px;
}

#view-work.is-active:not([hidden]) {
  flex: 0 1 auto;
}

.lab-view[hidden] {
  display: none !important;
}

.lab-view {
  display: block;
  animation: labFade 0.25s ease;
}

.lab-view.is-active:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

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

/* —— ABOUT —— */
.lab-watermark {
  position: absolute;
  left: 50%;
  top: 52px;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(28px, 8vw, 72px);
  line-height: 1;
  color: rgba(0, 0, 0, 0.06);
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

.lab-hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.lab-hero__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(175px, 244px);
  gap: 12px;
  align-items: center;
}

.lab-portrait {
  margin: 0;
  border: var(--lab-border);
  box-shadow: var(--lab-shadow);
  background: var(--lab-paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lab-portrait--hero {
  width: 100%;
  max-width: 244px;
  justify-self: end;
}

.lab-portrait--hero img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 250px;
  object-fit: cover;
  object-position: center 18%;
}

.lab-portrait__meta {
  margin: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 8px 8px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.35;
  border-top: var(--lab-border);
  background: var(--lab-yellow);
}

.lab-portrait__line {
  display: block;
}

.lab-edu-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  align-items: start;
  min-height: 0;
}

/* EDU_LOG 白卡片：在 margin-top:10px 基础上再上移 50px（10+25+15），不改变盒模型宽高 */
.lab-edu-row > .lab-edu {
  margin-top: -40px;
}

.lab-note--edu-col {
  margin: 0;
  min-height: 0;
  align-self: start;
  justify-self: stretch;
  width: 100%;
  box-sizing: border-box;
}

/* 绿色个人总结便签：下移 15px，padding/边框内尺寸不变（需写在 .lab-note--edu-col margin 之后） */
.lab-edu-row > .lab-note.lab-note--edu-col {
  margin-top: 15px;
}

.lab-edu--side {
  margin: 0;
  margin-top: 0;
  padding: 14px 16px 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.lab-edu--side .lab-pub {
  margin-top: auto;
  padding-top: 4px; /* 相对原 12px 上移 8px */
  transform: translateY(-15px); /* 再整体上移 15px */
}

/* —— 顶部：三只小猫便签 + 胶带 —— */
.lab-cat-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 18px 22px;
  padding: 10px 12px 16px;
  margin: clamp(14px, 2.4vw, 26px) 0 clamp(8px, 1.5vw, 16px);
  transform: none;
}

.lab-kitty {
  position: relative;
  margin: 0;
  width: min(190px, 28vw);
  min-width: 120px;
  flex: 0 1 auto;
  border: var(--lab-border);
  background: #fffbeb;
  padding: 14px 8px 8px;
  box-shadow: 6px 6px 0 0 var(--lab-ink);
}

.lab-kitty__tape {
  position: absolute;
  top: -11px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  padding: 5px 16px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--lab-ink);
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 55%, #e8e8e8 100%);
  border: var(--lab-border);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18), 1px 1px 0 rgba(255, 255, 255, 0.8) inset;
  white-space: nowrap;
}

.lab-kitty__inner {
  margin: 0;
  overflow: hidden;
  border: 2px dashed rgba(0, 0, 0, 0.18);
  background: #fff;
}

.lab-kitty__inner img {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
  object-position: center;
}

.lab-kitty--a {
  transform: rotate(-3deg);
}

.lab-kitty--b {
  transform: rotate(2.5deg);
}

.lab-kitty--c {
  transform: rotate(-2deg);
}

.lab-hero__stack {
  position: relative;
}

.lab-pill {
  display: inline-block;
  padding: 5px 10px;
  margin-bottom: 8px;
  background: var(--lab-mint);
  border: var(--lab-border);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  transform: rotate(-6deg);
  box-shadow: 3px 3px 0 0 var(--lab-ink);
}

.lab-hero__name {
  margin: 0 0 6px;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.lab-hero__quote {
  margin: 0;
  font-size: 13px;
  color: #374151;
  white-space: nowrap;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lab-note--paired {
  margin: 0;
  min-height: 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 14px 14px;
  box-sizing: border-box;
  text-align: center;
}

.lab-note--paired .lab-note__tape {
  top: -6px;
}

.lab-note__paired-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  min-height: 0;
  width: 100%;
  text-align: center;
}

.lab-note__para {
  margin: 0 0 0.75em;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  color: #111827;
}

.lab-note__para:last-child {
  margin-bottom: 0;
}

/* 绿框（mint）高度为同行的 75%，文字在框内居中；需高于 .lab-note--paired 的 height:100% */
.lab-note--edu-col.lab-note--paired {
  height: 75%;
  max-height: 75%;
  min-height: 0;
}

.lab-note--edu-col.lab-note--mint {
  min-height: 0;
}

.lab-snaps {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  margin-bottom: 14px;
}

.lab-snaps__title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.lab-snaps__lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.65;
  color: #374151;
  max-width: 52rem;
}

.lab-snaps__lead strong {
  font-weight: 700;
  color: var(--lab-ink);
}

.lab-snaps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: start;
}

.lab-frame {
  margin: 0;
  border: var(--lab-border);
  box-shadow: 6px 6px 0 0 var(--lab-ink);
  background: var(--lab-paper);
  overflow: hidden;
}

.lab-frame img {
  display: block;
  width: 100%;
  height: 234px;
  object-fit: cover;
  object-position: center;
}

.lab-frame figcaption {
  margin: 0;
  padding: 10px 10px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.45;
  border-top: var(--lab-border);
  background: #f9fafb;
}

.lab-note {
  position: relative;
  padding: 28px 20px 20px;
  border: var(--lab-border);
  min-height: 160px;
}

.lab-note--mint {
  background: var(--lab-mint);
  box-shadow: var(--lab-shadow-teal);
}

.lab-note--lav {
  background: var(--lab-lav);
  box-shadow: 8px 8px 0 0 #c4b5fd;
}

.lab-note__tape {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 18px;
  background: rgba(255, 255, 255, 0.95);
  border: var(--lab-border);
}

.lab-note__icon {
  font-size: 22px;
  margin-bottom: 10px;
  opacity: 0.35;
}

.lab-note__body {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: #111827;
}

.lab-stack {
  position: relative;
  z-index: 1;
  padding: 14px 16px 16px;
  margin-bottom: 0;
  border: 2px dashed var(--lab-ink);
  background: rgba(255, 255, 255, 0.5);
}

.lab-stack__title {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.lab-stack__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lab-stack__list li {
  padding: 8px 12px;
  background: var(--lab-paper);
  border: var(--lab-border);
  font-size: 11px;
  font-weight: 600;
}

.lab-contact {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: #374151;
}

.lab-contact a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lab-edu {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  padding: 14px 16px 16px;
  border: var(--lab-border);
  background: var(--lab-paper);
  box-shadow: 6px 6px 0 0 var(--lab-ink);
}

.lab-edu__title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.lab-edu__item {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #111827;
}

.lab-edu__item:last-child {
  margin-bottom: 0;
}

.lab-edu__meta {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #6b7280;
}

.lab-pub {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.55;
  color: #4b5563;
}

.lab-timeline__bullets {
  margin: 10px 0 0;
  padding-left: 1.15em;
  font-size: 13px;
  line-height: 1.55;
  color: #374151;
}

.lab-timeline__bullets li {
  margin-bottom: 6px;
}

.lab-timeline__bullets li:last-child {
  margin-bottom: 0;
}

/* —— EXP card —— */
.lab-card {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  background: var(--lab-paper);
  border: var(--lab-border);
  box-shadow: var(--lab-shadow-pink);
  padding: 18px 18px 16px;
}

.lab-card--log {
  margin-top: 8px;
}

.lab-sticker {
  position: absolute;
  right: 16px;
  top: -18px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--lab-mint);
  border: var(--lab-border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.45;
  transform: rotate(8deg);
  box-shadow: 3px 3px 0 0 var(--lab-ink);
}

.lab-card__head {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding-bottom: 8px;
  border-bottom: var(--lab-border);
}

.lab-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lab-timeline__item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 14px;
  align-items: start;
}

.lab-timeline__dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--lab-ink);
  border: 2px solid var(--lab-paper);
  box-shadow: 0 0 0 2px var(--lab-ink);
}

.lab-timeline__range {
  margin: 0 0 6px;
  font-size: 11px;
  color: #4b5563;
}

.lab-timeline__role {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.lab-timeline__desc {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

.lab-tag {
  display: inline-block;
  padding: 4px 8px;
  background: var(--lab-pink);
  color: var(--lab-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  border: var(--lab-border);
}

.lab-card__foot {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px dashed #9ca3af;
  font-size: 11px;
  line-height: 1.6;
  color: #6b7280;
  font-style: italic;
}

/* —— 工作经历：获奖竖栏（前）+ 时间轴 —— */
.lab-work-page {
  display: grid;
  grid-template-columns: minmax(0, 238px) minmax(0, 1fr);
  gap: clamp(14px, 2.5vw, 22px);
  align-items: start;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.lab-work-page .lab-card {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  padding-top: 5px;
}

.lab-work-page .lab-card--log {
  margin-top: 0;
}

/* HONOR_LOGS 标题 → 时间轴：用 #view-work 提高优先级，压过后面的 .lab-card__head */
#view-work .lab-work-page .lab-card--log > header.lab-card__head {
  display: block;
  margin: 0 0 0 !important;
  padding: 0 0 2px 0 !important;
  line-height: 1.1 !important;
  border-bottom: 1px solid var(--lab-ink) !important;
}

#view-work .lab-work-page .lab-card--log > .lab-timeline {
  margin-top: 7px !important; /* 在原 -8px 基础上整体下移 15px */
}

#view-work .lab-work-page .lab-card--log .lab-timeline__item:first-child .lab-timeline__dot {
  margin-top: 0 !important;
}

.lab-awards {
  position: sticky;
  top: 10px;
  padding: 14px 12px 16px;
  border: var(--lab-border);
  background: linear-gradient(180deg, #fff9c4 0%, #ffee9a 55%, #ffe566 100%);
  box-shadow: 6px 6px 0 0 var(--lab-ink);
}

.lab-awards__title {
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--lab-ink);
  padding-bottom: 8px;
  border-bottom: var(--lab-border);
}

.lab-awards__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lab-awards__item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.lab-awards__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  background: var(--lab-paper);
  border: var(--lab-border);
  box-shadow: 3px 3px 0 0 var(--lab-ink);
}

.lab-awards__body {
  min-width: 0;
}

.lab-awards__name {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  color: #111827;
}

.lab-awards__ctx {
  margin: 0;
  font-size: 9px;
  line-height: 1.45;
  color: #4b5563;
  word-break: break-word;
}

@media (max-width: 820px) {
  .lab-work-page {
    grid-template-columns: 1fr;
  }

  .lab-awards {
    position: static;
  }
}

/* —— WORKS —— */
.lab-works {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.lab-work {
  display: flex;
  flex-direction: column;
  background: var(--lab-paper);
  border: var(--lab-border);
  box-shadow: var(--lab-shadow);
}

.lab-work--alt {
  box-shadow: var(--lab-shadow-teal);
}

.lab-work__visual {
  position: relative;
  min-height: 120px;
  border-bottom: var(--lab-border);
}

.lab-work__visual--mint {
  background: var(--lab-mint);
}

.lab-work__visual--pink {
  background: #fce7f3;
}

.lab-work__tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 8px;
  background: var(--lab-ink);
  color: var(--lab-paper);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lab-work__glyph {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  opacity: 0.2;
  background: radial-gradient(circle, var(--lab-ink) 30%, transparent 32%),
    radial-gradient(circle at 30% 30%, transparent 40%, var(--lab-ink) 42%);
}

.lab-work__glyph--pen {
  border-radius: 4px;
  background: linear-gradient(135deg, transparent 45%, var(--lab-ink) 45%, var(--lab-ink) 50%, transparent 50%);
  opacity: 0.15;
}

.lab-work__body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lab-work__title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 800;
}

.lab-work__desc {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: #374151;
  flex: 1;
}

.lab-link {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: var(--lab-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lab-link:hover {
  color: #2563eb;
}

.lab-docs-hint {
  margin: 14px 0 0;
  font-size: 11px;
  color: #6b7280;
}

/* —— 个人作品：观星喵入口 —— */
.lab-portal {
  max-width: 640px;
  margin: 0 auto;
  background: var(--lab-paper);
  border: var(--lab-border);
  box-shadow: var(--lab-shadow);
  overflow: hidden;
}

/* 作品卡片整体下移 20px：只给第一张加 margin-top，第二张会自然跟着一起下移 */
#view-portfolio > .lab-portal:first-child {
  margin-top: 20px;
}

.lab-portal + .lab-portal {
  margin-top: 18px;
}

.lab-portal__visual {
  position: relative;
  min-height: 150px;
  border-bottom: var(--lab-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lab-portal__visual--cat {
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 40%, #fde68a 100%);
}

.lab-portal__tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 8px;
  background: var(--lab-ink);
  color: var(--lab-paper);
  font-size: 9px;
  font-weight: 600;
}

.lab-portal__emoji {
  font-size: 72px;
  line-height: 1;
  filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.12));
}

.lab-portal__body {
  padding: 16px 18px 18px;
}

.lab-portal__title {
  margin: 0 0 12px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lab-portal__desc {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

.lab-portal__url {
  margin: 0 0 12px;
  font-size: 11px;
  color: #6b7280;
  word-break: break-all;
}

.lab-portal__cta {
  display: inline-block;
  padding: 12px 18px;
  background: var(--lab-ink);
  color: var(--lab-paper);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: var(--lab-border);
  box-shadow: 4px 4px 0 0 var(--lab-teal);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.lab-portal__cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--lab-teal);
}

.lab-docs-head {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

/* —— Footer —— */
.lab-foot {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 100%;
  padding: 28px clamp(16px, 4vw, 32px) max(18px, env(safe-area-inset-bottom, 0px));
  background: var(--lab-ink);
  color: var(--lab-paper);
  text-align: center;
}

.lab-foot__title {
  margin: 0 0 12px;
  font-family: var(--font-pixel);
  font-size: clamp(14px, 3.5vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--lab-neon);
  letter-spacing: 0.02em;
}

.lab-foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  font-size: clamp(12px, 2.8vw, 13px);
  margin-bottom: 18px;
}

.lab-foot__a {
  color: var(--lab-paper);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lab-foot__a:hover {
  color: var(--lab-neon);
}

.lab-foot__sep {
  opacity: 0.5;
}

.lab-foot__credit {
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* —— FAB —— */
.lab-fab {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 8px;
  background: var(--lab-paper);
  border: var(--lab-border);
  border-radius: 999px;
  box-shadow: var(--lab-shadow);
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
  opacity: 0.95;
}

@media (max-width: 960px) {
  .lab-edu-row {
    grid-template-columns: 1fr;
  }

  .lab-note--edu-col.lab-note--paired {
    height: auto;
    max-height: none;
    align-self: stretch;
  }

  .lab-snaps__grid {
    grid-template-columns: 1fr;
  }

  .lab-frame img {
    height: min(320px, 55vw);
  }
}

@media (min-width: 600px) and (max-width: 960px) {
  .lab-snaps__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lab-snaps__grid .lab-frame:last-child {
    grid-column: 1 / -1;
    max-width: 480px;
    justify-self: center;
  }
}

@media (max-width: 720px) {
  .lab-kitty__inner img {
    height: min(200px, 48vw);
  }

  .lab-cat-strip {
    gap: 14px;
    padding-top: 6px;
  }

  .lab-nav {
    width: 100%;
    justify-content: stretch;
  }

  .lab-nav__btn {
    flex: 1 1 42%;
    white-space: normal;
    font-size: 12px;
    padding: 10px 8px;
    text-align: center;
  }

  .lab-hero__top {
    grid-template-columns: 1fr;
  }

  .lab-portrait--hero {
    max-width: 100%;
    justify-self: center;
  }

  .lab-portrait--hero img {
    max-height: min(420px, 72vw);
  }

  .lab-note--paired {
    height: auto;
  }

  .lab-note__paired-inner {
    justify-content: flex-start;
  }

  .lab-sticker {
    right: 8px;
    top: -12px;
    width: 76px;
    height: 76px;
    font-size: 8px;
  }

  .lab-watermark {
    top: 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lab-view {
    animation: none;
  }

  .lab-nav__btn {
    transition: none;
  }

  .lab-kitty--a,
  .lab-kitty--b,
  .lab-kitty--c {
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
