/* dumit.me /drop — Mobile-First Owner Pocket Ground */

* {
  box-sizing: border-box;
}

:root {
  --font-editorial: 'Newsreader', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-stamp: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

body.theme-light {
  --bg: #f3eee3;
  --surface: rgba(255, 252, 246, 0.94);
  --subtle: #ece4d5;
  --fg: #241c14;
  --muted: #6d5c49;
  --border: rgba(154, 134, 108, 0.38);
  --accent: #9b4f38;
  --btn-bg: #2b2017;
  --btn-fg: #fcf8f0;
  --input-bg: #fffdf9;
  --shadow: 0 8px 24px rgba(66, 50, 32, 0.08);
  --toast-bg: #e7f3e8;
  --toast-fg: #1d3c23;
  --ring-inner: #faf7f0;
  --ring-outer: #2d2219;
}

body.theme-dark {
  --bg: #171619;
  --surface: #222026;
  --subtle: #2b2830;
  --fg: #f0e9de;
  --muted: #a89e90;
  --border: rgba(218, 204, 182, 0.16);
  --accent: #de8e74;
  --btn-bg: #ece3d3;
  --btn-fg: #1b1816;
  --input-bg: #18171b;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  --toast-bg: #1c2e21;
  --toast-fg: #d5f0da;
  --ring-inner: #222026;
  --ring-outer: #ece3d3;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.drop-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 14px max(36px, env(safe-area-inset-bottom));
}

.drop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.drop-brand {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-link {
  font-family: var(--font-editorial);
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
}

.brand-sub {
  font-family: var(--font-stamp);
  font-size: 11.5px;
  color: var(--accent);
  white-space: nowrap;
}

.drop-header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.pill-btn,
.icon-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.icon-pill-btn {
  width: 32px;
  height: 32px;
  padding: 0;
}

.pill-subtle {
  color: var(--muted);
}

.drop-toast {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 16px);
  z-index: 60;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--toast-bg);
  color: var(--toast-fg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  max-width: calc(100vw - 28px);
}

.drop-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.drop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.auth-card {
  margin-top: 24px;
  padding: 22px;
}

.auth-card h1 {
  margin: 4px 0 8px;
  font-family: var(--font-editorial);
  font-size: 26px;
  font-weight: 600;
}

.card-kicker {
  font-family: var(--font-stamp);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.muted-copy {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.error-copy {
  margin: 0;
  font-size: 12.5px;
  color: #c24b3a;
}

.pad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-stamp);
  font-size: 11px;
  color: var(--muted);
}

.field-input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px; /* 15-16px prevents iOS Safari zoom on focus */
  outline: none;
  resize: vertical;
}

.field-input:focus {
  border-color: var(--accent);
}

.field-lg {
  font-size: 16px;
  padding: 12px 13px;
}

.pad-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vis-segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--subtle);
}

.vis-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-stamp);
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 9999px;
  cursor: pointer;
}

.vis-btn.active {
  background: var(--btn-bg);
  color: var(--btn-fg);
}

.pigment-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pigment-dot {
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  border: 1.5px solid rgba(110, 96, 78, 0.36);
  cursor: pointer;
}

.pigment-dot.active {
  box-shadow: 0 0 0 2px var(--ring-inner), 0 0 0 4px var(--ring-outer);
}

.extra-details {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 8px 12px;
}

.extra-details summary {
  font-family: var(--font-stamp);
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
}

.extra-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.primary-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn:disabled {
  opacity: 0.55;
}

.full-btn {
  width: 100%;
}

.mini-btn {
  border: 1px solid var(--border);
  background: var(--subtle);
  color: var(--fg);
  font-family: var(--font-stamp);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 9px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Tabs --- */
.tabs-bar {
  display: flex;
  gap: 6px;
  margin: 18px 0 12px;
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tab-btn.active {
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-color: transparent;
}

.count-pill {
  font-family: var(--font-stamp);
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(128, 128, 128, 0.25);
}

.count-warm {
  background: #d8644c;
  color: #fff;
}

/* --- Filters & Items --- */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.filter-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-stamp);
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
}

.filter-chip.active {
  background: var(--subtle);
  color: var(--fg);
  border-color: var(--accent);
}

.items-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drop-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 13px 14px;
  box-shadow: var(--shadow);
}

.drop-item.is-unread {
  border-left: 3px solid var(--accent);
}

.drop-item-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.drop-thumb {
  width: 66px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.drop-item-main {
  min-width: 0;
  flex: 1;
}

.drop-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-stamp);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.drop-item-title {
  margin: 0 0 4px;
  font-family: var(--font-editorial);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.drop-item-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.48;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.drop-item-actions {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  font-family: var(--font-stamp);
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}

.item-btn.danger {
  color: #c24b3a;
}

.quick-editor {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.sub-heading {
  margin: 22px 0 10px;
  font-family: var(--font-editorial);
  font-size: 18px;
  font-weight: 600;
}

@media (max-width: 520px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}
