:root {
  --desk: #f3efe8;
  --paper: #f4ebdd;
  --card: #fbf6ee;
  --ink: #655448;
  --muted: #958475;
  --line: #ded2c2;
  --shadow: rgba(74, 58, 42, 0.1);
  --text: "Manrope", "Noto Sans Hebrew", sans-serif;
  --title: "Lora", "Noto Serif Hebrew", Georgia, serif;
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
  min-height: 100%;
  background-color: #f4ebdd;
  background-image: url("../assets/01.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

html:has(body[data-page="home"]),
html:has(body[data-page="creations"]),
html:has(:is(body[data-page="about"], body[data-page="games"], body[data-page="pix"])) {
  background-color: #f7f3e4;
  background-image: url("../assets/paper-01.png?v=3");
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: transparent;
  font-family: var(--text);
  font-weight: 500;
  line-height: 1.4;
}

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

button, a { font-family: inherit; }

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: 8px;
  z-index: 5;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-140%);
}

.skip:focus { transform: none; }

.sheet {
  width: min(1080px, calc(100% - 64px));
  margin: 0 auto;
  padding-block: 28px 40px;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}

body[data-page="home"] .sheet {
  width: min(1760px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  padding-inline: clamp(16px, 2vw, 40px);
  padding-block: 0 28px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 22px;
}

body[data-page="home"] .top {
  position: relative;
  min-height: 88px;
  padding-block: 22px 18px;
  border-bottom: 0;
}

body[data-page="home"] .top::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(176, 138, 62, 0.2) 12%,
    #b8924a 42%,
    #f0e2b0 50%,
    #b8924a 58%,
    rgba(176, 138, 62, 0.2) 88%,
    transparent 100%
  );
  box-shadow: 0 0 6px rgba(201, 164, 84, 0.45);
  pointer-events: none;
}

body[data-page="home"] .brand a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--title);
  font-weight: 600;
  font-size: 2.05rem;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #5a3828;
  text-shadow:
    0 0 1px rgba(255, 244, 214, 0.95),
    0 0 6px rgba(212, 168, 74, 0.55),
    0 0 12px rgba(186, 142, 58, 0.28);
}

.brand {
  margin: 0;
  line-height: 1;
}

.brand a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 50%;
}

body[data-page="home"] .brand img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.top-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-inline-start: auto;
}

.langs,
.foot-langs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.langs button,
.foot-langs button {
  border: 0;
  background: transparent;
  padding: 8px 1px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.langs span { color: var(--muted); font-size: 0.82rem; }

body[data-page="home"] .langs,
body[data-page="creations"] .langs,
:is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .langs {
  gap: 16px;
}

body[data-page="home"] .langs button,
body[data-page="home"] .langs span,
body[data-page="creations"] .langs button,
body[data-page="creations"] .langs span,
:is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .langs button,
:is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .langs span {
  color: #5a3828;
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

body[data-page="home"] .langs button,
body[data-page="creations"] .langs button,
:is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .langs button {
  padding: 12px 4px;
  min-height: 44px;
  transition: color 0.25s ease;
}

body[data-page="home"] .langs button:hover,
body[data-page="home"] .langs button.is-active,
body[data-page="creations"] .langs button:hover,
body[data-page="creations"] .langs button.is-active,
:is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .langs button:hover,
:is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .langs button.is-active {
  color: #4a3022;
  text-decoration: underline;
  text-decoration-color: #c4a15a;
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}

.langs button.is-active,
.foot-langs button.is-active {
  color: var(--ink);
}

main { padding-top: 8px; }

body[data-page="home"] main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 12px;
  padding-bottom: 12px;
}

body[data-page="creations"] .sheet {
  width: min(1692px, 100%);
  padding-inline: clamp(16px, 2vw, 40px);
}

body[data-page="creations"] .brand img,
:is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .brand img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
}

body[data-page="creations"] main > h2,
body[data-page="creations"] .page-read > h2 {
  text-align: center;
}

.entries {
  width: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 3vw, 56px);
  align-items: start;
  direction: ltr;
}

.entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: none;
  margin-inline: auto;
  padding: 0;
  min-height: 0;
  color: inherit;
  text-decoration: none;
  background: transparent;
}

.entry-paper {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1774 / 887;
  object-fit: contain;
  object-position: center bottom;
  background: transparent;
  filter: drop-shadow(0 10px 14px rgba(74, 58, 42, 0.16));
  transform-origin: center bottom;
  transition: transform 0.3s ease, filter 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .entry:hover .entry-paper {
    transform: scale(1.025);
    filter: drop-shadow(0 16px 18px rgba(74, 58, 42, 0.26));
  }
}

.shelf-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 16px;
  text-align: center;
}

html[dir="rtl"] .shelf-caption {
  direction: rtl;
}

.entry-art {
  width: 136px;
  height: 136px;
  object-fit: cover;
  flex: none;
}

.shelf-caption h2 {
  margin: 0;
  font-family: var(--title);
  font-size: clamp(1.2rem, 1.7vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  color: #5a3828;
}

.shelf-caption p {
  margin: 6px 0 0;
  color: #6e5646;
  font-size: clamp(0.88rem, 1.15vw, 1rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
}

.boards {
  width: 100%;
  margin-top: clamp(28px, 4vw, 52px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 40px);
  align-items: start;
  direction: ltr;
}

.board {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  background: transparent;
}

.board-paper {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1536 / 1024;
  object-fit: contain;
  object-position: center;
  background: transparent;
  filter: drop-shadow(0 8px 12px rgba(74, 58, 42, 0.14));
  transition: transform 0.3s ease, filter 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .board:hover .board-paper {
    transform: scale(1.02);
    filter: drop-shadow(0 12px 16px rgba(74, 58, 42, 0.22));
  }
}

.entry-arrow {
  flex: 0 0 auto;
  width: 42px;
  height: 18px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 22px;
  font-size: 0.82rem;
}

.foot a {
  color: var(--muted);
  text-decoration: none;
}

body[data-page="home"] .foot {
  justify-content: center;
}

body[data-page="home"] .foot a,
body[data-page="home"] .contact-open {
  border: 0;
  background: transparent;
  padding: 8px 4px;
  cursor: pointer;
  color: #4e3426;
  font-family: var(--title);
  font-size: 1.45rem;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(255, 250, 240, 0.95), 0 1px 0 rgba(255, 250, 240, 0.75);
}

body[data-page="home"] .foot a:hover,
body[data-page="home"] .contact-open:hover {
  text-decoration: underline;
  text-decoration-color: #c4a15a;
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}

.foot-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

:focus-visible {
  outline: 2px solid #655448;
  outline-offset: 3px;
}

html[dir="rtl"] .entry-arrow { transform: scaleX(-1); }

html[dir="rtl"] .shelf-caption p {
  letter-spacing: 0.02em;
}

main > h2,
.page-read > h2 {
  margin: 8px 0 0;
  font-family: var(--title);
  font-size: 2rem;
  font-weight: 500;
}

.section-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.section-list a {
  display: block;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--title);
  font-size: 1.35rem;
}

@media (max-width: 860px) {
  .entries { grid-template-columns: 1fr; gap: 36px; }
  .entry { max-width: min(720px, 100%); }
  .boards {
    grid-template-columns: 1fr;
    max-width: min(640px, 100%);
    margin-inline: auto;
    gap: 32px;
  }

  body[data-page="creations"] .boards {
    max-width: min(846px, 100%);
  }
}

@media (max-width: 720px) {
  .sheet,
  body[data-page="home"] .sheet {
    width: 100%;
    padding-block: 18px 24px;
    padding-inline: 16px;
  }

  body[data-page="home"] .entries {
    width: 100%;
  }

  .brand img {
    width: 68px;
    height: 68px;
  }

  body[data-page="home"] .brand img {
    width: 56px;
    height: 56px;
  }

  body[data-page="creations"] .brand img,
  :is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .brand img {
    width: 64px;
    height: 64px;
  }

  body[data-page="home"] .brand a {
    font-size: 1.35rem;
    gap: 8px;
  }

  body[data-page="home"] .langs button,
  body[data-page="home"] .langs span,
  body[data-page="creations"] .langs button,
  body[data-page="creations"] .langs span,
  :is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .langs button,
  :is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .langs span {
    font-size: 1.02rem;
  }

  body[data-page="home"] .langs button,
  body[data-page="creations"] .langs button,
  :is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .langs button {
    padding: 10px 3px;
  }

  .shelf-caption { margin-top: 12px; }

  body[data-page="home"] .foot a,
  body[data-page="home"] .contact-open { font-size: 1.15rem; }

  .foot { flex-wrap: wrap; }
}

@media (max-width: 720px) {
  html:has(body[data-page="home"]),
  html:has(body[data-page="creations"]),
  html:has(:is(body[data-page="about"], body[data-page="games"], body[data-page="pix"])) {
    background-attachment: scroll;
  }
}

@media (max-width: 520px) {
  body[data-page="home"] .brand img {
    width: 46px;
    height: 46px;
  }

  body[data-page="creations"] .brand img,
  :is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .brand img {
    width: 53px;
    height: 53px;
  }

  body[data-page="home"] .brand a {
    font-size: 1.12rem;
    gap: 6px;
  }

  body[data-page="home"] .langs,
  body[data-page="creations"] .langs,
  :is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .langs { gap: 10px; }

  body[data-page="home"] .langs button,
  body[data-page="home"] .langs span,
  body[data-page="creations"] .langs button,
  body[data-page="creations"] .langs span,
  :is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .langs button,
  :is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .langs span { font-size: 0.92rem; }

  body[data-page="home"] .langs button,
  body[data-page="creations"] .langs button,
  :is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .langs button { padding: 8px 2px; }

  .langs button,
  .foot-langs button { letter-spacing: 0; }
}

html.contact-lock,
html.contact-lock body {
  overflow: hidden;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.contact-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.contact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(62, 46, 32, 0.38);
}

.contact-card {
  position: relative;
  width: min(420px, 100%);
  margin: 0;
  padding: 40px 32px 32px;
  text-align: center;
  color: #5a3828;
  background: #fbf6ee;
  border: 1px solid #c4a15a;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(74, 58, 42, 0.22);
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

.contact-modal.is-open .contact-card {
  transform: none;
}

.contact-x {
  position: absolute;
  top: 10px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5a3828;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.contact-x:hover {
  background: rgba(196, 161, 90, 0.16);
}

.contact-mark {
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  fill: none;
  stroke: #b8924a;
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.contact-card h2 {
  margin: 0;
  font-family: var(--title);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.15;
  color: #5a3828;
}

.contact-name,
.contact-place {
  margin: 10px 0 0;
  font-family: var(--text);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  color: #5a3828;
}

.contact-place { margin-top: 4px; color: #6e5646; }

.contact-mail {
  display: inline-block;
  margin-top: 16px;
  color: #5a3828;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-mail:hover {
  text-decoration: underline;
  text-decoration-color: #c4a15a;
  text-underline-offset: 4px;
}

@media (max-width: 520px) {
  .contact-card {
    padding: 36px 20px 24px;
  }

  .contact-card h2 { font-size: 1.7rem; }
}

:is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) .sheet {
  width: min(950px, 100%);
  padding-inline: clamp(16px, 2vw, 40px);
}

:is(body[data-page="about"], body[data-page="games"], body[data-page="pix"]) main > h2,
.about-read > h2,
.page-read > h2 {
  margin-top: 0;
  text-align: center;
  color: #5a3828;
}

.back-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 44px;
  margin: 2px 0 12px;
  margin-left: 0;
  margin-right: auto;
  padding: 8px 16px;
  border: 1px solid rgba(196, 161, 90, 0.55);
  border-radius: 999px;
  background: rgba(251, 246, 238, 0.92);
  color: #5a3828;
  font-family: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(74, 58, 42, 0.12);
}

.about-read,
.page-read {
  padding: clamp(20px, 3vw, 32px) clamp(16px, 3vw, 28px) clamp(24px, 3vw, 36px);
  border-radius: 22px;
  background: rgba(247, 241, 228, 0.82);
  box-shadow: 0 10px 28px rgba(90, 56, 40, 0.05);
  overflow: visible;
}

.lego-album {
  width: min(460px, 100%);
  margin: 22px auto 0;
  direction: ltr;
}

.lego-frame {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.lego-stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 1px solid rgba(196, 161, 90, 0.55);
  border-radius: 22px;
  background: #fbf6ee;
  box-shadow: 0 8px 16px rgba(74, 58, 42, 0.12);
  overflow: hidden;
  cursor: pointer;
}

.lego-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
}

.lego-stage img.is-on {
  opacity: 1;
}

.lego-arrow {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(196, 161, 90, 0.55);
  border-radius: 999px;
  background: rgba(251, 246, 238, 0.92);
  color: #5a3828;
  font-family: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(74, 58, 42, 0.12);
  cursor: pointer;
}

.lego-arrow:hover {
  transform: translateY(-1px);
}

.lego-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.lego-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1px solid #c4a15a;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.lego-dots button.is-on {
  background: #5a3828;
  border-color: #5a3828;
}

.lego-light {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
}

.lego-light[hidden] {
  display: none;
}

.lego-light-back {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(62, 46, 32, 0.55);
  cursor: pointer;
}

.lego-light-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(960px, 100%);
  padding: 48px 12px 16px;
  background: #fbf6ee;
  border: 1px solid #c4a15a;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(74, 58, 42, 0.22);
}

.lego-light-img {
  width: 100%;
  max-height: min(78vh, 760px);
  object-fit: contain;
  background: transparent;
  touch-action: none;
}

.lego-light-x {
  position: absolute;
  top: 8px;
  inset-inline-end: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #5a3828;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 520px) {
  .lego-arrow { width: 36px; height: 36px; }
  .lego-light { padding: 8px; }
  .lego-light-panel { padding: 44px 8px 12px; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .lego-stage img { transition: none; }
}

.about-kicker {
  margin: 22px 0 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8d5f35;
}

.about-hello {
  margin: 8px 0 0;
  text-align: center;
  font-family: var(--title);
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  font-weight: 600;
  line-height: 1.15;
  color: #5a3828;
}

html[dir="rtl"] .about-kicker {
  letter-spacing: 0.04em;
  text-transform: none;
}

.about-lead {
  max-width: 46em;
  margin: 18px auto 0;
  text-align: center;
  color: #5a3828;
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  font-weight: 500;
  line-height: 1.55;
}

.about-collage {
  display: block;
  width: min(720px, 100%);
  height: auto;
  margin: 28px auto 0;
}

.about-collage[hidden] {
  display: none;
}

.about-film {
  display: block;
  width: min(280px, 78%);
  margin: 22px auto 0;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
  border: 1px solid #c4a15a;
  border-radius: 18px;
  background: #f4ebdd;
}

.about-block {
  max-width: 46em;
  margin: 28px auto 0;
  text-align: center;
}

.about-block:has(.lego-album) {
  max-width: 46em;
}

.about-block h3 {
  margin: 0;
  font-family: var(--title);
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  font-weight: 600;
  line-height: 1.2;
  color: #5a3828;
}

.about-block p {
  margin: 8px 0 0;
  color: #5a3828;
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  font-weight: 500;
  line-height: 1.55;
}


.about-pick {
  display: block;
  width: 100%;
  margin-top: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: center;
}

.about-pick .shelf-caption { margin-top: 0; }

.about-name {
  font-family: var(--title);
  font-size: clamp(1.2rem, 1.7vw, 1.6rem);
  font-weight: 600;
  line-height: 1.2;
  color: #5a3828;
  text-decoration: underline;
  text-decoration-color: #c4a15a;
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}

.about-note {
  display: block;
  max-width: 36em;
  margin-top: 8px;
  color: #6e5646;
  font-size: clamp(0.88rem, 1.15vw, 1rem);
  font-weight: 500;
  line-height: 1.4;
}

@media (hover: hover) and (pointer: fine) {
  .about-pick:hover .about-name { color: #4a3022; }
}

html.viewer-lock,
html.viewer-lock body { overflow: hidden; }

.viewer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.viewer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(62, 46, 32, 0.55);
}

.viewer-panel {
  position: relative;
  width: min(960px, 100%);
  margin: 0;
  padding: 42px 16px 16px;
  text-align: center;
  color: #5a3828;
  background: #fbf6ee;
  border: 1px solid #c4a15a;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(74, 58, 42, 0.22);
}

.viewer-x {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #5a3828;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.viewer-title {
  margin: 0 36px 12px;
  font-family: var(--title);
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  font-weight: 600;
  line-height: 1.2;
  color: #5a3828;
}

.viewer-img {
  width: auto;
  max-width: 100%;
  max-height: min(68vh, 760px);
  margin: 0 auto;
  object-fit: contain;
  background: transparent;
}

.viewer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
}

.viewer-step {
  min-width: 96px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #c4a15a;
  border-radius: 999px;
  background: transparent;
  color: #5a3828;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.viewer-step:disabled {
  opacity: 0.35;
  cursor: default;
}

.viewer-count {
  min-width: 4.5em;
  color: #6e5646;
  font-size: 0.95rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .viewer { padding: 8px; }
  .viewer-panel { padding: 40px 10px 12px; }
  .viewer-img { max-height: 62vh; }
  .viewer-step { min-width: 44px; padding: 8px 12px; }
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin-top: 28px;
  direction: ltr;
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.game-card img.pix-cover {
  object-fit: cover;
  object-position: center;
}

.game-card img,
.game-face {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  background: rgba(251, 246, 238, 0.78);
  box-shadow: 0 8px 16px rgba(74, 58, 42, 0.12);
}

.game-face {
  display: grid;
  place-items: center;
  border: 1px solid rgba(196, 161, 90, 0.7);
  color: #5a3828;
  font-family: var(--title);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 600;
}

.game-card .shelf-caption { margin-top: 12px; }

@media (hover: hover) and (pointer: fine) {
  .game-card img,
  .game-face {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
  }
  .game-card:hover img,
  .game-card:hover .game-face {
    transform: scale(1.03);
    box-shadow: 0 12px 20px rgba(74, 58, 42, 0.18);
  }
}

@media (max-width: 860px) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .game-grid { grid-template-columns: 1fr; }
}

.pix-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 8px;
}

.pix-stage {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  min-height: 0;
  margin-top: 8px;
  margin-bottom: -72px;
}

.pix-stage > .pix-widget,
.pix-stage > .pix-widget.is-open {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  width: min(340px, 100%);
  height: auto;
  margin: 0;
  flex: none;
}

.pix-stage .pix-launcher,
.pix-stage .pix-widget.is-open .pix-launcher {
  width: min(300px, 78vw);
  height: min(300px, 78vw);
  margin-inline: auto;
}

.pix-pad {
  position: relative;
  z-index: 1;
  width: min(420px, 90%);
  height: 78px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 250, 240, 0.96) 0 28%, rgba(228, 208, 164, 0.92) 46%, rgba(196, 161, 90, 0.28) 62%, transparent 70%);
  box-shadow:
    0 14px 22px rgba(90, 56, 40, 0.1),
    0 0 36px rgba(196, 161, 90, 0.38);
}

.pix-pad::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  top: 22px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fbf6ee 0%, #e7d7b4 100%);
  border: 1px solid rgba(184, 146, 74, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 245, 0.9),
    0 7px 0 rgba(168, 132, 72, 0.22);
}

.pix-pad::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  top: 31px;
  height: 8px;
  background: radial-gradient(circle, #8d6840 1.4px, transparent 1.6px) left center / 18px 8px repeat-x;
  opacity: 0.4;
}

.pix-hint {
  max-width: 34em;
  margin: 18px 0 0;
  text-align: center;
  color: #5a3828;
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  font-weight: 600;
  line-height: 1.45;
}

.pix-blurb {
  max-width: 36em;
  margin: 22px 0 0;
  text-align: center;
  white-space: pre-line;
  color: #5a3828;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  font-weight: 500;
  line-height: 1.5;
}
