:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #22262b;
  --muted: #5d636b;
  --line: #ddd8cd;
  --accent: #2f5d62;
  --accent-soft: #e4eeee;
  --tag: #8a6a3a;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1d20;
    --surface: #24272b;
    --text: #e9e7e2;
    --muted: #a7abb1;
    --line: #3a3e44;
    --accent: #8fc1c4;
    --accent-soft: #2a3a3c;
    --tag: #d2b07a;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1d20; --surface: #24272b; --text: #e9e7e2; --muted: #a7abb1;
  --line: #3a3e44; --accent: #8fc1c4; --accent-soft: #2a3a3c; --tag: #d2b07a; --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー */
.site-head { padding: 28px 0 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.site-head .kicker { font-size: 16px; color: var(--muted); margin: 0 0 4px; }
.site-head h1 { font-size: 24px; line-height: 1.45; margin: 0; font-weight: 700; letter-spacing: .02em; }
.site-head .sub { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.back { display: inline-block; margin-bottom: 10px; font-size: 16px; text-decoration: none; }

/* トップのカード */
.lead { margin: 22px 0 14px; color: var(--muted); font-size: 16px; }
.cards { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cards > li { display: flex; min-width: 0; }
.cards > li > .card { flex: 1; min-width: 0; }
.card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; box-shadow: var(--shadow); color: var(--text); text-decoration: none; min-height: 96px;
}
a.card:active { background: var(--accent-soft); }
.card .num {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: var(--surface); display: grid; place-items: center;
  font-weight: 700; font-size: 17px;
}
.card .thumb { flex: none; width: 76px; height: 76px; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; object-position: top; background: #fff; }
.card .thumb.empty { background: var(--bg); }
.card .title { font-weight: 700; font-size: 17px; line-height: 1.5; }
.card .state { display: block; font-size: 16px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.card.soon { opacity: .75; }
.card .body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card .cut { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.card .cut-time { font-size: 18px; font-weight: 700; line-height: 1.3; }
.card .cut-rate {
  font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--accent);
  background: var(--accent-soft); border-radius: 6px; padding: 1px 8px;
}

/* 1本の画面 */
.step { margin: 26px 0; }
.step-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; }
.step-head .no {
  flex: none; font-size: 16px; font-weight: 700; color: var(--accent);
  border: 1.5px solid var(--accent); border-radius: 999px; padding: 0 10px; line-height: 1.7;
}
.step-head h2 { font-size: 20px; margin: 0; line-height: 1.45; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.note { color: var(--muted); font-size: 16px; margin: 8px 0 0; }

.zoom { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; cursor: zoom-in; padding: 0; width: 100%; }
.zoom-hint { font-size: 16px; color: var(--muted); margin: 8px 0 0; text-align: center; }

/* 指示 */
.button-like {
  display: inline-block; background: #e8813a; color: #fff; font-weight: 700;
  border-radius: 8px; padding: 6px 16px; font-size: 17px;
}
.prompt-quote {
  margin: 0; background: var(--accent-soft); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 14px 16px; font-size: 19px; line-height: 1.8;
}
.prompt-quote p { margin: 0; }
.sample-label { font-size: 16px; color: var(--tag); font-weight: 700; margin: 0 0 6px; }

/* 結果 */
.outputs { margin: 0; padding-left: 1.6em; display: grid; gap: 10px; font-size: 18px; }
.outputs li { padding-left: 2px; }
.locked { text-align: center; color: var(--muted); padding: 22px 12px; }

/* 数字 */
.numbers { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; text-align: center; }
.numbers .box { flex: 1 1 120px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px; }
.numbers .label { display: block; font-size: 16px; color: var(--muted); }
.numbers .value { display: block; font-size: 24px; font-weight: 700; }
.numbers .arrow { font-size: 24px; color: var(--accent); flex: none; }

.foot { margin: 40px auto 32px; color: var(--muted); font-size: 16px; text-align: center; }

/* 拡大表示 */
.lightbox {
  position: fixed; inset: 0; background: rgba(10, 12, 14, .92); z-index: 10;
  display: none; overflow: auto; -webkit-overflow-scrolling: touch;
}
.lightbox.open { display: block; }
.lightbox img { max-width: none; width: 200%; margin: 56px 0 24px; background: #fff; }
@media (min-width: 900px) { .lightbox img { width: auto; max-width: 96vw; margin: 56px auto 24px; } }
.lightbox .close {
  position: fixed; top: 10px; right: 10px; font: inherit; font-size: 16px; font-weight: 700;
  border: 0; border-radius: 8px; padding: 8px 16px; min-height: 44px; background: #fff; color: #222; cursor: pointer;
}

/* 動画 */
.demo-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 8px; background: #111827; }

.card .blank { display: inline-block; width: 1.6em; height: 1em; margin: 0 2px; vertical-align: -0.1em; border: 2px dashed currentColor; border-radius: 4px; opacity: .55; }
.card .nw { white-space: nowrap; }
