:root {
  --background: #f6f1ea;
  --surface: #fffdf9;
  --surface-muted: #efe6da;
  --border: #e4d8c8;
  --text: #3a2a1f;
  --text-secondary: #7a6656;
  --accent: #8c5a36;
  --on-accent: #ffffff;
  --tag: #5e7046;
  --footer: #3a2a1f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1a1410;
    --surface: #231b15;
    --surface-muted: #2e241c;
    --border: #3d3027;
    --text: #f2e9de;
    --text-secondary: #bba892;
    --accent: #c99a6b;
    --on-accent: #1a1410;
    --tag: #a8bc8a;
    --footer: #120e0b;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 8px;
}

.header-face {
  width: 32px;
  height: 32px;
}

.header-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.main {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 16px 240px;
}

.status {
  margin: 48px 0;
  text-align: center;
  color: var(--text-secondary);
}

.title {
  margin: 8px 0 8px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chip {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  font-size: 13px;
  font-weight: 700;
}

.author {
  font-size: 13px;
  color: var(--text-secondary);
}

.description {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 700;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.section {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.section-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
}

.ingredients,
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ingredient {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.ingredient:first-child {
  border-top: none;
}

.ingredient-name {
  overflow-wrap: anywhere;
}

.ingredient-amount {
  flex-shrink: 0;
  font-weight: 700;
}

.step {
  display: flex;
  gap: 10px;
  padding: 8px 0;
}

.step-number {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 13px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 800;
  line-height: 26px;
  text-align: center;
}

.step-text {
  margin: 1px 0 0;
  overflow-wrap: anywhere;
}

.step-timer {
  font-size: 13px;
  color: var(--text-secondary);
}

.note {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tags {
  margin: 16px 0 0;
  color: var(--tag);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(env(safe-area-inset-bottom) + 12px);
  background: var(--footer);
  color: #fbf5ec;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
}

.cta[hidden] {
  display: none;
}

.cta-inner,
.cta-buttons {
  max-width: 640px;
  margin: 0 auto;
}

.cta-inner {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.cta-chef {
  width: 54px;
  height: 72px;
  margin-top: -36px;
}

.cta-lead {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.cta-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: #cdbba6;
}

.cta-buttons {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.button {
  flex: 1;
  display: block;
  padding: 12px 8px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.button-primary {
  background: #c99a6b;
  color: #2a1d14;
}

.button-secondary {
  border: 1px solid #6b5546;
  color: #fbf5ec;
}

.button[aria-disabled='true'] {
  opacity: 0.55;
  pointer-events: none;
}
