/* PPP ガラスと動き（2026-10-20 UI 横串アップグレード 段4）
   インフルエンサーが見る画面（/p・/o・/p/survey）は iPhone に寄せた Liquid Glass と動きを積極的に。
   ただし本文の読みやすさと「誠実・温度」は崩さない：ガラスは浮く層（ナビ・下の操作バー・トースト・シート・画像の上の札）だけ。
   動きは scripts/ui.js が付けるクラスで出す。JS が無い・動きを減らす設定なら、すべて最初から見えている。
   設計＝ark-proxy/Update/UI_UPGRADE_PLAN.md */
:root {
  --lg-bg: rgba(255, 255, 255, .58);
  --lg-bg-strong: rgba(252, 252, 254, .74);
  --lg-blur: blur(22px) saturate(190%);
  --lg-rim: rgba(255, 255, 255, .85);
  --lg-edge: rgba(20, 24, 40, .08);
  --lg-shadow: 0 10px 30px rgba(20, 24, 40, .14), 0 2px 8px rgba(20, 24, 40, .06);
  --spring: cubic-bezier(.34, 1.45, .64, 1);
  --out: cubic-bezier(.22, 1, .36, 1);
  --danger: #c0392b;
  --ok: #2e9e6b;
}

/* ── ガラスの素材（縁の光＝屈折風のハイライト） ── */
.lg {
  position: relative; isolation: isolate;
  background: var(--lg-bg);
  -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  border: 1px solid var(--lg-edge);
  box-shadow: var(--lg-shadow), inset 0 1px 0 var(--lg-rim), inset 0 -1px 0 rgba(255, 255, 255, .25);
}
.lg::before {   /* 縁の光：左上と右下が光る輪郭だけを描く */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: -1;
  background: linear-gradient(135deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .15) 32%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, .55) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.lg--strong { background: var(--lg-bg-strong); }
.lg--dark { background: rgba(28, 30, 38, .42); color: #fff; border-color: rgba(255, 255, 255, .18); box-shadow: 0 8px 24px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lg { background: rgba(255, 255, 255, .96); }
  .lg--dark { background: rgba(28, 30, 38, .82); }
}

/* ── セクションナビ：浮いたガラスのタブ（iOS のタブバー風）＋現在地の玉がすべる ── */
.secnav.secnav--lg {
  position: sticky; top: 8px; z-index: 20;
  margin: 8px 12px 0; padding: 5px; gap: 2px;
  border-radius: 999px; border-bottom: 0;
  background: var(--lg-bg);
  -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  border: 1px solid var(--lg-edge);
  box-shadow: var(--lg-shadow), inset 0 1px 0 var(--lg-rim);
  scroll-padding-inline: 40px;
}
.secnav--lg a { position: relative; z-index: 1; padding: 6px 13px; min-height: 32px; transition: color .25s var(--out); }
.secnav--lg a.is-active { background: transparent; color: var(--accent-ink); }
.secnav__ind {
  position: absolute; z-index: 0; top: 5px; left: 0; height: calc(100% - 10px); width: 40px; border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 10px rgba(42, 71, 187, .16), inset 0 0 0 1px rgba(42, 71, 187, .10);
  transition: transform .45s var(--spring), width .45s var(--spring), opacity .2s;
  pointer-events: none;
}
.secnav--lg { position: sticky; }
.secnav--lg .secnav__ind { opacity: 0; }
.secnav--lg.has-ind .secnav__ind { opacity: 1; }

/* ── 画像の上のガラスの札（/o のヒーロー：募集の状態と締切） ── */
.hero-badge {
  position: absolute; left: 14px; bottom: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px 7px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em; line-height: 1.3;
}
.hero-badge__dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: lgPulse 2.2s ease-out infinite; }
.hero-badge--closed .hero-badge__dot { background: #ff8a80; animation: none; }
.hero-badge__sep { opacity: .55; }
@keyframes lgPulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .55); } 70% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.offerhero { position: relative; overflow: hidden; }
.offerhero .carousel__slide img { transform-origin: 50% 0; will-change: transform; }

/* ── 下に浮く操作バー（/o の「応募する」・/p の次の一手） ── */
.dock {
  position: fixed; z-index: 30; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  width: min(calc(100% - 28px), calc(var(--maxw) - 28px));
  transform: translate(-50%, 140%); opacity: 0;
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 999px;
  transition: transform .55s var(--spring), opacity .3s var(--out);
}
.dock.is-on { transform: translate(-50%, 0); opacity: 1; }
.dock__txt { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; color: var(--ink); }
.dock__txt b { display: block; font-size: 14px; }
.dock__txt span { color: var(--ink-soft); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.dock__btn {
  flex: none; border: 0; border-radius: 999px; padding: 12px 20px; min-height: 46px;
  font: inherit; font-size: 15px; font-weight: 800; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #3a59d6 0%, var(--accent) 100%);
  box-shadow: 0 6px 16px rgba(42, 71, 187, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  text-decoration: none;
}
.dock__btn:hover { text-decoration: none; }

/* ── 押したときの手ごたえ（ばねのように沈んで戻る） ── */
.sform__btn, .decide__btn, .offer-cta, .closed__cta, .tagcopy, .upbtn, .dock__btn, .offerlinks a, .ob__btn, .linkout, .tldr a, .stepcard, .slotpick__row, .ob__check {
  transition: transform .35s var(--spring), box-shadow .2s, background-color .2s, border-color .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.sform__btn:active, .decide__btn:active, .offer-cta:active, .closed__cta:active, .tagcopy:active, .upbtn:active, .dock__btn:active, .offerlinks a:active, .ob__btn:active, .tldr a:active {
  transform: scale(.96); transition-duration: .08s;
}
.slotpick__row:active, .ob__check:active, .stepcard:active { transform: scale(.985); transition-duration: .08s; }
.sform__btn { background: linear-gradient(180deg, #3a59d6 0%, var(--accent) 100%); box-shadow: 0 8px 20px rgba(42, 71, 187, .28), inset 0 1px 0 rgba(255, 255, 255, .3); }
.sform__btn.is-busy, .decide__btn.is-busy, .ob__btn.is-busy { pointer-events: none; opacity: .85; }
.sform__btn.is-busy::after, .decide__btn.is-busy::after, .ob__btn.is-busy::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: lgSpin .7s linear infinite; }
@keyframes lgSpin { to { transform: rotate(360deg); } }

/* ── 入力欄：フォーカスで光の輪 ── */
.sform__input, .sform__ta { transition: border-color .2s, box-shadow .25s var(--out), background-color .2s; }
.sform__input:focus, .sform__ta:focus { box-shadow: 0 0 0 4px rgba(42, 71, 187, .12); background: #fff; }
.sform__err:not([hidden]) { animation: lgShake .42s var(--out); }
@keyframes lgShake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* ── 画面に入ったらふわっと（ui.js が .rv → .rv-in を付ける） ── */
html.js-motion .rv { opacity: 0; transform: translateY(18px); }
html.js-motion .rv.rv-in { opacity: 1; transform: none; transition: opacity .6s var(--out), transform .7s var(--out); transition-delay: calc(var(--i, 0) * 60ms); }
html.js-motion .rv-pop { opacity: 0; transform: scale(.86); }
html.js-motion .rv-pop.rv-in { opacity: 1; transform: none; transition: opacity .35s var(--out), transform .55s var(--spring); transition-delay: calc(var(--i, 0) * 50ms); }

/* カルーセルの点：今の 1 枚は横に伸びる玉に */
.carousel__dot { transition: width .35s var(--spring), background-color .25s, border-color .25s; }
.carousel__dot.on { width: 20px; border-radius: 999px; }

/* タップで付けるチェック：ぽんと弾む */
.cutlist--tap li::before { transition: background-color .2s, box-shadow .2s, transform .4s var(--spring); }
.cutlist--tap li[data-checked="1"]::before { transform: scale(1.12); }
.cutlist--tap li { transition: color .25s; }

/* 進み具合（トラッカー）の線が左から伸びる */
html.js-motion .tracker.rv .tracker__step.is-on::before { transform: scaleX(0); transform-origin: left; }
html.js-motion .tracker.rv-in .tracker__step.is-on::before { transform: scaleX(1); transition: transform .5s var(--out); transition-delay: calc(var(--n, 0) * 140ms + 150ms); }
html.js-motion .tracker.rv .tracker__step.is-on .tracker__dot { transform: scale(.4); }
html.js-motion .tracker.rv-in .tracker__step.is-on .tracker__dot { transform: none; transition: transform .45s var(--spring); transition-delay: calc(var(--n, 0) * 140ms + 100ms); }
.tracker__step.is-now .tracker__dot { animation: lgNow 2.4s ease-in-out infinite 1.2s; }
@keyframes lgNow { 0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); } 50% { box-shadow: 0 0 0 8px rgba(42, 71, 187, .08); } }

/* 日時枠の選択：選んだ行が浮く */
.slotpick__row { transition: transform .35s var(--spring), box-shadow .25s, border-color .2s, background-color .2s; }
.slotpick__row:has(input[type="checkbox"]:checked) { box-shadow: 0 6px 16px rgba(42, 71, 187, .12); }

/* ── 送信できた：チェックが描かれて、小さな紙吹雪 ── */
.sform__ok.is-celebrate { animation: lgOkIn .6s var(--spring) both; position: relative; overflow: visible; }
@keyframes lgOkIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.okcheck { display: block; width: 52px; height: 52px; margin: 2px 0 10px; }
.okcheck circle { fill: none; stroke: var(--ok); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: lgDraw .6s var(--out) forwards; }
.okcheck path { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: lgDraw .4s var(--out) .45s forwards; }
@keyframes lgDraw { to { stroke-dashoffset: 0; } }
.confetti { position: fixed; z-index: 60; pointer-events: none; width: 8px; height: 12px; border-radius: 2px; will-change: transform, opacity; }

/* ── トースト（上からガラスのカプセルが降りてくる＝iPhone の通知の位置） ── */
.pq-toasts { position: fixed; z-index: 70; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(calc(100% - 24px), 520px); pointer-events: none; }
.pq-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 16px 11px 12px; border-radius: 22px; font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--ink); max-width: 100%; animation: lgToastIn .55s var(--spring) both; touch-action: none; }
.pq-toast.out { animation: lgToastOut .3s var(--out) forwards; }
.pq-toast__ic { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 800; background: var(--accent); }
.pq-toast--ok .pq-toast__ic { background: var(--ok); }
.pq-toast--err .pq-toast__ic { background: var(--danger); }
.pq-toast--warn .pq-toast__ic { background: #d6921a; }
.pq-toast__act { flex: none; margin-left: 4px; border: 0; background: rgba(42, 71, 187, .1); color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 800; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
@keyframes lgToastIn { from { opacity: 0; transform: translateY(-26px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes lgToastOut { to { opacity: 0; transform: translateY(-18px) scale(.95); } }

/* ── ボトムシート ── */
.pq-sheet-bg { position: fixed; inset: 0; z-index: 65; background: rgba(15, 18, 30, .28); opacity: 0; transition: opacity .3s var(--out); }
.pq-sheet-bg.on { opacity: 1; }
.pq-sheet { position: fixed; z-index: 66; left: 50%; bottom: 0; width: min(100%, var(--maxw)); max-height: 88dvh; display: flex; flex-direction: column;
  border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom);
  transform: translate(-50%, 105%); transition: transform .5s var(--spring); }
.pq-sheet.on { transform: translate(-50%, 0); }
.pq-sheet.closing { transition: transform .3s var(--out); }
.pq-sheet__grab { width: 40px; height: 5px; border-radius: 3px; background: rgba(20, 24, 40, .22); margin: 9px auto 4px; flex: none; }
.pq-sheet__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 18px 8px; font-size: 16px; font-weight: 800; }
.pq-sheet__x { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(20, 24, 40, .07); color: var(--ink-soft); font-size: 13px; cursor: pointer; }
.pq-sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 20px; -webkit-overflow-scrolling: touch; }

/* 動きを減らす設定：global.css が transition/animation を止める。隠していた要素もすぐ見せる */
@media (prefers-reduced-motion: reduce) {
  html.js-motion .rv, html.js-motion .rv-pop { opacity: 1 !important; transform: none !important; }
  .dock { transition: none; }
  .confetti { display: none; }
}
@media print {
  .dock, .pq-toasts, .secnav--lg { display: none !important; }
  html.js-motion .rv, html.js-motion .rv-pop { opacity: 1 !important; transform: none !important; }
}

/* ナビが浮いた分、見出しへ飛んだときの止まる位置を下げる */
html:has(.secnav--lg) { scroll-padding-top: 70px; }

/* 札の見出し（「投稿形態：」など）は途中で割らない。右の値だけ折り返す */
.chip--kv .chip__k { white-space: nowrap; flex: none; }
