/* 백년극장 — 시니어(50~70대)용 화면.
   2026-11-24: NODO 디자인 토큰(theme/nodo-tokens.css)을 깔았다. 이 파일은 꾸러미 이름만 쓴다 — 색 --bg · --surface · --surface-sunken · --line · --text · --text-2 ·
   --ink(주 버튼) · --accent(링크·선택·포커스) · --ok/--warn/--danger, 굵기 --fw-*, 간격 --sp-*, 모서리 --radius-*, 그림자 --shadow-2(떠 있는 것만).
   색 값은 theme/baeknyeon.css 한 곳에 있다(극장 커튼 붉은색 · 따뜻한 종이색 바탕 그대로).
   시니어 예외(DESIGN.md): 글자는 꾸러미 12~24px 대신 아래 앱 단계 --f-*(본문 19px)를 쓰고 --ts 로 한 번에 키운다. 누르는 곳은 --tap(58px). */
:root {
  --sidebar-w: 360px;
  --nav-h: calc(78px * var(--ts));
  --ts: 1;
  /* 글자 단계 — font-size 는 이 이름만 쓴다 */
  --f-2xs: calc(14px * var(--ts));
  --f-xs: calc(15px * var(--ts));
  --f-sm: calc(17px * var(--ts));
  --f-md: calc(19px * var(--ts));
  --f-lg: calc(22px * var(--ts));
  --f-xl: calc(28px * var(--ts));
  --f-2xl: calc(36px * var(--ts));
  --f-3xl: calc(44px * var(--ts));
  --tap: calc(58px * var(--ts));
}
:root[data-text='lg'] { --ts: 1.15; }
:root[data-text='xl'] { --ts: 1.3; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: var(--f-md); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow: hidden; word-break: keep-all; overflow-wrap: anywhere; }
/* 꾸러미의 기본 글자(문단 15px · 작은 글 13px · 제목)는 시니어 화면에 작다 — 문단·작은 글은 둘레 글자를 따르고, 제목은 아래 단계를 쓴다 */
:where(p) { font: inherit; color: inherit; }
:where(small) { font-size: var(--f-xs); font-weight: inherit; line-height: inherit; color: inherit; }
:where(h1, h2, h3, h4) { font-family: inherit; font-weight: var(--fw-bold); line-height: 1.3; color: inherit; }
b, strong { font-weight: var(--fw-bold); }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
h2 { font-size: var(--f-xl); margin: 0; }
h3 { font-size: var(--f-lg); margin: 0; }
.muted { color: var(--text-2); }

html:not([data-ready]) .app { visibility: hidden; } /* 로그인·가입 중에는 뒤 화면을 숨긴다 */

/* ---------- 버튼: 주 버튼은 잉크 채움 하나, 보조는 회색 채움 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: var(--tap); padding: var(--sp-3) var(--sp-5); border-radius: var(--radius-md); background: var(--ink); color: var(--on-ink); font-weight: var(--fw-semibold); font-size: var(--f-md); line-height: 1.25; text-align: center; transition: transform .12s, filter .12s; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn--ghost, .btn--soft { background: var(--surface-sunken); color: var(--text); }
.btn--danger { background: var(--danger-fill); color: var(--on-danger); }
.btn--small { min-height: calc(48px * var(--ts)); padding: var(--sp-2) var(--sp-4); font-size: var(--f-sm); white-space: nowrap; }
.btn--xl { min-height: calc(68px * var(--ts)); font-size: var(--f-lg); }
.btn--block { width: 100%; }
.icon-btn { min-width: 48px; min-height: 48px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1); padding: 0 var(--sp-3); background: var(--surface-sunken); color: var(--text); font-weight: var(--fw-semibold); font-size: var(--f-sm); }
.icon-btn--soft { background: transparent; color: var(--text-2); }

/* ---------- 큰 틀 ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); height: 100dvh; }
.main { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; }
.view--page { overflow-y: auto; padding: var(--sp-6) clamp(var(--sp-4), 4vw, var(--sp-10)) var(--sp-10); }
.page-body { max-width: 720px; display: grid; gap: var(--sp-2); }
.view-head { margin-bottom: var(--sp-4); display: grid; gap: var(--sp-1); }
.view-head h2 .muted { font-size: var(--f-md); font-weight: var(--fw-medium); }

.net-banner, .demo-banner { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); padding: var(--sp-2) var(--sp-4); font-size: var(--f-sm); }
.net-banner { background: var(--text); color: var(--bg); }
.demo-banner { background: var(--warn-soft); border-bottom: 1px solid var(--warn-line); }
.demo-banner__text { flex: 1 1 200px; }
.demo-banner__short { display: none; }

/* 화면 바꾸기: 넓은 화면은 위쪽 탭, 휴대폰은 아래쪽 큰 탭 */
.mainnav { flex: none; display: flex; gap: var(--sp-1); padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--line); background: var(--surface); overflow-x: auto; }
.nav__item { position: relative; flex: none; display: inline-flex; align-items: center; gap: var(--sp-2); min-height: calc(52px * var(--ts)); padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-md); font-weight: var(--fw-semibold); font-size: var(--f-sm); color: var(--text-2); }
.nav__item[aria-current='true'] { background: var(--accent-soft); color: var(--accent); }
.nav__item--mobile, .nav__short { display: none; }
.nav__badge { min-width: 26px; min-height: 26px; padding: 0 var(--sp-1); border-radius: var(--radius-pill); background: var(--danger-fill); color: var(--on-danger); font-size: var(--f-xs); line-height: 1.2; display: inline-grid; place-items: center; }

/* ---------- 왼쪽 목록 ---------- */
.sidebar { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--bg); }
.sidebar__head { min-height: 92px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); background: var(--surface); color: var(--text); border-bottom: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: var(--sp-3); font-weight: var(--fw-bold); font-size: var(--f-lg); color: var(--text); min-height: 56px; min-width: 0; }
.me span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me__avatar { width: 52px; height: 52px; flex: none; border-radius: var(--radius-pill); background: var(--surface-sunken) center/cover; }
.head-btn { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 52px; padding: var(--sp-1) var(--sp-4); border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--text); font-weight: var(--fw-semibold); font-size: var(--f-xs); }
.tabs { display: flex; gap: var(--sp-5); padding: var(--sp-4) var(--sp-5) 0; flex: none; }
.tab { min-height: 52px; min-width: 44px; font-size: var(--f-md); font-weight: var(--fw-semibold); padding: 0 var(--sp-1) var(--sp-2); color: var(--text-2); border-bottom: 3px solid transparent; }
.tab[aria-selected='true'] { color: var(--text); border-bottom-color: var(--accent); }
.tab .count { display: inline-grid; place-items: center; min-width: 26px; min-height: 26px; border-radius: var(--radius-pill); background: var(--danger-fill); color: var(--on-danger); font-size: var(--f-xs); line-height: 1.2; padding: 0 var(--sp-1); }
.tab--mobile { display: none; }
.sidebar__body { flex: 1; overflow-y: auto; padding: var(--sp-4) var(--sp-4) var(--sp-6); }
.sidebar__hint { font-size: var(--f-xs); margin: var(--sp-3) var(--sp-1) 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.thumb { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-sunken) center/cover; text-align: left; color: var(--photo-ink); }
/* 사진 위 글자를 읽히게 하는 아래쪽 그늘(작은 사진 · 한눈에 보기 사진이 같이 쓴다) */
.thumb::after, .btile__photo::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, var(--photo-scrim)); }
.thumb__name { position: absolute; left: var(--sp-3); right: var(--sp-3); bottom: var(--sp-2); z-index: 1; font-size: var(--f-md); font-weight: var(--fw-bold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb__tag { position: absolute; left: var(--sp-2); top: var(--sp-2); z-index: 1; padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-sm); background: var(--photo-chip); color: var(--photo-chip-ink); font-size: var(--f-2xs); font-weight: var(--fw-semibold); }
.thumb--likes { display: grid; place-content: center; gap: var(--sp-1); background: var(--surface-sunken); color: var(--text); font-weight: var(--fw-semibold); text-align: center; padding: var(--sp-3); font-size: var(--f-sm); }
.thumb--likes b { font-size: var(--f-xl); color: var(--accent); }
.thumb--likes::after { display: none; }
.dot { position: absolute; top: var(--sp-2); right: var(--sp-2); z-index: 1; width: 22px; height: 22px; border-radius: var(--radius-pill); background: var(--danger-fill); border: 3px solid var(--surface); }
.convos { list-style: none; margin: 0; padding: 0; display: grid; }
.convo { display: flex; gap: var(--sp-4); align-items: center; width: 100%; padding: var(--sp-3) var(--sp-2); border-radius: var(--radius-md); text-align: left; min-height: 84px; }
.convos li + li { border-top: 1px solid var(--line); }
.convo:hover, .convo[aria-current='true'] { background: var(--accent-soft); }
.convo__avatar { width: 64px; height: 64px; flex: none; border-radius: var(--radius-pill); background: var(--surface-sunken) center/cover; position: relative; }
.convo__avatar .dot { top: 0; right: 0; }
.convo__text { min-width: 0; display: grid; gap: var(--sp-1); }
.convo__name { font-weight: var(--fw-bold); font-size: var(--f-md); display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); }
.convo__last { color: var(--text-2); font-size: var(--f-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.your-turn { padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-sm); background: var(--ink); color: var(--on-ink); font-size: var(--f-2xs); font-weight: var(--fw-semibold); }
.empty-note { color: var(--text-2); font-size: var(--f-md); text-align: center; padding: var(--sp-8) var(--sp-3); line-height: 1.6; display: grid; gap: var(--sp-4); justify-items: center; }
.empty-note b { color: var(--text); }

/* ---------- 추천 카드 ---------- */
.view--recs { position: relative; display: flex; flex-direction: column; align-items: center; padding: var(--sp-3) var(--sp-4) var(--sp-4); gap: var(--sp-3); overflow: hidden; }
.recs-tools { flex: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; }
@media (min-width: 901px) { .recs-tools [data-tool=explore], .recs-tools [data-tool=help] { display: none; } }
.explore-chip { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); padding: var(--sp-1) var(--sp-2) var(--sp-1) var(--sp-4); border-radius: var(--radius-lg); background: var(--surface-sunken); font-size: var(--f-sm); font-weight: var(--fw-semibold); }
.deck { position: relative; flex: 1; min-height: 300px; width: min(460px, 100%); container-type: size; }
/* 카드가 낮으면(휴대폰·큰 글씨) 카드 앞면 정보를 줄인다. 자세한 내용은 「자세히」에서 본다. */
@container (max-height: 520px) { .card__info .card__meta--job, .card__info .reasons li:nth-child(n+2) { display: none; } }
@container (max-height: 430px) { .card__info .card__chips { display: none; } .card__info { padding-top: 50px; } }
@container (max-height: 360px) { .card__info .reasons { display: none; } }
.card { position: absolute; inset: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--photo-bg); box-shadow: var(--shadow-2); touch-action: none; user-select: none; will-change: transform; transform-origin: 50% 90%; color: var(--photo-ink); }
.card--behind { transform: scale(.95) translateY(10px); filter: brightness(.7); transition: transform .25s, filter .25s; }
.card--settle { transition: transform .32s cubic-bezier(.2,.9,.3,1.2); }
.card--fly { transition: transform .38s ease-in; }
.card__photo { position: absolute; inset: 0; background: center/cover no-repeat; }
.card__bars { position: absolute; top: var(--sp-3); left: var(--sp-3); right: var(--sp-3); display: flex; gap: var(--sp-1); z-index: 2; }
.card__bar { flex: 1; height: 5px; border-radius: var(--radius-pill); background: var(--photo-dim); }
.card__bar--on { background: var(--photo-ink); }
.card__tap { position: absolute; top: 0; bottom: 45%; width: 50%; z-index: 1; }
.card__tap--prev { left: 0; }
.card__tap--next { right: 0; }
.card__badges { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.btile__photo .card__badges { position: absolute; top: var(--sp-3); left: var(--sp-3); margin: 0; }
.badge-synthetic, .badge-art { display: inline-flex; align-items: center; padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-sm); font-size: var(--f-xs); font-weight: var(--fw-semibold); line-height: 1.3; }
.badge-synthetic { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-line); }
.badge-art { background: var(--surface-sunken); color: var(--text-2); border: 1px solid var(--line-strong); }
/* 카드 사진 위 이름·정보를 읽히게 하는 그늘 */
.card__info { position: absolute; left: 0; right: 0; bottom: 0; padding: 90px var(--sp-4) var(--sp-4); background: linear-gradient(transparent, var(--photo-scrim) 38%); z-index: 2; display: grid; gap: var(--sp-2); }
.card__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-3); }
.card__name { font-size: var(--f-2xl); font-weight: var(--fw-bold); line-height: 1.15; }
.card__age { font-size: var(--f-xl); font-weight: var(--fw-medium); }
.card__meta { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--f-sm); }
.card__meta svg { flex: none; }
.card__info .card__meta { color: var(--photo-ink); }
.card__chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.goal-chip { display: inline-flex; align-items: center; gap: var(--sp-1); padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-pill); background: var(--photo-chip); color: var(--photo-chip-ink); font-size: var(--f-xs); font-weight: var(--fw-semibold); }
.reasons { border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-4); background: var(--surface-sunken); color: var(--text); display: grid; gap: var(--sp-1); }
.reasons__title { font-size: var(--f-xs); color: var(--text-2); font-weight: var(--fw-semibold); }
.reasons ul { margin: 0; padding-left: 1.1em; display: grid; gap: 2px; font-size: var(--f-sm); font-weight: var(--fw-medium); }
.card__info .reasons { background: var(--photo-chip); color: var(--photo-chip-ink); }
.card__info .reasons__title { color: var(--photo-chip-ink); }
.card__open { position: absolute; right: var(--sp-3); top: var(--sp-6); min-height: 48px; padding: 0 var(--sp-4); border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: var(--sp-1); background: var(--photo-shade); color: var(--photo-ink); font-weight: var(--fw-semibold); font-size: var(--f-xs); z-index: 3; }
.stamp { position: absolute; top: 70px; z-index: 4; padding: var(--sp-1) var(--sp-4); border: 5px solid; border-radius: var(--radius-md); font-size: var(--f-2xl); font-weight: var(--fw-bold); opacity: 0; pointer-events: none; background: var(--surface); }
.stamp--like { left: var(--sp-5); color: var(--ok); transform: rotate(-14deg); }
.stamp--nope { right: var(--sp-5); color: var(--danger); transform: rotate(14deg); }
.card__detail { position: absolute; inset: 0; z-index: 5; overflow-y: auto; background: var(--surface); color: var(--text); }
.card__detail-photo { height: 46%; background: center/cover no-repeat; position: relative; }
.card__detail-body { padding: var(--sp-5) var(--sp-4) var(--sp-8); display: grid; gap: var(--sp-3); }
.card__detail-body .card__meta { color: var(--text-2); }
.card__detail-body .goal-chip { background: var(--surface-sunken); color: var(--text); }
.card__bio { margin: 0; line-height: 1.7; }
.card__close { position: absolute; right: var(--sp-4); bottom: var(--sp-4); min-height: 52px; padding: 0 var(--sp-5); border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: var(--sp-1); background: var(--ink); color: var(--on-ink); font-weight: var(--fw-semibold); box-shadow: var(--shadow-2); }
.prompt { padding: var(--sp-3) 0 0; border-top: 1px solid var(--line); }
.prompt span { font-size: var(--f-xs); color: var(--text-2); font-weight: var(--fw-semibold); }
.prompt p { margin: var(--sp-1) 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: var(--sp-1) var(--sp-4); border-radius: var(--radius-pill); border: 2px solid transparent; background: var(--surface-sunken); color: var(--text); font-size: var(--f-sm); font-weight: var(--fw-medium); }
.chips--pick .chip { min-height: calc(52px * var(--ts)); }
.chip--on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: var(--fw-semibold); }
.chip--on::before { content: '✓ '; }
.detail-safety { display: flex; flex-wrap: wrap; gap: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.detail-safety .btn { flex: 1 1 160px; }
.sample-note { margin: 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--text); font-size: var(--f-sm); }
.deck-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--sp-4); text-align: center; padding: var(--sp-5); color: var(--text-2); }
.deck-empty__text { margin: 0; font-size: var(--f-md); font-weight: var(--fw-semibold); color: var(--text); max-width: 26em; }
.deck-empty__pulse { width: 110px; height: 110px; border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--accent); display: grid; place-items: center; }
.deck-empty .btn { width: min(340px, 100%); }

/* 큰 버튼 셋 + 글자 라벨 (버튼 68/94px = 약 18mm 이상) */
.gamepad { flex: none; display: flex; align-items: flex-start; justify-content: center; gap: clamp(var(--sp-4), 5vw, var(--sp-8)); }
.pad-wrap { display: grid; justify-items: center; gap: var(--sp-1); }
.pad { width: 68px; height: 68px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-strong); transition: transform .12s; }
.pad--lg { width: 94px; height: 94px; }
.pad svg { width: 40%; height: 40%; }
.pad--rewind { color: var(--warn); }
.pad--nope { color: var(--danger); border-color: var(--danger-line); }
.pad--like { color: var(--on-like); background: var(--like); border-color: var(--like); }
.pad:hover, .pad--hot { transform: scale(1.08); }
.pad:active { transform: scale(.94); }
.pad:disabled { cursor: default; transform: none; }
.pad__label { font-size: var(--f-sm); font-weight: var(--fw-semibold); color: var(--text-2); white-space: nowrap; }
.pad-wrap:has(.pad--nope) .pad__label { color: var(--danger); }
.pad-wrap:has(.pad--like) .pad__label { color: var(--ok); }
.pad-wrap:has(.pad:disabled) { opacity: .4; }
.keys { display: none; }

/* 처음 한 번 뜨는 사용법 */
.swipe-guide { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: var(--sp-4); background: var(--backdrop); }
.swipe-guide__card { width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; padding: var(--sp-6); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-2); display: grid; gap: var(--sp-3); }
.swipe-guide__brand { margin: 0; font-size: var(--f-lg); font-weight: var(--fw-bold); color: var(--accent); }
.swipe-guide__anim { position: relative; height: 92px; display: grid; place-items: center; }
.swipe-guide__anim::before, .swipe-guide__anim::after { position: absolute; top: 50%; transform: translateY(-50%); font-size: var(--f-xl); font-weight: var(--fw-bold); }
.swipe-guide__anim::before { content: '←'; left: var(--sp-1); color: var(--danger); }
.swipe-guide__anim::after { content: '→'; right: var(--sp-1); color: var(--ok); }
.swipe-guide__ghost { width: 66px; height: 88px; border-radius: var(--radius-md); background: var(--ink); animation: swipe-demo 4s ease-in-out infinite; }
@keyframes swipe-demo {
  0%, 10% { transform: translateX(0) rotate(0deg); }
  26%, 38% { transform: translateX(-58px) rotate(-9deg); }
  50%, 58% { transform: translateX(0) rotate(0deg); }
  74%, 86% { transform: translateX(58px) rotate(9deg); }
  100% { transform: translateX(0) rotate(0deg); }
}
.swipe-guide__line { margin: 0; font-size: var(--f-lg); }
.swipe-guide__line b { color: var(--accent); }
.swipe-guide__note { margin: var(--sp-1) 0 var(--sp-2); font-size: var(--f-sm); color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .swipe-guide__ghost { animation: none; } }

/* ---------- 대화 ---------- */
.view--chat { display: flex; flex-direction: column; }
.chat__head { flex: none; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.chat__avatar { width: 56px; height: 56px; flex: none; border-radius: var(--radius-pill); background: var(--surface-sunken) center/cover; }
.chat__who { flex: 1; min-width: 140px; }
.chat__title { font-weight: var(--fw-bold); font-size: var(--f-lg); display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); }
.chat__age { font-weight: var(--fw-medium); color: var(--text-2); font-size: var(--f-md); }
.chat__sub { color: var(--text-2); font-size: var(--f-xs); }
.chat__safety { flex: none; }
.chat__body { flex: 1; overflow-y: auto; padding: var(--sp-5) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.chat__matched { align-self: center; width: min(560px, 100%); color: var(--text-2); font-size: var(--f-sm); display: grid; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.bubble { max-width: min(80%, 560px); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-lg); line-height: 1.55; font-size: var(--f-md); word-break: keep-all; overflow-wrap: anywhere; white-space: pre-wrap; display: grid; gap: var(--sp-1); }
.bubble--me { align-self: flex-end; background: var(--ink); color: var(--on-ink); border-bottom-right-radius: var(--radius-sm); }
.bubble--them { align-self: flex-start; background: var(--surface-sunken); color: var(--text); border-bottom-left-radius: var(--radius-sm); }
.bubble--pending { opacity: .7; }
.bubble--failed { background: var(--surface); color: var(--danger); border: 2px dashed var(--danger-line); cursor: pointer; }
.bubble__time { font-size: var(--f-2xs); opacity: .8; white-space: nowrap; }
.bubble--me .bubble__time { text-align: right; }
.bubble__auto { color: var(--warn); background: var(--warn-soft); padding: 0 var(--sp-1); border-radius: var(--radius-sm); font-weight: var(--fw-semibold); }
.bubble__retry { font-size: var(--f-xs); font-weight: var(--fw-semibold); }
.receipt { align-self: flex-end; color: var(--text-2); font-size: var(--f-xs); margin-top: calc(var(--sp-1) * -1); }
.day-sep { align-self: center; color: var(--text-2); font-size: var(--f-xs); padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-pill); background: var(--surface-sunken); }
.typing { align-self: flex-start; color: var(--text-2); font-size: var(--f-sm); padding: var(--sp-1) var(--sp-2); }
.scam-warn { align-self: stretch; display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--text); font-size: var(--f-sm); font-weight: var(--fw-semibold); }
.scam-warn > svg { flex: none; color: var(--warn); }
.scam-warn span { flex: 1 1 200px; }
.chat__starter { align-self: center; width: min(560px, 100%); color: var(--text-2); font-size: var(--f-sm); display: grid; gap: var(--sp-3); }
.openers { display: grid; gap: var(--sp-2); }
.openers__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); color: var(--text); }
.opener { text-align: left; padding: var(--sp-3) var(--sp-4); min-height: var(--tap); border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--text); font-size: var(--f-sm); border: 2px solid transparent; }
.opener:hover { border-color: var(--line-strong); }
.chat__controls:empty { display: none; }
.chat__notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); margin: 0 var(--sp-4) var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); background: var(--surface-sunken); font-size: var(--f-sm); font-weight: var(--fw-semibold); }
.chat__notice--block { background: var(--warn-soft); border: 1px solid var(--warn-line); }
.chat__form { flex: none; display: flex; align-items: flex-end; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4) var(--sp-4); border-top: 1px solid var(--line); background: var(--surface); }
.chat__input { flex: 1; min-width: 0; resize: none; min-height: var(--tap); max-height: 160px; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-lg); border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font-size: var(--f-md); line-height: 1.4; }
.chat__send { flex: none; min-height: var(--tap); padding: 0 var(--sp-4); border-radius: var(--radius-md); background: var(--ink); color: var(--on-ink); font-weight: var(--fw-semibold); display: inline-flex; align-items: center; gap: var(--sp-1); }
.chat__send:disabled { opacity: .4; cursor: default; }
.emoji-picker { display: flex; flex-wrap: wrap; gap: var(--sp-1); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); background: var(--surface); }
.emoji-picker button { width: 52px; height: 52px; font-size: var(--f-xl); border-radius: var(--radius-md); }
.emoji-picker button:hover { background: var(--surface-sunken); }

/* ---------- 쪽 화면(한눈에 보기·좋아요·관심사·내 정보·도움말) ---------- */
.browse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--sp-4); }
.btile { display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.btile__photo { position: relative; aspect-ratio: 4 / 3; background: var(--surface-sunken) center/cover; color: var(--photo-ink); display: flex; flex-direction: column; justify-content: flex-end; padding: var(--sp-3) var(--sp-4); }
.btile__photo::after { inset: 40% 0 0; }
.btile__name, .btile__where { position: relative; z-index: 1; }
.btile__name { font-size: var(--f-xl); font-weight: var(--fw-bold); }
.btile__name b { font-weight: var(--fw-medium); font-size: var(--f-lg); }
.btile__where { font-size: var(--f-sm); }
.btile__body { padding: var(--sp-3) var(--sp-4); display: grid; gap: var(--sp-3); flex: 1; align-content: start; }
.btile__body p { margin: 0; }
.btile__job { font-weight: var(--fw-semibold); }
.btile__bio { color: var(--text-2); font-size: var(--f-sm); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.btile__body .goal-chip { background: var(--surface-sunken); color: var(--text); }
.btile__actions { display: flex; gap: var(--sp-3); padding: 0 var(--sp-4) var(--sp-4); flex-wrap: wrap; }
.btile__actions .btn { flex: 1 1 120px; }
.explore-sub { margin: var(--sp-5) 0 var(--sp-3); }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: var(--sp-3); }
.explore-tile { min-height: calc(76px * var(--ts)); border-radius: var(--radius-md); background: var(--surface-sunken); border: 2px solid transparent; display: grid; place-content: center; justify-items: center; font-weight: var(--fw-semibold); font-size: var(--f-md); padding: var(--sp-3); }
.explore-tile--on { border-color: var(--accent); background: var(--surface); color: var(--accent); }
.tabs--page { padding: 0; gap: 0 var(--sp-4); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.tabs--page .tab { font-size: var(--f-sm); }
/* 내용은 상자로 감싸지 않고 줄과 여백으로 나눈다. 주의 안내만 옅은 바탕 상자로 둔다. */
.panel { min-width: 0; padding: var(--sp-5) 0; border-top: 1px solid var(--line); display: grid; gap: var(--sp-4); }
.panel p { margin: 0; }
.panel--warn { margin: var(--sp-2) 0; padding: var(--sp-5); border: 1px solid var(--warn-line); border-radius: var(--radius-lg); background: var(--warn-soft); }
.panel--warn .btn { justify-self: start; }
.hint { color: var(--text-2); font-size: var(--f-sm); margin: 0; }
.form { display: grid; gap: var(--sp-4); }
.field { display: grid; gap: var(--sp-2); font-size: var(--f-sm); font-weight: var(--fw-semibold); color: var(--text); min-width: 0; }
.field small { font-weight: 400; font-size: var(--f-xs); color: var(--text-2); }
.field input, .field select, .field textarea, .sheet textarea, .field-row--add input, .auth input, .auth select, .auth textarea { width: 100%; min-width: 0; min-height: var(--tap); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: var(--f-md); font-weight: 400; }
.field textarea, .sheet textarea { min-height: 96px; line-height: 1.5; }
.field input:disabled { opacity: .75; }
.field-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: end; }
.field-row > * { flex: 1 1 180px; min-width: 0; }
.field-row--date > * { flex: 1 1 110px; }
.field-row--add { flex-wrap: nowrap; }
.field-row--add .btn { flex: none; }
.check, .radio { display: flex; align-items: center; gap: var(--sp-3); min-height: 52px; font-size: var(--f-md); font-weight: var(--fw-medium); color: var(--text); cursor: pointer; }
.check input, .radio input { accent-color: var(--accent); width: 26px; height: 26px; flex: none; }
.radio--big { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); border: 2px solid transparent; background: var(--surface-sunken); }
.radio--big:has(input:checked) { border-color: var(--accent); background: var(--surface); }
.radios { display: grid; gap: var(--sp-3); }
.checks { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-5); }
.checks--column { display: grid; gap: var(--sp-1); }
.form__error, .auth__error, .match__error { color: var(--danger); font-size: var(--f-sm); font-weight: var(--fw-semibold); min-height: 1.2em; }
.form__error:empty, .match__error:empty { min-height: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: var(--sp-3); }
.choice-btn { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); min-height: calc(64px * var(--ts)); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); border: 2px solid transparent; background: var(--surface-sunken); font-size: var(--f-md); font-weight: var(--fw-semibold); cursor: pointer; text-align: center; }
.choice-btn input { width: 24px; height: 24px; accent-color: var(--accent); flex: none; }
.choice-btn:has(input:checked) { border-color: var(--accent); background: var(--surface); }
button.choice-btn:hover { border-color: var(--line-strong); }
.toggle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: var(--sp-3); }
.toggle-tile { position: relative; display: block; cursor: pointer; }
.toggle-tile input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.toggle-tile span { display: grid; gap: var(--sp-1); height: 100%; padding: var(--sp-4); border-radius: var(--radius-md); border: 2px solid transparent; background: var(--surface-sunken); }
.toggle-tile b { font-size: var(--f-md); }
.toggle-tile small { font-size: var(--f-xs); color: var(--text-2); font-weight: 400; }
.toggle-tile input:checked + span { border-color: var(--accent); background: var(--surface); }
.toggle-tile input:checked + span b::after { content: ' ✓'; color: var(--accent); }
.toggle-tile input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) 0; border-top: 1px solid var(--line); cursor: pointer; }
.toggle-row small { display: block; color: var(--text-2); font-size: var(--f-xs); margin-top: var(--sp-1); font-weight: 400; }
.switch { appearance: none; flex: none; width: 64px; height: 36px; border-radius: var(--radius-pill); background: var(--surface-sunken); border: 2px solid var(--line-strong); position: relative; cursor: pointer; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: var(--radius-pill); background: var(--line-strong); transition: transform .15s; }
.switch:checked { background: var(--accent); border-color: var(--accent); }
.switch:checked::after { background: var(--on-accent); transform: translateX(28px); }
.seg { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.seg__btn { flex: 1 1 90px; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: var(--tap); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-md); border: 2px solid transparent; background: var(--surface-sunken); font-weight: var(--fw-semibold); font-size: var(--f-sm); white-space: nowrap; cursor: pointer; } /* 큰 글씨에서 「어둡|게」처럼 낱말을 가르지 않고 단추가 다음 줄로 내려간다 */
.seg__btn input { flex: none; width: 22px; height: 22px; accent-color: var(--accent); }
.seg__btn[aria-pressed='true'], .seg__btn:has(input:checked) { border-color: var(--accent); background: var(--surface); }
.seg__btn--md { font-size: var(--f-sm); } .seg__btn--lg { font-size: var(--f-md); } .seg__btn--xl { font-size: var(--f-lg); }
.seg__btn span { font-size: var(--f-xs); }
.block-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.block-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); font-weight: var(--fw-semibold); }
.help-list details { border-bottom: 1px solid var(--line); padding: var(--sp-1) 0; }
.help-list details:last-child { border-bottom: 0; }
.help-list summary { min-height: 52px; display: flex; align-items: center; font-weight: var(--fw-semibold); cursor: pointer; }
.help-list p { margin: 0 0 var(--sp-3); color: var(--text-2); line-height: 1.7; }
.plain-list { margin: 0; padding-left: 1.2em; display: grid; gap: var(--sp-2); line-height: 1.6; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.photo-slot { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius-md); background: var(--surface-sunken) center/cover no-repeat; overflow: hidden; }
.photo-slot--empty { display: grid; place-content: center; justify-items: center; gap: var(--sp-1); font-size: var(--f-2xl); color: var(--text-2); border: 2px dashed var(--line-strong); }
.photo-slot--add { color: var(--accent); border-color: var(--accent); cursor: pointer; }
.photo-slot__label { font-size: var(--f-sm); font-weight: var(--fw-semibold); }
.photo-slot--drag { opacity: .5; }
.photo-slot--big { width: 150px; flex: none; }
.photo-slot--mini { display: inline-block; width: 36px; vertical-align: middle; border-radius: var(--radius-sm); }
.photo-slot__note { position: absolute; left: var(--sp-1); right: var(--sp-1); bottom: var(--sp-1); padding: var(--sp-1) var(--sp-1); border-radius: var(--radius-sm); background: var(--photo-chip); color: var(--photo-chip-ink); font-size: var(--f-2xs); font-weight: var(--fw-semibold); text-align: center; }
.photo-row { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; }
.photo-main { position: absolute; left: var(--sp-1); top: var(--sp-1); padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-sm); background: var(--ink); color: var(--on-ink); font-size: var(--f-2xs); font-weight: var(--fw-semibold); }
.photo-del { position: absolute; right: var(--sp-1); top: var(--sp-1); width: 44px; height: 44px; border-radius: var(--radius-pill); background: var(--photo-shade); color: var(--photo-ink); font-size: var(--f-sm); }
.photo-move { position: absolute; bottom: var(--sp-1); width: 44px; height: 44px; border-radius: var(--radius-pill); background: var(--photo-shade); color: var(--photo-ink); font-size: var(--f-xs); }
.photo-move--l { left: var(--sp-1); } .photo-move--r { right: var(--sp-1); }
.file-btn { cursor: pointer; }

/* ---------- 대화상자·첫 화면 ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; overflow-y: auto; background: var(--backdrop); padding: var(--sp-4); }
.modal > * { margin: auto; } /* 화면보다 길면 위가 잘리지 않고 스크롤된다 */
.auth, .sheet { width: 100%; max-width: 520px; background: var(--surface); color: var(--text); border-radius: var(--radius-lg); padding: var(--sp-6); display: grid; gap: var(--sp-4); box-shadow: var(--shadow-2); }
.auth__hint, .sheet__hint { color: var(--text-2); font-size: var(--f-sm); margin: 0; line-height: 1.6; }
.auth__row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.auth__row .btn { flex: 1 1 140px; }
.sheet__msg { margin: 0; font-size: var(--f-md); line-height: 1.6; }
.sheet__q { margin: 0 0 var(--sp-1); font-weight: var(--fw-bold); }
.report-msgs { display: grid; gap: var(--sp-1); max-height: 220px; overflow-y: auto; padding: var(--sp-1); border: 1px solid var(--line); border-radius: var(--radius-md); }
.pick-row { display: grid; gap: var(--sp-1); text-align: left; padding: var(--sp-4); min-height: 72px; border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--text); width: 100%; font-size: var(--f-md); border: 1px solid transparent; }
.pick-row small { color: var(--text-2); font-size: var(--f-xs); }
.pick-row--danger { background: var(--danger-soft); border-color: var(--danger-line); }
.pick-row--danger b { color: var(--danger); }
.house-rules { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--sp-3); }
.house-rules li { display: grid; gap: var(--sp-1); font-size: var(--f-md); }
.house-rules span { color: var(--text-2); font-size: var(--f-sm); line-height: 1.55; }
.consent-all { border-top: 1px solid var(--line); padding-top: var(--sp-3); }
.welcome { gap: var(--sp-4); }
.welcome__brand { margin: 0; font-size: var(--f-3xl); font-weight: var(--fw-bold); line-height: 1.15; color: var(--accent); }
.welcome__tag { margin: 0; font-size: var(--f-lg); font-weight: var(--fw-semibold); }
.welcome__actions { display: grid; gap: var(--sp-3); }
.welcome__concept { margin: 0; color: var(--text-2); font-size: var(--f-xs); }
.field--big span { font-size: var(--f-sm); }
.onboarding__step { margin: 0; color: var(--accent); font-weight: var(--fw-semibold); font-size: var(--f-sm); }
.onboarding__bar { height: 8px; border-radius: var(--radius-pill); background: var(--surface-sunken); overflow: hidden; }
.onboarding__bar span { display: block; height: 100%; background: var(--ink); }
.match { width: 100%; max-width: 480px; display: grid; gap: var(--sp-4); background: var(--surface); border-radius: var(--radius-lg); padding: var(--sp-6); box-shadow: var(--shadow-2); animation: pop .35s cubic-bezier(.2,.9,.3,1.3); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.match__title { font-size: var(--f-2xl); font-weight: var(--fw-bold); line-height: 1.2; color: var(--accent); margin: 0; }
.match__sub { margin: 0; font-size: var(--f-md); }
.match__pair { display: flex; }
.match__pic { width: 120px; height: 120px; border-radius: var(--radius-pill); border: 4px solid var(--surface); background: var(--surface-sunken) center/cover; }
.match__pic + .match__pic { margin-left: calc(var(--sp-5) * -1); }
.match__note { margin: 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); background: var(--warn-soft); border: 1px solid var(--warn-line); font-size: var(--f-sm); }
.match__form { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.match__form input { flex: 1 1 200px; min-height: var(--tap); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font-size: var(--f-md); }
.match__form button { flex: 1 1 120px; min-height: var(--tap); border-radius: var(--radius-md); background: var(--ink); color: var(--on-ink); font-weight: var(--fw-semibold); padding: 0 var(--sp-5); }
.match__safety { margin: 0; color: var(--text-2); font-size: var(--f-xs); }
.toast { position: fixed; left: 50%; bottom: var(--sp-6); transform: translate(-50%, 20px); z-index: 60; width: max-content; max-width: calc(100vw - var(--sp-8)); padding: var(--sp-3) var(--sp-5); border-radius: var(--radius-md); background: var(--text); color: var(--bg); font-weight: var(--fw-semibold); font-size: var(--f-sm); box-shadow: var(--shadow-2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast--on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 휴대폰 (900px 이하): 목록은 화면 가득, 아래쪽에 글자 붙은 큰 탭 ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 0 var(--nav-h) 0; z-index: 30; transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility 0s .2s; border-right: 0; }
  .app--nav-open .sidebar { transform: none; visibility: visible; transition: transform .2s; }
  .main { padding-bottom: var(--nav-h); }
  .mainnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: var(--nav-h); padding: var(--sp-1) var(--sp-1) max(var(--sp-1), env(safe-area-inset-bottom)); gap: 0; border-top: 1px solid var(--line); border-bottom: 0; overflow: visible; }
  .nav__item { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; padding: var(--sp-1) 2px; border-radius: var(--radius-md); font-size: var(--f-2xs); line-height: 1.15; text-align: center; }
  .nav__item--desk { display: none; }
  .nav__item--mobile { display: inline-flex; }
  .nav__long { display: none; }
  .nav__short { display: inline; }
  .nav__badge { position: absolute; top: 2px; right: calc(50% - 26px); min-width: 22px; min-height: 22px; font-size: var(--f-2xs); }
  .tab--mobile { display: inline-block; }
  .net-banner, .demo-banner { padding: var(--sp-1) var(--sp-3); flex-wrap: nowrap; font-size: var(--f-xs); }
  .demo-banner__long { display: none; } .demo-banner__short { display: inline; }
  .recs-tools [data-tool=help] { display: none; }
  .sidebar__head { min-height: 76px; }
  .view--recs { padding: var(--sp-2) var(--sp-3) var(--sp-3); gap: var(--sp-2); }
  .deck { min-height: 260px; }
  .pad { width: 60px; height: 60px; }
  .pad--lg { width: 78px; height: 78px; }
  .view--page { padding: var(--sp-5) var(--sp-4) var(--sp-8); }
  .chat__head { padding: var(--sp-2) var(--sp-3); gap: var(--sp-3); }
  .chat__avatar { width: 48px; height: 48px; }
  .chat__form { padding: var(--sp-3) var(--sp-3) var(--sp-3); gap: var(--sp-1); }
  .chat__send { padding: 0 var(--sp-3); }
  .chat__send svg { display: none; }
  .icon-btn--soft { min-width: 44px; padding: 0 var(--sp-1); }
  .toast { bottom: calc(var(--nav-h) + var(--sp-3)); }
  .auth, .sheet { padding: var(--sp-5) var(--sp-4); }
}
.btile__photo .card__badges { position: relative; z-index: 1; margin-bottom: auto; }
/* 좁은 폰: 대화 머리를 두 줄로 — 위 줄은 「목록」·「신고·차단」, 아래 줄은 사진·이름(「신고·차단」이 혼자 다음 줄로 떨어지지 않게) */
@media (max-width: 560px) {
  .chat__head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: var(--sp-2) var(--sp-3); }
  .chat__head > [data-act='back'] { grid-area: 1 / 1 / 2 / 3; justify-self: start; }
  .chat__safety { grid-area: 1 / 3; }
  .chat__avatar { grid-area: 2 / 1; }
  .chat__who { grid-area: 2 / 2 / 3 / 4; min-width: 0; }
}
@media (min-width: 901px) { .panel .photo-grid { max-width: 480px; } }
.page-body > .panel:first-child { border-top: 0; padding-top: 0; }

.photo-review { position: absolute; left: var(--sp-1); right: var(--sp-1); bottom: 50px; padding: var(--sp-1) var(--sp-1); border-radius: var(--radius-sm); background: var(--photo-chip); color: var(--photo-chip-ink); font-size: var(--f-2xs); font-weight: var(--fw-semibold); text-align: center; }
.photo-review--no { background: var(--danger-soft); color: var(--danger); }
a.head-btn { text-decoration: none; }

/* ---------- 운영자 화면 ---------- */
body.admin-page { overflow: auto; }
.admin-page .app { display: none; }
.admin { max-width: 980px; margin: 0 auto; padding-block: var(--sp-6) var(--sp-10); padding-left: max(var(--sp-4), env(safe-area-inset-left, 0px)); padding-right: max(var(--sp-4), env(safe-area-inset-right, 0px)); display: grid; gap: var(--sp-4); }
.admin__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.admin__head h1 { margin: 0; font-size: var(--f-xl); }
.admin__body { display: grid; gap: var(--sp-2); }
.admin-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.admin-card--scam { padding: var(--sp-4); border: 1px solid var(--warn-line); border-radius: var(--radius-lg); background: var(--warn-soft); }
.admin-card__detail { font-style: italic; }
.admin-card__msgs { display: grid; gap: var(--sp-1); padding: var(--sp-3); border-radius: var(--radius-md); background: var(--surface-sunken); }
.admin-card__msgs p { margin: 0; }
.admin-card__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.admin-card__actions .btn { flex: 1 1 130px; }
.admin__photos { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.admin__photo { width: 90px; aspect-ratio: 3 / 4; border-radius: var(--radius-md); background: var(--surface-sunken) center/cover; }

/* ---------- 정보 페이지(약관·개인정보·환불·회사 정보·404) ---------- */
.doc-page { background: var(--bg); color: var(--text); }
.doc { max-width: 760px; margin: 0 auto; padding: var(--sp-6) var(--sp-4) var(--sp-10); font-size: var(--f-md); line-height: 1.75; }
.doc h1 { font-size: var(--f-xl); margin: var(--sp-3) 0; }
.doc h2 { font-size: var(--f-lg); margin: var(--sp-8) 0 var(--sp-2); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: var(--sp-1) 0; }
.doc__back a { font-size: var(--f-sm); display: inline-flex; align-items: center; min-height: 44px; }
.doc__draft { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-4); }
.doc__table { width: 100%; border-collapse: collapse; }
.doc__table th, .doc__table td { text-align: left; padding: var(--sp-3) var(--sp-2); border-bottom: 1px solid var(--line); vertical-align: top; }
.doc__table th { width: 40%; font-weight: var(--fw-semibold); }
.info-links { display: flex; flex-wrap: wrap; gap: 0 var(--sp-4); margin-top: var(--sp-4); font-size: var(--f-sm); }
.info-links a { color: inherit; text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- 소셜 로그인·이용권·문의 ---------- */
.welcome__or { display: flex; align-items: center; gap: var(--sp-3); color: var(--text-2); margin: var(--sp-4) 0 var(--sp-2); }
.welcome__or::before, .welcome__or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.welcome__social { display: grid; gap: var(--sp-3); }
.btn--social { font-weight: var(--fw-semibold); }
.btn--kakao { background: var(--kakao); color: var(--on-kakao); }
.btn--naver { background: var(--naver); color: var(--on-naver); }
.btn--google { background: var(--google); color: var(--on-google); border: 1px solid var(--google-line); }
.btn--apple { background: var(--apple); color: var(--on-apple); }
.btn--line { background: var(--line-brand); color: var(--on-line-brand); }
.notice { background: var(--ok-soft); border: 1px solid var(--ok); border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); font-size: var(--f-md); }
.product-list, .order-list, .inquiry-list { list-style: none; padding: 0; margin: 0; display: grid; }
.product, .order { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-2) var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.product__buy { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.product__price { font-size: var(--f-lg); }
.status-chip { display: inline-block; padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-pill); border: 1px solid var(--line-strong); font-size: var(--f-xs); }
.status-chip--ok { border-color: var(--ok); color: var(--ok); font-weight: var(--fw-semibold); }
.status-chip--no { border-color: var(--danger-line); color: var(--danger); font-weight: var(--fw-semibold); }
.status-chip--muted { color: var(--text-2); }
.inquiry { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.inquiry__head { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); align-items: center; }
.inquiry__answer { background: var(--warn-soft); border-radius: var(--radius-md); padding: var(--sp-2) var(--sp-3); margin-top: var(--sp-2); }
.small { font-size: var(--f-xs); }

/* ---------- 체험 미디어(AI 생성): 얼굴이 잘리지 않게, 첫 화면·온보딩 그림 ---------- */
.card__photo { background-position: 50% 28%; }          /* 세로 인물 사진: 얼굴이 위쪽 1/3 에 오게 */
.btile__photo { background-position: 50% 22%; }
/* AI 인물 사진(3:4, 머리 위 6~10%·눈 20~26%·턱 34~40%, 가운데) — 시각 기준(태플 카드: 3:4, 얼굴 중심, 아래 글자) 반영.
   원형 사진은 가운데 기준이면 머리 위가 잘리고 어깨가 커져서, 얼굴이 원을 채우도록 확대·위쪽 기준. 실제 회원이 올린 사진은 그대로. */
.btile__photo[style*="/media/demo/"] { background-position: 50% 12%; }
.match__pic[style*="/media/demo/"], .chat__avatar[style*="/media/demo/"], .convo__avatar[style*="/media/demo/"] { background-size: 130% auto; background-position: 50% 8%; }
/* 카드가 낮을 때(아주 큰 글씨 등) 얼굴을 덮지 않게 「맞는 점」 상자는 「자세히」에서만 */
@container (max-height: 480px) { .card__info .reasons { display: none; } }
.welcome__hero, .onboarding__hero { margin: 0 0 var(--sp-3); border-radius: var(--radius-lg); overflow: hidden; position: relative; background: var(--surface-sunken); }
.welcome__hero img, .welcome__hero video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 40%; }
.onboarding__hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 35%; }
.welcome__hero figcaption, .onboarding__hero figcaption { position: absolute; right: var(--sp-2); bottom: var(--sp-2); background: var(--photo-shade); color: var(--photo-ink); font-size: var(--f-2xs); padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) { .welcome__hero video { display: none; } }

/* Archived portraits have lower chins than the original framing plan. Keep name overlays below faces;
   compatibility details remain available in the existing expanded profile. Real-member photos are unchanged. */
.card:has(.card__photo[style*="/media/demo/"]) .card__info .reasons { display: none; }
.welcome__hero video { position: absolute; inset: 0; height: 100%; }
.relation-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 28%; border-radius: var(--radius-md); margin-bottom: var(--sp-2); }
