:root {
  color-scheme: light;
  --paper: #f5ebd8;
  --paper-deep: #ead9bf;
  --paper-soft: #fbf5e9;
  --ink: #4b3523;
  --ink-soft: #7a5a42;
  --line: rgba(112, 79, 46, 0.18);
  --tan: #d6b588;
  --tan-deep: #bc9261;
  --brown: #6d4c31;
  --brown-deep: #4a301d;
  --shadow: 0 20px 55px rgba(74, 48, 29, 0.16);
  --shadow-soft: 0 10px 24px rgba(74, 48, 29, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 252, 245, 0.88), transparent 30%),
    radial-gradient(circle at top right, rgba(202, 159, 106, 0.18), transparent 22%),
    linear-gradient(180deg, #f7f0e4 0%, #e6d0b0 100%);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background-color: #f1e2c8;
  background-image:
    linear-gradient(rgba(110, 78, 48, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 78, 48, 0.04) 1px, transparent 1px),
    radial-gradient(circle at top, rgba(255, 248, 232, 0.9), rgba(230, 208, 176, 0.92));
  background-size: 24px 24px, 24px 24px, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(88, 56, 29, 0.07), transparent 14%, transparent 86%, rgba(88, 56, 29, 0.07)),
    radial-gradient(circle at center, transparent 55%, rgba(88, 56, 29, 0.05));
}

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

button {
  cursor: pointer;
}

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

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 30px;
  border: 1px solid rgba(86, 56, 32, 0.18);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(81, 53, 31, 0.96), rgba(109, 76, 49, 0.92)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
  color: var(--paper-soft);
  box-shadow: var(--shadow);
}

.site-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: var(--tan-deep);
}

.site-header .eyebrow {
  color: rgba(246, 226, 195, 0.78);
}

.subtle-eyebrow {
  margin-top: 18px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.nav-link,
.nav-button {
  border: 1px solid rgba(245, 236, 224, 0.2);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 248, 237, 0.08);
  color: var(--paper-soft);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.nav-link:hover,
.nav-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 248, 237, 0.16);
  border-color: rgba(245, 236, 224, 0.36);
}

.nav-link-accent {
  background: rgba(214, 181, 136, 0.16);
}

.nav-button {
  appearance: none;
}

.nav-user {
  align-self: center;
  padding: 10px 6px;
  color: rgba(255, 244, 226, 0.9);
}

.page-surface {
  margin-top: 24px;
}

.hero-card,
.page-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 251, 243, 0.92), rgba(244, 232, 209, 0.98)),
    linear-gradient(90deg, rgba(131, 91, 53, 0.05), transparent 8%);
  box-shadow: var(--shadow);
}

.hero-card::after,
.page-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 22%);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 28px;
  padding: 42px;
}

.hero-copy h2,
.page-card h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  color: var(--brown-deep);
}

.hero-copy p,
.section-lead,
.recipe-card p,
.sub-card p,
.list-card p {
  color: var(--ink-soft);
}

.section-lead {
  margin-top: 12px;
  font-size: 1.02rem;
  line-height: 1.7;
}

.compact-lead {
  margin-bottom: 10px;
}

.hero-actions,
.button-row,
.inline-form,
.section-header {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 24px;
}

.hero-note {
  align-self: end;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(117, 77, 45, 0.08), rgba(255, 250, 242, 0.52));
  border: 1px dashed rgba(117, 77, 45, 0.22);
}

.hero-note h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--brown);
}

.button {
  appearance: none;
  border-radius: 999px;
  padding: 12px 18px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled,
.segment:disabled,
.nav-button:disabled,
.nav-link:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button-primary {
  background: linear-gradient(180deg, #7d5839, #5d3d27);
  color: var(--paper-soft);
  box-shadow: var(--shadow-soft);
}

.button-secondary {
  background: rgba(255, 248, 237, 0.72);
  border-color: rgba(109, 76, 49, 0.22);
  color: var(--brown-deep);
}

.auth-card,
.editor-card {
  padding: 34px;
}

.recipe-list-card {
  padding: 34px;
}

.jobs-card {
  padding: 34px;
}

.recipe-detail-card {
  padding: 34px;
}

.page-card-centered {
  padding: 32px;
  text-align: center;
}

.segmented-control {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  margin: 18px 0 20px;
  border-radius: 999px;
  background: rgba(125, 88, 57, 0.08);
}

.segment {
  appearance: none;
  border: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: transparent;
  color: var(--brown);
}

.segment-active {
  background: linear-gradient(180deg, #fff8ef, #f0dec1);
  box-shadow: inset 0 0 0 1px rgba(109, 76, 49, 0.14);
}

.form-grid {
  display: grid;
  gap: 16px;
}

.auth-form {
  max-width: 420px;
}

.editor-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-span-full {
  grid-column: 1 / -1;
}

.field-label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--brown);
}

.field-input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(109, 76, 49, 0.22);
  border-radius: var(--radius-sm);
  padding: 14px 15px;
  background: rgba(255, 251, 243, 0.82);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.field-input:focus {
  outline: 2px solid rgba(188, 146, 97, 0.4);
  outline-offset: 1px;
}

.field-textarea {
  resize: vertical;
}

.field-select {
  padding-right: 36px;
}

.file-input {
  padding: 10px;
}

.feedback {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
}

.feedback-error {
  background: rgba(133, 43, 30, 0.1);
  color: #8a2e24;
}

.feedback-success {
  background: rgba(83, 101, 53, 0.12);
  color: #526335;
}

.section-header {
  justify-content: space-between;
  margin-bottom: 20px;
}

.recipe-grid,
.stack-list,
.notes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.recipe-card,
.list-card,
.sub-card,
.uploader-fieldset {
  border: 1px solid rgba(109, 76, 49, 0.16);
  border-radius: 22px;
  background: rgba(255, 252, 245, 0.76);
  box-shadow: var(--shadow-soft);
}

.recipe-card {
  padding: 22px;
}

.recipe-card-image {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(109, 76, 49, 0.16);
  background: rgba(255, 248, 237, 0.6);
}

.recipe-link {
  color: var(--brown-deep);
}

.recipe-link:hover {
  text-decoration: underline;
  text-decoration-color: rgba(93, 61, 39, 0.45);
}

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

.compact-stack {
  margin-top: 8px;
}

.list-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
}

.list-card h3,
.recipe-card h3,
.sub-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--brown-deep);
}

.compact-card {
  align-items: center;
}

.recipe-detail-card {
  padding: 34px;
}

.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 24px;
}

.chip,
.autosave-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(214, 181, 136, 0.24);
  border: 1px solid rgba(109, 76, 49, 0.16);
  color: var(--brown-deep);
  font-size: 0.9rem;
}

.recipe-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.sub-card {
  padding: 22px;
}

.detail-section {
  margin-top: 18px;
}

.notes-list {
  display: grid;
  gap: 10px;
  color: var(--ink-soft);
}

.ordered-list {
  list-style: decimal;
  padding-left: 18px;
}

.comment-author {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--brown);
}

.uploader-fieldset {
  padding: 20px;
}

.uploader-fieldset legend {
  padding: 0 10px;
  color: var(--brown);
  font-weight: 700;
}

.create-options-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
}

.create-editor-form {
  margin: 0;
}

.parser-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

@media (max-width: 900px) {

  .site-header,
  .hero-card,
  .recipe-columns,
  .editor-form,
  .create-options-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    display: grid;
  }

  .section-header,
  .list-card {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding-inline: 14px;
  }

  .site-header,
  .hero-card,
  .page-card,
  .auth-card,
  .editor-card,
  .recipe-detail-card {
    padding: 22px;
  }

  .site-title,
  .hero-copy h2,
  .page-card h2 {
    font-size: 1.9rem;
  }
}