/* YEONEN (가칭) — light theme. Card physics/stamp/gamepad rules ported from tinder-re/styles.css. */
:root {
  --bg: #fff8f6;
  --surface: #ffffff;
  --surface-2: #fff0ee;
  --line: #f1dedb;
  --text: #2a1f24;
  --muted: #8a7b80;
  --brand: #ff4f7b;
  --brand-2: #5b5bf0;
  --brand-grad: linear-gradient(135deg, #ff4f7b 0%, #ff7a59 45%, #5b5bf0 100%);
  --like: #19b77a;
  --nope: #ff4d6d;
  --super: #2f8cff;
  --rewind: #f5a623;
  --synthetic: #7c5cff;
  --warn: #b25b00;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(80, 30, 40, .12);
  --font: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans KR', 'Noto Sans JP', 'Malgun Gothic', 'Yu Gothic', Meiryo, system-ui, sans-serif;
  --top-h: 52px;
  --tab-h: 62px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(91, 91, 240, .45); outline-offset: 2px; border-radius: 8px; }

.brand { font-weight: 900; letter-spacing: -.02em; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 19px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.loading { color: var(--muted); text-align: center; padding: 32px 0; }
.loading--boot { padding-top: 40vh; }
.empty { color: var(--muted); text-align: center; padding: 36px 12px; }
.form-error { color: var(--nope); font-size: 14px; min-height: 1.2em; margin: 6px 0; }
.boot-error { padding: 40px 20px; text-align: center; display: grid; gap: 16px; justify-items: center; }

/* ---------- buttons / chips / badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: 999px; background: var(--brand-grad); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(255, 79, 123, .25); transition: transform .12s, opacity .12s; text-align: center; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn--ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn--small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn--danger { background: var(--nope); box-shadow: 0 4px 14px rgba(255, 77, 109, .25); }
.btn--danger-text { color: var(--nope); }
.btn--block { width: 100%; }
.btn--big { flex-direction: column; gap: 2px; width: 100%; padding: 16px 20px; border-radius: 20px; font-size: 18px; }
.btn--big small { font-weight: 500; font-size: 13px; opacity: .9; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.row-btns > .btn { flex: 1 1 140px; }
.row-btns--tight { justify-content: flex-start; margin-top: 8px; }
.row-btns--tight > .btn { flex: 0 1 auto; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn--soft { background: var(--surface); border: 1px solid var(--line); }
.link-btn { color: var(--brand-2); font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.link-btn--danger { color: var(--nope); }
.lang-toggle { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 700; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chips--scroll > * { flex: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 13px; border: 1px solid transparent; }
.chip small { color: var(--muted); }
.chip--shared { background: #e9f8f1; color: #0b7a50; border-color: #bfe9d5; font-weight: 700; }
.chip--pick { background: var(--surface); border-color: var(--line); min-height: 36px; padding: 6px 14px; }
.chip--pick:hover { border-color: var(--brand); }
.chip--on { background: var(--text); color: #fff; border-color: var(--text); }
.chip--lang { background: #eef0ff; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .01em; vertical-align: middle; white-space: nowrap; }
.badge--synthetic { background: #efe9ff; color: var(--synthetic); border: 1px solid #d9ccff; }
.badge--demo { background: #fff3d6; color: #8a5a00; border: 1px solid #f5dc9c; }
.badge--muted { background: #f3eeee; color: var(--muted); }
.badge--super { background: var(--super); color: #fff; }
.badge--xs { font-size: 10px; padding: 1px 6px; }

.note { font-size: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.note--synthetic { background: #f6f2ff; border-color: #e1d6ff; color: #5a3fc4; }
.note--demo { background: #fff8e6; border-color: #f5dc9c; color: #7a5200; }
.note--warn { background: #fff4e5; border-color: #ffd8a8; color: var(--warn); }
.note--super { background: #eaf3ff; border-color: #c8defe; color: #1660c4; }
.note--mutual { background: #eefaf4; border-color: #c8ecda; color: #0b7a50; }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-2); gap: 4px; }
.seg__btn, .seg--tabs a { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.seg__btn[aria-pressed='true'], .seg--tabs a[aria-selected='true'] { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.seg--scroll { display: flex; overflow-x: auto; max-width: 100%; }
.seg .chip--pick { border: 0; }
.seg .chip--on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; margin-left: 4px; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); }
.pill--pending { background: #fff3d6; color: #8a5a00; }
.pill--accepted { background: #e9f8f1; color: #0b7a50; }
.pill--declined { background: #f3eeee; color: var(--muted); }

/* ---------- forms ---------- */
.field { border: 0; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.field > legend, .field > span { font-weight: 800; font-size: 14px; padding: 0; margin-bottom: 8px; }
label.field > span { margin-bottom: 0; }
.field__note { margin: 0; font-size: 12px; color: var(--muted); }
.field--details summary { font-weight: 800; font-size: 14px; cursor: pointer; padding: 6px 0; }
.input { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
textarea.input { resize: vertical; min-height: 80px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.switch, .check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.switch input, .check input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; margin: 1px 0 0; }
.consents { display: grid; gap: 14px; background: var(--surface); padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); }
.genre { margin-bottom: 12px; }
.genre h4 { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.langs { display: grid; gap: 8px; }
.lang-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.age-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photo-slot, .photo-add { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; background: var(--surface-2) center / cover no-repeat; }
.photo-add { display: grid; place-items: center; border: 2px dashed var(--line); background: var(--surface); color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; text-align: center; padding: 6px; min-width: 0; overflow-wrap: anywhere; }
.photo-slot__main { position: absolute; left: 6px; top: 6px; background: var(--brand); color: #fff; font-size: 12px; padding: 2px 7px; border-radius: 999px; }
.photo-slot__btn { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; }
.photo-slot__btn--left { left: 6px; right: auto; }

/* ---------- landing / onboarding ---------- */
.landing, .onb { max-width: 520px; margin: 0 auto; padding: 16px 16px 40px; }
.landing__top, .onb__top { display: flex; align-items: center; gap: 8px; }
.landing__top .lang-toggle, .onb__top .lang-toggle { margin-left: auto; }
.landing__hero { text-align: center; padding: 28px 0 16px; }
.landing__art { font-size: 44px; display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 12px; }
.landing__heart { font-size: 34px; color: var(--brand); animation: beat 1.6s infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.2); } 30% { transform: scale(1); } }
.landing__hero h1 { font-size: 27px; letter-spacing: -.03em; }
.landing__lead { color: var(--muted); margin: 8px 0 16px; }
.landing__points { list-style: none; padding: 0; margin: 0 auto; display: grid; gap: 8px; text-align: left; max-width: 420px; }
.landing__points li { background: var(--surface); border: 1px solid var(--line); padding: 10px 14px 10px 38px; border-radius: 12px; position: relative; font-size: 14px; }
.landing__points li::before { content: '✓'; position: absolute; left: 14px; color: var(--like); font-weight: 900; }
.landing__actions { display: grid; gap: 4px; margin-top: 12px; }
.landing__auth { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 4px; margin-top: 12px; }
.landing__auth h2 { margin-bottom: 8px; }
.onb__progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 18px 0 6px; }
.onb__progress span { display: block; height: 100%; background: var(--brand-grad); transition: width .3s; }
.onb__count { color: var(--muted); font-size: 13px; margin: 0; }
.onb__title { font-size: 24px; margin: 4px 0 18px; letter-spacing: -.02em; }
.onb__nav { display: flex; justify-content: space-between; gap: 10px; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
.onb__nav .btn { min-width: 120px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-rows: var(--top-h) auto 1fr var(--tab-h); height: 100dvh; }
.side { display: none; }
.topbar { display: flex; align-items: center; gap: 8px; padding: 0 16px; background: rgba(255, 248, 246, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); z-index: 5; }
.topbar .lang-toggle { margin-left: auto; }
.offline { background: #fff4e5; color: var(--warn); font-size: 13px; text-align: center; padding: 6px; }
.main { min-height: 0; overflow-y: auto; position: relative; display: flex; flex-direction: column; }
.main__view { flex: 1 0 auto; display: flex; flex-direction: column; }
/* deck and chat fill exactly the space between the bars; their inner parts scroll */
.shell[data-section='discover'] .main__view, .shell[data-section='chat'] .main__view { flex: 1 1 0; min-height: 0; }
.tabbar { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); }
.tab[aria-current='page'] { color: var(--brand); }
.tab .count { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; }
.topbar { grid-row: 1; }
.banners { grid-row: 2; }
.main { grid-row: 3; }
.tabbar { grid-row: 4; }
.shell[data-section='chat'] .tabbar { display: none; }
.shell[data-section='chat'] { grid-template-rows: var(--top-h) auto 1fr 0; }

.view { display: flex; flex-direction: column; flex: 1 0 auto; }
.view__head { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 12px 16px 6px; }
.view__head h1 { font-size: 22px; letter-spacing: -.02em; }
.view__body { padding: 6px 16px 24px; flex: 1; min-height: 0; }

/* ---------- deck (ported) ---------- */
.view--discover { flex: 1 1 0; min-height: 0; }
.view--discover .view__body { display: flex; flex-direction: column; overflow-y: auto; }
.deck-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; min-height: 0; }
.deck { position: relative; width: min(420px, 100%); flex: 1; min-height: 340px; max-height: 680px; }
.card { position: absolute; inset: 0; border-radius: 20px; overflow: hidden; background: #2a1f24; box-shadow: var(--shadow); touch-action: none; user-select: none; will-change: transform; transform-origin: 50% 90%; color: #fff; }
.card--behind { transform: scale(.95) translateY(10px); filter: brightness(.85); 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: 8px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 2; }
.card__bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .4); }
.card__bar--on { background: #fff; }
.card__tap { position: absolute; top: 0; bottom: 40%; width: 50%; z-index: 1; }
.card__tap--prev { left: 0; }
.card__tap--next { right: 0; }
.card__badges { position: absolute; top: 20px; left: 12px; z-index: 3; display: flex; gap: 6px; flex-wrap: wrap; }
.card__info { position: absolute; left: 0; right: 0; bottom: 0; padding: 120px 16px 18px; background: linear-gradient(transparent, rgba(20, 10, 14, .88) 50%); z-index: 2; }
.card__title { display: flex; align-items: baseline; gap: 8px; }
.card__name { font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.card__age { font-size: 20px; }
.card__meta { margin-top: 4px; font-size: 14px; opacity: .95; }
.card__reasons { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.card__reasons li { background: rgba(255, 255, 255, .16); border-radius: 10px; padding: 4px 10px; width: fit-content; max-width: 100%; }
.card__info .chip { background: rgba(255, 255, 255, .18); color: #fff; }
.card__info .chip--shared { background: rgba(25, 183, 122, .9); color: #fff; border-color: transparent; }
.card__open { position: absolute; right: 12px; bottom: 120px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .25); z-index: 3; color: #fff; }
.card__detail { position: absolute; inset: 0; z-index: 5; overflow-y: auto; background: var(--surface); color: var(--text); touch-action: pan-y; display: flex; flex-direction: column; }
.card__close { position: sticky; top: 10px; align-self: flex-end; flex: none; margin: 10px 10px -50px 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-grad); color: #fff; z-index: 2; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.card__detail .detail__photo { aspect-ratio: auto; height: 46%; min-height: 180px; max-height: 300px; }
.stamp { position: absolute; top: 56px; z-index: 4; padding: 4px 12px; border: 4px solid; border-radius: 10px; font-size: 32px; font-weight: 900; letter-spacing: .04em; opacity: 0; pointer-events: none; background: rgba(255, 255, 255, .1); }
.stamp--like { left: 18px; color: var(--like); transform: rotate(-14deg); }
.stamp--nope { right: 18px; color: var(--nope); transform: rotate(14deg); }
.stamp--super { left: 50%; top: auto; bottom: 200px; color: var(--super); transform: translateX(-50%) rotate(-8deg); font-size: 28px; }
.deck-empty { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; padding: 16px; background: var(--surface); border-radius: 20px; border: 1px dashed var(--line); }
.deck-empty p { margin: 0; }
.deck-empty__pulse { width: 110px; height: 110px; margin: 0 auto 8px; border-radius: 50%; background: var(--brand-grad); display: grid; place-items: center; color: #fff; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 79, 123, .45); } 100% { box-shadow: 0 0 0 36px rgba(255, 79, 123, 0); } }
.gamepad { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; }
.pad { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: 0 3px 12px rgba(80, 30, 40, .15); transition: transform .12s; font-size: 22px; }
.pad--lg { width: 64px; height: 64px; font-size: 28px; }
.pad:hover, .pad--hot { transform: scale(1.1); }
.pad:active { transform: scale(.92); }
.pad:disabled { opacity: .35; transform: none; cursor: default; }
.pad--rewind { color: var(--rewind); }
.pad--nope { color: var(--nope); }
.pad--super { color: var(--super); }
.pad--like { color: var(--like); }
.deck-quota { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.deck-keys { display: none; margin: 4px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- profile detail ---------- */
.detail__photos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.detail__photo { flex: none; width: 100%; aspect-ratio: 4 / 5; max-height: 52vh; background: center / cover no-repeat; scroll-snap-align: start; }
.detail__body { padding: 16px 18px 20px; }
.detail__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.detail__head h2 { font-size: 24px; margin-right: 4px; }
.detail__age { font-weight: 400; font-size: 20px; }
.detail__meta { color: var(--muted); font-size: 14px; margin: 6px 0; }
.detail__bio { white-space: pre-wrap; margin: 10px 0; }
.detail__body h3 { font-size: 13px; color: var(--muted); margin: 16px 0 8px; text-transform: uppercase; letter-spacing: .03em; }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.reasons li { display: flex; gap: 8px; align-items: flex-start; background: var(--surface-2); border-radius: 10px; padding: 7px 10px; font-size: 14px; }
.detail__safety { display: flex; gap: 8px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.detail__actions { position: sticky; bottom: 0; display: flex; gap: 18px; justify-content: center; padding: 12px; background: linear-gradient(transparent, var(--surface) 40%); }

/* ---------- likes ---------- */
.like-list { display: grid; gap: 12px; }
.like-card { display: grid; grid-template-columns: 96px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.like-card__photo { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; background: var(--surface-2) center / cover no-repeat; }
.like-card__photo .badge { position: absolute; top: 6px; left: 6px; }
.like-card__name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.like-card .reasons { margin-top: 6px; }
.like-card .reasons li { font-size: 12px; padding: 4px 8px; }

/* ---------- search ---------- */
.search-tags { display: grid; gap: 8px; margin-bottom: 10px; }
.search-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.search-filters input[type=search] { grid-column: 1 / -1; }
.search-filters [data-reset] { grid-column: 1 / -1; justify-self: end; }
.search-count { font-weight: 800; margin: 6px 0; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.thumb { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--surface-2) center / cover no-repeat; text-align: left; color: #fff; box-shadow: 0 2px 10px rgba(80, 30, 40, .1); }
.thumb::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(20, 10, 14, .82)); }
.thumb__badges { position: absolute; top: 8px; left: 8px; z-index: 1; }
.thumb__info { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 1; display: grid; font-size: 14px; }
.thumb__info small { font-size: 12px; opacity: .9; }

/* ---------- dates ---------- */
.date-list { display: grid; gap: 12px; }
.date-card { display: grid; grid-template-columns: 84px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.date-card--mine { grid-template-columns: 1fr; }
.date-card__photo { display: block; aspect-ratio: 3 / 4; border-radius: 12px; background: var(--surface-2) center / cover no-repeat; }
.date-card__body { display: grid; gap: 4px; align-content: start; min-width: 0; }
.date-card__genre { font-weight: 800; }
.date-card__comment { margin: 4px 0; font-size: 14px; background: var(--surface-2); padding: 8px 10px; border-radius: 10px; }
.date-card__foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; flex-wrap: wrap; }
.post-form, .my-post { max-width: 640px; }
.my-post h2 { font-size: 18px; margin-bottom: 10px; }
.my-post h3 { font-size: 15px; margin: 18px 0 10px; }

/* ---------- messages ---------- */
.list-title { font-size: 13px; color: var(--muted); margin: 10px 0 8px; }
.new-matches { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.new-match { flex: none; width: 76px; display: grid; gap: 4px; justify-items: center; font-size: 12px; font-weight: 700; }
.new-match__pic { position: relative; width: 72px; height: 96px; border-radius: 12px; background: var(--surface-2) center / cover no-repeat; border: 2px solid transparent; }
.new-match[aria-current='true'] .new-match__pic { border-color: var(--brand); }
.new-match__name { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expiry { position: absolute; left: 4px; top: 4px; background: rgba(0, 0, 0, .6); color: #ffd36b; font-size: 10px; padding: 1px 5px; border-radius: 6px; }
.convos { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.convo { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; }
.convo:hover, .convo[aria-current='true'] { background: var(--surface-2); }
.convo__pic { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2) center / cover no-repeat; }
.dot { position: absolute; top: 0; right: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid var(--surface); }
.convo__text { min-width: 0; display: grid; }
.convo__name { font-weight: 800; display: flex; align-items: center; gap: 6px; }
.convo__last { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo__last--unread { color: var(--text); font-weight: 700; }

/* ---------- chat (ported layout) ---------- */
.view--chat { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.chat__head { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.chat__who { flex: 1; display: flex; align-items: center; gap: 10px; text-align: left; min-width: 0; }
.chat__who > span:last-child { min-width: 0; display: grid; }
.chat__pic { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2) center / cover no-repeat; }
.chat__name { font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chat__name small { font-weight: 400; color: var(--muted); }
.chat__sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.chat__matched, .chat__system { text-align: center; color: var(--muted); font-size: 12px; margin: 4px 0 8px; }
.chat__system { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; align-self: center; color: var(--text); }
.bubble-row { display: grid; max-width: min(78%, 480px); gap: 2px; }
.bubble-row--me { align-self: flex-end; justify-items: end; }
.bubble-row--them { align-self: flex-start; justify-items: start; }
.bubble { padding: 9px 14px; border-radius: 18px; white-space: pre-wrap; word-break: break-word; }
.bubble--me { background: var(--brand-grad); color: #fff; border-bottom-right-radius: 6px; }
.bubble--them { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble--sending { opacity: .6; }
.bubble--failed { background: #ffd9df; color: #8d1d33; }
.bubble__meta { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); }
.translate-note { font-size: 12px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; padding: 6px 10px; }
.typing { color: var(--muted); font-size: 13px; margin: 0; }
.openers { display: grid; gap: 8px; margin-top: 12px; }
.openers__label { margin: 0; font-size: 12px; color: var(--muted); }
.opener { display: grid; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.opener small { color: var(--muted); font-size: 12px; }
.opener:hover { border-color: var(--brand); }
.chat__form { flex: none; display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--surface); padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.chat__input { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 11px 16px; border-radius: 22px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.chat__send { width: 48px; height: 44px; border-radius: 22px; background: var(--brand-grad); color: #fff; display: grid; place-items: center; flex: none; }
.chat-gone { margin: auto; text-align: center; display: grid; gap: 14px; justify-items: center; padding: 40px 16px; color: var(--muted); }

/* ---------- modal / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(42, 31, 36, .55); backdrop-filter: blur(4px); padding: 16px; }
.modal__box { position: relative; width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); animation: pop .25s cubic-bezier(.2, .9, .3, 1.2); }
.modal__box--profile { padding: 0; max-width: 480px; }
.modal__box--sheet { max-width: 560px; }
.modal__box--menu { max-width: 340px; padding: 8px; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__title { font-size: 20px; margin-bottom: 10px; }
.modal__text { color: var(--muted); margin: 0 0 6px; }
.match { text-align: center; }
.match h3 { font-size: 13px; color: var(--muted); margin: 14px 0 8px; text-align: left; }
.match .reasons { text-align: left; }
.match__title { font-size: 34px; font-weight: 900; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.match__sub { color: var(--muted); margin: 4px 0 16px; }
.match__pair { display: flex; justify-content: center; }
.match__pic { width: 104px; height: 104px; border-radius: 50%; border: 4px solid #fff; box-shadow: var(--shadow); background: var(--surface-2) center / cover no-repeat; }
.match__pic + .match__pic { margin-left: -16px; }
.menu { display: grid; }
.menu__item { text-align: left; padding: 14px; border-radius: 12px; font-weight: 700; }
.menu__item:hover { background: var(--surface-2); }
.menu__item--danger { color: var(--nope); }
.tips { padding-left: 20px; display: grid; gap: 8px; }
.evidence { display: grid; gap: 8px; max-height: 180px; overflow-y: auto; }
.evidence .check span { background: var(--surface-2); padding: 6px 10px; border-radius: 10px; font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 16px); transform: translate(-50%, 20px); z-index: 60; padding: 10px 16px; border-radius: 12px; background: var(--text); color: #fff; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast[data-kind='error'] { background: #b3123a; }
.toast--on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- me ---------- */
.me-edit { max-width: 640px; }
.me-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 2px; margin: 12px 0; }
.save-bar { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
.account { max-width: 640px; display: grid; gap: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel h3 { font-size: 15px; margin-bottom: 8px; }
.panel p { margin: 6px 0; }
.cred { display: grid; gap: 8px; margin-top: 10px; }
.blocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.blocks li { display: flex; align-items: center; gap: 10px; }
.blocks li > span:nth-child(2) { flex: 1; }
.blocks__pic { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2) center / cover no-repeat; flex: none; }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  .shell, .shell[data-section='chat'] { grid-template-columns: 320px 1fr; grid-template-rows: auto 1fr; }
  .topbar, .tabbar { display: none; }
  .banners { grid-column: 2; grid-row: 1; }
  .main { grid-column: 2; grid-row: 2; }
  .side { display: flex; flex-direction: column; grid-row: 1 / -1; min-height: 0; border-right: 1px solid var(--line); background: var(--surface); }
  .side__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; }
  .me-chip { display: flex; align-items: center; gap: 10px; margin: 4px 12px 8px; padding: 10px; border-radius: 14px; background: var(--surface-2); }
  .me-chip > span:last-child { display: grid; gap: 2px; justify-items: start; }
  .me-chip__pic { width: 44px; height: 44px; border-radius: 50%; background: var(--line) center / cover no-repeat; flex: none; }
  .side__nav { display: grid; gap: 2px; padding: 4px 8px 10px; border-bottom: 1px solid var(--line); }
  .nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-weight: 700; color: var(--muted); }
  .nav-item:hover { background: var(--surface-2); color: var(--text); }
  .nav-item[aria-current='page'] { background: var(--text); color: #fff; }
  .nav-item .count { margin-left: auto; }
  .side__list { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
  .side__list .empty { padding: 18px 8px; font-size: 13px; }
  .side__stage { margin: 0; padding: 10px 16px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }
  .view__head { padding: 22px 32px 8px; }
  .view__body { padding: 8px 32px 32px; }
  .deck { width: 400px; max-height: 640px; }
  .deck-keys { display: block; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .search-filters { grid-template-columns: repeat(4, 1fr) 2fr auto; }
  .search-filters input[type=search], .search-filters [data-reset] { grid-column: auto; }
  .like-list, .date-list { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
  .view--chat .chat__back { display: none; }
  .toast { bottom: 28px; }
  .view--messages .view__body { max-width: 720px; }
}
@media (prefers-reduced-motion: reduce) {
  .card--settle, .card--fly, .card--behind { transition-duration: .01s; }
  .deck-empty__pulse, .landing__heart, .modal__box { animation: none; }
}

/* ---------- moderation ---------- */
.standing { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; font-size: 13px; font-weight: 700; background: #fff4e5; color: var(--warn); border-bottom: 1px solid #ffd8a8; }
.standing--suspended, .standing--banned { background: #ffe3e8; color: #9b1235; border-color: #ffc2cd; }
.ops-list { display: grid; gap: 12px; margin-top: 12px; max-width: 860px; }
.ops-card__head { margin-bottom: 4px; }
.ops-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.ops-form input { grid-column: 1 / -1; }
.ops-form button { grid-column: 1 / -1; justify-self: end; }
.evidence-list { margin: 4px 0 8px; padding-left: 18px; font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--surface-2); padding: 8px 10px; border-radius: 10px; word-break: break-all; }

/* ---- info / legal / contact pages (fork) ---- */
.info { max-width: 760px; margin: 0 auto; padding: 12px 16px 48px; min-width: 0; }
.info__top { display: flex; align-items: center; gap: 10px; padding: 4px 0 12px; }
.info__title { flex: 1; min-width: 0; font-size: 20px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.info__top .lang-toggle { margin-left: auto; }
.info__lead { color: var(--muted); margin: 0 0 14px; }
.legal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; overflow-wrap: anywhere; }
.legal__draft { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #fff4e5; color: var(--warn); font-weight: 700; font-size: 13px; border: 1px solid #f5d9b0; }
.legal__meta { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.legal__toc { margin: 0 0 16px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.legal__toc ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.legal__toc .link-btn { font-size: 13px; text-align: left; }
.legal__sec { padding: 12px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--top-h) + 8px); }
.legal__sec h2 { font-size: 16px; margin-bottom: 6px; }
.legal__sec p { margin: 6px 0; line-height: 1.65; }
.legal__sec ul { margin: 6px 0; padding-left: 20px; display: grid; gap: 4px; line-height: 1.6; }
.legal__rows { margin: 6px 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.legal__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 8px 12px; border-top: 1px solid var(--line); }
.legal__row:first-child { border-top: 0; }
.legal__row dt { font-weight: 700; font-size: 13px; color: var(--muted); }
.legal__row dd { margin: 0; min-width: 0; }
mark.tbd { background: #fff1b8; color: #6b4e00; border-radius: 4px; padding: 0 3px; font-weight: 700; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.info-index { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.info-index__item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.info-index__item span { color: var(--muted); font-size: 20px; }
.info-footer { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); }
.info-footer nav { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; }
.info-footer a { font-size: 12px; color: var(--muted); padding: 6px 0; text-decoration: underline; text-underline-offset: 2px; }
.contact-form { display: grid; gap: 4px; margin-bottom: 18px; }
.contact-form .field { margin-bottom: 12px; }
.contact-form__body { min-height: 140px; }
.contact-form__meta { display: flex; justify-content: space-between; gap: 8px; }
.contact-form__count { font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.contact-form__error { margin: 0 0 8px; color: var(--nope); font-size: 13px; font-weight: 700; }
.contact__notice { display: grid; gap: 10px; justify-items: start; }
.contact__notice p { margin: 0; }
.contact-history h2 { font-size: 16px; margin: 4px 0 10px; }
.inquiry-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.inquiry { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.inquiry__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.inquiry__head .muted { margin-left: auto; }
.inquiry__status--answered { background: #e6f7ef; color: #0f7a50; }
.inquiry__status--closed { background: #f3eeee; color: var(--muted); }
.inquiry__body { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.inquiry__answer { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.inquiry__answer p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.notfound { max-width: 520px; margin: 0 auto; padding: 48px 20px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.notfound__art { font-size: 52px; }
.notfound h1 { font-size: 22px; }
.notfound p { margin: 0; }
.notfound .info-footer { width: 100%; }
@media (min-width: 720px) {
  .legal { padding: 24px 28px; }
  .legal__row { grid-template-columns: 180px minmax(0, 1fr); gap: 16px; }
  .info__title { font-size: 24px; }
}

/* ---- accounts / social login / store / purchases ---- */
.landing__or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0 6px; }
.landing__or::before, .landing__or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.landing__social-title { font-size: 15px; margin: 6px 0 8px; }
.social { display: grid; gap: 8px; }
.btn--social { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 8px 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700; box-shadow: none; text-align: left; }
.btn--social small { font-weight: 500; color: inherit; opacity: .75; font-size: 12px; }
.social__mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-weight: 900; font-size: 15px; background: var(--surface-2); }
.btn--google .social__mark { background: #fff; border: 1px solid #dadce0; color: #4285f4; }
.btn--kakao { background: #fee500; border-color: #fee500; color: rgba(0, 0, 0, .85); }
.btn--kakao .social__mark { background: rgba(0, 0, 0, .08); }
.btn--naver { background: #03c75a; border-color: #03c75a; color: #fff; }
.btn--naver .social__mark { background: rgba(255, 255, 255, .2); }
.btn--social:disabled { cursor: not-allowed; background: var(--surface-2); border-color: var(--line); color: var(--muted); }
.btn--social:disabled .social__mark { background: var(--surface); color: var(--muted); }
.subnav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 14px; }
.subnav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.subnav a[aria-current='page'] { color: var(--text); font-weight: 800; border-bottom: 2px solid currentColor; }
.account__extra { display: grid; gap: 14px; margin-bottom: 14px; }
.logins { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.logins__item { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.logins__item > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.products, .orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.product h3, .order b { margin: 0; overflow-wrap: anywhere; }
.product__buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.order__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order__no { font-size: 11px; overflow-wrap: anywhere; font-family: ui-monospace, monospace; }
.view__head:has(.subnav) { flex-wrap: wrap; }
.subnav { flex-basis: 100%; }
.ops-form--answer { grid-template-columns: 1fr; }
.ops-form--answer .btn { justify-self: end; }
.pill--pending { background: #fff5dc; color: #8a5a00; }
.empty-state { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty-state h3 { color: var(--text); margin: 0 0 6px; }
.empty-state .btn { margin-top: 12px; }
.pay-result { text-align: center; padding: 8px 4px; }
.pay-result h2 { margin: 0 0 8px; }
.pay-result--ok h2::before { content: '✓ '; color: #0b7a50; }
.pay-result--fail h2::before { content: '! '; color: #b23b3b; }
