/* 現像（d032）— 黒い展示台に、生成りのピルが浮く。
   言語は crafting-ai.nexx-inc.jp/b/ から採った: 近黒 #0D0C0E ／ 生成り #F4F1EC ／ ピンク #F646A9 ／
   ミント #4CDFAF、ノイズ、24px の方眼、Google Sans Flex の斜体・超幅広、ホバーで中身が 0.95 に縮む。
   ここでの掟は1つ: **色を持つのは写真だけ。** UI はピンク1点だけを差し色にして、あとは黒と生成り。 */

:root {
  --blk: #0D0C0E;
  --blk2: #131216;
  --wht: #F4F1EC;
  --pink: #F646A9;
  --pink-h: #FF8CC9;
  --mint: #4CDFAF;
  --dot: #34303A;

  --font-en: "Google Sans Flex", "Helvetica Neue", Arial, sans-serif;
  --font: "Google Sans Flex", "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;

  --u: calc((100vw - 375px) / 1065);
  --gutter: clamp(16px, 4vw, 56px);

  --ease: cubic-bezier(.25, 1, .5, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --t: .3s;
  --t-emp: .6s;

  --grid-line: rgba(76, 223, 175, .38);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; }

.g-body {
  background: var(--blk);
  color: var(--wht);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  overflow-x: hidden;
  padding-bottom: 180px;
}

/* 地のざらつき。黒が「塗り」ではなく「紙」に見える */
.g-grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--noise);
  background-size: 256px 256px;
  opacity: .32;
  mix-blend-mode: screen;
}

img, canvas { display: block; max-width: 100%; }

/* ---------- 共通部品 ---------- */

/* 超幅広のオブリーク。ラベルはこれ1種だけで通す */
.g-eyebrow {
  font-family: var(--font-en);
  font-size: 11.5px;
  font-weight: 800;
  font-style: oblique 10deg;
  font-variation-settings: "wdth" 121, "opsz" 18;
  letter-spacing: -.02em;
  line-height: 1;
  text-transform: uppercase;
  color: rgba(244, 241, 236, .55);
  display: inline-flex; align-items: center; gap: .5em;
}
.g-eyebrow--mint { color: var(--mint); }
.g-eyebrow i { font-style: normal; opacity: .7; }
.g-paper .g-eyebrow { color: rgba(13, 12, 14, .58); }

/* ホバーで中身の層だけ縮む */
.g-inset {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em; width: 100%; height: 100%;
  transition: transform var(--t) var(--ease);
}
button:hover > .g-inset, a:hover > .g-inset,
button:focus-visible > .g-inset, a:focus-visible > .g-inset { transform: scale(.94); }

/* 浮くピル */
.g-pill {
  background: var(--wht);
  color: var(--blk);
  border-radius: 1000px;
  display: flex; align-items: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}

/* 生成りの方眼紙 */
.g-paper {
  position: relative;
  background: var(--wht);
  color: var(--blk);
  isolation: isolate;
  overflow: hidden;
}
.g-paper::before,
.g-paper::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.g-paper::before { background-image: var(--noise); background-size: 256px 256px; opacity: .5; }
.g-paper::after {
  background-image:
    linear-gradient(to right, var(--grid-line) 0 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 0 1px, transparent 1px);
  background-size: 24px 24px;
}
.g-paper > * { position: relative; z-index: 1; }

/* ボタン */
.g-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  background: var(--blk);
  color: var(--wht);
  border: 0;
  border-radius: 1000px;
  padding: 0 16px;
  height: 38px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t) var(--ease), opacity var(--t) var(--ease);
}
.g-btn--pink { background: var(--pink); color: var(--blk); }
.g-btn--pink:hover { background: var(--pink-h); }
.g-btn--quiet { background: none; color: var(--blk); box-shadow: inset 0 0 0 1px rgba(13, 12, 14, .18); }
.g-btn--lg { height: 52px; font-size: 15px; padding: 0 26px; }
.g-btn--lg i { font-style: normal; font-size: 11px; font-weight: 500; opacity: .62; }
.g-btn[disabled] { opacity: .34; cursor: default; }
.g-btn:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

.g-chip {
  font-family: var(--font-en);
  font-size: 12px; font-weight: 700;
  text-decoration: none;
  color: var(--blk);
  background: none;
  box-shadow: inset 0 0 0 1px rgba(13, 12, 14, .2);
  border-radius: 1000px;
  height: 34px; padding: 0 14px;
  display: inline-flex; align-items: center;
}

.g-link {
  font: inherit; background: none; border: 0; padding: 0;
  color: inherit; cursor: pointer;
  border-bottom: 1px solid currentColor;
}

/* ---------- 浮遊ヘッダー ---------- */
.g-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding: 14px var(--gutter);
  pointer-events: none;
}
.g-pill--head {
  pointer-events: auto;
  max-width: 760px; margin: 0 auto;
  height: 56px; padding: 0 10px 0 22px;
  justify-content: space-between; gap: 16px;
}
.g-mark {
  font-family: var(--font-en);
  font-style: oblique 10deg;
  font-variation-settings: "wdth" 121, "opsz" 18;
  font-size: 19px; font-weight: 800; letter-spacing: -.03em;
  color: var(--blk);
}

/* ---------- 1 置く ---------- */
.g-main { position: relative; z-index: 1; padding: 0 var(--gutter); }

.g-open { max-width: 1100px; margin: 0 auto; padding: calc(120px + 40 * var(--u)) 0 40px; }

.g-hero {
  word-break: auto-phrase;
  font-family: var(--font-en);
  font-weight: 800;
  font-style: oblique 8deg;
  font-variation-settings: "wdth" 118, "opsz" 18;
  font-size: clamp(38px, 9.2vw, 108px);
  line-height: .96;
  letter-spacing: -.05em;
  margin: 0 0 22px;
}
.g-hero__l { display: block; }
.g-hero__l--out {
  color: transparent;
  -webkit-text-stroke: 1.4px var(--pink);
  text-stroke: 1.4px var(--pink);
}

.g-lede {
  word-break: auto-phrase;
  text-wrap: pretty;
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.95;
  color: rgba(244, 241, 236, .72);
  max-width: 34em;
  margin: 0 0 44px;
}
.g-lede em { font-style: normal; color: var(--mint); }

.g-plate {
  border-radius: 26px;
  box-shadow: inset 0 0 0 1px rgba(244, 241, 236, .16);
  background: var(--blk2);
  padding: clamp(40px, 7vw, 84px) 24px;
  text-align: center;
  transition: box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
.g-plate.over { box-shadow: inset 0 0 0 2px var(--pink); background: #191720; }
.g-plate__lead { font-size: clamp(19px, 2.4vw, 26px); font-weight: 600; margin: 0 0 8px; }
.g-plate__sub { font-size: 13px; color: rgba(244, 241, 236, .58); margin: 0 0 24px; }
.g-plate__alt { font-size: 12.5px; color: rgba(244, 241, 236, .42); margin: 18px 0 0; }
.g-plate__alt .g-link { color: rgba(244, 241, 236, .72); }

.g-steps {
  list-style: none; display: flex; flex-wrap: wrap; gap: 28px;
  margin: 34px 0 0; padding: 20px 0 0;
  border-top: 1px solid rgba(244, 241, 236, .14);
  font-size: 13px; color: rgba(244, 241, 236, .6);
}
.g-steps b {
  font-family: var(--font-en); font-style: oblique 10deg;
  font-variation-settings: "wdth" 121;
  font-size: 11px; color: var(--mint); margin-right: 9px;
}

/* ---------- 2 展示台 ---------- */
.g-stage { max-width: 1280px; margin: 0 auto; padding: calc(96px + 20 * var(--u)) 0 0; }

.compare {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  background: var(--blk2);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  cursor: col-resize;
}
.compare img, .compare canvas { width: 100%; height: auto; }
.after-wrap { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 0 0 50%); }
.after-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px;
  background: var(--pink);
}
.handle::after {
  content: "‹ ›";
  position: absolute; top: 50%; left: 50%;
  width: 46px; height: 46px; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--pink);
  color: var(--blk);
  font-family: var(--font-en); font-size: 17px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: .12em;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}
.handle:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }

.edge {
  position: absolute; bottom: 14px;
  font-family: var(--font-en); font-style: oblique 10deg;
  font-variation-settings: "wdth" 121;
  font-size: 11px; font-weight: 800; letter-spacing: -.02em;
  background: rgba(13, 12, 14, .7);
  color: var(--wht);
  padding: 5px 11px; border-radius: 1000px;
  pointer-events: none;
}
.edge--l { left: 14px; }
.edge--r { right: 14px; background: var(--pink); color: var(--blk); }

.veil {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(13, 12, 14, .72);
  backdrop-filter: blur(6px);
}
.g-dots { display: flex; gap: 6px; }
.g-dots b { width: 6px; height: 6px; border-radius: 50%; background: var(--pink); animation: bounce 1.1s var(--ease-io) infinite; }
.g-dots b:nth-child(2) { animation-delay: .14s; }
.g-dots b:nth-child(3) { animation-delay: .28s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-7px); opacity: 1; } }

/* ---------- 見立て ---------- */
.g-diag {
  margin-top: 18px;
  border-radius: 18px;
  padding: 24px 26px;
  font-size: 14px;
}
.g-diag .verdict { font-size: 17px; font-weight: 600; margin: 10px 0 18px; }
.g-diag .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.g-diag h3 { margin: 0 0 8px; }
.g-diag ul { list-style: none; margin: 0; padding: 0; }
.g-diag li { padding: 4px 0 4px 18px; position: relative; line-height: 1.65; word-break: auto-phrase; }
.g-diag li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 8px; height: 2px; background: var(--mint);
}
.g-diag .no li::before { background: var(--pink); }
.g-diag .where { color: rgba(13, 12, 14, .5); font-size: 12px; }

.g-note {
  margin-top: 16px; padding: 12px 18px;
  border-radius: 14px;
  background: var(--pink); color: var(--blk);
  font-size: 14px; font-weight: 600;
}

/* ---------- 操作の浮き島 ---------- */
.g-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 0 var(--gutter) 18px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none;
}
.g-dock > * { pointer-events: auto; }

.g-pill--dock {
  flex-wrap: wrap; justify-content: center; gap: 7px;
  padding: 9px 12px;
  border-radius: 28px;
  max-width: 100%;
}
.g-sep { width: 1px; height: 26px; background: rgba(13, 12, 14, .14); margin: 0 3px; }

.g-shots { display: flex; gap: 5px; flex-wrap: wrap; }
.shot {
  font: inherit; font-size: 12.5px; font-weight: 600;
  background: none; color: var(--blk);
  box-shadow: inset 0 0 0 1px rgba(13, 12, 14, .18);
  border: 0; border-radius: 1000px;
  height: 38px; padding: 0 14px; cursor: pointer;
  display: inline-flex; flex-direction: column; justify-content: center; line-height: 1.15;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.shot small { font-size: 9.5px; font-weight: 500; opacity: .5; }
.shot[aria-pressed="true"] { background: var(--blk); color: var(--wht); box-shadow: none; }
.shot[aria-pressed="true"] small { opacity: .6; }

.g-meta {
  font-family: var(--font-en); font-size: 10.5px; font-weight: 700;
  font-style: oblique 10deg;
  font-variation-settings: "wdth" 118;
  letter-spacing: -.01em;
  color: rgba(244, 241, 236, .5);
  text-align: center;
  min-height: 1em;
}

/* 仕上げの引き出し */
.g-tune {
  width: min(560px, 100%);
  border-radius: 20px;
  padding: 18px 22px 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.g-tune .g-eyebrow { margin-bottom: 14px; display: block; }
.knob { display: grid; grid-template-columns: 5.8em 1fr 3.6em; align-items: center; gap: 10px; font-size: 12.5px; margin-bottom: 6px; }
.knob--master { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(13, 12, 14, .12); }
.k-label { color: rgba(13, 12, 14, .6); }
.knob--master .k-label { color: var(--blk); font-weight: 700; }
.k-val { font-family: var(--font-en); font-size: 10.5px; font-weight: 700; text-align: right; color: rgba(13, 12, 14, .5); }
input[type=range] { width: 100%; accent-color: var(--pink); }

/* ---------- 注記（壁にしない。1行だけ） ---------- */
.g-fine {
  margin: 18px 0 0;
  font-size: 11.5px;
  color: rgba(244, 241, 236, .34);
}
.g-fine a { color: rgba(244, 241, 236, .55); }

/* ---------- 扱い（privacy.html） ---------- */
.g-doc { max-width: 720px; margin: 0 auto; padding: 130px 0 40px; }
.g-doc h2 { font-family: var(--font-en); font-style: oblique 10deg; font-variation-settings: "wdth" 121;
  font-size: 12px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase;
  color: var(--mint); margin: 38px 0 10px; }
.g-doc p { font-size: 14.5px; color: rgba(244, 241, 236, .78); margin: 0 0 12px; }
.g-doc b { color: var(--wht); }
.g-doc ul { list-style: none; padding: 0; margin: 0 0 12px; }
.g-doc li { font-size: 14.5px; color: rgba(244, 241, 236, .78); padding-left: 18px; position: relative; }
.g-doc li::before { content: ""; position: absolute; left: 0; top: 13px; width: 8px; height: 2px; background: var(--mint); }
.g-doc a { color: var(--mint); }

/* ---------- 小さい画面 ---------- */
@media (max-width: 860px) {
  .g-body { padding-bottom: 240px; }
  .g-pill--head { height: 50px; padding: 0 8px 0 14px; gap: 8px; }
  .g-eyebrow { font-size: 10px; }
  .g-pill--head .g-eyebrow { display: none; }
  .g-mark b { font-size: 15px; }
  .g-diag .cols { grid-template-columns: 1fr; gap: 18px; }
  .g-steps { gap: 14px; }
  .g-pill--dock { border-radius: 22px; padding: 8px; }
  .g-sep { display: none; }
  .g-btn { font-size: 12.5px; padding: 0 13px; height: 36px; }
  .shot { height: 36px; padding: 0 11px; font-size: 12px; }
  .g-meta { width: 100%; text-align: center; padding: 4px 0 0; }
  .handle::after { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .g-dots b { animation: none; }
  * { transition: none !important; }
}

/* ---------- 触る前に結果を見せる ---------- */
.g-demo { margin: 0 0 44px; }
.compare--demo { cursor: col-resize; }
.compare--demo img { width: 100%; height: auto; }
.compare--demo .after-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-demo figcaption {
  margin-top: 14px;
  font-size: 13.5px; line-height: 1.85;
  color: rgba(244, 241, 236, .62);
  word-break: auto-phrase;
}
.g-demo figcaption em { font-style: normal; color: var(--mint); }

/* ドラッグを促す札。1回引いたら消える */
.g-hint {
  position: absolute; left: 50%; top: 18px;
  transform: translateX(-50%);
  background: var(--wht); color: var(--blk);
  font-size: 12px; font-weight: 700;
  padding: 7px 15px; border-radius: 1000px;
  white-space: nowrap; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  animation: nudge 2.4s var(--ease-io) infinite;
}
.g-hint.is-gone { opacity: 0; transform: translateX(-50%) scale(.9); transition: opacity .35s, transform .35s; }
@keyframes nudge {
  0%, 100% { transform: translateX(-50%); }
  45% { transform: translateX(calc(-50% - 9px)); }
  70% { transform: translateX(calc(-50% + 9px)); }
}

/* ---------- 3歩 ---------- */
.g-how {
  list-style: none; margin: 0 0 40px; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.g-how li {
  background: var(--blk2);
  box-shadow: inset 0 0 0 1px rgba(244, 241, 236, .12);
  border-radius: 18px;
  padding: 20px 22px 22px;
}
.g-how b {
  display: block;
  font-family: var(--font-en); font-style: oblique 10deg;
  font-variation-settings: "wdth" 121;
  font-size: 12px; font-weight: 800; letter-spacing: -.02em;
  color: var(--pink); margin-bottom: 10px;
}
.g-how strong { display: block; font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.g-how span { display: block; font-size: 12.5px; line-height: 1.8; color: rgba(244, 241, 236, .58); word-break: auto-phrase; }

/* ---------- 次にやること ---------- */
.g-next {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--pink); color: var(--blk);
  border-radius: 1000px;
  padding: 8px 18px 8px 10px;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.g-next b {
  font-family: var(--font-en); font-style: oblique 10deg;
  font-variation-settings: "wdth" 121;
  font-size: 11px; font-weight: 800;
  background: var(--blk); color: var(--pink);
  border-radius: 1000px; padding: 4px 9px;
}
.g-next.is-done { background: var(--wht); color: rgba(13, 12, 14, .62); }
.g-next.is-done b { background: rgba(13, 12, 14, .12); color: rgba(13, 12, 14, .6); }

/* 次に押すべきボタン以外を静める */
.g-pill--dock.step-go .g-btn:not(#go):not(#reset),
.g-pill--dock.step-save .g-btn:not(#save):not(#reset):not(#go) { opacity: .48; }
.g-pill--dock.step-save #save { background: var(--pink); color: var(--blk); }
#go.is-ready { animation: pulse 2s var(--ease-io) infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(246, 70, 169, .55); }
  55% { box-shadow: 0 0 0 10px rgba(246, 70, 169, 0); }
}

@media (max-width: 860px) {
  .g-how { grid-template-columns: 1fr; gap: 8px; }
  .g-how li { padding: 15px 18px 16px; }
  .g-hint { font-size: 11px; padding: 6px 12px; top: 12px; }
  .g-next { font-size: 12px; padding: 7px 14px 7px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .g-hint, #go.is-ready { animation: none; }
}
