:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #1b2333;
  --muted: #6b7689;
  --line: #e4e9f2;
  --brand: #4f5ee5;
  --brand-soft: #eef0ff;
  --brand-ink: #3a48c9;
  --ok: #0f9d6e;
  --err: #d64545;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 60, .04), 0 10px 30px rgba(20, 30, 60, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 40px 20px 60px;
  background:
    radial-gradient(1100px 500px at 50% -220px, #e6eaff 0%, rgba(230, 234, 255, 0) 70%),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 760px; margin: 0 auto; }

.hero { display: flex; gap: 16px; align-items: flex-start; margin: 0 0 26px; }
.mark {
  flex: 0 0 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #5a68f0, #7a5ce8);
  color: #fff; box-shadow: 0 8px 20px rgba(79, 94, 229, .28);
}
.mark svg { width: 24px; height: 24px; }
h1 { margin: 0; font-size: 23px; letter-spacing: -.3px; font-weight: 650; }
.sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }

h2 { margin: 0; font-size: 15px; font-weight: 650; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px 22px;
  margin-bottom: 16px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }

.badge {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 600;
}
.badge.quiet { background: #f0f2f7; color: var(--muted); }

.link-btn {
  border: 0; background: none; color: var(--brand); cursor: pointer;
  font-size: 13px; padding: 2px 4px; font-family: inherit;
}
.link-btn:hover { text-decoration: underline; }

.key-form { display: flex; gap: 9px; }
.key-form.is-hidden { display: none; }

input[type="password"], .link-input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fbfcfe; color: var(--ink);
  font-size: 13px; font-family: inherit; outline: none;
}
input[type="password"]:focus, .link-input:focus { border-color: var(--brand); background: #fff; }
.link-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }

.btn {
  height: 40px; padding: 0 18px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn:hover { border-color: #c9d2e6; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #4453d8; }
.btn.copy { height: 36px; padding: 0 15px; }

.hint { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; }
.hint.ok { color: var(--ok); }

.seg-group { display: inline-flex; gap: 3px; padding: 3px; background: #f1f3f9; border-radius: 10px; margin-bottom: 14px; }
.seg {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: 6px 16px; border-radius: 8px; font-size: 13px; font-family: inherit;
}
.seg.active { background: #fff; color: var(--brand-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(20,30,60,.10); }

.drop {
  border: 1.5px dashed #cbd4e6; border-radius: 12px;
  padding: 32px 18px; text-align: center; cursor: pointer;
  background: #fcfdff; transition: border-color .15s, background .15s, transform .15s;
  outline: none;
}
.drop:hover, .drop:focus-visible { border-color: var(--brand); background: #f8f9ff; }
.drop.dragging { border-color: var(--brand); background: var(--brand-soft); transform: scale(1.005); }
.drop-icon { color: var(--brand); margin-bottom: 8px; }
.drop-icon svg { width: 30px; height: 30px; }
.drop-title { margin: 0; font-size: 14.5px; font-weight: 600; }
.drop-sub { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }

.status { margin-top: 14px; padding: 10px 13px; border-radius: 9px; font-size: 13px; }
.status.info { background: var(--brand-soft); color: var(--brand-ink); }
.status.error { background: #fdeeee; color: var(--err); }

.card { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.card:first-child { border-top: 0; padding-top: 2px; }
.thumb {
  flex: 0 0 84px; width: 84px; height: 84px; border-radius: 10px;
  overflow: hidden; background: #f1f3f9; display: grid; place-items: center;
  border: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.err { color: var(--err); font-size: 11px; text-align: center; padding: 6px; }
.card-body { flex: 1; min-width: 0; }
.card-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.fname { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { color: var(--muted); font-size: 12px; white-space: nowrap; }

.tabs { display: flex; gap: 14px; margin-bottom: 8px; }
.tab {
  border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--muted); cursor: pointer; font-size: 12.5px; padding: 0 0 5px;
  font-family: inherit;
}
.tab.active { color: var(--brand-ink); border-bottom-color: var(--brand); font-weight: 600; }

.copy-row { display: flex; gap: 8px; }
.card-note { margin: 7px 0 0; font-size: 12px; color: var(--muted); }
.card-note.error { color: var(--err); }
.card-note.ok { color: var(--ok); }

.foot {
  margin-top: 24px; display: grid; gap: 12px;
  padding: 18px 22px; border: 1px solid var(--line);
  border-radius: var(--radius); background: rgba(255,255,255,.6);
}
.foot-item { display: flex; gap: 10px; align-items: flex-start; }
.foot-item .dot { flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-top: 7px; }
.foot-item strong { display: block; font-size: 13px; font-weight: 600; }
.foot-item small { display: block; color: var(--muted); font-size: 12px; }

@media (max-width: 560px) {
  body { padding: 24px 14px 40px; }
  .panel { padding: 16px; }
  .hero { gap: 12px; }
  h1 { font-size: 20px; }
  .card { flex-direction: column; }
  .thumb { flex: none; width: 100%; height: 160px; }
  .seg { padding: 6px 11px; }
}
