:root {
  color-scheme: light;
  --bg: #f5f3ed;
  --paper: #fffdf8;
  --paper-strong: #f0f6f1;
  --ink: #182520;
  --muted: #75817b;
  --line: #dce5df;
  --brand: #174d43;
  --brand-dark: #10372f;
  --brand-soft: #e2f0e9;
  --accent: #d7ed69;
  --accent-soft: #f1f8c6;
  --warm: #ec7953;
  --shadow: 0 18px 48px rgba(28, 54, 44, 0.09);
  --shadow-small: 0 8px 22px rgba(28, 54, 44, 0.07);
  --nav-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 0 0, rgba(215, 237, 105, 0.2), transparent 24rem),
    radial-gradient(circle at 100% 18%, rgba(226, 240, 233, 0.9), transparent 28rem),
    var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: transparent;
  font-family: "Pretendard", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.app-shell {
  width: min(1180px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 20px 22px calc(var(--nav-height) + 24px);
}

.app-header {
  position: relative;
  display: flex;
  min-height: 154px;
  align-items: end;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(120deg, rgba(16, 55, 47, 0.99), rgba(23, 77, 67, 0.98) 68%, rgba(59, 119, 99, 0.94)),
    repeating-linear-gradient(90deg, rgba(215, 237, 105, 0.14) 0 1px, transparent 1px 38px);
  padding: 28px 30px;
  box-shadow: var(--shadow);
}

.app-header::after {
  position: absolute;
  top: -55px;
  right: 12%;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(215, 237, 105, 0.36);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 22px rgba(215, 237, 105, 0.05), 0 0 0 44px rgba(215, 237, 105, 0.04);
}

.header-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.app-header .eyebrow {
  color: var(--accent);
}

h1,
h2,
h3,
p {
  letter-spacing: -0.02em;
}

h1 {
  margin: 0;
  color: white;
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.header-note {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  font-weight: 650;
}

.header-mark {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  width: 70px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: right;
}

.header-mark span {
  border-bottom: 1px solid rgba(215, 237, 105, 0.4);
  padding-bottom: 6px;
}

.header-mark span:first-child {
  color: var(--accent);
}

.status-strip {
  margin: 12px 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.86);
  padding: 12px;
  box-shadow: var(--shadow-small);
}

.status-strip label {
  display: grid;
  gap: 8px;
}

.status-strip label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.status-strip label > span strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.status-strip small {
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 900;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  padding: 0 14px;
}

input::placeholder {
  color: #a5aea9;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #91bca7;
  box-shadow: 0 0 0 4px rgba(145, 188, 167, 0.18);
}

.recipe-stage {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.recipe-browser,
.detail-panel,
.info-card,
.map-shell {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
}

.recipe-browser {
  position: sticky;
  top: 18px;
  overflow: hidden;
}

.list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 18px 18px 15px;
}

.list-heading h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.05em;
}

.list-heading .eyebrow {
  margin-bottom: 7px;
}

.list-hint {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.recipe-list {
  display: grid;
  gap: 7px;
  max-height: calc(100dvh - 230px);
  overflow: auto;
  padding: 9px;
  scrollbar-width: thin;
}

.recipe-card {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 94px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: var(--ink);
  padding: 13px 13px 12px 17px;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.recipe-card::before {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 8px;
  width: 3px;
  border-radius: 999px;
  background: var(--line);
  content: "";
}

.recipe-card:hover {
  border-color: var(--line);
  background: var(--paper-strong);
  transform: translateY(-1px);
}

.recipe-card.active {
  border-color: rgba(23, 77, 67, 0.18);
  background: var(--brand);
  color: white;
  box-shadow: 0 8px 18px rgba(23, 77, 67, 0.16);
}

.recipe-card.active::before {
  background: var(--accent);
}

.recipe-card-type,
.recipe-card-meta {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.recipe-card-type {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.recipe-card.active .recipe-card-type,
.recipe-card.active .recipe-card-meta {
  color: rgba(255, 255, 255, 0.66);
}

.recipe-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.94rem;
  font-weight: 850;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recipe-card-preview {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-card.active .recipe-card-preview {
  color: rgba(255, 255, 255, 0.75);
}

.detail-panel {
  min-width: 0;
  min-height: 540px;
  padding: 18px;
}

.back-button {
  display: none;
  align-items: center;
  min-height: 42px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--brand);
  padding: 0 13px;
  font-size: 0.82rem;
  font-weight: 900;
}

.empty-detail {
  display: grid;
  min-height: 500px;
  align-content: center;
  border: 1px dashed #bfd3c8;
  border-radius: 17px;
  background:
    linear-gradient(135deg, rgba(226, 240, 233, 0.65), rgba(241, 248, 198, 0.58)),
    repeating-linear-gradient(45deg, transparent 0 17px, rgba(23, 77, 67, 0.045) 17px 18px);
  padding: 30px;
}

.empty-detail h2 {
  max-width: 480px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.4rem);
  letter-spacing: -0.08em;
  line-height: 0.96;
}

.empty-detail p:last-child {
  max-width: 370px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.recipe-detail {
  display: grid;
  gap: 14px;
}

.recipe-detail[hidden],
.empty-detail[hidden] {
  display: none;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(125deg, var(--brand-dark), var(--brand) 70%, #317a65),
    repeating-linear-gradient(90deg, rgba(215, 237, 105, 0.12) 0 1px, transparent 1px 30px);
  color: white;
  padding: 22px 22px 24px;
}

.detail-hero::after {
  position: absolute;
  right: -35px;
  bottom: -54px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(215, 237, 105, 0.45);
  border-radius: 50%;
  content: "";
}

.detail-hero-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.detail-hero .eyebrow {
  margin-bottom: 0;
  color: var(--accent);
}

.detail-focus {
  border: 1px solid rgba(215, 237, 105, 0.35);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.84);
  padding: 6px 9px;
  font-size: 0.67rem;
  font-weight: 850;
  white-space: nowrap;
}

.detail-hero h2 {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 28px 0 0;
  font-size: clamp(2.4rem, 6vw, 5.3rem);
  letter-spacing: -0.09em;
  line-height: 0.9;
}

.detail-hero > p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.source-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 15px;
  border: 1px solid rgba(215, 237, 105, 0.5);
  border-radius: 10px;
  color: var(--accent);
  padding: 0 11px;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 900;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.meta-grid div {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 13px;
}

.meta-grid strong,
.meta-grid span {
  display: block;
}

.meta-grid strong {
  overflow: hidden;
  font-size: 1.08rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-grid span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.focus-strip {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid #d9e7b4;
  border-radius: 15px;
  background: var(--accent-soft);
  padding: 12px 14px;
}

.focus-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--brand);
  color: var(--accent);
  font-weight: 900;
}

.focus-strip strong,
.focus-strip span {
  display: block;
}

.focus-strip strong {
  font-size: 0.82rem;
}

.focus-strip div > span {
  margin-top: 3px;
  color: #71805d;
  font-size: 0.72rem;
  font-weight: 650;
}

.sequence-view {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(23, 77, 67, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 0%, rgba(215, 237, 105, 0.24), transparent 30%),
    linear-gradient(135deg, #123f37, #174d43 60%, #245e4e);
  color: white;
  padding: clamp(18px, 3vw, 30px);
  box-shadow: 0 18px 40px rgba(16, 55, 47, 0.18);
}

.sequence-view::before,
.sequence-view::after {
  position: absolute;
  border: 1px solid rgba(215, 237, 105, 0.24);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.sequence-view::before {
  top: -90px;
  right: -40px;
  width: 220px;
  height: 220px;
}

.sequence-view::after {
  right: 12%;
  bottom: -96px;
  width: 190px;
  height: 190px;
  border-color: rgba(255, 255, 255, 0.09);
}

.sequence-toolbar,
.sequence-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sequence-toolbar .card-kicker {
  margin-bottom: 5px;
  color: var(--accent);
}

.sequence-recipe-name {
  display: block;
  max-width: 38ch;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sequence-progress {
  border: 1px solid rgba(215, 237, 105, 0.42);
  border-radius: 999px;
  color: var(--accent);
  padding: 7px 10px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.sequence-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: center;
  min-height: 290px;
  padding: 38px 0 42px;
  touch-action: pan-y;
}

.sequence-stage-number {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(3.8rem, 9vw, 7.2rem);
  font-weight: 900;
  letter-spacing: -0.12em;
  line-height: 0.8;
  opacity: 0.96;
}

.sequence-stage-copy {
  min-width: 0;
}

.sequence-label {
  margin: 0 0 11px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sequence-stage h3 {
  max-width: 720px;
  margin: 0;
  color: white;
  font-size: clamp(2.15rem, 5vw, 4.8rem);
  letter-spacing: -0.09em;
  line-height: 0.94;
}

.sequence-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.sequence-ingredients span {
  border: 1px solid rgba(215, 237, 105, 0.45);
  border-radius: 999px;
  background: rgba(215, 237, 105, 0.14);
  color: var(--accent);
  padding: 7px 10px;
  font-size: 0.75rem;
  font-weight: 850;
}

.sequence-ingredients .sequence-ingredient-empty {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}

.sequence-instruction {
  max-width: 620px;
  margin: 19px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  line-height: 1.6;
}

.sequence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.sequence-meta span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.7rem;
  font-weight: 800;
}

.sequence-meta span + span::before {
  margin-right: 7px;
  color: rgba(255, 255, 255, 0.3);
  content: "·";
}

.sequence-stage.is-empty .sequence-stage-number {
  color: rgba(255, 255, 255, 0.26);
}

.sequence-stage.is-empty h3 {
  color: rgba(255, 255, 255, 0.75);
}

.sequence-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  padding-top: 16px;
}

.sequence-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 48%;
}

.sequence-dot {
  width: 23px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  padding: 0;
}

.sequence-dot.active {
  width: 38px;
  background: var(--accent);
}

.sequence-actions {
  display: flex;
  gap: 7px;
}

.sequence-nav-button,
.sequence-next-button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 0 13px;
  font-size: 0.76rem;
  font-weight: 900;
}

.sequence-nav-button {
  width: 44px;
  padding: 0;
}

.sequence-next-button {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--brand-dark);
}

.sequence-nav-button:disabled,
.sequence-next-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.detail-sections {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 14px;
  align-items: start;
}

.info-card {
  min-width: 0;
  padding: 18px;
}

.ingredient-card {
  border-color: #cbded2;
  background: #fbfdf8;
}

.card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-kicker {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-heading h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.07em;
}

.card-heading p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.card-count {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  padding: 6px 9px;
  font-size: 0.68rem;
  font-weight: 900;
}

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

.ingredient-item {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 56px;
  border: 1px solid #e2e9e3;
  border-radius: 13px;
  background: white;
  padding: 9px 10px 9px 8px;
}

.ingredient-index {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--brand);
  font-size: 0.65rem;
  font-weight: 900;
}

.ingredient-copy {
  min-width: 0;
}

.ingredient-copy strong,
.ingredient-group,
.ingredient-notes {
  display: block;
}

.ingredient-copy strong {
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ingredient-group,
.ingredient-notes {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.ingredient-group {
  color: var(--brand);
  font-weight: 800;
}

.ingredient-amount {
  max-width: 98px;
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 900;
  text-align: right;
}

.ingredient-amount small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 750;
}

.step-item {
  cursor: pointer;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-bottom: 1px solid #e7ece8;
  padding: 5px 0 13px;
}

.step-item:focus-visible,
.step-item:hover {
  border-radius: 10px;
  background: var(--paper-strong);
  outline: none;
}

.step-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.step-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #cbded2;
  border-radius: 10px;
  background: var(--paper-strong);
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 900;
}

.step-copy strong,
.step-copy p {
  display: block;
}

.step-copy strong {
  margin-top: 2px;
  font-size: 0.73rem;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.step-ingredient-preview {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.step-copy p {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.55;
}

#latestFeedbackCard {
  box-shadow: none;
}

#latestFeedbackCard h3 {
  margin: 0 0 8px;
}

#latestFeedback {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.action-grid {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.action-grid button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--muted);
  padding: 0 11px;
  font-size: 0.75rem;
  font-weight: 850;
}

.action-grid button:disabled {
  display: none;
}

.action-grid .danger-button {
  border-color: #f0b2a1;
  background: #fff1ed;
  color: #c9593c;
}

ul,
ol {
  line-height: 1.55;
}

.fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: calc(var(--nav-height) + max(17px, env(safe-area-inset-bottom)));
  z-index: 5;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: var(--accent);
  padding: 0 18px;
  box-shadow: 0 12px 30px rgba(16, 55, 47, 0.22);
  font-size: 0.82rem;
  font-weight: 900;
}

.recipe-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  background: rgba(16, 34, 29, 0.42);
  padding: 18px 18px calc(var(--nav-height) + 18px);
}

.recipe-modal[hidden] {
  display: none;
}

.recipe-form {
  display: grid;
  gap: 14px;
  width: min(720px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 20px;
}

.form-heading,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-heading h2 {
  margin: 0;
  letter-spacing: -0.07em;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-strong);
  color: var(--brand);
  font-size: 1.3rem;
  font-weight: 900;
}

.recipe-form label {
  display: grid;
  gap: 7px;
}

.field-note {
  margin-top: -2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  outline: none;
  padding: 12px 13px;
  resize: vertical;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.form-actions button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 16px;
  font-weight: 900;
}

.form-actions button[type="submit"] {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--accent);
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3000;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(215, 237, 105, 0.18);
  background: rgba(16, 55, 47, 0.97);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 26px rgba(16, 55, 47, 0.12);
  backdrop-filter: blur(16px);
}

.bottom-nav button {
  position: relative;
  display: grid;
  min-height: 52px;
  place-items: center;
  gap: 3px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 850;
}

.bottom-nav button::before {
  color: currentColor;
  font-size: 1rem;
  line-height: 1;
}

.bottom-nav button[data-view="baking"]::before {
  content: "✦";
}

.bottom-nav button[data-view="cocktail"]::before {
  content: "◒";
}

.bottom-nav button[data-view="cooking"]::before {
  content: "⌁";
}

.bottom-nav button[data-view="map"]::before {
  content: "⌖";
}

.bottom-nav button[data-view="tools"]::before {
  content: "＋";
}

.bottom-nav button.active {
  background: rgba(215, 237, 105, 0.15);
  color: var(--accent);
}

body.map-view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

body.map-view .app-shell {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  padding: 0 0 var(--nav-height);
  overflow: hidden;
}

body.map-view .app-header,
body.map-view .status-strip {
  display: none;
}

.map-shell {
  position: relative;
  display: grid;
  min-height: calc(100vh - var(--nav-height) - 96px);
  overflow: hidden;
}

body.map-view .map-shell {
  height: calc(100dvh - var(--nav-height));
  min-height: calc(100dvh - var(--nav-height));
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.map-toolbar {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 12px);
  right: 14px;
  left: 14px;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(215, 237, 105, 0.25);
  border-radius: 17px;
  background: rgba(16, 55, 47, 0.92);
  padding: 10px 12px;
  backdrop-filter: blur(14px);
}

.map-toolbar > div {
  min-width: 94px;
}

.map-toolbar h2 {
  margin: 0;
  color: white;
  font-size: 1.05rem;
  letter-spacing: -0.05em;
}

.map-toolbar .eyebrow {
  margin-bottom: 5px;
  color: var(--accent);
}

.map-search {
  flex: 1 1 auto;
  min-width: 120px;
  min-height: 42px;
  border-color: rgba(215, 237, 105, 0.25);
  background: rgba(255, 253, 248, 0.98);
}

.map-search-widget {
  display: block;
  min-height: 42px;
  border: 0;
  background: transparent;
}

.google-place-autocomplete {
  display: block;
  width: 100%;
  min-height: 42px;
}

.place-type-select {
  width: auto;
  min-width: 86px;
  min-height: 42px;
  border-color: rgba(215, 237, 105, 0.25);
  background: rgba(255, 253, 248, 0.98);
}

.map-toolbar button {
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 11px;
  background: var(--accent);
  color: var(--brand-dark);
  padding: 0 11px;
  font-size: 0.76rem;
  font-weight: 900;
}

.places-map {
  width: 100%;
  min-height: calc(100vh - var(--nav-height) - 96px);
  background: var(--paper);
}

body.map-view .places-map {
  height: calc(100dvh - var(--nav-height));
  min-height: calc(100dvh - var(--nav-height));
}

.place-results {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 84px);
  right: 14px;
  left: 14px;
  z-index: 1800;
  display: grid;
  max-height: min(38vh, 260px);
  gap: 6px;
  overflow: auto;
  border: 1px solid rgba(215, 237, 105, 0.25);
  border-radius: 14px;
  background: rgba(16, 55, 47, 0.95);
  padding: 8px;
  backdrop-filter: blur(14px);
}

.place-results[hidden] {
  display: none;
}

.place-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: stretch;
}

.place-result-main,
.place-add-button {
  border: 1px solid rgba(215, 237, 105, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.place-result-main {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 7px 9px;
  text-align: left;
}

.place-result-main strong,
.place-result-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-result-main strong {
  font-size: 0.84rem;
}

.place-result-main span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.7rem;
}

.place-add-button {
  min-width: 54px;
  background: var(--accent);
  color: var(--brand-dark);
  font-weight: 900;
}

.map-status {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 70px);
  right: 14px;
  z-index: 500;
  margin: 0;
  border: 1px solid rgba(215, 237, 105, 0.25);
  border-radius: 10px;
  background: rgba(16, 55, 47, 0.88);
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 10px;
  font-size: 0.76rem;
  line-height: 1.4;
  backdrop-filter: blur(12px);
}

.place-marker {
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--brand-dark);
  box-shadow: 0 8px 22px rgba(16, 55, 47, 0.28), 0 0 0 3px rgba(215, 237, 105, 0.2);
  font-size: 1.2rem;
}

.place-popup {
  min-width: 180px;
}

.place-popup strong {
  display: block;
  font-size: 1rem;
}

.place-popup p {
  margin: 7px 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.place-note-input {
  width: 100%;
  min-height: 72px;
  margin: 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
  padding: 8px;
  resize: vertical;
}

.place-popup a,
.place-note-save-button,
.place-delete-button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  padding: 0 10px;
  text-decoration: none;
  font-weight: 900;
}

.place-popup a,
.place-note-save-button {
  background: var(--brand);
  color: var(--accent);
}

.place-note-save-button,
.place-delete-button {
  margin-left: 6px;
}

.place-delete-button {
  background: #da6b50;
  color: white;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.info-card h2,
.info-card h3 {
  margin: 0 0 12px;
}

.converter {
  display: grid;
  grid-template-columns: 1fr 110px auto 1fr;
  gap: 8px;
  align-items: center;
}

.converter strong {
  border-radius: 10px;
  background: var(--accent-soft);
  padding: 13px;
}

.reference-list {
  padding-left: 20px;
}

.empty-state,
.error-state {
  margin: 0;
  padding: 18px 10px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .recipe-stage {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 12px;
  }

  .detail-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 10px 10px calc(var(--nav-height) + 14px);
  }

  .app-header {
    min-height: 132px;
    border-radius: 22px;
    padding: 21px 20px;
  }

  .header-note {
    max-width: 240px;
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .header-mark {
    width: 48px;
    font-size: 0.6rem;
  }

  .status-strip {
    margin: 9px 0 12px;
    border-radius: 16px;
  }

  .recipe-stage {
    display: block;
  }

  .recipe-browser {
    position: static;
    border-radius: 18px;
  }

  .list-heading {
    padding: 15px 15px 12px;
  }

  .recipe-list {
    display: flex;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 9px;
    scroll-snap-type: x proximity;
  }

  .recipe-card {
    width: min(194px, 64vw);
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .detail-panel {
    display: none;
    min-height: auto;
    border-radius: 18px;
    padding: 10px;
    box-shadow: none;
  }

  .recipe-stage.show-detail .recipe-browser {
    display: none;
  }

  .recipe-stage.show-detail .detail-panel {
    display: block;
  }

  .recipe-stage.show-detail ~ .fab {
    display: none;
  }

  body.sequence-mode .app-header,
  body.sequence-mode .status-strip {
    display: none;
  }

  body.sequence-mode .app-shell {
    padding-top: 10px;
  }

  body.sequence-mode .recipe-stage.show-detail .detail-panel {
    border: 0;
    background: transparent;
    padding: 0;
  }

  body.sequence-mode .recipe-detail {
    gap: 10px;
  }

  body.sequence-mode .detail-hero,
  body.sequence-mode .meta-grid,
  body.sequence-mode .focus-strip {
    display: none;
  }

  body.sequence-mode .detail-sections,
  body.sequence-mode #latestFeedbackCard,
  body.sequence-mode .action-grid {
    margin-top: 10px;
  }

  .back-button {
    display: inline-flex;
  }

  .empty-detail {
    min-height: 360px;
    padding: 24px;
  }

  .sequence-view {
    display: flex;
    min-height: calc(100dvh - var(--nav-height) - 34px);
    flex-direction: column;
    border-radius: 22px;
    padding: 16px;
  }

  .sequence-toolbar {
    align-items: start;
  }

  .sequence-recipe-name {
    max-width: 23ch;
  }

  .sequence-stage {
    grid-template-columns: 1fr;
    min-height: 0;
    flex: 1;
    align-content: center;
    gap: 17px;
    padding: 28px 4px 36px;
  }

  .sequence-stage-number {
    position: absolute;
    top: 22px;
    right: 2px;
    font-size: 4.4rem;
  }

  .sequence-stage h3 {
    max-width: 92%;
    font-size: clamp(2.5rem, 13vw, 4.9rem);
  }

  .sequence-instruction {
    font-size: 0.9rem;
  }

  .sequence-footer {
    align-items: end;
  }

  .sequence-dots {
    max-width: 42%;
  }

  .sequence-actions {
    flex: 0 0 auto;
  }

  .sequence-next-button {
    min-width: 116px;
  }

  .detail-hero {
    border-radius: 16px;
    padding: 18px 17px 20px;
  }

  .detail-hero h2 {
    margin-top: 22px;
    font-size: clamp(2.4rem, 13vw, 4.3rem);
  }

  .detail-hero > p:not(.eyebrow) {
    font-size: 0.82rem;
  }

  .meta-grid div {
    padding: 11px 10px;
  }

  .meta-grid strong {
    font-size: 0.98rem;
  }

  .focus-strip {
    padding: 11px 12px;
  }

  .detail-sections {
    gap: 10px;
  }

  .info-card {
    border-radius: 16px;
    padding: 15px;
  }

  .ingredient-item {
    grid-template-columns: 27px minmax(0, 1fr) auto;
    padding-right: 8px;
  }

  .ingredient-copy strong {
    font-size: 0.84rem;
  }

  .ingredient-amount {
    max-width: 78px;
    font-size: 0.8rem;
  }

  .action-grid {
    padding: 0 3px 4px;
  }

  .tool-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .tool-grid .info-card + .info-card {
    margin-top: 12px;
  }

  .map-toolbar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    top: calc(env(safe-area-inset-top) + 8px);
  }

  .map-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .place-results {
    top: calc(env(safe-area-inset-top) + 116px);
  }
}

@media (max-width: 430px) {
  .app-header {
    min-height: 126px;
  }

  .app-header::after {
    right: -72px;
  }

  .header-mark {
    display: none;
  }

  .detail-focus {
    padding: 5px 7px;
    font-size: 0.6rem;
  }

  .ingredient-item {
    gap: 7px;
  }

  .ingredient-notes {
    display: none;
  }
}

/* Pastel game-room mood: clean type, blue counters, mint/pink accents, warm wood details. */
:root {
  --bg: #fffaf4;
  --paper: #fffefd;
  --paper-strong: #eefaf7;
  --ink: #191a26;
  --muted: #747689;
  --line: #e5e1df;
  --brand: #5360d8;
  --brand-dark: #303ba8;
  --brand-soft: #e5e9ff;
  --accent: #99e8d0;
  --accent-soft: #e7faf4;
  --warm: #ee897c;
  --wood: #a96f59;
  --sky: #cfe9ff;
  --pink: #ffc3d3;
  --shadow: 0 18px 48px rgba(83, 82, 112, 0.11);
  --shadow-small: 0 8px 22px rgba(83, 82, 112, 0.08);
}

html {
  background:
    radial-gradient(circle at 0 0, rgba(255, 195, 211, 0.28), transparent 24rem),
    radial-gradient(circle at 100% 12%, rgba(207, 233, 255, 0.8), transparent 27rem),
    radial-gradient(circle at 42% 100%, rgba(153, 232, 208, 0.25), transparent 28rem),
    var(--bg);
}

.eyebrow {
  color: var(--brand);
}

.app-header {
  border: 1px solid #dbe7ec;
  background:
    linear-gradient(118deg, rgba(255, 253, 249, 0.98), rgba(231, 250, 244, 0.98) 48%, rgba(220, 236, 255, 0.96)),
    repeating-linear-gradient(90deg, rgba(169, 111, 89, 0.07) 0 1px, transparent 1px 38px);
  box-shadow: 0 20px 50px rgba(91, 89, 118, 0.12);
}

.app-header::before {
  position: absolute;
  right: 18%;
  bottom: -28px;
  width: 360px;
  height: 72px;
  border-radius: 50%;
  background: rgba(169, 111, 89, 0.13);
  content: "";
  transform: rotate(-7deg);
}

.app-header::after {
  border-color: rgba(83, 96, 216, 0.26);
  box-shadow: 0 0 0 22px rgba(255, 195, 211, 0.18), 0 0 0 44px rgba(207, 233, 255, 0.36);
}

.app-header .eyebrow {
  color: var(--brand);
}

h1 {
  color: var(--ink);
}

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

.header-mark {
  color: var(--brand);
}

.header-mark span {
  border-color: rgba(169, 111, 89, 0.42);
}

.header-mark span:first-child {
  color: var(--warm);
}

.status-strip,
.recipe-browser,
.detail-panel,
.info-card,
.map-shell {
  border-color: #e7e2df;
  background: rgba(255, 254, 253, 0.9);
  box-shadow: var(--shadow);
}

.empty-detail {
  border-color: #cbdcf0;
  background:
    linear-gradient(135deg, rgba(231, 250, 244, 0.9), rgba(255, 240, 242, 0.78) 54%, rgba(220, 236, 255, 0.86)),
    repeating-linear-gradient(45deg, transparent 0 17px, rgba(169, 111, 89, 0.05) 17px 18px);
}

.status-strip small,
.card-count {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

input,
select,
textarea {
  border-color: #dfe3eb;
  background: var(--paper);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #8792ed;
  box-shadow: 0 0 0 4px rgba(83, 96, 216, 0.13);
}

.list-heading {
  border-bottom-color: #e8e3e0;
}

.list-heading .eyebrow,
.card-kicker {
  color: var(--brand);
}

.recipe-card::before {
  background: #dfe3eb;
}

.recipe-card:hover {
  border-color: #d8def6;
  background: #f3f5ff;
}

.recipe-card.active {
  border-color: #c1c9ff;
  background: linear-gradient(135deg, #e8ebff, #dff8f0);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(83, 96, 216, 0.14);
}

.recipe-card.active::before {
  background: var(--warm);
}

.recipe-card.active .recipe-card-type,
.recipe-card.active .recipe-card-meta,
.recipe-card.active .recipe-card-preview {
  color: var(--brand-dark);
}

.detail-hero {
  border: 1px solid #f1dce2;
  background:
    linear-gradient(125deg, #fff0f2, #e8faf4 64%, #e1edff),
    repeating-linear-gradient(90deg, rgba(169, 111, 89, 0.08) 0 1px, transparent 1px 30px);
  color: var(--ink);
}

.detail-hero::after {
  border-color: rgba(83, 96, 216, 0.25);
}

.detail-hero .eyebrow {
  color: var(--brand);
}

.detail-focus {
  border-color: rgba(83, 96, 216, 0.28);
  color: var(--brand-dark);
}

.detail-hero > p:not(.eyebrow) {
  color: var(--muted);
}

.source-link {
  border-color: rgba(83, 96, 216, 0.34);
  color: var(--brand-dark);
}

.meta-grid div {
  border-color: #e5e5ee;
  background: rgba(255, 255, 255, 0.92);
}

.meta-grid strong {
  color: var(--brand-dark);
}

.focus-strip {
  border-color: #f1d4b7;
  background: #fff2df;
}

.focus-icon {
  background: var(--warm);
  color: white;
}

.focus-strip div > span {
  color: var(--wood);
}

.sequence-view {
  border-color: #d9e0f2;
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 195, 211, 0.42), transparent 28%),
    linear-gradient(145deg, #f3fffb 0%, #fffaf4 56%, #eef2ff 100%);
  color: var(--ink);
  box-shadow: 0 22px 52px rgba(83, 96, 216, 0.13);
}

.sequence-view::before {
  border-color: rgba(83, 96, 216, 0.17);
}

.sequence-view::after {
  border-color: rgba(169, 111, 89, 0.14);
}

.sequence-toolbar .card-kicker {
  color: var(--brand);
}

.sequence-recipe-name {
  color: var(--muted);
}

.sequence-progress {
  border-color: #bdc7ff;
  background: rgba(255, 255, 255, 0.64);
  color: var(--brand-dark);
}

.sequence-stage-number {
  color: var(--brand);
  text-shadow: 4px 4px 0 rgba(255, 195, 211, 0.72);
}

.sequence-label {
  color: var(--wood);
}

.sequence-stage h3 {
  color: var(--ink);
}

.sequence-stage.is-empty .sequence-stage-number {
  color: var(--brand);
}

.sequence-stage.is-empty h3 {
  color: var(--ink);
}

.sequence-ingredients span {
  border-color: #a9dece;
  background: var(--accent-soft);
  color: var(--brand-dark);
}

.sequence-ingredients .sequence-ingredient-empty {
  border-color: #d8d6de;
  background: #f5f3f3;
  color: var(--muted);
}

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

.sequence-meta span {
  color: var(--wood);
}

.sequence-meta span + span::before {
  color: #d5b1a2;
}

.sequence-footer {
  border-top-color: #dfe4f0;
}

.sequence-dot {
  background: #cbd5ec;
}

.sequence-dot.active {
  background: var(--brand);
}

.sequence-nav-button,
.sequence-next-button {
  border-color: #cbd2ed;
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-dark);
}

.sequence-next-button {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}

.ingredient-card {
  border-color: #cce9dc;
  background: #f5fffb;
}

.ingredient-item {
  border-color: #e5e7eb;
  background: white;
}

.ingredient-index {
  background: var(--sky);
  color: var(--brand-dark);
}

.ingredient-group {
  color: var(--brand);
}

.ingredient-amount {
  color: var(--brand-dark);
}

.step-item:hover,
.step-item:focus-visible {
  background: #f2f4ff;
}

.step-number {
  border-color: #b9e4d5;
  background: var(--accent-soft);
  color: var(--brand-dark);
}

.step-copy strong {
  color: var(--brand-dark);
}

.step-ingredient-preview {
  color: var(--wood);
}

.fab {
  background: var(--brand);
  color: white;
  box-shadow: 0 12px 30px rgba(83, 96, 216, 0.26);
}

.recipe-modal {
  background: rgba(45, 44, 61, 0.32);
}

.form-actions button[type="submit"] {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}

.bottom-nav {
  border-top-color: #e3e0e3;
  background: rgba(255, 254, 253, 0.96);
  box-shadow: 0 -8px 26px rgba(83, 82, 112, 0.12);
}

.bottom-nav button {
  color: #9698aa;
}

.bottom-nav button.active {
  background: #e8ebff;
  color: var(--brand-dark);
}

.map-toolbar {
  border-color: #e2dfe4;
  background: rgba(255, 254, 253, 0.94);
  box-shadow: var(--shadow-small);
}

.map-toolbar h2 {
  color: var(--ink);
}

.map-toolbar .eyebrow {
  color: var(--brand);
}

.map-toolbar button {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}

.map-status {
  color: var(--brand-dark);
}

/* Cozy workshop mood: dark chocolate, romantic mint, sky blue and soft pink. */
:root {
  --bg: #24130f;
  --paper: #fffdf9;
  --paper-strong: #eefaf6;
  --ink: #24130f;
  --muted: #806f69;
  --line: #e6d8d1;
  --brand: #84dfd6;
  --brand-dark: #2f716e;
  --brand-soft: #dcf7f2;
  --accent: #f2a8bd;
  --accent-soft: #fff0f4;
  --warm: #c77b58;
  --wood: #8c513a;
  --sky: #b9ddf1;
  --pink: #f2a8bd;
  --shadow: 0 10px 28px rgba(36, 19, 15, 0.08);
  --shadow-small: 0 5px 14px rgba(36, 19, 15, 0.06);
}

html {
  background: var(--bg);
}

body {
  background: var(--bg);
}

.app-shell {
  width: min(1180px, calc(100% - 16px));
  background: var(--paper);
  border-right: 8px solid var(--bg);
  border-left: 8px solid var(--bg);
}

.app-header,
.status-strip,
.recipe-browser,
.detail-panel,
.info-card,
.map-shell,
.recipe-modal,
.recipe-form {
  border-radius: 4px;
  box-shadow: none;
}

.app-header {
  min-height: 148px;
  border: 1px solid var(--line);
  border-bottom: 5px solid var(--wood);
  background: var(--paper);
}

.app-header::before,
.app-header::after,
.detail-hero::after,
.sequence-view::before,
.sequence-view::after {
  display: none !important;
  content: none !important;
}

.app-header .eyebrow,
.eyebrow,
.card-kicker {
  color: var(--wood);
}

h1 {
  color: var(--ink);
  font-weight: 750;
}

.header-note,
.list-hint,
.recipe-card-preview {
  color: var(--muted);
}

.header-mark {
  color: var(--brand-dark);
}

.header-mark span {
  border-bottom-color: var(--brand);
}

.header-mark span:first-child {
  color: var(--accent);
}

.status-strip,
.recipe-browser,
.detail-panel,
.info-card,
.map-shell {
  border-color: var(--line);
  background: var(--paper);
}

.status-strip {
  border-top: 0;
  border-right: 0;
  border-left: 0;
}

.status-strip small,
.card-count {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

input,
select,
textarea {
  border-color: var(--line);
  border-radius: 3px;
  background: white;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(132, 223, 214, 0.24);
}

.recipe-card {
  border-radius: 2px;
}

.recipe-card::before {
  background: var(--line);
}

.recipe-card:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: none;
}

.recipe-card.active {
  border-color: var(--brand);
  border-left: 4px solid var(--brand-dark);
  background: var(--brand-soft);
  color: var(--ink);
  box-shadow: none;
}

.recipe-card.active::before {
  background: var(--accent);
}

.recipe-card.active .recipe-card-type,
.recipe-card.active .recipe-card-meta,
.recipe-card.active .recipe-card-preview {
  color: var(--brand-dark);
}

.detail-panel {
  padding: 14px;
}

.back-button {
  border-color: var(--line);
  border-radius: 3px;
  background: white;
  color: var(--brand-dark);
}

.empty-detail {
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-strong);
}

.detail-hero {
  border: 1px solid var(--line);
  border-left: 6px solid var(--brand);
  border-radius: 3px;
  background: #f8fcfb;
  color: var(--ink);
}

.detail-hero .eyebrow,
.detail-focus {
  color: var(--brand-dark);
}

.detail-focus {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.detail-hero > p:not(.eyebrow) {
  color: var(--muted);
}

.source-link {
  border-color: var(--accent);
  color: var(--wood);
}

.meta-grid div {
  border-color: var(--line);
  border-radius: 3px;
  background: white;
}

.meta-grid strong {
  color: var(--brand-dark);
}

.focus-strip {
  border-color: #f0d2c0;
  border-radius: 3px;
  background: #fff4ec;
}

.focus-icon {
  border-radius: 3px;
  background: var(--accent);
  color: var(--ink);
}

.focus-strip div > span {
  color: var(--wood);
}

.sequence-view {
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
}

.sequence-toolbar .card-kicker,
.sequence-progress {
  color: var(--brand-dark);
}

.sequence-recipe-name {
  color: var(--muted);
}

.sequence-progress {
  border-color: var(--brand);
  border-radius: 3px;
  background: var(--brand-soft);
}

.sequence-stage-number {
  color: var(--brand-dark);
  text-shadow: none;
}

.sequence-stage.is-empty {
  grid-template-columns: 1fr;
}

.sequence-stage.is-empty .sequence-stage-number {
  display: none;
}

.sequence-label,
.sequence-meta span {
  color: var(--wood);
}

.sequence-stage h3 {
  color: var(--ink);
}

.sequence-ingredients span {
  border-color: var(--brand);
  border-radius: 3px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.sequence-ingredients .sequence-ingredient-empty {
  border-color: var(--line);
  background: #f8f5f2;
  color: var(--muted);
}

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

.sequence-footer {
  border-top-color: var(--line);
}

.sequence-dot {
  border-radius: 2px;
  background: var(--line);
}

.sequence-dot.active {
  background: var(--brand-dark);
}

.sequence-nav-button,
.sequence-next-button {
  border-color: var(--brand);
  border-radius: 3px;
  background: white;
  color: var(--brand-dark);
}

.sequence-next-button {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: white;
}

.ingredient-card {
  border-color: var(--brand);
  background: #f8fdfb;
}

.ingredient-item {
  border-color: var(--line);
  border-radius: 3px;
  background: white;
}

.ingredient-index {
  border-radius: 3px;
  background: var(--sky);
  color: var(--brand-dark);
}

.ingredient-group,
.ingredient-amount,
.step-copy strong {
  color: var(--brand-dark);
}

.step-item:hover,
.step-item:focus-visible {
  background: var(--brand-soft);
}

.step-number {
  border-color: var(--accent);
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--brand-dark);
}

.step-ingredient-preview {
  color: var(--wood);
}

.fab {
  border-radius: 3px;
  background: var(--brand-dark);
  color: white;
  box-shadow: none;
}

.bottom-nav {
  border-top-color: var(--wood);
  background: var(--bg);
  box-shadow: none;
}

.bottom-nav button {
  color: rgba(255, 253, 249, 0.72);
}

.bottom-nav button.active {
  background: var(--brand);
  color: var(--ink);
}

.map-toolbar {
  border-color: var(--wood);
  border-radius: 3px;
  background: var(--bg);
  box-shadow: none;
}

.map-toolbar h2 {
  color: white;
}

.map-toolbar .eyebrow {
  color: var(--brand);
}

.map-toolbar button {
  border-color: var(--brand);
  border-radius: 3px;
  background: var(--brand);
  color: var(--ink);
}

.recipe-form {
  background: var(--paper);
}

.form-actions button[type="submit"] {
  border-color: var(--brand-dark);
  border-radius: 3px;
  background: var(--brand-dark);
  color: white;
}

/* Final palette lock: Romantic Mint, Dark Chocolate and Banana only. */
:root {
  --bg: #24130f;
  --paper: #ffffff;
  --paper-strong: #f0fbf9;
  --ink: #24130f;
  --muted: rgba(36, 19, 15, 0.62);
  --line: rgba(36, 19, 15, 0.16);
  --brand: #84dfd6;
  --brand-dark: #24130f;
  --brand-soft: #e5f8f5;
  --accent: #e1e062;
  --accent-soft: #faf9dc;
  --warm: #24130f;
  --wood: #24130f;
  --sky: #84dfd6;
  --pink: #e1e062;
  --shadow: none;
  --shadow-small: none;
}

html,
body {
  background: var(--bg);
}

.app-header,
.detail-hero,
.sequence-view,
.empty-detail,
.recipe-card.active {
  background-image: none !important;
}

.app-header {
  border: 0;
  border-bottom: 6px solid var(--brand);
  border-radius: 0;
  background: var(--paper) !important;
  box-shadow: none;
}

.app-header::before,
.app-header::after,
.detail-hero::after,
.sequence-view::before,
.sequence-view::after {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  content: none !important;
}

.header-mark {
  display: none;
}

.app-header .eyebrow,
.eyebrow,
.card-kicker,
.sequence-label,
.sequence-meta span,
.step-ingredient-preview,
.ingredient-group,
.source-link {
  color: var(--ink);
}

.header-mark span,
.header-mark span:first-child {
  border-color: var(--accent);
  color: var(--accent);
}

.header-note,
.recipe-card-preview,
.sequence-recipe-name,
.sequence-instruction,
.detail-hero > p:not(.eyebrow),
.focus-strip div > span {
  color: var(--muted);
}

.status-strip,
.recipe-browser,
.detail-panel,
.info-card,
.map-shell,
.empty-detail,
.detail-hero,
.sequence-view,
.meta-grid div,
.ingredient-item,
.recipe-form {
  border-color: var(--line);
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
}

.status-strip {
  border-right: 0;
  border-left: 0;
  border-bottom: 1px solid var(--line);
}

.status-strip small,
.card-count,
.detail-focus,
.sequence-progress {
  border-color: var(--brand);
  border-radius: 0;
  background: var(--brand-soft);
  color: var(--ink);
}

.recipe-card,
.recipe-card:hover,
.recipe-card.active {
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

.recipe-card:hover,
.recipe-card.active {
  border-color: var(--brand);
  border-left: 4px solid var(--accent);
  background: var(--brand-soft);
  color: var(--ink);
}

.recipe-card::before,
.recipe-card.active::before {
  background: var(--brand);
}

.recipe-card.active .recipe-card-type,
.recipe-card.active .recipe-card-meta,
.recipe-card.active .recipe-card-preview {
  color: var(--ink);
}

.detail-hero {
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  color: var(--ink);
}

.detail-hero .eyebrow,
.detail-focus,
.meta-grid strong,
.sequence-progress,
.sequence-toolbar .card-kicker,
.sequence-stage-number,
.sequence-stage h3,
.ingredient-amount,
.step-copy strong,
.map-toolbar .eyebrow {
  color: var(--ink);
}

.focus-strip {
  border-color: var(--accent);
  border-radius: 0;
  background: var(--accent-soft);
}

.focus-icon {
  border-radius: 0;
  background: var(--brand);
  color: var(--ink);
}

.sequence-view {
  border: 1px solid var(--line);
  border-left: 6px solid var(--brand);
  background: var(--paper) !important;
  color: var(--ink);
}

.sequence-stage-number {
  text-shadow: none;
}

.sequence-ingredients span {
  border-color: var(--brand);
  border-radius: 0;
  background: var(--brand-soft);
  color: var(--ink);
}

.sequence-ingredients .sequence-ingredient-empty {
  border-color: var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--muted);
}

.sequence-footer {
  border-top-color: var(--line);
}

.sequence-dot {
  border-radius: 0;
  background: var(--line);
}

.sequence-dot.active {
  background: var(--accent);
}

.sequence-nav-button,
.sequence-next-button {
  border-color: var(--brand);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}

.sequence-next-button {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--accent);
}

.ingredient-card {
  border-color: var(--brand);
  background: var(--paper-strong);
}

.ingredient-index,
.step-number {
  border-color: var(--brand);
  border-radius: 0;
  background: var(--brand-soft);
  color: var(--ink);
}

.step-item:hover,
.step-item:focus-visible {
  background: var(--brand-soft);
}

.fab {
  border-radius: 0;
  background: var(--ink);
  color: var(--accent);
  box-shadow: none;
}

.bottom-nav {
  border-top-color: var(--brand);
  background: var(--ink);
  box-shadow: none;
}

.bottom-nav button {
  color: rgba(255, 255, 255, 0.76);
}

.bottom-nav button.active {
  background: var(--brand);
  color: var(--ink);
}

.map-toolbar {
  border-color: var(--brand);
  border-radius: 0;
  background: var(--ink);
  box-shadow: none;
}

.map-toolbar h2 {
  color: white;
}

.map-toolbar button {
  border-color: var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: var(--ink);
}

.form-actions button[type="submit"] {
  border-color: var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--accent);
}

/* Main library: loose memo-note collage instead of a rigid list. */
@media (min-width: 761px) {
  .recipe-stage {
    grid-template-columns: 360px minmax(0, 1fr);
  }

  .recipe-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
    padding: 14px;
  }
}

.recipe-list {
  align-items: start;
}

.recipe-card,
.recipe-card:hover,
.recipe-card.active {
  width: 100%;
  min-width: 0;
  height: 154px;
  min-height: 154px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  border: 1px solid rgba(36, 19, 15, 0.18);
  border-top: 5px solid var(--brand);
  border-radius: 2px;
  background: var(--paper);
  box-shadow: 4px 6px 0 rgba(36, 19, 15, 0.08);
  padding: 13px 13px 12px;
  transform: rotate(-1.2deg);
  transform-origin: center bottom;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.recipe-card:nth-child(even) {
  border-top-color: var(--accent);
  transform: rotate(1.25deg);
}

.recipe-card:nth-child(3n) {
  border-top-color: var(--ink);
  transform: rotate(-0.45deg);
}

.recipe-card::before {
  display: none;
  content: none;
}

.recipe-card:hover {
  background: var(--brand-soft);
  box-shadow: 5px 8px 0 rgba(36, 19, 15, 0.1);
  transform: translateY(-3px) rotate(-1.2deg);
}

.recipe-card:nth-child(even):hover {
  transform: translateY(-3px) rotate(1.25deg);
}

.recipe-card:nth-child(3n):hover {
  transform: translateY(-3px) rotate(-0.45deg);
}

.recipe-card.active,
.recipe-card.active:hover {
  border-color: rgba(36, 19, 15, 0.2);
  border-top-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  box-shadow: 5px 8px 0 rgba(36, 19, 15, 0.13);
  transform: rotate(-1.2deg);
}

.recipe-card:nth-child(even).active,
.recipe-card:nth-child(even).active:hover {
  transform: rotate(1.25deg);
}

.recipe-card strong {
  display: -webkit-box;
  min-height: 2.35em;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recipe-card-preview {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recipe-card-meta {
  margin-top: auto;
}

.recipe-card.active .recipe-card-type,
.recipe-card.active .recipe-card-meta,
.recipe-card.active .recipe-card-preview {
  color: var(--ink);
}

@media (max-width: 760px) {
  .recipe-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
    gap: 14px 10px;
    padding: 14px;
  }

  .recipe-card,
  .recipe-card:hover,
  .recipe-card.active {
    width: 100%;
    flex: initial;
  }
}

/* First view is the ingredient check; the sequence view starts only after the CTA. */
body:not(.sequence-mode) .sequence-view,
body:not(.sequence-mode) .step-card {
  display: none;
}

body:not(.sequence-mode) .detail-sections {
  grid-template-columns: 1fr;
}

body.sequence-mode .start-cooking-button {
  display: none;
}

.start-cooking-button {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--ink);
  border-left: 7px solid var(--accent);
  border-radius: 0;
  background: var(--brand);
  color: var(--ink);
  padding: 0 18px;
  text-align: left;
  transition: background 160ms ease, transform 160ms ease;
}

.start-cooking-button:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.start-cooking-button span {
  font-size: 1rem;
  font-weight: 900;
}

.start-cooking-button strong {
  font-size: 1.25rem;
  line-height: 1;
}

.start-cooking-button {
  min-height: 82px;
  border: 1px solid var(--ink);
  border-top: 6px solid var(--accent);
  border-left: 0;
  background: var(--ink);
  color: white;
  box-shadow: 5px 6px 0 rgba(36, 19, 15, 0.12);
  padding: 12px 14px 12px 17px;
}

.start-cooking-button:hover {
  background: var(--ink);
  box-shadow: 7px 8px 0 rgba(36, 19, 15, 0.16);
  transform: translate(-2px, -2px);
}

.start-cooking-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  text-align: left;
}

.start-cooking-copy small {
  color: var(--brand);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.start-cooking-copy strong {
  color: white;
  font-size: 1.08rem;
  font-weight: 900;
}

.start-cooking-copy em {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-cooking-arrow {
  display: grid;
  width: 55px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--ink);
  font-size: 1.35rem !important;
  font-weight: 900;
  line-height: 1;
}

.start-cooking-button:disabled {
  box-shadow: none;
  opacity: 0.5;
}

@media (max-width: 760px) {
  .start-cooking-button {
    min-height: 86px;
    padding-right: 11px;
    padding-left: 14px;
  }

  .start-cooking-copy em {
    max-width: 220px;
  }
}

/* Softer UI surfaces: the recipe notes keep their paper-cut edges. */
.app-header {
  border-radius: 22px;
}

.status-strip {
  border-radius: 16px;
}

.recipe-browser,
.detail-panel,
.info-card,
.map-shell,
.recipe-form,
.empty-detail,
.detail-hero,
.sequence-view {
  border-radius: 20px;
}

.meta-grid div,
.ingredient-item,
.focus-strip,
.detail-focus,
.source-link,
.back-button,
.map-toolbar,
.map-search,
.place-type-select,
.map-toolbar button,
.form-actions button,
.icon-button,
.sequence-nav-button,
.sequence-next-button {
  border-radius: 12px;
}

input,
select,
textarea {
  border-radius: 12px;
}

.start-cooking-button {
  border-radius: 16px;
}

.start-cooking-arrow {
  border-radius: 10px;
}

.sequence-progress,
.card-count,
.status-strip small,
.fab {
  border-radius: 999px;
}

.bottom-nav {
  border-radius: 18px 18px 0 0;
}

.bottom-nav button {
  border-radius: 14px;
}

/* Keep the note collage visibly paper-like and intentionally angular. */
.recipe-card,
.recipe-card:hover,
.recipe-card.active,
.recipe-card.active:hover,
.recipe-card:nth-child(even),
.recipe-card:nth-child(even):hover,
.recipe-card:nth-child(even).active,
.recipe-card:nth-child(even).active:hover,
.recipe-card:nth-child(3n),
.recipe-card:nth-child(3n):hover {
  border-radius: 2px;
}
