:root {
  --ink: #1b2430;
  --paper: #f6f1e7;
  --card: #fffdf8;
  --accent: #c45c26;
  --accent-dark: #9a3f14;
  --navy: #1f3d4d;
  --muted: #5c6770;
  --line: #e4d9c8;
}

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

body {
  font-family: "Source Serif 4", Georgia, serif;
  background: radial-gradient(circle at top left, #fff8ee 0%, var(--paper) 45%, #eadfce 100%);
  color: var(--ink);
}

.sans {
  font-family: "DM Sans", system-ui, sans-serif;
}

.site-nav {
  background: var(--navy);
}

.site-nav .navbar-brand,
.site-nav .nav-link,
.site-nav .navbar-text {
  color: #f7efe3 !important;
}

.hero {
  padding: 4.5rem 0 3rem;
}

.hero h1 {
  font-weight: 700;
  letter-spacing: -0.03em;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.card-book {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  height: 100%;
}

.card-book img {
  height: 220px;
  object-fit: cover;
  width: 100%;
}

.price {
  color: var(--accent-dark);
  font-weight: 700;
}

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

.choice-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.choice-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(31, 61, 77, 0.12);
  color: inherit;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 1rem;
  padding: 3rem 1.5rem;
  background: rgba(255, 253, 248, 0.7);
}

.photo-preview {
  max-height: 360px;
  object-fit: cover;
  width: 100%;
  border-radius: 1rem;
}

.badge-sold {
  background: #6b7280;
}

.badge-open {
  background: #2f6f4e;
}

.form-control,
.form-select,
.btn {
  min-height: 44px;
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 767.98px) {
  body {
    background: var(--paper);
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .site-nav .navbar-collapse {
    padding: 0.75rem 0;
  }

  .hero {
    padding: 1.75rem 0 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .d-flex {
    flex-direction: column;
  }

  .choice-card {
    padding: 1.35rem;
  }

  .card-book img {
    height: 190px;
  }

  .mobile-form-card {
    margin-left: -0.35rem;
    margin-right: -0.35rem;
    padding: 1.15rem !important;
  }

  .mobile-nav-space {
    padding-bottom: 6.5rem !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 1030;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0.5rem max(0.5rem, env(safe-area-inset-right))
      calc(0.5rem + env(safe-area-inset-bottom))
      max(0.5rem, env(safe-area-inset-left));
    background: #fffdf8;
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(31, 61, 77, 0.1);
  }

  .mobile-bottom-nav a {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.1rem;
    color: var(--navy);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
  }

  .mobile-bottom-nav a span {
    font-size: 1.35rem;
    line-height: 1;
  }

  .mobile-bottom-nav .sell-link {
    color: var(--accent-dark);
  }

  .table-responsive.card-book {
    border-radius: 0.75rem;
  }

  .table th:nth-child(2),
  .table td:nth-child(2) {
    display: none;
  }
}
