:root {
  --bg: #f6f6fa;
  --surface: #ffffff;
  --text: #1c1c28;
  --muted: #6e6e82;
  --border: #e8e8f0;
  --accent: #6d5dfc;
  --accent-2: #ff6fa0;
  --like: #20c38a;
  --nope: #ff5a6e;
  --video: #6d5dfc;
  --manga: #2f8cff;
  --line: #06c755;
  --live: #ff3d71;
  --matching: #ff8a3d;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(28, 28, 60, 0.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
svg { display: block; width: 100%; height: 100%; }

/* ---------- ヘッダー ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  max-width: 520px; margin: 0 auto; padding: 12px 16px;
  background: rgba(246, 246, 250, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.icon-btn { width: 36px; height: 36px; padding: 7px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  color: #fff; font-size: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.r18 { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); padding: 2px 8px; border-radius: 99px; background: var(--surface); }

/* ---------- 共通 ---------- */
.view { max-width: 520px; margin: 0 auto; padding: 4px 16px 32px; }
.view.enter { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.muted { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.center { text-align: center; }
.wide { width: 100%; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 20px; border-radius: 14px; font-weight: 700; font-size: 15px;
  color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--accent), #8b6dff);
  box-shadow: 0 8px 20px rgba(109, 93, 252, 0.28);
  transition: transform .15s ease;
}
.btn-primary:active { transform: scale(.97); }
.btn-primary i { width: 16px; height: 16px; display: inline-block; opacity: .85; }
.btn-primary.sm { padding: 9px 14px; font-size: 13px; border-radius: 11px; margin-top: 8px; }
.btn-ghost { display: block; margin-top: 18px; padding: 13px; border-radius: 14px; color: var(--muted); font-weight: 500; background: var(--surface); border: 1px solid var(--border); }

/* ---------- ヒーロー・AI吹き出し ---------- */
.hero { text-align: center; padding: 18px 0 8px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px;
  border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--accent);
  background: rgba(109, 93, 252, 0.1);
}
.hero-badge svg { width: 16px; height: 16px; }
.hero h1 { font-size: 22px; line-height: 1.45; margin: 12px 0 4px; letter-spacing: .01em; word-break: auto-phrase; text-wrap: balance; }

.ai-row { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; }
.ai-avatar {
  flex: 0 0 46px; height: 46px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(150deg, #7d6bff, #ff8fb5);
  border: 2px solid #fff;
  box-shadow: 0 6px 16px rgba(109, 93, 252, 0.22);
}
.hero-sensei {
  width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(150deg, #7d6bff, #ff8fb5);
  border: 3px solid #fff;
  box-shadow: 0 10px 28px rgba(109, 93, 252, 0.22);
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.ai-bubble {
  background: var(--surface); padding: 12px 15px; border-radius: 4px 16px 16px 16px;
  box-shadow: var(--shadow); font-size: 14.5px;
  animation: pop .4s ease both;
}
.ai-bubble b { color: var(--accent); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- 気分カード ---------- */
.mood-list { display: grid; gap: 10px; }
.mood {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px; border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); border: 1px solid transparent;
  animation: fadeUp .4s ease both;
  transition: transform .15s ease, border-color .2s ease;
}
.mood:active { transform: scale(.98); }
.mood:hover { border-color: color-mix(in srgb, var(--tone) 35%, transparent); }
.mood-icon {
  flex: 0 0 48px; height: 48px; padding: 11px; border-radius: 15px;
  color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, #fff);
}
.mood-text { flex: 1; display: grid; }
.mood-text b { font-size: 15.5px; }
.mood-text small { color: var(--muted); font-size: 12.5px; }
.mood-arrow { flex: 0 0 18px; height: 18px; color: #c3c3d2; }
.tone-video { --tone: var(--video); }
.tone-manga { --tone: var(--manga); }
.tone-line { --tone: var(--line); }
.tone-live { --tone: var(--live); }
.tone-matching { --tone: var(--matching); }
.tone-live .mood-icon { position: relative; }
.tone-live .mood-icon::after {
  content: "LIVE"; position: absolute; right: -6px; top: -6px; font-size: 9px; font-weight: 700;
  color: #fff; background: var(--live); padding: 1px 5px; border-radius: 6px; letter-spacing: .04em;
}

/* ---------- スワイプ ---------- */
.progress { height: 5px; background: var(--border); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s ease; }
.swipe-hint { text-align: center; font-size: 12.5px; color: var(--muted); margin: 10px 0; }
.like-t { color: var(--like); } .nope-t { color: var(--nope); }
.deck { position: relative; height: min(66vh, 470px); }
.card {
  position: absolute; inset: 0; background: var(--surface); border-radius: 24px;
  box-shadow: 0 14px 40px rgba(28, 28, 60, 0.14); overflow: hidden;
  touch-action: none; user-select: none; display: flex; flex-direction: column;
  --like: 0; --nope: 0;
}
.card.is-under { transform: scale(.95) translateY(12px); opacity: .7; }
.card .avatar.xl, .card .cover { flex: 1; border-radius: 0; width: 100%; height: auto; }
.card-body { padding: 14px 18px 18px; }
.card-body h3 { margin: 0; font-size: 19px; }
.stamp {
  position: absolute; top: 22px; padding: 4px 12px; font-weight: 800; font-size: 24px; letter-spacing: .08em;
  border: 3px solid; border-radius: 10px; background: rgba(255,255,255,.85); pointer-events: none;
}
.stamp-like { left: 20px; color: var(--like); transform: rotate(-12deg); opacity: var(--like); }
.stamp-nope { right: 20px; color: var(--nope); transform: rotate(12deg); opacity: var(--nope); }
.swipe-actions { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 20px; }
.circle { width: 64px; height: 64px; padding: 18px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); transition: transform .15s ease; }
.circle:active { transform: scale(.9); }
.circle.like { color: var(--like); } .circle.nope { color: var(--nope); }
.count { font-size: 13px; color: var(--muted); min-width: 48px; text-align: center; font-weight: 500; }

/* ---------- アバター・タグ ---------- */
.avatar {
  display: grid; place-items: center; color: #fff; font-weight: 700;
  background: radial-gradient(circle at 30% 25%, var(--a), var(--b));
  width: 64px; height: 64px; border-radius: 50%; font-size: 22px;
}
.avatar.lg { width: 84px; height: 84px; font-size: 28px; margin: 0 auto 8px; }
.avatar.xl { font-size: 72px; }
.avatar span { text-shadow: 0 2px 12px rgba(0,0,0,.12); }
.cover { display: grid; place-items: center; color: rgba(255,255,255,.9); background: linear-gradient(160deg, var(--a), var(--b)); }
.cover svg { width: 90px; height: 90px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags span { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: #f1f0ff; color: var(--accent); font-weight: 500; }
.tags.sm span { font-size: 11px; padding: 2px 7px; }

/* ---------- 結果 ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pick {
  position: relative; padding: 16px 10px 14px; background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); text-align: center; display: grid; gap: 2px;
  animation: fadeUp .4s ease both;
}
.pick small { color: var(--muted); font-size: 11.5px; }
.rank { position: absolute; top: 8px; left: 8px; display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; }
.rank svg { width: 15px; height: 15px; }
.rank.r1 { color: #e4a800; } .rank.r2 { color: #9aa3b5; } .rank.r3 { color: #c98a5a; }

.profile { text-align: center; padding-top: 8px; }
.profile .avatar { width: 112px; height: 112px; margin: 0 auto; font-size: 44px; }
.profile h2 { margin: 10px 0 0; font-size: 20px; }
.profile .tags { justify-content: center; }

.works { display: grid; gap: 10px; }
.work { display: flex; gap: 12px; padding: 12px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); animation: fadeUp .4s ease both; }
.thumb {
  position: relative; flex: 0 0 96px; height: 120px; border-radius: 12px; padding: 32px;
  color: rgba(255,255,255,.92); background: linear-gradient(160deg, var(--a), var(--b));
}
.rank-pill { position: absolute; left: 6px; bottom: 6px; font-size: 10.5px; font-weight: 700; color: var(--text); background: rgba(255,255,255,.9); padding: 1px 7px; border-radius: 99px; }
.work-body { display: flex; flex-direction: column; min-width: 0; }
.work-body b { font-size: 14.5px; }
.work-body small { color: var(--muted); font-size: 12px; }
.work-body .btn-primary { align-self: flex-start; margin-top: auto; }

/* ---------- 漫画：検索・ジャンル ---------- */
.search { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); }
.search i { width: 18px; height: 18px; color: var(--muted); flex: 0 0 18px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; background: transparent; }
.search button { padding: 8px 14px; border-radius: 10px; background: var(--manga); color: #fff; font-weight: 700; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { padding: 9px 15px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; font-weight: 500; transition: all .15s ease; }
.chip:active, .chip:hover { border-color: var(--manga); color: var(--manga); }

/* ---------- 外部案件 ---------- */
.offer { padding: 18px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; animation: fadeUp .4s ease both; }
.offer-head { display: flex; align-items: center; gap: 12px; }
.offer-head b { font-size: 16px; display: block; }
.offer p { font-size: 14px; color: var(--muted); margin: 10px 0 14px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, #fff); padding: 1px 8px; border-radius: 99px; margin-top: 2px; }
.offer .btn-primary { background: var(--tone); box-shadow: 0 8px 20px color-mix(in srgb, var(--tone) 30%, transparent); }

/* ---------- 年齢確認・フッター・トースト ---------- */
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(246, 246, 250, 0.96); backdrop-filter: blur(10px); }
.gate-box { width: 100%; max-width: 360px; padding: 28px 22px 22px; background: var(--surface); border-radius: 24px; box-shadow: 0 20px 60px rgba(28,28,60,.15); text-align: center; }
.gate-icon { width: 52px; height: 52px; padding: 12px; margin: 0 auto; border-radius: 16px; color: var(--accent); background: #f1f0ff; }
.gate h2 { margin: 12px 0 4px; font-size: 19px; }
.gate p { margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.gate .btn-ghost { margin-top: 10px; }

.foot { max-width: 520px; margin: 0 auto; padding: 8px 16px 32px; text-align: center; }
.foot p { font-size: 11px; color: var(--muted); margin: 0; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0;
  background: #1c1c28; color: #fff; font-size: 13px; padding: 10px 16px; border-radius: 12px;
  transition: all .25s ease; pointer-events: none; z-index: 200; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   作り込み（背景・ヒーロー・気分カード・ステップ）
   ========================================================= */
body {
  background:
    radial-gradient(900px 520px at 110% -10%, rgba(255, 143, 181, 0.28), transparent 60%),
    radial-gradient(800px 520px at -20% 10%, rgba(125, 107, 255, 0.24), transparent 60%),
    radial-gradient(700px 600px at 50% 110%, rgba(255, 196, 140, 0.22), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(109, 93, 252, 0.13) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}
.top { background: rgba(255, 255, 255, 0.6); border-bottom: 1px solid rgba(255, 255, 255, 0.8); max-width: none; }
.top > * { position: relative; }
.logo-mark { padding: 4px; box-shadow: 0 4px 12px rgba(109, 93, 252, 0.35); }
.logo-mark svg { width: 100%; height: 100%; }
#logo-text {
  background: linear-gradient(90deg, #3a2fb0, #c2407a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ヒーロー */
.hero {
  position: relative; margin-top: 8px; padding: 26px 18px 22px;
  border-radius: 28px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,.92), rgba(255,255,255,.7));
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 18px 50px rgba(80, 60, 180, 0.12);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(30px); z-index: 0; pointer-events: none;
}
.hero::before { width: 220px; height: 220px; top: -90px; left: -70px; background: rgba(125, 107, 255, .28); }
.hero::after { width: 200px; height: 200px; bottom: -100px; right: -60px; background: rgba(255, 143, 181, .3); }
.hero > * { position: relative; z-index: 1; }
.hero-orbit { position: relative; width: 150px; height: 130px; margin: 0 auto 6px; display: grid; place-items: center; }
.hero-ring {
  position: absolute; width: 128px; height: 128px; border-radius: 50%;
  border: 2px dashed rgba(109, 93, 252, .3); animation: spin 22s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-orbit .hero-sensei { margin: 0; }
.spark { position: absolute; width: 16px; height: 16px; color: var(--accent); animation: twinkle 2.6s ease-in-out infinite; }
.spark.s1 { top: 4px; right: 8px; }
.spark.s2 { bottom: 12px; left: 4px; width: 12px; height: 12px; color: var(--accent-2); animation-delay: .8s; }
.spark.s3 { top: 30px; left: 10px; width: 10px; height: 10px; color: #ffb26b; animation-delay: 1.6s; }
@keyframes twinkle { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.hero h1 { font-size: 24px; margin-top: 14px; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 6px 0 14px; font-size: 13.5px; color: var(--muted); }
.trust { list-style: none; padding: 0; margin: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.trust li {
  display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #4b3fb8;
  padding: 5px 10px; border-radius: 99px; background: #fff; border: 1px solid #e6e2ff;
}
.trust li svg { width: 14px; height: 14px; color: var(--accent); }

/* 気分カード */
.mood {
  position: relative; overflow: hidden; padding: 16px 14px;
  background: linear-gradient(105deg, color-mix(in srgb, var(--tone) 9%, #fff) 0%, #fff 55%);
  border: 1px solid color-mix(in srgb, var(--tone) 14%, #fff);
}
.mood::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 10%, transparent); pointer-events: none;
}
.mood-icon {
  flex-basis: 54px; height: 54px; padding: 13px; border-radius: 17px; color: #fff;
  background: linear-gradient(140deg, color-mix(in srgb, var(--tone) 70%, #fff), var(--tone));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--tone) 35%, transparent);
}
.mood-text { gap: 1px; }
.mood-tag {
  justify-self: start; font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, #fff);
  padding: 1px 8px; border-radius: 99px; margin-bottom: 2px;
}
.mood-text small { line-height: 1.45; }
.mood-arrow {
  flex: 0 0 30px; height: 30px; padding: 7px; border-radius: 50%; position: relative; z-index: 1;
  color: var(--tone); background: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--tone) 20%, transparent);
}
.tone-live .mood-icon::after { display: none; }
.tone-live .mood-icon { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 18px color-mix(in srgb, var(--live) 35%, transparent), 0 0 0 0 color-mix(in srgb, var(--live) 40%, transparent); }
  50% { box-shadow: 0 8px 18px color-mix(in srgb, var(--live) 35%, transparent), 0 0 0 7px transparent; }
}

/* 共通カードの質感 */
.ai-bubble, .offer, .work, .pick, .search, .kpi, .panel { border: 1px solid rgba(255,255,255,.9); }
.foot { padding-top: 20px; }
.foot p { opacity: .85; }
.ai-bubble { word-break: auto-phrase; }
.mood-text small { word-break: auto-phrase; }

/* 中央配置の吹き出し（トップの挨拶） */
.ai-row.center { flex-direction: column; align-items: center; gap: 14px; margin: 26px 0 18px; }
.ai-row.center .ai-avatar { flex: 0 0 auto; width: 52px; height: 52px; }
.ai-row.center .ai-bubble {
  position: relative; text-align: center; border-radius: 18px; padding: 14px 20px;
  max-width: 340px; overflow: visible;
}
.ai-row.center .ai-bubble::before {
  content: ""; position: absolute; top: -8px; left: 50%; width: 16px; height: 16px;
  background: var(--surface); transform: translateX(-50%) rotate(45deg); border-radius: 3px;
  border-left: 1px solid rgba(255,255,255,.9); border-top: 1px solid rgba(255,255,255,.9);
}
.legal-note { text-align: center; font-size: 11.5px; color: var(--muted); margin: 4px 0 0; }

/* 案内ページの宣伝文 */
.offer-headline {
  margin: 16px 0 10px; font-size: 19px; line-height: 1.45; word-break: auto-phrase;
  color: var(--tone);
}
.offer-points { list-style: none; margin: 0 0 4px; padding: 12px 14px; display: grid; gap: 9px; border-radius: 14px; background: color-mix(in srgb, var(--tone) 7%, #fff); }
.offer-points li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; font-weight: 500; line-height: 1.5; }
.offer-points i { flex: 0 0 20px; height: 20px; padding: 3px; margin-top: 1px; border-radius: 50%; color: #fff; background: var(--tone); }

/* ---------- 本物の画像まわり ---------- */
.card-img { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #eee; }
.card-img img { width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block; pointer-events: none; }
.card-img.contain { background: #1c1c28; }
.card-img.contain::before { content: ""; position: absolute; inset: -20px; background: var(--bg) center / cover; filter: blur(18px) brightness(.7); }
.card-img.contain img { position: relative; object-fit: contain; object-position: center; }
.card-name { display: flex; align-items: center; gap: 10px; }
.card-name .face { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: var(--shadow); }
.avatar.has-img { background: #eee; overflow: hidden; padding: 0; }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.img { padding: 0; overflow: hidden; background: #eee; }
.thumb.img img { width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-body h3.clamp { -webkit-line-clamp: 2; font-size: 16px; }
.pr { display: inline-block; margin: 8px 0 0 8px; font-size: 10px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; vertical-align: middle; }
.work-body .btn-primary + .pr { align-self: flex-start; margin-left: 0; margin-top: 4px; }

/* 読み込み中 */
.loading { padding-top: 10px; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: dot 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }

/* AI分析中 */
.analyzing { display: grid; justify-items: center; gap: 14px; padding: 70px 0; text-align: center; }
.analyzing .scan {
  width: 96px; height: 96px; border-radius: 50%; overflow: hidden; position: relative;
  background: linear-gradient(150deg, #7d6bff, #ff8fb5); border: 3px solid #fff;
  box-shadow: 0 0 0 0 rgba(109, 93, 252, .4); animation: ring 1.2s ease-out infinite;
}
@keyframes ring { to { box-shadow: 0 0 0 22px rgba(109, 93, 252, 0); } }
.analyzing b { font-size: 15px; }
.analyzing .bar { width: 200px; height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.analyzing .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); animation: fill 1.3s ease forwards; }
@keyframes fill { to { width: 100%; } }

/* フッター */
.foot p + p { margin-top: 6px; }
.foot a { color: var(--muted); }
.credit { font-size: 10.5px !important; }
.thumb.img.center img { object-position: center top; }

/* ---------- 顔で選ぶカード ---------- */
.face-card { flex: 1; min-height: 0; position: relative; overflow: hidden; display: grid; place-items: center; background: #2a2440; }
.face-card::before { content: ""; position: absolute; inset: -30px; background: var(--bg) center / cover; filter: blur(26px) saturate(1.2) brightness(.85); }
.face-big {
  position: relative; width: min(72%, 260px); aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  border: 5px solid rgba(255,255,255,.9); box-shadow: 0 16px 40px rgba(0,0,0,.3); pointer-events: none;
}
.card-body.center { text-align: center; }
.card-body.center h3 { font-size: 21px; }

/* 好み度 */
.match {
  position: absolute; top: 8px; right: 8px; font-size: 10.5px; font-weight: 700; color: #fff;
  padding: 2px 8px; border-radius: 99px; background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.match-line { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.match-line b { color: var(--accent); font-size: 16px; }

/* 女優ページ：見出し・ピックアップ */
.section-title { display: flex; align-items: center; gap: 6px; font-size: 15px; margin: 22px 0 10px; flex-wrap: wrap; }
.section-title svg { width: 18px; height: 18px; color: #e4a800; }
.section-title small { width: 100%; font-size: 11.5px; color: var(--muted); font-weight: 500; margin-left: 24px; margin-top: -4px; }
.pick-title svg { color: var(--accent); }
.work.pickup { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--accent), var(--accent-2)) border-box; }
.pick-pill { background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important; color: #fff !important; }

/* 漫画：探し方の二択 */
.mode-list { display: grid; gap: 12px; }
.mode {
  display: flex; align-items: center; gap: 14px; text-align: left; padding: 18px 14px; border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow); border: 1px solid #eceaf8; --tone: var(--manga); animation: fadeUp .4s ease both;
}
.mode:first-child { --tone: var(--accent); border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--accent), var(--accent-2)) border-box; }
.mode-icon {
  flex: 0 0 54px; height: 54px; padding: 13px; border-radius: 17px; color: #fff;
  background: linear-gradient(140deg, color-mix(in srgb, var(--tone) 70%, #fff), var(--tone));
}
.mode .mood-tag { color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, #fff); }
.mode .mood-arrow { color: var(--tone); }

/* スーパーライク */
.super-t { color: #2f8cff; }
.circle.super { color: #2f8cff; width: 54px; height: 54px; padding: 15px; }
.swipe-actions { gap: 22px; }
.stamp-super {
  left: 50%; top: auto; bottom: 120px; transform: translateX(-50%) rotate(-6deg); color: #2f8cff;
  opacity: var(--super); white-space: nowrap; font-size: 22px;
}
.card { --super: 0; }
p.count { text-align: center; margin: 10px 0 0; }
.btn-primary.more { margin-top: 18px; gap: 8px; }
.btn-primary.more svg { width: 18px; height: 18px; }
.btn-primary.more + .btn-ghost { margin-top: 10px; }
.mode.tone-video-sub { --tone: var(--video); }

/* 案内ページ：読みやすい行間 */
.offer p { line-height: 1.85; }
.offer-headline { line-height: 1.6; margin: 14px 0 12px; }
.offer-points { gap: 13px; padding: 14px 16px; }
.offer-points li { line-height: 1.75; }
.offer-points i { margin-top: 3px; }
.ai-bubble { line-height: 1.75; }

/* 目立たせる帯（遠隔バイブなど） */
.offer-highlight {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 14px;
  color: #fff; font-weight: 700; font-size: 15px; line-height: 1.5;
  background: linear-gradient(135deg, #ff3d71, #ff7a59); box-shadow: 0 8px 22px rgba(255, 61, 113, .35);
  animation: glow 2.2s ease-in-out infinite;
}
.offer-highlight i { flex: 0 0 24px; height: 24px; padding: 3px; border-radius: 50%; background: rgba(255,255,255,.25); }
@keyframes glow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015); box-shadow: 0 10px 28px rgba(255, 61, 113, .5); } }
.hl { font-style: normal; font-weight: 700; color: var(--live); background: linear-gradient(transparent 60%, rgba(255, 61, 113, .18) 60%); }

/* サービスのロゴ */
.brand-icon { flex: 0 0 54px; width: 54px; height: 54px; border-radius: 14px; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.mood-text b { word-break: auto-phrase; line-height: 1.45; }
.offer-highlight span { word-break: auto-phrase; }
.offer-headline { text-wrap: balance; }

/* ---------- 古いスマホ（X の内蔵ブラウザなど）向けの保険 ----------
   color-mix に対応していない環境では、単色で表示する */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .mood { background: #fff; border-color: #eceaf8; }
  .mood::after { display: none; }
  .mood-icon, .mode-icon { background: var(--tone); }
  .mood-tag, .badge, .mode .mood-tag { background: #f3f2fa; }
  .offer .btn-primary { background: var(--tone); box-shadow: none; }
  .offer-points { background: #f7f7fb; }
  .mood-arrow { box-shadow: 0 3px 10px rgba(0,0,0,.08); }
  .tone-live .mood-icon { animation: none; }
}

/* X の内蔵ブラウザ向けの案内 */
.inapp {
  position: sticky; top: 58px; z-index: 19; display: flex; align-items: center; gap: 10px;
  max-width: 520px; margin: 4px auto 0; padding: 10px 10px 10px 14px; width: calc(100% - 32px);
  border-radius: 16px; background: #1c1c28; color: #fff; box-shadow: 0 10px 26px rgba(28, 28, 60, .25);
  animation: fadeUp .4s ease both;
}
.inapp-text { flex: 1; min-width: 0; display: grid; line-height: 1.4; }
.inapp-text b { font-size: 13.5px; }
.inapp-text small { font-size: 11px; opacity: .75; }
.inapp-btn {
  flex: 0 0 auto; padding: 8px 12px; border-radius: 11px; font-size: 12.5px; font-weight: 700; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.inapp-close { flex: 0 0 26px; height: 26px; padding: 6px; border-radius: 50%; color: #fff; opacity: .6; }

.inapp-text b.key { display: inline-block; padding: 0 6px; border-radius: 6px; background: rgba(255,255,255,.2); font-size: 12px; }
.inapp-text small b { font-size: 11px; }
.inapp.ios { padding-top: 14px; }
.inapp-arrow {
  position: absolute; top: -14px; right: 18px; width: 26px; height: 26px; padding: 4px; border-radius: 50%;
  color: #fff; background: var(--accent); transform: rotate(-90deg); animation: point 1.2s ease-in-out infinite;
}
@keyframes point { 0%, 100% { transform: rotate(-90deg) translateX(0); } 50% { transform: rotate(-90deg) translateX(5px); } }
button.inapp-btn { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }

/* 改行位置の指定（「|」で区切ったかたまりは途中で改行しない） */
.ph { display: inline-block; max-width: 100%; }
.hero h1 { font-size: clamp(22px, 6.6vw, 27px); }
.hero-sub { font-size: clamp(12.5px, 3.6vw, 14px); }
@media (max-width: 360px) {
  .trust { gap: 4px; }
  .trust li { font-size: 11px; padding: 4px 8px; }
  .trust li svg { width: 12px; height: 12px; }
}
@media (max-width: 360px) {
  .hero { padding-left: 12px; padding-right: 12px; }
  .trust { flex-wrap: nowrap; gap: 4px; }
  .trust li { font-size: 10.5px; padding: 4px 7px; gap: 3px; white-space: nowrap; }
}
/* ヘッダーのサイト名は1行に収める */
#logo-text { white-space: nowrap; font-size: clamp(14px, 4.4vw, 17px); }
.logo { min-width: 0; }

/* iPhone 向け：2段の手順カード */
.inapp.ios { display: block; padding: 14px 14px 12px; }
.inapp-head { display: flex; align-items: center; gap: 8px; }
.inapp-head b { flex: 1; font-size: 15px; line-height: 1.45; }
.inapp-steps { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; gap: 8px; }
.inapp-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.65; color: rgba(255,255,255,.88); }
.inapp-steps li i {
  flex: 0 0 22px; height: 22px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.inapp-steps li.alt i { background: rgba(255,255,255,.22); }
.inapp-steps b { color: #fff; }
.inapp-steps b.key { padding: 0 7px; border-radius: 6px; background: rgba(255,255,255,.2); font-size: 13px; }
.inapp-copy {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border: 0; border-radius: 12px;
  font: inherit; font-size: 14px; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.inapp-copy svg { width: 18px; height: 18px; }
.inapp-copy.done { background: #20c38a; }

/* スワイプ中の「この作品を見る」 */
.card-body.row { display: flex; align-items: center; gap: 10px; }
.card-text, .card-body.row .card-name { flex: 1; min-width: 0; }
.card-cta-wrap { flex: 0 0 auto; display: grid; justify-items: center; gap: 2px; }
.card-cta {
  display: inline-flex; align-items: center; gap: 4px; padding: 9px 12px; border-radius: 12px; white-space: nowrap;
  font-size: 12.5px; font-weight: 700; color: var(--accent); text-decoration: none;
  background: #f1efff; border: 1.5px solid #ddd8ff; touch-action: manipulation;
}
.card-cta i { width: 14px; height: 14px; display: inline-block; }
.card-cta:active { transform: scale(.96); }
.pr.light { margin: 0; font-size: 9px; border-color: transparent; }

/* =========================================================
   追加機能
   ========================================================= */
/* セール */
.sale {
  position: absolute; top: 6px; left: 6px; z-index: 2; font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
  color: #fff; background: linear-gradient(135deg, #ff3d71, #ff7a59); padding: 2px 7px; border-radius: 6px;
  box-shadow: 0 3px 8px rgba(255, 61, 113, .35);
}
.card-img .sale { top: 12px; left: 12px; font-size: 13px; padding: 4px 10px; border-radius: 8px; }
.price { font-size: 12.5px; color: var(--text); display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; margin-top: 2px; }
.price .list-price { color: var(--muted); font-size: 11.5px; }
.price .sale-price { color: #ff3d71; font-size: 14px; }
.price .camp { font-size: 10.5px; font-weight: 700; color: #ff3d71; background: #fff0f4; padding: 0 6px; border-radius: 99px; }

/* 作品カードのボタン列 */
.work-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; }
.work-actions .btn-primary.sm { margin-top: 0; }
.work-body .work-actions + .pr { margin: 4px 0 0; align-self: flex-start; }
.sample-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 11px; font-size: 12px; font-weight: 700;
  color: var(--accent); background: #f1efff; border: 1.5px solid #ddd8ff; cursor: pointer;
}
.sample-btn svg { width: 12px; height: 12px; }

/* お気に入り */
.fav-btn {
  flex: 0 0 auto; width: 38px; height: 38px; padding: 9px; border-radius: 50%; cursor: pointer;
  color: #c9c6d8; background: #fff; border: 1.5px solid #ecebf3; transition: transform .15s ease, color .15s ease;
}
.fav-btn.sm { width: 34px; height: 34px; padding: 8px; }
.fav-btn.on { color: #ff3d71; border-color: #ffd1dc; background: #fff5f8; }
.fav-btn:active { transform: scale(.88); }
.fav-btn.label { width: auto; height: auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; }
.fav-btn.label svg { width: 16px; height: 16px; }
.fav-btn.label::after { content: "お気に入りに追加"; color: var(--muted); }
.fav-btn.label.on::after { content: "お気に入り済み"; color: #ff3d71; }
.profile-fav { margin-top: 10px; }
.card-side { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.fav-note { margin-top: 16px; }

/* サンプル表示 */
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: rgba(20, 18, 35, .72); animation: fadeUp .2s ease both; }
.modal-box { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 20px; padding: 14px; }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.modal-head b { flex: 1; font-size: 14px; }
.modal-close { flex: 0 0 32px; height: 32px; padding: 8px; border-radius: 50%; background: #f3f2fa; }
.movie { position: relative; width: 100%; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: #000; }
.movie iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 12px; }
.gallery img { flex: 0 0 88%; width: 88%; border-radius: 12px; scroll-snap-align: center; object-fit: contain; background: #f3f2fa; max-height: 60vh; }
.modal-foot { display: grid; justify-items: center; gap: 4px; margin-top: 12px; }

/* タイプ名・シェア */
.type-box {
  display: grid; justify-items: center; gap: 4px; text-align: center; margin: 4px 0 18px; padding: 16px; border-radius: 20px;
  background: linear-gradient(135deg, #f1efff, #fff0f5); border: 1px solid #fff;
}
.type-box small { font-size: 12px; color: var(--muted); }
.type-box b { font-size: 18px; color: #3a2fb0; line-height: 1.5; }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 10px 18px; border-radius: 99px;
  color: #fff; background: #111; text-decoration: none; font-weight: 700; font-size: 13.5px;
}
.share-btn svg { width: 16px; height: 16px; }

/* トップ：前回の結果・お気に入り */
.return-box { display: grid; gap: 8px; margin: 0 0 14px; }
.return-last {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); text-align: left;
  background: #fff; box-shadow: var(--shadow); border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
}
.return-thumbs { display: flex; }
.return-thumbs img, .return-thumbs .dot { width: 34px; height: 46px; object-fit: cover; object-position: right center; border-radius: 6px; border: 2px solid #fff; margin-left: -10px; background: #eee; }
.return-thumbs img:first-child { margin-left: 0; }
.return-thumbs.round img { width: 38px; height: 38px; border-radius: 50%; object-position: center; }
.return-text { flex: 1; min-width: 0; display: grid; }
.return-text small { font-size: 11px; color: var(--accent); font-weight: 700; }
.return-text b { font-size: 14px; line-height: 1.45; }
.return-fav {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px;
  font-size: 13px; font-weight: 700; color: #ff3d71; background: #fff; border: 1.5px solid #ffd1dc;
}
.return-fav svg { width: 15px; height: 15px; }

/* トップ：ランキング */
.ranking { margin-top: 26px; }
.rk-title { display: flex; align-items: center; gap: 6px; font-size: 16px; margin: 0 0 10px; }
.rk-title svg { width: 20px; height: 20px; color: #e4a800; }
.rk-tabs { display: inline-flex; padding: 3px; border-radius: 99px; background: #ecebf5; margin-bottom: 10px; }
.rk-tabs button { padding: 6px 16px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--muted); }
.rk-tabs button.on { background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.rk-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x mandatory; }
.rk-row[hidden] { display: none; }
.rk-card { flex: 0 0 138px; scroll-snap-align: start; display: grid; gap: 4px; align-content: start; padding: 8px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.rk-card b { font-size: 12px; line-height: 1.45; -webkit-line-clamp: 2; }
.rk-img { position: relative; height: 168px; border-radius: 10px; overflow: hidden; background: #eee; }
.rk-img img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.rk-img.center img { object-position: center top; }
.rk-no { position: absolute; right: 6px; bottom: 6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: rgba(20,18,35,.75); }
.btn-primary.xs { padding: 7px 10px; font-size: 12px; border-radius: 10px; box-shadow: none; }
.rk-note { font-size: 10.5px; color: var(--muted); margin: 2px 0 0; display: flex; align-items: center; gap: 6px; }
.rk-note .pr { margin: 0; }

/* 女優ページ：作品一覧・見放題 */
.more-links { display: grid; gap: 8px; margin-top: 18px; }
.btn-ghost-link {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 13px; border-radius: 14px;
  font-weight: 700; font-size: 14px; color: var(--accent); background: #fff; border: 1.5px solid #ddd8ff; text-decoration: none;
}
.btn-ghost-link i { width: 15px; height: 15px; display: inline-block; }
.btn-ghost-link.monthly { color: #fff; border: 0; background: linear-gradient(135deg, #2f2a55, #6d5dfc); }

/* 1つ戻る */
.circle.undo { width: 44px; height: 44px; padding: 12px; color: #8a8aa0; }
.circle.undo:disabled { opacity: .35; }

.movie { aspect-ratio: 16 / 9; }
.movie-loading { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; color: #fff; font-size: 13px; pointer-events: none; }
.movie-loading i { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .8s linear infinite; }
.movie-alt { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); text-align: center; }
.movie-alt a { color: var(--accent); }

/* 漫画サンプルのリーダー（右綴じ：1ページ目から左へ進む） */
.reader { position: relative; border-radius: 12px; overflow: hidden; background: #f3f2fa; }
.pages { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pages::-webkit-scrollbar { display: none; }
.page { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; height: min(62vh, 560px); }
.page img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.pg-tap { position: absolute; top: 0; bottom: 0; width: 28%; background: transparent; border: 0; cursor: pointer; }
.pg-tap.next { left: 0; }
.pg-tap.prev { right: 0; }
.pager { display: grid; justify-items: center; gap: 6px; margin-top: 10px; }
.pg-count { font-size: 12px; font-weight: 700; color: var(--muted); }
.dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #d9d7e8; cursor: pointer; transition: all .2s ease; }
.dots i.on { width: 20px; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.pg-hint { margin: 4px 0 0; font-size: 11px; }

/* スワイプのコツ */
.tips { list-style: none; margin: 0 0 16px; padding: 14px 16px; display: grid; gap: 11px; border-radius: 18px; background: rgba(255,255,255,.85); box-shadow: var(--shadow); border: 1px solid #fff; }
.tips li { display: flex; align-items: center; gap: 12px; font-size: 13px; line-height: 1.6; }
.tips b { color: var(--text); }
.tip-ic { flex: 0 0 32px; height: 32px; padding: 8px; border-radius: 50%; background: #f3f2fa; }
.tip-ic.fav { color: #ff3d71; background: #fff0f4; }
.tip-ic.see { color: var(--accent); background: #f1efff; }
.tip-ic.sup { color: #2f8cff; background: #eef5ff; }
.tip-ic.undo { color: #8a8aa0; }
.tips-overlay { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 10px; border-radius: 24px; background: rgba(246,246,250,.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tips-box { width: 100%; display: grid; gap: 10px; text-align: center; }
.tips-box > b { font-size: 16px; }
.tips-box .tips { text-align: left; margin: 0; }

/* おかずタイプ診断 */
.type-box { gap: 2px; padding: 20px 16px 16px; background: linear-gradient(135deg, #f1efff, #fff0f5); box-shadow: var(--shadow); }
.type-emoji { font-size: 46px; line-height: 1.2; margin: 4px 0 2px; animation: pop .5s ease both; }
.type-pre { font-size: 14px; font-weight: 700; color: var(--text); }
.type-name { font-size: 24px !important; line-height: 1.35; background: linear-gradient(90deg, #3a2fb0, #c2407a); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.type-desc { margin: 8px 0 6px; font-size: 13px; line-height: 1.75; color: #55556a; }
.type-note { font-size: 10.5px !important; margin-top: 2px; }
.share-btn { padding: 12px 22px; font-size: 14px; }
.friend-box {
  display: grid; justify-items: center; gap: 2px; text-align: center; margin: 0 0 14px; padding: 14px; border-radius: 18px;
  background: #1c1c28; color: #fff; box-shadow: 0 10px 26px rgba(28,28,60,.2);
}
.friend-box small { font-size: 11px; opacity: .7; }
.friend-box b { font-size: 16px; line-height: 1.5; }
.friend-box span { font-size: 12.5px; opacity: .85; }

/* 表紙を押してもサンプルが開く */
.thumb.has-sample { cursor: pointer; }
.thumb-play {
  position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; padding: 9px 8px 9px 10px; transform: translate(-50%, -50%);
  border-radius: 50%; color: #fff; background: rgba(20, 18, 35, .55); backdrop-filter: blur(2px);
}

.tips-overlay { position: fixed; inset: 0; z-index: 120; border-radius: 0; padding: 16px; background: rgba(246,246,250,.96); }
.tips-box { max-width: 400px; }

.type-art { width: 180px; height: 180px; border-radius: 28px; object-fit: cover; margin: 8px 0 4px; box-shadow: 0 10px 26px rgba(80,60,180,.18); animation: pop .5s ease both; }
.type-desc .ph { display: block; }
.friend-box img { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; margin-bottom: 4px; }

/* 案件のおすすめポップ */
.promo {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 90;
  width: min(488px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 12px;
  border-radius: 18px; background: #fff; box-shadow: 0 14px 40px rgba(28, 28, 60, .22); border: 1px solid #eceaf8;
  transform: translate(-50%, 140%); opacity: 0; transition: transform .45s cubic-bezier(.2, 1.2, .3, 1), opacity .3s ease;
}
.promo.in { transform: translate(-50%, 0); opacity: 1; }
.promo-ic {
  flex: 0 0 44px; height: 44px; padding: 10px; border-radius: 14px; color: #fff;
  background: var(--tone); box-shadow: 0 6px 14px color-mix(in srgb, var(--tone) 35%, transparent);
}
.promo-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.promo-text b { font-size: 13px; line-height: 1.5; }
.promo-pr { font-size: 10px; font-weight: 700; color: var(--muted); }
.promo-cta {
  flex: 0 0 auto; padding: 9px 12px; border-radius: 11px; font-size: 12.5px; font-weight: 700; color: #fff; text-decoration: none;
  background: var(--tone); white-space: nowrap;
}
.promo-cta i { display: none; }
.promo-close { flex: 0 0 24px; height: 24px; padding: 6px; border-radius: 50%; color: #a3a3b5; }
@supports not (color: color-mix(in srgb, red 50%, blue)) { .promo-ic { box-shadow: none; } }

/* オープン時の目立つポップ */
.promo.big {
  padding: 14px 10px 14px 14px; border: 0; color: #fff;
  background: linear-gradient(135deg, #ff3d71, #ff7a59);
  box-shadow: 0 16px 40px rgba(255, 61, 113, .45);
}
.promo.big.in { animation: peko 1.6s ease .45s 2; }
@keyframes peko { 0%, 100% { transform: translate(-50%, 0); } 12% { transform: translate(-50%, -10px); } 24% { transform: translate(-50%, 0); } 34% { transform: translate(-50%, -5px); } 44% { transform: translate(-50%, 0); } }
.promo.big .promo-ic { background: rgba(255,255,255,.22); box-shadow: none; flex-basis: 50px; height: 50px; padding: 12px; }
.promo.big .promo-pr { color: rgba(255,255,255,.85); }
.promo.big .promo-text b { font-size: 16px; line-height: 1.4; font-weight: 900; }
.promo.big .promo-text small { font-size: 11.5px; opacity: .9; line-height: 1.5; }
.promo.big .promo-cta { background: #fff; color: #ff3d71; padding: 10px 12px; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.promo.big .promo-close { color: rgba(255,255,255,.8); }
/* 目立つポップ：ボタンは下に横いっぱい（小さいスマホでも文字が詰まらない） */
.promo.big { flex-wrap: wrap; align-items: flex-start; row-gap: 10px; padding-right: 12px; }
.promo.big .promo-text { flex: 1 1 0; }
.promo.big .promo-close { order: 2; margin-top: -2px; }
.promo.big .promo-cta { order: 3; flex: 1 0 100%; text-align: center; padding: 11px; font-size: 14px; }

/* 右下の光る丸ボタン */
.fab { position: fixed; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 95; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.fab > * { pointer-events: auto; }
.fab-btn {
  position: relative; width: 60px; height: 60px; padding: 16px; border-radius: 50%; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #ff3d71, #ff7a59); border: 3px solid #fff;
  box-shadow: 0 10px 24px rgba(255, 61, 113, .45);
  transform: scale(0); transition: transform .5s cubic-bezier(.2, 1.6, .4, 1);
  animation: pikon 1.6s ease-in-out infinite;
}
.fab.in .fab-btn { transform: scale(1); }
@keyframes pikon {
  0%, 100% { box-shadow: 0 10px 24px rgba(255, 61, 113, .45), 0 0 0 0 rgba(255, 61, 113, .55); filter: brightness(1); }
  50% { box-shadow: 0 10px 24px rgba(255, 61, 113, .45), 0 0 0 14px rgba(255, 61, 113, 0); filter: brightness(1.15); }
}
.fab-pr { position: absolute; top: -6px; right: -6px; font-size: 9px; font-weight: 800; color: #ff3d71; background: #fff; border-radius: 99px; padding: 1px 5px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.fab-tip {
  position: absolute; right: 70px; bottom: 16px; white-space: nowrap; font-size: 11.5px; font-weight: 800; color: #ff3d71;
  background: #fff; padding: 5px 10px; border-radius: 99px; box-shadow: 0 4px 12px rgba(0,0,0,.12);
  opacity: 0; animation: tip 4.5s ease .8s 1 both;
}
@keyframes tip { 0% { opacity: 0; transform: translateX(8px); } 12%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.fab.open .fab-tip { display: none; }
.fab.open .fab-btn { animation: none; }
.fab-bubble {
  position: relative; width: min(280px, calc(100vw - 28px)); padding: 14px 14px 12px; border-radius: 18px 18px 6px 18px;
  color: #fff; background: linear-gradient(135deg, #ff3d71, #ff7a59); box-shadow: 0 14px 34px rgba(255, 61, 113, .4);
  display: grid; gap: 4px; animation: fadeUp .25s ease both;
}
.fab-bubble[hidden] { display: none; }
.fab-bubble .promo-pr { color: rgba(255,255,255,.85); }
.fab-bubble b { font-size: 16px; line-height: 1.4; font-weight: 900; padding-right: 22px; }
.fab-bubble small { font-size: 11.5px; line-height: 1.5; opacity: .92; }
.fab-cta { margin-top: 6px; display: block; text-align: center; padding: 10px; border-radius: 12px; background: #fff; color: #ff3d71; font-weight: 800; font-size: 14px; text-decoration: none; }
.fab-cta i { display: none; }
.fab-x { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; padding: 6px; border-radius: 50%; color: #fff; background: rgba(255,255,255,.2); }
.fab.gone { opacity: 0; transition: opacity .3s ease; }
body.promo-on .fab { opacity: 0; pointer-events: none; }
body.promo-on .fab > * { pointer-events: none; }

/* 丸ボタン横の文字は表示し続ける（ふきだしを開くと消える） */
.fab-tip { animation: tipIn .5s ease .6s both, tipBob 2.4s ease-in-out 1.2s infinite; }
@keyframes tipIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
@keyframes tipBob { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-3px); } }

/* 丸ボタン：スワイプ中は隠す・本体に✕ */
body.swiping .fab { opacity: 0; pointer-events: none; transform: translateY(20px); transition: opacity .2s ease, transform .2s ease; }
body.swiping .fab > * { pointer-events: none; }
.fab { transition: opacity .25s ease, transform .25s ease; }
.fab-wrap { position: relative; }
.fab-close {
  position: absolute; top: -8px; left: -8px; width: 22px; height: 22px; padding: 5px; border-radius: 50%; cursor: pointer;
  color: #fff; background: rgba(28, 28, 40, .7); border: 2px solid #fff; z-index: 1;
}
.fab.open .fab-close { display: none; }

/* 結果画面の上の小さなタイプ表示 */
.type-chip {
  display: flex; align-items: center; gap: 8px; margin: -6px auto 14px; padding: 5px 12px 5px 5px; border-radius: 99px;
  background: #fff; border: 1.5px solid #e6e2ff; box-shadow: var(--shadow); font-size: 12.5px; color: var(--muted); cursor: pointer;
}
.type-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.type-chip b { color: #3a2fb0; margin: 0 2px; }
.type-chip i { font-style: normal; font-size: 10px; color: var(--accent); }

/* 途中で結果へ */
.early { display: flex; align-items: center; gap: 6px; margin: 8px auto 0; padding: 8px 16px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--accent); background: #fff; border: 1.5px solid #ddd8ff; box-shadow: var(--shadow); cursor: pointer; }
.early[hidden] { display: none; }
.early svg { width: 15px; height: 15px; }

/* 新作枠 */
.new-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2; font-size: 12px; font-weight: 900; letter-spacing: .06em; color: #fff;
  padding: 3px 10px; border-radius: 8px; background: linear-gradient(135deg, #00b8a9, #2f8cff); box-shadow: 0 4px 12px rgba(47, 140, 255, .35);
}
.thumb.is-new::after {
  content: "NEW"; position: absolute; top: 6px; right: 6px; z-index: 2; font-size: 9.5px; font-weight: 900; color: #fff;
  padding: 1px 6px; border-radius: 5px; background: linear-gradient(135deg, #00b8a9, #2f8cff);
}
.new-text { color: #2f8cff !important; font-weight: 700; }

/* 顔の結果：女優＋人気作＋ボタン */
.ar-list { display: grid; gap: 12px; }
.ar-card { display: flex; gap: 12px; padding: 12px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); border: 1px solid #fff; position: relative; animation: fadeUp .4s ease both; }
.ar-cover { position: relative; flex: 0 0 104px; height: 140px; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, var(--a, #e3d7ff), var(--b, #a78bfa)); color: rgba(255,255,255,.9); display: grid; place-items: center; }
.ar-cover > svg { width: 36px; height: 36px; }
.ar-cover img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.ar-cover .new-badge { top: 6px; right: 6px; font-size: 9.5px; padding: 1px 6px; border-radius: 5px; }
.ar-rank { position: absolute; left: 6px; top: 6px; min-width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: rgba(20,18,35,.75); }
.ar-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ar-head { display: flex; align-items: center; gap: 8px; }
.ar-head > div { flex: 1; min-width: 0; display: grid; }
.ar-head b { font-size: 15px; line-height: 1.35; }
.ar-head small { font-size: 11.5px; color: var(--muted); }
.ar-head small em { font-style: normal; font-weight: 800; color: var(--accent); }
.ar-face { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: var(--shadow); }
.ar-note { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ar-body .btn-primary { align-self: stretch; margin-top: 2px; }
.ar-body .btn-primary.sm { align-self: flex-start; }
.ar-body .pr { margin: 2px 0 0; align-self: flex-start; }
.ar-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; margin-top: auto; padding: 4px 0; font-size: 12px; font-weight: 700; color: var(--accent); }
.ar-more svg { width: 13px; height: 13px; }
/* 1位は大きく */
.ar-card.top { flex-direction: column; padding: 14px; border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--accent), var(--accent-2)) border-box; }
.ar-card.top .ar-cover { flex: none; width: 100%; height: auto; aspect-ratio: 4 / 3; }
.ar-card.top .ar-head b { font-size: 18px; }
.ar-card.top .ar-face { width: 44px; height: 44px; }
.ar-card.top .btn-primary { padding: 14px; font-size: 15px; }
.ar-ribbon { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-size: 12px; font-weight: 800; color: #fff; padding: 4px 12px; border-radius: 99px; background: linear-gradient(135deg, #e4a800, #ff8a3d); }
.ar-ribbon svg { width: 14px; height: 14px; }
/* 1位の画像はパッケージの表面だけを、縦長で大きく */
.ar-card.top .ar-cover { width: 64%; align-self: center; aspect-ratio: 400 / 538; }

/* 顔の結果：メインはサイト内の作品ランキングへ／パッケージは FANZA へ */
a.ar-cover { display: block; text-decoration: none; }
.ar-tap {
  position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 10.5px; font-weight: 800; color: #fff; padding: 4px 6px; border-radius: 8px; background: rgba(20, 18, 35, .72);
}
.ar-tap i, .ar-tap svg { width: 11px; height: 11px; display: inline-block; }
.ar-card.top .ar-tap { font-size: 12px; padding: 6px; }
.ar-main { gap: 6px; }
.ar-main svg { width: 16px; height: 16px; }
.ar-body .ar-main.sm { align-self: stretch; }
/* 結果の上の「もっと精度を上げる」 */
.btn-primary.more.top-more { margin: 0 0 16px; padding: 12px; font-size: 14px; background: #fff; color: var(--accent); border: 2px solid #ddd8ff; box-shadow: var(--shadow); }
