:root{
  --bg:#0b0c0f;
  --card:#12141a;
  --txt:#e9edf3;
  --mut:#a7b0bf;
  --line:#262a34;
  --pri:#7c5cff;
  --pri2:#b9a7ff;
  --warn:#ffcc66;
  --bad:#ff6b6b;
  --ok:#5de08a;

  --r:16px;
  --pad:16px;
  --w:920px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(124,92,255,.25), transparent 60%),
              radial-gradient(1000px 500px at 90% 0%, rgba(185,167,255,.16), transparent 55%),
              var(--bg);
  color:var(--txt);
}

.hdr{
  position:sticky; top:0; z-index:10;
  background: rgba(11,12,15,.72);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(38,42,52,.7);
}
.hdr-inner{
  max-width:var(--w);
  margin:0 auto;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{ display:flex; align-items:center; gap:12px; }
.brand-mark{
  width:34px; height:34px; border-radius:10px;
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(185,167,255,.6));
  box-shadow: 0 10px 28px rgba(124,92,255,.18);
}
.brand-title{ font-weight:800; letter-spacing:.2px; }
.brand-sub{ font-size:12px; color:var(--mut); margin-top:2px; }

.nav{ display:flex; gap:8px; }
.tab{
  border:1px solid var(--line);
  background: rgba(18,20,26,.75);
  color:var(--txt);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
}
.tab.active{
  border-color: rgba(124,92,255,.6);
  box-shadow: 0 0 0 3px rgba(124,92,255,.18);
}

.wrap{
  max-width:var(--w);
  margin: 18px auto 48px;
  padding: 0 16px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.card{
  background: linear-gradient(180deg, rgba(18,20,26,.92), rgba(15,17,22,.92));
  border:1px solid rgba(38,42,52,.85);
  border-radius: var(--r);
  padding: var(--pad);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.card-title{ font-weight:800; margin-bottom:12px; }
.lbl{ display:block; margin:10px 0 6px; font-size:13px; color: var(--mut); }

.in, .ta{
  width:100%;
  border:1px solid var(--line);
  background: rgba(8,10,14,.55);
  color: var(--txt);
  border-radius: 12px;
  padding: 12px 12px;
  outline:none;
}
.ta{
  min-height: 160px;
  resize: vertical;
  line-height: 1.45;
}
.ta.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.hint{ margin-top:6px; font-size:12px; }

.row{ display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; }
.col{ flex: 1 1 320px; }
.btncol{ display:flex; flex-direction:column; gap:10px; min-width: 170px; }

.btn{
  border:1px solid var(--line);
  background: rgba(18,20,26,.85);
  color: var(--txt);
  padding: 12px 14px;
  border-radius: 12px;
  cursor:pointer;
  font-weight:700;
}
.btn:disabled{ opacity:.55; cursor:not-allowed; }
.btn.primary{
  border-color: rgba(124,92,255,.6);
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(185,167,255,.55));
  color: #0b0c0f;
}

.status{ margin-top: 10px; min-height: 20px; }
.warn{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,204,102,.35);
  background: rgba(255,204,102,.08);
  color: #ffe0a3;
}
.detect{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(124,92,255,.25);
  background: rgba(124,92,255,.08);
  margin-bottom:10px;
}

.result{
  margin-top: 14px;
  border-top: 1px dashed rgba(38,42,52,.9);
  padding-top: 14px;
}
.result-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  flex-wrap:wrap;
}
.result-title{ font-weight:800; }
.result-actions{ display:flex; gap:8px; flex-wrap:wrap; }

.qr{ margin-top: 14px; padding-top: 14px; border-top: 1px dashed rgba(38,42,52,.9); }
.qr-title{ font-weight:800; margin-bottom: 10px; }
.qr-mount{ display:inline-block; background: #fff; padding: 10px; border-radius: 12px; }

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

.disc{ margin-top: 14px; }
.disc summary{ cursor:pointer; color: var(--pri2); font-weight:700; }
.disc ul{ margin: 10px 0 0 18px; color: var(--mut); }

.footnote{ background: rgba(18,20,26,.55); border-style: dashed; }

/* tiny switch */
.switch{
  display:inline-flex;
  align-items:center;
  gap:8px;
  user-select:none;
  color: var(--mut);
  font-size: 13px;
}
.switch input{ transform: translateY(1px); }

@media (max-width: 560px){
  .ta{ min-height: 190px; }
  .btncol{ min-width: 100%; flex-direction:row; }
  .btncol .btn{ flex: 1; }
}
