:root {
  --ink: #161614;
  --ink-2: #5E5A52;
  --paper: #FAF7F0;
  --line: #E2DCD0;
  --green: #2E6B34;
  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #161614;
  color: var(--ink);
  font: 400 1rem/1.55 var(--body);
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; text-transform: lowercase; }
.defs { position: absolute; }

/* ---------- stage & scenes ---------- */
.stage { position: fixed; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.scene { position: absolute; inset: 0; visibility: hidden; }
.scene.active { visibility: visible; }
.layer { position: absolute; will-change: transform; }
.layer svg { display: block; width: 100%; height: 100%; }
.layer svg text { font-family: var(--display); }

/* side doors: the leaf is cut from the render and warped as it swings; .behind is the room past it */
.leaf { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: scale(var(--k, 1)); background-repeat: no-repeat; pointer-events: none; }
/* doorways sit on a sheet above the leaves; only the doorways themselves take clicks */
.layer svg.over { position: absolute; inset: 0; pointer-events: none; }
.over .hot { pointer-events: auto; }
/* the warm light through an open door: an overlay tint that brightens and warms the wall and floor, and an amber core in the gap */
.glow { opacity: 0; pointer-events: none; }
.glow-tint { mix-blend-mode: overlay; }
.glow-core { mix-blend-mode: screen; }
.glow-gap { fill: #FFB766; }
.glow-wide { fill: #FF9A3C; }
.behind { opacity: 0; }
.behind.on { opacity: 1; }
.lamp { opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.lamp-on .lamp { opacity: 1; }

/* hotspots (doorways) */
.hot { cursor: pointer; outline: none; }
.hot-area { fill: transparent; stroke: var(--green); stroke-width: 6; stroke-opacity: 0; transition: stroke-opacity .2s ease; }
/* no outline on hover: only keyboard focus shows where you are */
.hot:focus-visible .hot-area { stroke-opacity: 1; }
.hot-label { pointer-events: none; transition: opacity .2s ease; }
.hot-label.off { display: none; }
.hot-label rect { fill: rgba(250, 247, 240, .94); stroke: var(--ink); stroke-width: 2; }
.hot-label text { fill: var(--ink); font-size: 18px; font-weight: 600; text-anchor: middle; }
.hot:hover .hot-label rect, .hot:focus-visible .hot-label rect { fill: var(--ink); }
.hot:hover .hot-label text, .hot:focus-visible .hot-label text { fill: var(--paper); }

.doors {
  position: absolute; left: 38.75%; top: 23%; width: 22.5%; height: 67%;
  pointer-events: none;
  perspective: 1400px; perspective-origin: 50% 50%;
}
.leaf-l, .leaf-r {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
  transition: transform 1.1s cubic-bezier(.6, 0, .25, 1);
}
.leaf-l { left: 0; transform-origin: left center; }
.leaf-r { right: 0; transform-origin: right center; }
.open .leaf-l { transform: rotateY(78deg); }
.open .leaf-r { transform: rotateY(-78deg); }

/* ---------- brand ---------- */
.brand, .corner, .token {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  background: rgba(250, 247, 240, .9);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .4);
}
.brand { position: fixed; z-index: 6; top: 16px; left: 16px; }
.corner-wrap { position: fixed; z-index: 6; top: 16px; right: 16px; display: flex; gap: 8px; }
.corner { gap: 14px; }
.token { font: 700 1.05rem/1 var(--display); letter-spacing: -0.03em; }
/* the token's official spelling keeps its capital */
.token { text-transform: none; }
.token:hover { color: var(--green); }
.wordmark { font: 700 1.15rem/1 var(--display); letter-spacing: -0.03em; }
.corner a { display: grid; place-items: center; width: 18px; height: 18px; }
.corner a:hover { color: var(--green); }
.corner svg { width: 100%; height: 100%; }

/* doorbell on the front */
.bell { cursor: pointer; outline: none; }
.bell-area { stroke-width: 4; }
.bell-wave { fill: none; stroke: #FAF7F0; stroke-width: 4; opacity: 0; transform-box: fill-box; transform-origin: center; }
.bell.rung .bell-wave { animation: wave 1s ease-out 2; }
.bell.rung .bell-wave-2 { animation-delay: .25s; }
.bell:not(.rung) .bell-wave:not(.bell-wave-2) { animation: wave 2.8s ease-out infinite; }

/* his chat bubbles: "coming" from behind the front doors, the greeting above his head in the hall */
.say, .greet {
  position: absolute; z-index: 2; margin: 0;
  transform: translate(-50%, -100%) translateY(8px);
  padding: 12px 18px; border-radius: 18px 18px 18px 4px;
  background: var(--paper); color: var(--ink);
  font: 600 1.05rem/1.2 var(--display);
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease, transform .5s var(--ease);
}
.say { white-space: nowrap; }
.greet { width: min(300px, 80vw); padding-right: 40px; }
.say.on, .greet.on { opacity: 1; transform: translate(-50%, -100%); }
.greet.on { pointer-events: auto; }
.say::before, .greet::before { content: "lento"; display: block; margin-bottom: 4px; font: 500 .68rem/1 var(--mono); color: var(--green); }
.greet p { margin: 0; }
.greet-x {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px;
  display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: none; cursor: pointer;
  font: 400 1.3rem/1 var(--body); color: var(--ink-2);
}
.greet-x:hover { background: var(--line); color: var(--ink); }

/* ---------- ui over the scene ---------- */
.back {
  position: fixed; z-index: 5; left: 50%; bottom: 24px; transform: translateX(-50%);
  height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--ink); background: rgba(250, 247, 240, .94);
  font: 600 .95rem/1 var(--display); cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.back:hover { background: var(--ink); color: var(--paper); }
.back:not([hidden]) { display: inline-flex; align-items: center; gap: 8px; }
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.back { white-space: nowrap; }
.edge-go { display: none; }
.back[hidden] { display: none; }

.hint {
  position: fixed; z-index: 5; left: 50%; top: 20px; transform: translateX(-50%);
  margin: 0; padding: 8px 14px; border-radius: 999px;
  background: rgba(22, 22, 20, .72); color: var(--paper);
  font: .8rem/1 var(--mono); text-transform: none; white-space: nowrap;
  transition: opacity .6s ease; pointer-events: none;
}
.hint.fade { opacity: 0; }

.card {
  position: fixed; z-index: 5; left: 24px; bottom: 24px;
  width: 380px; max-height: calc(100dvh - 120px); overflow-y: auto;
  padding: 26px 26px 22px;
  background: rgba(250, 247, 240, .96);
  border: 1px solid var(--ink); border-radius: 16px;
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .5s ease, transform .6s var(--ease);
}
.card.on { opacity: 1; transform: none; pointer-events: auto; }
.card:empty { display: none; }
.kicker { margin: 0 0 10px; font: .78rem/1 var(--mono); color: var(--green); text-transform: none; }
.card h2 { margin: 0 0 14px; font: 700 2.1rem/.95 var(--display); letter-spacing: -0.045em; }
.card p { margin: 0 0 12px; }
.card h3 { margin: 18px 0 6px; font: 600 1.1rem/1.2 var(--display); }
.card .muted { color: var(--ink-2); font-size: .9rem; }
.card-toggle { display: none; }
/* the studio's blackout shades: the dark render fades in over the sunny one */
.shade-img { opacity: 0; transition: opacity 1.4s ease; pointer-events: none; }
.shades-down .shade-img { opacity: 1; }
.shades-hot .hot-area { stroke: none; }
/* the corkboard: little post-its in the room, dimmed with the shades down */
.board-note polygon { fill: #EDD06A; opacity: .93; }
.board-note circle { fill: #C8402F; }
.board-note { transition: filter 1.4s ease; }
.shades-down .board-note { filter: brightness(.36) sepia(.5); }
.board-view {
  position: fixed; inset: 0; z-index: 8;
  display: grid; place-items: center; overflow: hidden;
  background: #1B1612; opacity: 0; transition: opacity .4s ease;
}
.board-view.on { opacity: 1; }
.board-view[hidden] { display: none; }
.board-bg { position: absolute; inset: -40px; background: center / cover; filter: blur(14px) brightness(.55); }
.board {
  position: relative; container-type: inline-size;
  width: min(960px, calc(100vw - 32px), (100dvh - 140px) * 1.17);
  border: clamp(8px, 1.6vw, 16px) solid #D8B47C; border-radius: 4px;
  background-color: #B98A58;
  /* cork: dark and light grains from two noise layers */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .29 0 0 0 0 .17 0 0 0 0 .07 0 0 0 1.6 -.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='2' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .75 0 0 0 1.5 -.78'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 40px rgba(60, 35, 12, .45), 0 30px 60px -20px rgba(0, 0, 0, .7);
  transform: scale(.94); transition: transform .5s var(--ease);
}
.board-view.on .board { transform: none; }
.note {
  position: absolute; aspect-ratio: 1; margin: 0; padding: 3.4cqi 1.8cqi 1.8cqi;
  background: linear-gradient(160deg, #FBE47E, #F2D25E);
  box-shadow: 0 1cqi 1.6cqi -0.6cqi rgba(40, 25, 5, .55);
  transform: rotate(var(--tilt));
  font: 600 3.3cqi/1.15 "Caveat", cursive; color: #2B2618; text-transform: none;
  overflow-wrap: anywhere;
}
/* a red pin at the top */
.note::before {
  content: ""; position: absolute; left: 50%; top: .9cqi; width: 1.8cqi; height: 1.8cqi; margin-left: -.9cqi;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F07A68, #B8321F 70%);
  box-shadow: .3cqi .5cqi .6cqi rgba(0, 0, 0, .35);
}
.board-back { z-index: 9; }

/* the musers wall: his six frames or the visitor's musers, each empty frame with a slow shimmer, and the mint draft under them */
.gallery-view {
  position: fixed; inset: 0; z-index: 8;
  overflow: hidden auto; overscroll-behavior: contain;
  /* the studio wall the frames hang on: warm plaster with the evening sun across it */
  background:
    linear-gradient(118deg, rgba(255, 244, 222, .55) 8%, rgba(255, 244, 222, 0) 38%, rgba(255, 236, 204, .35) 56%, rgba(255, 236, 204, 0) 78%),
    linear-gradient(160deg, #F3DDBD, #E9C9A0 55%, #DDB88C);
  opacity: 0; transition: opacity .4s ease;
}
.gallery-view.on { opacity: 1; }
.gallery-view[hidden] { display: none; }
/* only a trace of the room stays in the wall */
.gallery-view .board-bg { position: fixed; opacity: .1; filter: blur(30px) saturate(.6); }
.gallery {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: safe center; gap: clamp(12px, 2vh, 20px);
  width: 100%; min-height: 100%; padding: 28px 16px 92px;
  transform: scale(.96); transition: transform .5s var(--ease);
}
.gallery-view.on .gallery { transform: none; }
/* everything shares one width, small enough that the wall fits the window without scrolling where it can */
.gallery > * { width: min(760px, 100%, max(440px, (100dvh - 400px) * 1.5)); }
.gallery-head { position: relative; z-index: 1; text-align: center; color: var(--ink); }
.gallery-head .kicker { margin: 0 0 8px; }
.gallery-head h2 { margin: 0 0 6px; font: 700 2.4rem/.95 var(--display); letter-spacing: -0.045em; }
.gallery-head p:last-child { margin: 0; color: #6B5740; }
/* rows of frames, centred, so 4 over 3 or 5 over 4 sit like pictures on a wall */
.frames { --gap: clamp(8px, 2vw, 22px); display: grid; gap: var(--gap); }
.frames:empty { display: none; }
.frame-row { display: flex; justify-content: center; gap: var(--gap); }
.frames figure { margin: 0; display: grid; gap: 8px; justify-items: center; flex: 0 0 calc((100% - var(--gap) * (var(--cols) - 1)) / var(--cols)); min-width: 0; }
.wall-empty {
  margin: 0; padding: clamp(48px, 14vh, 120px) 16px; text-align: center;
  font: 600 1.3rem/1.2 var(--display); letter-spacing: -0.02em; color: #7A6248;
}
.wall-empty[hidden] { display: none; }
.wall-line:empty { display: none; }
.frame {
  width: 100%; aspect-ratio: 1; position: relative; overflow: hidden;
  border: clamp(5px, 1vw, 9px) solid #C99A62; padding: clamp(8px, 2vw, 18px);
  background: #F4EADB content-box; box-shadow: inset 0 0 0 clamp(8px, 2vw, 18px) #FBF6EE, 6px 14px 22px -10px rgba(92, 58, 24, .5);
}
.frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.frames figure:not(.hung) .frame::after {
  content: ""; position: absolute; inset: clamp(8px, 2vw, 18px);
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%) -150% 0 / 250% 100% no-repeat;
  animation: shimmer 4.5s ease-in-out infinite;
}
.frames figure:nth-child(2) .frame::after { animation-delay: .4s; }
.frames figure:nth-child(3) .frame::after { animation-delay: .8s; }
.frame-row:nth-child(2) figure:nth-child(1) .frame::after { animation-delay: .2s; }
.frame-row:nth-child(2) figure:nth-child(2) .frame::after { animation-delay: .6s; }
.frame-row:nth-child(2) figure:nth-child(3) .frame::after { animation-delay: 1s; }
@keyframes shimmer { 0%, 30% { background-position: -150% 0; } 70%, 100% { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { .frames .frame::after { animation: none !important; } }
/* a small brass plaque under each frame */
.frames figcaption {
  padding: 4px 10px; border-radius: 3px; background: linear-gradient(180deg, #D9B77E, #B48A4E);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  font: .68rem/1.2 var(--mono); color: #2B2114; text-transform: none; white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .45);
}
/* an empty frame says so on its own card */
.frame span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 600 clamp(.85rem, 2vw, 1.15rem)/1 var(--display); letter-spacing: -0.02em; color: #B9A88C;
}
/* the quantity picker and the mint button share one pill, half each */
.gallery > .wall-mint {
  position: relative; z-index: 1; display: flex; align-items: center; width: min(420px, 100%); height: 50px; border-radius: 999px;
  border: 1px solid var(--ink); background: rgba(250, 247, 240, .9);
}
.wall-mint .qty { flex: 0 0 50%; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; }
.wall-mint .qty-less, .wall-mint .qty-more {
  width: 32px; height: 32px; border-radius: 50%; border: 0; background: none;
  font: 600 1.1rem/1 var(--display); cursor: pointer;
}
.wall-mint .qty-less:hover:not(:disabled), .wall-mint .qty-more:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.wall-mint .qty-less:disabled, .wall-mint .qty-more:disabled { opacity: .3; cursor: default; }
.qty-n { min-width: 2ch; text-align: center; font: 700 1.1rem/1 var(--display); }
.wall-mint .wall-go { flex: 0 0 50%; height: 100%; min-width: 0; padding: 0 12px; border-width: 0 0 0 1px; border-radius: 0 999px 999px 0; }
.wall-mint .wall-go:disabled { background: none; }
/* switched off until the mint opens: grey and faded, the same for connect wallet */
.gallery > .wall-mint.off { border-color: #A99F90; background: rgba(238, 233, 224, .7); color: #8E877B; box-shadow: none; }
.wall-mint.off .wall-go { border-color: #A99F90; color: #8E877B; }
.wall-mint.off .qty-less, .wall-mint.off .qty-more { opacity: .45; }
.wall-go {
  height: 46px; min-width: 150px; padding: 0 26px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  font: 600 1rem/1 var(--display); cursor: pointer;
}
.wall-go:disabled { background: rgba(250, 247, 240, .9); color: var(--ink-2); cursor: default; }
/* the wall, with the empty-wall line or the explanation laid over the same spot */
.wall { display: grid; }
.wall > * { grid-area: 1 / 1; }
/* under the card the frames are blurred, a sixth bigger, and the outer ones move apart a little,
   so they look out past the card's edges */
.wall.veiled { margin-top: 14px; }
.wall.veiled .frames { filter: blur(9px) saturate(.85); opacity: .8; pointer-events: none; transform: scale(1.16); }
.wall.veiled .frame-row figure:first-child { transform: translateX(-16%); }
.wall.veiled .frame-row figure:last-child { transform: translateX(16%); }
.wall.veiled .frame::after { display: none; }
.wall-about {
  z-index: 1; place-self: center; width: min(680px, 100%); padding: 24px 28px 20px; border-radius: 16px;
  border: 1px solid var(--ink); background: rgba(250, 247, 240, .96);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .6);
}
.wall-about[hidden] { display: none; }
.wall-about p { margin: 0 0 9px; font-size: .92rem; line-height: 1.38; }
.wall-about p:first-child { font: 600 1.15rem/1.25 var(--display); letter-spacing: -0.02em; }
.wall-about p:last-child { margin: 0; }
.wall-about .muted, .muser-data .muted { color: var(--ink-2); font-size: .85rem; }
.wall-about .ticker { text-transform: none; }
.frame[data-i] { cursor: pointer; transition: transform .25s var(--ease); }
.frame[data-i]:hover, .frame[data-i]:focus-visible { transform: translateY(-3px); }
/* one muser up close */
.muser-view {
  position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: rgba(20, 15, 11, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.muser-view[hidden] { display: none; }
.muser-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: center;
  width: min(760px, 100%); padding: 22px; border-radius: 18px;
  border: 1px solid var(--ink); background: rgba(250, 247, 240, .97);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
}
.muser-data { display: grid; gap: 12px; }
.muser-data h3 { margin: 0; font: 700 1.7rem/1 var(--display); letter-spacing: -0.04em; }
.muser-data dl { margin: 0; display: grid; gap: 6px; }
.muser-data dl div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.muser-data dt { color: var(--ink-2); font-size: .85rem; }
.muser-data dd { margin: 0; font: 600 .95rem/1.3 var(--display); }
.muser-data p { margin: 0; }
.muser-x {
  position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--ink); background: var(--paper); font: 600 1.1rem/1 var(--display); cursor: pointer;
}
.muser-x:hover { background: var(--ink); color: var(--paper); }
.wall-note { margin: -6px 0 0; text-align: center; font-size: .88rem; color: #6B5740; }
/* connect wallet: a pill in the corner, where the site's own corner sits */
.wall-connect {
  position: fixed; z-index: 9; top: 16px; right: 16px; height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--ink); background: rgba(250, 247, 240, .94);
  font: 600 .95rem/1 var(--display); cursor: pointer;
}
.wall-connect:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.wall-connect:disabled { border-color: #A99F90; background: rgba(238, 233, 224, .7); color: #8E877B; cursor: default; }
@media (max-width: 700px) {
  .gallery { align-content: start; padding-top: 64px; }
  .gallery-head h2 { font-size: 1.9rem; }
  .wall-connect { top: 12px; right: 12px; height: 36px; padding: 0 14px; }
  .muser-card { grid-template-columns: minmax(0, 1fr); }
  /* on a phone the mint button and the line under it stay at the bottom of the screen, on a strip
     of wall, while the page scrolls under them; the space after the card lets its last lines
     scroll clear. the way back moves up to the corner opposite connect wallet */
  .gallery { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .gallery > .wall-mint {
    position: fixed; z-index: 9; left: 12px; right: 12px; bottom: calc(40px + env(safe-area-inset-bottom)); width: auto;
    background: var(--paper); box-shadow: 0 10px 30px -8px rgba(60, 35, 12, .55);
  }
  .gallery > .wall-mint.off { background: #ECE7DD; box-shadow: 0 10px 30px -8px rgba(60, 35, 12, .35); }
  .gallery > .wall-note {
    position: fixed; z-index: 9; left: 0; right: 0; bottom: 0; width: auto; margin: 0;
    padding: 76px 12px calc(12px + env(safe-area-inset-bottom)); pointer-events: none;
    background: linear-gradient(180deg, rgba(226, 192, 150, 0), #E2C096 38%);
  }
  .gallery > .wall-note { z-index: 8; }
  .gallery-view .gallery-back { top: 12px; bottom: auto; left: 12px; transform: none; height: 36px; padding: 0 14px; font-size: .9rem; }
  .wall.veiled { margin-top: 0; }
  .wall.veiled .frames, .wall.veiled .frame-row figure { transform: none !important; }
  .frames figcaption { padding: 3px 6px; font-size: .6rem; }
}
.gallery-back { z-index: 9; }

/* the safe behind augustus */
.safe-img { opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.safe-open .safe-img { opacity: 1; }
/* the monitor in the office: a small desktop on its screen */
.screen { transition: opacity .25s ease; pointer-events: none; }
.mini-bar { font: 700 7px var(--display); fill: var(--ink); }
.mini-name { font: 700 9px var(--display); fill: var(--ink); text-anchor: middle; }
/* the monitor shows the lock screen until someone has logged in */
.mini-desk, .desk-unlocked .mini-lock { display: none; }
.desk-unlocked .mini-desk { display: inline; }
.monitor-hot .hot-area { stroke: none; }
/* closed and open safe each have their own screen: when it's open lento's head covers the screen's edge */
.screen-open, .safe-open .screen-closed { opacity: 0; }
.safe-open .screen-open { opacity: 1; }
.monitor-open, .safe-open .monitor-closed { display: none; }
.safe-open .monitor-open { display: inline; }

/* lento's computer, full screen */
.desktop {
  position: fixed; inset: 0; z-index: 8; overflow: hidden;
  background: linear-gradient(#F6EFE4, #E4D3BA);
  opacity: 0; transform: scale(1.04); transition: opacity .35s ease, transform .45s var(--ease);
}
.desktop.on { opacity: 1; transform: none; }
.desktop[hidden] { display: none; }
.desk-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 32px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
  background: rgba(255, 253, 248, .75); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 500 .85rem/1 var(--body);
}
.desk-bar strong { font: 700 .95rem/1 var(--display); letter-spacing: -0.02em; }
.desk-clock { font: .8rem/1 var(--mono); }
.desk-wall { position: absolute; inset: 32px 0 0; display: grid; place-items: center; pointer-events: none; }
.desk-wall img { width: min(34vw, 34vh); opacity: .92; }
.desk-back { z-index: 9; }

/* the lock screen over the desktop */
.desk-lock {
  position: absolute; inset: 32px 0 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(246, 239, 228, .35);
  backdrop-filter: blur(22px) saturate(1.1); -webkit-backdrop-filter: blur(22px) saturate(1.1);
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.unlocked .desk-lock { opacity: 0; visibility: hidden; }
/* the emblem appears with the desktop, not as a blur behind the lock */
.desk-wall { transition: opacity .5s ease; }
.desktop:not(.unlocked) .desk-wall { opacity: 0; }
.lock-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5); }
.lock-name { margin: 0; font: 700 1.3rem/1 var(--display); letter-spacing: -0.02em; }
.lock-form {
  display: flex; align-items: center; width: min(260px, 80vw); height: 40px; padding: 0 4px 0 14px;
  border-radius: 999px; background: rgba(255, 253, 248, .75); border: 1px solid rgba(22, 22, 20, .15);
}
.lock-form.wrong { animation: shake .3s ease 2; }
/* no square outline inside the rounded field; the field itself shows it's active */
.lock-input:focus, .lock-input:focus-visible { outline: none; box-shadow: none; }
.lock-form:focus-within { border-color: rgba(22, 22, 20, .4); box-shadow: 0 0 0 3px rgba(22, 22, 20, .08); }
.lock-input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: 500 16px/1 var(--body); color: var(--ink); text-transform: none; }
.lock-input::placeholder { color: var(--ink-2); text-transform: lowercase; }
.lock-go { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: var(--paper); cursor: pointer; }
.lock-go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lock-hint { margin: 0; font: .85rem/1.3 var(--mono); color: var(--ink-2); text-transform: none; }

/* his projects: a column of icons down the right side, like a real desktop */
.desk-icons {
  position: absolute; top: 52px; right: 20px; margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 14px;
  transition: opacity .5s ease;
}
.desktop:not(.unlocked) .desk-icons { opacity: 0; visibility: hidden; }
.desk-icon {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 96px; padding: 8px 4px;
  border: 0; border-radius: 10px; background: none; cursor: pointer;
}
.desk-icon:hover, .desk-icon:focus-visible, .desk-icon.open { background: rgba(22, 22, 20, .08); }
.desk-icon:focus-visible { outline: 2px solid rgba(22, 22, 20, .4); outline-offset: 0; }
.icon-tile {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 13px;
  background: var(--tile); color: var(--paper);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 18px -10px rgba(0, 0, 0, .6);
}
.icon-tile svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-label { font: 500 .75rem/1.2 var(--body); text-align: center; text-wrap: balance; }

/* a project's window */
.desk-window {
  position: absolute; top: 50%; left: 50%; width: min(360px, calc(100vw - 32px));
  transform: translate(-50%, -50%); overflow: hidden;
  border-radius: 12px; background: var(--paper); border: 1px solid rgba(22, 22, 20, .12);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45);
}
.desk-window[hidden] { display: none; }
.win-bar {
  position: relative; display: flex; align-items: center; justify-content: center; height: 34px;
  border-bottom: 1px solid var(--line); background: rgba(22, 22, 20, .03);
}
.win-bar h2 { margin: 0; font: 600 .85rem/1 var(--display); }
.win-close {
  position: absolute; left: 12px; top: 50%; width: 12px; height: 12px; margin-top: -6px; padding: 0;
  border: 0; border-radius: 50%; background: #E0645A; cursor: pointer;
}
.win-body { margin: 0; padding: 18px 20px 22px; font: .9rem/1.5 var(--body); color: var(--ink-2); }

/* a document window: wider, and it scrolls */
.desk-window.doc-window { width: min(820px, calc(100vw - 32px)); }
.doc-window .win-body { max-height: min(78vh, calc(100dvh - 140px)); overflow-y: auto; padding: 22px 28px 30px; color: var(--ink); }
.doc { font: .9rem/1.55 var(--body); text-transform: none; }
.doc h1 { margin: 0 0 4px; font: 600 1.5rem/1.2 var(--display); }
.doc h2 { margin: 28px 0 8px; font: 600 1.1rem/1.25 var(--display); }
.doc h3 { margin: 20px 0 6px; font: 600 .95rem/1.3 var(--display); }
.doc p, .doc ul, .doc ol { margin: 0 0 10px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: 4px; }
.doc-meta { color: var(--ink-2); }
.doc code { font: .82em/1 var(--mono); overflow-wrap: anywhere; }
.doc-table { overflow-x: auto; margin: 0 0 12px; }
.doc table { border-collapse: collapse; font-size: .82rem; line-height: 1.4; min-width: 100%; }
.doc th, .doc td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc th { font-weight: 600; }
.doc-figure { margin: 8px 0 14px; }
.doc-figure svg { display: block; width: 100%; height: auto; }
.doc-photo img { display: block; width: 100%; height: auto; border-radius: 8px; }
.doc-figure figcaption { margin-top: 6px; font-size: .8rem; color: var(--ink-2); }
.av-lines { stroke: var(--ink-2); }
.av-edge-fill { fill: var(--ink-2); }
.av-box rect { fill: none; stroke: var(--ink-2); stroke-width: 1.25; }
.av-main rect { fill: rgba(63, 127, 166, .12); stroke: #3F7FA6; stroke-width: 2; }
.av-name, .av-sub, .av-label { text-anchor: middle; }
.av-name { font-weight: 600; fill: var(--ink); }
.av-sub, .av-label { font-size: 11.5px; fill: var(--ink-2); }
.av-label.av-left { text-anchor: start; }

/* phones: the icons sit in a row under the bar */
@media (max-width: 600px) {
  .desk-icons { left: 8px; right: 8px; flex-direction: row; justify-content: center; gap: 4px; }
  .desk-icon { width: 80px; }
}

/* the dial: a full-screen close-up of the safe door */
.safe-view {
  position: fixed; inset: 0; z-index: 8;
  display: grid; place-items: center; overflow: hidden;
  background: #1B1612; opacity: 0; transition: opacity .4s ease;
}
.safe-view.on { opacity: 1; }
.safe-view[hidden] { display: none; }
.safe-bg {
  position: absolute; inset: -40px;
  background: url(img/scenes/office-v3-safedoor.jpg) center / cover;
  filter: blur(14px) brightness(.5);
}
.safe-lock { position: relative; display: grid; justify-items: center; gap: 18px; transition: opacity .5s ease, transform .6s var(--ease); }
.album-on .safe-lock { opacity: 0; transform: scale(.9); pointer-events: none; }
.dial { width: min(78vw, 52vh); height: auto; touch-action: none; cursor: grab; outline: none; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .55)); }
.dial:active { cursor: grabbing; }
.dial .tick { stroke: #2A2724; stroke-width: 1; }
.dial .grip { stroke: #3B3834; stroke-width: 1.4; }
.dial-num { fill: #2A2724; font: 700 9px var(--display); text-anchor: middle; }
.dial-set { fill: transparent; cursor: pointer; }
.dial-mark { fill: #D9493B; }
.dial:focus-visible { filter: drop-shadow(0 0 0 2px var(--green)); }
.safe-display {
  display: flex; gap: 14px; margin: 0; padding: 10px 18px; border-radius: 10px;
  background: rgba(10, 9, 8, .7); color: #FFE3A3;
  font: 600 1.4rem/1 var(--mono); letter-spacing: .08em;
  transition: color .2s ease;
}
.safe-stats {
  order: 3; margin: 0; padding: 6px 12px; border-radius: 999px;
  background: rgba(10, 9, 8, .55); color: #E9E1D2;
  font: .8rem/1 var(--mono); text-transform: none;
}
.safe-stats span { color: #FFE3A3; }
.wrong .safe-display { color: #FF6B5A; animation: shake .3s ease 2; }
.unlocked .safe-display { color: #7FC48A; }
.album {
  position: absolute; width: min(440px, calc(100% - 32px));
  padding: 26px; border-radius: 16px; border: 1px solid var(--ink);
  background: rgba(250, 247, 240, .97);
  opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .6s var(--ease);
}
.album-on .album { opacity: 1; transform: none; }
.album h2 { margin: 0 0 12px; font: 700 2.1rem/.95 var(--display); letter-spacing: -0.045em; }
.album p { margin: 0 0 14px; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.album .slot { aspect-ratio: 9 / 16; border: 1px dashed var(--ink-2); border-radius: 8px; display: grid; place-items: center; font: .72rem/1 var(--mono); color: var(--ink-2); }
.album .like { display: grid; gap: 4px; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; }
.like-zoom { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px; border: 0; background: rgba(10, 9, 8, .88); cursor: zoom-out; }
.like-zoom[hidden] { display: none; }
.like-zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); }
/* the likes are notification strips: one under the other */
.album-grid.filled { grid-template-columns: 1fr; max-height: 50dvh; overflow-y: auto; }
.album .like img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.album .cracked { margin: 16px 0 0; font-weight: 600; }
/* the disclaimer: a deep red that stays readable on the cream card */
.album .muted { margin: 8px 0 0; color: #B42318; font-size: .9rem; }
/* the token's official spelling keeps its capital */
.album .ticker { text-transform: none; }
.safe-back { z-index: 9; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* hidden things give nothing away on hover: no outline, only the pointer */
.safe-hot .hot-area, .safe-door .hot-area, .safe-knob .hot-area { stroke: none; }
/* closed: only the picture is clickable; open: the opened picture and the knob + handle */
.safe-door, .safe-knob, .safe-open .safe-hot { display: none; }
.safe-open .safe-door, .safe-open .safe-knob { display: inline; }


.noscript { position: fixed; inset: auto 20px 20px; color: var(--paper); }
.noscript a { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* ---------- motion ---------- */
@keyframes wave { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- phones ---------- */
@media (max-width: 700px) {
  .card {
    left: 12px; right: 12px; bottom: 76px; width: auto;
    max-height: 22dvh; padding: 18px 18px 12px;
  }
  .card.open { max-height: 62dvh; }
  .card h2 { font-size: 1.6rem; margin-bottom: 10px; }
  .card-toggle {
    display: block; position: absolute; right: 14px; top: 14px;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--ink); background: none; cursor: pointer;
  }
  .card-toggle::before { content: "+"; font: 600 1.1rem/1 var(--display); }
  .card.open .card-toggle::before { content: "−"; }
  .back { bottom: 18px; }
  .hint { top: 60px; }
  .brand, .corner, .token { height: 36px; padding: 0 14px; }
  .brand { top: 12px; left: 12px; }
  .corner-wrap { top: 12px; right: 12px; gap: 6px; }
  .token { font-size: .95rem; }
  .edge-go:not([hidden]) {
    display: block; position: fixed; z-index: 4; top: 38%;
    height: 38px; padding: 0 14px; border-radius: 999px;
    border: 1px solid var(--ink); background: rgba(250, 247, 240, .94);
    font: 600 .8rem/1 var(--display); white-space: nowrap; cursor: pointer;
  }
  #go-left { left: 10px; }
  #go-right { right: 10px; }
}

/* Solana badge and local house interactions. */
.token { gap: 9px; }
.chain-tag { font: 600 .66rem/1 var(--mono); color: #654493; text-transform: none; letter-spacing: 0; }
.safe-help { position: relative; max-width: 350px; margin: 0; padding: 0 20px; text-align: center; color: #f8eedb; font-size: .8rem; }
.safe-help strong { color: #ffe3a3; font-family: var(--mono); }
.album-on .safe-help { display: none; }
.wall-about a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.wall-about { max-height: min(52dvh, 410px); overflow-y: auto; }
@media(max-width:380px) { .brand { padding: 0 10px; } .wordmark { font-size: 1rem; } .corner { gap: 10px; padding: 0 12px; } .token { padding: 0 10px; font-size: .83rem; gap: 6px; } .chain-tag { font-size: .58rem; } }
