/* ===== 参加者画面 ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  min-height: 100dvh;
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-2), var(--bg) 70%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2 { line-height: 1.3; margin: 0; }
.icon { width: 1.2em; height: 1.2em; flex: none; }

/* ページ遷移（同じサイト内のページ移動をなめらかに） */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.28s var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in 0.45s var(--ease-out) both; }
::view-transition-group(*) { animation-duration: 0.5s; animation-timing-function: var(--ease-out); }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px) scale(0.98); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }

/* ===== 背景（ゆっくり動く光） ===== */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
/* 窓から差しこむ光の帯（ゆっくり揺れる） */
.blob { position: absolute; left: -40%; width: 180%; height: 30vh; will-change: transform, opacity; transform: rotate(-24deg); background: radial-gradient(50% 50% at 50% 50%, var(--ray, rgba(255,255,255,.85)), transparent 70%) !important; }
.b1 { top: 6%; --ray: rgba(255, 255, 255, 0.9); animation: ray 14s ease-in-out infinite alternate; }
.b2 { top: 34%; height: 20vh; --ray: rgba(255, 252, 244, 0.8); animation: ray 18s ease-in-out -6s infinite alternate; }
.b3 { top: 58%; height: 14vh; --ray: rgba(120, 95, 70, 0.08); animation: ray 22s ease-in-out -3s infinite alternate; }
@keyframes ray { from { transform: rotate(-24deg) translate(-4%, 0); opacity: 0.55; } to { transform: rotate(-21deg) translate(5%, 3vh); opacity: 1; } }
.bg::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16vh; background: linear-gradient(to bottom, transparent, rgba(255, 253, 248, 0.85)); }
.sparkles {
  position: absolute; inset: -50%;
  background-image:
    radial-gradient(1.6px 1.6px at 20% 30%, rgba(200,167,104,.55), transparent 60%),
    radial-gradient(1.2px 1.2px at 70% 60%, rgba(255,255,255,.95), transparent 60%),
    radial-gradient(1.4px 1.4px at 40% 80%, rgba(200,167,104,.45), transparent 60%),
    radial-gradient(1px 1px at 85% 20%, rgba(255,255,255,.95), transparent 60%),
    radial-gradient(1.8px 1.8px at 10% 70%, rgba(255,250,235,.95), transparent 60%);
  background-size: 260px 260px;
  animation: twinkle 80s linear infinite;
  opacity: 0.8;
}
@keyframes twinkle { to { transform: translate(260px, -260px); } }
.grain {
  position: absolute; inset: 0; opacity: 0.22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== 上のバー ===== */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: linear-gradient(to bottom, var(--top-fade), rgba(239, 231, 218, 0));
  backdrop-filter: blur(6px);
  view-transition-name: topbar;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font: 800 20px/1 var(--font-display); color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), #d8bfae 50%, var(--accent));
  background-size: 200% 200%; animation: shine 4s ease-in-out infinite;
  box-shadow: 0 4px 14px var(--glow);
}
@keyframes shine { 50% { background-position: 100% 100%; } }
/* 上部の文字と名前タグは、どの画面（アプリのネイティブのホームを含む）でも同じ大きさになるよう iPhone の標準の字体で */
.brand-text { display: flex; flex-direction: column; line-height: 1.15; font-family: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", system-ui, sans-serif !important; }
.brand-text b { font-size: 14px; }
.brand-text small { font-size: 10px; color: var(--ink-soft); }
.me-chip {
  display: flex; align-items: center; gap: 6px; max-width: 46%;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 12px; line-height: 1.2;
  font-family: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
}
.me-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page { padding: 4px 16px calc(84px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }

/* ===== 下のタブ ===== */
.tabbar {
  position: fixed; left: 50%; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 30;
  transform: translateX(-50%);
  width: min(360px, calc(100% - 32px));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end;
  padding: 5px 12px; border-radius: 22px;
  background: rgba(255, 252, 247, 0.78); border: 1px solid var(--line);
  backdrop-filter: blur(var(--blur)) saturate(1.4); -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4);
  box-shadow: var(--shadow);
  view-transition-name: tabbar;
}
@keyframes tab-in { from { transform: translate(-50%, 120%); } }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 9px; line-height: 1.2; color: var(--ink-faint); padding: 2px 4px; transition: color 0.2s; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on .icon { color: var(--accent); }
.tabbar .icon { width: 21px; height: 21px; }
.scan-btn { margin-top: -22px; }
.scan-core {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-ink);
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  box-shadow: 0 8px 26px var(--glow);
  position: relative; animation: spin-bg 6s linear infinite;
}
.scan-core::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.scan-core .icon { position: relative; width: 24px; height: 24px; animation: counter-spin 6s linear infinite; }
.scan-core::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent);
  animation: pulse-ring 2.2s var(--ease-out) infinite; opacity: 0;
}
@keyframes spin-bg { to { transform: rotate(360deg); } }
@keyframes counter-spin { to { transform: rotate(-360deg); } }
@keyframes pulse-ring { 0% { transform: scale(0.9); opacity: 0.8; } 100% { transform: scale(1.35); opacity: 0; } }

/* ===== 出てくるときの動き ===== */
.reveal, .stagger > * { animation: rise 0.8s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(22px) scale(0.98); } }

/* ===== 共通部品 ===== */
.eyebrow { margin: 0; font: 600 11px var(--font-display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.name-lg {
  font-size: 1.25em; font-weight: 900;
  background: linear-gradient(90deg, var(--ink), var(--accent) 50%, var(--ink));
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: text-shine 5s linear infinite;
}
@keyframes text-shine { to { background-position: -200% center; } }
.note { font-size: 12px; color: var(--ink-faint); text-align: center; }
.sub { font-size: 12px; color: var(--ink-soft); display: block; }
.empty { text-align: center; color: var(--ink-soft); padding: 28px 12px; background: var(--surface); border-radius: var(--radius); }

.pill { display: inline-block; font: 600 10px var(--font-display); letter-spacing: 0.06em; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; }
.pill-mcz { color: var(--mcz); }
.pill-company { color: var(--company); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 700; cursor: pointer;
  transition: transform 0.2s var(--ease-spring), background 0.2s;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  border: 0; color: var(--accent-ink);
  background: linear-gradient(120deg, var(--accent), #c9a995, var(--accent));
  background-size: 200% auto; animation: text-shine 4s linear infinite;
  box-shadow: 0 10px 28px var(--glow);
}
.btn-xl { width: 100%; padding: 17px 22px; font-size: 16px; }
.btn-ghost { background: transparent; }
.btn-text { background: none; border: 0; color: var(--ink-faint); text-decoration: underline; }

/* 顔写真 */
.avatar {
  position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--avatar-mcz);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--ring, rgba(255,255,255,.6)), 0 0 0 3px rgba(255,255,255,.7); }
.avatar { box-shadow: 0 6px 16px var(--glow); }
.avatar.grp-mcz { --ring: var(--mcz); }
.avatar.grp-company { --ring: var(--company); background: var(--avatar-company); }
.avatar-s { width: 28px; height: 28px; font-size: 11px; }
.avatar-m { width: 52px; height: 52px; font-size: 16px; }
.avatar-l { width: 76px; height: 76px; font-size: 22px; }
.avatar-xl { width: 148px; height: 148px; font-size: 40px; }
.avatar-initial { font-weight: 900; color: #fff; }

/* 相性の円 */
.score-ring { position: relative; width: var(--s); height: var(--s); display: inline-grid; place-items: center; flex: none; }
.score-ring svg, .progress svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring circle, .progress circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.score-ring .track, .progress .track { stroke: var(--track); }
.score-ring .bar { stroke: url(#none); stroke: var(--accent); stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p)); transition: stroke-dashoffset 1.4s var(--ease-out); }
.score-ring.pre .bar, .progress.pre .bar { stroke-dashoffset: 100; }
.score-num { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.score-num b { font: 800 calc(var(--s) * 0.32) var(--font-display); }
.score-num small { font-size: 9px; color: var(--ink-faint); margin-top: 2px; }

/* ===== ようこそ ===== */
.welcome { min-height: calc(100dvh - 90px); display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 10px 4px 30px; text-align: center; }
.welcome-badge { position: relative; width: 150px; height: 150px; margin: 0 auto; display: grid; place-items: center; }
.big2 {
  font: 800 120px/1 var(--font-display);
  background: linear-gradient(160deg, #e9d6c6, var(--accent) 45%, #7d5c48);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: float 4s ease-in-out infinite;
}
.welcome-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--accent-2), var(--accent), var(--accent-3), transparent 70%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: spin-bg 5s linear infinite;
}
@keyframes float { 50% { transform: translateY(-8px) rotate(-2deg); } }
/* KVと同じ字面：字間を広くとったモカの見出し */
.kv-org { margin: 0; font-weight: 700; font-size: 12px; letter-spacing: 0.12em; color: var(--accent); }
.kv-title { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 0.28em; font-weight: 900; font-size: clamp(28px, 9vw, 40px); color: var(--accent); letter-spacing: 0; }
.kv-title span { display: inline-block; animation: kv-char 1s var(--ease-out) both; animation-delay: calc(var(--i) * 90ms + 300ms); }
@keyframes kv-char { from { opacity: 0; transform: translateY(0.6em); } }
.kv-date { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; color: var(--accent); line-height: 1.8; }
.brand-text small { letter-spacing: 0.08em; }
.brand-text b { font-family: inherit !important; font-weight: 800 !important; letter-spacing: 0.12em !important; color: var(--accent); }
.lead { margin: 0; color: var(--ink-soft); }
.steps { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 8px; text-align: left; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.steps b { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 800 13px var(--font-display); }

/* ===== 本人確認 ===== */
.confirm { min-height: calc(100dvh - 90px); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; text-align: center; }
.confirm h1 { font-size: 22px; font-weight: 700; }
.confirm form { width: 100%; }
.confirm-photo { position: relative; margin-bottom: 8px; }
.halo { position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-3) 55%, transparent), color-mix(in srgb, var(--accent-2) 25%, transparent) 60%, transparent); animation: halo 3.2s ease-in-out infinite; }
@keyframes halo { 50% { transform: scale(1.08); opacity: .75; } }
.confirm-photo .avatar { position: relative; }

.message { margin-top: 18vh; text-align: center; display: grid; gap: 14px; justify-items: center; padding: 28px 18px; background: var(--surface); border-radius: var(--radius-l); border: 1px solid var(--line); }
.message-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font: 800 26px var(--font-display); background: var(--accent-2); color: #fff; }
.message p { margin: 0; color: var(--ink-soft); }

/* ===== ホーム ===== */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 14px; }
.hero h1 { font-size: 19px; font-weight: 700; }
.progress { position: relative; width: 112px; height: 112px; flex: none; display: grid; place-items: center; }
.progress circle { stroke-width: 7; }
.progress .bar { stroke: url(#none); stroke: var(--accent-2); stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p)); transition: stroke-dashoffset 1.6s var(--ease-out) 0.3s; }
.progress-num { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.progress-num b { font: 800 38px var(--font-display); }
.progress-num small { font-size: 10px; color: var(--ink-soft); margin-top: 4px; }


.section-head { margin-bottom: 12px; }
.section-head h2 { display: flex; gap: 6px; align-items: center; font-size: 18px; }
.section-head h2 .icon { color: var(--accent); animation: twirl 3s ease-in-out infinite; }
@keyframes twirl { 50% { transform: rotate(180deg) scale(1.2); } }
.section-head p { margin: 2px 0 0; font-size: 12px; color: var(--ink-soft); }

.rec-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 16px 16px; margin: 0 -16px;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.rec-rail::-webkit-scrollbar { display: none; }
.rec-card {
  scroll-snap-align: center; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 6px; padding: 18px;
  border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-glow);
  animation: card-in 0.9s var(--ease-spring) both; animation-delay: calc(var(--i) * 110ms + 250ms);
  transition: transform 0.3s var(--ease-out);
}
.rec-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.7) 45%, transparent 60%);
  transform: translateX(-100%); animation: sheen 5s ease-in-out infinite; animation-delay: calc(var(--i) * 0.6s + 1.2s);
}
.rec-card.grp-mcz { background: linear-gradient(160deg, color-mix(in srgb, var(--mcz) 16%, transparent), var(--surface) 55%); }
.rec-card.grp-company { background: linear-gradient(160deg, color-mix(in srgb, var(--company) 18%, transparent), var(--surface) 55%); }
@keyframes card-in { from { opacity: 0; transform: translateX(60px) rotateY(-25deg) scale(0.9); } }
@keyframes sheen { 0%, 70% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.rec-rank { position: absolute; top: 10px; right: 16px; font: 800 44px/1 var(--font-display); color: rgba(140,105,80,.1); }
.rec-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.rec-name { font-size: 19px; font-weight: 900; }
.rec-reason { font-size: 13px; color: var(--ink-soft); min-height: 4.2em; }
.rec-cta { margin-top: auto; font-weight: 700; color: var(--accent); font-size: 13px; }
.rec-cta span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(5px); } }
.rail-dots { display: flex; justify-content: center; gap: 6px; margin-top: -4px; }
.rail-dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: all 0.3s var(--ease-out); }
.rail-dots span.on { width: 20px; background: var(--accent); }

.scan-cta {
  display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 16px;
  border-radius: var(--radius-l); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: linear-gradient(120deg, rgba(255,253,249,.8), color-mix(in srgb, var(--accent-light) 50%, transparent));
}
.scan-cta b { display: block; }
.scan-cta small { color: var(--ink-soft); font-size: 12px; }
.scan-cta-icon { width: 48px; height: 48px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); animation: float 3s ease-in-out infinite; }
.scan-cta-icon .icon { width: 26px; height: 26px; }
.link-more { display: block; text-align: center; margin-top: 16px; color: var(--ink-soft); font-size: 13px; }

/* ===== プロフィール ===== */
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-soft); margin: 4px 0 8px; }
.profile-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 18px; }
.ph-photo { position: relative; margin-bottom: 8px; }
.ph-photo::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--ring-c, var(--mcz)), transparent 40%, var(--ring-c, var(--mcz)) 80%, transparent);
  animation: spin-bg 8s linear infinite; opacity: 0.7;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
}
.profile-hero.grp-company { --ring-c: var(--company); }
.ph-name { font-size: 26px; font-weight: 900; }
.ph-kana { margin: -6px 0 0; font-size: 11px; color: var(--ink-faint); }
.ph-sub { margin: 0; }
.catch { margin: 6px 0 0; font-size: 16px; font-weight: 700; color: var(--ink); padding: 0 8px; }
.ph-stamp { position: absolute; right: -26px; bottom: -6px; pointer-events: none; opacity: 0; transform: scale(2.4) rotate(-30deg); }
.is-talked .ph-stamp { opacity: 1; transform: scale(1) rotate(-14deg); }
.ph-stamp.stamping { animation: stamp-down 0.55s cubic-bezier(.5, 0, .75, 0) both, stamp-settle 0.5s var(--ease-spring) 0.55s both; }
@keyframes stamp-down { from { opacity: 0; transform: translateY(-120px) scale(2.6) rotate(-35deg); } to { opacity: 1; transform: scale(0.9) rotate(-14deg); } }
@keyframes stamp-settle { from { transform: scale(0.9) rotate(-14deg); } 40% { transform: scale(1.12) rotate(-14deg); } to { transform: scale(1) rotate(-14deg); } }

.stamp-mark { display: inline-block; }
.stamp-ring {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; position: relative;
  border: 4px double var(--stamp); color: var(--stamp);
  background: radial-gradient(circle, color-mix(in srgb, var(--stamp) 10%, transparent), color-mix(in srgb, var(--stamp) 3%, transparent));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--stamp) 22%, transparent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='r'%3E%3CfeTurbulence baseFrequency='.7' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -2.2 1.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23r)'/%3E%3C/svg%3E");
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='r'%3E%3CfeTurbulence baseFrequency='.7' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -2.2 1.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23r)'/%3E%3C/svg%3E");
}
.stamp-text { position: absolute; top: 14px; font: 800 11px var(--font-display); letter-spacing: 0.18em; }
.stamp-check { font: 800 40px/1 var(--font-display); margin-top: 10px; }
.stamp-mark.small .stamp-ring { width: 40px; height: 40px; border-width: 3px; }
.stamp-mark.small .stamp-text { display: none; }
.stamp-mark.small .stamp-check { font-size: 20px; margin: 0; }

.match-card {
  display: flex; gap: 14px; align-items: center; padding: 16px; margin-bottom: 18px;
  border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line);
}
.match-reason { margin: 4px 0 0; font-size: 14px; }

.ask h2 { display: flex; align-items: center; gap: 6px; font-size: 18px; margin-bottom: 10px; }
.ask h2 .icon { color: var(--accent); animation: twirl 3s ease-in-out infinite; }
.q-cards { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; perspective: 900px; }
.q-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border-radius: var(--radius); background: linear-gradient(135deg, rgba(255,255,255,.85), rgba(255,253,249,.5)); box-shadow: 0 6px 18px rgba(120,90,65,.08);
  border: 1px solid var(--line); transform-origin: top center;
  animation: flip-in 0.8s var(--ease-spring) both; animation-delay: calc(var(--i) * 180ms + var(--q-delay, 300ms));
}
@keyframes flip-in { from { opacity: 0; transform: rotateX(-90deg) translateY(-10px); } }
.q-no { flex: none; font: 800 13px var(--font-display); color: var(--accent-ink); background: var(--accent); border-radius: 8px; padding: 2px 8px; margin-top: 2px; }
.q-text { font-size: 15px; font-weight: 500; }

.talk-bar { position: sticky; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 10; margin: 4px 0 22px; }
.talk-btn {
  width: 100%; padding: 17px 18px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 900; font-size: 16px;
  color: #fff; background: linear-gradient(120deg, var(--stamp), var(--accent-2), var(--stamp)); background-size: 200% auto;
  animation: text-shine 3s linear infinite; box-shadow: 0 12px 30px color-mix(in srgb, var(--stamp) 35%, transparent);
  transition: transform 0.25s var(--ease-spring);
}
.talk-btn:active { transform: scale(0.95); }
.talk-btn .talk-on { display: none; }
.talk-btn.on { background: var(--surface-2); color: var(--ink-soft); box-shadow: none; border: 1px solid var(--line); animation: none; font-weight: 700; font-size: 14px; }
.talk-btn.on .talk-on { display: inline; }
.talk-btn.on .talk-off { display: none; }
@keyframes wave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }

.details { padding: 18px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); }
.details h2 { font-size: 15px; margin-bottom: 8px; color: var(--ink-soft); }
.details dl { margin: 0; display: grid; gap: 12px; }
.detail dt { font-size: 11px; color: var(--accent); font-weight: 700; }
.detail dd { margin: 2px 0 0; white-space: pre-wrap; font-size: 14px; }
.sns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0 2px; }
.sns a { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; padding: 6px 12px 6px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(120, 90, 65, 0.08); transition: transform 0.2s; }
.sns a:active { transform: scale(0.96); }
.sns a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sns-ic { width: 18px; height: 18px; flex: none; }
.sns-instagram .sns-ic { color: #c1356f; }
.sns-x .sns-ic { color: #111; }
.sns-web .sns-ic { color: var(--accent); }

/* 出会いの演出 */
.encounter {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(255,253,248,.97), rgba(236,226,211,.98));
  animation: enc-out 0.6s var(--ease-out) 2.1s forwards;
}
.encounter.done { display: none; }
.enc-ring { position: absolute; top: 45%; left: 50%; width: 160px; height: 160px; margin: -80px 0 0 -80px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ring-burst 1.6s var(--ease-out) both; }
.enc-ring.r2 { border-color: var(--accent-2); animation-delay: 0.18s; }
.enc-ring.r3 { border-color: var(--accent-3); animation-delay: 0.36s; }
@keyframes ring-burst { 0% { transform: scale(0.2); opacity: 1; } 100% { transform: scale(3.2); opacity: 0; } }
.enc-photo { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); animation: enc-photo 1s var(--ease-spring) 0.35s both; }
.enc-photo .avatar { box-shadow: 0 0 0 8px rgba(255,255,255,.8), 0 0 70px rgba(200,167,104,.7); }
@keyframes enc-photo { from { opacity: 0; transform: translate(-50%, -50%) scale(0.2); } }
.enc-text { position: absolute; top: calc(45% + 100px); left: 0; right: 0; text-align: center; display: flex; flex-direction: column; animation: rise 0.7s var(--ease-out) 0.8s both; }
.enc-text small { font: 600 13px var(--font-display); letter-spacing: 0.2em; color: var(--accent); }
.enc-text b { font-size: 24px; font-weight: 900; }
@keyframes enc-out { to { opacity: 0; visibility: hidden; transform: scale(1.08); } }
body.has-encounter .q-card { --q-delay: 2400ms; }
body.has-encounter .match-card, body.has-encounter .details { animation-delay: 2.2s; }

/* ===== 一覧 ===== */
.list-head { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 12px; }
.list-head h1 { font-size: 22px; font-weight: 900; }
.list-head p { margin: 0; font-size: 12px; color: var(--ink-soft); }
.list-head b { font: 800 18px var(--font-display); color: var(--accent); }
.filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 14px; position: sticky; top: 58px; z-index: 5; padding: 8px 0; background: linear-gradient(to bottom, var(--top-fade) 70%, rgba(239,231,218,0)); }
.seg { position: relative; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr) minmax(0, 0.8fr); min-width: 0; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: none; padding: 8px 4px; font-weight: 700; font-size: 13px; color: var(--ink-soft); cursor: pointer; transition: color 0.3s; }
.seg button small { font-size: 10px; opacity: 0.7; }
.seg button.on { color: var(--accent-ink); }
.seg-ind { position: absolute; top: 4px; bottom: 4px; left: 0; width: var(--w, 25%); transform: translateX(var(--x, 4px)); border-radius: 999px; background: var(--accent); transition: transform 0.45s var(--ease-spring), width 0.45s var(--ease-spring); }
.search { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.search input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; padding: 10px 0; outline: none; }
.search input::placeholder { color: var(--ink-faint); }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle-ui { width: 40px; height: 24px; border-radius: 12px; background: var(--track); position: relative; transition: background 0.3s; }
.toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.35s var(--ease-spring); }
.toggle input:checked + .toggle-ui { background: var(--accent-2); }
.toggle input:checked + .toggle-ui::after { transform: translateX(16px); }

.people { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.people > li { min-width: 0; }
.row {
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); transition: opacity 0.3s, transform 0.4s var(--ease-out), background 0.3s;
}
.row.is-talked { background: linear-gradient(90deg, color-mix(in srgb, var(--stamp) 9%, transparent), var(--surface) 60%); }
.row.hide { display: none; }
.row.leaving { opacity: 0; transform: translateX(40px); }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-text b { font-size: 15px; }
.row-text .sub, .row-catch { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-catch { font-size: 11px; color: var(--ink-faint); }
.row-score { font: 800 13px var(--font-display); color: var(--accent); padding: 2px 6px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.row-stamp { position: relative; width: 52px; height: 52px; flex: none; border: 1px dashed var(--line); border-radius: 50%; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.row-stamp .stamp-mark { position: absolute; opacity: 0; transform: scale(1.3) rotate(-30deg); transition: all 0.4s var(--ease-spring); }
.row-stamp-empty { font-size: 10px; color: var(--ink-faint); transition: opacity 0.2s; }
.row-stamp[data-on="1"] { border-color: transparent; }
.row-stamp[data-on="1"] .stamp-mark { opacity: 1; transform: scale(1) rotate(-14deg); }
.row-stamp[data-on="1"] .row-stamp-empty { opacity: 0; }
.row-stamp.pop .stamp-mark { animation: stamp-pop 0.5s var(--ease-spring); }
@keyframes stamp-pop { 0% { transform: scale(2.2) rotate(-40deg); opacity: 0; } 60% { transform: scale(0.85) rotate(-10deg); opacity: 1; } 100% { transform: scale(1) rotate(-14deg); } }

/* ===== スキャナ ===== */
.scan { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; margin-top: 10px; }
.scan h1 { font-size: 19px; }
.viewfinder { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--radius-l); overflow: hidden; background: #000; box-shadow: var(--shadow-glow); }
.viewfinder video { width: 100%; height: 100%; object-fit: cover; }
.vf-frame { position: absolute; inset: 16%; animation: vf-pulse 2s ease-in-out infinite; transition: inset 0.4s var(--ease-out); }
.vf-frame i { position: absolute; width: 34px; height: 34px; border: 4px solid var(--accent); border-radius: 6px; }
.vf-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.vf-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.vf-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.vf-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
@keyframes vf-pulse { 50% { transform: scale(1.05); } }
.vf-laser { position: absolute; left: 18%; right: 18%; top: 18%; height: 2px; background: linear-gradient(90deg, transparent, var(--accent-2), transparent); box-shadow: 0 0 12px var(--accent-2); animation: laser 2.2s ease-in-out infinite; }
@keyframes laser { 50% { transform: translateY(calc(var(--vf, 300px) * 0.64)); } }
.vf-check { position: absolute; inset: 0; display: grid; place-items: center; font: 800 90px var(--font-display); color: var(--accent); opacity: 0; transform: scale(0.3); }
.vf-msg { position: absolute; left: 0; right: 0; bottom: 10px; margin: 0; font-size: 12px; color: #fff; text-shadow: 0 1px 4px #000; }
.viewfinder.hit .vf-frame { inset: 30%; animation: none; }
.viewfinder.hit .vf-frame i { border-color: var(--ok); }
.viewfinder.hit .vf-laser { display: none; }
.viewfinder.hit .vf-check { animation: check-in 0.5s var(--ease-spring) forwards; }
.viewfinder.hit video { filter: brightness(0.5); transition: filter 0.3s; }
@keyframes check-in { to { opacity: 1; transform: scale(1); } }

/* ===== マイページ ===== */
.me-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin: 10px 0 18px; }
.me-card h1 { font-size: 24px; font-weight: 900; }
.me-card p { margin: 0; }
.me-card b { font: 800 22px var(--font-display); color: var(--accent); }
.my-qr { text-align: center; padding: 18px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; }
.my-qr h2 { font-size: 16px; }
.qr-box { width: 220px; margin: 10px auto 0; padding: 10px; background: #fff; border-radius: var(--radius); }
.qr-box svg { display: block; width: 100%; height: auto; }
[data-page="me"] .page > .btn, [data-page="me"] form { display: flex; justify-content: center; width: 100%; margin-top: 8px; }

/* ===== 効果 ===== */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 410; }
#toast {
  position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); z-index: 210;
  /* 出していないときは画面の外へ出して見えなくする（中身が空だと高さが小さく、少しだけ顔を出していた） */
  transform: translate(-50%, calc(-100% - 40px - env(safe-area-inset-top))); opacity: 0; visibility: hidden; pointer-events: none;
  padding: 10px 18px; border-radius: 999px; background: rgba(94,69,54,.92); color: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 700;
  transition: transform 0.5s var(--ease-spring), opacity 0.3s, visibility 0s linear 0.5s; white-space: nowrap;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform 0.5s var(--ease-spring), opacity 0.2s, visibility 0s; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* 動きを減らす設定のとき */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
  .encounter { display: none; }
  @view-transition { navigation: none; }
}
.rec-card .pill, .profile-hero .pill, .me-card .pill { align-self: center; }
.rec-card .pill { align-self: flex-start; }

/* ===== 出会いたい人・話したいこと ===== */
.setup { min-height: calc(100dvh - 90px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding-bottom: 20px; }
.setup h1 { font-size: 21px; font-weight: 700; }
.setup-photo { position: relative; margin-bottom: 4px; }
.setup-photo .avatar { position: relative; }
.setup .halo { inset: -12px; }
.pref-form { width: 100%; display: grid; gap: 12px; margin-top: 6px; }
.pref-card {
  position: relative; display: grid; grid-template-columns: 1fr; grid-template-areas: "label" "sel"; gap: 6px 10px; align-items: center;
  padding: 14px 16px 16px; border-radius: var(--radius-l); text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-glow);
  transition: transform 0.35s var(--ease-spring), border-color 0.3s;
}
.pref-card:focus-within { border-color: var(--accent); transform: translateY(-2px); }
.pref-card.picked { animation: pref-pop 0.55s var(--ease-spring); }
@keyframes pref-pop { 40% { transform: scale(1.035); } }
.pref-label { grid-area: label; font-weight: 700; font-size: 15px; }
.pref-select { grid-area: sel; position: relative; }
.pref-select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: translateY(-70%) rotate(45deg); pointer-events: none; transition: transform 0.3s var(--ease-spring); }
.pref-card:focus-within .pref-select::after { transform: translateY(-30%) rotate(-135deg); }
.pref-select select {
  width: 100%; appearance: none; -webkit-appearance: none; font: inherit; font-size: 16px; font-weight: 500; color: var(--ink);
  padding: 13px 40px 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer;
}
.pref-select select:invalid { color: var(--ink-faint); }
.pref-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 6px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 700; text-align: left; line-height: 1.35; }
.chip small { font-size: 10px; font-weight: 500; color: var(--accent); }
.my-prefs { display: grid; gap: 10px; justify-items: center; margin-bottom: 14px; }

/* ===== ぼかしから浮かび上がる文字 =====
   filter: blur は iPhone で縁にピンクの線が出るため使わない。
   文字を透明にして「ぼけた影」だけ見せ、影を消しながら文字を戻すことで同じ見え方にする */
@keyframes text-blur {
  from { color: transparent; text-shadow: 0 0 16px var(--blur-c, var(--ink)), 0 0 4px var(--blur-c, var(--ink)); }
  70% { text-shadow: 0 0 2px transparent; }
}
.kv-org, .kv-date, .lead, .confirm h1, .setup h1, .hero h1, .section-head h2, .section-head p,
.ph-name, .ph-sub, .catch, .list-head h1, .me-card h1, .enc-text b, .q-text, .rec-name {
  animation: text-blur 1.1s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 70ms + 120ms);
}
.kv-org, .kv-date { --blur-c: var(--accent); }
.lead, .section-head p, .ph-sub { --blur-c: var(--ink-soft); }
/* 見出しの一文字ずつ：上がる動きとぼかしを重ねる */
.kv-title span { --blur-c: var(--accent); animation-name: kv-char, text-blur; animation-duration: 1.2s; }
/* 出会いの演出の名前・質問カード・おすすめの名前は、それぞれの出るタイミングに合わせる */
.enc-text b { animation-delay: 0.9s; }
.q-text { animation-delay: calc(var(--i) * 180ms + var(--q-delay, 300ms) + 150ms); }
.rec-name { animation-delay: calc(var(--i) * 110ms + 450ms); }

/* MIRAI CREATOR'Z の表記 */
.mcz-name { font-family: var(--font-din); font-weight: 700; letter-spacing: 0.04em; }
.pill.mcz-name { font-size: 11px; letter-spacing: 0.06em; }
.seg .mcz-name { font-size: 12px; white-space: nowrap; }

/* ===== 確認のシート（一覧のスタンプ） ===== */
.sheet-wrap {
  position: fixed; inset: 0; z-index: 160; display: flex; align-items: flex-end; justify-content: center;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(79, 58, 45, 0); transition: background 0.3s;
}
.sheet-wrap.open { background: rgba(79, 58, 45, 0.28); }
.sheet {
  width: min(480px, 100%); padding: 22px 20px 16px; border-radius: var(--radius-l);
  background: #fffcf7; border: 1px solid var(--line); box-shadow: 0 -10px 40px rgba(94, 69, 54, 0.18);
  transform: translateY(110%); transition: transform 0.4s var(--ease-spring);
}
.sheet-wrap.open .sheet { transform: none; }
.sheet-title { margin: 0; font-size: 17px; font-weight: 700; text-wrap: balance; }
.sheet-body { margin: 6px 0 16px; font-size: 13px; color: var(--ink-soft); }
.sheet-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.sheet-actions .btn { padding: 13px 12px; }

/* ===== 会場の盛り上がり ===== */
.venue { display: flex; align-items: center; gap: 10px; margin: -2px 0 20px; padding: 10px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); width: fit-content; }
.venue b { font: 600 18px var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; display: inline-block; min-width: 1.2em; text-align: center; }
.venue b.bump { animation: venue-bump 0.7s var(--ease-spring); }
@keyframes venue-bump { 40% { transform: translateY(-4px) scale(1.35); color: var(--stamp); } }
.venue-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--stamp); flex: none; }
.venue-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--stamp); opacity: 0; animation: pulse-ring 2s var(--ease-out) infinite; }

/* ===== 今日の出会いへの入口 ===== */
.recap-cta { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); }
.recap-cta b { display: block; }
.recap-cta small { color: var(--ink-soft); font-size: 12px; }
.recap-faces { width: 44px; height: 44px; flex: none; border-radius: 14px; background: radial-gradient(circle at 30% 35%, var(--mcz) 0 7px, transparent 8px), radial-gradient(circle at 68% 40%, var(--company) 0 7px, transparent 8px), radial-gradient(circle at 48% 70%, var(--accent-3) 0 7px, transparent 8px), var(--accent-light); }

/* ===== 共通点 ===== */
.common { margin: -4px 0 18px; text-align: center; }
.common-head { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); }
.common ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.common li { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; background: linear-gradient(120deg, #fffaf2, var(--accent-light)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); animation: common-pop 0.7s var(--ease-spring) both; animation-delay: calc(var(--i) * 140ms + var(--c-delay, 500ms)); }
@keyframes common-pop { from { opacity: 0; transform: translateY(10px) scale(0.6); } }
body.has-encounter .common li { --c-delay: 2300ms; }
.mutual-mark { margin: 6px 0 0; font-size: 12px; font-weight: 700; color: var(--ok); }
.mutual-mark::before { content: ""; display: inline-block; width: 18px; height: 2px; margin: 0 6px 4px 0; vertical-align: middle; background: linear-gradient(90deg, var(--mcz), var(--company)); border-radius: 2px; }

/* ===== つながった（読み合い）の演出 ===== */
.encounter.connect { animation-delay: 2.8s; }
body.has-connect .q-card { --q-delay: 3100ms; }
body.has-connect .common li { --c-delay: 3000ms; }
body.has-connect .match-card, body.has-connect .details { animation-delay: 2.9s; }
.cn-photo { position: absolute; top: 42%; left: 50%; animation: cn-in 1s var(--ease-spring) both; }
.cn-photo .avatar { box-shadow: 0 0 0 6px rgba(255,255,255,.85), 0 10px 40px var(--glow); }
.cn-me { --from: -60vw; --to: calc(-50% - 62px); animation-delay: 0.1s; }
.cn-you { --from: 60vw; --to: calc(-50% + 62px); animation-delay: 0.25s; }
.cn-photo { transform: translate(var(--to), -50%); }
@keyframes cn-in { from { transform: translate(var(--from), -50%) scale(0.6); opacity: 0; } 70% { transform: translate(var(--to), -50%) scale(1.08); } }
.cn-line { position: absolute; top: 42%; left: 50%; width: 124px; height: 3px; margin-left: -62px; border-radius: 3px; background: linear-gradient(90deg, var(--mcz), var(--accent-3), var(--company)); transform-origin: center; animation: cn-line 0.6s var(--ease-out) 1s both; box-shadow: 0 0 18px rgba(200,167,104,.8); }
@keyframes cn-line { from { transform: scaleX(0); opacity: 0; } }
.cn-spark { position: absolute; top: 42%; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: radial-gradient(closest-side, #fff, rgba(255,240,200,.7), transparent); animation: cn-spark 1.2s var(--ease-out) 1.2s both; }
@keyframes cn-spark { 0% { transform: scale(0); opacity: 0; } 30% { transform: scale(4); opacity: 1; } 100% { transform: scale(9); opacity: 0; } }
.cn-text { top: calc(42% + 80px); animation-delay: 1.4s; }
.cn-text em { font-style: normal; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

/* ===== 今日の出会い ===== */
.recap { display: grid; gap: 10px; margin-top: 6px; }
.recap-card { position: relative; overflow: hidden; padding: 26px 18px 22px; border-radius: 28px; text-align: center; background: linear-gradient(170deg, #fffdf8, #f4ebdf); border: 1px solid var(--line); box-shadow: var(--shadow-glow); }
.recap-card::before { content: ""; position: absolute; left: -40%; top: -10%; width: 180%; height: 40%; transform: rotate(-20deg); background: radial-gradient(50% 50% at 50% 50%, rgba(255,255,255,.9), transparent 70%); animation: ray 10s ease-in-out infinite alternate; pointer-events: none; }
.recap-org { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); }
.recap-event { margin: 2px 0 0; font-size: 15px; font-weight: 900; letter-spacing: 0.2em; color: var(--accent); }
.recap-title { margin: 14px 0 12px; font-size: 26px; font-weight: 900; letter-spacing: 0.08em; }
.recap-me { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.recap-me b { font-size: 15px; }
.recap-count { margin: 10px 0 16px; display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.recap-count b { font: 600 46px/1 var(--font-display); color: var(--accent); }
.recap-count span { font-size: 14px; color: var(--ink-soft); }
.recap-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, 76px); justify-content: center; gap: 14px 8px; }
.recap-grid li { animation: recap-in 0.7s var(--ease-spring) both; animation-delay: calc(var(--i) * 120ms + 700ms); }
@keyframes recap-in { from { opacity: 0; transform: translateY(16px) scale(0.5); } }
.recap-grid a { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.recap-face { position: relative; }
.recap-stamp { position: absolute; right: -10px; bottom: -6px; transform: rotate(-14deg) scale(0.8); animation: stamp-pop 0.5s var(--ease-spring) both; animation-delay: calc(var(--i) * 120ms + 1000ms); }
.recap-name { font-size: 11px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recap-foot { margin: 18px 0 0; font: 500 12px var(--font-display); letter-spacing: 0.16em; color: var(--ink-soft); }

/* ===== 全画面のお知らせ（スタンプが届いた・つながった） ===== */
.burst { position: fixed; inset: 0; z-index: 400; isolation: isolate; transform: translateZ(0); display: grid; place-items: center; padding: 24px; overflow: hidden; animation: fade-in .25s both; }
.burst.out { animation: fade-out .4s both; }
.burst-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, #fffaf1 0%, #f6ecdf 45%, #ead9c5 100%); }
.burst .sun {
  position: absolute; left: 50%; top: 42%; width: 240vmax; height: 240vmax; margin: -120vmax 0 0 -120vmax; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(200,167,104,.28) 0 6deg, transparent 6deg 15deg);
  -webkit-mask: radial-gradient(closest-side, #000 8%, transparent 70%); mask: radial-gradient(closest-side, #000 8%, transparent 70%);
  animation: sun-in .9s var(--ease-out) both, sun-spin 18s linear infinite;
}
@keyframes sun-in { from { transform: scale(.2) rotate(-40deg); opacity: 0; } }
@keyframes sun-spin { to { transform: rotate(360deg); } }
.burst .ring { position: absolute; left: 50%; top: 42%; width: 200px; height: 200px; margin: -100px 0 0 -100px; border-radius: 50%; border: 3px solid var(--accent-3); opacity: 0; }
.burst.impact .ring { animation: ring-burst 1.4s var(--ease-out) both; }
.burst.impact .ring.r2 { border-color: var(--stamp); animation-delay: .12s; }
.burst.impact .ring.r3 { border-color: var(--accent-2); animation-delay: .24s; }
.burst-body { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; width: min(440px, 100%); }
.burst.impact .burst-body { animation: shake .5s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(5px, -3px); } 30%, 50%, 70% { transform: translate(-9px, 4px) rotate(-1deg); } 40%, 60% { transform: translate(9px, -4px) rotate(1deg); } }
.burst-kicker { margin: 0 0 6px; font: 600 clamp(44px, 15vw, 72px)/1 var(--font-display); letter-spacing: .08em; color: var(--stamp); animation: kicker-in .7s var(--ease-spring) both .1s; }
.burst.connect .burst-kicker { color: var(--accent); font-size: clamp(36px, 11vw, 56px); }
@keyframes kicker-in { from { transform: scale(2.6); opacity: 0; letter-spacing: .5em; } }
.burst-face { position: relative; margin: 6px 0 10px; }
.burst-face .avatar { width: 190px; height: 190px; font-size: 56px; box-shadow: 0 0 0 8px #fff, 0 20px 60px rgba(94,69,54,.3); animation: face-in .8s var(--ease-spring) both .2s; }
@keyframes face-in { from { transform: scale(.2) rotate(-12deg); opacity: 0; } }
.burst-stamp { position: absolute; right: -38px; bottom: -22px; opacity: 0; transform: translateY(-60vh) scale(3.2) rotate(-40deg); }
.burst-stamp .stamp-ring { width: 128px; height: 128px; border-width: 5px; background: radial-gradient(circle, rgba(255,250,244,.92), rgba(255,240,232,.85)); }
.burst-stamp .stamp-text { top: 20px; font-size: 14px; }
.burst-stamp .stamp-check { font-size: 58px; margin-top: 14px; }
.burst .burst-stamp { animation: slam .62s cubic-bezier(.55,0,.8,.2) .2s forwards, slam-settle .45s var(--ease-spring) .82s forwards; }
@keyframes slam { to { opacity: 1; transform: translateY(0) scale(.86) rotate(-14deg); } }
@keyframes slam-settle { from { transform: scale(.86) rotate(-14deg); opacity: 1; } 45% { transform: scale(1.12) rotate(-14deg); opacity: 1; } to { transform: scale(1) rotate(-14deg); opacity: 1; } }
.burst-pair { position: relative; display: flex; align-items: center; gap: 0; margin: 8px 0 12px; }
.burst-pair .avatar { width: 136px; height: 136px; font-size: 40px; box-shadow: 0 0 0 7px #fff, 0 18px 50px rgba(94,69,54,.28); }
.burst-pair .b-me { animation: pair-l .9s var(--ease-spring) .15s both; }
.burst-pair .b-you { animation: pair-r .9s var(--ease-spring) .3s both; }
@keyframes pair-l { from { transform: translateX(-80vw) scale(.5); } }
@keyframes pair-r { from { transform: translateX(80vw) scale(.5); } }
.b-link { width: 70px; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--mcz), var(--accent-3), var(--company)); box-shadow: 0 0 22px rgba(200,167,104,.9); transform: scaleX(0); animation: link-in .4s var(--ease-out) .95s forwards; }
@keyframes link-in { to { transform: scaleX(1); } }
.burst-name { margin: 6px 0 0; font-size: 26px; font-weight: 900; animation: rise .7s var(--ease-out) both 1s; }
.burst-name span { font-size: 16px; font-weight: 700; margin-left: 4px; color: var(--ink-soft); }
.burst-msg { margin: 0; font-size: 22px; font-weight: 900; color: var(--accent); animation: rise .7s var(--ease-out) both 1.12s; }
.burst-sub { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); animation: rise .7s var(--ease-out) both 1.24s; }
.burst-actions { display: flex; gap: 10px; margin-top: 18px; animation: rise .7s var(--ease-out) both 1.4s; }
@media (prefers-reduced-motion: reduce) { .burst-stamp { opacity: 1; transform: rotate(-14deg); } }

/* ===== AIのおすすめ準備中 ===== */
.ai-wait { display: flex; align-items: center; gap: 12px; margin: -4px 0 14px; padding: 12px 14px; border-radius: var(--radius); background: linear-gradient(120deg, #fffaf2, var(--accent-light)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.ai-wait b { display: block; font-size: 13px; }
.ai-wait small { font-size: 11px; color: var(--ink-soft); }
.ai-dots { display: flex; gap: 4px; flex: none; }
.ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: ai-dot 1.2s ease-in-out infinite; }
.ai-dots i:nth-child(2) { animation-delay: .15s; }
.ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-6px); opacity: 1; } }

/* ===== 企業の方のプロフィール入力 ===== */
.pf { display: grid; gap: 10px; padding-top: 6px; }
.pf h1 { font-size: 21px; font-weight: 700; }
.pf .lead { font-size: 13px; }
.pf-form { display: grid; gap: 14px; padding: 18px 16px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); }
.pf-field { display: grid; gap: 4px; }
.pf-label { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.pf-label em { font-style: normal; font-size: 10px; padding: 1px 6px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); }
.pf-hint { font-size: 11px; color: var(--ink-soft); }
.pf-field input, .pf-field textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.pf-field textarea { resize: vertical; min-height: 90px; }
.pf-field input:focus, .pf-field textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.pf-actions { display: grid; gap: 6px; justify-items: center; }
.pf-actions .status { font-size: 12px; color: var(--ink-soft); }
.photo-edit { display: flex; gap: 14px; align-items: center; }
.crop { position: relative; width: 112px; height: 112px; flex: none; border-radius: 50%; overflow: hidden; background: var(--surface-2); border: 1px dashed var(--line); display: grid; place-items: center; touch-action: none; cursor: grab; }
.crop img, .crop canvas { width: 100%; height: 100%; object-fit: cover; }
.crop-empty { font-size: 11px; color: var(--ink-faint); }
.crop-ctl { display: grid; gap: 8px; min-width: 0; }
.crop-ctl .btn { padding: 9px 14px; font-size: 13px; }
.crop-ctl input[type=range] { width: 100%; accent-color: var(--accent); }

/* ===== ホーム画面に追加の案内 ===== */
.a2hs { display: flex; align-items: center; gap: 10px; margin: -6px 0 14px; padding: 10px 10px 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); }
.a2hs div { flex: 1; min-width: 0; }
.a2hs b { display: block; font-size: 12px; }
.a2hs small { display: block; font-size: 11px; color: var(--ink-soft); line-height: 1.5; }
.a2hs small b { display: inline; font-size: inherit; color: var(--ink); }
.a2hs .btn { padding: 7px 14px; font-size: 12px; }
.a2hs button { border: 0; background: none; font-size: 18px; color: var(--ink-faint); padding: 4px 6px; cursor: pointer; }
/* 「ホーム画面に追加」の案内の共有ボタンの絵（文字の高さに収める） */
.share-ico { display: inline-block; width: .8em; height: 1em; vertical-align: -.15em; margin: 0 1px; }

/* iPhone のブラウザで本人確認を開いたときの App Clip の案内（app.js）。App Clip を主役にして、ブラウザで続けるのは小さなリンクに */
.clip-hint { width: 100%; text-align: center; padding: 18px 18px 16px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 22%, transparent); display: grid; gap: 10px; justify-items: center; }
.clip-hint[hidden] { display: none; }
.clip-hint > b { font-size: 19px; line-height: 1.5; font-weight: 900; color: var(--ink); text-wrap: balance; word-break: keep-all; }
.clip-hint p { font-size: 13px; line-height: 1.7; color: var(--ink-soft); margin: 0; }
.clip-hint small { font-size: 12px; color: var(--ink-faint); line-height: 1.6; }
.clip-hint small b { color: var(--ink-soft); }
.clip-hint .btn { width: 100%; }
.clip-pill { display: inline-block; margin: 0 4px; padding: 1px 14px; border-radius: 999px; background: #1a7cf5; color: #fff; font-size: 16px; font-weight: 800; vertical-align: 1px; }
.clip-up { font-size: 34px; font-weight: 900; line-height: 1; color: var(--accent); animation: clip-up 1.2s ease-in-out infinite; }
@keyframes clip-up { 0%, 100% { transform: translateY(4px); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .clip-up { animation: none; } }
.confirm.clip-first { justify-content: flex-start; gap: 10px; padding-top: 4px; }
.confirm.clip-first .confirm-photo { zoom: .45; margin-bottom: 0; }
.confirm.clip-first .eyebrow, .confirm.clip-first .sub-c { display: none; }
.confirm.clip-first h1 { font-size: 17px; }
.confirm.clip-first h1 .name-lg { font-size: 1.15em; }
.btn-text { width: 100%; background: none; border: 0; padding: 10px; font: inherit; font-size: 13px; color: var(--ink-faint); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ===== プライバシーポリシー ===== */
.policy { display: grid; gap: 10px; padding: 10px 2px 30px; }
.policy h1 { font-size: 22px; font-weight: 900; }
.policy h2 { font-size: 15px; margin-top: 10px; color: var(--accent); }
.policy p, .policy li { font-size: 14px; }
.policy ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }

/* ===== スマホの傾きに合わせて少し動く（アプリ・App Clip のときだけ。html.tilt と --tx / --ty は app.js） ===== */
.tilt .ph-photo { translate: calc(var(--tx, 0) * 12px) calc(var(--ty, 0) * 9px); transition: translate 0.25s linear; }
.tilt .recap-card { transform: perspective(900px) rotateX(calc(var(--ty, 0) * -6deg)) rotateY(calc(var(--tx, 0) * 7deg)); transition: transform 0.25s linear; }
.tilt .recap-card::before { translate: calc(var(--tx, 0) * 60px) calc(var(--ty, 0) * 40px); }
.tilt .rec-card { transition: transform 0.25s linear; }
.tilt .rec-card .avatar { translate: calc(var(--tx, 0) * 6px) calc(var(--ty, 0) * 5px); transition: translate 0.25s linear; }
@media (prefers-reduced-motion: reduce) {
  .tilt .ph-photo, .tilt .recap-card, .tilt .rec-card .avatar { translate: none; transform: none; }
}
.confirm.clip-first > a.btn-ghost { font-size: 12px; padding: 6px 18px; }

/* App Clip・アプリで名札の URL から開いたときの「◯◯さんですか？」（トップの上に下から出す。app.js） */
.me-sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; background: rgb(30 20 10 / 0); transition: background .3s ease; }
.me-sheet[hidden] { display: none; }
.me-sheet.open { background: rgb(30 20 10 / .35); }
.me-sheet-card { width: 100%; display: grid; justify-items: center; gap: 12px; text-align: center; padding: 22px 22px calc(22px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--bg, #efe7da); box-shadow: 0 -10px 40px rgb(0 0 0 / .18); transform: translateY(105%); transition: transform .45s cubic-bezier(.2, .9, .25, 1); }
.me-sheet.open .me-sheet-card { transform: none; }
.me-sheet-who { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; }
.me-sheet-who > div { min-width: 0; }
.me-sheet-card h2 { font-size: 18px; font-weight: 700; line-height: 1.4; }
.me-sheet-card .eyebrow { margin: 0 0 2px; }
.me-sheet-card .sub-c { font-size: 12px; color: var(--ink-soft); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-sheet-card .btn-ghost { padding: 8px 20px; font-size: 13px; }
/* シートを出すときは大きな「2」を省いて、「何ができるか」の手順がシートの上に見えるようにする */
.welcome.has-confirm .welcome-badge, .welcome.has-confirm .kv-date, .welcome.has-confirm > a.btn, .welcome.has-confirm > .note { display: none; }
.me-sheet-card form { width: 100%; }
@media (prefers-reduced-motion: reduce) { .me-sheet, .me-sheet-card { transition: none; } }
.welcome.has-confirm { min-height: 0; justify-content: flex-start; padding-top: 18px; }

/* 参加者一覧の「オンライン」（名札の QR でログイン中の人） */
.list-head { flex-wrap: wrap; row-gap: 2px; }
.list-head .online-sum { flex-basis: 100%; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.online-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #2fb36a; box-shadow: 0 0 0 2px rgb(47 179 106 / .2); }
.online-sum .online-dot { animation: online-pulse 2.4s ease-in-out infinite; }
@keyframes online-pulse { 50% { box-shadow: 0 0 0 5px rgb(47 179 106 / 0); } }
.av-wrap { position: relative; display: inline-flex; flex: none; }
.online-dot.on-avatar { position: absolute; right: 0; bottom: 1px; width: 12px; height: 12px; box-shadow: 0 0 0 2px var(--bg, #efe7da); }
.online-tag { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; color: #1f8a50; vertical-align: 1px; }
.toggles { display: flex; flex-wrap: wrap; gap: 10px 18px; }
@media (prefers-reduced-motion: reduce) { .online-sum .online-dot { animation: none; } }

/* ===== 企業：若者とのかかわり方（いくつでも） ===== */
.pf-checks { border: 0; margin: 0; padding: 0; min-width: 0; }
.pf-checks legend { padding: 0; margin-bottom: 2px; }
.check-row { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; line-height: 1.45; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.check-row:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }
.pf-field .check-row input { width: 20px; height: 20px; padding: 0; margin: 0; accent-color: var(--accent); }
.involve-list { margin: 0; padding-left: 1.2em; display: grid; gap: 2px; }
