/* ほしのいと LP — 配色はアプリの lib/ui/theme.dart と同じ値 */
:root {
  --fabric: #11152a;
  --fabric-deep: #0a0d1c;
  --patch: #171c34;
  --gold: #d6ac54;
  --gold-light: #f2d896;
  --ivory: #eceef3;
  --cream: #cdb996;
  --silver: #9097ae;
  --dim: #4a5070;
  --mincho: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --gothic: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --wrap: 1040px;
  /* 余白の基準: 段 / 見出しまわり / 中身の前 / カードの内側 */
  --sec: 96px;
  --gap-label: 16px;
  --gap-lead: 20px;
  --gap-block: 32px;
  --pad: 28px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--ivory);
  font-family: var(--gothic);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  background:
    linear-gradient(rgba(10, 13, 28, 0.55), rgba(10, 13, 28, 0.55)),
    url("/assets/fabric.png") 0 0 / 256px 256px repeat,
    var(--fabric);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-light); text-underline-offset: 0.2em; }
a:focus-visible { outline: 2px dashed var(--gold); outline-offset: 4px; }

h1, h2, h3 { font-family: var(--mincho); font-weight: 600; letter-spacing: 0.08em; line-height: 1.5; text-wrap: balance; margin: 0; }
p { margin: 0; }
.nw { display: inline-block; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--patch); padding: 8px 12px; z-index: 10; }

/* ---- 縫い目の枠 ---- */
.stitched {
  position: relative;
  background: var(--patch);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.stitched::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1.5px dashed var(--silver);
  border-radius: 15px;
  opacity: 0.6;
  pointer-events: none;
}
.stitched.gold::after { border-color: var(--gold); opacity: 0.85; }

/* ---- 見出しの飾り(アプリの StitchHeading と同じ考え方) ---- */
.label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mincho);
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.24em;
  margin-bottom: var(--gap-label);
}
.label::before { content: "★"; font-size: 12px; }
.label::after { content: ""; flex: 1; max-width: 120px; border-top: 1.5px dashed var(--gold); opacity: 0.7; }

section { padding: var(--sec) 0; }
main > section:not(.empathy):not(.closing) + section:not(.empathy):not(.closing) { padding-top: 0; }
.section-title { font-size: clamp(24px, 4.2vw, 34px); }
.lead { color: var(--cream); margin-top: var(--gap-lead); max-width: 34em; }

/* ---- ヘッダー ---- */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ivory); }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand span { font-family: var(--mincho); font-size: 20px; letter-spacing: 0.2em; }
.status-pill {
  font-size: 13px;
  color: var(--cream);
  border: 1.5px dashed var(--dim);
  border-radius: 999px;
  padding: 4px 14px;
  white-space: nowrap;
}

/* ---- ヒーロー ---- */
.hero { padding: 40px 0 var(--sec); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-tagline { font-family: var(--mincho); color: var(--silver); letter-spacing: 0.3em; font-size: 14px; }
.hero h1 { font-size: clamp(32px, 6vw, 54px); margin-top: var(--gap-label); }
.hero h1 em { font-style: normal; color: var(--gold-light); }
.hero-sub { color: var(--cream); margin-top: var(--gap-lead); max-width: 28em; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: var(--gap-block) 0 0; padding: 0; list-style: none; }
.hero-facts li { font-size: 13px; color: var(--gold-light); border: 1.5px solid rgba(214, 172, 84, 0.55); border-radius: 999px; padding: 4px 14px; }
.hero-visual { position: relative; justify-self: center; width: min(100%, 272px); }
.phone {
  border-radius: 34px;
  padding: 10px;
  background: var(--fabric-deep);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1.5px rgba(144, 151, 174, 0.35);
}
.phone img { border-radius: 26px; }
.hero-visual .float-moon { position: absolute; width: 110px; right: -48px; top: -70px; }
.caption { font-size: 12px; color: var(--silver); text-align: center; margin-top: var(--gap-label); }

/* アプリの紹介動画(ヒーロー) */
.demo { margin: 0; }
.demo-phone { position: relative; border-radius: 40px; padding: 9px; }
.demo-video { display: block; width: 100%; height: auto; aspect-ratio: 432 / 940; border-radius: 32px; background: var(--fabric-deep); object-fit: cover; }
.demo-toggle { position: absolute; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; border: 1.5px dashed rgba(214, 172, 84, 0.7); cursor: pointer; background: rgba(10, 13, 28, 0.78); display: grid; place-items: center; }
.demo-toggle span { width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--gold-light); margin-left: 3px; }
.demo.playing .demo-toggle span { width: 12px; height: 14px; border: 0; margin: 0; border-left: 4px solid var(--gold-light); border-right: 4px solid var(--gold-light); }
.demo-toggle:focus-visible, .demo-bar button:focus-visible { outline: 2px dashed var(--gold); outline-offset: 3px; }
.demo-cap { margin-top: 16px; min-height: 2.9em; font-family: var(--mincho); font-size: 17px; line-height: 1.45; letter-spacing: 0.08em; text-align: center; color: var(--gold-light); }
.demo-cap.on { animation: capIn 0.45s ease both; }
@keyframes capIn { from { opacity: 0; transform: translateY(6px); } }
.demo-bar { display: flex; gap: 6px; margin-top: 6px; }
.demo-bar button { flex: 1; height: 24px; padding: 10px 0; border: 0; background: none; cursor: pointer; }
.demo-bar i { display: block; height: 4px; border-radius: 2px; background: rgba(144, 151, 174, 0.3); overflow: hidden; position: relative; }
.demo-bar i::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform: scaleX(var(--p, 0)); transform-origin: left; }
.demo-note { margin-top: 6px; }

/* ---- 共感(いちばん暗い帯) ---- */
.empathy { background: rgba(6, 8, 18, 0.7); }
.miss { list-style: none; padding: 0; margin: var(--gap-block) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-label); }
.miss li { padding: var(--pad); display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; }
.miss img { width: 48px; height: 48px; opacity: 0.55; filter: grayscale(0.6); }
.miss p { color: var(--ivory); font-family: var(--mincho); font-size: 16px; line-height: 1.7; }
.empathy-close { margin-top: var(--gap-block); font-family: var(--mincho); font-size: clamp(19px, 2.8vw, 24px); color: var(--gold-light); }
.empathy-close::before { content: ""; display: block; width: 40px; border-top: 1.5px dashed var(--gold); margin-bottom: var(--gap-label); }

/* ---- 機能の段 ---- */
.feature .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-visual { justify-self: center; width: min(100%, 300px); }
.note { font-size: 13px; color: var(--silver); margin-top: var(--gap-lead); }

/* 糸でつないだ3つの項目 */
.thread { list-style: none; counter-reset: t; margin: var(--gap-block) 0 0; padding: 0; position: relative; display: grid; gap: 28px; }
.thread::before { content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px; border-left: 1.5px dashed var(--gold); opacity: 0.7; }
.thread li { counter-increment: t; position: relative; padding-left: 52px; display: grid; gap: 2px; }
.thread li::before {
  content: counter(t); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--patch); border: 1.5px solid var(--gold); color: var(--gold-light);
  font-family: var(--mincho); font-size: 15px; letter-spacing: 0;
}
.thread b { font-family: var(--mincho); font-size: 19px; font-weight: 600; color: var(--ivory); line-height: 1.6; }
.thread span { color: var(--silver); font-size: 14px; }

/* ---- 見られる確率(図) ---- */
.calc { margin: var(--gap-block) 0 0; padding: calc(var(--pad) + 8px); display: grid; grid-template-columns: 1fr 80px auto; gap: 24px; align-items: center; }
.calc-in { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc-in li { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(144, 151, 174, 0.1); border: 1px solid rgba(144, 151, 174, 0.25); }
.calc-in b { font-weight: 600; font-size: 15px; color: var(--ivory); }
.calc-in small { grid-column: 2; font-size: 12px; color: var(--silver); line-height: 1.5; }
.calc-in .ico { grid-row: span 2; }
.calc-flow { height: 2px; position: relative; background: repeating-linear-gradient(90deg, var(--gold) 0 8px, transparent 8px 14px); opacity: 0.8; }
.calc-flow::after { content: ""; position: absolute; right: -2px; top: -5px; border: 6px solid transparent; border-left: 9px solid var(--gold); border-right: 0; }
.gauge { position: relative; width: 168px; height: 168px; display: grid; place-items: center; align-content: center; text-align: center; }
.gauge svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.g-track { fill: none; stroke: rgba(144, 151, 174, 0.22); stroke-width: 8; stroke-dasharray: 3 4; }
.g-bar { fill: none; stroke: var(--gold); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: calc(314.16 * (1 - var(--p) / 100)); }
.g-num { font-family: var(--mincho); color: var(--gold-light); font-size: 18px; line-height: 1; }
.g-num b { font-size: 46px; font-weight: 500; letter-spacing: 0; }
.g-label { font-size: 12px; color: var(--silver); margin-top: 6px; }
.calc figcaption { grid-column: 1 / -1; font-size: 12px; color: var(--silver); text-align: right; }

/* CSSで描くアイコン */
.ico { width: 36px; height: 36px; position: relative; display: block; }
.ico-cloud::before { content: ""; position: absolute; left: 4px; right: 4px; bottom: 9px; height: 13px; border-radius: 10px; background: var(--silver); opacity: 0.9; }
.ico-cloud::after { content: ""; position: absolute; left: 11px; bottom: 15px; width: 15px; height: 15px; border-radius: 50%; background: var(--silver); }
.ico-rain::before { content: ""; position: absolute; left: 11px; top: 7px; width: 14px; height: 14px; background: var(--silver); border-radius: 0 50% 50% 50%; transform: rotate(45deg); }
.ico-rain::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 6px; border-top: 1.5px dashed var(--silver); }
.ico-eye::before { content: ""; position: absolute; left: 4px; right: 4px; top: 10px; height: 16px; border: 1.5px solid var(--silver); border-radius: 50% / 100% 100% 100% 100%; }
.ico-eye::after { content: ""; position: absolute; left: 13px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--silver); }
.ico-moon::before { content: ""; position: absolute; left: 8px; top: 7px; width: 22px; height: 22px; border-radius: 50%; box-shadow: -6px 0 0 0 var(--gold); transform: translateX(6px); }

/* 数字の小さな事実 */
.facts { list-style: none; margin: var(--gap-lead) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 24px; }
.facts li { font-size: 14px; color: var(--cream); padding-left: 14px; border-left: 2px solid rgba(214, 172, 84, 0.6); line-height: 1.6; }
.facts b { color: var(--gold-light); font-weight: 600; }

/* ---- 収録しているできごと ---- */
.events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-lead); margin-top: var(--gap-block); }
.event-card { padding: var(--pad); text-align: center; transition: transform 0.4s ease; }
.event-card img { width: 112px; height: 112px; margin: 0 auto var(--gap-label); transition: transform 0.6s ease; }
.event-card:hover img { transform: rotate(-6deg) scale(1.05); }
.event-card h3 { font-size: 18px; }
.event-card p { font-size: 13px; color: var(--silver); margin-top: 6px; line-height: 1.7; }

/* ---- 星のよみもの ---- */
.reading .wrap { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.reading-text { position: sticky; top: 32px; }
.hint { margin-top: var(--gap-lead); font-size: 13px; color: var(--silver); }
.chips { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  font: inherit; font-size: 14px; letter-spacing: 0.04em; color: var(--ivory); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, #232a4a, #1a2039); border: 1.5px solid rgba(144, 151, 174, 0.55); border-radius: 10px;
  padding: 8px 14px 8px 12px; min-height: 44px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
  transition: transform 0.12s, box-shadow 0.12s, background 0.2s, border-color 0.2s;
}
.chips button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--silver); flex: none; }
.chips button:hover { border-color: var(--gold); }
.chips button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); }
.chips button[aria-pressed="true"] { background: linear-gradient(180deg, #e3bd6a, var(--gold)); border-color: var(--gold-light); color: var(--fabric-deep); font-weight: 600; transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); }
.chips button[aria-pressed="true"]::before { border-color: var(--fabric-deep); background: var(--fabric-deep); box-shadow: inset 0 0 0 2px var(--gold); }
.chips button:focus-visible { outline: 2px dashed var(--gold); outline-offset: 3px; }
.sizes { margin-top: var(--gap-lead); padding-left: 4px; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.sz { display: flex; align-items: flex-end; gap: 10px; font-family: var(--mincho); color: var(--gold-light); line-height: 1; }
.sz i { font-style: normal; }
.sz i:nth-child(1) { font-size: 14px; } .sz i:nth-child(2) { font-size: 18px; } .sz i:nth-child(3) { font-size: 23px; }
.sz i:nth-child(4) { font-size: 29px; } .sz i:nth-child(5) { font-size: 36px; }
.sz-label { font-size: 13px; color: var(--silver); padding-bottom: 2px; }
.reading-sample { padding: calc(var(--pad) + 12px); }
.reading-sample .kicker { font-size: 12px; color: var(--gold); letter-spacing: 0.2em; }
.reading-sample h3 { font-size: 21px; margin-top: 8px; }
.reading-sample { min-height: 0; transition: opacity 0.25s ease; }
.reading-sample.is-swap { opacity: 0; }
.reading-sample .r-short { color: var(--gold-light); margin-top: var(--gap-label); font-size: 15px; font-family: var(--mincho); }
.reading-sample .r-body { margin-top: var(--gap-label); display: grid; gap: 12px; }
.reading-sample .r-body p { color: var(--cream); font-size: 15px; line-height: 2; }
.reading-sample .r-note { color: var(--silver); font-size: 12px; margin-top: var(--gap-lead); padding-top: 12px; border-top: 1px dashed rgba(144, 151, 174, 0.35); }

/* ---- ウィジェット ---- */
.widget-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: var(--gap-lead); margin-top: var(--gap-block); max-width: 760px; }
.widget { padding: var(--pad); min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; }
.widget .w-label { font-size: 12px; color: var(--gold); letter-spacing: 0.16em; }
.widget .w-title { font-family: var(--mincho); font-size: 17px; margin-top: 6px; }
.widget .w-days { font-family: var(--mincho); color: var(--gold-light); font-size: 15px; }
.widget .w-days b { font-size: 40px; font-weight: 500; margin: 0 4px; }
.widget.medium { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: center; }
.widget.medium img { width: 96px; height: 96px; }
.widget-row + .facts { margin-top: var(--gap-block); }

/* ---- ウィジェットのカルーセル(大きさはiPhoneの小・中・大の比率) ---- */
.wg-carousel { margin-top: var(--gap-block); }
.wg-track { display: grid; grid-auto-flow: column; grid-auto-columns: min(100%, 380px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 2px 20px; scrollbar-width: none; overscroll-behavior-x: contain; }
.wg-track::-webkit-scrollbar { display: none; }
.wg-track:focus-visible { outline: 2px dashed var(--gold); outline-offset: 4px; }
.wg-slide { margin: 0; scroll-snap-align: start; display: grid; align-content: center; justify-items: center; gap: 14px; min-height: 100%; }
.wg-slide figcaption { text-align: center; display: grid; gap: 2px; }
.wg-slide figcaption b { font-family: var(--mincho); color: var(--gold-light); font-weight: 600; font-size: 15px; }
.wg-slide figcaption span { font-size: 13px; color: var(--silver); }
.wg { container-type: inline-size; position: relative; border-radius: 22px; background: linear-gradient(rgba(10, 13, 28, 0.25), rgba(10, 13, 28, 0.25)), url("/assets/fabric.png") 0 0 / 180px repeat, var(--fabric); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); color: var(--ivory); font-family: var(--mincho); text-shadow: 0.5px 0.8px 0 rgba(0, 0, 0, 0.6); overflow: hidden; }
.wg::after { content: ""; position: absolute; inset: 7px; border: 2px dashed var(--gold); border-radius: 16px; pointer-events: none; }
.wg-s { width: min(100%, 170px); aspect-ratio: 1 / 1; }
.wg-m { width: 100%; max-width: 364px; aspect-ratio: 364 / 170; }
.wg-l { width: 100%; max-width: 364px; aspect-ratio: 364 / 382; display: grid; grid-template-rows: 1fr auto auto; padding: 5cqw; gap: 3.4cqw; }
.wg p { margin: 0; line-height: 1.3; }
.wg-label { color: var(--gold); font-size: 3.3cqw; letter-spacing: 0.1em; }
.wg-title { font-size: 4.1cqw; font-weight: 600; }
.wg-date, .wg-cap { color: var(--silver); font-size: 3.3cqw; }
.wg-count { color: var(--gold); font-size: 7.1cqw; font-weight: 600; }
.wg-row { height: 100%; display: grid; grid-template-columns: auto 1fr; gap: 2.8cqw; align-items: center; }
.wg-m .wg-row { padding: 4.4cqw; }
.wg-row img { height: 100%; max-height: 34cqw; width: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.wg-l .wg-row img { max-height: 30cqw; }
.wg-text { display: grid; gap: 0.6cqw; }
.wg-hr { border: 0; border-top: 1.5px dashed rgba(144, 151, 174, 0.7); margin: 0; width: 100%; }
.wg-myth { display: grid; gap: 0.9cqw; align-content: start; }
.wg-m .wg-myth { padding: 5cqw; height: 100%; align-content: center; }
.wg-short { font-size: 3.6cqw; color: rgba(236, 238, 243, 0.85); line-height: 1.5; margin-top: 0.6cqw !important; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.wg-short.l3 { -webkit-line-clamp: 3; }
.wg-short.l2 { -webkit-line-clamp: 2; }
/* 小サイズは幅170が基準なので、文字の比率を上げる */
.wg-s { display: grid; justify-items: center; align-content: center; gap: 1.2cqw; padding: 8cqw; text-align: center; }
.wg-s img { width: 52cqw; height: auto; }
.wg-s .wg-count { font-size: 10.6cqw; }
.wg-s .wg-title { font-size: 7cqw; font-weight: 400; }
.wg-myth-s { justify-items: start; align-content: stretch; text-align: left; grid-template-rows: auto 1fr auto; gap: 2cqw; padding: 9.4cqw; }
.wg-myth-s .wg-label { font-size: 6.8cqw; letter-spacing: 0; }
.wg-myth-s .wg-title { font-size: 8.8cqw; font-weight: 600; }
.wg-myth-s .wg-cap { font-size: 6.8cqw; }
/* 実際のウィジェットの画面写真。角は iPhone のウィジェットの丸みに合わせて切る */
.wg-shot { display: block; height: auto; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); }
.wg-shot.wg-l { width: 100%; max-width: 364px; border-radius: 6.3% / 6%; }
.wg-shot.wg-m { width: 100%; max-width: 364px; border-radius: 6.3% / 13.4%; }
.wg-shot.wg-s { width: min(100%, 170px); border-radius: 13.4%; }
.wg-nav { display: flex; align-items: center; justify-content: center; gap: 18px; }
.wg-nav button { width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid rgba(144, 151, 174, 0.55); background: linear-gradient(180deg, #232a4a, #1a2039); color: var(--gold-light); cursor: pointer; display: grid; place-items: center; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45); }
.wg-nav button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); }
.wg-nav button:disabled { opacity: 0.35; cursor: default; }
.wg-nav .wg-prev .arr { transform: rotate(-135deg); }
.wg-count-ind { font-size: 13px; color: var(--silver); min-width: 4em; text-align: center; }
.wg-count-ind b { color: var(--gold-light); font-size: 16px; }

/* ---- 締め(左そろえ。全体と同じ向き) ---- */
.closing { background: rgba(6, 8, 18, 0.55); }
.closing .wrap { display: grid; grid-template-columns: 1fr minmax(0, 460px); gap: 48px; align-items: center; }
.closing h2 { font-size: clamp(26px, 4.2vw, 38px); }
.closing-moons { display: flex; align-items: center; gap: 12px; margin-bottom: var(--gap-lead); }
.closing-moons img { width: 40px; height: 40px; opacity: 0.85; }
.closing-moons img.big { width: 56px; height: 56px; opacity: 1; }
.closing .wrap { align-items: end; }

/* ---- 配信情報(CV)。ヒーロー・締め・追従バーで同じ形 ---- */
.cv { box-shadow: 0 0 0 1px rgba(214, 172, 84, 0.35), 0 12px 40px rgba(214, 172, 84, 0.14), 0 8px 22px rgba(0, 0, 0, 0.4); }
.cv img { border-radius: 14px; }
.cv-name { font-family: var(--mincho); font-size: 20px; letter-spacing: 0.16em; color: var(--ivory); line-height: 1.4; }
.cv-meta { font-size: 13px; color: var(--silver); margin-top: 2px; }
.cv-meta span { margin: 0 4px; }
.cv-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--gold-light); white-space: nowrap; }
.cv-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.cv-mini { margin-top: var(--gap-block); padding: 22px 24px 24px; display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; max-width: 460px; }
.cv-mini .btn { grid-column: 1 / -1; }
.cv-mini img { width: 56px; height: 56px; }
.cv-big { padding: calc(var(--pad) + 12px); background: linear-gradient(160deg, #1e2442, var(--patch)); }
.cv-head { display: flex; align-items: center; gap: 18px; }
.cv-big .cv-head img { width: 72px; height: 72px; }
.cv-big .cv-name { font-size: 24px; }
.cv-big .cv-status { margin-top: var(--gap-lead); font-size: 15px; }
.cv-big .btn { margin-top: var(--gap-lead); width: 100%; }
.notify { margin-top: var(--gap-lead); display: grid; gap: 10px; }
.notify label { font-size: 13px; color: var(--silver); }
.notify input {
  font: inherit; font-size: 16px; color: var(--ivory); width: 100%; min-height: 52px; padding: 12px 16px;
  background: rgba(6, 8, 18, 0.6); border: 1.5px solid rgba(144, 151, 174, 0.55); border-radius: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}
.notify input::placeholder { color: var(--dim); }
.notify input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 172, 84, 0.25); }
.cv-big .notify .btn { margin-top: 0; width: 100%; }
.notify .btn:disabled { opacity: 0.6; cursor: wait; }
.notify-msg { min-height: 1.6em; font-size: 13px; color: #f0b8a8; text-align: center; }
.notify-msg.is-ok { color: var(--gold-light); }
.notify.is-done input, .notify.is-done .btn { display: none; }
.notify-small { font-size: 12px; color: var(--silver); line-height: 1.7; }
.notify .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notify .check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--cream); line-height: 1.6; cursor: pointer; padding: 4px 0; }
.notify .check input { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; accent-color: var(--gold); box-shadow: none; padding: 0; }
.notify.is-done .check { display: none; }
.cv-note { margin-top: 12px; color: var(--cream); }

/* 追従バー: ヒーローを過ぎたら下から出る */
.sticky-cv {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 20;
  width: min(100% - 24px, 520px); transform: translate(-50%, 140%); opacity: 0;
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px 10px 12px; border-radius: 18px; text-decoration: none; color: var(--ivory);
  background: rgba(23, 28, 52, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1.5px dashed rgba(214, 172, 84, 0.7);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.45s cubic-bezier(.2,.8,.2,1), opacity 0.3s;
}
.sticky-cv.is-on { transform: translate(-50%, 0); opacity: 1; }
.sticky-cv img { width: 36px; height: 36px; border-radius: 9px; }
.sc-text { display: grid; line-height: 1.3; }
.sc-text b { font-family: var(--mincho); font-weight: 600; font-size: 15px; letter-spacing: 0.12em; }
.sc-text small { font-size: 11px; color: var(--silver); }
.sc-text small { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-light); }
.sc-text i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* ---- 押せるボタン(押せない表示とは形を分ける: 四角・影・矢印) ---- */
.btn {
  font: inherit; font-weight: 700; letter-spacing: 0.08em; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px; border-radius: 12px;
  transition: transform 0.12s, box-shadow 0.12s, filter 0.2s;
}
.btn-gold { color: var(--fabric-deep); background: linear-gradient(180deg, #f0cf83, var(--gold)); border: 0; box-shadow: 0 4px 0 #8f6f2c, 0 10px 24px rgba(214, 172, 84, 0.3); }
.btn-ghost { color: var(--gold-light); background: rgba(214, 172, 84, 0.08); border: 1.5px solid var(--gold); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45); }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8f6f2c; }
.btn:focus-visible { outline: 2px dashed var(--gold-light); outline-offset: 4px; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 13px; border-radius: 10px; box-shadow: 0 3px 0 #8f6f2c; white-space: nowrap; }
.arr { width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); flex: none; }
.arr.down { transform: rotate(135deg) translate(-2px, 2px); }
.btn-gold .arr { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { translate: 3px 0; } }
.site-footer { padding-bottom: 110px; }

/* ---- 動き ---- */
.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; }
.sky {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, var(--ivory), transparent),
    radial-gradient(1px 1px at 28% 62%, var(--ivory), transparent),
    radial-gradient(1.5px 1.5px at 46% 12%, var(--gold-light), transparent),
    radial-gradient(1px 1px at 63% 40%, var(--ivory), transparent),
    radial-gradient(1.5px 1.5px at 82% 24%, var(--ivory), transparent),
    radial-gradient(1px 1px at 90% 70%, var(--gold-light), transparent),
    radial-gradient(1px 1px at 6% 80%, var(--ivory), transparent),
    radial-gradient(1.5px 1.5px at 38% 88%, var(--ivory), transparent);
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 0.9; } }
.shoot { position: absolute; width: 120px; height: 1.5px; background: linear-gradient(90deg, transparent, var(--gold-light)); transform: rotate(-28deg); opacity: 0; animation: shoot 9s linear infinite; }
.shoot.s1 { top: 14%; left: 58%; }
.shoot.s2 { top: 34%; left: 18%; animation-delay: 3.2s; }
.shoot.s3 { top: 6%; left: 30%; animation-delay: 6.1s; width: 80px; }
@keyframes shoot {
  0% { opacity: 0; translate: 0 0; }
  2% { opacity: 1; }
  9% { opacity: 0; translate: -220px 117px; }
  100% { opacity: 0; translate: -220px 117px; }
}
.float-moon { animation: bob 7s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }
.spin-slow { animation: bob 8s ease-in-out infinite; }

/* 画面に入ったら現れる(JSが動く時だけ隠す) */
.js .reveal, .js .reveal-group > * { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal.is-in, .js .reveal-group.is-in > * { opacity: 1; transform: none; }
.js .reveal-group.is-in > *:nth-child(2) { transition-delay: 0.12s; }
.js .reveal-group.is-in > *:nth-child(3) { transition-delay: 0.24s; }
.js .reveal-group.is-in > *:nth-child(4) { transition-delay: 0.36s; }
.js .reveal-group.is-in > *:nth-child(5) { transition-delay: 0.48s; }
.js .reveal-group.is-in > *:nth-child(6) { transition-delay: 0.6s; }
.js .reveal-group.is-in > *:nth-child(7) { transition-delay: 0.72s; }
/* 見出しの飾り線が縫われていく */
.js .label.reveal::after { transform: scaleX(0); transform-origin: left; transition: transform 1.2s ease 0.3s; }
.js .label.reveal.is-in::after { transform: scaleX(1); }
/* 糸が上から下へ */
.js .thread::before { transform: scaleY(0); transform-origin: top; transition: transform 1.4s ease 0.2s; }
.js .thread.is-in::before { transform: scaleY(1); }
/* 確率の輪が満ちる */
.js .calc .g-bar { stroke-dashoffset: 314.16; transition: stroke-dashoffset 1.8s cubic-bezier(.2,.7,.2,1) 0.4s; }
.js .calc.is-in .g-bar { stroke-dashoffset: calc(314.16 * (1 - var(--p) / 100)); }
.js .calc-flow { background-size: 28px 2px; }
.calc.is-in .calc-flow { animation: flow 1.2s linear infinite; }
@keyframes flow { to { background-position: 14px 0; } }

@media (prefers-reduced-motion: reduce) {
  .sky, .shoot, .float-moon, .spin-slow, .calc-flow, .cv-status i, .btn-gold .arr, .demo-cap.on { animation: none !important; }
  .sticky-cv, .reading-sample { transition: none; }
  .shoot { display: none; }
  .js .reveal, .js .reveal-group > *, .js .label.reveal::after, .js .thread::before { opacity: 1; transform: none; transition: none; }
  .js .calc .g-bar { stroke-dashoffset: calc(314.16 * (1 - var(--p) / 100)); transition: none; }
}

/* 追従バーが狭い画面ではみ出さないように */
.sticky-cv .sc-text { min-width: 0; }
.sticky-cv .sc-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sticky-cv .sc-text small i { display: inline-block; margin-right: 6px; vertical-align: middle; }
@media (max-width: 400px) { .sticky-cv { gap: 10px; padding: 9px 10px; } .sticky-cv .btn-sm { padding: 8px 12px; font-size: 12px; letter-spacing: 0.04em; } }

/* ---- フッター ---- */
.site-footer { padding: 48px 0 56px; border-top: 1.5px dashed rgba(74, 80, 112, 0.8); font-size: 13px; color: var(--silver); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { color: var(--silver); }

/* ---- 下層ページ ---- */
.doc { padding: 40px 0 var(--sec); }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(26px, 4.4vw, 34px); }
.doc .updated { color: var(--silver); font-size: 13px; margin-top: var(--gap-label); }
.doc-body { margin-top: var(--gap-block); padding: calc(var(--pad) * 1.5); }
.doc-body h2 { font-size: 19px; margin: 36px 0 12px; color: var(--gold-light); }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p, .doc-body li { color: var(--cream); }
.doc-body p + p { margin-top: 12px; }
.doc-body ul { padding-left: 1.3em; margin: 10px 0 0; }
.doc-body dl { margin: 0; }
.doc-body dt { color: var(--ivory); font-weight: 600; margin-top: 22px; }
.doc-body dd { margin: 6px 0 0; color: var(--cream); }
.back { display: inline-block; margin-top: var(--gap-block); }

/* ---- スマートフォン ---- */
@media (max-width: 820px) {
  :root { --sec: 64px; --gap-block: 28px; --pad: 24px; }
  .wrap { width: min(100% - 48px, var(--wrap)); }
  .hero { padding-top: 24px; }
  .hero .wrap, .feature .wrap, .reading .wrap, .closing .wrap { grid-template-columns: 1fr; }
  .hero .wrap { gap: 48px; }
  .hero-visual { width: min(70%, 270px); }
  .hero-visual .float-moon { width: 76px; right: -30px; top: -58px; }
  .feature .wrap, .reading .wrap, .closing .wrap { gap: var(--gap-block); }
  .feature-visual { width: min(78%, 280px); }
  .miss { grid-template-columns: 1fr; }
  .calc { grid-template-columns: 1fr; justify-items: center; padding: var(--pad) calc(var(--pad) - 4px) calc(var(--pad) + 4px); }
  .calc-in { width: 100%; }
  .calc-flow { width: 2px; height: 40px; background: repeating-linear-gradient(180deg, var(--gold) 0 8px, transparent 8px 14px); }
  .calc-flow::after { right: -5px; top: auto; bottom: -4px; border: 6px solid transparent; border-top: 9px solid var(--gold); border-bottom: 0; }
  @keyframes flow { to { background-position: 0 14px; } }
  .calc figcaption { text-align: center; }
  .events-grid { grid-template-columns: repeat(2, 1fr); gap: var(--gap-label); }
  .event-card { padding: var(--pad) 16px; }
  .event-card img { width: 84px; height: 84px; }
  .widget-row { grid-template-columns: 1fr; }
  .doc-body { padding: var(--pad); }
  .closing .wrap { align-items: start; }
  .cv-mini { padding: 20px 22px 22px; grid-template-columns: 48px 1fr; gap: 12px 14px; }
  .cv-mini .cv-status { grid-column: 1 / -1; justify-self: start; }
  .reading-text { position: static; }
  .cv-mini img { width: 48px; height: 48px; }
  .cv-mini .cv-name { font-size: 17px; }
  .reading-sample { min-height: 0; }
  .status-pill { font-size: 12px; padding: 3px 10px; }
}
@media (max-width: 480px) {
  .calc-in { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .wrap { width: min(100% - 40px, var(--wrap)); }
  .events-grid { grid-template-columns: 1fr; }
  .section-title, .closing h2 { font-size: 22px; }
  .reading-sample h3 { font-size: 18px; letter-spacing: 0.04em; }
  .cv-big { padding: var(--pad) calc(var(--pad) - 4px); }
}

/* ---- ファーストビュー: 文章と紹介動画(字幕まで)を1画面に収める ---- */
/* 動画の高さを画面の高さから決める。0.46 は動画の縦横比(432/940) */
/* 字幕と注記は動画より広く取り、行数を減らす */
.hero-visual { width: min(100%, 320px); --phone: clamp(150px, calc((100vh - 350px) * 0.46 + 18px), 272px); --phone: clamp(150px, calc((100svh - 350px) * 0.46 + 18px), 272px); }
.hero .demo-phone, .hero .demo-bar { width: var(--phone); margin-inline: auto; }
@media (min-width: 821px) and (max-height: 720px) { .hero { padding-top: 12px; } }
@media (max-width: 820px) {
  /* スマホ: 見出しの下で、左に説明と字幕、右に動画を並べる */
  .hero .wrap {
    --phone: clamp(118px, min(42vw, calc((100vh - 500px) * 0.46)), 220px);
    --phone: clamp(118px, min(42vw, calc((100svh - 500px) * 0.46)), 220px);
    grid-template-columns: minmax(0, 1fr) var(--phone);
    grid-template-rows: auto auto auto 1fr auto auto auto auto;
    grid-template-areas: "tag tag" "h1 h1" "sub phone" ". phone" "cap phone" "bar phone" "note phone" "cv cv";
    column-gap: 18px; row-gap: 0; align-items: start;
  }
  .hero-copy, .hero-visual, .hero .demo { display: contents; }
  .hero-visual { --phone: inherit; } /* スマホでは .hero .wrap 側の大きさを使う */
  .hero-tagline { grid-area: tag; }
  .hero h1 { grid-area: h1; }
  .hero-sub { grid-area: sub; margin-top: 0; font-size: 15px; line-height: 1.8; }
  .hero .demo-phone { grid-area: phone; width: var(--phone); border-radius: 26px; padding: 6px; }
  .hero .demo-video { border-radius: 21px; }
  .hero .demo-toggle { right: 10px; bottom: 10px; width: 40px; height: 40px; }
  .hero .demo-cap { grid-area: cap; margin-top: 14px; min-height: 0; font-size: 15px; text-align: left; }
  .hero .demo-bar { grid-area: bar; margin-top: 4px; width: auto; }
  .hero .demo-note { grid-area: note; margin-top: 4px; text-align: left; font-size: 11px; line-height: 1.6; }
  .hero .cv-mini { grid-area: cv; margin-top: 20px; }
  .hero h1 { margin-bottom: 18px; }
}
@media (max-width: 820px) {
  .hero-visual .float-moon { grid-area: phone; width: 64px; right: -20px; top: -36px; }
}
