/* 바이픽 PC 웹사이트 — 중계 v2 */
:root {
  --blue: #2F54EB;
  --blue-press: #2342C9;
  --blue-soft: #EDF1FF;
  --yellow: #FFD43B;
  --bg: #FFFFFF;
  --bg-2: #F5F6F8;
  --card: #FFFFFF;
  --line: #E8EBEF;
  --text: #191F28;
  --text-2: #4E5968;
  --text-3: #8B95A1;
  --ok: #12B76A;
  --off: #B0B8C1;
  --danger: #E5484D;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .06);
  --radius: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #4C6EF5;
    --blue-press: #3B5BDB;
    --blue-soft: rgba(76, 110, 245, .16);
    --bg: #0B0C10;
    --bg-2: #171A20;
    --card: #1A1D24;
    --line: #2A2E37;
    --text: #F2F4F6;
    --text-2: #B0B8C1;
    --text-3: #7E8894;
    --off: #5C6470;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* 머리 */
.top { padding: 28px 48px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo { width: 32px; height: 32px; display: block; }
.wordmark { font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.tag {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-left: 2px;
}

/* 본문 */
.hero {
  flex: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 72px 48px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 72px;
  align-items: start;
}
.eyebrow { margin: 0 0 16px; color: var(--blue); font-weight: 600; font-size: 16px; }
h1 {
  margin: 0;
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1.16;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.lead { margin: 24px 0 0; max-width: 30em; font-size: 19px; line-height: 1.6; color: var(--text-2); }

.cta { margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 16px; cursor: pointer;
  transition: background-color .15s ease, transform .08s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { cursor: default; opacity: .4; transform: none; }
.btn.primary {
  height: 64px; padding: 0 30px 0 34px; min-width: 260px;
  background: var(--blue); color: #fff; font-size: 19px; font-weight: 700; letter-spacing: -0.02em;
  box-shadow: 0 8px 24px rgba(47, 84, 235, .28);
}
.btn.primary:hover:not(:disabled) { background: var(--blue-press); }
.btn.primary .arrow { width: 20px; height: 20px; opacity: .9; }
.btn.soft { height: 44px; padding: 0 18px; background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: 15px; }
.btn.soft:hover { filter: brightness(.97); }
.btn:focus-visible, .link:focus-visible, .add:focus-visible, .more:focus-visible { outline: 3px solid rgba(47, 84, 235, .45); outline-offset: 3px; }
.note { margin: 14px 0 0; color: var(--text-2); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.note .dot { flex: none; }

.link {
  background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--text-3);
  font-size: 15px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line);
}
.link:hover { color: var(--text-2); }
.link.small { font-size: 13px; }

/* 연결 진행 */
.status {
  margin-top: 28px; max-width: 520px;
  background: var(--bg-2); border-radius: var(--radius); padding: 24px 26px;
  animation: rise .25s ease;
}
.status-row { display: flex; gap: 16px; align-items: flex-start; }
.status-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.status-sub { margin: 4px 0 0; color: var(--text-2); font-size: 15px; }
.status-icon {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 15px; font-weight: 800; margin-top: 1px;
}
.status-icon.warn { background: #F79009; }
.status-icon.okk { background: var(--ok); }
.spinner {
  flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%;
  border: 3px solid var(--blue-soft); border-top-color: var(--blue);
  animation: spin .8s linear infinite;
}
.code-box { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.code-help { margin: 0; color: var(--text-3); font-size: 13px; line-height: 1.55; }
.code {
  margin: 8px 0 0; font-size: 26px; font-weight: 700; letter-spacing: .18em; color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.status.far .code { font-size: 40px; color: var(--text); }
.status-actions { margin-top: 18px; display: flex; gap: 16px; align-items: center; }

/* 오른쪽 */
.panel { display: flex; flex-direction: column; gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 26px 22px;
}
.card h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.count { color: var(--text-3); font-size: 14px; font-variant-numeric: tabular-nums; }

.devices { list-style: none; margin: 0; padding: 0; }
.device {
  display: flex; align-items: center; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.device:last-child { border-bottom: 0; }
.phone-ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--bg-2);
  display: grid; place-items: center; color: var(--text-2);
}
.phone-ico svg { width: 20px; height: 20px; }
.d-main { flex: 1; min-width: 0; }
.d-name { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-state { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--off); display: inline-block; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(18, 183, 106, .16); }
.d-open { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.more {
  flex: none; width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; cursor: pointer;
  color: var(--text-3); display: grid; place-items: center;
}
.more:hover { background: var(--bg-2); color: var(--text-2); }
.rename-input {
  width: 100%; font: inherit; font-weight: 600; font-size: 16px; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--blue); border-radius: 10px; padding: 6px 10px; outline: none;
}
.add {
  margin-top: 6px; width: 100%; height: 48px; border: 1px dashed var(--line); border-radius: 14px;
  background: none; cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.add:hover { border-color: var(--blue); color: var(--blue); }
.plus { font-size: 20px; line-height: 1; }
.full-note { margin: 12px 0 0; font-size: 13px; color: var(--text-3); }

.how h2 { margin-bottom: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li { display: flex; gap: 14px; }
.num {
  flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.steps b { font-weight: 600; font-size: 16px; }
.steps p { margin: 2px 0 0; color: var(--text-3); font-size: 14px; }

.privacy { margin: 0; display: flex; gap: 8px; align-items: flex-start; color: var(--text-3); font-size: 13px; line-height: 1.55; padding: 0 6px; }
.privacy svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }

.foot {
  padding: 20px 48px 28px; display: flex; justify-content: space-between; align-items: center;
  color: var(--text-3); font-size: 13px;
}
.foot-dim { margin-left: auto; }

/* ⋯ 메뉴 · 알림 */
.menu {
  position: fixed; z-index: 10; min-width: 168px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  animation: rise .12s ease;
}
.menu button {
  display: block; width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  padding: 10px 12px; border-radius: 9px; font-size: 15px;
}
.menu button:hover { background: var(--bg-2); }
.menu .danger { color: var(--danger); }
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 20;
  background: #191F28; color: #fff; padding: 12px 20px; border-radius: 14px; font-size: 15px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .2); animation: rise .2s ease;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.toast { animation-name: toastIn; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; }
}
@media (max-width: 560px) {
  .top { padding: 20px 16px 0; }
  .hero { padding: 36px 16px 32px; }
  .foot { padding: 16px; }
  .lead { font-size: 17px; }
  .btn.primary { width: 100%; min-width: 0; }
  .card { padding: 20px 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; }
}

/* 폰 꺼짐 안내(503) 페이지 */
.solo { flex: 1; display: grid; place-items: center; padding: 48px 16px; text-align: center; }
.solo .box { max-width: 440px; }
.solo .logo { width: 56px; height: 56px; margin: 0 auto 28px; }
.solo h1 { font-size: 30px; line-height: 1.3; }
.solo p { color: var(--text-2); margin: 12px 0 0; font-size: 16px; }
.solo .spinner { margin: 32px auto 0; }
.solo .link { margin-top: 28px; display: inline-block; }

/* ── 계정: 머리 오른쪽 · 로그인 · 내 폰 (지시 71) */
.top-nav { display: flex; align-items: center; gap: 12px; }
.nav-link {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px;
}
.nav-link:hover { border-color: var(--blue); color: var(--blue); }
.who { color: var(--text-3); font-size: 14px; }

.solo.login .box { width: 100%; max-width: 400px; text-align: center; }
.login h1 { font-size: 32px; }
.login-sub { color: var(--text-2); }
.login-err {
  margin: 20px 0 0 !important; padding: 12px 14px; border-radius: 12px; font-size: 14px !important;
  background: rgba(229, 72, 77, .1); color: var(--danger) !important;
}
.sso { margin-top: 28px; display: grid; gap: 10px; }
.sso-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 16px;
  transition: filter .15s ease, transform .08s ease;
}
.sso-btn:hover { filter: brightness(.96); }
.sso-btn:active { transform: scale(.99); }
.sso-btn:focus-visible { outline: 3px solid rgba(47, 84, 235, .45); outline-offset: 3px; }
.sso-btn svg { position: absolute; left: 18px; width: 20px; height: 20px; }
/* 공식 색: 카카오 #FEE500 + 검정 85% · 네이버 #03C75A + 흰 글자 · Google 흰 바탕/#747775 테두리/#1F1F1F
   (어두운 화면: #131314/#8E918F/#E3E3E3) · Apple 검정/흰(어두운 화면은 반대) */
.sso-btn.kakao { background: #FEE500; color: rgba(0, 0, 0, .85); }
.sso-btn.naver { background: #03C75A; color: #fff; }
.sso-btn.google { background: #fff; color: #1F1F1F; border: 1px solid #747775; }
.sso-btn.apple { background: #000; color: #fff; }
@media (prefers-color-scheme: dark) {
  .sso-btn.google { background: #131314; color: #E3E3E3; border-color: #8E918F; }
  .sso-btn.apple { background: #fff; color: #000; }
}
.login-note { font-size: 13px !important; color: var(--text-3) !important; margin-top: 24px !important; }

.badge {
  display: inline-block; vertical-align: 1px; margin-left: 4px; padding: 1px 7px; border-radius: 6px;
  background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 700;
}
.d-open.reg { background: var(--blue); color: #fff; }
.empty { padding: 18px 0 8px; }
.empty b { font-weight: 600; }
.empty p { margin: 4px 0 0; color: var(--text-3); font-size: 14px; }
.foot .link.small + .link.small { margin-left: 16px; }
.acct-card .card-head a { color: var(--blue); font-size: 14px; font-weight: 600; text-decoration: none; }
@media (max-width: 560px) {
  .nav-link { height: 36px; padding: 0 12px; font-size: 14px; }
}
/* 지시 155: QR 등록 */
.qr { width: 220px; height: 220px; margin: 4px auto 12px; background: #fff; border-radius: 12px; padding: 6px; }
.qr svg { width: 100%; height: 100%; display: block; }
.code.alt { font-size: .8125rem; letter-spacing: 0; font-weight: 600; opacity: .6; margin-top: 6px; }
/* 나라·언어 고르기 — 오른쪽 위 동그란 국기 (앱 .flagbtn/.ccrow 와 같은 모양) */
.cc-wrap { position: relative; flex: none; }
.cc-btn {
  display: block; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; overflow: hidden;
  background: var(--bg-2); cursor: pointer; box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .15s ease, transform .08s ease;
}
.cc-btn:hover { box-shadow: 0 0 0 2px var(--blue); }
.cc-btn:active { transform: scale(.95); }
.cc-btn:focus-visible { outline: 3px solid rgba(47, 84, 235, .45); outline-offset: 3px; }
.cc-btn svg, .cc-pop .flag svg { width: 100%; height: 100%; display: block; }
.cc-pop {
  position: absolute; z-index: 15; top: calc(100% + 10px); right: 0;
  width: 300px; max-width: calc(100vw - 32px); padding: 8px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  animation: rise .12s ease;
}
.cc-title { margin: 0; padding: 8px 4px 6px; font-size: 13px; font-weight: 700; color: var(--text-3); }
.cc-list { max-height: min(62vh, 560px); overflow-y: auto; overscroll-behavior: contain; }
.ccrow {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 6px 4px;
  border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; text-align: left; border-radius: 0;
}
.ccrow:last-child { border-bottom: 0; }
.ccrow:hover { background: var(--bg-2); }
.ccrow:focus-visible { outline: 2px solid rgba(47, 84, 235, .45); outline-offset: -2px; border-radius: 10px; }
.ccrow .flag { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 1px var(--line); }
.ccrow .cct { flex: 1; min-width: 0; line-height: 1.3; }
.ccrow .cct b { display: block; font-weight: 700; font-size: 15px; }
.ccrow .cct small { color: var(--text-3); font-size: 13px; }
.ccrow.on .cct b { color: var(--blue); }
.cck { color: var(--blue); font-weight: 800; }
@media (max-width: 560px) {
  .top-nav { gap: 10px; }
  .cc-pop { right: -4px; }
}
/* 일본어·중국어는 띄어쓰기가 없어 keep-all 이면 줄이 안 바뀌어 화면 밖으로 나간다 */
html:lang(ja) body, html:lang(zh) body { word-break: normal; line-break: strict; }
/* 지시 208: 앱 소개 */
.about { max-width: 1120px; margin: 8px auto 0; padding: 0 24px; color: var(--text-3); }
.about h2 { font-size: 15px; font-weight: 700; color: var(--text-2, inherit); margin: 0 0 6px; }
.about p { font-size: 13px; line-height: 1.65; margin: 0; max-width: 720px; }
@media (max-width: 640px) { .about { padding: 0 16px; } }

/* 지시 238: 폰 별명 바로 바꾸기 */
.d-nrow{display:flex;align-items:center;gap:6px;min-width:0}
.d-nrow .d-name{cursor:text;min-width:0}
.d-edit{border:0;background:none;color:var(--text-3);font-size:15px;line-height:1;padding:4px;border-radius:6px;cursor:pointer}
.d-edit:hover{background:rgba(127,127,127,.15);color:inherit}
