:root {
  --bg: #ffffff;
  --paper: #f8f8f6;
  --ink: #111111;
  --muted: #666666;
  --line: #e9e9e7;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: "Manrope", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.container {
  width: min(1160px, calc(100% - 3rem));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 80px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.brand-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.brand-role {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 9px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--ink);
}

.nav-toggle span + span {
  margin-top: 6px;
}

.hero {
  padding: 6.5rem 0 4.5rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 500;
}

h1,
h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
}

h1 {
  max-width: 900px;
  font-size: clamp(2.1rem, 4.4vw, 4.2rem);
  line-height: 1.04;
}

.hero-intro {
  max-width: 740px;
  margin: 1.1rem 0 0;
  color: var(--muted);
}

.hero-cta {
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.hero-cta a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.featured-projects .section-head {
  margin-bottom: 1.1rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}

.featured-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 1.6rem 1.8rem;
  box-shadow: 0 12px 26px rgba(17, 17, 17, 0.08);
}

.featured-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
}

.featured-item {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1.2rem;
  align-items: center;
}

.featured-headline {
  margin: 0 0 0.5rem;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: 0.01em;
}

.featured-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.featured-crop-top {
  object-position: center top;
}

.featured-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.featured-body p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.featured-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.books-hero {
  padding-bottom: 3.5rem;
}

.cta-section {
  padding-top: 0;
}

.cta-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 1.8rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  box-shadow: 0 12px 26px rgba(17, 17, 17, 0.08);
}

.cta-content {
  display: grid;
  gap: 0.85rem;
}

.cta-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 640px;
}

.cta-image img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: none;
}

.contact-hero-media {
  margin-top: 1.4rem;
}

.contact-hero-media img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: none;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(17, 17, 17, 0.12);
}

.cta-button-outline {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 1.6rem;
  box-shadow: 0 12px 26px rgba(17, 17, 17, 0.08);
  display: grid;
  gap: 0.75rem;
}

.contact-card h2 {
  font-size: clamp(1.4rem, 2.3vw, 2rem);
}

.contact-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-form {
  display: grid;
  gap: 0.55rem;
}

.contact-form label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.contact-form textarea {
  resize: vertical;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.contact-note {
  margin-top: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  background: #fff;
}

.contact-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.game-intro {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.game-help {
  margin: 0 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.45rem 0.65rem;
  max-width: 760px;
}

.game-help summary {
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  list-style-position: outside;
}

.game-help ul {
  margin: 0.55rem 0 0.15rem 1rem;
  padding: 0;
}

.game-help li {
  margin: 0.2rem 0;
  font-size: 0.82rem;
  color: #3a3a3a;
}

.game-empty {
  margin: 0.6rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.memory-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.memory-controls p {
  margin: 0;
  font-size: 0.84rem;
}

.memory-controls button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 0.84rem;
}

.memory-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  width: min(520px, 100%);
}

.memory-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.06);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  transition: transform 140ms ease;
}

.memory-card:hover {
  transform: translateY(-1px);
}

.memory-card[disabled] {
  cursor: default;
}

.memory-card-face {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.memory-card-front {
  position: relative;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #2f2f2f;
  background:
    radial-gradient(circle at 18% 20%, rgba(17, 17, 17, 0.06), transparent 42%),
    radial-gradient(circle at 84% 78%, rgba(17, 17, 17, 0.05), transparent 45%),
    repeating-linear-gradient(
      135deg,
      rgba(17, 17, 17, 0.03) 0,
      rgba(17, 17, 17, 0.03) 6px,
      rgba(255, 255, 255, 0.55) 6px,
      rgba(255, 255, 255, 0.55) 12px
    ),
    #f9f9f8;
}

.memory-card-front::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 6px;
  pointer-events: none;
}

.memory-card-back {
  display: none;
}

.memory-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-card.is-revealed .memory-card-front,
.memory-card.is-matched .memory-card-front {
  display: none;
}

.memory-card.is-revealed .memory-card-back,
.memory-card.is-matched .memory-card-back {
  display: block;
}

.memory-complete {
  margin-top: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem;
  background: #fff;
}

.memory-complete p {
  margin: 0 0 0.6rem;
}

.memory-save-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.memory-save-row input,
.memory-save-row button {
  font: inherit;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  background: #fff;
}

.memory-save-row button {
  cursor: pointer;
}

.memory-highscores {
  margin-top: 0.8rem;
}

.memory-highscores h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.memory-highscores ol {
  margin: 0;
  padding-left: 1.2rem;
}

.memory-highscores li {
  margin: 0.2rem 0;
  font-size: 0.84rem;
}

.puzzle-wrap {
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.puzzle-wrap h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.puzzle-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.puzzle-controls p {
  margin: 0;
  font-size: 0.84rem;
}

.puzzle-controls button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 0.84rem;
}

.puzzle-board {
  --puzzle-size: 3;
  --board-ratio: 1 / 1;
  width: min(520px, 100%);
  aspect-ratio: var(--board-ratio);
  display: grid;
  grid-template-columns: repeat(var(--puzzle-size), 1fr);
  grid-template-rows: repeat(var(--puzzle-size), 1fr);
  gap: 0.35rem;
}

.puzzle-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #fff;
  background-image: var(--tile-image);
  background-size: calc(var(--puzzle-size) * 100%);
  background-position: var(--tile-x) var(--tile-y);
  background-repeat: no-repeat;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.08);
}

.puzzle-tile.empty {
  background: #fafaf9;
  border-style: dashed;
  box-shadow: none;
  cursor: default;
}

.puzzle-complete {
  margin-top: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem;
  background: #fff;
}

.puzzle-complete p {
  margin: 0 0 0.6rem;
}

.puzzle-save-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.puzzle-save-row input,
.puzzle-save-row button {
  font: inherit;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  background: #fff;
}

.puzzle-save-row button {
  cursor: pointer;
}

.puzzle-highscores {
  margin-top: 0.8rem;
}

.puzzle-highscores h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.puzzle-highscores ol {
  margin: 0;
  padding-left: 1.2rem;
}

.puzzle-highscores li {
  margin: 0.2rem 0;
  font-size: 0.84rem;
}

.section {
  padding: 1.2rem 0 5.5rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.6rem, 2.7vw, 2.4rem);
}

.portfolio-group + .portfolio-group {
  margin-top: 2.25rem;
}

.portfolio-group h3 {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-weight: 600;
}

.gallery {
  columns: 4 240px;
  column-gap: 1rem;
}

.card {
  break-inside: avoid;
  margin: 0 0 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.08);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 26px rgba(17, 17, 17, 0.12);
}

.card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
}

.card-button {
  display: block;
  line-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
  width: 100%;
  cursor: zoom-in;
}

.card-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.section-muted {
  background: linear-gradient(to bottom, #fff 0%, #fcfcfb 100%);
}

.gallery-sketchbook {
  columns: 4 240px;
  column-gap: 1rem;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

.book-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(17, 17, 17, 0.08);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.book-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.book-meta {
  padding: 0.9rem 1rem 1.1rem;
}

.book-meta h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.book-meta p {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.buy-links a {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 0.35rem 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.86rem;
}


.process-article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 17, 17, 0.08);
  padding: 0;
}

.process-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.4rem 1.6rem 1.1rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.process-header > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  row-gap: 0.3rem;
  align-items: center;
}

.process-header > div:first-child .process-cover-thumb {
  grid-row: span 4;
}

.process-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.process-cover-thumb {
  width: 90px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.08);
}

.process-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.process-header h3 {
  margin: 0 0 0.6rem;
  font-size: 1.4rem;
}

.process-dek {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.process-toggle {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}

.process-article[open] .process-toggle::after {
  content: " —";
}

.process-article:not([open]) .process-toggle {
  color: var(--ink);
}

.process-article[open] .process-toggle {
  color: var(--muted);
}

.process-article:not([open]) .process-header {
  border-bottom: 0;
  padding-bottom: 1.4rem;
}

.process-article[open] .process-cover-thumb {
  display: none;
}

.process-article[open] .process-header > div:first-child {
  grid-template-columns: 1fr;
}

.process-article section {
  padding: 0 1.6rem;
}

.process-article section:first-of-type {
  padding-top: 1.2rem;
}

.process-article section:last-of-type {
  padding-bottom: 1.8rem;
}

.process-step {
  margin-bottom: 1.6rem;
}

.process-step:last-child {
  margin-bottom: 0;
}

.process-step h4 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.step-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.step-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 1.2rem;
  align-items: start;
}

.step-row img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.08);
}

.process-thumb {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.process-thumb img {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.process-thumb:hover img {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(17, 17, 17, 0.12);
}

.step-copy p {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.step-copy p:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 2.25rem;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-wrap p {
  margin: 0;
  color: var(--muted);
}

.footer-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.85rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.footer-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.08);
}

.footer-copy {
  font-size: 0.82rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.98);
  padding: 1.25rem;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-frame {
  max-width: min(1200px, calc(100vw - 9rem));
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 4rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-details {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 0.45rem;
  padding-top: 0.65rem;
}

.lightbox-title,
.lightbox-meta {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.lightbox-meta {
  color: var(--muted);
}

.lightbox-close,
.lightbox-nav {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .container {
    width: min(1160px, calc(100% - 1.4rem));
  }

  .nav-wrap {
    min-height: 66px;
    position: relative;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% - 1px);
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    border: 1px solid var(--line);
    background: #fff;
    padding: 0.85rem 0.95rem;
    min-width: 170px;
    box-shadow: 0 10px 25px rgba(17, 17, 17, 0.08);
  }

  .site-header.nav-open .nav-links {
    display: flex;
  }

  .hero {
    padding: 4.4rem 0 3rem;
  }

  .section {
    padding-bottom: 3.6rem;
  }

  .cta-card {
    padding: 1.4rem 1.5rem;
    grid-template-columns: 1fr;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-items {
    grid-template-columns: 1fr;
  }

  .featured-item {
    grid-template-columns: 1fr;
  }



  .gallery,
  .gallery-sketchbook {
    columns: 2 180px;
  }


}

@media (max-width: 540px) {
  .process-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .process-header > div:first-child {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .process-header > div:first-child .process-cover-thumb {
    grid-row: auto;
  }

  .process-header-right {
    align-items: center;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .gallery,
  .gallery-sketchbook {
    columns: 1;
  }


  .memory-board {
    width: 100%;
    max-width: none;
    gap: 0.28rem;
  }

  .game-intro {
    margin-bottom: 0.45rem;
    font-size: 0.84rem;
  }

  .game-help {
    margin-bottom: 0.5rem;
    padding: 0.35rem 0.5rem;
  }

  .game-help summary {
    font-size: 0.78rem;
  }

  .game-help li {
    font-size: 0.76rem;
  }

  .memory-controls {
    gap: 0.35rem 0.55rem;
    margin-bottom: 0.45rem;
  }

  .memory-controls p,
  .memory-controls button {
    font-size: 0.74rem;
  }

  .memory-controls button {
    padding: 0.22rem 0.48rem;
  }

  .memory-card-front {
    font-size: 0.62rem;
    letter-spacing: 0.09em;
  }

  .memory-card-front::after {
    inset: 5px;
  }

  .step-row {
    grid-template-columns: 1fr;
  }


  .lightbox-frame {
    max-width: calc(100vw - 2.5rem);
  }

  .lightbox-details {
    flex-direction: column;
    gap: 0.2rem;
  }

  .lightbox-nav {
    top: auto;
    bottom: 1rem;
    transform: none;
  }

  .lightbox-prev {
    left: 1rem;
  }

  .lightbox-next {
    right: 1rem;
  }
}

@media (max-width: 390px) {
  .memory-board {
    width: 100%;
    gap: 0.22rem;
  }

  .memory-controls p,
  .memory-controls button {
    font-size: 0.7rem;
  }
}
