/* Our Recipes — styles lifted directly from the Claude Design handoff
   (Recipe App.dc.html). Same palette, type, spacing, and touch targets. */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #efe7d9;
  color: #3b2e24;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: #c96f3b; }
a:hover { color: #a85728; }
button { font-family: inherit; }
button:disabled { opacity: .35; cursor: default; }
input, textarea { font-family: inherit; box-sizing: border-box; }

@keyframes screenin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.phone {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: #faf6f0;
  box-shadow: 0 0 40px rgba(60,40,20,.10);
  position: relative;
}
.screen { animation: screenin .25s ease; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

.serif { font-family: 'Lora', serif; font-weight: 600; }

/* ── Home ── */
.home-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 28px 20px 6px; }
.home-head h1 { margin: 0; font-family: 'Lora', serif; font-weight: 600; font-size: 32px; line-height: 1.1; }
.home-sub { margin: 6px 0 0; font-size: 17px; color: #8a7a6c; }
.btn-share {
  min-height: 48px; padding: 10px 18px; border-radius: 999px;
  border: 1.5px solid #e2d5c2; background: #fff; color: #3b2e24;
  font-size: 17px; font-weight: 600; cursor: pointer; flex: none;
}
.btn-share:hover { background: #f6efe3; }

.cards { display: flex; flex-direction: column; gap: 18px; padding: 18px 20px 8px; }
.card { background: #fff; border: 1px solid #eee3d2; border-radius: 18px; overflow: hidden; box-shadow: 0 1px 3px rgba(60,40,20,.05); }
.card-photo { height: 180px; background: rgba(0,0,0,.04); position: relative; display: block; width: 100%; border: none; padding: 0; cursor: pointer; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  color: rgba(59,46,36,.55); font-size: 13px; font-weight: 500;
  border: 1.5px dashed rgba(59,46,36,.25); border-radius: 0;
}
.photo-empty svg { opacity: .45; }
.card-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 16px 18px; border: none; background: transparent;
  cursor: pointer; text-align: left;
}
.card-row:hover { background: #fdf9f2; }
.card-name { font-family: 'Lora', serif; font-weight: 600; font-size: 22px; color: #3b2e24; display: block; }
.card-meta { font-size: 16px; color: #8a7a6c; display: block; margin-top: 5px; }
.chev { font-size: 26px; color: #c9b89e; flex: none; }

.empty-note { padding: 40px 20px; text-align: center; color: #8a7a6c; font-size: 18px; line-height: 1.5; }

/* ── Sticky bottom CTA ── */
.cta-bar {
  position: sticky; bottom: 0; margin-top: auto; display: flex; gap: 12px;
  padding: 16px 20px 22px;
  background: linear-gradient(to top, #faf6f0 65%, rgba(250,246,240,0));
}
.btn-primary {
  flex: 1; min-height: 60px; border: none; border-radius: 999px;
  background: #c96f3b; color: #fff; font-size: 20px; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 14px rgba(201,111,59,.35);
}
.btn-primary:hover:not(:disabled) { background: #b8622f; }
.btn-back {
  flex: none; min-width: 110px; min-height: 60px;
  border: 1.5px solid #e2d5c2; border-radius: 999px; background: #fff;
  color: #3b2e24; font-size: 19px; font-weight: 600; cursor: pointer;
}
.btn-back:hover { background: #f6efe3; }

/* ── Detail ── */
.nav-row { padding: 14px 20px 10px; }
.btn-nav {
  min-height: 48px; padding: 10px 16px 10px 10px; border: none; border-radius: 999px;
  background: transparent; color: #a85728; font-size: 18px; font-weight: 600; cursor: pointer;
}
.btn-nav:hover { background: #f6efe3; }
.detail-photo { height: 230px; margin: 0 20px; border-radius: 18px; overflow: hidden; position: relative; background: rgba(0,0,0,.04); border: none; padding: 0; cursor: pointer; display: block; width: calc(100% - 40px); }
.detail-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-photo .photo-empty { border-radius: 18px; }
.detail-head { padding: 20px 20px 0; display: flex; flex-direction: column; gap: 8px; }
.detail-head h1 { margin: 0; font-family: 'Lora', serif; font-weight: 600; font-size: 30px; line-height: 1.15; }
.pill-addedby {
  align-self: flex-start; padding: 7px 14px; border-radius: 999px;
  background: rgba(122,139,92,.16); color: #4c5a37; font-size: 16px; font-weight: 600;
}
.section { padding: 26px 20px 0; }
.section h2 { margin: 0 0 10px; font-family: 'Lora', serif; font-weight: 600; font-size: 22px; }
.ing-row {
  display: flex; align-items: center; gap: 14px; min-height: 48px;
  border-bottom: 1px solid #f0e7d8; font-size: 19px;
}
.ing-dot { width: 9px; height: 9px; border-radius: 50%; background: #7a8b5c; flex: none; }
.steps { display: flex; flex-direction: column; gap: 18px; margin-top: 14px; }
.step-row { display: flex; gap: 14px; align-items: flex-start; }
.step-n {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(201,111,59,.15); color: #a85728; font-weight: 700; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.step-row p { margin: 2px 0 0; font-size: 19px; line-height: 1.55; }
.btn-delete {
  margin: 30px 20px 0; min-height: 48px; padding: 10px 18px; border-radius: 999px;
  border: 1.5px solid #e8d5cd; background: transparent; color: #b3543a;
  font-size: 16px; font-weight: 600; cursor: pointer; align-self: flex-start;
}
.btn-delete:hover { background: #fbf1ed; }
.detail-pad { padding-bottom: 40px; }

/* ── Add flow ── */
.add-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 4px; }
.step-label { font-size: 16px; font-weight: 700; color: #a85728; letter-spacing: .4px; text-transform: uppercase; }
.btn-cancel {
  min-height: 44px; padding: 8px 14px; border: none; border-radius: 999px;
  background: transparent; color: #8a7a6c; font-size: 17px; cursor: pointer;
}
.btn-cancel:hover { background: #f6efe3; }
.add-body { padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 26px; }
.add-body h1 { margin: 0; font-family: 'Lora', serif; font-weight: 600; font-size: 28px; line-height: 1.2; }
.add-sub { margin: 6px 0 0; font-size: 17px; color: #8a7a6c; }
.field-label { margin: 0; font-size: 18px; font-weight: 600; }
.field-label .opt { font-weight: 400; color: #8a7a6c; }
.input {
  width: 100%; min-height: 60px; padding: 0 18px; font-size: 20px;
  border: 1.5px solid #e2d5c2; border-radius: 14px; background: #fff;
  color: #3b2e24; outline-color: #c96f3b;
}
.photo-drop {
  height: 200px; border-radius: 16px; overflow: hidden; position: relative;
  background: rgba(0,0,0,.04); border: none; padding: 0; cursor: pointer; width: 100%;
}
.photo-drop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-drop .photo-empty { border-radius: 16px; }
.stack-10 { display: flex; flex-direction: column; gap: 10px; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.stack-24 { display: flex; flex-direction: column; gap: 24px; }

.cat-title { margin: 0; font-family: 'Lora', serif; font-weight: 600; font-size: 20px; }
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  min-height: 56px; padding: 10px 12px; border-radius: 12px; font-size: 18px;
  cursor: pointer; text-align: center; border: 1.5px solid #e2d5c2;
  background: #fff; color: #3b2e24; transition: background .15s, border-color .15s;
}
.tile.sel {
  border-color: #c96f3b; background: #c96f3b; color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(201,111,59,.3);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 8px 16px; border-radius: 999px; border: none;
  background: rgba(122,139,92,.16); color: #4c5a37; font-size: 17px;
  font-weight: 600; cursor: pointer;
}
.chip .x { opacity: .6; }
.custom-row { display: flex; gap: 10px; }
.custom-row .input { flex: 1; min-height: 56px; font-size: 18px; padding: 0 16px; }
.btn-add-custom {
  flex: none; min-height: 56px; padding: 0 22px; border: none; border-radius: 14px;
  background: #7a8b5c; color: #fff; font-size: 18px; font-weight: 700; cursor: pointer;
}
.btn-add-custom:hover { background: #6b7c4e; }
.textarea {
  width: 100%; min-height: 170px; padding: 14px 16px; font-size: 18px; line-height: 1.5;
  border: 1.5px solid #e2d5c2; border-radius: 14px; background: #fff;
  resize: vertical; outline-color: #c96f3b; color: #3b2e24;
}

/* ── Share ── */
.share-body { padding: 10px 20px; display: flex; flex-direction: column; gap: 18px; }
.share-body h1 { margin: 0; font-family: 'Lora', serif; font-weight: 600; font-size: 30px; line-height: 1.15; }
.share-body .blurb { margin: 0; font-size: 19px; line-height: 1.55; color: #5c4f43; }
.share-link {
  padding: 18px; border: 1.5px dashed #d8c8ae; border-radius: 14px; background: #fff;
  font-size: 18px; font-weight: 600; color: #a85728; text-align: center;
  overflow-wrap: anywhere;
}
.share-note { margin: 6px 0 0; font-size: 17px; color: #8a7a6c; text-align: center; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: #3b2e24; color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 16px; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 50;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; }

/* ════════════════════ DESKTOP ════════════════════
   Same warm design, scaled up. Mobile (<768px) is untouched. */

/* ── Tablet: 768px+ — widen the frame, cards go 2-up ── */
@media (min-width: 768px) {
  .phone { max-width: 760px; }

  .home-head { padding: 40px 32px 10px; }
  .home-head h1 { font-size: 38px; }

  .cards {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 22px; padding: 22px 32px 8px; align-items: start;
  }
  .empty-note { grid-column: 1 / -1; }

  /* CTA becomes a centered button, not a full-width slab */
  .cta-bar { padding: 18px 32px 26px; justify-content: center; }
  .cta-bar .btn-primary { flex: none; min-width: 340px; padding: 0 40px; }
  .cta-bar .btn-back { min-width: 140px; }

  /* Add flow + share + detail: comfortable reading column, centered */
  .add-head, .nav-row { padding-left: 32px; padding-right: 32px; }
  .add-body, .share-body {
    width: 100%; max-width: 620px; margin: 0 auto;
    padding-left: 32px; padding-right: 32px;
  }
  .detail-photo { max-width: 620px; margin: 0 auto; width: calc(100% - 64px); height: 300px; }
  .detail-head, .section {
    width: 100%; max-width: 620px; margin: 0 auto;
    padding-left: 32px; padding-right: 32px;
  }
  .btn-delete { margin-left: auto; margin-right: auto; align-self: center; }

  /* ingredient tiles: 3-up, hover states matter more than thumb reach */
  .tile-grid { grid-template-columns: repeat(3, 1fr); }
  .tile:hover:not(.sel) { border-color: #c96f3b; background: #fdf6f1; }
}

/* ── Desktop: 1100px+ — full grid, 3-up cards ── */
@media (min-width: 1100px) {
  body { padding: 0 24px; }
  .phone {
    max-width: 1080px;
    min-height: calc(100vh - 56px);
    margin: 28px auto;
    border-radius: 24px;
    box-shadow: 0 8px 60px rgba(60,40,20,.14);
    overflow: hidden;
  }
  .screen { min-height: calc(100vh - 56px); }

  .home-head { padding: 48px 48px 12px; }
  .home-head h1 { font-size: 44px; }
  .home-sub { font-size: 18px; }

  .cards { grid-template-columns: repeat(3, 1fr); gap: 26px; padding: 26px 48px 8px; }
  .card { transition: transform .15s ease, box-shadow .15s ease; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(60,40,20,.12); }
  .card-photo { height: 200px; }
  .card-name { font-size: 20px; }
  .card-meta { font-size: 15px; }

  .add-head, .nav-row { padding-left: 48px; padding-right: 48px; }
  .detail-photo { max-width: 680px; height: 340px; }
  .add-body, .share-body, .detail-head, .section { max-width: 680px; }

  .tile-grid { grid-template-columns: repeat(4, 1fr); }
  .tile { min-height: 52px; font-size: 17px; }

  .toast { bottom: 60px; }
}

/* Fine pointer (mouse): slightly tighter buttons feel right */
@media (pointer: fine) and (min-width: 768px) {
  .btn-primary { font-size: 19px; }
}
