/* BRIDGE Interview Room — 2026-10-07 리뉴얼: Apple.com / 왈라 서베이 느낌. 흰 바탕, 큰 제목, 연한 회색 선택지, 알약 버튼. 검정 글자. */
:root { --ink: #1d1d1f; --sub: #6e6e73; --line: #e5e5ea; --soft: #f5f5f7; --soft2: #ebebf0; --blue: #0071e3; --blue-d: #0062c4; --red: #d70015; --radius: 18px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; color: var(--ink); background: #fff; font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; letter-spacing: -0.01em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, select, input, textarea { font: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.offscreen { position: fixed; left: -9999px; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }

/* 상단 */
.top { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 22px; background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.brand { font-size: 21px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; margin-right: 18px; }
.top .meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; font-size: 16px; }
.top .meta > span:not(.brand) { padding-left: 14px; border-left: 1px solid var(--line); margin-right: 10px; color: var(--ink); }
.top .meta > span.sub { border-left: 0; padding-left: 0; }
.top .you { font-size: 15px; color: var(--sub); }
.top .timer { display: none; }
.top .you { display: flex; align-items: center; gap: 14px; }
.top .clock { font-size: 40px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1; }
.top .clock small { font-size: 18px; font-weight: 500; color: var(--sub); margin-left: 4px; }
@media (max-width: 640px) { .top .clock { font-size: 30px; } .top .clock small { font-size: 14px; } }

/* 레이아웃 */
.wrap { max-width: 640px; margin: 0 auto; padding: 56px 20px 80px; animation: rise .45s ease both; }
.wrap.wide { max-width: 1120px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card { background: #fff; border: 0; border-radius: var(--radius); padding: 0; }
h1 { font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; margin: 0 0 14px; }
h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 8px; }
p { margin: 10px 0; }
.sub { font-size: 15px; color: var(--sub); }
.meta-line { font-size: 19px; margin: 2px 0; color: var(--ink); }

/* 버튼 */
.btn { display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 980px; padding: 12px 22px; font-size: 16px; text-decoration: none; transition: background .15s, transform .05s, border-color .15s; }
.btn:hover { background: var(--soft); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-d); }
.btn.danger { border-color: #f1c0c0; color: var(--red); }
.btn.wide { width: 100%; text-align: center; padding: 15px 22px; font-size: 17px; }
.btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn:disabled { opacity: .4; cursor: default; }
.err { color: var(--red); font-size: 15px; }
select { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; color: var(--ink); font-size: 15px; max-width: 100%; }
.field { display: block; margin: 12px 0; font-size: 15px; color: var(--sub); }
.field select { display: block; width: 100%; margin-top: 6px; color: var(--ink); }

/* 동의 / 선택지 (왈라 스타일 행) */
.consent, .choice { display: flex; gap: 14px; align-items: flex-start; background: var(--soft); border: 2px solid transparent; border-radius: 16px; padding: 16px 18px; margin: 10px 0; font-size: 16px; cursor: pointer; transition: background .15s, border-color .15s; }
.consent:hover, .choice:hover { background: var(--soft2); }
.consent input, .choice input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--blue); }
.choice.sel { background: #fff; border-color: var(--blue); box-shadow: 0 6px 24px rgba(0,113,227,.12); }
.choice .t { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.choice .d { font-size: 15px; color: var(--sub); display: inline-block; margin-top: 2px; }
textarea { width: 100%; font: inherit; font-size: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; margin-top: 12px; background: #fff; resize: vertical; }
textarea:focus, .codebox:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,113,227,.15); }
.notice { border-left: 4px solid var(--red); padding: 8px 0 8px 14px; margin: 10px 0 18px; font-size: 16px; }
.notice-box { background: #fff5f5; border-radius: 16px; padding: 16px 18px; margin-top: 16px; font-size: 15px; line-height: 1.6; color: #8a1c1c; }
.notice-box .en { display: block; margin-top: 6px; font-size: 14px; color: #6e6e73; font-style: italic; }
.flag { display: flex; gap: 12px; align-items: flex-start; background: #fff5f5; border-radius: 16px; padding: 14px 16px; margin-top: 16px; font-size: 15px; color: #8a1c1c; }
.filebox { background: var(--soft); border-radius: 16px; padding: 14px 18px; margin-top: 12px; font-size: 15px; }
.filebox input[type=file] { margin-top: 8px; font-size: 15px; max-width: 100%; }

/* 첫 화면 */
.joinrow { display: flex; gap: 10px; margin: 18px 0 8px; }
.codebox { flex: 1; border: 2px solid var(--ink); border-radius: 980px; padding: 14px 20px; font-size: 18px; letter-spacing: .02em; color: var(--ink); background: #fff; min-width: 0; }
.joinrow .btn { padding: 14px 26px; }
.warn { background: #fff5f5; border-radius: 16px; padding: 14px 18px; margin: 16px 0 6px; animation: warnblink 2.2s ease-in-out infinite; }
.warn p { margin: 0; }
.warn .ko { font-size: 16px; color: #8a1c1c; line-height: 1.6; }
.warn .en { font-size: 14px; color: var(--sub); margin-top: 6px; font-style: italic; }
@keyframes warnblink { 0%, 100% { background: #fff5f5; } 50% { background: #ffe9e9; } }
@media (prefers-reduced-motion: reduce) { .warn, .wrap { animation: none; } }

/* 입장 전 설정 */
.setup { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.preview-col { background: var(--soft); border: 0; border-radius: 22px; padding: 18px; }
.preview { position: relative; background: #1c1c1e; border-radius: 18px; overflow: hidden; aspect-ratio: 16/9; }
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview-off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; background: #2c2c2e; }
.preview-name { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; }
.preview-name::after { content: attr(data-name); background: rgba(255,255,255,.92); color: var(--ink); font-size: 15px; padding: 5px 14px; border-radius: 980px; }
.devrow { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.devrow .btn { flex: none; width: 140px; text-align: center; padding: 11px 12px; font-size: 15px; }
.devrow select { flex: 1; min-width: 0; }
.themes-label { margin: 18px 0 8px; font-size: 15px; color: var(--sub); }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme { position: relative; border: 2px solid transparent; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; background: var(--soft2) center/cover no-repeat; cursor: pointer; padding: 0; color: var(--ink); transition: transform .12s, border-color .15s; }
.theme:hover { transform: translateY(-1px); }
.theme.sel { border-color: var(--blue); box-shadow: 0 0 0 2px #fff inset; }
.theme span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.92); font-size: 13px; padding: 4px 6px; text-align: center; }
.theme.none { background: #fff; border-color: var(--line); }
.theme.blur { background: linear-gradient(135deg, #cfd8e3, #eef2f6); }
.theme.plain { background: #f2f2f2; }
.theme.blur::before { content: ""; position: absolute; inset: 20% 30%; border-radius: 50%; background: #9aa7b5; filter: blur(8px); }
.consent-col { padding: 6px 0 0; }

/* 방 */
.stage { position: relative; background: #0b0b0c; min-height: calc(100vh - 150px); padding: 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tile { position: relative; background: #1c1c1e; border-radius: 18px; overflow: hidden; aspect-ratio: 16/9; outline: 5px solid transparent; outline-offset: -5px; transition: outline-color .12s, box-shadow .12s; }
.tile video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile.me video { transform: scaleX(-1); }
.tile.speaking { animation: speak .5s ease-in-out infinite; }
@keyframes speak { 0%, 100% { outline-color: #34c759; box-shadow: 0 0 0 6px rgba(52,199,89,.35), 0 0 28px rgba(52,199,89,.6); } 50% { outline-color: rgba(52,199,89,.25); box-shadow: 0 0 0 2px rgba(52,199,89,.1), 0 0 6px rgba(52,199,89,.15); } }
.tile.speaking .name span { background: #34c759; color: #fff; font-weight: 700; animation: namepulse .5s ease-in-out infinite; }
.tile.speaking .name span::before { content: "\25CF  "; font-size: 11px; vertical-align: 2px; }
@keyframes namepulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .75; } }
.tile .name { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; pointer-events: none; }
.tile .name span { display: inline-block; background: rgba(255,255,255,.92); color: var(--ink); font-size: 15px; padding: 5px 14px; border-radius: 980px; }
.tile .muted { position: absolute; right: 12px; top: 12px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 13px; padding: 4px 10px; border-radius: 980px; }
.tile .hand { position: absolute; left: 12px; top: 12px; font-size: 30px; line-height: 1; background: rgba(255,255,255,.92); padding: 4px 8px; border-radius: 12px; animation: handblink .7s ease-in-out infinite; }
@keyframes handblink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(1.12); } }
.tile .note { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); padding: 0 18px; text-align: center; color: #fff; font-size: 14px; line-height: 1.5; }
.tap-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; max-width: 86%; padding: 16px 22px; border: 0; border-radius: 16px; background: #fff; color: #000; font-size: 16px; font-weight: 600; cursor: pointer; }
/* 아이폰 사파리는 100vh 에 주소창 높이가 포함돼 하단 버튼이 가려진다. 지원하는 브라우저에서는 실제 보이는 높이를 쓴다. */
@supports (height: 100dvh) { .stage { min-height: calc(100dvh - 150px); } }
@supports (height: 100dvh) { @media (max-width: 600px) { .stage { min-height: calc(100dvh - 170px); } } }
.tile.novideo::after { content: attr(data-initial); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 44px; color: #fff; background: #2c2c2e; }
.tile.novideo .name, .tile.novideo .muted, .tile.novideo .hand, .tile.novideo .note { z-index: 1; }
/* 세로로 든 휴대폰 영상은 가로 칸에서 위아래가 잘리지 않게 전체를 보여 준다 */
.tile.portrait video { object-fit: contain; }
.net-banner { margin: 0 0 12px; padding: 10px 16px; border-radius: 12px; background: rgba(255,255,255,.12); color: #fff; font-size: 14px; line-height: 1.5; text-align: center; }
.net-banner.warn { background: #ffd60a; color: #1d1d1f; font-weight: 600; }

.bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 12px 14px; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.bar .btn { padding: 11px 16px; font-size: 15px; }
.bar .spacer { flex: 1; }
.bar .hint { font-size: 13px; color: var(--sub); width: 100%; text-align: center; }

/* 바텀시트 */
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.sheet-card { background: #fff; border-radius: 22px 22px 0 0; width: min(720px, 100%); max-height: 80vh; overflow: auto; padding: 20px 20px 28px; animation: rise .25s ease both; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head .btn { padding: 8px 14px; font-size: 14px; }
.copyrow { display: flex; gap: 8px; align-items: center; margin: 8px 0 14px; }
.copyrow input { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font-size: 15px; color: var(--ink); min-width: 0; background: var(--soft); }
.copyrow .btn { padding: 11px 16px; font-size: 14px; flex: none; }
.bigcode { font-size: 22px; letter-spacing: .06em; }

@media (max-width: 860px) { .setup { grid-template-columns: 1fr; } }
@media (max-width: 600px) { body { font-size: 16px; } h1 { font-size: 28px; } .wrap { padding: 36px 18px 60px; } .grid { grid-template-columns: 1fr; } .stage { min-height: calc(100vh - 170px); } .devrow .btn { width: 120px; } .themes { grid-template-columns: repeat(2, 1fr); } .joinrow { flex-direction: column; } .joinrow .btn { width: 100%; text-align: center; } }

/* 닉네임 */
.nick-box { margin: 18px 0 6px; padding: 18px 0 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nick-label { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.nick-label small { font-size: 14px; font-weight: 400; color: var(--sub); }
.nick-check { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 14px; font-weight: 700; flex: none; }
.nick-input { display: block; width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 17px; color: var(--ink); background: #fff; }
.nick-input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,113,227,.15); outline: none; }
.nick-input::placeholder { color: #b0b0b6; }
/* 음파 미터 */
.mic-meter { width: 100%; height: 32px; border-radius: 8px; background: var(--soft); }
/* 타이머 크게 */
.timer-big { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.timer-end { font-size: 15px; color: var(--sub); margin-left: 8px; }
/* 말하는 사람 빠른 깜빡임 */

/* 2026-11-17 사장님: 마이크·카메라 버튼을 항상 화면에. 버튼 줄을 화면 아래에 고정하고, 꺼짐은 빨간색으로 보인다. */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding-bottom: calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -1px 0 rgba(0,0,0,.08); }
#view-room { padding-bottom: 150px; background: #0b0b0c; }
.btn.off { background: #ff3b30; border-color: #ff3b30; color: #fff; }
#b-mic, #b-cam { font-weight: 700; padding: 13px 18px; font-size: 16px; }
@media (max-width: 600px) {
  .bar { gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .bar .btn { padding: 9px 11px; font-size: 13px; }
  #b-mic, #b-cam { padding: 11px 12px; font-size: 14px; }
  .bar .hint, .bar .spacer { display: none; }
  #view-room { padding-bottom: 170px; }
}
