:root {
  --bg: #fbf5fc;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --line: #e6d8ee;
  --ink: #3a3352;
  --ink-2: #6f6788;
  --pink: #ef8fb8;
  --lav: #9f8ce0;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 620px at 50% -120px, #ffe9f3 0%, #f3ebff 45%, var(--bg) 78%) fixed, var(--bg);
  color: var(--ink);
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }

.top { text-align: center; padding: 34px 16px 18px; }
.eyebrow { margin: 0; letter-spacing: .34em; font-size: 11px; color: var(--lav); font-weight: 700; }
h1 { margin: 6px 0 4px; font-size: clamp(24px, 4.6vw, 40px); font-weight: 700; letter-spacing: .04em; }
h1 span {
  margin-left: .15em; font-style: italic;
  background: linear-gradient(90deg, #ff8fb3, #ffb36b, #e8c93f, #6fd08a, #6cb8f5, #a98bf5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin: 0 auto; max-width: 34em; color: var(--ink-2); font-size: 14px; }

main { max-width: 1240px; margin: 0 auto; padding: 0 16px 40px; }

/* ---------- viewer ---------- */
.stage {
  position: relative; width: 100%; aspect-ratio: 1376 / 768; container-type: inline-size;
  background: #f3e9f7; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 24px 60px -24px rgba(150, 110, 190, .55);
  touch-action: none;
}
.stage canvas, .stage .poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage canvas { opacity: 0; transition: opacity .6s ease; cursor: grab; outline-offset: -3px; }
.stage canvas:active { cursor: grabbing; }
.stage.ready canvas { opacity: 1; }
.stage .poster { object-fit: cover; }

.loading {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  background: rgba(255, 255, 255, .86); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 16px 7px; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden;
}
.loading i { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--pink); transition: width .2s; }
.stage.ready .loading { display: none; }
.hint {
  position: absolute; left: 12px; bottom: 10px; margin: 0; padding: 3px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .78); color: var(--ink-2); font-size: 11.5px; pointer-events: none;
  transition: opacity .8s ease;
}
.hint.gone { opacity: 0; }

.controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.controls .spacer { flex: 1 1 auto; }
.fstop {
  display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px;
}
.fstop input { width: 150px; accent-color: var(--pink); cursor: pointer; }
.fstop output { min-width: 5.2em; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
button {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 15px; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
button:hover { border-color: #c9b5e6; }
button[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: #fff; font-weight: 700; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, a:focus-visible, canvas:focus-visible, video:focus-visible { outline: 2px solid var(--lav); outline-offset: 2px; }

/* ---------- sections ---------- */
.block { margin-top: 54px; }
h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: .06em; }
h2::after { content: ""; display: block; width: 44px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--pink), var(--lav)); margin-top: 8px; }
.note { margin: 10px 0 14px; color: var(--ink-2); font-size: 13.5px; }
.movie { width: 100%; max-width: 960px; aspect-ratio: 16 / 9; border-radius: 12px; background: #f3e9f7; box-shadow: 0 0 0 1px var(--line); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery .tall img { object-position: 50% 42%; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }

.made ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.made li { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 14px; color: var(--ink-2); }
.made b { color: var(--ink); margin-right: .3em; }

footer { border-top: 1px solid var(--line); text-align: center; color: #9a90b3; font-size: 12px; padding: 18px 16px 30px; }
footer p { margin: 0; }

@media (max-width: 760px) {
  .top { padding-top: 22px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .made ul { grid-template-columns: 1fr; }
  .controls { gap: 6px; }
  .controls .spacer { display: none; }
  .fstop { width: 100%; justify-content: space-between; }
  .fstop input { flex: 1 1 auto; width: auto; }
  button { font-size: 12.5px; padding: 6px 12px; }
  .hint { font-size: 10.5px; left: 8px; bottom: 8px; }
  .hint .more { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stage canvas, .gallery img, .hint { transition: none; }
}
