:root {
  --bg: #f5ede2;
  --bg-deep: #e9dbc7;
  --paper: rgba(255, 252, 247, 0.78);
  --paper-strong: #fffaf4;
  --ink: #2b221d;
  --muted: #726055;
  --line: rgba(68, 45, 31, 0.12);
  --line-strong: rgba(68, 45, 31, 0.2);
  --accent: #b5542f;
  --accent-soft: #f7e1d3;
  --accent-strong: #8f3a1d;
  --green: #54745b;
  --green-soft: #dbe9df;
  --warning: #9b452e;
  --shadow-lg: 0 24px 60px rgba(69, 44, 27, 0.12);
  --shadow-md: 0 16px 35px rgba(69, 44, 27, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --font-display: "Georgia", "Times New Roman", serif;
  --font-body: "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(181, 84, 47, 0.16), transparent 26%),
    radial-gradient(circle at 90% 10%, rgba(84, 116, 91, 0.14), transparent 22%),
    linear-gradient(180deg, #f0e4d5 0%, #f8f3ec 40%, #ede3d6 100%);
}

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

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

button {
  cursor: pointer;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 14px 15px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea {
  resize: vertical;
  min-height: 112px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(181, 84, 47, 0.58);
  box-shadow: 0 0 0 4px rgba(181, 84, 47, 0.12);
  background: #fff;
}

.site-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 249, 242, 0.7);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.brand-copy {
  display: grid;
}

.brand-copy strong {
  font-size: 16px;
}

.brand-copy span {
  font-size: 12px;
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}

.site-nav a.is-active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 0 0 1px var(--line);
}

.page {
  display: grid;
  gap: 24px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 38px;
  border-radius: 38px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background:
    linear-gradient(135deg, rgba(255, 252, 247, 0.92), rgba(250, 240, 230, 0.88));
  box-shadow: var(--shadow-lg);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 360px;
  height: 360px;
  top: -160px;
  right: -120px;
  background: rgba(181, 84, 47, 0.08);
}

.hero::after {
  width: 320px;
  height: 320px;
  left: -120px;
  bottom: -170px;
  background: rgba(84, 116, 91, 0.08);
}

.hero-home {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 22px;
}

.hero-subpage {
  display: grid;
  gap: 14px;
}

.eyebrow,
.section-kicker,
.card-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
}

h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

h3 {
  font-size: 24px;
}

.hero-text,
.panel-heading p,
.feature-panel p,
.mini-panel p,
.stat-card p,
.result-highlight p {
  color: #594b42;
  line-height: 1.75;
}

.hero-actions,
.action-row,
.toolbar-actions,
.multiplier-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.chip-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 24px rgba(181, 84, 47, 0.25);
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px var(--line);
}

.button-ghost {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.button-danger {
  color: #fff;
  background: linear-gradient(145deg, #a85235, #83331f);
}

.glass-card,
.panel,
.feature-panel,
.roadmap-panel,
.mini-panel,
.recipe-card,
.empty-state,
.result-highlight,
.toast {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-side {
  display: grid;
  gap: 14px;
}

.stat-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.stat-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 30px;
  font-family: var(--font-display);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.feature-panel,
.roadmap-panel,
.panel {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-lg);
}

.accent-panel {
  background:
    linear-gradient(180deg, rgba(248, 230, 219, 0.86), rgba(255, 249, 242, 0.88));
}

.feature-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding-left: 18px;
  color: #4e4038;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-weight: 800;
  color: var(--accent-strong);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.mini-panel {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.mini-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badges span,
.tag-pill,
.meta-pill,
.chip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(68, 45, 31, 0.08);
  color: #57483f;
  font-weight: 700;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 20px;
}

.calculator-grid {
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
}

.panel-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.panel-heading.compact {
  margin-bottom: 12px;
}

.split-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.stack-form,
.ingredient-rows {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #594b42;
}

.field-row,
.filter-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.filter-bar {
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  margin-bottom: 18px;
}

.calculator-controls {
  grid-template-columns: 1fr 1fr;
}

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

.recipe-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(252, 246, 240, 0.9));
  border: 1px solid rgba(68, 45, 31, 0.08);
  box-shadow: var(--shadow-md);
}

.recipe-card::before {
  content: "";
  position: absolute;
  right: -55px;
  top: -80px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(181, 84, 47, 0.08);
}

.recipe-header,
.recipe-meta,
.recipe-actions,
.recipe-block {
  position: relative;
  z-index: 1;
}

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

.recipe-title {
  font-size: 30px;
  line-height: 1.03;
}

.recipe-emoji {
  font-size: 34px;
}

.recipe-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  font-size: 12px;
}

.recipe-note {
  margin: 0;
  color: #594b42;
  line-height: 1.7;
}

.recipe-block h3 {
  margin-bottom: 8px;
  font-size: 14px;
  font-family: var(--font-body);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.list-clean {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-clean li {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(68, 45, 31, 0.06);
  line-height: 1.55;
}

.recipe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.small-button {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font-weight: 800;
}

.small-button.danger {
  color: var(--warning);
}

.empty-state {
  padding: 34px;
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  background: rgba(255, 251, 246, 0.72);
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 20;
}

.toast {
  min-width: 220px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(43, 34, 29, 0.92);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.ingredient-row {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 0.8fr auto;
  gap: 10px;
  align-items: end;
}

.icon-button {
  min-width: 42px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 20px;
  color: var(--warning);
}

.result-highlight {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(247, 225, 211, 0.86), rgba(255, 249, 243, 0.88));
  border: 1px solid rgba(68, 45, 31, 0.08);
}

.result-highlight strong {
  display: block;
  margin-top: 8px;
  font-size: 36px;
  font-family: var(--font-display);
}

.result-table-wrap {
  overflow-x: auto;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
}

.result-table th,
.result-table td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(68, 45, 31, 0.08);
  text-align: left;
}

.result-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.result-table td strong {
  font-size: 17px;
}

.chip-button {
  border: 0;
}

.chip-button.is-active {
  color: #fff;
  background: linear-gradient(145deg, var(--green), #395341);
}

@media (max-width: 1120px) {
  .hero-home,
  .feature-grid,
  .workspace-grid,
  .calculator-grid,
  .roadmap-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 18px, 1280px);
    padding-top: 10px;
  }

  .site-header {
    position: static;
    border-radius: 26px;
    padding: 14px;
  }

  .hero,
  .feature-panel,
  .roadmap-panel,
  .panel {
    padding: 22px;
    border-radius: 24px;
  }

  .field-row,
  .ingredient-row {
    grid-template-columns: 1fr;
  }

  .result-highlight,
  .split-heading {
    grid-template-columns: 1fr;
    display: grid;
  }

  h1 {
    font-size: clamp(36px, 14vw, 58px);
  }
}
