:root {
  color-scheme: light;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  color: #24252a;
  background: #1b1e27;
  --paper: #f4f2eb;
  --line: #bdbbb5;
  --metal: linear-gradient(#fff, #ededed 49%, #dedede 50%, #c7c7c7);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(ellipse 750px 460px at 50% 0%, #45505e 0%, transparent 90%),
    repeating-linear-gradient(135deg, #171a22 0 2px, #1c2029 2px 8px);
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid #426ce3;
  outline-offset: 3px;
}
.intro :focus-visible, .view-stage :focus-visible { outline-color: #fcdf6d; }

.page {
  width: min(1016px, calc(100% - 48px));
  margin: 26px auto 44px;
  border: 1px solid #171a21;
  background: var(--paper);
  box-shadow: 0 0 0 1px #595e6a, 0 18px 64px #090b117d;
}

.masthead {
  min-height: 48px;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #626262;
  border-bottom: 1px solid #030509;
  background: #2e2e2e;
}

.masthead-blinkie { width: min(58%, 245px); }
.masthead-gift { width: auto; height: 33px; flex: none; }

.obc-banner {
  width: 100%;
  height: clamp(88px, 17vw, 160px);
  object-fit: cover;
  object-position: center bottom;
  border-bottom: 1px solid #11161f;
}

.intro {
  isolation: isolate;
  background: #252b37;
  color: #fffbf2;
  overflow: hidden;
  display: grid;
  grid-template-columns: 41% minmax(0, 1fr);
  border-bottom: 4px solid #9e1c25;
}

.intro-copy {
  z-index: 1;
  padding: 27px 28px 32px 37px;
  background: linear-gradient(100deg, #20242f 42%, #252b37 100%);
}
.intro h1 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 39px);
  line-height: 1.13;
}
.intro h1 span { display: block; }
.name-art {
  display: block;
  width: min(100%, 302px);
  margin: 0 0 -9px -6px;
}
.intro p {
  max-width: 34ch;
  font-size: .875rem;
  line-height: 1.55;
  color: #e3e5e8;
  margin: 23px 0 22px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #777;
  border-radius: 0;
  background: var(--metal);
  color: #333;
  line-height: 1.22;
  font-size: .875rem;
  font-weight: normal;
  text-decoration: none;
  text-align: center;
}
.button:not(:disabled):hover {
  background: #6e99c9;
  border-color: #333;
  color: #111;
}
.button-metal[aria-pressed="true"] {
  background: #ccdced;
  border-color: #3b526b;
  box-shadow: inset 1px 1px #8da7c4;
}
.button-primary {
  border-color: #303030;
  font-weight: bold;
}
.button:active:not(:disabled) { box-shadow: inset 0 2px 4px #080b143f; }
.button:disabled { opacity: .59; cursor: default; }
#open-gifts { padding-inline: 14px; }

.hero-display {
  position: relative;
  min-height: 350px;
  background:
    radial-gradient(ellipse at 50% 66%, #657582 0%, #37414f 49%, transparent 76%),
    repeating-linear-gradient(135deg, #303843 0 2px, #2b3340 2px 6px);
}
.hero-display::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #252b37, transparent 25%);
  z-index: 2;
  pointer-events: none;
}
.hero-plinth {
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  background: repeating-conic-gradient(#171d27 0% 25%, #303c49 0% 50%) 0 0 / 48px 27px;
  clip-path: polygon(12% 0, 98% 0, 100% 100%, 0 100%);
  opacity: .7;
  mask-image: linear-gradient(transparent, #000 68%);
}
.hero-renders {
  position: absolute;
  inset: 0 5% -3% 2%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-renders img { filter: drop-shadow(0 13px 11px #070a1090); }
.hero-head { position: absolute; width: 53%; z-index: 1; transform: translate(-2%, -4%); }
.hero-shoes { position: absolute; width: 38%; left: 3%; bottom: -2%; z-index: 2; transform: rotate(-8deg); }
.hero-suit { position: absolute; width: 47%; right: -7%; bottom: 1%; transform: rotate(8deg); }
.hero-trophy { position: absolute; width: 23%; right: 3%; top: 2%; }
.hero-sticker { position: absolute; z-index: 3; width: min(13%, 53px); right: 2%; bottom: 3%; transform: rotate(9deg); }
.hero-noob { position: absolute; z-index: 3; width: clamp(43px, 10%, 52px); left: 1%; bottom: 8px; }
.hero-noob img { width: 100%; }

.collection { padding: 22px 24px 25px; }
.collection.revealed { animation: reveal .32s ease-out both; }
@keyframes reveal {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.section-title {
  margin: 0 0 12px;
  font-size: 1.125rem;
  line-height: 1.25;
}
.gift-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.gift-grid button {
  display: grid;
  grid-template-rows: 70px auto;
  gap: 6px;
  justify-items: center;
  align-items: center;
  padding: 5px 6px 9px;
  min-width: 0;
  border: 1px solid #bcbcbc;
  color: #173f75;
  background: #f5f5f5;
  font-size: .875rem;
}
.gift-grid button:hover { border-color: #6e99c9; background: #fff; text-decoration: underline; }
.gift-grid button[aria-pressed="true"] {
  background: #dfe9f5;
  border-color: #3b526b;
  font-weight: bold;
}
.gift-grid button img {
  width: 84px;
  height: 70px;
  object-fit: contain;
  background: white;
  border: 1px solid #ccc;
}

.gift-panel {
  border: 1px solid #7d7d7d;
  overflow: hidden;
  margin-top: 14px;
  background: #e4e5e3;
}
.panel-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  background: linear-gradient(#454545, #2e2e2e);
  color: #fff;
  border-top: 1px solid #626262;
  border-bottom: 1px solid #202020;
  padding: 8px 12px;
}
.panel-title h3 { margin: 0; font-size: 1rem; line-height: 1.25; }
.viewer-shell {
  position: static;
  width: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: #e1e3e5;
}
.viewer-topbar, .modal-download { display: none; }
.view-stage {
  isolation: isolate;
  position: relative;
  height: clamp(275px, 49vw, 475px);
  background:
    radial-gradient(ellipse at 50% 42%, #f3f4f7 0%, #dbdfe7 51%, #bfc7d3 100%);
  border-bottom: 1px solid #a8aab2;
}
model-viewer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
model-viewer::part(default-progress-bar),
model-viewer::part(default-progress-mask) { display: none; }
.view-stage:not([data-state="ready"]) model-viewer { pointer-events: none; opacity: 0; }
.view-stage[data-state="ready"] .view-poster { display: none; }
.view-poster {
  position: absolute;
  inset: 2% 0 12%;
  margin: auto;
  width: 84%;
  height: 84%;
  object-fit: contain;
  pointer-events: none;
}
.view-feedback {
  position: absolute;
  bottom: 10px;
  left: 8px;
  right: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.view-feedback p {
  margin: 0;
  max-width: 100%;
  font-size: .875rem;
  text-align: center;
}
.view-feedback p:not(:empty) {
  padding: 7px 9px;
  background: #f5f6faed;
  border: 1px solid #a3abb9;
  border-radius: 4px;
}
.view-feedback button { pointer-events: auto; }
.viewer-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
}
.gestures {
  margin: 0;
  padding: 4px 11px 10px;
  text-align: center;
  font-size: .8125rem;
  color: #454c59;
}
.scroll-lock {
  position: fixed;
  inset-inline: 0;
  top: var(--locked-scroll);
  width: 100%;
  overflow: hidden;
}
.viewer-shell:modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: auto;
  background: #202632;
  display: grid;
  grid-template-rows: auto minmax(90px, 1fr) auto;
  padding:
    max(8px, env(safe-area-inset-top))
    max(8px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom))
    max(8px, env(safe-area-inset-left));
}
.viewer-shell:modal::backdrop { background: #202632; }
.viewer-shell:modal .viewer-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 8px;
}
.model-switch { display: flex; flex-wrap: wrap; gap: 5px; }
.model-switch .button { padding-inline: 9px; }
.close-viewer { width: 44px; flex: none; font: 30px/1 Arial, Helvetica, sans-serif; }
.viewer-shell:modal .view-stage { height: auto; border: 1px solid #657288; border-radius: 4px; }
.viewer-shell:modal .viewer-controls { padding: 8px 0 0; }
.viewer-shell:modal .expand-viewer { display: none; }
.viewer-shell:modal .modal-download { display: inline-flex; }

.gift-desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  gap: 20px;
  padding: 19px;
  background: #e8e8e8;
}
.gift-card-art {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 13px 8px 16px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 60%, #657582, transparent 72%),
    repeating-linear-gradient(135deg, #303843 0 2px, #2b3340 2px 6px);
  border: 1px solid #384657;
}
.gift-card-art::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  z-index: -1;
  background: repeating-conic-gradient(#171d27 0% 25%, #303c49 0% 50%) 0 0 / 40px 24px;
  mask-image: linear-gradient(transparent, #000 70%);
}
.gift-card-art img {
  width: min(100%, 214px);
  filter: drop-shadow(0 11px 9px #070a1090);
}
.gift-card-art.first-visit { animation: card-in .43s ease-out both; }
@keyframes card-in {
  from { opacity: .55; transform: perspective(550px) rotateY(-25deg) translateY(6px); }
  to { opacity: 1; transform: perspective(550px) rotateY(0) translateY(0); }
}
.clerk-window {
  display: flex;
  flex-direction: column;
  border: 1px solid #3b526b;
  background: #fff;
}
.window-title {
  padding: 8px 11px;
  font-weight: 700;
  font-size: .875rem;
  background: #3b526b;
  color: #fff;
}
.clerk-gift-accent {
  display: block;
  width: min(calc(100% - 22px), 292px);
  margin: 10px auto 0;
}
.clerk-gift-accent img { width: 100%; }
.clerk-content {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 4px 13px 13px;
}
.clerk-portrait { position: relative; width: clamp(95px, 13vw, 143px); }
.admin-badge { position: absolute; right: 2%; bottom: 10%; width: 22px; }
.clerk-line { font-size: .875rem; font-weight: bold; line-height: 1.4; margin: 0 0 12px; }
.redeem-hint { font-size: .8125rem; margin: 0 0 4px; color: #454c59; }
.clerk-content .button { font-weight: bold; }

.retro-strip {
  border-top: 1px solid #fff;
  background: #eae8e0;
  padding: 15px 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 13px;
}
.retro-banner { max-width: min(100%, 468px); }
.retro-banner-small { max-width: min(100%, 170px); }
.retro-banner img { box-shadow: 0 0 0 1px #854348; }
.retro-button img, .web-badges img { image-rendering: pixelated; }
.page-footer {
  border-top: 1px solid #b9babd;
  box-shadow: inset 0 1px #f6f7ef;
  background: #d9dbd8;
  padding: 11px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 9px 14px;
}
.web-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.web-badges .retro-logo { image-rendering: auto; }
.parody-note { flex-basis: 100%; font-size: .75rem; color: #4c4c4c; }
.motion-control {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 44px;
  font-size: .875rem;
  cursor: pointer;
}
.motion-control input { width: 19px; height: 19px; accent-color: #9d1f2b; }
.static-mode *, .static-mode *::before, .static-mode *::after { animation: none !important; }

@media (max-width: 680px) {
  .page { width: calc(100% - 20px); margin: 10px auto 22px; }
  .masthead { min-height: 43px; padding-inline: 9px; }
  .masthead-gift { height: 28px; }
  .obc-banner { height: clamp(78px, 21vw, 120px); }
  .intro { grid-template-columns: 1fr; }
  .intro-copy { padding: 11px 15px 17px; }
  .name-art { width: min(245px, 73%); margin-bottom: -8px; }
  .intro p { margin: 14px 0; }
  .hero-display { min-height: 0; height: clamp(151px, 44vw, 240px); }
  .hero-display::before { background: linear-gradient(#252b37 0%, transparent 33%); }
  .hero-renders { inset: -4% 9% -5%; }
  .hero-head { width: 51%; }
  .hero-shoes { width: 40%; left: 4%; bottom: 0; }
  .hero-suit { width: 42%; right: -3%; bottom: -1%; }
  .hero-trophy { width: 22%; right: 0; top: 1%; }
  .hero-sticker { width: 10%; right: 2%; bottom: 4%; }
  .hero-noob { width: 39px; bottom: 5px; }
  .collection { padding: 17px 10px 19px; }
  .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .gift-grid button { grid-template-rows: 48px auto; }
  .gift-grid button img { width: 57px; height: 48px; }
  .panel-title { padding-inline: 8px; }
  .gift-desk { grid-template-columns: 1fr; gap: 12px; padding: 10px; }
  .gift-card-art img { width: min(100%, 174px); }
  .retro-strip { padding: 13px 11px; }
  .page-footer { padding: 10px; }
}

@media (max-width: 370px) {
  .viewer-controls .button { padding-inline: 8px; }
  .model-switch .button { padding-inline: 6px; }
}

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

.view-stage[data-state="ready"] #view-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}
