/* AIつくり手帖 B案テーマ「立体・未来」 2026-11-06 追加。外すときは src/views.tsx の theme-future.css の <link> を消す。 */

/* ---------- 色と土台 ---------- */
:root {
  --fx-bg: #07071a;
  --fx-panel: #0c0c24;
  --fx-accent: #7b6cff;
  --fx-accent-light: #c9c2ff;
  --fx-cyan: #4fd1e8;
  --fx-cyan-light: #9feffa;
  --fx-text: #f2f1fa;
  --fx-text-sub: #b9b6d3;
  --fx-glass: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.015));
  --fx-glass-border: rgba(255,255,255,.10);
  --fx-glass-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 24px 40px -24px rgba(0,0,0,.9);
  /* 白文字を載せるので、明るい端でも 4.5:1 以上になる色にしている */
  --fx-chip: linear-gradient(145deg, #6a5cf0, #3a2db0);
  --fx-chip-cyan: linear-gradient(145deg, #187a91, #0e4d5c);
  --fx-chip-shadow: inset 0 2px 0 rgba(255,255,255,.45), inset 0 -5px 0 rgba(0,0,0,.25), 0 12px 24px -8px rgba(123,108,255,.7);
  --fx-display: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --fx-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* 既存の変数を暗い背景向けに置き換える */
  --ink: var(--fx-text);
  --muted: #a9a6c4;
  --line: rgba(255,255,255,.10);
  --brand50: rgba(123,108,255,.12);
  --brand100: rgba(123,108,255,.28);
  --brand200: rgba(123,108,255,.45);
  --brand400: #9488ff;
  --brand600: var(--fx-accent-light);
  --brand700: var(--fx-accent);
}
html { background: var(--fx-bg); color-scheme: dark; }
body { background: transparent; color: var(--ink); }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 900px 600px at 50% -120px, rgba(123,108,255,.30), transparent 70%),
    radial-gradient(ellipse 600px 600px at 0% 60%, rgba(79,209,232,.08), transparent 70%);
}
h1, h2, h3 { font-family: var(--fx-display); font-weight: 900; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--fx-cyan); outline-offset: 3px; }

/* ---------- 見出しの小ラベル ---------- */
.eyebrow { font-family: var(--fx-mono); font-weight: 500; color: var(--fx-cyan-light); letter-spacing: .16em; }
.section-title .eyebrow::before { content: "// "; }
.section-title h2, .discovery-section .section-title h2 { font-size: 34px; }
.text-link { color: var(--fx-accent-light); }

/* ---------- ヘッダー(ガラス) ---------- */
.header { background: transparent; }
/* 既存の header:before は 100vw で幅を取るため、スクロールバーの分(約8px)横にはみ出していた。
   幅は header の中に収め、左右への広がりは box-shadow で描く(はみ出しが起きない) */
.header:before, .header::before {
  inset: 0;
  background: rgba(7,7,26,.72);
  border-bottom: 0;
  box-shadow: 0 0 0 100vmax rgba(7,7,26,.72), 0 1px 0 100vmax rgba(255,255,255,.08);
  clip-path: inset(0 -100vmax);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.media-symbol span { background: var(--fx-accent); }
.media-symbol span:nth-child(2), .media-symbol span:nth-child(3) { background: var(--fx-cyan); opacity: 1; }
.media-name { font-family: var(--fx-display); }
.desktop-nav a { color: #d8d6ea; }
.nav-outline, .desktop-nav .nav-outline { background: #f2f1fa; color: var(--fx-bg); border-color: #f2f1fa; font-weight: 700; }
.nav-outline:hover, .desktop-nav .nav-outline:hover { background: #4b3fc8; color: #fff; border-color: #4b3fc8; }
.menu-toggle { background: rgba(255,255,255,.06); color: var(--fx-text); border: 1px solid var(--fx-glass-border); }
.mobile-nav { background: var(--fx-panel); color: var(--fx-text); }

/* ---------- ボタン ---------- */
.button.dark, .discovery-search button, .discovery-hero .discovery-search button, .nav-cta {
  background: linear-gradient(180deg, #6a5cf0, #4b3fc8); color: #fff; border: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.30), 0 10px 24px -8px rgba(123,108,255,.85);
}
.button.dark:hover, .discovery-search button:hover, .nav-cta:hover { background: linear-gradient(180deg, #5d4fe6, #4336b8); color: #fff; }
.skip { background: #f2f1fa; color: #07071a; }
.button.outline, .button.light { background: rgba(255,255,255,.06); color: var(--fx-text); border: 1px solid rgba(255,255,255,.18); }

/* ---------- ヒーロー ---------- */
.discovery-hero h1 { font-size: clamp(32px, 4.4vw, 58px); line-height: 1.32; }
.discovery-hero h1 span {
  background: linear-gradient(90deg, #b3a9ff 0%, var(--fx-accent) 45%, var(--fx-cyan) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.discovery-lede { color: var(--fx-text-sub); }
.discovery-hero .discovery-search {
  background: #11112a; border: 1px solid rgba(255,255,255,.16); border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 0 0 1px rgba(123,108,255,.25), 0 0 44px -6px rgba(123,108,255,.65);
}
.discovery-search input { color: var(--fx-text); }
.discovery-search input::placeholder { color: #8f8cab; }
.hero-caption { color: #8f8cab; }

/* 右側の編集部メモ = 3D ステージ入りのガラスケース */
.hero-editor-note {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--fx-glass); border: 1px solid var(--fx-glass-border); border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 40px 80px -40px rgba(123,108,255,.6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.hero-editor-note:has(.future-stage) { padding-top: 300px; }
.hero-editor-note h2 { color: var(--fx-text); }
.hero-editor-note p { color: var(--fx-text-sub); }
.hero-editor-note a { color: var(--fx-accent-light); }

.future-stage { position: absolute; left: 0; right: 0; top: 0; height: 320px; z-index: -1; pointer-events: none; }
.future-stage__floor {
  position: absolute; left: -40%; right: -40%; bottom: 0; height: 220px;
  background-image: linear-gradient(rgba(123,108,255,.38) 1px, transparent 1px), linear-gradient(90deg, rgba(123,108,255,.38) 1px, transparent 1px);
  background-size: 44px 44px; transform: perspective(420px) rotateX(64deg); transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); mask-image: linear-gradient(to top, #000 10%, transparent 85%);
}
.future-stage__beam {
  position: absolute; left: 50%; top: 0; bottom: 30px; width: 2px; margin-left: -1px;
  background: linear-gradient(to bottom, transparent, rgba(201,194,255,.9), transparent);
  box-shadow: 0 0 40px 8px rgba(123,108,255,.45);
}
.future-stage__cubes { position: absolute; left: 50%; top: 24px; width: 300px; margin-left: -150px; overflow: visible; animation: fx-float 7s ease-in-out infinite; }
@keyframes fx-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- 目的から探す ---------- */
.discovery-section + .discovery-section { border-top-color: rgba(255,255,255,.06); }
.purpose-grid > a {
  background: var(--fx-glass); border: 1px solid var(--fx-glass-border); border-radius: 20px;
  box-shadow: var(--fx-glass-shadow); padding: 24px; gap: 12px; overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .2s;
}
.purpose-grid > a::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: rgba(123,108,255,.30); filter: blur(30px); pointer-events: none;
}
.purpose-grid > a:nth-child(even)::after { background: rgba(79,209,232,.24); }
.purpose-grid > a:hover { border-color: rgba(201,194,255,.45); transform: perspective(900px) rotateX(5deg) translateY(-6px); box-shadow: 0 36px 70px -24px rgba(123,108,255,.55), inset 0 1px 0 rgba(255,255,255,.18); }
.purpose-number {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--fx-chip); box-shadow: var(--fx-chip-shadow);
  color: #fff; font-family: var(--fx-mono); letter-spacing: 0; font-size: 14px;
  transform: perspective(300px) rotateX(10deg) rotateY(-12deg);
}
.purpose-grid > a:nth-child(even) .purpose-number { background: var(--fx-chip-cyan); box-shadow: inset 0 2px 0 rgba(255,255,255,.45), inset 0 -5px 0 rgba(0,0,0,.25), 0 12px 24px -8px rgba(79,209,232,.6); }
.purpose-grid strong { font-family: var(--fx-display); font-weight: 900; font-size: 18px; }
.purpose-grid > a > span:last-child { color: var(--fx-cyan-light); }

/* ---------- サービスカード ---------- */
.service-card {
  background: var(--fx-glass); border: 1px solid var(--fx-glass-border); border-radius: 20px;
  box-shadow: var(--fx-glass-shadow); transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.service-card:hover { transform: perspective(900px) rotateX(4deg) translateY(-6px); box-shadow: 0 36px 70px -24px rgba(123,108,255,.5), inset 0 1px 0 rgba(255,255,255,.18); }
.service-card-visual { background: linear-gradient(135deg, #1b1a3a, #10233a); }
.service-card-visual img { background: #11112a; }
.service-image-credit { background: rgba(7,7,26,.78); color: #a9a6c4; border-top: 1px solid rgba(255,255,255,.06); }
.service-monogram {
  position: absolute; inset: 0; margin: auto; width: 112px; height: 112px; border-radius: 30px;
  background: var(--fx-chip); box-shadow: var(--fx-chip-shadow), 0 30px 60px -10px rgba(123,108,255,.55);
  color: #fff; font-family: var(--fx-display); font-size: 56px; font-weight: 900;
  transform: perspective(400px) rotateX(12deg) rotateY(-16deg);
}
.service-card:nth-child(even) .service-monogram { background: var(--fx-chip-cyan); }
.service-disclosure, .pr-label {
  background: rgba(255,196,87,.14); color: #ffd27a; border: 1px solid rgba(255,196,87,.35);
}
.service-card-content .eyebrow { font-family: inherit; color: var(--fx-accent-light); letter-spacing: .04em; }
.service-tags > span { background: rgba(255,255,255,.06); color: #d8d6ea; border: 1px solid rgba(255,255,255,.08); }
.service-card-content .service-card-note { color: var(--fx-text-sub); }
.service-card-content > .service-link { background: rgba(123,108,255,.14); color: var(--fx-accent-light); border: 1px solid rgba(123,108,255,.4); box-shadow: none; }
.service-card-content > .service-link:hover { background: rgba(123,108,255,.26); }
.service-check-date, .service-card-content .service-check-date { font-family: var(--fx-mono); color: var(--muted); }
.service-check-date::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 8px; vertical-align: middle;
  background: var(--fx-cyan); box-shadow: 0 0 8px var(--fx-cyan);
}
.save-service, .share-links button, .share-links a { background: rgba(255,255,255,.05); color: var(--fx-text); border-color: rgba(255,255,255,.14); border-radius: 12px; }
.save-service[aria-pressed=true] { background: rgba(123,108,255,.22); border-color: var(--fx-accent); color: #fff; }
.compare-select input { accent-color: var(--fx-accent); }
.comparison-tray { background: rgba(12,12,36,.9); border-color: rgba(123,108,255,.4); box-shadow: 0 8px 40px rgba(0,0,0,.6), 0 0 30px -10px rgba(123,108,255,.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* ---------- 記事カード ---------- */
.article-card {
  background: var(--fx-glass); border: 1px solid var(--fx-glass-border); border-radius: 20px; box-shadow: var(--fx-glass-shadow);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.article-card:hover { transform: perspective(900px) rotateX(4deg) translateY(-6px); box-shadow: 0 36px 70px -24px rgba(123,108,255,.5); }
.card-art { background: linear-gradient(135deg, #1b1a3a, #10233a); }
.article-card .card-photo { background: #11112a; }
.format-badge { background: rgba(7,7,26,.7); color: var(--fx-cyan-light); border: 1px solid rgba(255,255,255,.14); font-family: var(--fx-mono); }
.card-content p { color: var(--muted); }

/* ---------- 掲載案内(光の柱) ---------- */
.builder-strip {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--fx-panel); border: 1px solid rgba(255,255,255,.12); border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.builder-strip::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -60%; width: 900px; height: 520px; margin-left: -450px;
  background: radial-gradient(ellipse at center top, rgba(123,108,255,.55), rgba(79,209,232,.12) 45%, transparent 70%);
}
.builder-strip::after {
  content: ""; position: absolute; z-index: -1; left: -10%; right: -10%; bottom: -10px; height: 150px;
  background-image: linear-gradient(rgba(123,108,255,.3) 1px, transparent 1px), linear-gradient(90deg, rgba(123,108,255,.3) 1px, transparent 1px);
  background-size: 40px 40px; transform: perspective(400px) rotateX(60deg); transform-origin: bottom;
  -webkit-mask-image: linear-gradient(to top, #000, transparent); mask-image: linear-gradient(to top, #000, transparent);
}
.builder-strip h2 { font-size: 32px; }
.builder-strip p { color: var(--fx-text-sub); }

/* ---------- フッター ---------- */
footer { background: transparent; border-top-color: rgba(255,255,255,.08); }
.footer-links a { color: #d8d6ea; }
.operator-line, footer .muted { color: #8f8cab; }

/* ---------- 記事ページ:暗い空間に浮かぶ明るい「紙」 ---------- */
.article-body {
  --ink: #1a1930; --muted: #5b5975; --line: #dcd8ec;
  --brand50: #edebfa; --brand100: #dcd7f7; --brand600: #4b3fc8; --brand700: #3a30a8;
  background: #f5f4fa; color: var(--ink); border: 0; border-radius: 28px; color-scheme: light;
  box-shadow: inset 0 1px 0 #fff, 0 50px 100px -40px rgba(123,108,255,.45), 0 20px 40px -20px rgba(0,0,0,.8);
}
.article-body .eyebrow { color: #4b3fc8; }
.article-body h1 { font-size: 38px; line-height: 1.5; }
.article-body .text-link, .article-body .meta { color: #4b3fc8; }
.article-body .pr-label { background: #fbf0d9; color: #7a4e00; border-color: #f1dcae; }
.article-body .share-links button, .article-body .share-links a { background: #fff; color: #1a1930; border-color: #d4cef7; }
.article-body .notice { background: #edebfa; border-color: #d4cef7; color: #29234f; }
.article-body .article-toc { background: #edebfa; border-color: #d4cef7; }
.article-body .article-cta { background: #edebfa; border-color: #d4cef7; }
.article-inline-media img { border-radius: 16px; box-shadow: 0 24px 50px -24px rgba(26,25,48,.5); }

/* 見出し番号を立体のチップに */
.article-prose { counter-reset: fx-sec; }
.article-prose h2 { counter-increment: fx-sec; display: flex; align-items: center; gap: 16px; border-bottom: 0; padding-bottom: 0; }
.article-prose h2::before {
  content: counter(fx-sec, decimal-leading-zero); flex: none;
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--fx-chip); color: #fff; font-family: var(--fx-mono); font-size: 15px; font-weight: 500;
  box-shadow: var(--fx-chip-shadow); transform: perspective(300px) rotateX(10deg) rotateY(-12deg);
}
.article-prose h2:nth-of-type(even)::before { background: var(--fx-chip-cyan); }

/* 記事内の「試す前に」= 暗いガラスのカード */
.article-body .service-summary {
  --ink: var(--fx-text); --muted: #a9a6c4; --brand600: var(--fx-accent-light);
  position: relative; overflow: hidden; color: var(--fx-text);
  background: var(--fx-panel); border: 1px solid rgba(255,255,255,.12); border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 30px 60px -30px rgba(12,12,36,.9);
}
.article-body .service-summary::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: rgba(79,209,232,.22); filter: blur(40px); pointer-events: none;
}
.article-body .service-summary .eyebrow { color: var(--fx-cyan-light); }
.article-body .service-summary dl > div { border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.06); }
.article-body .service-summary dt { color: #a9a6c4; font-weight: 500; }
.article-body .service-summary .text-link { color: var(--fx-accent-light); }

/* ---------- ほかのページの白いパネル・フォーム・表 ---------- */
.form, .narrow .form, .discovery-filters, .discovery-empty, .empty, .empty-small, .editor-section, .plan,
.sidebar-pitch, .reader-feedback, .match-reasons, .update-item, .sample-item, .stats > div, .start-checklist li,
.service-preparation, .service-pr, .format-cards > a, .category-links a, .form-sections a, .platform-feature-grid > a,
.platform-public-item, .portal-article, .analytics-banner, .service-mobile-cta, .preview-bar, .form-save-tools,
.platform-form [data-array-row], .use-example, .paper-preview, .active-filters > a {
  background: var(--fx-glass); border-color: var(--fx-glass-border); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}
.discovery-search { background: #11112a; border-color: rgba(255,255,255,.16); box-shadow: none; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea,
.discovery-filters input, .discovery-filters select, .search input, .search select, .report-period input,
.form input:not([type=checkbox]), .form select, .form textarea {
  background-color: #11112a; color: var(--fx-text); border-color: rgba(255,255,255,.16);
}
.discovery-search input, .discovery-hero .discovery-search input { background: transparent; }
input::placeholder, textarea::placeholder { color: #8f8cab; }
select option { background: #11112a; color: var(--fx-text); }
table { background: transparent; color: var(--ink); }
th, .service-comparison th { background: rgba(123,108,255,.12); color: var(--ink); }
th, td { border-color: rgba(255,255,255,.10); }
pre, .sample-item pre { background: var(--fx-panel); color: #d8d6ea; border-color: rgba(255,255,255,.10); }
.notice { color: #e4e1ff; }
.muted, .form small, .sources small { color: var(--muted); }
.art-category, .art-1 .art-category, .art-2 .art-category { color: rgba(201,194,255,.55); }
.availability-ended { background: rgba(255,255,255,.07); color: #c9c6dd; }
.text-button { background: rgba(255,255,255,.06); color: #f4a9c0; }
[data-field-error] { color: #ff9cb3; }
.editorial-label { background: rgba(255,255,255,.08); color: #d8d6ea; }
.article-body .editorial-label { background: #e6e3f3; color: #3d3a55; }

/* ---------- 動きを減らす設定の人には止める ---------- */
@media (prefers-reduced-motion: reduce) {
  .future-stage__cubes { animation: none; }
  .purpose-grid > a, .service-card, .article-card { transition: none; }
  .purpose-grid > a:hover, .service-card:hover, .article-card:hover { transform: none; }
}

/* ---------- スマホ ---------- */
@media (max-width: 760px) {
  .discovery-hero h1 { font-size: 27px; line-height: 1.45; }
  .hero-editor-note:has(.future-stage) { padding-top: 230px; }
  .future-stage { height: 240px; }
  .future-stage__cubes { width: 220px; margin-left: -110px; top: 16px; }
  .section-title h2, .discovery-section .section-title h2 { font-size: 26px; }
  .builder-strip { border-radius: 20px; }
  .builder-strip h2 { font-size: 24px; }
  .article-body { border-radius: 20px; }
  .article-body h1 { font-size: 26px; }
  .service-monogram { width: 88px; height: 88px; font-size: 42px; border-radius: 24px; }
}
