:root {
  --bg: #f5f2eb;
  --surface: rgba(255,255,255,.86);
  --surface-strong: #fff;
  --text: #181714;
  --muted: #706b61;
  --line: rgba(24,23,20,.12);
  --accent: #9d2523;
  --accent-dark: #761b1a;
  --shadow: 0 18px 50px rgba(31,25,18,.08);
  --radius: 22px;
  --shell: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(157,37,35,.08), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  line-height: 1.7;
}
a { color: inherit; }
.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,242,235,.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.site-header .shell { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: .78rem; font-weight: 800; letter-spacing: .11em; }
.brand-mark { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--text); color: #fff; font-family: serif; font-size: 18px; }
.nav { display: flex; gap: 22px; font-size: .88rem; font-weight: 650; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
.hero { padding: 92px 0 56px; }
.hero h1 { margin: 10px 0 20px; max-width: 760px; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: clamp(2.6rem, 7vw, 6.5rem); line-height: 1.02; letter-spacing: -.05em; font-weight: 600; }
.eyebrow { color: var(--accent); text-transform: uppercase; font-size: .75rem; font-weight: 800; letter-spacing: .17em; }
.lead { margin: 0; max-width: 790px; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.22rem); }
.grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 22px; padding-bottom: 80px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.feature-title { margin: 16px 0 2px !important; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 2.15rem; }
.meta { color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.55); color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .05em; }
.dot { width: 8px; height: 8px; background: #2a8e50; border-radius: 50%; box-shadow: 0 0 0 4px rgba(42,142,80,.12); }
.kv { display: grid; grid-template-columns: 130px minmax(0,1fr); margin: 24px 0 0; border-top: 1px solid var(--line); }
.kv dt, .kv dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .87rem; overflow-wrap: anywhere; }
.kv dt { color: var(--muted); }
.kv dd { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.74); text-decoration: none; font-weight: 750; font-size: .88rem; cursor: pointer; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.status-link { margin: 20px 0 0; font-size: .82rem; color: var(--muted); }
.site-footer { padding: 28px 0 46px; color: var(--muted); font-size: .78rem; }
.fallback-page { padding: 80px 0; }
.preview-wrap { padding-top: 42px; padding-bottom: 70px; }
.preview-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.preview-title h1 { margin: 4px 0 4px; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: clamp(2rem, 4vw, 3.5rem); }
.preview-title .meta span + span::before { content: " · "; }
.player { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: #111; box-shadow: 0 22px 60px rgba(0,0,0,.14); }
.stage { position: relative; display: grid; place-items: center; aspect-ratio: 16/9; min-height: 260px; background: #0f0f0f; overflow: hidden; }
.slide-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .8s ease; background: #0f0f0f; }
.slide-layer.is-visible { opacity: 1; }
.loading { position: relative; z-index: 3; padding: 18px; color: rgba(255,255,255,.78); font-size: .9rem; text-align: center; }
.controls { display: grid; grid-template-columns: auto auto minmax(110px, 1fr) auto auto; align-items: center; gap: 10px; padding: 14px 16px; background: #191919; color: #fff; }
.iconbtn { min-width: 42px; height: 40px; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.iconbtn:hover { background: rgba(255,255,255,.14); }
.seek { width: 100%; accent-color: #d3443f; }
.time { min-width: 96px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .75rem; color: rgba(255,255,255,.76); text-align: right; }
.preview-info { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.debug summary { cursor: pointer; font-weight: 750; }
.debug pre { max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; background: rgba(0,0,0,.04); border-radius: 12px; font-size: .72rem; }
@media (max-width: 760px) {
  .shell { width: min(calc(100% - 24px), var(--shell)); }
  .site-header .shell { min-height: 62px; }
  .brand span:last-child { display: none; }
  .nav { gap: 14px; font-size: .78rem; }
  .hero { padding: 64px 0 34px; }
  .grid, .preview-info { grid-template-columns: 1fr; }
  .card { padding: 21px; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { padding-bottom: 0; border-bottom: 0; }
  .kv dd { padding-top: 3px; }
  .preview-head { align-items: flex-start; flex-direction: column; }
  .controls { grid-template-columns: auto auto 1fr auto; }
  .time { grid-column: 1/-1; text-align: left; }
  .stage { min-height: 210px; }
}
