:root {
  color-scheme: light;
  --bg-top: #fff7e9;
  --bg-bottom: #f9d8c6;
  --surface: rgba(255, 252, 247, 0.88);
  --surface-strong: #fffaf2;
  --border: rgba(104, 60, 28, 0.14);
  --text: #3f2416;
  --muted: #8a5d45;
  --accent: #ef7b52;
  --accent-strong: #d85828;
  --accent-soft: rgba(239, 123, 82, 0.16);
  --shadow: 0 20px 60px rgba(120, 71, 32, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 35%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.5;
}

body::before {
  inset: 6% auto auto -48px;
  width: 180px;
  height: 180px;
  background: rgba(255, 173, 125, 0.45);
}

body::after {
  inset: auto -64px 10% auto;
  width: 220px;
  height: 220px;
  background: rgba(255, 229, 173, 0.55);
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.hero-card,
.list-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 22px 18px 18px;
}

.eyebrow,
.list-kicker {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 9vw, 3.4rem);
  line-height: 0.95;
}

h2 {
  font-size: 1.15rem;
}

.intro {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.entry-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.88rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  padding: 16px 18px;
  outline: none;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
  box-shadow: inset 0 0 0 1px rgba(104, 60, 28, 0.05);
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(239, 123, 82, 0.14);
  transform: translateY(-1px);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.badge,
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.list-card {
  margin-top: 16px;
  padding: 18px 14px 14px;
}

.list-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.count-pill {
  min-width: 42px;
  background: var(--text);
  color: #fffaf2;
}

.table-head {
  display: none;
  gap: 12px;
  margin-top: 18px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-head span:first-child,
.entry-row .cell:first-child {
  flex: 0 0 38%;
}

.entries-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.entry-row {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(104, 60, 28, 0.09);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.55);
}

.entry-row.is-own {
  border-color: rgba(239, 123, 82, 0.38);
  background: rgba(255, 242, 233, 0.92);
}

.entry-row.is-editing {
  border-color: rgba(239, 123, 82, 0.5);
  background: rgba(255, 247, 240, 0.98);
}

.cell {
  display: grid;
  gap: 4px;
}

.cell-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cell-value {
  font-size: 1rem;
  line-height: 1.35;
  word-break: break-word;
}

.admin-editor {
  display: grid;
  gap: 10px;
}

.admin-editor-field {
  display: grid;
  gap: 6px;
}

.admin-editor-field input {
  width: 100%;
  border: 1px solid rgba(104, 60, 28, 0.14);
  border-radius: 14px;
  background: #fffaf2;
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
  outline: none;
}

.admin-editor-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(239, 123, 82, 0.14);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.admin-button {
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 14px;
}

.admin-button:active {
  transform: translateY(1px);
}

.admin-button-primary {
  background: var(--accent);
  color: #fffaf2;
}

.admin-button-secondary {
  background: rgba(63, 36, 22, 0.08);
  color: var(--text);
}

.admin-button-danger {
  background: rgba(216, 88, 40, 0.12);
  color: var(--accent-strong);
}

.empty-state {
  margin-top: 14px;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  line-height: 1.5;
}

@media (min-width: 640px) {
  .app-shell {
    padding: 28px 20px 40px;
  }

  .hero-card,
  .list-card {
    padding-left: 24px;
    padding-right: 24px;
  }

  .entry-form {
    grid-template-columns: 1fr 1fr;
  }

  .table-head {
    display: flex;
  }

  .entry-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
  }

  .cell-label {
    display: none;
  }

  .cell {
    flex: 1;
  }

  .admin-editor {
    flex: 1;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .admin-actions {
    align-self: center;
    margin-top: 0;
  }
}
