:root {
  color-scheme: light;
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-soft: #f8f9fc;
  --ink: #161922;
  --ink-soft: #3f4350;
  --muted: #737786;
  --faint: #a0a4b1;
  --line: #e6e8f0;
  --line-strong: #d7dae4;
  --accent: #ff4b2b;
  --accent-soft: #fff0eb;
  --send: #1677ff;
  --send-deep: #0b63e5;
  --send-soft: #edf5ff;
  --green: #0b8a5a;
  --green-soft: #e9f8f1;
  --amber: #a56300;
  --amber-soft: #fff6df;
  --red: #c93037;
  --red-soft: #fdeced;
  --shadow-sm: 0 1px 2px rgba(20, 24, 37, 0.04), 0 5px 16px rgba(20, 24, 37, 0.04);
  --shadow-md: 0 18px 50px rgba(23, 28, 45, 0.09), 0 2px 6px rgba(23, 28, 45, 0.04);
  --shadow-lg: 0 30px 90px rgba(16, 22, 40, 0.2);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% -5%, rgba(255, 75, 43, 0.08), transparent 34rem),
    radial-gradient(circle at 95% 4%, rgba(22, 119, 255, 0.075), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

[hidden] { display: none !important; }
button, input { font: inherit; }
button { color: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
svg { width: 1em; height: 1em; fill: none; }
code, pre { font-family: var(--mono); }

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

body.has-file .page { padding-bottom: 78px; }

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 12px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 5px 14px rgba(22, 25, 34, 0.18);
}

.brand-mark svg { width: 23px; height: 23px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.brand-text strong { font-size: 15px; letter-spacing: -0.01em; }
.brand-text small { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

.topbar-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.topbar-note svg { color: var(--green); width: 14px; height: 14px; }

/* ---------- intro ---------- */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(350px, 0.94fr);
  gap: clamp(30px, 6vw, 72px);
  align-items: center;
  padding: 58px 0 56px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(38px, 5.2vw, 61px);
  line-height: 1.09;
  letter-spacing: -0.052em;
  font-weight: 760;
}

.mobile-break { display: none; }

.lede {
  max-width: 50ch;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.78;
}

.lede code {
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.86em;
}

.feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 13px;
}

.feature-row span { display: inline-flex; align-items: center; gap: 6px; }
.feature-row svg { color: var(--green); width: 14px; height: 14px; }

.upload-card {
  position: relative;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
}

.drop-zone {
  display: flex;
  width: 100%;
  min-height: 300px;
  padding: 36px 26px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border: 1.5px dashed #cfd4e1;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(250, 251, 254, 0.92)),
    repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(22, 25, 34, 0.02) 12px, rgba(22, 25, 34, 0.02) 13px);
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover, .drop-zone:focus-visible {
  border-color: rgba(22, 119, 255, 0.48);
  background: #fbfdff;
  outline: none;
}

.drop-zone.dragover {
  border-color: var(--send);
  background: var(--send-soft);
  transform: scale(0.995);
}
.drop-zone.busy { cursor: wait; opacity: 0.72; }
.drop-zone.busy .drop-icon { animation: soft-pulse 1.1s ease-in-out infinite; }
@keyframes soft-pulse { 50% { transform: scale(0.93); opacity: 0.7; } }

.drop-zone strong { margin-top: 9px; font-size: 18px; letter-spacing: -0.02em; }
.drop-zone > span:not(.drop-icon):not(.drop-hint) { color: var(--muted); font-size: 13px; }

.drop-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 19px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 14px 28px rgba(22, 25, 34, 0.2);
}

.drop-icon svg { width: 28px; height: 28px; }

.drop-hint {
  margin-top: 8px;
  color: var(--faint);
  font-size: 11.5px;
}

.privacy-note {
  display: flex;
  gap: 9px;
  padding: 13px 13px 3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.privacy-note svg { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--green); }
.privacy-note p { margin: 0; }

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.access-note {
  display: flex;
  margin: 9px 5px 2px;
  padding: 10px 11px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #d6e7ff;
  border-radius: 11px;
  background: linear-gradient(135deg, #f5faff, #edf5ff);
}
.access-note > div { display: flex; min-width: 0; align-items: baseline; gap: 7px; }
.access-note span { flex: none; color: #4b75a3; font-size: 9.5px; font-weight: 650; }
.access-note code { overflow: hidden; color: var(--send-deep); font-family: var(--mono); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.copy-access {
  display: inline-flex;
  height: 26px;
  padding: 0 8px;
  flex: none;
  align-items: center;
  gap: 4px;
  border: 1px solid #bdd9fb;
  border-radius: 7px;
  background: #fff;
  color: var(--send-deep);
  cursor: pointer;
  font-size: 9.5px;
  font-weight: 650;
}
.copy-access:hover { background: var(--send-soft); }
.copy-access svg { width: 11px; height: 11px; }

/* ---------- workspace ---------- */

.workspace { padding-bottom: 40px; animation: rise 280ms ease both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.file-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
}

.file-main { display: flex; min-width: 0; align-items: center; gap: 12px; }

.file-icon {
  display: grid;
  flex: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.file-icon svg { width: 21px; height: 21px; }

.file-copy { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.file-copy strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.file-copy span { overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }

.file-actions { display: flex; flex: none; align-items: center; gap: 8px; }

.btn, .icon-btn, .text-btn, .send-btn, .expand-btn, .reveal-btn, .search-clear {
  border: 0;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  min-height: 42px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 650;
  transition: background 150ms ease, transform 120ms ease, box-shadow 150ms ease;
}
.btn:active { transform: scale(0.985); }
.btn svg { width: 15px; height: 15px; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn-quiet { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); }
.btn-quiet:hover { border-color: var(--line-strong); background: var(--surface-soft); }

.icon-btn {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  transition: background 140ms ease, color 140ms ease;
}
.icon-btn:hover { background: var(--surface-soft); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.stat {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.stat span { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }
.stat strong { display: block; overflow: hidden; margin-top: 3px; font-size: 21px; letter-spacing: -0.035em; text-overflow: ellipsis; white-space: nowrap; }
.stat small { color: var(--faint); font-size: 10.5px; font-weight: 500; letter-spacing: 0; }

.account-card {
  margin-top: 12px;
  padding: 17px 18px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(115deg, rgba(255, 75, 43, 0.035), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.account-head .eyebrow { margin-bottom: 2px; font-size: 9px; letter-spacing: 0.12em; }
.account-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.035em; }
.account-head p:not(.eyebrow) { margin: 3px 0 0; color: var(--muted); font-size: 10.5px; }
.account-actions { display: flex; flex: none; align-items: center; gap: 8px; }
.account-count {
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.account-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.account-item {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}
.account-item span { display: block; color: var(--faint); font-size: 9px; font-weight: 600; letter-spacing: 0.03em; }
.account-item strong {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.account-item.missing strong { color: var(--faint); font-family: var(--font); font-style: italic; font-weight: 500; }
.account-note { margin: 10px 0 0; color: var(--faint); font-size: 9.5px; line-height: 1.55; }
.account-note.warn { color: var(--amber); }

.tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.66);
}

.tab {
  display: inline-flex;
  min-height: 38px;
  padding: 0 13px;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}
.tab svg { width: 15px; height: 15px; }
.tab b {
  min-width: 19px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(22, 25, 34, 0.06);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}
.tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 5px rgba(20, 24, 37, 0.09); }
.tab.active b { background: var(--accent-soft); color: var(--accent); }

.search-box {
  position: relative;
  display: flex;
  width: min(340px, 42vw);
  min-height: 46px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.search-box:focus-within { border-color: rgba(22, 119, 255, 0.45); box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.09); }
.search-box > svg { flex: none; width: 16px; height: 16px; color: var(--faint); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-box input::placeholder { color: var(--faint); }
.search-clear { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 6px; background: transparent; color: var(--muted); }
.search-clear:hover { background: var(--surface-soft); }
.search-clear svg { width: 13px; height: 13px; }

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 3px 11px;
}

.list-summary { color: var(--muted); font-size: 12px; }
.list-summary b { color: var(--ink); font-weight: 700; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.toolbar-divider { width: 1px; height: 12px; background: var(--line-strong); }
.text-btn { padding: 3px 1px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; }
.text-btn:hover { color: var(--send); }
.text-btn:disabled { color: var(--faint); cursor: not-allowed; }

/* ---------- entries ---------- */

.entry-list { display: grid; gap: 10px; }

.entry {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(20, 24, 37, 0.02);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.entry:hover { border-color: var(--line-strong); }
.entry.open { border-color: rgba(22, 119, 255, 0.25); box-shadow: var(--shadow-sm); }
.entry.flash { animation: entry-flash 1.3s ease; }
@keyframes entry-flash {
  0%, 100% { box-shadow: 0 1px 2px rgba(20, 24, 37, 0.02); }
  20%, 65% { border-color: rgba(22, 119, 255, 0.55); box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.12); }
}

.entry-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: stretch;
  min-height: 96px;
}

.check {
  display: grid;
  place-items: center;
  cursor: pointer;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check i {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: transparent;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.check i svg { width: 12px; height: 12px; stroke-width: 2.6; }
.check input:checked + i { border-color: var(--send); background: var(--send); color: #fff; }
.check input:focus-visible + i { outline: 3px solid rgba(22, 119, 255, 0.2); outline-offset: 2px; }
.check:hover i { border-color: #aeb5c7; }

.entry-main {
  display: flex;
  min-width: 0;
  padding: 15px 8px 15px 18px;
  align-items: stretch;
  justify-content: center;
  flex-direction: column;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.entry-topline { display: flex; align-items: center; gap: 7px; min-width: 0; }
.method {
  display: inline-flex;
  height: 21px;
  padding: 0 7px;
  align-items: center;
  border-radius: 5px;
  background: var(--send-soft);
  color: var(--send-deep);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.03em;
}
.method.post { background: var(--accent-soft); color: #d03a1d; }
.method.put, .method.patch { background: #f1ecff; color: #6941c6; }
.method.delete { background: var(--red-soft); color: var(--red); }
.method.head, .method.options { background: #eef1f6; color: #536074; }

.status {
  display: inline-flex;
  height: 21px;
  padding: 0 6px;
  align-items: center;
  border-radius: 5px;
  background: var(--green-soft);
  color: var(--green);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 750;
}
.status.warn { background: var(--amber-soft); color: var(--amber); }
.status.bad { background: var(--red-soft); color: var(--red); }
.status.none { background: #eef1f6; color: var(--muted); }

.entry-time { margin-left: auto; color: var(--faint); font-family: var(--mono); font-size: 10.5px; white-space: nowrap; }

.entry-path {
  display: block;
  overflow: hidden;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-hostline { display: flex; align-items: center; gap: 7px; min-width: 0; margin-top: 4px; }
.host { overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.mime {
  flex: none;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.expand-btn {
  display: grid;
  width: 100%;
  place-items: center;
  border-left: 1px solid transparent;
  background: transparent;
  color: var(--faint);
  transition: color 140ms ease, background 140ms ease;
}
.expand-btn:hover { background: var(--surface-soft); color: var(--ink); }
.expand-btn svg { width: 18px; height: 18px; transition: transform 180ms ease; }
.entry.open .expand-btn svg { transform: rotate(180deg); }

.entry-details {
  border-top: 1px solid var(--line);
  background: #fbfcfe;
  animation: details-in 170ms ease both;
}
@keyframes details-in { from { opacity: 0; } to { opacity: 1; } }

.detail-inner { padding: 16px 18px 18px 44px; }
.detail-actions { display: flex; justify-content: flex-end; margin-bottom: 8px; }

.copy-mini {
  display: inline-flex;
  height: 28px;
  padding: 0 9px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 600;
}
.copy-mini:hover { border-color: var(--line-strong); color: var(--ink); }
.copy-mini svg { width: 12px; height: 12px; }
.copy-mini.copied { border-color: #b9e6d3; background: var(--green-soft); color: var(--green); }

.overview-grid {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 6px 12px;
  margin: 0 0 13px;
  font-size: 11.5px;
}
.overview-grid dt { color: var(--faint); }
.overview-grid dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--ink-soft); }
.overview-grid dd.mono { font-family: var(--mono); font-size: 10.5px; }

.kv-block {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.kv-block[open] { box-shadow: 0 1px 4px rgba(20, 24, 37, 0.035); }
.kv-block > summary {
  display: flex;
  min-height: 39px;
  padding: 0 12px;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 650;
  list-style: none;
  user-select: none;
}
.kv-block > summary::-webkit-details-marker { display: none; }
.kv-block > summary::after {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 1.5px solid var(--faint);
  border-bottom: 1.5px solid var(--faint);
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform 150ms ease;
}
.kv-block[open] > summary::after { transform: rotate(225deg) translate(-2px, -1px); }
.kv-block > summary .count {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
}
.kv-body { padding: 0 12px 12px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 10.5px; }
.data-table th, .data-table td { padding: 7px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th { background: var(--surface-soft); color: var(--faint); font-weight: 600; }
.data-table th:first-child, .data-table td:first-child { width: 33%; min-width: 110px; font-family: var(--mono); color: var(--ink-soft); }
.data-table td:last-child { font-family: var(--mono); color: #4f5563; word-break: break-all; }
.data-table tr:hover td { background: #fcfdff; }

.body-pre {
  max-height: 340px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
  color: #28303e;
  font-size: 10.5px;
  line-height: 1.62;
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 2;
}
.body-pre.empty { color: var(--faint); font-family: var(--font); }
.body-pre.ascii { white-space: pre; }
.body-empty { margin: 0; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; color: var(--faint); font-size: 10.5px; }
.body-copy-row { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.body-note { margin: 6px 0 0; color: var(--amber); font-size: 9.5px; line-height: 1.5; }

.detail-subtitle {
  display: flex;
  margin: 16px 0 7px;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.detail-subtitle::after { height: 1px; flex: 1; background: var(--line); content: ""; }

/* ---------- empty ---------- */

.empty-state {
  display: flex;
  padding: 64px 20px;
  align-items: center;
  flex-direction: column;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.45);
  text-align: center;
}
.empty-state > span {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  color: var(--faint);
  box-shadow: var(--shadow-sm);
}
.empty-state > span svg { width: 22px; height: 22px; }
.empty-state strong { font-size: 14px; }
.empty-state p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

/* ---------- fields ---------- */

.fields-head {
  display: flex;
  padding: 20px 20px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: rgba(255, 255, 255, 0.8);
}
.fields-head strong { font-size: 13px; }
.fields-head p { margin: 2px 0 0; color: var(--muted); font-size: 11.5px; }
.fields-actions { display: flex; flex: none; gap: 7px; }

.scope-toggle {
  display: inline-flex;
  margin-top: 8px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 9.5px;
  font-weight: 600;
}
.scope-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.scope-toggle i {
  display: grid;
  width: 14px;
  height: 14px;
  flex: none;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: transparent;
}
.scope-toggle i svg { width: 8px; height: 8px; stroke-width: 3; }
.scope-toggle input:checked + i { border-color: var(--send); background: var(--send); color: #fff; }
.scope-toggle input:focus-visible + i { outline: 2px solid rgba(22, 119, 255, 0.25); outline-offset: 1px; }

.field-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--surface);
}

.field-row {
  display: grid;
  grid-template-columns: 54px 76px minmax(140px, 0.9fr) minmax(180px, 1.1fr);
  gap: 12px;
  padding: 10px 14px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.field-row:last-child { border-bottom: 0; }
.field-row:hover { background: #fcfdff; }
.field-index {
  padding: 2px 0 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9.5px;
  text-align: left;
}
.field-index:hover { color: var(--send); text-decoration: underline; }
.field-where { padding-top: 1px; }
.field-where span {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
}
.field-where span.response { background: var(--send-soft); color: var(--send-deep); }
.field-where span.cookie { background: var(--amber-soft); color: var(--amber); }
.field-path { min-width: 0; color: var(--ink-soft); font-family: var(--mono); font-size: 10.5px; overflow-wrap: anywhere; }
.field-value { min-width: 0; color: #323845; font-family: var(--mono); font-size: 10.5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.field-value.type-number { color: #8a4b00; }
.field-value.type-boolean { color: #6941c6; }
.field-value.type-null { color: var(--faint); font-style: italic; }
.field-value .truncate-note { color: var(--faint); font-family: var(--font); font-style: normal; font-size: 9.5px; }

.load-more-wrap { display: flex; padding: 15px; justify-content: center; border-top: 1px solid var(--line); background: var(--surface-soft); }

/* ---------- footer ---------- */

.footer {
  display: flex;
  padding: 26px 3px 34px;
  align-items: center;
  gap: 9px;
  color: var(--faint);
  font-size: 10.5px;
}
.footer .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }
.footer-spacer { flex: 1; }

/* ---------- bottom bar ---------- */

.bottom-bar {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 10px 20px calc(10px + var(--safe-bottom));
  border-top: 1px solid rgba(225, 228, 237, 0.9);
  background: rgba(250, 251, 253, 0.88);
  backdrop-filter: blur(18px);
  animation: bar-in 230ms ease both;
}
@keyframes bar-in { from { transform: translateY(100%); } to { transform: none; } }

.bottom-inner {
  display: flex;
  width: min(1072px, 100%);
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.selection-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.35; }
.selection-copy strong { font-size: 12.5px; }
.selection-copy span { overflow: hidden; color: var(--muted); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }

.send-btn {
  display: inline-flex;
  min-height: 48px;
  padding: 0 19px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
  background: var(--send);
  color: #fff;
  box-shadow: 0 8px 20px rgba(22, 119, 255, 0.26);
  font-size: 13.5px;
  font-weight: 700;
  transition: background 150ms ease, transform 120ms ease, box-shadow 150ms ease;
}
.send-btn:hover { background: var(--send-deep); box-shadow: 0 10px 24px rgba(22, 119, 255, 0.3); }
.send-btn:active { transform: scale(0.985); }
.send-btn:disabled { opacity: 0.58; box-shadow: none; cursor: wait; }
.send-btn > svg:first-child { width: 17px; height: 17px; }
.send-btn .send-arrow { width: 15px; height: 15px; margin-left: 3px; opacity: 0.75; }
.send-btn .spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- modal ---------- */

.modal { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 19, 30, 0.5); backdrop-filter: blur(5px); animation: fade-in 180ms ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: relative;
  display: flex;
  width: min(620px, 100%);
  max-height: min(92vh, 880px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: sheet-in 220ms cubic-bezier(0.22, 0.8, 0.28, 1) both;
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: none; } }

.sheet-grab { display: none; }
.sheet-head { display: flex; padding: 22px 22px 8px; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sheet-head .eyebrow { margin-bottom: 3px; font-size: 9px; letter-spacing: 0.14em; }
.sheet-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.035em; }
.sheet-body { padding: 12px 22px 18px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-foot {
  display: flex;
  padding: 13px 22px calc(13px + var(--safe-bottom));
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #fcfdff;
}
.sheet-foot .send-btn { min-width: 140px; }
.sheet-foot .btn { min-height: 44px; }

.send-range { margin-bottom: 18px; }
.field-label { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 11.5px; font-weight: 650; }
.field-label em { margin-left: 5px; color: var(--accent); font-size: 9.5px; font-style: normal; font-weight: 600; }
.field-label i { margin-left: 4px; color: var(--faint); font-size: 9.5px; font-style: normal; font-weight: 500; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: flex; min-height: 36px; padding: 0 8px; align-items: center; justify-content: center; gap: 5px; border-radius: 8px; color: var(--muted); font-size: 11.5px; font-weight: 600; text-align: center; transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease; }
.segmented b { color: var(--faint); font-family: var(--mono); font-size: 9px; font-weight: 600; }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(20, 24, 37, 0.1); }
.segmented input:checked + span b { color: var(--send); }
.segmented input:focus-visible + span { outline: 2px solid rgba(22, 119, 255, 0.35); }
.segmented label.disabled { cursor: not-allowed; opacity: 0.45; }

.server-config { margin-bottom: 15px; }
.switch-row {
  display: flex;
  padding: 12px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #cfe4ff;
  border-radius: 11px;
  background: var(--send-soft);
  cursor: pointer;
}
.switch-row > span { display: flex; flex-direction: column; line-height: 1.4; }
.switch-row strong { color: var(--send-deep); font-size: 11.5px; }
.switch-row small { color: #5481b6; font-size: 10px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { position: relative; flex: none; width: 36px; height: 21px; border-radius: 999px; background: #b9c6d8; transition: background 150ms ease; }
.switch-row i::after { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); content: ""; transition: transform 150ms ease; }
.switch-row input:checked + i { background: var(--send); }
.switch-row input:checked + i::after { transform: translateX(15px); }

.config-fields { display: grid; gap: 13px; }
.field { display: block; }
.access-code-field { margin-bottom: 15px; }
.field > small { display: block; margin-top: 5px; color: var(--faint); font-size: 9.5px; line-height: 1.5; }
.input-wrap {
  display: flex;
  min-height: 43px;
  padding: 0 11px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input-wrap:focus-within { border-color: rgba(22, 119, 255, 0.55); box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.08); }
.input-wrap > svg { flex: none; width: 15px; height: 15px; color: var(--faint); }
.input-wrap input { min-width: 0; flex: 1; height: 41px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12.5px; }
.input-wrap input::placeholder { color: #b1b6c2; }
.reveal-btn { flex: none; padding: 3px 2px; background: transparent; color: var(--send); font-size: 10px; font-weight: 650; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.remember-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 9.5px;
  line-height: 1.5;
}
.remember-row input { position: absolute; opacity: 0; pointer-events: none; }
.remember-row i {
  display: grid;
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: transparent;
}
.remember-row i svg { width: 9px; height: 9px; stroke-width: 3; }
.remember-row input:checked + i { border-color: var(--send); background: var(--send); color: #fff; }
.remember-row input:focus-visible + i { outline: 2px solid rgba(22, 119, 255, 0.25); outline-offset: 1px; }

.config-help { margin-top: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.config-help summary { display: flex; padding: 10px 12px; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; font-size: 10.5px; font-weight: 600; list-style: none; }
.config-help summary::-webkit-details-marker { display: none; }
.config-help summary svg { width: 13px; height: 13px; }
.config-help ol { margin: 0; padding: 0 14px 12px 30px; color: var(--muted); font-size: 10px; line-height: 1.75; }
.config-help li + li { margin-top: 3px; }

.send-preview {
  display: flex;
  margin-top: 15px;
  padding: 12px 13px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}
.send-preview-icon { display: grid; width: 32px; height: 32px; flex: none; place-items: center; border-radius: 9px; background: var(--send-soft); color: var(--send); }
.send-preview-icon svg { width: 15px; height: 15px; }
.send-preview strong { display: block; font-size: 11.5px; }
.send-preview p { margin: 1px 0 0; color: var(--muted); font-size: 10px; }

.send-status { margin-top: 12px; padding: 10px 12px; border-radius: 9px; font-size: 10.5px; line-height: 1.6; overflow-wrap: anywhere; }
.send-status.ok { border: 1px solid #c3ead8; background: var(--green-soft); color: #086646; }
.send-status.error { border: 1px solid #f2c9cc; background: var(--red-soft); color: #9d252b; }
.send-status.info { border: 1px solid #cfe4ff; background: var(--send-soft); color: #255f9f; }
.send-status b { font-weight: 700; }

/* ---------- toasts ---------- */

.toast-stack {
  position: fixed;
  z-index: 50;
  right: 18px;
  bottom: calc(84px + var(--safe-bottom));
  display: flex;
  width: min(330px, calc(100vw - 36px));
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  padding: 11px 13px;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  background: rgba(27, 31, 42, 0.94);
  color: #fff;
  box-shadow: 0 12px 30px rgba(16, 20, 32, 0.24);
  font-size: 11.5px;
  line-height: 1.55;
  animation: toast-in 200ms ease both;
  backdrop-filter: blur(10px);
}
.toast svg { flex: none; width: 15px; height: 15px; margin-top: 1px; color: #7de2b4; }
.toast.error svg { color: #ff9ba0; }
.toast.leaving { animation: toast-out 160ms ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(5px); } }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .intro { grid-template-columns: 1fr; gap: 34px; padding: 30px 0 38px; }
  .intro h1 { max-width: 15ch; }
  .lede { max-width: 60ch; }
  .upload-card { max-width: 580px; }
  .drop-zone { min-height: 240px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 46px 76px minmax(120px, 0.85fr) minmax(160px, 1.15fr); gap: 9px; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .page { padding: 0 15px; }
  .topbar { height: 68px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 10px; }
  .brand-mark svg { width: 21px; height: 21px; }
  .topbar-note { padding: 5px 9px; font-size: 10.5px; }
  .topbar-note span { display: none; }
  .topbar-note { width: 31px; height: 31px; justify-content: center; }

  .intro { padding: 14px 0 30px; gap: 28px; }
  .intro h1 { max-width: none; font-size: clamp(32px, 9.2vw, 38px); letter-spacing: -0.05em; }
  .mobile-break { display: block; }
  .lede { margin-top: 17px; font-size: 13.5px; line-height: 1.75; }
  .feature-row { gap: 8px 15px; margin-top: 18px; font-size: 11.5px; }

  .upload-card { padding: 8px; border-radius: 22px; }
  .drop-zone { min-height: 225px; padding: 26px 18px; border-radius: 16px; }
  .drop-icon { width: 54px; height: 54px; border-radius: 16px; }
  .drop-icon svg { width: 24px; height: 24px; }
  .drop-zone strong { font-size: 16px; }
  .drop-zone > span:not(.drop-icon):not(.drop-hint) { font-size: 12px; }
  .drop-hint { font-size: 10px; }
  .privacy-note { padding: 11px 9px 2px; font-size: 10px; }

  .file-strip { padding: 12px; border-radius: 16px; }
  .file-icon { width: 38px; height: 38px; border-radius: 10px; }
  .file-copy strong { font-size: 12.5px; }
  .file-copy span { font-size: 10px; }
  .file-actions { gap: 3px; }
  .file-actions .btn span { display: none; }
  .file-actions .btn { width: 34px; min-height: 34px; padding: 0; }
  .icon-btn { width: 33px; height: 33px; }

  .stats { gap: 7px; margin-top: 9px; }
  .stat { padding: 11px 12px; border-radius: 12px; }
  .stat strong { font-size: 18px; }
  .stat span { font-size: 9.5px; }
  .stat small { font-size: 9px; }

  .account-card { padding: 14px 13px 13px; border-radius: 16px; }
  .account-head h2 { font-size: 18px; }
  .account-head p:not(.eyebrow) { font-size: 9.5px; line-height: 1.5; }
  .account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 11px; }
  .account-item { padding: 8px; }
  .account-item strong { font-size: 10px; }
  .account-note { font-size: 9px; }

  .tool-row { margin-top: 18px; flex-direction: column; align-items: stretch; gap: 9px; }
  .tabs { display: flex; }
  .tab { flex: 1; justify-content: center; }
  .search-box { width: 100%; min-height: 43px; }
  .list-toolbar { padding: 13px 2px 9px; }
  .list-summary { font-size: 10.5px; }

  .entry-head { grid-template-columns: minmax(0, 1fr) 40px; min-height: 88px; }
  .entry-main { padding: 12px 5px 12px 14px; }
  .entry-path { font-size: 12px; }
  .entry-time { font-size: 9.5px; }
  .entry-hostline { gap: 5px; }
  .host { font-size: 10.5px; }
  .mime { font-size: 8.5px; }
  .status, .method { font-size: 9px; height: 19px; }
  .expand-btn svg { width: 16px; height: 16px; }

  .detail-inner { padding: 13px 12px 15px; }
  .overview-grid { grid-template-columns: 72px minmax(0, 1fr); font-size: 10.5px; }
  .overview-grid dd.mono { font-size: 9.5px; }
  .body-pre { max-height: 250px; padding: 10px; font-size: 9.5px; }
  .data-table { font-size: 9.5px; }
  .data-table th, .data-table td { padding: 6px 7px; }
  .kv-block > summary { min-height: 37px; padding: 0 10px; font-size: 10.5px; }
  .kv-body { padding: 0 9px 9px; }

  .fields-head { padding: 14px 12px 12px; align-items: flex-start; flex-direction: column; gap: 10px; border-radius: 16px 16px 0 0; }
  .fields-head p { font-size: 10px; }
  .fields-actions { width: 100%; }
  .fields-actions .btn { flex: 1; }
  .field-list { border-radius: 0 0 16px 16px; }
  .field-row { grid-template-columns: 37px 64px minmax(0, 1fr); gap: 6px 8px; padding: 9px 10px; }
  .field-value { grid-column: 3; margin-top: 1px; padding-left: 0; }
  .field-index { font-size: 8.5px; }
  .field-path { font-size: 9.5px; }
  .field-value { font-size: 9.5px; }

  .footer { padding: 22px 2px 30px; font-size: 9px; gap: 6px; }
  .footer-spacer { display: none; }
  .footer #serverHint { margin-left: auto; text-align: right; }

  .bottom-bar { padding: 8px 14px calc(8px + var(--safe-bottom)); }
  .selection-copy span { max-width: 46vw; font-size: 9px; }
  .selection-copy strong { font-size: 11.5px; }
  .send-btn { min-height: 45px; padding: 0 15px; border-radius: 12px; font-size: 12.5px; }
  .send-btn .send-arrow { display: none; }

  .modal { padding: 0; align-items: end; }
  .sheet { width: 100%; max-height: 94vh; border-radius: 22px 22px 0 0; border-bottom: 0; animation-name: sheet-up; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .sheet-grab { display: block; width: 34px; height: 4px; margin: 8px auto 0; border-radius: 999px; background: #dfe2ea; }
  .sheet-head { padding: 12px 17px 6px; }
  .sheet-head h2 { font-size: 20px; }
  .sheet-body { padding: 10px 17px 14px; }
  .sheet-foot { padding: 10px 17px calc(10px + var(--safe-bottom)); }
  .sheet-foot .btn { flex: 1; padding: 0 8px; font-size: 11.5px; }
  .sheet-foot .send-btn { flex: 1.1; min-width: 0; }
  .two-col { grid-template-columns: 1fr; gap: 12px; }
  .segmented span { font-size: 10.5px; padding: 0 4px; }
  .segmented b { font-size: 8px; }

  .toast-stack { right: 12px; bottom: calc(78px + var(--safe-bottom)); width: calc(100vw - 24px); }
}

@media (max-width: 370px) {
  .tab { padding: 0 8px; font-size: 11.5px; }
  .tab b { display: none; }
  .selection-copy span { display: none; }
  .field-row { grid-template-columns: 32px 58px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.001ms !important; }
}
