:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-2: #efe9e0;
  --ink: #1f1b17;
  --muted: #6f665c;
  --line: #e1d9ce;
  --brand: #2c2a6b;
  --brand-ink: #ffffff;
  --accent: #c0623f;
  --ok: #2f7a4f;
  --warn-bg: #fff4d6;
  --warn-ink: #6b4d00;
  --danger: #a33a2a;
  --radius: 14px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .6em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: .01em; }
h2 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); font-size: .92rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid #6a8cff; outline-offset: 2px; }

.proto-strip { background: var(--ink); color: #f3ede4; font-size: .8rem; text-align: center; padding: 6px 16px; }
.proto-strip .ps-short { display: none; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 40px); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.logo small { font-weight: 500; color: var(--muted); font-size: .75rem; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--brand)); transform: rotate(-12deg); }
.site-nav { display: flex; gap: 4px; overflow-x: auto; }
.site-nav a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); white-space: nowrap; font-size: .95rem; }
.site-nav a[aria-current] { background: var(--surface-2); font-weight: 700; }
main { padding: 0 clamp(16px, 4vw, 40px) 48px; max-width: 1200px; margin: 0 auto; outline: none; }
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 16px 40px; border-top: 1px solid var(--line); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.block { display: flex; width: 100%; }
.btn.danger-ghost { color: var(--danger); border-color: #e7c2bb; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.chip { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag { font-size: .85rem; color: var(--muted); margin-right: 10px; }

/* トップ */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(28px, 6vw, 64px) 0 24px; }
.eyebrow { font-weight: 700; color: var(--accent); font-size: .9rem; margin-bottom: .6em; }
.lead { font-size: 1.05rem; color: #433b33; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 斜め上へ流れる画面（F02） */
.marquee-wrap { min-width: 0; }
.marquee { position: relative; height: clamp(320px, 52vw, 540px); overflow: hidden; border-radius: 24px; background: linear-gradient(160deg, #ebe3d6, #ddd3c4); }
.marquee::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px rgba(31, 27, 23, .18); border-radius: inherit; }
.marquee-tilt { position: absolute; top: -45%; left: -15%; right: -15%; bottom: -45%; display: flex; justify-content: center; gap: 22px; transform: rotate(16deg); }
.marquee-col { display: flex; flex-direction: column; flex: 0 0 auto; width: clamp(110px, 15vw, 170px); animation: rise 70s linear infinite; will-change: transform; }
.marquee-col:nth-child(2) { animation-duration: 90s; margin-top: -140px; }
.marquee-col:nth-child(3) { animation-duration: 78s; margin-top: -60px; }
.marquee-col:nth-child(4) { animation-duration: 96s; margin-top: -200px; }
.phone { margin-bottom: 22px; perspective: 900px; }
.phone-inner { position: relative; transform-style: preserve-3d; }
.phone-front, .phone-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.phone-front { position: relative; border-radius: 16px; box-shadow: 0 10px 24px rgba(31, 27, 23, .18); }
.phone-front img { width: 100%; border-radius: 16px; }
.phone-back { position: absolute; inset: 0; transform: rotateY(180deg); border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; letter-spacing: .3em; font-size: .8rem; background: linear-gradient(145deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 50%, color-mix(in srgb, var(--c) 65%, #000)); }
.mode-flow .phone-back { display: none; }
.mode-group { flex-wrap: wrap; }

/* 「回る」：スマホの枠をつけ、左右に揺れながら一回転する（金属カードCMの回転を参考にした試作） */
.mode-spin .phone-front, .mode-soft .phone-front { padding: 5px; background: #1d1a17; border-radius: 22px; box-shadow: 0 14px 30px rgba(31, 27, 23, .28); overflow: hidden; }
.mode-spin .phone-front img, .mode-soft .phone-front img { border-radius: 17px; }
.mode-spin .phone-front::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .38) 48%, transparent 60%); background-size: 260% 100%; animation: sheen 10s ease-in-out infinite; animation-delay: var(--d); }
.mode-spin .phone-back, .mode-soft .phone-back { border-radius: 22px; box-shadow: 0 14px 30px rgba(31, 27, 23, .28), inset 0 0 0 5px #1d1a17; }
.mode-spin .phone-inner { animation: spin 10s cubic-bezier(.45, 0, .25, 1) infinite; animation-delay: var(--d); }
@keyframes spin {
  0% { transform: rotateY(-22deg) rotateX(6deg); }
  40% { transform: rotateY(22deg) rotateX(-4deg); }
  60% { transform: rotateY(180deg) rotateX(0deg); }
  70% { transform: rotateY(180deg) rotateX(0deg); }
  100% { transform: rotateY(338deg) rotateX(6deg); }
}
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 40% { background-position: 0 0; } }
/* 「控えめに回る」：3台に1台だけ、ゆっくり小さく揺れて、1周期に1回だけ回る */
.mode-soft .phone:nth-child(3n+1) .phone-inner { animation: spin-soft 18s ease-in-out infinite; animation-delay: var(--d); }
.mode-soft .phone:nth-child(3n+1) .phone-front::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .3) 48%, transparent 60%); background-size: 260% 100%; animation: sheen 18s ease-in-out infinite; animation-delay: var(--d); }
@keyframes spin-soft {
  0% { transform: rotateY(-8deg); }
  35% { transform: rotateY(8deg); }
  72% { transform: rotateY(-8deg); }
  100% { transform: rotateY(352deg); }
}
/* 「ときどき1台」：ふだんは流れるだけ。数秒に1回、見えている1台だけが一回転する（台は JS が選ぶ） */
.mode-mix .phone.flip .phone-inner { animation: flip-once 1.8s cubic-bezier(.45, 0, .25, 1); }
@keyframes flip-once { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
.marquee.paused .phone-inner, .marquee.paused .phone-front::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .mode-spin .phone-inner, .mode-spin .phone-front::after, .mode-soft .phone-inner, .mode-soft .phone-front::after, .mode-mix .phone-inner { animation: none !important; } }
.mode-group { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.mode-btn { min-height: 40px; padding: 6px 14px; border: 0; background: transparent; font: inherit; font-size: .9rem; cursor: pointer; }
.mode-btn[aria-pressed="true"] { background: var(--ink); color: #fff; font-weight: 700; }
.marquee.paused .marquee-col { animation-play-state: paused; }
@keyframes rise { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-col { animation: none; } }
.motion-bar { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.motion-btn { min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: .9rem; cursor: pointer; }
.motion-state { font-size: .85rem; color: var(--muted); }

.section { padding: 28px 0; }
.section.narrow { max-width: 820px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cat-card { display: flex; justify-content: space-between; align-items: center; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); min-height: 64px; }
.cat-card:hover { border-color: var(--ink); }
.cat-card span { color: var(--muted); font-size: .9rem; }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.app-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.app-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(31, 27, 23, .1); }
.app-card-shot { height: 190px; overflow: hidden; background: color-mix(in srgb, var(--accent) 16%, #f4efe8); display: flex; justify-content: center; padding-top: 22px; }
.app-card-shot img { width: 130px; border-radius: 12px; box-shadow: 0 8px 18px rgba(31, 27, 23, .15); transform: rotate(-6deg); }
.app-card-photo { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: #1f1b17; }
.app-card-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; display: block; transform: scale(1.02); transition: transform .6s ease; }
.app-card-photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, .22)); box-shadow: inset 0 -3px 0 var(--accent); }
.app-card:hover .app-card-photo img { transform: scale(1.08); }
@media (prefers-reduced-motion: reduce) { .app-card-photo img, .app-card:hover .app-card-photo img { transition: none; transform: none; } }
.app-card-body { padding: 14px 16px 18px; }
.app-card-body h3 { margin: 8px 0 4px; font-size: 1.08rem; }
.app-card-body p { margin: 0; color: var(--muted); font-size: .92rem; }

/* 一覧・検索（F04） */
.search { display: flex; gap: 8px; margin-bottom: 14px; }
.search input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font: inherit; background: var(--surface); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.filter { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; cursor: pointer; }
.filter.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.count { color: var(--muted); font-size: .9rem; }
.empty-box { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; }

/* 詳細（F03） */
.detail { padding: 24px 0; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; overflow-wrap: anywhere; }
.detail-head h1 { margin-top: 8px; }
.scene-hero { margin: 18px 0 6px; }
.scene-frame { position: relative; border-radius: 24px; overflow: hidden; box-shadow: 0 24px 60px rgba(31, 27, 23, .25); aspect-ratio: 3 / 2; background: #1f1b17; }
.scene-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: 60% 55%; animation: sceneZoom 18s ease-out both; }
.scene-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 70%, rgba(0, 0, 0, .18)); }
.scene-hero figcaption { margin-top: 8px; font-size: .8rem; color: var(--muted, #6f665c); }
@keyframes sceneZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .scene-frame img { animation: none; } }
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 18px; margin: 18px 0 26px; border-radius: 20px; background: color-mix(in srgb, var(--accent) 14%, #f4efe8); scroll-snap-type: x mandatory; }
.shots figure { margin: 0; flex: 0 0 auto; width: clamp(150px, 26vw, 220px); scroll-snap-align: start; }
.shots img { border-radius: 16px; box-shadow: 0 10px 24px rgba(31, 27, 23, .15); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; }
.facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; align-self: start; }
.facts dl { margin: 0 0 14px; }
.facts dt { font-weight: 700; font-size: .85rem; color: var(--muted); }
.facts dd { margin: 0 0 12px; }
.facts ul { margin: 0; padding-left: 1.2em; }
.doc-mini { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .92rem; }
.kv { width: 100%; border-collapse: collapse; margin-bottom: 18px; background: var(--surface); }
.kv th, .kv td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv th { width: 9em; color: var(--muted); font-weight: 700; }

/* 管理 */
.admin-banner { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; font-size: .9rem; }
.admin-banner .warn { margin-top: 6px; font-weight: 700; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table, .diff { width: 100%; border-collapse: collapse; font-size: .93rem; }
.admin-table th, .admin-table td, .diff th, .diff td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table thead th, .diff thead th { background: var(--surface-2); font-size: .82rem; color: var(--muted); }
.ops { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.badge.pub { background: #dff1e6; color: var(--ok); }
.badge.draft { background: var(--surface-2); color: var(--muted); }
.badge.both { background: var(--warn-bg); color: var(--warn-ink); }
.admin-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.diff td.old { color: var(--muted); text-decoration: line-through; text-decoration-color: #c9b9a6; overflow-wrap: anywhere; }
.diff td.new { background: #f1f8f2; overflow-wrap: anywhere; }
.diff th { width: 8em; }

.edit-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 16px 6px; margin: 0 0 16px; }
.edit-form legend { font-weight: 800; padding: 0 6px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: .92rem; }
.field small { color: var(--muted); font-size: .8rem; }
.field input, .field textarea, .field select { font: inherit; padding: 8px 12px; border: 1px solid #cfc5b8; border-radius: 10px; background: #fff; min-height: 44px; width: 100%; }
.field input[type=color] { width: 72px; padding: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; }
.check { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.check input { width: 20px; height: 20px; }
.preview-shots { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 14px; }
.preview-shots img { width: 90px; border-radius: 10px; border: 1px solid var(--line); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 18px; }
.errors:empty { display: none; }
.errors { background: #fdecea; color: var(--danger); border-radius: 12px; padding: 12px 14px 2px; margin-bottom: 14px; }
.conflict { background: #fdecea; color: var(--danger); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.conflict .btn { margin-top: 8px; }
.danger-zone { border-top: 1px solid var(--line); padding-top: 14px; }

.preview-bar { position: sticky; top: 64px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; background: #2c2a6b; color: #fff; padding: 10px 14px; border-radius: 0 0 14px 14px; font-size: .9rem; }
.preview-actions { display: flex; gap: 8px; margin-left: auto; }
.preview-actions .btn { min-height: 36px; padding: 4px 14px; }

.history { list-style: none; padding: 0; margin: 0; }
.history li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.history-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.history details { margin-top: 10px; }
.history summary { cursor: pointer; color: var(--brand); font-size: .92rem; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100% - 32px); font-size: .92rem; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* スマホ */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .detail-grid { grid-template-columns: 1fr; }
  .marquee { height: 300px; }
  .marquee-col { width: 100px; }
  .marquee-tilt { gap: 14px; }
  .phone { margin-bottom: 14px; }
  .site-header { position: static; padding: 10px 16px; }
  .preview-bar { top: 0; }
  .preview-actions { margin-left: 0; }
  .search .btn { padding: 8px 14px; }
}

/* 要件定義書 */
.spec { padding: 24px 0; }
.spec-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 22px; }
.spec-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.spec-body { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; align-items: start; }
.spec-toc { position: sticky; top: 80px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: .92rem; }
.spec-toc ol { margin: 8px 0 0; padding-left: 1.4em; }
.spec-toc a { color: var(--ink); text-decoration: none; display: block; padding: 3px 0; }
.spec-toc a:hover { color: var(--brand); text-decoration: underline; }
.spec-sec { margin-bottom: 36px; scroll-margin-top: 80px; }
.spec-sec h2 { padding-left: 12px; border-left: 4px solid var(--accent); }
.spec-sec h3 { font-size: 1.02rem; margin: 14px 0 6px; }
.spec-list { padding-left: 1.3em; margin: 0; }
.spec-list li { margin-bottom: 6px; }
.spec-kv th { width: 13em; color: var(--ink); }
.spec-kv thead th { background: var(--surface-2); color: var(--muted); font-size: .82rem; }
.spec-group, .spec-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 12px; margin-bottom: 12px; }
.spec-group ul { margin: 0; padding-left: 1.3em; }
.spec-table p { margin: 0 0 8px; color: var(--muted); font-size: .92rem; }
.field-chip { display: inline-block; font-size: .82rem; background: var(--surface-2); border-radius: 8px; padding: 2px 8px; margin: 0 6px 6px 0; }
@media (max-width: 760px) {
  .spec-body { grid-template-columns: 1fr; }
  .spec-toc { position: static; }
  .spec-kv th { width: auto; }
}

/* 印刷・PDF（要件定義書） */
@media print {
  .site-header, .site-footer, .skip, .toast, .spec-toc, .no-print, .crumbs { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .spec-body { display: block; }
  .spec-sec { break-inside: auto; margin-bottom: 20px; }
  .spec-sec h2, .spec-group h3, .spec-table h3 { break-after: avoid; }
  .spec-group, .spec-table, .spec-kv tr { break-inside: avoid; }
  .table-wrap { overflow: visible; border: 0; }
  .proto-strip { background: none; color: #555; border-bottom: 1px solid #ccc; }
}

/* サービス・料金 */
.svc-hero { padding: clamp(28px, 6vw, 56px) 0 12px; max-width: 820px; }
.svc-note { display: inline-block; background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 6px 12px; font-size: .9rem; }
.svc-learn { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.svc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.svc-card h3 { margin: 4px 0 6px; font-size: 1.02rem; }
.svc-card p { margin: 0 0 6px; font-size: .93rem; color: #433b33; }
.svc-toc { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 8px 0 12px; }
.svc-toc a { text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .9rem; min-height: 36px; display: inline-flex; align-items: center; }
.svc-sec { padding: 26px 0; scroll-margin-top: 80px; }
.svc-num { font-weight: 800; color: var(--accent); margin: 0; letter-spacing: .1em; }
.svc-pains { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.svc-pains li { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 14px; }
.svc-walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.svc-badge { font-size: .75rem; font-weight: 800; color: #fff; background: var(--brand); border-radius: 999px; padding: 2px 10px; }
.svc-risk { color: var(--danger) !important; font-size: .88rem !important; }
.svc-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.svc-steps li { display: grid; grid-template-columns: 11em 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.svc-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; align-items: stretch; }
.svc-plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; }
.svc-plan.featured { border: 2px solid var(--brand); box-shadow: 0 10px 24px rgba(44, 42, 107, .12); }
.svc-pick { position: absolute; top: -12px; right: 14px; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 800; border-radius: 999px; padding: 2px 12px; }
.svc-tag { margin: 0; color: var(--muted); font-size: .85rem; }
.svc-plan h3 { margin: 4px 0; font-size: 1.15rem; }
.svc-price { font-size: 1.4rem; font-weight: 800; margin: 4px 0 8px; color: var(--brand); }
.svc-plan ul { margin: auto 0 0; padding-left: 1.2em; font-size: .92rem; }
.svc-faq { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.svc-faq summary { cursor: pointer; font-weight: 700; }
.svc-faq p { margin: 8px 0 2px; }
.svc-contact { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; max-width: 640px; }
@media (max-width: 760px) {
  .svc-steps li { grid-template-columns: 1fr; gap: 4px; }
}
.tools-inline { display: contents; }

/* ステージ（トップの全幅の演出・2026-10-18） */
html, body { overflow-x: clip; }
.stage { position: relative; margin-inline: calc(50% - 50vw); height: clamp(560px, 86vh, 820px); overflow: hidden; background: radial-gradient(ellipse at 50% 35%, #0b1d33 0%, #060d1f 45%, #020309 100%); color: #e8fff7; perspective: 1200px; isolation: isolate; }
.stage-dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.stage-glow { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(circle at 50% 46%, rgba(16, 185, 129, .16), transparent 50%), radial-gradient(circle at 12% 18%, rgba(56, 189, 248, .10), transparent 40%), radial-gradient(circle at 88% 82%, rgba(167, 139, 250, .12), transparent 42%); }
.stage::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0, 0, 0, .55) 100%); }
.stage-field { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 2; }
.stage-card { position: absolute; left: -95px; top: -175px; width: 190px; height: 350px; transform-style: preserve-3d; will-change: transform; cursor: pointer; --t: 4px; }
/* 端末の厚み：表と裏の間に、金属のふちを1枚はさむ */
.stage-rim { position: absolute; inset: 0; border-radius: 30px; background: linear-gradient(90deg, #6b6f76, #2b2d31 30%, #8b9097 50%, #2b2d31 70%, #5c6067); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.stage-btns { position: absolute; right: -2px; top: 78px; width: 3px; height: 46px; border-radius: 2px; background: linear-gradient(180deg, #8a8f96, #3b3e43); transform: translateZ(0); box-shadow: 0 60px 0 0 #5c6067, -193px 10px 0 0 #5c6067, -193px 52px 0 0 #5c6067; }
.stage-face, .stage-back { position: absolute; inset: 0; border-radius: 30px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.stage-face { transform: translateZ(var(--t)); padding: 7px; background: #0b0c0e; box-shadow: inset 0 0 0 1.5px #9aa0a8, inset 0 0 0 3px #1b1d21, inset 0 0 0 4px rgba(255, 255, 255, .06), 0 24px 50px rgba(0, 0, 0, .65); transition: box-shadow .3s; }
.stage-screen { position: absolute; inset: 7px; border-radius: 24px; overflow: hidden; background: #000; }
.stage-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; filter: saturate(1.05) contrast(1.02); }
.stage-island { position: absolute; top: 14px; left: 50%; width: 52px; height: 15px; margin-left: -26px; border-radius: 10px; background: #050506; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.stage-island::after { content: ""; position: absolute; right: 9px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #3b4a66, #0a0d14 70%); }
.stage-glare { position: absolute; inset: -50%; background: linear-gradient(125deg, transparent 38%, rgba(255, 255, 255, .10) 47%, rgba(255, 255, 255, .26) 50%, rgba(255, 255, 255, .05) 53%, transparent 62%); transform: rotate(18deg); pointer-events: none; mix-blend-mode: screen; }
/* 裏：つや消しのガラスとカメラ */
.stage-back { transform: rotateY(180deg) translateZ(var(--t)); background: radial-gradient(120% 80% at 30% 15%, color-mix(in srgb, var(--c) 70%, #fff) 0%, var(--c) 45%, color-mix(in srgb, var(--c) 55%, #000) 100%); box-shadow: inset 0 0 0 1.5px #9aa0a8, inset 0 0 0 3px rgba(0, 0, 0, .35), 0 24px 50px rgba(0, 0, 0, .65); }
.stage-back::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .16), transparent 35%, transparent 65%, rgba(255, 255, 255, .06)); }
.stage-cam { position: absolute; top: 14px; left: 14px; width: 66px; height: 66px; border-radius: 18px; background: color-mix(in srgb, var(--c) 60%, #000); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 4px 10px rgba(0, 0, 0, .35); }
.stage-cam i { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #4b5a78 0, #10131a 45%, #000 70%); box-shadow: 0 0 0 3px #1c1e22, 0 0 0 4px #7c8189; }
.stage-cam i:nth-child(1) { left: 8px; top: 8px; } .stage-cam i:nth-child(2) { left: 8px; top: 36px; } .stage-cam i:nth-child(3) { left: 37px; top: 22px; width: 18px; height: 18px; }
.stage-mark { position: absolute; left: 0; right: 0; bottom: 30px; text-align: center; color: rgba(255, 255, 255, .7); font-weight: 700; letter-spacing: .32em; font-size: .7rem; }
.stage-card:hover .stage-face { box-shadow: inset 0 0 0 1.5px #c9ced5, inset 0 0 0 3px #1b1d21, 0 26px 56px rgba(0, 0, 0, .75), 0 0 34px rgba(110, 231, 183, .35); }
.stage-copy { position: relative; z-index: 3; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 16px; pointer-events: none; }
.stage-copy::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(760px, 96vw); height: 420px; transform: translate(-50%, -50%); background: radial-gradient(ellipse, rgba(2, 8, 9, .82) 0%, rgba(2, 8, 9, .5) 55%, transparent 75%); z-index: -1; }
.stage-copy a, .stage-copy button, .stage-copy input, .stage-copy label { pointer-events: auto; }
.stage-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(6, 40, 34, .7); border: 1px solid rgba(110, 240, 200, .35); color: #a7f3d0; font-size: .82rem; letter-spacing: .08em; }
.stage-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px #34d399; }
.stage h1 { font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.25; margin: 18px 0 14px; color: #fff; text-shadow: 0 0 18px rgba(80, 250, 190, .45); }
.stage-grad { background: linear-gradient(90deg, #6ee7b7, #a7f3d0, #34d399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stage-lead { max-width: 620px; color: #cfe9e1; font-size: 1.02rem; margin: 0 0 22px; }
.stage-actions { justify-content: center; }
.stage-primary { background: linear-gradient(135deg, #10b981, #059669); color: #02150f; border-color: transparent; box-shadow: 0 0 22px rgba(16, 185, 129, .45); }
.stage-primary:hover { box-shadow: 0 0 34px rgba(52, 211, 153, .8); border-color: transparent; }
.stage-ghost { background: rgba(10, 25, 28, .8); color: #e8fff7; border-color: rgba(110, 240, 200, .35); }
.stage-ghost:hover { border-color: rgba(160, 255, 225, .8); }
.stage-controls { margin-top: 26px; display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding: 10px 16px; border-radius: 16px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(110, 240, 200, .2); }
.stage-btn { min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1px solid rgba(110, 240, 200, .4); background: transparent; color: #d1fae5; font: inherit; font-size: .9rem; cursor: pointer; }
.stage-btn:disabled { opacity: .5; cursor: not-allowed; }
.stage-speed { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: #a7f3d0; }
.stage-speed input { width: 120px; accent-color: #34d399; }
.stage-val { width: 3.2em; text-align: left; color: #e8fff7; }
.stage-note { font-size: .82rem; color: #a7f3d0; }
.stage :focus-visible { outline-color: #6ee7b7; }
@media (max-width: 760px) {
  .stage { height: clamp(560px, 92vh, 720px); }
  .stage-card { left: -70px; top: -128px; width: 140px; height: 256px; --t: 3px; }
  .stage-btns { display: none; }
  .stage-cam { width: 48px; height: 48px; border-radius: 14px; } .stage-cam i { width: 16px; height: 16px; } .stage-cam i:nth-child(2) { top: 26px; } .stage-cam i:nth-child(3) { left: 27px; top: 16px; width: 13px; height: 13px; }
  .stage-speed input { width: 90px; }
}

/* 要件定義書のフロー図 */
.spec-flow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 16px 14px; margin-bottom: 14px; break-inside: avoid; }
.flow-row { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px 0; }
.flow-step { display: flex; align-items: center; gap: 8px; background: color-mix(in srgb, var(--accent) 10%, #fff); border: 1px solid color-mix(in srgb, var(--accent) 35%, #fff); border-radius: 12px; padding: 8px 12px; font-size: .9rem; max-width: 260px; }
.flow-step:not(:last-child)::after { content: "→"; margin: 0 -26px 0 6px; color: var(--muted); font-weight: 700; width: 20px; text-align: center; flex: 0 0 20px; }
.flow-step:not(:last-child) { margin-right: 26px; }
.flow-num { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 760px) {
  .flow-row { flex-direction: column; }
  .flow-step { max-width: none; margin-right: 0 !important; }
  .flow-step:not(:last-child)::after { content: "↓"; margin: 0 0 0 auto; }
}
.spec-policy { background: color-mix(in srgb, var(--accent) 7%, #fff); border: 1px solid color-mix(in srgb, var(--accent) 30%, #fff); border-radius: var(--radius); padding: 14px 16px 14px 34px; }
.safety-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.safety-grid .svc-num { margin: 0 0 4px; }
/* スマホ（狭い画面）だけの指定。ほかの指定より後ろに置く */
@media (max-width: 640px) { .proto-strip .ps-long { display: none; } .proto-strip .ps-short { display: inline; } .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stage-card { opacity: .82; } .stage-copy::before { background: radial-gradient(ellipse, rgba(2, 8, 9, .9) 0%, rgba(2, 8, 9, .6) 60%, transparent 80%); height: 520px; } }
/* 料金の決め方と目安の計算（サービスのページ） */
.svc-pricing { margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.svc-pricing h3 { margin: 0 0 6px; }
.svc-calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; margin-top: 8px; }
.svc-calc label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.svc-calc input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.svc-calc-out { grid-column: 1 / -1; margin: 4px 0 0; font-weight: 700; color: var(--brand); }

/* 削減効果の試算 */
.savings { margin-top: 36px; }
.sv-opts { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 12px 0; }
.sv-opts select, .sv-table input[type=number], .sv-opts input[type=number] { font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.sv-table input[type=number], .sv-opts input[type=number] { width: 5.2em; }
.sv-table td { white-space: nowrap; }
.sv-table th { white-space: normal; min-width: 10em; }
.sv-table td, .sv-table th { padding-inline: 8px; }
.sv-rate { display: flex; align-items: center; gap: 8px; }
.sv-rate input { width: 96px; accent-color: var(--accent, currentColor); }
.sv-rate output { min-width: 3em; font-variant-numeric: tabular-nums; }
.sv-saved { font-weight: 700; font-variant-numeric: tabular-nums; }
.sv-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.sv-big { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent, var(--line)); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; }
.sv-big span { font-size: .85rem; color: var(--muted); }
.sv-big strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.sv-big small { color: var(--muted); font-variant-numeric: tabular-nums; }
.sv-notes { font-size: .85rem; color: var(--muted); padding-left: 1.2em; }

/* 公開版の表示（copy-site.mjs で足す） */
.logo-haruka { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.site-nav a.nav-consult { background: #283a60; color: #fff; font-weight: 700; }
.site-nav a.nav-consult:hover { background: #18233d; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 20px 0 12px; color: var(--ink); }
.footer-brand strong { font-size: 1.05rem; }
.footer-brand span { font-size: .75rem; letter-spacing: .08em; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.footer-links a { color: var(--muted); }
