:root {
  --cream: #f6efe5;
  --paper: #fffaf4;
  --sand: #e8dac8;
  --rose: #b9867b;
  --rust: #8c4f39;
  --brown: #4d3328;
  --dark: #2e211b;
  --muted: #7c6a60;
  --line: #dfd1c1;
  --white: #ffffff;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--dark);
  font-family: "DM Sans", sans-serif;
  line-height: 1.6;
  padding-bottom: 92px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.topbar {
  min-height: 72px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(77, 51, 40, 0.12);
  background: rgba(246, 239, 229, 0.94);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand,
h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
}

.brand {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brown);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  line-height: 1;
}

.brand-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 5px;
  border-radius: 50%;
  background: var(--brown);
  object-fit: contain;
}

.desktop-nav {
  display: none;
}

.page-shell {
  width: min(100% - 32px, 1180px);
  margin: 0 auto;
}

.narrow-shell {
  max-width: 760px;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 52px 0 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rust);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.hero h1,
.page-intro h1 {
  margin: 0;
  color: var(--brown);
  font-size: clamp(2.7rem, 12vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-copy,
.page-intro > p:last-child {
  max-width: 620px;
  color: var(--muted);
  font-size: 1rem;
}

.hero-card {
  min-height: 210px;
  background:
    linear-gradient(to top, rgba(34, 20, 14, 0.82), rgba(34, 20, 14, 0.08) 72%),
    url("assets/cozy-reading-reminder.png") center 56% / cover;
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 18px 48px rgba(77, 51, 40, 0.08);
  color: var(--white);
}

.hero-card p {
  max-width: 340px;
  margin: 8px 0;
  font-family: "Playfair Display", serif;
  font-size: 1.7rem;
  line-height: 1.15;
}

.tiny-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #f3d8c3;
}

.leaf {
  align-self: flex-end;
  font-size: 2rem;
  color: #f3d8c3;
}

.section,
.page-intro {
  padding: 36px 0;
}

.page-intro {
  padding-top: 52px;
}

.page-intro h1 {
  font-size: clamp(2.6rem, 10vw, 4.4rem);
}

.section-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  color: var(--brown);
}

.text-link {
  display: none;
  color: var(--rust);
  font-weight: 600;
}

.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stat-card {
  flex: 1 1 calc(50% - 12px);
  min-width: 140px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.stat-card.accent {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
}

.stat-card span,
.stat-card small,
.big-stat span,
.big-stat small {
  display: block;
  color: var(--muted);
}

.stat-card.accent span,
.stat-card.accent small {
  color: #e7d8cc;
}

.stat-card strong {
  display: block;
  margin: 6px 0 0;
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  line-height: 1;
}

.book-grid,
.book-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.book-card,
.current-book-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.book-card {
  flex: 1 1 100%;
}

.current-book-card {
  width: 100%;
  padding: 22px;
}

.book-cover-placeholder {
  aspect-ratio: 3 / 2;
  padding: 24px;
  background: linear-gradient(135deg, #c8a692, #8b5b47);
  display: flex;
  align-items: flex-end;
  color: var(--paper);
}

.book-cover-placeholder span {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  line-height: 1.15;
}

.book-card-content {
  padding: 20px;
}

.book-card h3,
.current-book-card h3 {
  margin: 0;
  font-size: 1.45rem;
}

.book-card p,
.current-book-card p {
  color: var(--muted);
}

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: #efe3d7;
  color: var(--brown);
  font-size: 0.78rem;
  font-weight: 600;
}

.stars {
  color: #a76242;
  letter-spacing: 0.08em;
  font-size: 0.98rem;
}

.book-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.small-button,
.danger-button {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 600;
}

.small-button {
  background: var(--sand);
  color: var(--brown);
}

.danger-button {
  background: transparent;
  color: var(--rust);
  border: 1px solid #cda999;
}

.empty-state {
  width: 100%;
  padding: 28px;
  text-align: center;
  border: 1px dashed #cdb9a8;
  border-radius: var(--radius-md);
  color: var(--muted);
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.filter-button,
.period-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--brown);
  border-radius: 999px;
  padding: 10px 15px;
}

.filter-button.active,
.period-button.active {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
}

.book-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.book-form label,
.rating-fieldset {
  display: block;
  margin-bottom: 20px;
  color: var(--brown);
  font-weight: 600;
}

.book-form label span,
.rating-fieldset legend span {
  color: var(--muted);
  font-weight: 400;
}

.book-form input,
.book-form select,
.book-form textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid #d7c7b7;
  border-radius: var(--radius-sm);
  background: #fffdf9;
  padding: 13px 14px;
  color: var(--dark);
  outline: none;
}

.book-form input:focus,
.book-form select:focus,
.book-form textarea:focus {
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(140, 79, 57, 0.1);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rating-fieldset {
  border: 0;
  padding: 0;
  margin-left: 0;
  margin-right: 0;
}

.rating-fieldset legend {
  margin-bottom: 8px;
}

.rating-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rating-preview {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #f0e4d7;
  color: var(--rust);
}

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

.primary-button,
.secondary-button,
.nav-button {
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  text-align: center;
}

.primary-button {
  border: 0;
  background: var(--brown);
  color: var(--cream);
}

.secondary-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--brown);
}

.form-message {
  min-height: 24px;
  margin-bottom: 0;
  color: var(--rust);
  font-weight: 600;
}

.form-message.success {
  color: #43704f;
}

.data-error {
  margin: 24px 0 0;
  padding: 14px 16px;
  border: 1px solid #cda999;
  border-radius: var(--radius-sm);
  background: #fff4ed;
  color: var(--rust);
  font-weight: 600;
}

.hidden {
  display: none;
}

.stats-feature {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.big-stat {
  padding: 30px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
}

.big-stat strong {
  display: block;
  margin: 8px 0 2px;
  font-family: "Playfair Display", serif;
  font-size: clamp(3rem, 14vw, 5.5rem);
  line-height: 0.95;
  color: var(--brown);
}

.mobile-nav {
  position: fixed;
  z-index: 50;
  left: 12px;
  right: 12px;
  bottom: 12px;
  min-height: 70px;
  padding: 8px 10px;
  border-radius: 24px;
  background: var(--dark);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 16px 40px rgba(46, 33, 27, 0.2);
}

.mobile-nav a {
  min-width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.72rem;
  opacity: 0.72;
}

.mobile-nav a span {
  font-size: 1.1rem;
}

.mobile-nav a.active {
  opacity: 1;
}

.mobile-nav .add-mobile {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border-radius: 50%;
  background: var(--rust);
  justify-content: center;
  margin-top: -24px;
  opacity: 1;
}

.mobile-nav .add-mobile span {
  font-size: 1.5rem;
  line-height: 1;
}

@media (min-width: 720px) {
  body {
    padding-bottom: 0;
  }

  .topbar {
    padding: 20px 5vw;
  }

  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
  }

  .desktop-nav a {
    color: var(--muted);
    font-weight: 600;
  }

  .desktop-nav a.active {
    color: var(--brown);
  }

  .desktop-nav .nav-button {
    background: var(--brown);
    color: var(--cream);
  }

  .mobile-nav {
    display: none;
  }

  .hero {
    min-height: 560px;
    padding: 80px 0 52px;
    flex-direction: row;
    align-items: center;
  }

  .hero > div {
    flex: 1 1 50%;
    min-width: 0;
  }

  .hero-card {
    min-height: 370px;
  }

  .section,
  .page-intro {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .text-link {
    display: inline-block;
  }

  .stat-card {
    flex: 1 1 0;
  }

  .book-card {
    flex: 1 1 calc(33.333% - 16px);
    min-width: 220px;
  }

  .current-book-card {
    width: min(100%, 760px);
  }

  .form-row {
    flex-direction: row;
    gap: 16px;
  }

  .form-row label {
    flex: 1 1 0;
  }

  .rating-options,
  .form-actions,
  .stats-feature {
    flex-direction: row;
  }

  .rating-options > * {
    flex: 1 1 0;
  }

  .stats-feature > * {
    flex: 1 1 0;
  }

  .form-actions > * {
    flex: 0 1 auto;
  }
}


.input-help {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.4;
}

.rating-input-wrap {
  position: relative;
  max-width: 180px;
}

.rating-input-wrap input {
  padding-right: 52px;
}

.rating-range {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  pointer-events: none;
}


.cover-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
}

.cover-fieldset legend {
  margin-bottom: 10px;
  color: var(--brown);
  font-weight: 600;
}

.cover-fieldset legend span {
  color: var(--muted);
  font-weight: 400;
}

.cover-choice-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cover-choice {
  flex: 1 1 0;
  margin-bottom: 0 !important;
}

.cover-or {
  align-self: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cover-preview-wrap {
  margin-top: 16px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.cover-preview {
  width: 120px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--sand);
}

.book-cover-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  background: var(--sand);
}

.current-book-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.current-book-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--sand);
}

@media (min-width: 720px) {
  .cover-choice-row {
    flex-direction: row;
    align-items: flex-start;
  }

  .cover-or {
    padding-top: 42px;
  }

  .current-book-card {
    flex-direction: row;
    align-items: center;
  }

  .current-book-image {
    width: 170px;
    height: 230px;
    flex: 0 0 auto;
  }
}


/* --- My Books: bookshelf-inspired 2:3 cover layout --- */

#booksGrid.book-grid {
  align-items: flex-start;
  gap: 22px 16px;
}

#booksGrid .book-card {
  flex: 1 1 calc(50% - 16px);
  min-width: 0;
  background: transparent;
  border: 0;
  overflow: visible;
  position: relative;
  padding-bottom: 14px;
}

#booksGrid .book-card::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: 0;
  height: 8px;
  border-radius: 999px;
  background: #6b4635;
  box-shadow:
    0 5px 0 #4d3328,
    0 10px 14px rgba(77, 51, 40, 0.14);
  z-index: 0;
}

#booksGrid .book-cover-image,
#booksGrid .book-cover-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px 10px 6px 6px;
  border: 1px solid rgba(77, 51, 40, 0.18);
  box-shadow: 0 10px 18px rgba(77, 51, 40, 0.16);
  position: relative;
  z-index: 1;
}

#booksGrid .book-cover-placeholder {
  padding: 18px;
  background: linear-gradient(160deg, #b78267, #7a4f3e);
  display: flex;
  align-items: flex-end;
}

#booksGrid .book-cover-placeholder span {
  font-size: 1rem;
}

#booksGrid .book-card-content {
  position: relative;
  z-index: 1;
  padding: 12px 2px 0;
  background: transparent;
}

#booksGrid .book-card-content .eyebrow {
  margin-bottom: 4px;
  font-size: 0.62rem;
}

#booksGrid .book-card h3 {
  font-size: 1rem;
  line-height: 1.2;
}

#booksGrid .book-card p {
  margin: 4px 0 0;
  font-size: 0.82rem;
}

#booksGrid .book-meta {
  gap: 6px;
  margin: 10px 0 0;
}

#booksGrid .pill {
  padding: 5px 8px;
  font-size: 0.68rem;
}

#booksGrid .book-actions {
  margin-top: 10px;
  gap: 6px;
}

#booksGrid .small-button,
#booksGrid .danger-button {
  padding: 7px 10px;
  font-size: 0.72rem;
}

@media (min-width: 560px) {
  #booksGrid .book-card {
    flex: 1 1 calc(33.333% - 16px);
  }
}

@media (min-width: 900px) {
  #booksGrid.book-grid {
    gap: 30px 22px;
  }

  #booksGrid .book-card {
    flex: 1 1 calc(25% - 22px);
  }

  #booksGrid .book-card h3 {
    font-size: 1.08rem;
  }
}

@media (min-width: 1180px) {
  #booksGrid .book-card {
    flex: 1 1 calc(20% - 22px);
  }
}


/* =========================================================
   MY BOOKS — BOOKSHELF LAYOUT
   ========================================================= */

body[data-page="books"] {
  background:
    radial-gradient(circle at 82% 15%, rgba(185, 134, 123, 0.08), transparent 23rem),
    var(--cream);
}

body[data-page="books"] .page-shell {
  width: min(100% - 32px, 1240px);
}

body[data-page="books"] .page-intro {
  padding-bottom: 24px;
}

body[data-page="books"] .page-intro > p:last-child::after {
  content: " ♡";
  color: var(--rust);
  font-size: 1.25em;
}

.library-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 10px 0 28px;
}

.library-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-box {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  background: rgba(255, 250, 244, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.search-box span {
  color: var(--brown);
  font-size: 1.4rem;
  line-height: 1;
  transform: rotate(-15deg);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--dark);
}

.search-box input::placeholder {
  color: #a39387;
}

.sort-select {
  min-height: 46px;
  padding: 0 42px 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--brown);
  outline: none;
}

.library-section {
  padding: 4px 0 60px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 46px;
  position: relative;
}

.library-book {
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.library-book::after {
  content: "";
  position: absolute;
  left: -7px;
  right: -7px;
  top: calc((100% - 94px) * 0.72);
  height: 8px;
  background: linear-gradient(to bottom, #c59a6e, #9d7049);
  border-radius: 2px;
  box-shadow:
    0 3px 0 #805837,
    0 8px 15px rgba(77, 51, 40, 0.16);
  z-index: 0;
}

.library-cover-link {
  display: block;
  width: 100%;
  position: relative;
  z-index: 1;
}

.library-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  border-radius: 6px 6px 2px 2px;
  border: 1px solid rgba(77, 51, 40, 0.14);
  box-shadow:
    0 9px 14px rgba(77, 51, 40, 0.15),
    inset 4px 0 7px rgba(255, 255, 255, 0.08);
  background: #d8c2ad;
}

.library-cover-placeholder {
  padding: 15px;
  display: flex;
  align-items: flex-end;
  color: var(--paper);
  background:
    linear-gradient(150deg, rgba(255,255,255,.08), transparent 45%),
    linear-gradient(160deg, #af785f, #6e4536);
}

.library-cover-placeholder span {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  line-height: 1.15;
}

.library-book-info {
  position: relative;
  z-index: 2;
  min-height: 94px;
  padding: 14px 2px 0;
}

.library-book-info h3 {
  margin: 0;
  color: var(--dark);
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.22;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.library-book-info > p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-book-bottom {
  min-height: 28px;
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.library-rating {
  color: #d98b1d;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.empty-stars {
  color: #cfc1b4;
}

.rating-empty {
  color: #a39387;
  font-size: 0.7rem;
}

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

.library-action-button,
.library-delete {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eee3d7;
  color: var(--brown);
  font-weight: 700;
  line-height: 1;
}

.library-delete {
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.library-book:hover .library-delete,
.library-book:focus-within .library-delete {
  opacity: 1;
  pointer-events: auto;
}

.library-action-button:hover,
.library-delete:hover {
  background: #dfcdbd;
}

.library-empty {
  grid-column: 1 / -1;
}

/* keep shelf close to the book bottom on small screens */
@media (max-width: 559px) {
  .library-book::after {
    top: auto;
    bottom: 92px;
  }
}

@media (min-width: 560px) {
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 54px;
  }

  .library-book::after {
    top: auto;
    bottom: 94px;
  }
}

@media (min-width: 760px) {
  .library-controls {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .library-tools {
    flex-direction: row;
    align-items: center;
    margin-left: auto;
  }

  .search-box {
    width: 290px;
  }

  .sort-select {
    width: 205px;
  }

  .library-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  body[data-page="books"] .page-intro {
    padding-top: 62px;
  }

  .library-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 34px;
    row-gap: 62px;
  }

  .library-cover {
    border-radius: 5px 5px 2px 2px;
  }

  .library-book-info h3 {
    font-size: 0.88rem;
  }

  .library-book-info > p {
    font-size: 0.73rem;
  }
}


/* --- Home: Recently Finished uses the same bookshelf style as My Books --- */

.home-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 46px;
  position: relative;
}

.home-library-grid .library-book::after {
  top: auto;
  bottom: 92px;
}

@media (min-width: 560px) {
  .home-library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 54px;
  }

  .home-library-grid .library-book::after {
    bottom: 94px;
  }
}

@media (min-width: 900px) {
  .home-library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 760px;
  }
}

@media (min-width: 1180px) {
  .home-library-grid {
    max-width: 820px;
  }
}


/* =========================================================
   COZY READS - LOGIN / SIGN UP
   ========================================================= */

.auth-page {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(185, 134, 123, 0.14), transparent 24rem),
    var(--cream);
}

.auth-shell {
  width: min(100%, 480px);
}

.auth-card {
  padding: 34px 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(77, 51, 40, 0.1);
}

.auth-card h1 {
  margin: 0;
  color: var(--brown);
  font-size: clamp(2.5rem, 10vw, 4rem);
  line-height: 1;
}

.auth-intro {
  margin-bottom: 28px;
  color: var(--muted);
}

.auth-form label {
  display: block;
  margin-bottom: 18px;
  color: var(--brown);
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid #d7c7b7;
  border-radius: var(--radius-sm);
  background: #fffdf9;
  color: var(--dark);
  outline: none;
}

.auth-form input:focus {
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(140, 79, 57, 0.1);
}

.auth-form .primary-button {
  width: 100%;
}

.auth-form .primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.auth-switch {
  margin: 24px 0 0;
  color: var(--muted);
  text-align: center;
}

.auth-switch a {
  color: var(--rust);
  font-weight: 700;
}

.logout-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}
