:root {
  color-scheme: dark;
  --paper: #302936;
  --ink: #fff4e9;
  --muted: #d0b9b0;
  --coral: #e7aa7f;
  --line: #8a6c70;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 22%, #704b4a 0, transparent 58%), var(--paper);
  color: var(--ink);
  font-family: "Aptos", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 6px;
}
.masthead {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  padding: 30px 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand { font-family: "Yu Mincho", "Songti SC", "SimSun", serif; font-size: 20px; }
.edition { font: 11px "Consolas", monospace; color: var(--muted); margin-left: 12px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.back { font-size: 12px; display: flex; align-items: center; gap: 14px; min-height: 44px; }
.canvas {
  min-height: 720px;
  height: 100svh;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.artwork { position: absolute; inset: 24px 0 100px; display: flex; justify-content: center; }
.artwork > img { height: 100%; width: auto; max-width: 100%; object-fit: contain; flex: none; align-self: flex-start; }
.caption { position: absolute; top: 37%; left: 8%; pointer-events: none; }
.category { font: 9px "Consolas", monospace; margin: 0 0 22px; color: var(--muted); }
h1 { margin: 0; font: 400 70px/1.15 "Yu Mincho", "Songti SC", "SimSun", serif; }
h1 span { display: block; font: italic 21px/1.5 "Baskerville", "Palatino Linotype", serif; margin: 11px 0 0 3px; }
.subtitle { font: 12px "Yu Mincho", "Songti SC", "SimSun", serif; margin: 25px 0 0; }
.caption-line { height: 1px; width: 36px; background: var(--coral); margin: 28px 0 17px; }
.signature { font: 9px/1.8 "Consolas", monospace; margin: 0; }
.signature span { display: block; color: var(--muted); font-size: 8px; }
.folio { position: absolute; right: 4%; top: 44%; writing-mode: vertical-rl; font: 11px "Consolas", monospace; }
.folio span { color: var(--coral); margin: 16px 0; }
.controls {
  position: fixed;
  z-index: 2;
  inset: auto 0 0;
  padding: 20px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(transparent, #302936ee 85%);
}
.medium { font: 9px "Consolas", monospace; color: var(--muted); }
.actions { display: flex; gap: 25px; align-items: center; }
.actions a, .actions button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 12px;
}
.motion-toggle { padding: 0; border: 0; color: var(--muted); background: none; cursor: pointer; }
.motion-toggle[hidden] { display: none; }
.motion-indicator { width: 8px; height: 10px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.motion-toggle[aria-pressed="true"] .motion-indicator { border: 0; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor; }
.download { border-bottom: 1px solid var(--line); }
.download span { font-size: 17px; }
.download:hover, .back:hover { color: var(--coral); }
@media (max-width: 1200px) {
  .caption { left: 5%; }
  .category, .signature, .caption-line { display: none; }
  h1 { font-size: 44px; }
  h1 span { font-size: 16px; margin-top: 8px; }
  .subtitle { margin-top: 16px; }
}
@media (max-width: 900px) {
  .canvas { min-height: 540px; }
  .masthead { padding: 17px 22px; }
  .brand { font-size: 18px; }
  .edition { margin-left: 5px; font-size: 10px; }
  .back { font-size: 11px; gap: 6px; }
  .artwork { top: 76px; bottom: 145px; }
  .artwork > img { height: 100%; width: 100%; max-height: none; object-fit: contain; }
  .caption { top: auto; bottom: 76px; left: 22px; }
  h1 { display: flex; align-items: baseline; font-size: 32px; }
  h1 span { font-size: 14px; margin: 0 0 0 12px; }
  .subtitle { font-size: 11px; margin-top: 8px; }
  .folio { display: none; }
  .controls { padding: 14px 22px; }
  .medium { display: none; }
  .actions { justify-content: space-between; width: 100%; }
  .download { margin-left: auto; }
}
@media (max-height: 650px) and (min-width: 601px) {
  .canvas { min-height: 100svh; }
  .artwork { top: 10px; bottom: 76px; }
  .artwork > img { width: auto; }
  .caption { top: 34%; bottom: auto; left: 6%; }
  .category, .signature, .caption-line, .folio { display: none; }
  h1 { display: block; font-size: 36px; }
  h1 span { margin: 6px 0 0; }
  .subtitle { margin-top: 12px; }
  .masthead { padding: 12px 24px; }
  .controls { padding: 10px 24px; }
  .actions { width: auto; margin-left: auto; }
}
