/* 곁 — 밀크티 브라운 (NJ 선택 2026-11-25) · 기억할 한 가지: 등불
   글자: 이야기(주제·글)는 고운바탕(책·편지), 화면 장치는 프리텐다드 */
:root {
  --foam: #f8efe4;      /* 우유거품: 바탕 */
  --tea: #ead6c0;       /* 밀크티: 칩·트랙 */
  --tea-2: #f2e3d1;
  --bark: #3a2619;      /* 나무껍질: 글자 */
  --bark-2: #7a6350;    /* 흐린 글자 */
  --roast: #8a4b22;     /* 로스팅: 강조·버튼 */
  --honey: #e8a256;     /* 꿀빛: 등불 */
  --sage: #5d7f5e;      /* 세이지: 안전·긍정 */
  --rose: #a8443a;      /* 경고 */
  --paper: #fffaf4;     /* 편지지 */
  --line: rgba(58, 38, 25, .11);
  --lift: 0 1px 0 rgba(255,255,255,.8) inset, 0 10px 30px -14px rgba(90, 50, 20, .28);
  --serif: "Gowun Batang", "Noto Serif KR", serif;
  --sans: "Pretendard Variable", Pretendard, "Noto Sans KR", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --foam: #1c1510; --tea: #3a2a1f; --tea-2: #2a1f17; --bark: #f5ebe0; --bark-2: #c2ab96;
    --roast: #e9a76a; --honey: #f0b06a; --sage: #8fc08f; --rose: #ff9d90; --paper: #251c15;
    --line: rgba(255, 240, 225, .1); --lift: 0 10px 30px -14px rgba(0,0,0,.6);
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh; color: var(--bark); font-family: var(--sans); font-size: 16px; line-height: 1.6;
  background: var(--foam); -webkit-font-smoothing: antialiased; letter-spacing: -.01em;
}
body::before { /* 종이 결 */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .18 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, textarea, select { font: inherit; color: var(--bark); }
:focus-visible { outline: 2.5px solid var(--honey); outline-offset: 3px; border-radius: 10px; }
::selection { background: var(--honey); color: #2a1608; }

.app { max-width: 560px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 20px 120px; position: relative; z-index: 1; }
.loading { padding: 42vh 0; text-align: center; color: var(--bark-2); font-family: var(--serif); }
.glow { display: none; }

/* ---------- 머리 ---------- */
.top { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 18px; }
.logo { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.logo .flame { width: 10px; height: 14px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #fff3d6, var(--honey) 55%, var(--roast)); box-shadow: 0 0 14px 4px rgba(232,162,86,.55); animation: flick 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes flick { 0%,100% { transform: scale(1) rotate(-2deg); } 40% { transform: scale(1.08, .94) rotate(2deg); } 70% { transform: scale(.95, 1.06) rotate(-1deg); } }
.online { font-size: 13px; color: var(--bark-2); display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--paper); box-shadow: var(--lift); }
.online i { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 0 rgba(93,127,94,.5); animation: ping 2.4s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(93,127,94,0); } 100% { box-shadow: 0 0 0 0 rgba(93,127,94,0); } }
.online b { color: var(--bark); }

/* ---------- 등불 (첫 화면의 한 가지) ---------- */
.lamp {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 32px; padding: 30px 24px 26px; margin-bottom: 30px;
  background: linear-gradient(165deg, #4a2f1f 0%, #2c1b12 100%); color: #fbeedd;
  box-shadow: 0 30px 60px -30px rgba(60, 30, 10, .7), 0 1px 0 rgba(255,255,255,.08) inset;
}
.lamp::before { /* 빛 */
  content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; right: -150px; top: -170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 150, calc(.35 + var(--glow, .3))) 0%, rgba(232,162,86,.22) 35%, transparent 68%);
  animation: light-on 1.6s var(--ease) both, breathe 7s ease-in-out 1.6s infinite;
}
.lamp::after { /* 창틀 그림자 */
  content: ""; position: absolute; z-index: -1; inset: 0; opacity: .5;
  background: repeating-linear-gradient(115deg, transparent 0 46px, rgba(0,0,0,.08) 46px 48px);
  mask-image: linear-gradient(200deg, #000, transparent 60%); -webkit-mask-image: linear-gradient(200deg, #000, transparent 60%);
}
@keyframes light-on { 0% { opacity: 0; transform: scale(.6); } 18% { opacity: .7; } 26% { opacity: .2; } 40% { opacity: 1; transform: scale(1); } 100% { opacity: 1; } }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .85; } }
.lamp .bulb { position: absolute; right: 28px; top: 26px; width: 40px; height: 56px; }
.lamp .bulb::before { content: ""; position: absolute; left: 50%; top: -40px; width: 1.5px; height: 46px; background: rgba(255,240,220,.35); }
.lamp .bulb span { position: absolute; inset: 6px 4px 0; border-radius: 50% 50% 46% 46% / 40% 40% 60% 60%; background: radial-gradient(circle at 50% 62%, #fffaf0 0 18%, #ffd79a 40%, rgba(232,162,86,.25) 75%); box-shadow: 0 0 28px 10px rgba(255, 200, 120, .45); animation: bulb-on 1.6s var(--ease) both; }
@keyframes bulb-on { 0%, 12% { opacity: 0; } 18% { opacity: 1; } 24% { opacity: .2; } 34%, 100% { opacity: 1; } }
.lamp .when { font-size: 13px; color: rgba(251,238,221,.7); }
.lamp h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(27px, 7.6vw, 34px); line-height: 1.32; letter-spacing: -.02em; margin: 10px 0 14px; max-width: 13em; word-break: keep-all; text-wrap: balance; }
.lamp .sub { font-size: 14px; color: rgba(251,238,221,.72); }
.lamp .sub b { color: #ffd79a; font-weight: 600; }
.lamp .btn { margin-top: 22px; background: #fbeedd; color: #2c1b12; box-shadow: 0 10px 30px -8px rgba(255, 200, 120, .55); }
.faces { display: flex; margin-top: 18px; align-items: center; gap: 10px; font-size: 13px; color: rgba(251,238,221,.7); }
.faces span { display: flex; }
.faces span i { width: 26px; height: 26px; border-radius: 50%; margin-left: -8px; border: 2px solid #3a2418; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; color: #3a2418; }
.faces span i:first-child { margin-left: 0; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px;
  border-radius: 999px; font-weight: 700; font-size: 15.5px; background: var(--roast); color: #fff8ef;
  box-shadow: 0 12px 24px -12px rgba(138, 75, 34, .8), 0 1px 0 rgba(255,255,255,.25) inset;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .2s;
}
.btn:active { transform: scale(.96); }
.btn.ghost { background: var(--paper); color: var(--bark); box-shadow: var(--lift); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .4; pointer-events: none; }

/* ---------- 이야기방 목록 ---------- */
h2.sec { font-family: var(--serif); font-size: 20px; font-weight: 700; margin: 6px 0 14px; letter-spacing: -.02em; }
.rooms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.room {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 24px; min-height: 150px;
  background: var(--paper); box-shadow: var(--lift); transition: transform .2s var(--ease);
}
.room:first-child { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; }
.room:active { transform: scale(.97); }
.ic { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: var(--c, var(--tea)); flex: none; }
.ic svg { width: 24px; height: 24px; fill: none; stroke: var(--bark); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.room b { font-size: 16px; display: block; line-height: 1.35; font-weight: 700; word-break: keep-all; }
.room em { font-style: normal; font-size: 13px; color: var(--bark-2); display: block; margin-top: 2px; word-break: keep-all; }
.live { margin-top: auto; font-size: 12px; color: var(--sage); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.room:first-child .live { margin: 0 0 0 auto; }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.live.quiet { color: var(--bark-2); }
.live.quiet::before { display: none; }

.promise { margin-top: 30px; padding: 22px; border-radius: 24px; background: var(--tea-2); font-size: 14.5px; line-height: 1.75; color: var(--bark-2); }
.promise h3 { font-family: var(--serif); font-size: 18px; color: var(--bark); margin-bottom: 8px; }
.promise a { display: inline-block; margin-top: 10px; color: var(--roast); font-weight: 700; }

/* ---------- 이야기방 ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--bark-2); margin: 0 0 14px -6px; min-height: 40px; padding: 0 6px; }
.back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.rhead .rname { font-size: 13px; color: var(--roast); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.rhead .rname .ic { width: 30px; height: 30px; border-radius: 10px; }
.rhead .rname .ic svg { width: 17px; height: 17px; }
.rhead h1 { font-family: var(--serif); font-size: clamp(25px, 7vw, 30px); font-weight: 700; line-height: 1.35; margin-top: 12px; letter-spacing: -.02em; word-break: keep-all; text-wrap: balance; }
.rule { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 18px; }
.rule > span { font-size: 12.5px; color: var(--sage); background: rgba(93,127,94,.1); border-radius: 999px; padding: 6px 11px; font-weight: 600; }
.write { background: var(--paper); border-radius: 24px; padding: 16px; margin-bottom: 22px; box-shadow: var(--lift); transition: box-shadow .2s; }
.write:focus-within { box-shadow: 0 0 0 2px var(--honey), var(--lift); }
.write textarea { width: 100%; border: 0; background: transparent; resize: none; min-height: 84px; font-family: var(--serif); font-size: 16.5px; line-height: 1.75; outline: none; }
.write textarea::placeholder { color: var(--bark-2); opacity: .75; }
.write .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.write .count { font-size: 12px; color: var(--bark-2); font-variant-numeric: tabular-nums; }

/* 세 가지 마음 */
.reacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.react { display: inline-flex; align-items: center; gap: 3px; min-height: 36px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; letter-spacing: -.02em; color: var(--bark-2); background: var(--tea-2); transition: transform .2s var(--ease), background .2s, color .2s; }
.react b { color: var(--bark); font-variant-numeric: tabular-nums; }
.react:active { transform: scale(.94); }
.react.on { background: var(--roast); color: #fff8ef; font-weight: 700; animation: pop .45s var(--ease); }
.react.on b { color: #fff8ef; }
.react.ro { background: transparent; padding: 0 6px; font-size: 12.5px; }

/* 글 = 편지 */
.msg { position: relative; background: var(--paper); border-radius: 22px; padding: 18px 18px 10px; margin-bottom: 12px; box-shadow: var(--lift); }
.msg .who { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.msg .who .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #3a2418; flex: none; }
.msg .who b { font-size: 14px; font-weight: 700; }
.msg .who small { font-size: 12px; color: var(--bark-2); }
.msg .who .from { font-size: 11px; color: var(--roast); background: var(--tea-2); border-radius: 999px; padding: 2px 8px; font-weight: 600; }
.msg .body { font-family: var(--serif); font-size: 16.5px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.msg.mine { background: linear-gradient(160deg, #fff4e4, var(--paper)); box-shadow: 0 0 0 1.5px rgba(232,162,86,.45), var(--lift); }
.msg.held { opacity: .72; box-shadow: 0 0 0 1.5px dashed var(--line); }
.held-note { font-size: 12px; color: var(--rose); margin-bottom: 8px; display: flex; gap: 6px; }
.acts { display: flex; gap: 2px; margin: 8px -8px 0; }
.acts button { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--bark-2); padding: 0 10px; border-radius: 999px; min-height: 38px; transition: background .15s, color .15s; }
.acts button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acts button:active { background: var(--tea-2); }
.acts button.on { color: var(--roast); font-weight: 700; }
.acts button.on svg { fill: var(--honey); stroke: var(--roast); animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.35) rotate(-8deg); } }
.acts .end { margin-left: auto; }
.replies { margin: -4px 0 14px 22px; padding-left: 14px; border-left: 2px solid var(--tea); }
.replies .msg { padding: 14px 14px 6px; border-radius: 18px; }
.replies .msg .body { font-size: 15.5px; }
.care { margin: 12px 0 4px; padding: 13px 14px; border-radius: 16px; background: rgba(93,127,94,.1); font-size: 14px; line-height: 1.65; color: var(--bark); }
.care a { color: var(--sage); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.ai-bar { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--bark-2); background: var(--tea-2); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; }
.ai-bar svg { width: 18px; height: 18px; stroke: var(--sage); fill: none; stroke-width: 2; flex: none; }
.empty { text-align: center; color: var(--bark-2); padding: 34px 10px; font-size: 15px; line-height: 1.75; font-family: var(--serif); }

/* ---------- 내 곁 ---------- */
.page-title { font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 6px; }
.page-sub { color: var(--bark-2); font-size: 14px; margin-bottom: 16px; }
.people { display: flex; gap: 8px; overflow-x: auto; padding: 2px 20px 12px; margin: 0 -20px; scrollbar-width: none; }
.people::-webkit-scrollbar { display: none; }
.people button { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--paper); box-shadow: var(--lift); font-size: 14px; min-height: 44px; }
.people button .av { width: 32px; height: 32px; }
.people button.on { background: var(--bark); color: var(--foam); font-weight: 700; }
.bondcard { position: relative; overflow: hidden; border-radius: 32px; padding: 28px 22px 24px; background: var(--paper); box-shadow: var(--lift); text-align: center; margin-top: 4px; }
.candle { position: relative; width: 200px; height: 200px; margin: 0 auto 16px; display: grid; place-items: center; }
.candle svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.candle circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.candle .track { stroke: var(--tea-2); }
.candle .fill { stroke: url(#g); transition: stroke-dashoffset 1.2s var(--ease); filter: drop-shadow(0 0 6px rgba(232,162,86,.6)); }
.candle .mid { text-align: center; position: relative; }
.candle .mid b { font-family: var(--serif); font-size: 44px; font-weight: 700; display: block; line-height: 1.05; font-variant-numeric: tabular-nums; }
.candle .mid small { font-size: 13px; color: var(--bark-2); }
.bondcard h1 { font-family: var(--serif); font-size: 22px; line-height: 1.45; letter-spacing: -.02em; word-break: keep-all; text-wrap: balance; }
.bondcard .quote { font-family: var(--serif); font-size: 15px; color: var(--bark-2); margin-top: 8px; }
.steps { margin-top: 16px; display: grid; gap: 8px; }
.step { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--paper); box-shadow: var(--lift); font-size: 14.5px; }
.step .dot { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 2px solid var(--tea); }
.step.done .dot { background: var(--sage); border-color: var(--sage); }
.step.done .dot::after { content: ""; width: 9px; height: 5px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.step em { margin-left: auto; font-style: normal; font-size: 13px; color: var(--bark-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.note { font-size: 13px; color: var(--bark-2); text-align: center; margin-top: 14px; line-height: 1.7; }

/* ---------- 1:1 ---------- */
.chat { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 96px; }
.bubble { max-width: 82%; padding: 11px 15px; border-radius: 20px 20px 20px 6px; background: var(--paper); box-shadow: var(--lift); font-family: var(--serif); font-size: 16px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.bubble.mine { align-self: flex-end; border-radius: 20px 20px 6px 20px; background: var(--roast); color: #fff8ef; box-shadow: none; }
.sendbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(88px + env(safe-area-inset-bottom)); width: min(520px, calc(100% - 32px)); display: flex; gap: 8px; z-index: 5; padding: 6px; border-radius: 999px; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--lift); }
.sendbar input { flex: 1; min-height: 44px; border: 0; background: transparent; padding: 0 14px; outline: none; font-size: 16px; }
.sendbar .btn { flex: none; white-space: nowrap; }

/* ---------- 폼 ---------- */
.card { background: var(--paper); border-radius: 26px; padding: 22px 20px; margin-bottom: 14px; box-shadow: var(--lift); }
.welcome { font-family: var(--serif); font-size: clamp(26px, 7.4vw, 32px); line-height: 1.35; font-weight: 700; letter-spacing: -.02em; margin: 8px 0 8px; word-break: keep-all; text-wrap: balance; }
.welcome-sub { color: var(--bark-2); font-size: 15px; margin-bottom: 22px; line-height: 1.7; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.field small { display: block; font-size: 12px; color: var(--bark-2); margin-top: 5px; }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--foam); padding: 12px 16px; outline: none; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus { border-color: var(--honey); box-shadow: 0 0 0 4px rgba(232,162,86,.18); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.65; margin: 14px 0 18px; padding: 14px; border-radius: 16px; background: var(--tea-2); }
.check input { width: 22px; height: 22px; accent-color: var(--roast); flex: none; margin-top: 1px; }
.check a { color: var(--roast); font-weight: 700; }
.gender2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gender2 label { position: relative; }
.gender2 input { position: absolute; opacity: 0; inset: 0; }
.gender2 label > span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 56px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--foam); font-size: 17px; font-weight: 700; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.gender2 input:checked + span { border-color: var(--roast); background: var(--tea-2); color: var(--roast); box-shadow: 0 0 0 4px rgba(232,162,86,.18); }
.gender2 input:focus-visible + span { box-shadow: 0 0 0 4px rgba(232,162,86,.35); }
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--tea-2); border-radius: 999px; padding: 5px; margin-bottom: 16px; }
.tabs button { position: relative; z-index: 1; padding: 11px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--bark-2); transition: color .2s; }
.tabs button.on { color: var(--bark); background: var(--paper); box-shadow: var(--lift); }
.rules { counter-reset: r; list-style: none; }
.rules li { counter-increment: r; position: relative; padding: 0 0 16px 40px; line-height: 1.75; font-size: 15px; }
.rules li::before { content: counter(r); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--tea); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.rules b { font-weight: 700; }
.rules a { color: var(--sage); font-weight: 800; }
.badge { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--tea); color: var(--roast); font-weight: 700; vertical-align: middle; }
.profile-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 20px; }
.profile-head .av { width: 60px; height: 60px; font-size: 24px; }
.profile-head h1 { font-family: var(--serif); font-size: 26px; line-height: 1.2; }
.profile-head p { color: var(--bark-2); font-size: 14px; }
.meter { display: flex; gap: 6px; margin-top: 10px; }
.meter i { flex: 1; height: 8px; border-radius: 999px; background: var(--tea-2); }
.meter i.on { background: var(--rose); }

/* 가입 코드 */
.code-field input { font-size: 20px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; text-align: center; }
.codecard { margin-top: 12px; padding: 16px; border-radius: 18px; background: var(--tea-2); text-align: center; }
.codecard b { display: block; font-size: 26px; letter-spacing: .2em; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.codecard .row { justify-content: center; }

/* ---------- 관리자 ---------- */
.adm h3 { font-family: var(--serif); font-size: 18px; margin: 26px 0 10px; }
.adm .item { background: var(--paper); border-radius: 18px; padding: 14px 16px; margin-bottom: 8px; font-size: 14.5px; line-height: 1.6; box-shadow: var(--lift); }
.adm .item small { color: var(--bark-2); display: block; margin-bottom: 4px; font-size: 12.5px; }
.adm .row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stats div { background: var(--paper); border-radius: 18px; padding: 14px 8px; text-align: center; font-size: 12.5px; color: var(--bark-2); box-shadow: var(--lift); }
.stats b { display: block; font-family: var(--serif); font-size: 26px; color: var(--bark); font-variant-numeric: tabular-nums; }

/* 얼굴 대신 별명 첫 글자 (사진 없음 원칙) */
.av { border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #3a2418; flex: none; }

/* ---------- 아래 메뉴 ---------- */
.nav {
  position: fixed; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(520px, calc(100% - 28px));
  height: 66px; border-radius: 26px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; padding: 0 6px; z-index: 10;
  background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 18px 40px -16px rgba(60, 30, 10, .4);
}
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; color: var(--bark-2); height: 54px; border-radius: 20px; transition: color .2s, background .25s var(--ease); }
.nav svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; transition: transform .25s var(--ease); }
.nav a.on { color: var(--roast); font-weight: 700; background: var(--tea-2); }
.nav a.on svg { transform: translateY(-1px); fill: rgba(232,162,86,.35); }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 16px) scale(.96); background: var(--bark); color: var(--foam); padding: 13px 20px; border-radius: 18px; font-size: 14.5px; opacity: 0; pointer-events: none; transition: .3s var(--ease); z-index: 30; max-width: calc(100% - 40px); text-align: center; line-height: 1.55; box-shadow: 0 16px 40px -12px rgba(0,0,0,.4); }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.fade { animation: fade .45s var(--ease) backwards; } /* both면 끝난 뒤에도 transform이 남아 position:fixed(쪽지 입력칸)가 화면이 아니라 글 상자에 붙음 */
@keyframes fade { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 720px) { .app { padding-top: 40px; } }

/* 생년월일 년·월·일 칸 3개 (손가락으로 누르기 쉽게) */
.birth3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.birth3 select { min-height: 56px; font-size: 17px; padding: 12px 10px; text-align: center; }

/* ---------- 두 말 (한국어 위, 영어 아래) — 전 세계판 2026-11-25 ---------- */
.en { display: block; font-family: var(--sans); font-size: .74em; font-weight: 400; line-height: 1.45; letter-spacing: 0; opacity: .62; margin-top: 2px; }
h1 .en, h2 .en, h3 .en, .welcome .en { font-size: .52em; margin-top: 6px; }
.btn .en, .react .en, .rule > span .en, .live .en, .tabs .en, .badge .en, .online .en, .people button .en, small .en, .acts button .en, .nav .en, .back .en { display: inline; margin: 0 0 0 .35em; font-size: .82em; }
.nav .en { display: block; margin: 0; font-size: 9.5px; }
.toast { white-space: pre-line; }
.btn.wide { flex-direction: column; gap: 0; }
.btn.wide .en { display: block; margin: 1px 0 0; }
.live { flex-wrap: wrap; white-space: nowrap; }
.live .en { flex-basis: 100%; margin: 0 0 0 11px; }
.live.quiet .en { margin-left: 0; }

/* ---------- 곁 N기 ---------- */
.cohort-card { display: block; position: relative; margin: 4px 0 16px; padding: 18px 20px 18px; border-radius: 24px; color: #fbeedd; text-decoration: none;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 200, 120, .35), transparent 55%), linear-gradient(135deg, #5a3320, #2c1b12); box-shadow: 0 16px 34px -18px rgba(60, 30, 10, .7); }
.cohort-card b { display: block; font-family: var(--serif); font-size: 20px; margin: 8px 0 4px; }
.cohort-card em { display: block; font-style: normal; font-size: 13.5px; color: rgba(251, 238, 221, .82); }
.cohort-card small { display: block; font-size: 12.5px; color: rgba(251, 238, 221, .66); margin-top: 8px; line-height: 1.55; }
.cohort-card .en { color: inherit; opacity: .75; }
.cc-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255, 215, 154, .2); color: #ffd79a; }
.cohort-head { margin: 8px 0 16px; }
.cohort-head h1 { font-family: var(--serif); font-size: clamp(24px, 6.6vw, 30px); line-height: 1.35; margin: 10px 0 8px; word-break: keep-all; }
.cohort-head .cc-tag { background: var(--tea); color: var(--roast); }
.cohort-head p { font-size: 14px; color: var(--bark-2); line-height: 1.6; }
.cohort-how ol { margin: 10px 0 0 18px; line-height: 1.75; font-size: 14.5px; }
.cohort-st { display: block; font-size: 17px; margin-bottom: 10px; color: var(--roast); }
.adm .pick { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.adm .pick input { width: 22px; height: 22px; margin-top: 4px; accent-color: var(--roast); flex: none; }
.adm .pick p { font-size: 14px; margin-top: 4px; color: var(--bark-2); }
.pickbar { position: sticky; top: 8px; z-index: 5; text-align: center; font-weight: 700; padding: 10px; border-radius: 14px; background: var(--tea); margin-bottom: 8px; }
.pickbar.full { background: var(--sage); color: #fff; }
.rnow { text-align: center; padding: 18px 0 6px; }
.rnow h1 { margin-top: 12px; }
.rclock { margin: 14px auto 4px; display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 22px; border-radius: 999px; background: var(--paper); box-shadow: var(--lift); }
.rclock b { font-size: 34px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--roast); }
.rclock span { font-size: 13px; color: var(--bark-2); }
.hostbar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 0 14px; }
.rdate { text-align: center; font-size: 17px; font-family: var(--serif); }
.rdate div { font-family: var(--sans); font-size: 14px; margin-top: 6px; }
.rppl { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rppl li { background: var(--paper); border-radius: 16px; padding: 12px 8px; text-align: center; box-shadow: var(--lift); border-top: 3px solid var(--tea); min-width: 0; }
.rppl li.m { border-top-color: #8aa6c1; } .rppl li.f { border-top-color: #d99a8b; }
.rppl li.me { outline: 2px solid var(--honey); }
.rppl b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rppl small { display: block; font-size: 12px; color: var(--bark-2); margin-top: 3px; }
.ralert { font-size: 13.5px; line-height: 1.6; padding: 10px 14px; border-radius: 14px; margin-bottom: 10px; background: rgba(168, 68, 58, .1); color: var(--rose); }
.ralert::before { content: "⚠ "; }
.ract { margin-bottom: 14px; }
.pickgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pk { border: 1.5px solid var(--line); background: var(--foam); border-radius: 18px; padding: 14px 6px 12px; font: inherit; color: var(--bark); cursor: pointer; min-width: 0; transition: transform .15s var(--ease), border-color .15s; }
.pk:active { transform: scale(.96); }
.pk b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 8px; }
.pk small { display: block; font-size: 11.5px; color: var(--bark-2); margin-top: 2px; }
.lamp-dot { display: block; width: 22px; height: 22px; margin: 0 auto; border-radius: 50%; background: var(--tea); transition: background .2s, box-shadow .2s; }
.pk.on { border-color: var(--honey); background: var(--paper); }
.pk.on .lamp-dot { background: radial-gradient(circle at 50% 60%, #fffaf0 0 20%, #ffd79a 45%, var(--honey)); box-shadow: 0 0 16px 4px rgba(255, 200, 120, .55); }
.letter { position: relative; background: var(--paper); border-radius: 22px; padding: 22px 20px 16px; margin-bottom: 12px; box-shadow: var(--lift); border-left: 4px solid var(--honey); }
.letter p { font-family: var(--serif); font-size: 17px; line-height: 1.75; word-break: keep-all; }
.letter small { display: block; text-align: right; margin-top: 10px; color: var(--bark-2); font-size: 13px; }
.result { text-align: center; }
.result h2 { font-family: var(--serif); font-size: 21px; line-height: 1.4; margin: 14px 0 8px; word-break: keep-all; }
.result p { font-size: 14px; color: var(--bark-2); line-height: 1.7; margin-bottom: 16px; }
.lamps { display: flex; align-items: center; justify-content: center; gap: 0; height: 60px; }
.lamps i { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 50% 60%, #fffaf0 0 18%, #ffd79a 45%, var(--honey)); box-shadow: 0 0 22px 6px rgba(255, 200, 120, .5); animation: lampIn 1s var(--ease) both; }
.lamps i:last-child { animation-delay: .25s; }
.lamps span { width: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--honey), #ffd79a, var(--honey)); box-shadow: 0 0 10px rgba(255, 200, 120, .7); animation: lampLink 1.1s .9s var(--ease) forwards; }
.lamps.solo i { opacity: .8; }
@keyframes lampIn { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes lampLink { to { width: 90px; } }
@media (prefers-reduced-motion: reduce) { .lamps i, .lamps span { animation: none; } .lamps span { width: 90px; } }
.contact-card b { display: block; color: var(--roast); }

/* ---------- 곁 N기 화상 ---------- */
.callnote { text-align: center; font-size: 14px; color: var(--bark-2); }
.calljoin b { display: block; font-family: var(--serif); font-size: 18px; }
.callbar { display: flex; gap: 8px; justify-content: center; margin: 4px 0 12px; }
.cb { flex: 1; max-width: 120px; min-height: 48px; border: 0; border-radius: 16px; background: var(--paper); color: var(--bark); box-shadow: var(--lift); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.cb.off { background: var(--tea); color: var(--bark-2); }
.cb.leave { background: rgba(168, 68, 58, .12); color: var(--rose); }
.cb .en { font-weight: 400; }
.vgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.vgrid:empty { display: none; }
.vt { position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; cursor: pointer;
  background: radial-gradient(120% 90% at 50% 20%, #5a3320, #24160e); box-shadow: 0 10px 24px -16px rgba(40, 20, 8, .8); }
.vt video { width: 100%; height: 100%; object-fit: cover; display: block;
  /* 등불 보정: 살짝 밝고 따뜻하고 부드럽게 (받는 쪽에서만, 원본은 그대로) */
  filter: brightness(1.06) contrast(.95) saturate(1.1) sepia(.07); transition: filter 1.2s var(--ease); }
.vt::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(130% 100% at 50% 35%, transparent 55%, rgba(30, 14, 4, .45)), linear-gradient(transparent 70%, rgba(20, 10, 4, .55)); }
.vt.self video { transform: scaleX(-1); }
.vt-name { position: absolute; left: 8px; right: 8px; bottom: 7px; z-index: 1; color: #fbeedd; font-size: 12px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-lamp { display: none; position: absolute; left: 50%; top: 40%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, #fffaf0 0 18%, #ffd79a 45%, var(--honey)); box-shadow: 0 0 26px 8px rgba(255, 200, 120, .45); }
.vt.novideo video { opacity: 0; }
.vt.novideo .vt-lamp { display: block; }
.vt.focus { grid-column: 1 / -1; aspect-ratio: 4 / 5; order: -1; }
.vt.veil video { filter: blur(18px) brightness(1.1) sepia(.2); }
/* 1:1 데이트: 짝은 크게, 나는 작게 */
.vgrid.dating { grid-template-columns: 1fr; position: relative; }
.vgrid.dating .vt:not(.self) { aspect-ratio: 3 / 4; }
.vgrid.dating .vt.self { position: absolute; right: 10px; top: 10px; width: 28%; aspect-ratio: 3 / 4; z-index: 2; border: 2px solid rgba(255, 240, 220, .7); }
.vgrid.dating.alone .vt.self { position: relative; right: auto; top: auto; width: 100%; border: 0; }
@media (prefers-reduced-motion: reduce) { .vt video { transition: none; } }

/* 방 안 신고 (9단계) */
.cb.rep { background: rgba(168, 68, 58, .08); color: var(--rose); }
.linkbtn { display: block; margin: 14px auto 0; min-height: 44px; padding: 0 14px; border: 0; background: none; color: var(--rose); font: inherit; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(28, 18, 10, .45); animation: sheetfade .2s var(--ease); }
.sheet { width: min(480px, 100%); max-height: 80dvh; overflow: auto; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--paper); color: var(--bark); box-shadow: 0 -20px 50px -20px rgba(0,0,0,.4); animation: sheetup .28s var(--ease); }
.sheet h2 { font-family: var(--serif); font-size: 19px; margin: 0 0 6px; }
.replist { display: grid; gap: 8px; margin-top: 12px; }
.replist .btn { min-height: 48px; }
.adm-alert { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 99px; background: var(--rose); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
@keyframes sheetfade { from { opacity: 0; } }
@keyframes sheetup { from { transform: translateY(30px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .sheet-wrap, .sheet { animation: none; } }

/* ---------- 곁 N기 방 화면 마무리 (10단계) ---------- */
/* 위 띠: 곁 N기 · N일째 · 지금 시각 / 남은 시간 — 내려도 붙어 있음 */
.rbar { position: sticky; top: max(8px, env(safe-area-inset-top)); z-index: 6; display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; padding: 8px 8px 8px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 80%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 12px 30px -18px rgba(60, 30, 10, .5); font-size: 13px; color: var(--bark-2); }
.rb-tag { font-weight: 700; color: var(--roast); white-space: nowrap; line-height: 1.15; }
.rb-mid { flex: 1; min-width: 0; white-space: nowrap; line-height: 1.15; }
.rb-tag .en, .rb-mid .en { display: block; margin: 0; font-size: 10px; }
.rb-mid { display: grid; grid-template-columns: auto auto; justify-content: start; column-gap: 8px; align-items: start; }
.rb-mid i { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-weight: 600; color: var(--bark); font-variant-numeric: tabular-nums; }
.rb-left { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 14px; border-radius: 999px; background: var(--bark); color: var(--foam); }
.rb-left b { font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.rb-left small { font-size: 11px; opacity: .75; }
.rb-left small .en { margin-left: .25em; }
.rbar.paused .rb-left { background: var(--honey); color: var(--bark); animation: breathe 2.4s ease-in-out infinite; }

/* 가운데 안내 카드: 단계 이름 한 줄 크게 */
.rguide { position: relative; text-align: center; padding: 16px 16px 14px; margin-bottom: 14px; border-radius: 26px; overflow: hidden; color: #fbeedd;
  background: radial-gradient(90% 70% at 50% 0%, rgba(255, 196, 120, .38), transparent 70%), linear-gradient(160deg, #5a3320, #2a190f 75%);
  box-shadow: 0 22px 44px -24px rgba(50, 22, 6, .75); }
.rguide::before { content: ""; position: absolute; left: 50%; top: -38px; width: 120px; height: 76px; margin-left: -60px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 214, 150, .65), transparent); filter: blur(6px); pointer-events: none; }
.rguide.enter { animation: guide-in .7s var(--ease) backwards; }
.rguide.enter::before { animation: bulb-on 1.4s ease-out backwards; }
@keyframes guide-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.rg-day { display: inline-block; padding: 4px 11px; border-radius: 999px; background: rgba(255, 236, 210, .14); font-size: 12px; letter-spacing: .02em; color: #f3d9b8; }
.rg-day .en { display: inline; margin-left: .35em; opacity: .7; }
.rguide h1 { position: relative; margin: 8px 0 4px; font-family: var(--serif); font-size: clamp(24px, 7vw, 30px); line-height: 1.25; color: #fff6ea; word-break: keep-all; }
.rguide h1 .en { display: block; font-family: var(--sans); font-size: 13px; font-weight: 500; color: #e2c7a6; margin-top: 4px; }
.rguide > p { font-size: 14.5px; line-height: 1.6; color: #ecd6bb; word-break: keep-all; }
.rguide > p .en { display: block; font-size: 12.5px; color: #c7aa89; }

/* 이번 짝 (데이트) */
.rpartner { margin: 16px auto 2px; padding: 14px 16px; max-width: 280px; border-radius: 20px; background: rgba(255, 240, 220, .1); border: 1px solid rgba(255, 220, 170, .25); }
.rpartner small { display: block; font-size: 12px; color: #e2c7a6; }
.rpartner small .en { display: inline; margin-left: .35em; }
.rpartner b { display: block; margin-top: 4px; font-family: var(--serif); font-size: 26px; color: #fff3df; text-shadow: 0 0 22px rgba(255, 196, 120, .65); }
.rpartner em { display: block; font-style: normal; font-size: 13px; color: #e2c7a6; margin-top: 2px; }
.rpartner.rest b { font-size: 18px; text-shadow: none; }
.rpairs { margin-top: 14px; display: grid; gap: 6px; }
.rpairs small { font-size: 12px; color: #e2c7a6; }
.rpairs small .en { display: inline; margin-left: .35em; }
.rpairs div { display: grid; grid-template-columns: 1fr 22px 1fr; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 14px; background: rgba(255, 240, 220, .08); font-size: 14px; }
.rpairs div b:first-child { text-align: right; }
.rpairs div b:last-child { text-align: left; }
.rpairs i { width: 10px; height: 10px; margin: auto; border-radius: 50%; background: var(--honey); box-shadow: 0 0 10px 3px rgba(255, 196, 120, .55); }

/* 자기소개 차례 */
.rturn { display: flex; align-items: center; gap: 12px; margin: 12px auto 0; max-width: 320px; padding: 12px 16px; border-radius: 18px; text-align: left; background: rgba(255, 240, 220, .1); }
.rturn b { display: block; font-size: 16px; color: #fff3df; }
.rturn b em { font-style: normal; font-family: var(--serif); font-size: 19px; }
.rturn b .en em { font-family: inherit; font-size: inherit; font-weight: 600; }
.rturn b .en { display: block; margin: 1px 0 0; font-size: 11.5px; }
.rturn small .en { display: block; margin: 1px 0 0; }
.rturn small { display: block; margin-top: 2px; font-size: 12.5px; color: #e2c7a6; font-variant-numeric: tabular-nums; }
.rt-lamp { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--honey); box-shadow: 0 0 14px 4px rgba(255, 196, 120, .6); animation: breathe 1.8s ease-in-out infinite; }
.rturn.mine { background: linear-gradient(120deg, #e8a256, #f3c987); }
.rturn.mine b, .rturn.mine small { color: #3a2619; }
.rturn.mine .rt-lamp { background: #fffaf0; }

/* 얼굴 칸: 말하는 사람 크게, 나머지는 아래 작은 줄 (4칸씩) */
.vgrid.group { grid-template-columns: repeat(4, 1fr); }
.vgrid.group .vt:not(.focus) { aspect-ratio: 1; border-radius: 16px; }
.vgrid.group .vt:not(.focus) .vt-name { font-size: 11px; left: 6px; right: 6px; bottom: 5px; }
.vgrid.group .vt:not(.focus) .vt-lamp { width: 24px; height: 24px; margin: -12px 0 0 -12px; }
.vt { transition: box-shadow .25s var(--ease); }
.vt.speaking { box-shadow: 0 0 0 3px var(--honey), 0 0 26px 2px rgba(255, 190, 110, .55); }
.vgrid.group .vt.focus { aspect-ratio: 4 / 3; }
.vt.focus .vt-name { font-size: 15px; left: 14px; bottom: 12px; }
.vt.pinned .vt-name::after { content: " · 📌"; }

/* 아래 버튼 4개: 메뉴 바로 위에 떠 있음 */
/* 화상 중에는 아래 메뉴 대신 버튼 줄 (나가기·홈으로 돌아감) */
.room-live:has(.callbar) { padding-bottom: 96px; }
body:has(.callbar) .nav { display: none; }
.callbar { position: fixed; z-index: 11; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); width: min(520px, calc(100% - 28px));
  margin: 0; padding: 8px; gap: 8px; border-radius: 24px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: color-mix(in srgb, var(--bark) 88%, transparent); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 18px 40px -14px rgba(40, 18, 4, .6); animation: sheetup .35s var(--ease) backwards; }
.cb { max-width: none; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 18px;
  background: rgba(255, 240, 220, .12); color: #fbeedd; box-shadow: none; font-size: 12px; line-height: 1.2; transition: transform .15s var(--ease), background .2s; }
.cb i { font-style: normal; font-size: 20px; line-height: 1; }
.cb .en { display: block; margin: 0; font-size: 9.5px; opacity: .7; }
.cb:active { transform: scale(.94); }
.cb.off { background: #fbeedd; color: var(--bark); }
.cb.rep { background: rgba(255, 140, 120, .18); color: #ffc7bc; }
.cb.leave { background: rgba(255, 140, 120, .9); color: #2a1208; }
@media (prefers-reduced-motion: reduce) { .rguide.enter, .rguide.enter::before, .rt-lamp, .rbar.paused .rb-left, .callbar { animation: none; } }

/* 진행자 버튼: 진행 중엔 한 줄 3칸 */
.is-live .hostbar { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; margin: -4px 0 12px; }
.is-live .hostbar .btn { width: 100%; padding-left: 6px; padding-right: 6px; min-height: 48px; }
.is-live .hostbar .btn .en { display: block; margin: 0; font-size: 10px; }

/* ---------- 곁 화상 전체 화면 (NJ 11-26 견본 승인: "너무 좋다") ---------- */
/* 화질 보정은 아주 살짝만 (누런 보정·어두운 가장자리 뺌) */
.vt video { filter: brightness(1.03) saturate(1.05); }
.vt::after { background: linear-gradient(transparent 62%, rgba(10, 6, 3, .5)); }
.rb-phase { display: none; }
.rwho { display: none; }

#room.incall { position: fixed; inset: 0; z-index: 40; overflow: hidden; padding: 0; color: #fbf1e4;
  background: radial-gradient(120% 60% at 50% 0%, #2a1a10, #0e0906 60%); --safe-t: max(10px, env(safe-area-inset-top)); }
body:has(#room.incall) { overflow: hidden; }
body:has(#room.incall) .back { display: none; }
#room.incall #rbot, #room.incall .rguide, #room.incall .ralert, #room.incall .linkbtn, #room.incall .rpairs { display: none; }

/* 위: 유리 띠 (곁 N기 · 단계 / 남은 시간) */
#room.incall #rtop { position: absolute; z-index: 20; left: 0; right: 0; top: 0; padding: var(--safe-t) 12px 0; pointer-events: none; }
#room.incall #rtop > * { pointer-events: auto; }
#room.incall .rbar { position: static; margin: 0; padding: 7px 7px 7px 14px; background: rgba(24, 16, 11, .55); border: 1px solid rgba(255, 236, 212, .14); color: #d9c4ad; box-shadow: none; }
#room.incall .rb-tag { color: #fbf1e4; display: inline-flex; align-items: center; gap: 8px; }
#room.incall .rb-tag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--honey); box-shadow: 0 0 12px 3px rgba(240, 176, 106, .7); animation: breathe 2.2s ease-in-out infinite; }
#room.incall .rb-tag .en, #room.incall .rb-mid { display: none; }
#room.incall .rb-phase { display: block; flex: 1; min-width: 0; font-size: 13px; color: #d9c4ad; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#room.incall .rb-phase .en { display: inline; margin-left: .35em; font-size: 11px; }
#room.incall .rb-left { background: rgba(251, 241, 228, .94); color: #2a1a10; }
#room.incall .hostbar { margin: 8px 0 0; }
#room.incall .hostbar .btn { background: rgba(24, 16, 11, .6); color: #fbf1e4; border: 1px solid rgba(255, 236, 212, .16); box-shadow: none; min-height: 40px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
#room.incall .hostbar .btn:first-child { background: linear-gradient(120deg, #e8a256, #f6cf8f); color: #2a1408; border: 0; }

/* 지금 차례: 꿀빛 칩 */
#room.incall #rturn { text-align: center; margin-top: 8px; }
#room.incall .rturn { display: inline-flex; max-width: 100%; margin: 0; padding: 6px 14px 6px 10px; gap: 8px; border-radius: 999px;
  background: linear-gradient(120deg, #e8a256, #f6cf8f); box-shadow: 0 8px 24px -8px rgba(232, 162, 86, .7); animation: guide-in .5s var(--ease) backwards; }
#room.incall .rturn b, #room.incall .rturn small { color: #2a1408; }
#room.incall .rturn b { font-size: 13.5px; } #room.incall .rturn b em { font-size: 15px; }
#room.incall .rturn small { font-size: 11.5px; } #room.incall .rturn .en { font-size: 10px; opacity: .75; }
#room.incall .rt-lamp { background: #fffaf0; width: 10px; height: 10px; }

/* 얼굴 칸 공통 */
#room.incall .vgrid { position: absolute; z-index: 5; left: 6px; right: 6px; top: calc(var(--safe-t) + 112px); bottom: 116px; margin: 0; }
#room.incall .vt { border-radius: 20px; aspect-ratio: auto; box-shadow: none; }
#room.incall .vt video { object-position: 50% 35%; }
#room.incall .vt-name { left: 7px; right: auto; bottom: 7px; max-width: calc(100% - 14px); padding: 4px 10px; border-radius: 999px; font-size: 11.5px;
  background: rgba(14, 9, 6, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-shadow: none; }
.vt-host { position: absolute; z-index: 2; right: 7px; top: 7px; padding: 3px 8px; border-radius: 999px; background: rgba(251, 241, 228, .9); color: #6b3d1c; font-size: 10.5px; font-weight: 700; }
.vt-host .en { display: none; }
#room.incall .vt.speaking { box-shadow: 0 0 0 2.5px var(--honey), 0 0 28px 2px rgba(240, 176, 106, .55); animation: speak-glow 1.6s ease-in-out infinite; }
@keyframes speak-glow { 50% { box-shadow: 0 0 0 2.5px #ffd79a, 0 0 40px 6px rgba(240, 176, 106, .7); } }

/* ① 모두 보기: 3칸, 줄 수는 사람 수대로 (모두 같은 크기) */
#room.incall .vgrid.group { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(var(--rows, 4), minmax(0, 1fr)); gap: 5px; }
#room.incall .vgrid.group .vt, #room.incall .vgrid.group .vt.focus { grid-column: auto; order: 0; aspect-ratio: auto; height: 100%; min-height: 0; }
#room.incall .vgrid.group .vt.self { order: 99; }

/* ② 크게: 말하는 사람 무대 + 아래 손가락으로 넘기는 얼굴 줄 + 나 작은 창 */
#room.incall .vgrid.big { display: block; }
#room.incall .vgrid.big > .vt.focus { position: absolute; left: 0; right: 0; top: 0; bottom: 108px; border-radius: 26px; }
#room.incall .vgrid.big > .vt.focus .vt-name { left: 12px; bottom: 12px; font-size: 14px; padding: 6px 12px; }
#room.incall .vgrid.big > .vt.self { position: absolute; z-index: 3; right: 10px; bottom: 118px; width: 96px; height: 128px; border-radius: 18px; border: 2px solid rgba(251, 241, 228, .85); box-shadow: 0 18px 30px -10px rgba(0,0,0,.6); }
#room.incall .vgrid.big > .vt:not(.focus):not(.self) { display: none; }
.vstrip { position: absolute; left: -6px; right: -6px; bottom: 0; height: 98px; display: flex; gap: 8px; padding: 0 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.vstrip::-webkit-scrollbar { display: none; }
.vstrip .vt { flex: none; width: 76px; height: 96px; border-radius: 16px !important; scroll-snap-align: start; }
.vstrip .vt-name { font-size: 10px !important; padding: 2px 7px !important; left: 4px !important; bottom: 4px !important; }
.vstrip .vt-host { font-size: 9px; padding: 2px 6px; right: 4px; top: 4px; }

/* ③ 1:1 데이트: 짝이 화면 가득 + 나 작은 창 + 이름·이야기 꺼내기 */
#room.incall.is-date .vgrid { top: 0; bottom: 0; left: 0; right: 0; }
#room.incall .vgrid.dating .vt:not(.self) { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
#room.incall .vgrid.dating .vt:not(.self)::after { background: linear-gradient(rgba(10,6,3,.55), transparent 22%, transparent 52%, rgba(10,6,3,.85)); }
#room.incall .vgrid.dating .vt:not(.self) .vt-name { display: none; }
#room.incall .vgrid.dating .vt.self { position: absolute; z-index: 3; right: 16px; top: calc(var(--safe-t) + 60px); width: 96px; height: 128px; border-radius: 18px; border: 2px solid rgba(251, 241, 228, .85); }
#room.incall .vgrid.dating.alone .vt.self { position: absolute; inset: 0; width: auto; height: auto; border: 0; border-radius: 0; top: 0; }
#room.incall.is-date .rwho { display: block; position: fixed; z-index: 15; left: 22px; right: 22px; bottom: 120px; animation: guide-in .8s var(--ease) .3s backwards; }
.rwho small { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #ffd79a; }
.rwho small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--honey); box-shadow: 0 0 10px 2px rgba(240,176,106,.8); }
.rwho small .en { display: inline; margin-left: .3em; }
.rwho h3 { font-family: var(--serif); font-size: clamp(30px, 9vw, 38px); line-height: 1.15; margin-top: 4px; color: #fbf1e4; text-shadow: 0 2px 20px rgba(0,0,0,.4); }
.rwho p { color: #d9c4ad; font-size: 14.5px; margin-top: 4px; }
.rwho .ice { margin-top: 12px; display: inline-block; padding: 9px 14px; border-radius: 16px; background: rgba(24, 16, 11, .55); border: 1px solid rgba(255, 236, 212, .14);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: 13.5px; line-height: 1.5; color: #fbf1e4; }
.rwho .ice > b { display: block; color: #ffd79a; font-weight: 600; font-size: 12px; margin-bottom: 2px; }
.rwho .ice .en { font-size: 11.5px; }
.rwho.rest h3 { font-size: 24px; }

/* 할 일 판(고르기·편지·결과)은 화상 위에 떠 있는 판 */
#room.incall #ract { position: absolute; z-index: 25; left: 12px; right: 12px; bottom: 112px; max-height: 58%; overflow: auto; border-radius: 24px; color: var(--bark); }
#room.incall #ract:empty { display: none; }
#room.incall #ract .card { margin: 0; }

/* 아래: 떠 있는 버튼 줄 (그림 + 두 말) */
.callbar { background: rgba(24, 16, 11, .62) !important; border: 1px solid rgba(255, 236, 212, .14); border-radius: 30px !important; padding: 10px 8px !important; }
.cb { background: none !important; color: #d9c4ad !important; gap: 4px !important; min-height: 0 !important; font-size: 10.5px !important; }
.cb i { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: rgba(251, 241, 228, .12); transition: background .2s, transform .15s var(--ease); }
.cb svg { width: 22px; height: 22px; fill: none; stroke: #fbf1e4; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cb.off i { background: #fbf1e4; } .cb.off svg { stroke: #2a1a10; }
.cb.rep svg { stroke: #ffb3a6; }
.cb.leave i { background: #ff7b6b; } .cb.leave svg { stroke: #fff; }
.cb:active i { transform: scale(.92); }
.cb .en { font-size: 9px !important; }
@media (prefers-reduced-motion: reduce) { #room.incall .vt.speaking, #room.incall .rturn, .rwho, #room.incall .rb-tag::before { animation: none !important; } }
/* 차례 칩은 한 줄 (영어는 위 띠의 단계 이름에) */
#room.incall .rturn > div { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
#room.incall .rturn .en { display: none; }
#room.incall .rturn small { font-variant-numeric: tabular-nums; opacity: .8; }
/* 진행자는 진행 버튼 줄만큼 얼굴 칸을 내림 */
#room.incall.is-host .vgrid { top: calc(var(--safe-t) + 166px); }
#room.incall.is-host.is-date .vgrid { top: 0; }
/* 진행자: 데이트 동안엔 짝 목록 카드 (진행자는 데이트를 보지 않음) */
#room.incall.is-host.is-date .rguide { display: block; position: fixed; z-index: 15; left: 12px; right: 12px; bottom: 116px; max-height: 52%; overflow: auto; }
#room.incall.is-host.is-date .rpairs { display: grid; }
