:root{
  --bg:#f7f7fb;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border: rgba(17,24,39,.12);
  --shadow: 0 18px 50px rgba(17,24,39,.10);
  --btn:#111827;
  --btnText:#ffffff;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
}

.wrap{
  height:100%;
  display:grid;
  place-content:center;
  gap:14px;
  padding:24px;
  text-align:center;
}

h1{
  margin:0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing:.2px;
}

.btn{
  border:0;
  cursor:pointer;
  background: var(--btn);
  color: var(--btnText);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(17,24,39,.12);
}
.btn:active{ transform: translateY(1px); }
.btn.small{ margin-top:14px; width:100%; background:#374151; }

.overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background: rgba(17,24,39,.35);
}
.overlay.show{ display:flex; }

.modal{
  width: min(520px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.mhead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 12px;
}
.mttl{
  font-weight: 900;
  font-size: 15px;
}
.x{
  width:38px; height:38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:#fff;
  cursor:pointer;
}

.codeLine{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.label{
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  white-space:nowrap;
}
.code{
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 4px;
  margin-left:auto;
}
.copy{
  width:44px; height:40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:#fff;
  cursor:pointer;
  font-weight:900;
}

.oldBlock{
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.oldList{
  margin-top: 8px;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f9fafb;
  font-weight: 900;
  letter-spacing: 2px;
  cursor:pointer;
}
.note{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.toast{
  position:fixed;
  left:50%;
  bottom:16px;
  transform: translateX(-50%);
  background:#fff;
  border:1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 10px 25px rgba(17,24,39,.12);
  display:none;
  font-size: 12px;
}
.toast.show{ display:block; }
