@font-face {
  font-family: 'Manrope';
  src: url('../../../open-runtime/3ae11c49db0455a3cc33e37d380f20fdb8c7f8b41dc07625c177e3d87a9d6ae6/Manrope.ttf') format('truetype');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --ink: #17150f;
  --paper: #ece7db;
  --line: rgba(23, 21, 15, 0.28);
  --accent: #b06a24;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Manrope', 'Noto Sans CJK SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body { position: fixed; inset: 0; width: 100vw; }

#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 42%, transparent 55%, rgba(0,0,0,0.20) 100%);
}
body.dusk .vignette { background: radial-gradient(ellipse 120% 90% at 50% 42%, transparent 50%, rgba(0,0,0,0.42) 100%); }

.ui { position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; }

/* ---------------- brand ---------------- */
.brand { padding: 42px 52px 0; }
.brand h1 {
  font-size: 30px; font-weight: 600; letter-spacing: 0.46em; text-indent: 0.46em;
  color: var(--ink); line-height: 1;
}
body.dusk .brand h1 { color: #efe8da; }
.brand .sub {
  margin-top: 12px; font-size: 12px; font-weight: 500;
  letter-spacing: 0.34em; color: var(--ink); opacity: 0.62;
}
body.dusk .brand .sub { color: #efe8da; }

/* ---------------- materials legend ---------------- */
.materials {
  position: absolute; top: 130px; right: 52px;
  display: flex; flex-direction: column; gap: 9px; align-items: flex-end;
  font-size: 11px; letter-spacing: 0.22em; color: var(--ink); opacity: 0.66;
}
body.dusk .materials { color: #d9d2c2; }
.materials .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-left: 10px; vertical-align: 1px; margin-right: 0;
}
.materials span.word { margin-right: 10px; }
.d-metal   { background: #37332d; box-shadow: inset 0 0 0 1px rgba(120,110,95,0.5); }
.d-ceramic { background: #e9e2d3; box-shadow: inset 0 0 0 1px rgba(120,110,95,0.4); }
.d-fabric  { background: #14130f; }
.d-steel   { background: #9c968c; }

/* ---------------- caption ---------------- */
.caption {
  position: absolute; left: 52px; bottom: 128px; max-width: 330px;
  font-size: 12.5px; line-height: 2.1; letter-spacing: 0.12em;
  color: var(--ink); opacity: 0.72; font-weight: 400;
}
body.dusk .caption { color: #cfc7b6; opacity: 0.8; }

/* ---------------- loading ---------------- */
.loading {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 12px; letter-spacing: 0.3em; color: var(--ink); opacity: 0.5;
  transition: opacity 0.5s;
}
.loading.hidden { opacity: 0; pointer-events: none; }

/* ---------------- controls ---------------- */
.controls {
  pointer-events: auto;
  padding: 0 52px 40px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  flex-wrap: wrap;
}
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

button {
  pointer-events: auto;
  appearance: none; border: 1px solid var(--line); background: transparent;
  color: var(--ink); font-family: inherit;
  font-size: 12px; font-weight: 500; letter-spacing: 0.24em; text-indent: 0.24em;
  padding: 11px 22px; border-radius: 999px; cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.12s;
}
button:hover { border-color: var(--accent); color: var(--accent); }
button:active { transform: translateY(1px); }
button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
body.dusk button { color: #e6dfcf; border-color: rgba(230, 223, 207, 0.32); }
body.dusk button:hover { border-color: #d8973f; color: #d8973f; }
body.dusk button[aria-pressed="true"] { background: #e9e2d3; color: #171410; border-color: #e9e2d3; }

.side { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.photo-label { font-size: 11px; letter-spacing: 0.3em; color: var(--ink); opacity: 0.55; }
body.dusk .photo-label { color: #cfc7b6; }

#btn-download {
  pointer-events: auto;
  font-size: 12px; letter-spacing: 0.2em; text-decoration: none;
  color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 3px;
  transition: color 0.25s, border-color 0.25s;
}
#btn-download:hover { color: var(--accent); border-color: var(--accent); }
body.dusk #btn-download { color: #e6dfcf; border-color: rgba(230,223,207,0.3); }
body.dusk #btn-download:hover { color: #d8973f; border-color: #d8973f; }

/* ---------------- hero mode (screenshot) ---------------- */
body.hero .ui { display: none; }

/* ---------------- mobile ---------------- */
@media (max-width: 640px) {
  .brand { padding: 26px 24px 0; }
  .brand h1 { font-size: 22px; }
  .materials { top: auto; right: 24px; bottom: 150px; }
  .caption { left: 24px; bottom: 128px; max-width: 250px; font-size: 11px; }
  .controls { padding: 0 24px 24px; }
  button { padding: 9px 16px; font-size: 11px; }
  .side { gap: 14px; }
}
