:root {
  --cream: #F6F1E6;
  --card: #FFFDF8;
  --sand: #EDE5D3;
  --line: #E3D9C3;
  --line-2: #D8CEB8;
  --ink: #16181A;
  --ink-2: #3E3E3A;
  --muted: #5A564C;
  --emerald: #0F4C3A;
  --emerald-2: #0B3A2C;
  --mint: #DCEBE4;
  --gold: #C9A24A;
  --gold-2: #E2C47A;
  --gold-ink: #8A6A1F;
  --danger: #A33A2A;
  --radius: 16px;
  --display: 'Cormorant Garamond', Georgia, serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--cream); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--emerald); }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.logo { width: 40px; height: 40px; stroke: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Layout ---------- */
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--cream); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.screen { flex: 1; padding: 8px 18px 24px; display: flex; flex-direction: column; gap: 18px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 18px 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name b { font-size: 17px; font-weight: 800; }
.brand-name small { font-size: 10px; font-weight: 800; letter-spacing: 3px; color: var(--muted); }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; }
.row.wrap-row { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

h1, h2, h3 { margin: 0; }
h1.display { font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1.05; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.lede { margin: 0; color: var(--muted); }
.small { font-size: 13px; }
.muted { color: var(--muted); }

/* ---------- Pieces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.dark { background: var(--ink); color: var(--cream); border-color: var(--gold); }
.card.green { background: var(--emerald); color: var(--cream); border: none; }
.card.sand { background: var(--sand); border: none; }
.note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); background: var(--sand); border-radius: 12px; padding: 12px; margin: 0; }
.note svg { color: var(--emerald); margin-top: 1px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none; text-align: center; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--emerald); color: var(--cream); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost-light { background: transparent; border-color: var(--gold-2); color: var(--cream); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn-link { background: none; border: none; color: var(--emerald); font-weight: 800; padding: 0 4px; min-height: 44px; cursor: pointer; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); text-decoration: none; }

.chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.chip-ok { background: var(--mint); color: var(--emerald); }
.chip-warn { background: #F6E3B4; color: #6B4D0F; }
.chip-info { background: #DCE7F3; color: #1F4467; }
.chip-done { background: var(--emerald); color: var(--cream); }
.chip-muted { background: var(--sand); color: var(--muted); }
.chip-gold { background: var(--gold); color: var(--ink); }

.pill { min-height: 44px; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: transparent; font-weight: 700; font-size: 14px; cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--emerald); border-color: var(--emerald); color: var(--cream); }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); padding: 10px 14px; font-size: 16px; font-weight: 500; color: var(--ink); }
textarea.input { resize: vertical; min-height: 72px; }
.input:focus { border-color: var(--emerald); outline: none; box-shadow: 0 0 0 3px rgba(15, 76, 58, .18); }
.hint { font-size: 13px; color: var(--muted); font-weight: 500; }
.error-text { color: var(--danger); font-size: 14px; font-weight: 700; margin: 0; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.steps span { height: 4px; border-radius: 4px; background: var(--line-2); }
.steps span.on { background: var(--emerald); }

/* Home packages */
.pkg-tile { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; color: inherit; text-decoration: none; min-height: 84px; }
.pkg-tile b { font-size: 15px; }
.pkg-tile span { font-size: 13px; color: var(--muted); }
.pkg-tile.feature { background: var(--ink); color: var(--cream); border: 1.5px solid var(--gold); }
.pkg-tile.feature b { color: var(--gold-2); }
.pkg-tile.feature span { color: #D3CEC2; }

/* Package cards */
.pkg-card { width: 100%; text-align: left; cursor: pointer; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.pkg-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pkg-card .name { font-weight: 800; font-size: 17px; }
.pkg-card .price { font-weight: 800; font-size: 16px; white-space: nowrap; }
.pkg-card .desc { font-size: 14px; color: var(--muted); }
.pkg-card .dur { font-size: 12px; font-weight: 800; color: var(--emerald); }
.pkg-card[aria-pressed="true"] { background: var(--ink); color: var(--cream); border: 2px solid var(--gold); }
.pkg-card[aria-pressed="true"] .name, .pkg-card[aria-pressed="true"] .dur { color: var(--gold-2); }
.pkg-card[aria-pressed="true"] .desc { color: #D3CEC2; }

.addon { width: 100%; min-height: 50px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 15px; }
.addon[aria-pressed="true"] { border: 1.5px solid var(--emerald); background: var(--mint); }
.addon.included { background: var(--sand); border-color: transparent; cursor: default; }

/* Days and slots */
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.day { flex: none; width: 58px; min-height: 66px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; }
.day small { font-size: 11px; font-weight: 800; color: var(--muted); }
.day b { font-size: 20px; }
.day em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); }
.day[aria-pressed="true"] { background: var(--emerald); border-color: var(--emerald); color: var(--cream); }
.day[aria-pressed="true"] small, .day[aria-pressed="true"] em { color: var(--gold-2); }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slot { min-height: 50px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 800; font-size: 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.slot small { font-size: 10px; font-weight: 700; }
.slot[aria-pressed="true"] { border: 1.5px solid var(--emerald); background: var(--mint); color: var(--emerald); }
.slot:disabled { cursor: not-allowed; border-style: dashed; background: transparent; color: #7A766C; font-weight: 600; }
.slot.taken:disabled span { text-decoration: line-through; }

/* Location */
.search-box { position: relative; }
.search-box svg { position: absolute; left: 14px; top: 14px; color: var(--muted); pointer-events: none; }
.search-box .input { padding-left: 42px; border: 1.5px solid var(--emerald); }
.sugg { list-style: none; margin: 6px 0 0; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.sugg button { width: 100%; min-height: 48px; text-align: left; background: none; border: none; border-radius: 8px; padding: 8px 10px; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.sugg button:hover, .sugg button:focus-visible { background: var(--sand); }
.sugg b { display: block; font-size: 14px; }
.sugg span { display: block; font-size: 12px; color: var(--muted); }
.sugg svg { color: var(--emerald); margin-top: 2px; }
.map { height: 220px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #E4EDE7; position: relative; z-index: 0; }
.map-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; font-size: 14px; color: var(--muted); }
.place-chip { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.place-chip svg { color: var(--emerald); margin-top: 2px; }

/* Sticky footer */
.footbar { position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 5; }
.footbar .total small { display: block; font-size: 12px; font-weight: 800; color: var(--muted); }
.footbar .total b { font-size: 20px; }

/* Summary */
.sum-row { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.sum-row svg { color: var(--gold-2); margin-top: 2px; }
.divider { border: none; border-top: 1px solid rgba(255, 255, 255, .15); margin: 4px 0; }

/* Confirmation */
.done-hero { background: var(--emerald); color: var(--cream); border-radius: 22px; padding: 26px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.done-hero .tick { width: 72px; height: 72px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.done-hero .tick svg { width: 36px; height: 36px; stroke-width: 2.6; }
.ref { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: 1px; }

/* Staff */
.staff-top { background: var(--ink); color: var(--cream); padding: 22px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.staff-top .eyebrow { color: var(--gold-2); }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: #24272A; border-radius: 12px; padding: 10px 12px; }
.stat small { display: block; font-size: 11px; font-weight: 800; color: #B8B4A8; }
.stat b { font-size: 19px; }
.job-card { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: inherit; cursor: pointer; text-align: left; width: 100%; }
.job-card.next { border: 2px solid var(--emerald); }
.job-card .t { font-size: 19px; font-weight: 800; }
.buffer { border: 1.5px dashed #B9AE96; border-radius: 14px; padding: 10px 14px; font-size: 14px; color: var(--ink-2); display: flex; gap: 10px; align-items: center; }
.check { width: 100%; min-height: 50px; display: flex; gap: 12px; align-items: center; background: none; border: none; border-bottom: 1px solid #EFE8D8; padding: 8px 4px; text-align: left; cursor: pointer; font-size: 15px; }
.check .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #A8A08C; display: flex; align-items: center; justify-content: center; flex: none; }
.check .box svg { width: 14px; height: 14px; stroke-width: 3; color: var(--cream); visibility: hidden; }
.check[aria-checked="true"] .box { background: var(--emerald); border-color: var(--emerald); }
.check[aria-checked="true"] .box svg { visibility: visible; }
.check[aria-checked="true"] span:last-child { color: #6B6A64; text-decoration: line-through; }
.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--emerald); }
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: #E8DFCB; border-radius: 999px; padding: 4px; }
.tabs button { min-height: 44px; border-radius: 999px; border: none; background: transparent; font-weight: 800; cursor: pointer; color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--cream); }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shot { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--ink); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot .lbl { position: absolute; left: 8px; bottom: 8px; background: var(--emerald); color: var(--cream); border: 1px solid var(--gold); font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 999px; }
.shot-add { aspect-ratio: 3 / 4; border-radius: 14px; border: 2px dashed #B9AE96; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-weight: 800; color: var(--ink-2); text-align: center; padding: 8px; }
.shot-add svg { width: 30px; height: 30px; color: var(--emerald); }
.shot-add input { display: none; }

/* Admin */
.admin-top { background: var(--ink); color: var(--cream); }
.admin-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-tabs button { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid #3A3B38; background: transparent; color: var(--cream); font-weight: 700; cursor: pointer; }
.admin-tabs button[aria-selected="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.admin-main { padding: 20px 0 40px; display: flex; flex-direction: column; gap: 16px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.toolbar label.field { min-width: 150px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.kpi small { display: block; font-size: 12px; font-weight: 800; color: var(--muted); }
.kpi b { font-size: 22px; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 860px; }
.table th { text-align: left; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: #FBF8F0; }
.table td { padding: 10px 12px; border-bottom: 1px solid #EFE8D8; vertical-align: top; }
.table tr.day-row td { background: var(--sand); font-weight: 800; }
.table select.input { min-height: 38px; padding: 6px 8px; font-size: 14px; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }

/* Toast, dialog, banner */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--cream); padding: 12px 18px; border-radius: 12px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.error { background: var(--danger); }
.dialog { border: none; border-radius: 18px; padding: 20px; max-width: 360px; width: calc(100% - 32px); background: var(--card); color: var(--ink); }
.dialog::backdrop { background: rgba(22, 24, 26, .55); }
.dialog p { margin: 0 0 16px; font-size: 16px; }
.dialog .row { justify-content: flex-end; flex-wrap: wrap; }
.demo-banner { background: #F6E3B4; color: #4A3A10; font-size: 13px; font-weight: 600; padding: 8px 14px; text-align: center; }
.demo-banner code { font-size: 12px; }
.loading { padding: 40px 18px; text-align: center; color: var(--muted); }
.empty { padding: 24px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line-2); border-radius: var(--radius); }

@media (min-width: 700px) {
  h1.display { font-size: 40px; }
}
