:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-2: #242424;
  --border: #333;
  --text: #e8e8e8;
  --muted: #888;
  --accent: #6e9eff;
  --accent-dim: rgba(110, 158, 255, 0.1);
  --danger: #ff5f56;
  --danger-dim: rgba(255, 95, 86, 0.08);
  --warning: #e0a030;
  --warning-dim: rgba(224, 160, 48, 0.08);
  --success: #4ade80;
  --success-dim: rgba(74, 222, 128, 0.08);
  --radius: 6px;
  --radius-lg: 10px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem 2rem;
  line-height: 1.5;
}
h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}
h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.subtitle { color: var(--muted); margin-bottom: 2.5rem; font-size: 0.82rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 540px;
}
label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}
input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
}
textarea {
  resize: vertical;
  min-height: 100px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.82rem;
}
input[type="file"] {
  width: 100%;
  padding: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.85rem;
}
input[type="checkbox"] {
  width: auto;
  margin-right: 0.4rem;
  accent-color: var(--accent);
  vertical-align: middle;
}
button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s;
  line-height: 1.4;
}
button:hover { filter: brightness(1.15); }
button:active { transform: scale(0.98); }
button:disabled { opacity: 0.4; cursor: not-allowed; filter: none; transform: none; }
.btn-primary { background: var(--accent); color: #000; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 500;
}
.btn-outline:hover { border-color: var(--text); color: var(--text); }
.field-row { margin-bottom: 0.85rem; }
.field-row:last-child { margin-bottom: 0; }
.input-group {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.input-group input { flex: 1; }
.input-group button { flex-shrink: 0; }
.row { display: flex; gap: 0.75rem; }
.row > * { flex: 1; }
.tabs {
  display: flex;
  margin-bottom: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 3px;
}
.tab {
  flex: 1;
  padding: 0.4rem;
  text-align: center;
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface-2); color: var(--text); }
.check-label {
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.check-label:hover { color: var(--text); }
.check-label-danger { color: var(--danger); }
.check-label-danger:hover { color: var(--danger); }
.danger-hint { color: var(--danger); opacity: 0.8; }
a.item-label { color: var(--accent); text-decoration: none; }
a.item-label:hover { text-decoration: underline; }
.hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}
.warning-box {
  background: var(--warning-dim);
  border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  line-height: 1.6;
}
.warning-box strong { color: var(--warning); }
.success-box {
  background: var(--success-dim);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 500;
}
.link-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  word-break: break-all;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  margin: 0.5rem 0;
  cursor: pointer;
  transition: border-color 0.15s;
  line-height: 1.5;
}
.link-box:hover { border-color: var(--accent); }
.hidden { display: none !important; }
.spinner {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
#secret-output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 400px;
  overflow: auto;
  margin-top: 0.5rem;
  line-height: 1.6;
}
.multi-links { max-height: 300px; overflow-y: auto; }
.multi-links .link-box { margin-bottom: 0.5rem; }
.link-label { font-size: 0.72rem; color: var(--muted); margin-bottom: 0.15rem; font-weight: 500; }
.btn-row { display: flex; gap: 0.5rem; margin-top: 1rem; }
.meta-line { font-size: 0.82rem; color: var(--muted); margin-bottom: 1rem; }
#confirm-label { font-size: 1.1rem; color: var(--fg); font-weight: 600; margin-bottom: 0.5rem; }
.file-info { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }
.size-bar { position: relative; height: 1.2rem; background: var(--surface-2); border-radius: var(--radius); margin-top: 0.35rem; overflow: hidden; }
.size-bar-fill { height: 100%; background: var(--accent); border-radius: var(--radius); transition: width 0.2s; }
.size-bar-fill.over { background: var(--danger); }
.size-bar-label { position: absolute; top: 0; left: 0; right: 0; text-align: center; font-size: 0.7rem; line-height: 1.2rem; color: var(--fg); }
.multi-file-entry { display: flex; align-items: center; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid var(--surface-2); }
.multi-file-entry:last-child { border-bottom: none; }
.btn-small { padding: 0.25rem 0.6rem; font-size: 0.75rem; }
.multi-file-name { font-size: 0.85rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-file-size { font-size: 0.75rem; color: var(--muted); margin: 0 0.75rem; white-space: nowrap; }
.multi-file-dl { font-size: 0.75rem; }
.mode-tabs-card { margin-bottom: 0.75rem; padding: 0.5rem; }
.tabs-flush { margin-bottom: 0; }
.hint-block { margin-bottom: 1rem; }
.pw-error { color: var(--danger); font-size: 0.82rem; margin-bottom: 0.75rem; }
.loading-center { text-align: center; padding: 2.5rem; }
.loading-muted { color: var(--muted); }
.error-msg { color: var(--danger); margin-bottom: 1rem; font-size: 0.85rem; }
.apprise-textarea { min-height: auto; font-family: inherit; }
.apprise-link { color: var(--accent); }
.pickup-label { margin-top: 0.75rem; }
.my-items { margin-top: 1.5rem; }
.my-items h2 { font-size: 0.9rem; margin-bottom: 0.5rem; }
.my-items-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; }
.my-items-header h2 { margin-bottom: 0; }
.my-items-actions { display: flex; gap: 0.35rem; }
.btn-small { font-size: 0.72rem; padding: 0.2rem 0.5rem; }
.passkey-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.5rem;
  background: var(--warning-dim);
  border: 1px solid color-mix(in srgb, var(--warning) 20%, transparent);
  border-radius: var(--radius);
}
.passkey-hint-action {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}
.passkey-hint-action:hover { text-decoration: underline; filter: none; }
.passkey-row { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.btn-text-danger { background: none; border: none; color: var(--muted); font-weight: 500; padding: 0; }
.btn-text-danger:hover { color: var(--danger); filter: none; }
.item-locked { color: var(--muted); font-style: italic; cursor: pointer; }
.item-list { list-style: none; }
.item-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  gap: 0.5rem;
}
.item-entry:last-child { border-bottom: none; }
.item-info { flex: 1; min-width: 0; }
.item-label { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta { color: var(--muted); font-size: 0.72rem; margin-top: 0.15rem; }
.item-status { flex-shrink: 0; font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 3px; }
.status-available { background: var(--success-dim); color: var(--success); }
.status-waiting { background: var(--warning-dim); color: var(--warning); }
.status-gone { background: var(--danger-dim); color: var(--danger); }
.item-remove { flex-shrink: 0; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.9rem; padding: 0.2rem; line-height: 1; }
.item-remove:hover { color: var(--danger); }
.items-empty { color: var(--muted); font-size: 0.8rem; padding: 0.5rem 0; }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; max-width: 540px; width: 90%; max-height: 80vh; display: flex; flex-direction: column; }
.modal-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.75rem; }
.modal-body { flex: 1; overflow-y: auto; margin-bottom: 1rem; }
.modal-link-entry { margin-bottom: 0.5rem; }
.modal-link-label { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.15rem; }
.modal-link-box { font-size: 0.75rem; background: var(--surface-2); padding: 0.4rem 0.6rem; border-radius: var(--radius); cursor: pointer; word-break: break-all; color: var(--accent); }
.modal-link-box:hover { background: var(--accent-dim); }
.modal-link-entry.consumed .modal-link-label { color: var(--danger); }
.modal-link-entry.consumed .modal-link-box { color: var(--muted); text-decoration: line-through; cursor: default; opacity: 0.5; }
.modal-footer { text-align: right; }
.auth-bar { width: 100%; max-width: 540px; display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.75rem; }
.auth-user { color: var(--muted); }
.auth-link { color: var(--accent); text-decoration: none; font-weight: 500; }
.auth-link:hover { text-decoration: underline; }
.docs-link { margin-top: auto; padding-top: 2rem; padding-bottom: 1rem; font-size: 0.72rem; color: var(--muted); opacity: 0.5; transition: opacity 0.15s; }
.docs-link:hover { opacity: 1; }
.docs-link a { color: var(--muted); text-decoration: none; }
.docs-link a:hover { color: var(--text); }
