/* 백년극장 — 시니어(50~70대)용 화면.
   senior-match/styles.css 의 색(극장 커튼 붉은색 #9e2b25 · 따뜻한 종이색 바탕), 카드·도장·사용법 애니메이션, 「시니어 레이어」 수치
   (본문 18~20px, 버튼 68/94px, 입력칸 58px, 포커스 3px)를 이어받아 새로 정리했다. 글씨 크기는 --ts 로 한 번에 키운다. */
:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-2: #f2ece3;
  --border: #d9cdbd;
  --text: #1c1917;
  --muted: #5f564d;
  --brand: #9e2b25;
  --brand-2: #b0442a;
  --brand-grad: linear-gradient(135deg, var(--brand), var(--brand-2));
  --on-brand: #ffffff;
  --like: #1d7343;
  --nope: #b3261e;
  --rewind: #8a4f00;
  --warn-bg: #fff4e5;
  --warn-border: #e8a54b;
  --radius: 16px;
  --sidebar-w: 360px;
  --nav-h: calc(78px * var(--ts));
  --ts: 1;
  --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));
  --tap: calc(58px * var(--ts));
  --font: 'Apple SD Gothic Neo', 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
  color-scheme: light;
}
:root[data-text='lg'] { --ts: 1.15; }
:root[data-text='xl'] { --ts: 1.3; }
:root[data-theme='dark'] {
  --bg: #14110f; --surface: #1f1b18; --surface-2: #2b2622; --border: #4a4038; --text: #faf7f4; --muted: #c9bdb1;
  --warn-bg: #3a2a12; --warn-border: #a8762e; --like: #3fae6c; --nope: #e2574c; --rewind: #e0a24a; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: var(--f-md); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow: hidden; word-break: keep-all; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 3px; }
[hidden] { display: none !important; }
h2 { font-size: var(--f-xl); line-height: 1.3; margin: 0; }
h3 { font-size: var(--f-lg); margin: 0; }
.muted { color: var(--muted); }

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

/* ---------- 버튼 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 12px 22px; border-radius: 999px; background: var(--brand-grad); color: var(--on-brand); font-weight: 800; 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 { background: var(--surface); color: var(--text); border: 2px solid var(--border); }
.btn--soft { background: var(--surface-2); color: var(--brand); border: 2px solid var(--brand-2); }
.btn--danger { background: var(--nope); color: #fff; }
.btn--small { min-height: calc(48px * var(--ts)); padding: 8px 16px; 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: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; background: var(--surface-2); color: var(--text); font-weight: 700; font-size: var(--f-sm); }
.icon-btn--soft { background: transparent; font-size: 26px; }

/* ---------- 큰 틀 ---------- */
.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: 24px clamp(16px, 4vw, 48px) 48px; }
.page-body { max-width: 720px; display: grid; gap: 18px; }
.view-head { margin-bottom: 18px; display: grid; gap: 6px; }
.view-head h2 .muted { font-size: var(--f-md); font-weight: 600; }

.net-banner, .demo-banner { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; padding: 10px 16px; font-size: var(--f-sm); text-align: center; }
.net-banner { background: #3b2f2a; color: #fff; }
.demo-banner { background: var(--warn-bg); border-bottom: 2px solid var(--warn-border); }
.demo-banner__text { flex: 1 1 200px; }
.demo-banner__short { display: none; }

/* 화면 바꾸기: 넓은 화면은 위쪽 탭, 휴대폰은 아래쪽 큰 탭 */
.mainnav { flex: none; display: flex; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); overflow-x: auto; }
.nav__item { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: calc(52px * var(--ts)); padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: var(--f-sm); color: var(--muted); }
.nav__item[aria-current='true'] { background: var(--surface-2); color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand-2); }
.nav__item--mobile, .nav__short { display: none; }
.nav__badge { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 15px; display: inline-grid; place-items: center; }

/* ---------- 왼쪽 목록 ---------- */
.sidebar { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); background: var(--bg); }
.sidebar__head { min-height: 92px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--brand-grad); color: #fff; }
.me { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: var(--f-lg); color: #fff; 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: 50%; background: rgba(255,255,255,.25) center/cover; border: 3px solid rgba(255,255,255,.85); }
.head-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 52px; padding: 6px 14px; border-radius: 999px; background: rgba(20,12,10,.4); color: #fff; font-weight: 800; font-size: var(--f-xs); }
.tabs { display: flex; gap: 22px; padding: 16px 20px 0; flex: none; }
.tab { min-height: 52px; font-size: var(--f-md); font-weight: 800; padding: 0 2px 8px; color: var(--muted); border-bottom: 4px solid transparent; }
.tab[aria-selected='true'] { color: var(--text); border-bottom-color: var(--brand-2); }
.tab .count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 15px; padding: 0 6px; }
.tab--mobile { display: none; }
.sidebar__body { flex: 1; overflow-y: auto; padding: 16px 14px 24px; }
.sidebar__hint { font-size: var(--f-xs); margin: 12px 4px 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.thumb { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--surface-2) center/cover; text-align: left; color: #fff; }
.thumb::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.thumb__name { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 1; font-size: var(--f-md); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb__tag { position: absolute; left: 8px; top: 8px; z-index: 1; padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,.92); color: #6a3d00; font-size: 14px; font-weight: 800; }
.thumb--likes { display: grid; place-content: center; gap: 4px; background: linear-gradient(135deg, #d98a1d, #b0442a); font-weight: 800; text-align: center; padding: 10px; font-size: var(--f-sm); }
.thumb--likes b { font-size: var(--f-xl); }
.thumb--likes::after { display: none; }
.dot { position: absolute; top: 8px; right: 8px; z-index: 1; width: 16px; height: 16px; border-radius: 50%; background: #e0362a; box-shadow: 0 0 0 3px #fff; }
.convos { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.convo { display: flex; gap: 14px; align-items: center; width: 100%; padding: 12px 10px; border-radius: 12px; text-align: left; min-height: 84px; }
.convo:hover, .convo[aria-current='true'] { background: var(--surface); }
.convo__avatar { width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--surface-2) center/cover; position: relative; }
.convo__avatar .dot { top: 0; right: 0; }
.convo__text { min-width: 0; display: grid; gap: 4px; }
.convo__name { font-weight: 800; font-size: var(--f-md); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.convo__last { color: var(--muted); font-size: var(--f-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.your-turn { padding: 2px 8px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 800; }
.empty-note { color: var(--muted); font-size: var(--f-md); text-align: center; padding: 28px 12px; line-height: 1.6; display: grid; gap: 14px; justify-items: center; }
.empty-note b { color: var(--text); }

/* ---------- 추천 카드 ---------- */
.view--recs { position: relative; display: flex; flex-direction: column; align-items: center; padding: 12px 16px 16px; gap: 10px; overflow: hidden; }
.recs-tools { flex: none; display: flex; flex-wrap: wrap; gap: 8px; 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; justify-content: center; gap: 10px; padding: 6px 8px 6px 16px; border-radius: 999px; background: var(--surface-2); font-size: var(--f-sm); font-weight: 700; }
.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); overflow: hidden; background: #2a2320; box-shadow: 0 6px 22px rgba(0,0,0,.28); touch-action: none; user-select: none; will-change: transform; transform-origin: 50% 90%; color: #fff; }
.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: 10px; left: 10px; right: 10px; display: flex; gap: 5px; z-index: 2; }
.card__bar { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,.4); }
.card__bar--on { background: #fff; }
.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: 6px; }
.btile__photo .card__badges { position: absolute; top: 10px; left: 10px; margin: 0; }
.badge-synthetic, .badge-art { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 8px; font-size: 15px; font-weight: 800; line-height: 1.3; }
.badge-synthetic { background: #fff3d6; color: #6a3d00; border: 2px solid #e8a54b; }
.badge-art { background: #eef0f3; color: #33373d; border: 2px solid #b9c0c9; }
.card__info { position: absolute; left: 0; right: 0; bottom: 0; padding: 90px 18px 18px; background: linear-gradient(transparent, rgba(0,0,0,.82) 38%); z-index: 2; display: grid; gap: 6px; }
.card__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.card__name { font-size: var(--f-2xl); font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.card__age { font-size: var(--f-xl); font-weight: 600; }
.card__meta { display: flex; align-items: center; gap: 8px; font-size: var(--f-sm); }
.card__info .card__meta { color: #f3eee9; }
.card__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.goal-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.92); color: #5b1a16; font-size: var(--f-xs); font-weight: 800; }
.reasons { border-radius: 12px; padding: 10px 14px; background: var(--surface-2); color: var(--text); display: grid; gap: 4px; }
.reasons__title { font-size: var(--f-xs); color: var(--brand); }
.reasons ul { margin: 0; padding-left: 1.1em; display: grid; gap: 2px; font-size: var(--f-sm); font-weight: 700; }
.card__info .reasons { background: rgba(255,250,244,.94); color: #1c1917; }
.card__info .reasons__title { color: #9e2b25; }
.card__open { position: absolute; right: 12px; top: 22px; min-height: 48px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; background: rgba(20,14,12,.6); color: #fff; font-weight: 800; font-size: var(--f-xs); z-index: 3; }
.stamp { position: absolute; top: 70px; z-index: 4; padding: 4px 14px; border: 5px solid; border-radius: 10px; font-size: 40px; font-weight: 900; opacity: 0; pointer-events: none; background: rgba(255,255,255,.85); }
.stamp--like { left: 22px; color: var(--like); transform: rotate(-14deg); }
.stamp--nope { right: 22px; color: var(--nope); 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: 18px 18px 28px; display: grid; gap: 12px; }
.card__detail-body .card__meta { color: var(--muted); }
.card__detail-body .goal-chip { background: var(--surface-2); }
.card__bio { margin: 0; line-height: 1.7; }
.card__close { position: absolute; right: 14px; bottom: 14px; min-height: 52px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; background: var(--brand-grad); color: #fff; font-weight: 800; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.prompt { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.prompt span { font-size: var(--f-xs); color: var(--muted); font-weight: 700; }
.prompt p { margin: 4px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font-size: var(--f-sm); font-weight: 700; }
.chips--pick .chip { min-height: calc(52px * var(--ts)); }
.chip--on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip--on::before { content: '✓ '; }
.detail-safety { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.detail-safety .btn { flex: 1 1 160px; }
.sample-note { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); border: 2px solid var(--warn-border); color: var(--text); font-size: var(--f-sm); }
.deck-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 20px; color: var(--muted); }
.deck-empty__text { margin: 0; font-size: var(--f-md); font-weight: 700; color: var(--text); max-width: 26em; }
.deck-empty__pulse { width: 110px; height: 110px; border-radius: 50%; background: var(--brand-grad); color: #fff; 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(14px, 5vw, 34px); }
.pad-wrap { display: grid; justify-items: center; gap: 6px; }
.pad { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border); box-shadow: 0 3px 10px rgba(0,0,0,.15); transition: transform .12s; }
.pad--lg { width: 94px; height: 94px; }
.pad svg { width: 40%; height: 40%; }
.pad--rewind { color: var(--rewind); }
.pad--nope { color: var(--nope); border-color: var(--nope); }
.pad--like { color: #fff; 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: 800; color: var(--muted); white-space: nowrap; }
.pad-wrap:has(.pad--nope) .pad__label { color: var(--nope); }
.pad-wrap:has(.pad--like) .pad__label { color: var(--like); }
.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: 16px; background: rgba(28,25,23,.6); }
.swipe-guide__card { width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; padding: 24px; border-radius: 20px; background: var(--surface); border: 2px solid var(--border); display: grid; gap: 12px; text-align: center; }
.swipe-guide__brand { margin: 0; font-size: var(--f-lg); font-weight: 900; color: var(--brand); }
.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: 32px; font-weight: 800; }
.swipe-guide__anim::before { content: '←'; left: 4px; color: var(--nope); }
.swipe-guide__anim::after { content: '→'; right: 4px; color: var(--like); }
.swipe-guide__ghost { width: 66px; height: 88px; border-radius: 12px; background: var(--brand-grad); box-shadow: 0 4px 14px rgba(0,0,0,.25); 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(--brand); }
.swipe-guide__note { margin: 4px 0 8px; font-size: var(--f-sm); color: var(--muted); }
@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: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.chat__avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--surface-2) center/cover; }
.chat__who { flex: 1; min-width: 140px; }
.chat__title { font-weight: 900; font-size: var(--f-lg); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chat__age { font-weight: 600; color: var(--muted); font-size: var(--f-md); }
.chat__sub { color: var(--muted); font-size: var(--f-xs); }
.chat__safety { flex: none; }
.chat__body { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.chat__matched { align-self: center; width: min(560px, 100%); text-align: center; color: var(--muted); font-size: var(--f-sm); display: grid; gap: 10px; margin-bottom: 8px; }
.chat__matched .reasons { text-align: left; }
.bubble { max-width: min(80%, 560px); padding: 12px 16px; border-radius: 20px; line-height: 1.55; font-size: calc(20px * var(--ts)); word-break: keep-all; overflow-wrap: anywhere; white-space: pre-wrap; display: grid; gap: 4px; }
.bubble--me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.bubble--them { align-self: flex-start; background: var(--surface-2); color: var(--text); border-bottom-left-radius: 6px; }
.bubble--pending { opacity: .7; }
.bubble--failed { background: #fff; color: var(--nope); border: 2px dashed var(--nope); cursor: pointer; }
.bubble__time { font-size: 14px; opacity: .8; white-space: nowrap; }
.bubble--me .bubble__time { text-align: right; }
.bubble__auto { color: #8a5300; background: #fff3d6; padding: 0 6px; border-radius: 6px; }
.bubble__retry { font-size: var(--f-xs); font-weight: 700; }
.receipt { align-self: flex-end; color: var(--muted); font-size: var(--f-xs); margin-top: -4px; }
.day-sep { align-self: center; color: var(--muted); font-size: var(--f-xs); padding: 4px 12px; border-radius: 999px; background: var(--surface-2); }
.typing { align-self: flex-start; color: var(--muted); font-size: var(--f-sm); padding: 4px 6px; }
.scam-warn { align-self: stretch; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: var(--warn-bg); border: 2px solid var(--warn-border); font-size: var(--f-sm); font-weight: 700; }
.scam-warn span { flex: 1 1 220px; }
.chat__starter { align-self: center; width: min(560px, 100%); color: var(--muted); font-size: var(--f-sm); display: grid; gap: 10px; }
.openers { display: grid; gap: 8px; }
.openers__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; color: var(--text); }
.opener { text-align: left; padding: 12px 14px; min-height: var(--tap); border-radius: 14px; background: var(--surface); border: 2px solid var(--border); color: var(--text); font-size: var(--f-sm); }
.opener:hover { border-color: var(--brand-2); }
.chat__controls:empty { display: none; }
.chat__notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 16px 10px; padding: 12px 16px; border-radius: 14px; background: var(--surface-2); font-size: var(--f-sm); font-weight: 700; }
.chat__notice--block { background: var(--warn-bg); border: 2px solid var(--warn-border); }
.chat__form { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.chat__input { flex: 1; min-width: 0; resize: none; min-height: var(--tap); max-height: 160px; padding: 14px 16px; border-radius: 18px; border: 2px solid var(--border); background: var(--bg); color: var(--text); font-size: calc(20px * var(--ts)); line-height: 1.4; }
.chat__send { flex: none; min-height: var(--tap); padding: 0 18px; border-radius: 18px; background: var(--brand-grad); color: #fff; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.chat__send:disabled { opacity: .4; cursor: default; }
.emoji-picker { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.emoji-picker button { width: 52px; height: 52px; font-size: 28px; border-radius: 12px; }
.emoji-picker button:hover { background: var(--surface-2); }

/* ---------- 쪽 화면(한눈에 보기·좋아요·관심사·내 정보·도움말) ---------- */
.browse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.btile { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.btile__photo { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2) center/cover; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px 14px; }
.btile__photo::after { content: ''; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.btile__name, .btile__where { position: relative; z-index: 1; }
.btile__name { font-size: var(--f-xl); font-weight: 900; }
.btile__name b { font-weight: 600; font-size: var(--f-lg); }
.btile__where { font-size: var(--f-sm); }
.btile__body { padding: 12px 14px; display: grid; gap: 10px; flex: 1; align-content: start; }
.btile__body p { margin: 0; }
.btile__job { font-weight: 800; }
.btile__bio { color: var(--muted); 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-2); }
.btile__actions { display: flex; gap: 10px; padding: 0 14px 14px; flex-wrap: wrap; }
.btile__actions .btn { flex: 1 1 120px; }
.explore-sub { margin: 18px 0 10px; }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.explore-tile { min-height: calc(110px * var(--ts)); border-radius: 16px; background: var(--surface); border: 2px solid var(--border); display: grid; place-content: center; justify-items: center; gap: 6px; font-weight: 800; font-size: var(--f-md); padding: 10px; }
.explore-tile span { font-size: 38px; }
.explore-tile--on { border-color: var(--brand); background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--brand); }
.tabs--page { padding: 0 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: grid; gap: 14px; }
.panel p { margin: 0; }
.panel--warn { background: var(--warn-bg); border: 2px solid var(--warn-border); }
.panel--warn .btn { justify-self: start; }
.hint { color: var(--muted); font-size: var(--f-sm); margin: 0; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; font-size: var(--f-sm); font-weight: 700; color: var(--text); min-width: 0; }
.field small { font-weight: 500; font-size: var(--f-xs); }
.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: 12px 14px; border-radius: 12px; border: 2px solid var(--border); background: var(--bg); color: var(--text); font-size: var(--f-md); font-weight: 500; }
.field textarea, .sheet textarea { min-height: 96px; line-height: 1.5; }
.field input:disabled { opacity: .75; }
.field-row { display: flex; flex-wrap: wrap; gap: 12px; 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: 12px; min-height: 52px; font-size: var(--f-md); font-weight: 600; color: var(--text); cursor: pointer; }
.check input, .radio input { accent-color: var(--brand); width: 26px; height: 26px; flex: none; }
.radio--big { padding: 10px 14px; border-radius: 12px; border: 2px solid var(--border); }
.radio--big:has(input:checked) { border-color: var(--brand); background: var(--surface-2); }
.radios { display: grid; gap: 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.checks--column { display: grid; gap: 4px; }
.form__error, .auth__error, .match__error { color: var(--nope); font-size: var(--f-sm); font-weight: 700; 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: 10px; }
.choice-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: calc(64px * var(--ts)); padding: 10px 14px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); font-size: var(--f-md); font-weight: 800; cursor: pointer; text-align: center; }
.choice-btn input { width: 24px; height: 24px; accent-color: var(--brand); flex: none; }
.choice-btn:has(input:checked) { border-color: var(--brand); background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--brand); }
button.choice-btn:hover { border-color: var(--brand-2); }
.toggle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.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: 4px; height: 100%; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); }
.toggle-tile b { font-size: var(--f-md); }
.toggle-tile small { font-size: var(--f-xs); color: var(--muted); font-weight: 500; }
.toggle-tile input:checked + span { border-color: var(--brand); background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--brand); }
.toggle-tile input:checked + span b::after { content: ' ✓'; color: var(--brand); }
.toggle-tile input:focus-visible + span { outline: 3px solid var(--brand-2); outline-offset: 3px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; }
.toggle-row small { display: block; color: var(--muted); font-size: var(--f-xs); margin-top: 4px; font-weight: 500; }
.switch { appearance: none; flex: none; width: 64px; height: 36px; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--border); position: relative; cursor: pointer; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch:checked { background: var(--brand); border-color: var(--brand); }
.switch:checked::after { transform: translateX(28px); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg__btn { flex: 1 1 90px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 8px 12px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); font-weight: 800; font-size: var(--f-sm); cursor: pointer; }
.seg__btn input { width: 22px; height: 22px; accent-color: var(--brand); }
.seg__btn[aria-pressed='true'], .seg__btn:has(input:checked) { border-color: var(--brand); background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--brand); }
.seg__btn--md { font-size: 17px; } .seg__btn--lg { font-size: 20px; } .seg__btn--xl { font-size: 24px; }
.seg__btn span { font-size: 16px; }
.block-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.block-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; }
.help-list details { border-bottom: 1px solid var(--border); padding: 6px 0; }
.help-list details:last-child { border-bottom: 0; }
.help-list summary { min-height: 52px; display: flex; align-items: center; font-weight: 800; cursor: pointer; }
.help-list p { margin: 0 0 12px; color: var(--muted); line-height: 1.7; }
.plain-list { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; line-height: 1.6; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.photo-slot { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; background: var(--surface-2) center/cover no-repeat; overflow: hidden; }
.photo-slot--empty { display: grid; place-content: center; justify-items: center; gap: 4px; font-size: 34px; color: var(--muted); border: 2px dashed var(--border); }
.photo-slot--add { color: var(--brand); border-color: var(--brand-2); cursor: pointer; }
.photo-slot__label { font-size: var(--f-sm); font-weight: 800; }
.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: 6px; }
.photo-slot__note { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.9); color: #33373d; font-size: 14px; font-weight: 800; text-align: center; }
.photo-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.photo-main { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 800; }
.photo-del { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 18px; }
.photo-move { position: absolute; bottom: 6px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 16px; }
.photo-move--l { left: 6px; } .photo-move--r { right: 6px; }
.file-btn { cursor: pointer; }

/* ---------- 대화상자·첫 화면 ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; overflow-y: auto; background: rgba(28,22,18,.72); padding: 16px; }
.modal > * { margin: auto; } /* 화면보다 길면 위가 잘리지 않고 스크롤된다 */
.auth, .sheet { width: 100%; max-width: 520px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 20px; padding: 26px; display: grid; gap: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.auth__hint, .sheet__hint { color: var(--muted); font-size: var(--f-sm); margin: 0; line-height: 1.6; }
.auth__row { display: flex; flex-wrap: wrap; gap: 10px; }
.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 6px; font-weight: 800; }
.report-msgs { display: grid; gap: 4px; max-height: 220px; overflow-y: auto; padding: 4px; border: 1px solid var(--border); border-radius: 12px; }
.pick-row { display: grid; gap: 4px; text-align: left; padding: 16px 18px; min-height: 72px; border-radius: 14px; background: var(--surface-2); color: var(--text); width: 100%; font-size: var(--f-md); }
.pick-row small { color: var(--muted); font-size: var(--f-xs); }
.pick-row--danger { background: #fde9e7; border: 2px solid var(--nope); }
:root[data-theme='dark'] .pick-row--danger { background: #3d1c19; }
.house-rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.house-rules li { display: grid; gap: 4px; font-size: var(--f-md); }
.house-rules span { color: var(--muted); font-size: var(--f-sm); line-height: 1.55; }
.consent-all { border-top: 1px solid var(--border); padding-top: 10px; }
.welcome { text-align: center; gap: 16px; }
.welcome__brand { margin: 0; font-size: calc(44px * var(--ts)); font-weight: 900; letter-spacing: -.03em; color: var(--brand); }
.welcome__tag { margin: 0; font-size: var(--f-lg); font-weight: 700; }
.welcome__actions { display: grid; gap: 12px; }
.welcome__concept { margin: 0; color: var(--muted); font-size: var(--f-xs); }
.field--big span { font-size: var(--f-sm); }
.onboarding__step { margin: 0; color: var(--brand); font-weight: 800; font-size: var(--f-sm); }
.onboarding__bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.onboarding__bar span { display: block; height: 100%; background: var(--brand-grad); }
.match { width: 100%; max-width: 480px; text-align: center; display: grid; gap: 14px; background: var(--surface); border-radius: 22px; padding: 24px; 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: calc(40px * var(--ts)); font-weight: 900; color: var(--brand); margin: 0; }
.match__sub { margin: 0; font-size: var(--f-md); }
.match__pair { display: flex; justify-content: center; }
.match__pic { width: 120px; height: 120px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.2); background: var(--surface-2) center/cover; }
.match__pic + .match__pic { margin-left: -18px; }
.match .reasons { text-align: left; }
.match__note { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); border: 2px solid var(--warn-border); font-size: var(--f-sm); }
.match__form { display: flex; flex-wrap: wrap; gap: 8px; }
.match__form input { flex: 1 1 200px; min-height: var(--tap); padding: 12px 16px; border-radius: 16px; border: 2px solid var(--border); background: var(--bg); color: var(--text); font-size: var(--f-md); }
.match__form button { flex: 1 1 120px; min-height: var(--tap); border-radius: 999px; background: var(--brand-grad); color: #fff; font-weight: 800; padding: 0 18px; }
.match__safety { margin: 0; color: var(--muted); font-size: var(--f-xs); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 60; width: max-content; max-width: calc(100vw - 32px); padding: 14px 20px; border-radius: 14px; background: #2b2420; color: #fff; font-weight: 700; font-size: var(--f-sm); text-align: center; 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: 4px 4px max(4px, env(safe-area-inset-bottom)); gap: 0; border-top: 1px solid var(--border); border-bottom: 0; box-shadow: 0 -4px 16px rgba(0,0,0,.08); overflow: visible; }
  .nav__item { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 2px; border-radius: 12px; font-size: calc(14px * var(--ts)); 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; height: 22px; font-size: 13px; }
  .tab--mobile { display: inline-block; }
  .net-banner, .demo-banner { padding: 6px 12px; text-align: left; 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: 8px 12px 10px; gap: 8px; }
  .deck { min-height: 260px; }
  .pad { width: 60px; height: 60px; }
  .pad--lg { width: 78px; height: 78px; }
  .view--page { padding: 18px 16px 32px; }
  .chat__head { padding: 10px 12px; gap: 10px; }
  .chat__avatar { width: 48px; height: 48px; }
  .chat__form { padding: 10px 12px 12px; gap: 6px; }
  .chat__send { padding: 0 14px; }
  .chat__send svg { display: none; }
  .icon-btn--soft { min-width: 44px; padding: 0 4px; }
  .toast { bottom: calc(var(--nav-h) + 12px); }
  .auth, .sheet { padding: 20px 18px; }
}
.btile__photo .card__badges { position: relative; z-index: 1; margin-bottom: auto; }
@media (min-width: 901px) { .panel .photo-grid { max-width: 480px; } }

.photo-review { position: absolute; left: 6px; right: 6px; bottom: 50px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.92); color: #33373d; font-size: 13px; font-weight: 800; text-align: center; }
.photo-review--no { background: #fde9e7; color: #8f1d17; }
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: 24px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 16px; }
.admin__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.admin__head h1 { margin: 0; font-size: var(--f-xl); color: var(--brand); }
.admin__body { display: grid; gap: 14px; }
.admin-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.admin-card--scam { border: 2px solid var(--warn-border); }
.admin-card__detail { font-style: italic; }
.admin-card__msgs { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.admin-card__msgs p { margin: 0; }
.admin-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-card__actions .btn { flex: 1 1 130px; }
.admin__photos { display: flex; flex-wrap: wrap; gap: 8px; }
.admin__photo { width: 90px; aspect-ratio: 3 / 4; border-radius: 10px; background: var(--surface-2) center/cover; }

/* ---------- 정보 페이지(약관·개인정보·환불·회사 정보·404) ---------- */
.doc-page { background: var(--bg); color: var(--text); }
.doc { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; font-size: 1.15rem; line-height: 1.75; }
.doc h1 { font-size: 1.8rem; margin: 12px 0; }
.doc h2 { font-size: 1.3rem; margin: 28px 0 8px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc__back a { font-size: 1.05rem; display: inline-flex; align-items: center; min-height: 44px; }
.doc__draft { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 12px; padding: 12px 14px; }
.doc__table { width: 100%; border-collapse: collapse; }
.doc__table th, .doc__table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc__table th { width: 40%; font-weight: 600; }
.info-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; font-size: 1rem; }
.info-links a { color: inherit; text-decoration: underline; padding: 6px 0; min-height: 40px; display: inline-flex; align-items: center; }

/* ---------- 소셜 로그인·이용권·문의 ---------- */
.welcome__or { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 14px 0 8px; }
.welcome__or::before, .welcome__or::after { content: ''; flex: 1; border-top: 1px solid currentColor; opacity: .35; }
.welcome__social { display: grid; gap: 10px; }
.btn--social { font-weight: 700; }
.btn--kakao { background: #fee500; color: #191919; border-color: #fee500; }
.btn--naver { background: #03c75a; color: #fff; border-color: #03c75a; }
.btn--google { background: #ffffff; color: #1f1f1f; border: 2px solid #747775; }
.notice { background: var(--surface-2, var(--surface)); border: 2px solid var(--like); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 1.1rem; }
.product-list, .order-list, .inquiry-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.product, .order { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.product__buy { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.product__price { font-size: 1.2rem; }
.status-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); font-size: .95rem; }
.status-chip--ok { border-color: var(--like); color: var(--like); font-weight: 700; }
.status-chip--no { border-color: var(--nope); color: var(--nope); font-weight: 700; }
.status-chip--muted { color: var(--muted); }
.inquiry { padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.inquiry__head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.inquiry__answer { background: var(--warn-bg); border-radius: 10px; padding: 8px 12px; margin-top: 8px; }
.small { font-size: .95rem; }
