/* phone2pc — 보라 계열 accent, 큰 라운딩, 부드러운 그림자 기조 */

:root {
  --bg: #f4f3fb;
  --panel: #ffffff;
  --panel-2: #f6f5fd;
  --text: #1a1730;
  --muted: #726e8c;
  --line: #e7e4f5;

  --accent: #5b3ef0;        /* 채워진 배경용 */
  --accent-ink: #5b3ef0;    /* 연한 배경 위 글씨용 */
  --accent-soft: #eeebff;
  --on-accent: #ffffff;
  --grad: linear-gradient(135deg, #4c2fe0 0%, #7c3aed 100%);

  --ok: #12855a;
  --danger: #d23c5a;

  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 12px;
  --shadow: 0 1px 2px rgba(60, 44, 130, .04), 0 10px 28px rgba(60, 44, 130, .09);
  --shadow-lift: 0 2px 6px rgba(60, 44, 130, .08), 0 18px 40px rgba(60, 44, 130, .16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131126;
    --panel: #1c1934;
    --panel-2: #262242;
    --text: #ece9fb;
    --muted: #9d97bd;
    --line: #302b4f;

    --accent: #6d54f5;
    --accent-ink: #b7a6ff;
    --accent-soft: #272149;
    --on-accent: #ffffff;

    --ok: #4ade80;
    --danger: #ff7a92;

    --shadow: 0 1px 2px rgba(0, 0, 0, .34), 0 12px 30px rgba(0, 0, 0, .3);
    --shadow-lift: 0 2px 8px rgba(0, 0, 0, .4), 0 20px 44px rgba(0, 0, 0, .42);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

button, input, select { font: inherit; color: inherit; }

.btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius-xs);
  padding: 10px 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background .14s, border-color .14s, transform .08s, box-shadow .14s;
}
.btn:hover { background: var(--panel-2); border-color: var(--accent-soft); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
  box-shadow: 0 4px 12px rgba(91, 62, 240, .28);
}
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent-ink); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ------------------------------------------------------------ 데스크탑 화면 */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px;
  background: transparent;
}

.brand { display: flex; align-items: baseline; gap: 10px; }
.brand b {
  font-size: 21px;
  letter-spacing: -.4px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand span { font-size: 13px; color: var(--muted); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.on .dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.status.off .dot { background: var(--danger); }

.layout {
  display: grid;
  grid-template-columns: 356px minmax(0, 1fr);
  gap: 22px;
  padding: 10px 32px 48px;
  align-items: stretch;
  max-width: 1440px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 8px 16px 32px; }
  .top { padding: 16px; }
}

.qr-card {
  padding: 26px 24px;
  text-align: center;
  align-self: start;      /* 행 높이만큼 늘어나지 않게 */
  position: sticky;
  top: 20px;
}
.step { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.step b { color: var(--text); }

.qr-frame {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  width: 244px;
  height: 244px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(60, 44, 130, .14);
}
.qr-frame img, .qr-frame svg { width: 100%; height: 100%; display: block; }
.qr-frame.loading { color: var(--muted); font-size: 13px; }
@media (max-width: 900px) {
  .qr-frame { width: 200px; height: 200px; }
}

.url-row {
  display: flex;
  gap: 6px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 5px 5px 16px;
  margin-bottom: 12px;
}
.url-row code {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.url-row .btn { padding: 6px 14px; border-radius: 999px; }

#newSession {
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 600;
}

.hint { font-size: 12.5px; color: var(--muted); text-align: left; margin: 16px 0 0; }
.hint ul { margin: 6px 0 0; padding-left: 18px; }
.hint li { margin: 5px 0; }

details.host-picker { margin-top: 14px; text-align: left; font-size: 13px; }
details.host-picker summary { cursor: pointer; color: var(--accent-ink); }
details.host-picker select {
  width: 100%; margin-top: 8px; padding: 9px 10px;
  border-radius: var(--radius-xs); border: 1px solid var(--line); background: var(--panel-2);
}

.files-card {
  padding: 22px 24px 26px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
}
.files-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.files-head h2 { font-size: 17px; margin: 0; flex: 1; letter-spacing: -.2px; }
.files-head .count {
  display: inline-block;
  min-width: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
  margin-left: 8px;
}
.auto-dl {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--muted); cursor: pointer;
  padding: 8px 14px; border-radius: 999px; background: var(--panel-2);
}
.auto-dl input { accent-color: var(--accent); }
.files-head .btn { border-radius: 999px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  align-content: start;
  gap: 16px;
}

.tile {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .16s, box-shadow .16s;
  animation: pop .28s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tile .thumb {
  aspect-ratio: 4 / 3;
  background: var(--panel-2);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.tile .thumb img, .tile .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .thumb .ext {
  color: var(--accent-ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
}

.tile .meta { padding: 12px 14px 6px; }
.tile .name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .sub { font-size: 11.5px; color: var(--muted); }

.tile .actions { display: flex; gap: 6px; padding: 8px 12px 14px; }
.tile .actions .btn { padding: 7px 8px; font-size: 12px; border-radius: 999px; flex: 1; }

.empty {
  flex: 1;                 /* 카드 안에 남는 높이를 채운다 */
  display: grid;
  place-items: center;
  border: 1.5px dashed var(--line);
  border-radius: 18px;
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: var(--panel-2);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  background: var(--grad);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* -------------------------------------------------------------- 모바일 화면 */

.m-wrap { max-width: 520px; margin: 0 auto; padding: 20px 18px 48px; }

.m-head { text-align: center; padding: 16px 0 24px; }
.m-head b {
  font-size: 24px;
  letter-spacing: -.5px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.m-head p { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); }

.m-actions { display: grid; gap: 14px; margin-bottom: 20px; }

.big-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  transition: transform .1s, box-shadow .16s;
}
.big-btn:active { transform: scale(.985); }
.big-btn.accent {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 24px rgba(76, 47, 224, .34);
}
.big-btn .ico {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
  background: var(--accent-soft);
}
.big-btn.accent .ico { background: rgba(255, 255, 255, .2); }
.big-btn .t { font-size: 16.5px; font-weight: 700; letter-spacing: -.2px; }
.big-btn .d { font-size: 12.5px; opacity: .78; }

.opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 14.5px;
  font-weight: 500;
}
.opt-row .d { font-size: 12px; font-weight: 400; color: var(--muted); }

.switch { position: relative; width: 50px; height: 29px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--line); transition: background .18s; pointer-events: none;
}
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 23px; height: 23px;
  border-radius: 50%; background: #fff; transition: transform .18s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .28); pointer-events: none;
}
.switch input:checked ~ .track { background: var(--accent); }
.switch input:checked ~ .knob { transform: translateX(21px); }

.m-list { display: grid; gap: 12px; }
.m-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.m-item .th { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: var(--panel-2); flex: none; }
.m-item .info { flex: 1; min-width: 0; }
.m-item .nm { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-item .st { font-size: 12px; color: var(--muted); }
.m-item .st.done { color: var(--ok); font-weight: 600; }
.m-item .st.err { color: var(--danger); }
.bar { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 7px; }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .18s; }

.notice {
  padding: 28px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.notice b { display: block; color: var(--text); font-size: 17px; margin-bottom: 8px; }

/* ------------------------------------------------------- 하단 제휴·광고 영역 */

.site-footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 8px 32px 40px;
  display: grid;
  gap: 16px;
}
.mobile-page .site-footer { max-width: 520px; padding: 4px 18px 40px; }
@media (max-width: 900px) { .site-footer { padding: 4px 16px 32px; } }

.promo {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 16px;
}
.promo-head {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 600; margin-bottom: 14px;
}
.promo-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .2px;
  padding: 3px 9px; border-radius: 999px;
  background: #eaf7ee; color: #147a3d; border: 1px solid #cfeeda;
}
@media (prefers-color-scheme: dark) {
  .promo-tag { background: #16341f; color: #6ee7a0; border-color: #235536; }
}

.promo-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.promo-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.promo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent-soft); }
.promo-card.pending { opacity: .55; cursor: default; }
.promo-card.pending:hover { transform: none; box-shadow: none; }

.promo-badge {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  margin-bottom: 7px;
}
.promo-name { font-size: 14px; font-weight: 600; letter-spacing: -.2px; }
.promo-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.promo-go { font-size: 12px; font-weight: 600; color: var(--accent-ink); margin-top: 9px; }
.promo-card.pending .promo-go { color: var(--muted); font-weight: 400; }

.promo-note { font-size: 11px; color: var(--muted); margin: 13px 0 0; }

.adslot {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
  min-height: 110px;
}
.adslot-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--muted); margin-bottom: 9px;
}
.adslot-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .4px;
  padding: 2px 6px; border-radius: 5px;
  background: var(--line); color: var(--muted);
}
.adslot-empty { font-size: 12px; color: var(--muted); padding: 14px 0; }
.adslot-empty small { font-size: 11px; opacity: .75; }


@media print { .site-footer { display: none; } }


/* ------------------------------------------------------------------ 회사정보 */

.site-info {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 26px 32px;
  padding: 24px 26px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (max-width: 760px) {
  .site-info { grid-template-columns: 1fr; gap: 22px; padding: 20px 20px 14px; }
}

.si-head { display: flex; align-items: center; gap: 11px; }
.si-logo {
  width: 36px; height: 36px; flex: none;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 5px 14px rgba(76, 47, 224, .3);
}
.si-name { font-size: 16px; font-weight: 700; letter-spacing: -.3px; }

.si-tagline {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  margin: 12px 0 14px;
  max-width: 46em;
}

.si-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.si-sep { color: var(--line); user-select: none; }

.si-domain, .si-board {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, "Consolas", monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: none;
}
.si-domain:hover, .si-board:hover { text-decoration: underline; }
.si-board { font-weight: 500; }

.si-group { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.si-group-title {
  font-size: 12.5px; font-weight: 700; letter-spacing: -.1px;
  margin-bottom: 3px;
}

.si-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color .13s, transform .13s;
}
a.si-link:hover { color: var(--accent-ink); transform: translateX(2px); }
.si-link.accent { color: var(--accent-ink); font-weight: 600; }
.si-link svg { flex: none; opacity: .85; }
.si-link .ext-mark { opacity: .45; margin-left: 1px; }
.si-link.pending { opacity: .45; cursor: default; }

.si-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 15px;
}
.si-copy { font-size: 11.5px; color: var(--muted); }

.si-mini { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.si-mini-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--muted); text-decoration: none;
}
a.si-mini-link:hover { color: var(--accent-ink); text-decoration: underline; }
.si-mini-link.accent { color: var(--accent-ink); font-weight: 600; }
.si-mini-link .ext-mark { opacity: .5; }
.si-mini-link.pending { opacity: .45; cursor: default; }
