:root {
  color-scheme: dark;
  --bg: #121c19;
  --panel: #182621;
  --line: #36463b;
  --ink: #f4f0e1;
  --muted: #bdc9bc;
  --dim: #acbaac;
  --green: #bcd48f;
  --amber: #f3cd83;
  --amber-hover: #ffde9e;
  font: 16px/1.55 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 73% 2%, #34402a 0, transparent 43%),
    var(--bg);
}
a { color: var(--green); text-underline-offset: .21em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.shell { width: min(1160px, calc(100% - 72px)); margin-inline: auto; }
.skip {
  position: absolute;
  inset: 8px auto auto 8px;
  transform: translateY(-150%);
  padding: .6rem .9rem;
  z-index: 5;
  background: var(--bg);
}
.skip:focus { transform: none; }
.site-head {
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 14px;
}
.brand, .quiet-link {
  display: inline-flex;
  align-items: center;
  gap: .58rem;
  color: var(--ink);
  text-decoration: none;
}
.brand { font-size: .91rem; font-weight: 750; letter-spacing: .10em; }
.brand svg, .quiet-link svg { color: var(--green); }
.quiet-link { color: var(--muted); font-size: .84rem; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.42fr);
  gap: clamp(30px, 6vw, 78px);
  align-items: center;
  padding: clamp(40px, 6vw, 72px) 0 36px;
}
.intro { max-width: 440px; }
.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 .85rem;
  color: var(--green);
  font: 700 .72rem/1.35 ui-monospace, monospace;
  letter-spacing: .15em;
}
.kicker span { width: 15px; height: 1px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; }
h1 {
  font-size: clamp(3.25rem, 6vw, 6.8rem);
  line-height: 1.03;
  font-weight: 500;
  letter-spacing: -.067em;
  margin: 0 0 1.28rem;
}
h1 span {
  display: block;
  margin-top: .26em;
  color: var(--amber);
  font: 650 clamp(1.15rem, 2vw, 1.7rem)/1.2 system-ui, sans-serif;
  letter-spacing: .01em;
}
.lede, .section-head > p, .details p, .details li { color: var(--muted); }
.lede { max-width: 40ch; margin-bottom: 1.55rem; font-size: 1rem; }
.cta {
  display: flex;
  width: min(100%, 245px);
  min-height: 52px;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: .72rem .95rem;
  color: #232617;
  background-color: var(--amber);
  border: 1px solid #f4d48e;
  border-radius: 8px;
  font-weight: 780;
  text-decoration: none;
}
.cta:hover { color: #232617; background-color: var(--amber-hover); }
.file-info, .scene figcaption, .asset-tag {
  color: var(--dim);
  font: 650 .72rem/1.5 ui-monospace, monospace;
  letter-spacing: .065em;
}
.file-info { margin: .6rem 0 .24rem; }
.download-note { color: var(--muted); font-size: .81rem; margin: 0; }
.scene {
  position: relative;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #51604b;
  border-radius: 16px;
  background: #1a261d;
  box-shadow: 0 15px 50px #070c0888;
}
.scene-art {
  position: relative;
  aspect-ratio: 1.6;
  background: radial-gradient(ellipse at 59% 47%, #394732 0, #273322 58%, #1b291f 100%);
}
.scene-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.scene figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 1rem;
  padding: .68rem .86rem;
  border-top: 1px solid var(--line);
  background: #17231d;
}
.scene figcaption span:first-child { color: var(--green); letter-spacing: .13em; }
.scene figcaption span + span { font: .79rem/1.45 system-ui, sans-serif; }
.specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #19251f;
  margin: 0 0 clamp(52px, 7vw, 82px);
}
.specs div { padding: .85rem 1rem .95rem; border-inline-end: 1px solid var(--line); }
.specs div:last-child { border-inline-end: 0; }
.specs dt { color: var(--ink); font: 500 clamp(1.5rem, 3vw, 2.05rem)/1.15 Georgia, serif; }
.specs small { font: 650 .72rem/1 system-ui, sans-serif; color: var(--green); }
.specs dd { margin: .18em 0 0; color: var(--muted); font-size: .82rem; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: .55rem 2rem;
  margin-bottom: 1.25rem;
}
h2 { font-size: clamp(1.75rem, 4vw, 2.7rem); font-weight: 500; line-height: 1.15; margin-bottom: .7rem; letter-spacing: -.035em; }
.section-head h2 { margin-bottom: 0; }
.section-head > p { max-width: 39ch; margin: 0; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.asset {
  border: 1px solid var(--line);
  border-radius: 11px;
  min-width: 0;
  background: var(--panel);
  overflow: hidden;
}
.asset-art {
  position: relative;
  aspect-ratio: 1.46;
  background: radial-gradient(ellipse at 50% 60%, #344330, #22332a 76%);
}
.asset-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.asset-info { padding: .74rem .8rem .9rem; border-top: 1px solid var(--line); }
.asset-tag { color: var(--green); }
.asset h3 { font-size: 1rem; margin: .25em 0 .05em; line-height: 1.25; }
.asset p { margin: 0; font-size: .81rem; color: var(--muted); }
.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding: clamp(37px, 6vw, 63px) 0;
}
.details > div { border: 1px solid var(--line); border-radius: 11px; padding: 1rem 1.18rem 1.2rem; background: var(--panel); }
.details h2 { font-size: clamp(1.24rem, 2.6vw, 1.8rem); letter-spacing: -.02em; }
.details ul { margin: 0 0 .55rem; padding-inline-start: 1.2rem; }
.details p { margin-bottom: .72rem; }
.details p.kicker { color: var(--green); }
.details .minor, .text-link { margin: .25rem 0 0; font-size: .84rem; }
.text-link svg { vertical-align: -.16em; margin-inline-start: .1rem; }
.site-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem 1.4rem;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .81rem;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
@media (max-width: 900px) {
  .shell { width: min(100% - 40px, 760px); }
  .hero { gap: 24px; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 30px); }
  .site-head { min-height: 57px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 24px 0 22px; }
  .intro { max-width: none; }
  h1 { margin-bottom: .7rem; }
  .lede { margin-bottom: 1rem; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 39px; }
  .specs div { padding: .6rem .7rem .67rem; }
  .specs div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .specs div:nth-child(2) { border-inline-end: 0; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .details { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .hero { gap: 19px; }
  .scene figcaption { padding-inline: .61rem; }
  .asset-info { padding-inline: .57rem; }
}

.preview-link {
  display: flex; align-items: center; justify-content: space-between;
  gap: .4rem; min-height: 44px; margin-top: .55rem;
  border-top: 1px solid var(--line); font-size: .87rem;
  font-weight: 700; text-decoration: none;
}
.preview-link:hover { text-decoration: underline; }
.viewer {
  width: min(820px, calc(100% - 20px)); max-height: calc(100% - 20px);
  max-height: calc(100dvh - 20px);
  padding: clamp(12px, 3vw, 22px); color: var(--ink); background: var(--panel);
  border: 1px solid #667656; border-radius: 15px; overscroll-behavior: contain;
}
.viewer::backdrop { background: #080f0ddd; }
body:has(.viewer[open]) { overflow: hidden; }
.viewer-head { display: flex; align-items: start; justify-content: space-between; gap: .55rem; }
.viewer-head h2 { font-size: clamp(1.42rem, 6vw, 2rem); margin-bottom: .8rem; }
.viewer-head .kicker { margin-bottom: .35rem; }
.viewer button, .viewer select {
  font: 700 .86rem/1.2 system-ui, sans-serif; color: var(--ink);
  background: #223228; border: 1px solid #52624c; border-radius: 7px;
  min-height: 44px; padding: .42rem .65rem;
}
.viewer button { cursor: pointer; }
.viewer-close { white-space: nowrap; }
.viewer-art {
  display: grid; place-items: center; width: 100%; height: clamp(150px, 52vh, 510px);
  height: clamp(150px, 52dvh, 510px);
  background: radial-gradient(ellipse, #364632, #1b2a22 76%);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.viewer-art img {
  display: block; width: 100%; height: 100%; min-width: 0; min-height: 0;
  inline-size: 100%; block-size: 100%; max-height: 100%;
  object-fit: contain;
}
.viewer-art img[hidden], .viewer button[hidden] { display: none; }
.viewer .viewer-art[data-background="light"] { background: radial-gradient(ellipse, #f3efe2, #d3d8c7 85%); }
.viewer-status { font-size: .81rem; color: var(--muted); margin: .48rem 0; min-height: 1.35em; }
.viewer-angles { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
.viewer-angles button { padding-inline: 0; }
.viewer-angles button[aria-pressed="true"] { background: var(--green); color: #171f12; border-color: var(--green); }
.viewer-foot {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .45rem 1rem; margin-top: .8rem;
}
.viewer-foot label { font-size: .84rem; color: var(--muted); }
.viewer-foot select { max-width: 100%; }
@media (max-width: 520px) { .viewer-angles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.viewer-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .65rem; }
.viewer-options button[aria-pressed="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
@media (orientation: landscape) and (max-height: 560px) and (min-width: 550px) {
  .viewer[open] { display: grid; grid-template-columns: minmax(0, 3fr) minmax(210px, 2fr); gap: 8px 12px; padding: 12px; }
  .viewer-head { grid-column: 1 / -1; }
  .viewer-head h2 { font-size: 1.45rem; margin-bottom: .12rem; }
  .viewer-art { height: clamp(145px, calc(100vh - 124px), 425px); height: clamp(145px, calc(100dvh - 124px), 425px); }
  .viewer-controls { min-width: 0; }
  .viewer-status { margin-top: 0; }
  .viewer-angles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .viewer-foot { margin-top: .5rem; gap: .25rem; }
}
@media (orientation: landscape) and (max-height: 360px) and (min-width: 550px) {
  .viewer[open] { padding: 8px; gap: 5px 9px; }
  .viewer-head .kicker { display: none; }
  .viewer-options { margin-top: .35rem; }
}
@media (orientation: portrait) and (max-height: 710px) {
  .viewer-art { height: clamp(150px, 42vh, 340px); height: clamp(150px, 42dvh, 340px); }
}

.viewer-foot .text-link { flex: 0 0 100%; }

.preview-link span, #viewer-tech span {
  display: inline-block; position: relative; width: .68em; height: .68em;
  border-block-start: 1.5px solid currentColor; border-inline-end: 1.5px solid currentColor;
}
.preview-link span::before, #viewer-tech span::before {
  content: ""; position: absolute; inset: 0 0 auto auto; width: 1px; height: .79em;
  background: currentColor; transform: rotate(45deg); transform-origin: top;
}

.viewer-art { position: relative; }
.viewer-effects {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none; overflow: hidden;
}
.viewer-fx-fire {
  transform-box: fill-box; transform-origin: center bottom;
  animation: viewer-fx-fire .47s ease-in-out infinite alternate;
}
.viewer-fx-ember {
  transform-box: fill-box; transform-origin: center;
  animation: viewer-fx-ember 1.32s ease-in-out infinite;
}
.viewer-fx-coal { animation: viewer-fx-coal 1.4s ease-in-out infinite alternate; }
@keyframes viewer-fx-coal { from { opacity: .26; } to { opacity: .84; } }
.viewer-fx-water { animation: viewer-fx-stream .69s linear infinite; }
.viewer-fx-ripple {
  transform-box: fill-box; transform-origin: center;
  animation: viewer-fx-ripple 1.22s ease-out infinite;
}
.viewer-fx-ripple:nth-of-type(even) { animation-delay: -.61s; }
@keyframes viewer-fx-fire {
  0% { transform: scale(.9,.8) skewX(-5deg); opacity: .87; }
  56% { transform: scale(1.05,.94) skewX(7deg); }
  100% { transform: scale(.96,1.08) skewX(-4deg); opacity: .99; }
}
@keyframes viewer-fx-ember {
  0% { transform: translate(0,0); opacity: 0; }
  35% { opacity: .81; }
  100% { transform: translate(2px,-10px); opacity: 0; }
}
@keyframes viewer-fx-stream { to { stroke-dashoffset: -5; } }
@keyframes viewer-fx-ripple {
  from { transform: scale(.2); opacity: .66; }
  to { transform: scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .viewer-effects * { animation: none !important; }
}

.asset[id] { scroll-margin-block-start: 1rem; }
.asset-actions .preview-link { width: 100%; }
.asset-play {
  display: flex; align-items: center; justify-content: center; gap: .42rem;
  width: 100%; min-height: 44px; padding: .38rem .44rem;
  border: 1px solid var(--green); border-radius: 6px;
  color: #1a2317; background: var(--green);
  font: 700 .86rem/1.25 system-ui, sans-serif; text-align: center; cursor: pointer;
}
.asset-play:hover { filter: brightness(1.14); }
.asset-play[hidden] { display: none; }
.in-page{display:inline-flex;align-items:center;min-height:44px;margin-top:.3rem}
.inventory-plate{margin-top:1rem;border:1px solid var(--line);border-radius:10px;padding:.35rem .75rem}
.inventory-plate summary{padding:.55rem .2rem;cursor:pointer}
.inventory-plate img{display:block;width:min(760px,100%);height:auto;margin:.4rem auto .65rem}
.viewer button[aria-pressed="true"]{border-color:var(--accent,#b8d293)}
