/* =========================================================
   登録なしの1枚お試し（2026-11-08）：トップのポップアップ・下の帯
   変数・ボタン・チップ・モーダル（SPは下からのシート／PCは中央560px）は base.css のものを使う。
   カードの上辺／左辺にカラー線は引かない。白地・墨の文字・アクセントは選択中とボタンだけ。
   作成中のインク（.scan*）は app.css と同じ作り（公開ページは app.css を読まないのでここに写す）
   ========================================================= */
.trial-panel { padding-top: 28px; }
.trial-panel .modal-head { margin-bottom: 8px; }
.trial-panel .eyebrow { margin-bottom: 10px; }
.trial-panel h2 { font-size: clamp(22px, 6.2vw, 26px); line-height: 1.4; }
.trial-panel h2 .line { display: block; }
.trial-lead { margin-top: 14px; font-size: var(--fs-body); color: var(--c-text); line-height: 1.8; }
.trial-lead .phr { display: inline-block; }
.trial-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.trial-actions .btn { min-height: 52px; }
.trial-later { align-self: center; background: none; border: 0; padding: 0 8px; min-height: var(--tap); color: var(--c-ink); font-weight: var(--fw-ui); font-size: var(--fs-ui); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.trial-later:hover { color: var(--c-accent); }
.trial-fine { margin-top: 6px; font-size: var(--fs-note); color: var(--c-sub); text-align: center; line-height: 1.7; }

/* ---- 選ぶ（性別→年代→髪型→髪色。選ぶたびに次の項目が同じ画面に出る） ---- */
.trial-steps { display: flex; flex-direction: column; gap: 22px; margin-top: 18px; }
.trial-step h3 { display: flex; align-items: center; gap: 10px; font-size: var(--fs-ui); color: var(--c-head); margin-bottom: 10px; }
.trial-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c-ink); color: #fff; font-family: var(--ff-num); font-size: 13px; font-weight: 600; flex: none; }
.trial-step.is-done .trial-no { background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-rule); }
.trial-step .chips { gap: 8px; }
.trial-step .chip { min-height: 44px; margin: 0; }
.trial-step .chip .dot { width: 18px; height: 18px; }
/* 髪型：見本のサムネ（2:3）＋名前。選択中は墨の太枠＋チェック（色の線は使わない） */
.trial-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.trial-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0; margin: 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--c-ink); border-radius: var(--r-s); }
.trial-card:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; }
.trial-thumb { display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--r-s); background: var(--c-surface); border: 1px solid var(--c-rule); }
.trial-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.trial-thumb.is-empty { display: grid; place-items: center; color: var(--c-sub); font-size: var(--fs-note); }
.trial-card-name { font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--c-head); }
.trial-card-desc { font-size: 12px; color: var(--c-sub); line-height: 1.4; }
.trial-card[aria-checked="true"] .trial-thumb { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c-ink); }
.trial-card[aria-checked="true"]::after { content: ""; position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--c-ink); background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 12.5 4 4L18 8'/></svg>"); background-size: 16px; background-position: center; background-repeat: no-repeat; }
/* 髪色の見本の丸（CSP で style 属性が使えないため色はクラスで） */
.trial-dot[data-c="beige"] { background: #B89C82; } .trial-dot[data-c="greige"] { background: #9C928A; } .trial-dot[data-c="brown"] { background: #6B4A36; }
.trial-dot[data-c="pink"] { background: #A2706A; } .trial-dot[data-c="ash"] { background: #8D8B86; } .trial-dot[data-c="olive"] { background: #7D7A5E; }
.trial-dot[data-c="blue"] { background: #4E5868; } .trial-dot[data-c="black"] { background: #1F1B1A; } .trial-dot[data-c="gray"] { background: #A6A6A3; } .trial-dot[data-c="red"] { background: #6B2F36; }
.trial-summary { margin-top: 18px; font-size: var(--fs-ui); color: var(--c-text); line-height: 1.7; }
.trial-summary b { color: var(--c-head); }
.trial-summary .phr { display: inline-block; }
.trial-panel:focus { outline: none; }
.trial-error { margin-top: 12px; }

/* ---- 作成中・できあがり ---- */
.trial-frame { width: min(100%, 280px); margin: 6px auto 0; aspect-ratio: 4 / 5; }
.trial-frame, .trial-frame * { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.trial-frame .scan-result { pointer-events: none; }
.trial-panel .wait-status { justify-content: center; }
.trial-result { margin-top: 18px; text-align: center; }
.trial-result h2 { font-size: clamp(22px, 6vw, 26px); }
.trial-result .trial-lead { margin-top: 10px; }
.trial-result .trial-actions { margin-top: 18px; }
.trial-links { display: flex; justify-content: center; gap: 24px; font-size: var(--fs-ui); }
.trial-links a { display: inline-flex; align-items: center; min-height: var(--tap); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 767px) {
  .trial-frame { width: min(100%, 240px); }
  .trial-panel { padding-top: 24px; }
}

/* ---- お試し済みの人に出す細い帯（下に固定・SPの追従CTAの代わり） ---- */
.trial-bar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 8px 16px; flex-wrap: wrap; background: #fff; border-top: 1px solid var(--c-rule); padding: 6px var(--gutter) calc(6px + var(--safe-b)); font-size: 15px; }
.trial-bar-view { background: none; border: 0; padding: 0 4px; min-height: 44px; color: var(--c-ink); font-weight: var(--fw-ui); font-size: 15px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; white-space: nowrap; }
.trial-bar-view:hover { color: var(--c-accent); }
.trial-bar .btn-s { min-height: 40px; white-space: nowrap; }
body.has-trial-bar .sticky-cta { display: none; }
body.has-trial-bar .site-footer { padding-bottom: calc(40px + 64px + var(--safe-b)); }
/* スマホ：2列（左＝見る・右＝登録）で1段に収める。登録の文は長いのでボタンの中で折り返す（帯の高さは60px前後） */
@media (max-width: 767px) {
  .trial-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; font-size: 14px; padding-top: 6px; }
  .trial-bar-view { font-size: 14px; padding: 0; }
  .trial-bar .btn-s { white-space: normal; line-height: 1.3; min-height: 44px; padding: 6px 10px; font-size: 14px; }
}

/* ---- 作成中のインク（app.css の .scan と同じ・公開ページ用に写し） ---- */
.scan { position: relative; display: block; overflow: hidden; background: #FFFFFF; border-radius: var(--r-s); isolation: isolate; }
.scan-base { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.scan-ink { position: absolute; inset: 0; z-index: 1; display: block; overflow: hidden; pointer-events: none; }
.scan-ink-poster, .scan-ink-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transform-origin: 50% 0; }
.scan-ink-video { opacity: 0; transition: opacity .6s ease; }
.scan-ink-video.is-on { opacity: 1; }
.scan-ink-v1 > * { transform: scaleX(-1); }
.scan-ink-v2 > * { transform: scale(1.15); }
.scan-ink-v3 > * { transform: scale(-1.15, 1.15); }
.scan-word { position: absolute; left: 50%; top: 14%; z-index: 2; transform: translateX(-50%); max-width: 86%; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .86); color: var(--c-head); font-size: var(--fs-ui); font-weight: var(--fw-ui); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; box-shadow: 0 6px 18px rgba(60, 45, 25, .08); }
.scan-word.is-on { animation: scan-word 2.8s ease-in-out both; }
@keyframes scan-word { 0% { opacity: 0; transform: translate(-50%, 8px); } 18%, 78% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -6px); } }
.scan-result { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; opacity: 0; transition: opacity .5s ease; }
.scan-result.is-in { opacity: 1; }
.scan.is-done .scan-word { animation: none; opacity: 0; }
.scan-ink.is-clearing { z-index: 4; mix-blend-mode: multiply; opacity: 0; transform: translateY(-4%) scale(1.04); transition: opacity 1s ease, transform 1.1s ease; }
.wait-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-top: 10px; color: var(--c-text); font-size: var(--fs-ui); line-height: 1.6; }
.wait-label { color: var(--c-head); font-weight: var(--fw-ui); }
.wait-elapsed { font-family: var(--ff-num); font-variant-numeric: tabular-nums; color: var(--c-head); font-size: 18px; }
.wait-eta { color: var(--c-sub); }
.wait-eta .phr { display: inline-block; }
@media (prefers-reduced-motion: reduce) {
  .scan-ink-video { display: none; }
  .scan-ink.is-clearing { transition: none; }
  .scan-word.is-on { animation: none; opacity: 1; }
  .scan-result { transition: none; }
}
