/* Measure Twice — warm suite look (ivory / ink / amber) with a
   workwear-orange DIY accent. Phone-first, big touch targets. */
:root {
  --accent: #ea580c;
  --accent-dark: #c2410c;
  --bg: #FAF6EF;
  --card: #FFFDF8;
  --ink: #26313D;
  --muted: #7A7263;
  --line: #E9E2D0;
  --amber: #F59E0B;
  --amber-soft: #FFF3D6;
  --red: #b91c1c;
  --green: #166534;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 18px; line-height: 1.45;
}
h1, h2, h3 { font-family: "Baloo 2", system-ui, sans-serif; }
.hidden { display: none !important; }
.screen { max-width: 560px; margin: 0 auto; padding: 16px 16px 60px; }
header h1 { margin: 8px 0 0; font-size: 30px; }
.hdr-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-link {
  flex: none; display: inline-flex; align-items: center; min-height: 44px;
  font-size: 14px; font-weight: 700; color: var(--accent-dark); text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
}
header .muted, .muted { color: var(--muted); margin: 2px 0 12px; }
.muted-sm { color: var(--muted); font-size: 14px; font-weight: 400; }
.center { text-align: center; }
h2 { font-size: 21px; margin: 24px 0 10px; }
h3 { font-size: 18px; margin: 8px 0 8px; }
a { color: var(--accent-dark); font-weight: 600; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; margin: 10px 0; box-shadow: 0 2px 8px rgba(38,49,61,.05);
}
.note { background: var(--amber-soft); border: 1px solid #F5D98B; border-radius: 10px;
  padding: 12px; margin: 10px 0; font-size: 16px; }

label { display: block; margin: 10px 0; font-weight: 600; font-size: 16px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
label.check input { width: 26px; height: 26px; min-height: 26px; margin: 0; flex: none; }
input, select {
  display: block; width: 100%; font-size: 18px; padding: 14px; margin-top: 6px;
  border: 1px solid #D8CFB8; border-radius: 12px; background: #fff; min-height: 52px;
  color: var(--ink);
}
input.drafted { border: 2px dashed var(--amber); background: #FFFBEB; }
.draft-tag { font-size: 12px; font-weight: 700; color: #92400e; background: var(--amber-soft);
  border: 1px solid #F5D98B; border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
button {
  font-size: 18px; border-radius: 999px; border: 1px solid var(--line);
  padding: 14px 18px; min-height: 52px; background: #fff; cursor: pointer;
  font-weight: 600; color: var(--ink);
}
button.primary { background: var(--accent); color: #fff; border: none; }
button.primary:active { background: var(--accent-dark); }
button.primary:disabled { opacity: .55; cursor: wait; }
button.secondary { background: #fff; width: 100%; margin-top: 10px; }
button.secondary-inline { background: #fff; }
button.big { width: 100%; margin-top: 12px; }
button.danger { color: var(--red); border-color: #fca5a5; }
button.small { min-height: 44px; padding: 8px 14px; font-size: 16px; }
a.primary {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--accent); color: #fff; border-radius: 999px; text-decoration: none;
  padding: 14px 18px; min-height: 52px; font-size: 18px; font-weight: 600;
}
a.primary.big { width: 100%; margin-top: 12px; }
.row { display: flex; gap: 10px; margin-top: 10px; }
.row button { flex: 1; }

.error { background: #fef2f2; color: var(--red); border: 1px solid #fca5a5;
  border-radius: 10px; padding: 12px; margin: 10px 0; font-size: 16px; }
.ok { background: #f0fdf4; color: var(--green); border: 1px solid #bbf7d0;
  border-radius: 10px; padding: 12px; margin: 10px 0; font-size: 16px; }

.demo-banner {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  background: var(--amber-soft); border: 1px solid #F5D98B; border-radius: 14px;
  padding: 10px 12px; font-size: 15px; margin-bottom: 6px; flex-wrap: wrap;
}
.demo-banner .btn-accent {
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
  border-radius: 999px; padding: 10px 14px; white-space: nowrap; min-height: 44px;
  display: inline-flex; align-items: center;
}
.demo-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* project picker */
.picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick {
  text-align: left; border: 2px solid var(--line); background: var(--card);
  border-radius: 16px; padding: 14px; min-height: 0; display: flex; flex-direction: column; gap: 2px;
}
.pick.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(234,88,12,.15); }
.pick-emoji { font-size: 26px; }
.pick-name { font-weight: 700; font-size: 17px; }
.pick-blurb { font-size: 13px; color: var(--muted); font-weight: 400; }

/* photo measuring */
.photo-card { border: 2px dashed #E7C48A; background: #FFFBEF; }
.upload-label { display: block; margin-top: 10px; font-weight: 600; color: var(--accent-dark);
  border: 2px dashed #F0B27A; border-radius: 12px; padding: 14px; text-align: center; cursor: pointer; }
#photo-preview img { width: 100%; border-radius: 12px; margin-top: 10px; }
.seg { display: flex; gap: 8px; margin: 12px 0 4px; }
.segbtn { flex: 1; font-size: 16px; min-height: 48px; }
.segbtn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.draft-banner {
  display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--amber-soft); border: 2px solid var(--amber); border-radius: 12px;
  padding: 12px; margin: 6px 0 10px; font-size: 15px;
}

/* results */
.qty-row { display: flex; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qty-row:last-of-type { border-bottom: none; }
.qty-row .qty { font-size: 26px; font-weight: 800; min-width: 108px; color: var(--accent-dark); }
.qty-row .qty small { font-size: 15px; font-weight: 600; color: var(--muted); }
.qty-row.alt .qty { font-size: 20px; color: var(--muted); }
.qty-label { font-weight: 600; }
.df-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.df-row:last-child { border-bottom: none; }
.tip { font-size: 16px; background: var(--amber-soft); border: 1px solid #F5D98B;
  border-radius: 12px; padding: 12px; margin-top: 12px; }

/* cut list */
.unlock-card { border: 2px solid #F5D98B; background: var(--amber-soft); }
.price-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.price-row .pr-label { flex: 1; font-weight: 600; }
.price-row .pr-each { display: flex; align-items: center; font-weight: 700; }
.price-row .price-input { width: 96px; margin: 0 0 0 2px; text-align: right; min-height: 44px; padding: 8px; }
.price-row .pr-total { min-width: 84px; text-align: right; font-weight: 800; }
.price-row.alt { color: var(--muted); }
.total-row { display: flex; justify-content: space-between; align-items: baseline;
  font-size: 20px; padding: 12px 0 4px; }

/* saved projects */
.proj-row { display: flex; gap: 12px; align-items: center; }
.proj-cover { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: none; }
.proj-cover-emoji { font-size: 34px; width: 56px; text-align: center; flex: none; }
.proj-main { flex: 1; }

/* print: only the cut list */
.print-only { display: none; }
@media print {
  body { background: #fff; font-size: 13px; }
  #app, footer { display: none !important; }
  .print-only { display: block; padding: 12px; color: #000; }
  .print-only h1 { font-size: 20px; margin: 0 0 4px; }
  .print-only h2 { font-size: 15px; margin: 14px 0 4px; }
  .print-only table { width: 100%; border-collapse: collapse; margin-top: 8px; }
  .print-only th, .print-only td { border-bottom: 1px solid #ccc; padding: 5px 6px; text-align: left; }
  .print-only th:nth-child(2), .print-only td:nth-child(2),
  .print-only th:nth-child(3), .print-only td:nth-child(3),
  .print-only th:nth-child(4), .print-only td:nth-child(4) { text-align: right; }
}
