@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Manrope:wght@300;400;600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f6f2ea;
  --card: #ffffff;
  --ink: #1f1c17;
  --muted: #6b645b;
  --accent: #d7643b;
  --accent-dark: #b14e2c;
  --accent-soft: rgba(215, 100, 59, 0.12);
  --border: #e6dfd3;
  --shadow: 0 18px 40px rgba(31, 28, 23, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #fff6e8 0%, #f6f2ea 55%, #efe8dc 100%);
  min-height: 100vh;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: "DM Serif Display", "Times New Roman", serif;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  margin: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.subhead {
  max-width: 420px;
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.panel {
  margin-bottom: 24px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
}

.stack {
  display: grid;
  gap: 12px;
}

.inline {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

label {
  font-size: 0.9rem;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

input[type="url"],
input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-family: inherit;
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-row input {
  flex: 1;
}

.add-btn {
  padding: 10px;
  min-width: 42px;
  height: 42px;
}

input:focus {
  outline: 2px solid rgba(215, 100, 59, 0.35);
  border-color: var(--accent);
}

.btn {
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 20px rgba(215, 100, 59, 0.25);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}

.btn-danger {
  background: #f4e4e0;
  color: #b5462c;
  border: 1px solid rgba(181, 70, 44, 0.4);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  gap: 6px;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 0.75rem;
  color: var(--accent-dark);
  font-weight: 600;
}

.note {
  font-size: 0.85rem;
}

.feed-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.feed-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fbf9f5;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.items {
  display: grid;
  gap: 16px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fbf9f5;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.tab-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.tab.active {
  background: var(--accent);
  color: white;
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(215, 100, 59, 0.25);
}

.item {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fffdf9;
  transition: background 0.3s ease, border 0.3s ease;
}

.item.new {
  border-color: rgba(215, 100, 59, 0.6);
  background: rgba(215, 100, 59, 0.08);
}

.item-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.item-title {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 6px;
}

.item-title:hover {
  color: var(--accent-dark);
}

.item-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.items-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

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

.radio {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.95rem;
}

.is-hidden {
  display: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(215, 100, 59, 0.2), transparent 45%),
    rgba(31, 28, 23, 0.55);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 24px;
}

.auth-card {
  background: var(--card);
  padding: 28px;
  border-radius: 22px;
  box-shadow: 0 24px 44px rgba(31, 28, 23, 0.22);
  border: 1px solid var(--border);
  max-width: 400px;
  width: 100%;
}

.auth-card h2 {
  margin: 0 0 10px;
  font-family: "DM Serif Display", "Times New Roman", serif;
  font-size: 1.7rem;
}

.auth-card p {
  margin: 0 0 12px;
}

#auth-form {
  gap: 10px;
}

#auth-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d8cbb8;
  background: #fffaf2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  letter-spacing: 0.01em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#auth-input::placeholder {
  color: #9d8f7d;
}

#auth-input:hover {
  border-color: #cdbba3;
}

#auth-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(215, 100, 59, 0.2);
}

#auth-error {
  min-height: 1.15em;
  font-size: 0.85rem;
  color: #b5462c;
}

@media (max-width: 700px) {
  .hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .feed-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .row-actions {
    width: 100%;
  }
}
