/* Setup assistant (views/install) — look from the owner-approved prototype docs/mockups/installer/setup-assistant.html. */
:root { --ink: #101828; --muted: #475467; --line: #d0d5dd; --bg: #f4f6fb; --panel: #fff; --o1: #c2410c; --o2: #ffb37a; --ok: #177a43; --okbg: #e7f5ec; --bad: #b42318; --badbg: #fdecea; --soft: #fff4ec; --navy: #0f1b2d; }
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.55 "Plus Jakarta Sans", system-ui, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--bg); }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: #c2410c; }

/* The frame: the shop front and the eight steps on the left, the question on the right. */
.frame { display: flex; flex-wrap: wrap; min-height: 100vh; }
aside.side { flex: 1 1 300px; max-width: 380px; background: var(--navy); color: #fff; padding: 30px 24px; display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--o1); display: grid; place-items: center; flex: none; }
.brand b { display: block; font-size: 15px; font-weight: 800; }
.brand small { display: block; font-size: 12.5px; color: #aebbcd; }
.shop { width: 100%; height: auto; display: block; }
.side-line { font-size: 14px; color: #c7d2e1; line-height: 1.5; }
.trail { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.trail li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; font-size: 14.5px; font-weight: 600; color: #aebbcd; }
.trail li i { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #4a5d79; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; }
.trail li.done { color: #e6edf6; }
.trail li.done i { background: #1f9254; border-color: #1f9254; color: #fff; }
.trail li.now { background: #1b2a41; color: #fff; }
.trail li.now i { background: #fff; border-color: #fff; color: var(--navy); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.side-help { margin-top: auto; border: 1px dashed #4a5d79; border-radius: 14px; padding: 14px 16px; font-size: 14px; color: #c7d2e1; line-height: 1.5; }
.side-help a { color: #ffb37a; font-weight: 700; }
main.setup { flex: 999 1 560px; min-width: 0; padding: 40px clamp(16px, 4vw, 56px) 64px; }
.card { max-width: 760px; }
.steps { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; font-weight: 700; }
.steps span { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.bar { flex: 1; height: 8px; border-radius: 99px; background: #dde3ec; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--o1); transition: width .3s; }
h1 { font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 2.65rem); line-height: 1.1; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; margin-top: 28px; }
.lead { color: var(--muted); margin-top: 10px; font-size: 1.08rem; }
.field { margin-top: 22px; }
.field label { display: block; font-weight: 600; margin-bottom: 8px; }
.field small { display: block; color: var(--muted); margin-top: 6px; font-size: .92rem; }
.field.err input, .field.err textarea { border-color: var(--bad); background: #fffafa; }
.field small.why { color: var(--bad); font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=password], input[type=email], input[type=tel], select, textarea {
  width: 100%; padding: 15px 16px; font-size: 1.15rem; border: 2px solid #c9d1e0; border-radius: 14px; background: #fff;
}
textarea { resize: vertical; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1rem; word-break: break-all; }
textarea.sql { margin-top: 12px; font-size: .8rem; max-height: 220px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, .pickbtn:has(input:focus-visible) { outline: 3px solid var(--o2); outline-offset: 2px; border-color: var(--o1); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 26px; border-radius: 14px; border: 2px solid transparent; font-weight: 700; font-size: 1.05rem; cursor: pointer; text-decoration: none; }
.btn.go { background: var(--o1); color: #fff; }
.btn.go:hover { background: #9a3412; }
.btn.plain { background: #fff; border-color: #c9d1e0; color: var(--ink); }
.btn.small { min-height: 46px; padding: 0 18px; font-size: 1rem; border-radius: 12px; }
.btn[disabled], .btn.busy { opacity: .65; cursor: progress; }
.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; align-items: center; }

.picks { display: grid; gap: 12px; margin-top: 22px; }
.picks.three { grid-template-columns: repeat(3, 1fr); }
.pickbtn { position: relative; display: block; text-align: left; padding: 18px 20px; border-radius: 16px; border: 2px solid #c9d1e0; background: #fff; cursor: pointer; }
.pickbtn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pickbtn b { display: block; font-size: 1.12rem; }
.pickbtn span { display: block; color: var(--muted); font-size: .95rem; margin-top: 2px; }
.pickbtn.on, .pickbtn:has(input:checked) { border-color: var(--o1); background: var(--soft); box-shadow: 0 0 0 3px #fbd5bd; }
.picks.err .pickbtn { border-color: var(--bad); }

.note { margin-top: 20px; padding: 16px 18px; border-radius: 14px; background: #eef2fb; color: #26324d; font-size: .98rem; }
.small-note { margin-top: 10px; color: var(--muted); font-size: .95rem; }
.good { margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: var(--okbg); color: var(--ok); font-weight: 600; }
.good span { display: block; font-weight: 400; color: #1f5132; }
.bad { margin: 0 0 18px; padding: 16px 18px; border-radius: 14px; background: var(--badbg); color: var(--bad); }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; color: var(--muted); }
.ticks li::before { content: ""; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c9d1e0; margin-top: 1px; }
.ticks li.done { color: var(--ink); }
.ticks li.done::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.ticks li.now::before { border-color: var(--o1); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ticks li.now::before { animation: none; } }

.help { margin-top: 10px; }
.help summary { cursor: pointer; color: #c2410c; font-weight: 600; font-size: .98rem; }
.pic { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfe; padding: 14px; font-size: .88rem; color: var(--muted); }
.pic.big { font-size: 1rem; color: var(--ink); }
.pic .win, .win { border: 1px solid #d5dbe8; border-radius: 10px; overflow: hidden; background: #fff; margin-bottom: 10px; }
.win .t { background: #eef1f7; padding: 7px 10px; font-size: .8rem; }
.win .b { display: grid; grid-template-columns: 120px 1fr; min-height: 120px; }
.win .side { border-right: 1px solid #e6eaf2; padding: 10px; display: grid; gap: 6px; align-content: start; }
.win .side i, .win .mainp i { display: block; height: 9px; border-radius: 5px; background: #e3e8f1; }
.win .side i.hot { background: var(--o1); }
.win .mainp { padding: 12px; display: grid; gap: 8px; align-content: start; }
.win .mainp .hl { border: 2px solid var(--o1); border-radius: 8px; padding: 8px 10px; color: var(--ink); font-size: .84rem; background: var(--soft); word-break: break-all; }
.tbc { margin-top: 14px; padding: 12px 16px; border-radius: 12px; border: 1px dashed #b9c2d6; background: #fafbfe; color: #55627a; font-size: .88rem; }
.copied { color: var(--ok); font-weight: 600; }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.check input { width: 24px; height: 24px; accent-color: var(--o1); }
.big-check { margin-top: 22px; font-size: 1.08rem; }
.presets { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; padding: 0; }
.hours-same { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; }
.day-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.day-row .field { margin-top: 12px; }
.days { display: grid; gap: 12px; margin-top: 18px; }
.day { padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 4px; }
.day legend { float: left; margin-right: 16px; font-size: 1.08rem; }
.day .check { justify-self: end; font-weight: 400; }
.day .day-row { grid-template-columns: repeat(4, 1fr); clear: both; }
.day.is-closed .day-row { opacity: .45; }
.js [data-show-when].off { display: none; }
.js .area-row.extra { display: none; }
.js .area-row.extra.show { display: grid; }

.rescue { display: none; margin-top: 18px; padding: 16px 20px; border-radius: 16px; border: 1px dashed rgba(255, 106, 43, .6); background: rgba(255, 106, 43, .06); gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: .98rem; }
.big-tick { width: 84px; height: 84px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; margin-bottom: 18px; }
.links { display: grid; gap: 12px; margin-top: 22px; }
.links div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; }
.links b { display: block; }
.links a, .links span { color: #c2410c; font-size: 1.05rem; word-break: break-all; }
.links small { display: block; color: var(--muted); margin-top: 4px; }
ol.plain-steps { margin: 18px 0 0; padding-left: 24px; display: grid; gap: 8px; }

@media (max-width: 900px) {
  aside.side { max-width: none; flex-basis: 100%; padding: 18px 16px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px; }
  aside.side .brand { flex-basis: 100%; }
  aside.side .shop { width: 150px; flex: none; }
  .side-line { flex: 1 1 180px; font-size: 13px; }
  .trail, .side-help { display: none; }
  .rescue { display: flex; margin-top: 28px; }
  main.setup { padding-top: 24px; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .row2, .picks.three { grid-template-columns: 1fr; }
  .nav .btn { flex: 1; }
  .win .b { grid-template-columns: 84px 1fr; }
  .day .day-row { grid-template-columns: repeat(2, 1fr); }
}

/* Restaurant step: country picker and "Use this device's location". */
select { appearance: auto; }
.field.err select { border-color: var(--bad); background: #fffafa; }
.field.locate > b { display: block; font-weight: 600; }
.field.locate .actions { margin-top: 10px; }
.locate-status { color: var(--ok); font-weight: 600; font-size: .95rem; }

/* Boxes with every click written out (the database step), the welcome list, the AI menu block, the finish. */
.box { margin-top: 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.box > h2 { margin: 0 0 6px; display: flex; align-items: center; gap: 12px; font-size: 1.2rem; }
.box > h2 .n { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 1rem; font-weight: 800; }
.box.warm { background: #fff9f2; border-color: #f3c9a8; }
.box.warm > h2 .n { background: var(--o1); }
.box .field { margin-top: 14px; }
.how { margin: 10px 0 0; padding: 0; list-style: none; counter-reset: n; display: grid; gap: 9px; }
.how li { counter-increment: n; display: grid; grid-template-columns: 26px 1fr; gap: 11px; font-size: 1rem; line-height: 1.5; }
.how li::before { content: counter(n); width: 24px; height: 24px; border-radius: 50%; background: var(--o1); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.how-title { margin-top: 16px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.box .pic { margin-top: 14px; }
kbd { font: inherit; font-size: .85rem; font-weight: 700; background: #eef2f8; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.need { list-style: none; margin: 22px 0 0; padding: 6px 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.need li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid #e4e7ec; }
.need li:first-child { border-top: none; }
.need .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; }
.need b { display: block; }
.need span { display: block; color: var(--muted); font-size: .95rem; margin-top: 2px; }
.ai { margin-top: 22px; border: 2px solid var(--o1); border-radius: 18px; background: var(--soft); padding: 20px 22px; }
.ai h2 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 1.2rem; }
.ai .tag { font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--o1); color: #fff; border-radius: 99px; padding: 4px 10px; }
.ai p { margin-top: 8px; color: #344054; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.stats div { background: #fff; border: 1px solid #f3c9a8; border-radius: 14px; padding: 12px 14px; }
.stats b { display: block; font-family: Fraunces, Georgia, serif; font-size: 1.4rem; line-height: 1.1; }
.stats span { display: block; font-size: .85rem; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.todo { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.todo li { display: grid; grid-template-columns: 22px 1fr; gap: 11px; }
.todo li::before { content: ""; width: 20px; height: 20px; border-radius: 6px; border: 2px solid #98a2b3; margin-top: 2px; }
.done-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--okbg); color: #14532d; border-radius: 99px; padding: 8px 14px; font-size: .9rem; font-weight: 700; margin-bottom: 16px; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

/* The kitchen (views/install/_kitchen.ejs): on the welcome screen and while a check or the finish runs. */
.kitchen { width: 100%; max-width: 420px; height: auto; display: block; }
.kitchen-hero { margin-top: 22px; display: flex; justify-content: center; }
.kitchen .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker .9s ease-in-out infinite alternate; }
.kitchen .flame.f2 { animation-duration: .7s; animation-delay: .15s; }
.kitchen .flame.f3 { animation-duration: 1.1s; animation-delay: .3s; }
.kitchen .pan { transform-box: fill-box; transform-origin: 100% 60%; animation: panrock 1.6s ease-in-out infinite; }
.kitchen .toss { transform-box: fill-box; transform-origin: center; animation: toss 1.6s ease-in-out infinite; }
.kitchen .toss.t2 { animation-delay: .12s; }
.kitchen .toss.t3 { animation-delay: .24s; }
.kitchen .toss.t4 { animation-delay: .36s; }
.kitchen .lid { transform-box: fill-box; transform-origin: center bottom; animation: rattle .5s ease-in-out infinite alternate; }
.kitchen .steam, .shop .puff { opacity: 0; animation: steam 2.4s ease-out infinite; }
.kitchen .steam.s2, .shop .puff.p2 { animation-delay: .8s; }
.kitchen .steam.s3 { animation-delay: 1.6s; }
.shop .glow { animation: glow 3s ease-in-out infinite alternate; }
.shop .open-sign { animation: opensign 1.4s ease-in-out infinite alternate; }
@keyframes flicker { from { transform: scaleY(.82) scaleX(1.06); opacity: .85; } to { transform: scaleY(1.12) scaleX(.94); opacity: 1; } }
@keyframes panrock { 0%, 100% { transform: rotate(0deg); } 40% { transform: rotate(-4deg) translateY(-2px); } 60% { transform: rotate(2deg); } }
@keyframes toss { 0%, 100% { transform: translateY(0) rotate(0deg); } 45% { transform: translateY(-34px) rotate(160deg); } 70% { transform: translateY(-6px) rotate(300deg); } }
@keyframes rattle { from { transform: translateY(0) rotate(-1.5deg); } to { transform: translateY(-3px) rotate(1.5deg); } }
@keyframes steam { 0% { opacity: 0; transform: translateY(6px); } 30% { opacity: .9; } 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes glow { from { fill: #ffd9a8; } to { fill: #ffe7c4; } }
@keyframes opensign { from { fill: #1f9254; } to { fill: #28b06a; } }

/* While the server works: the kitchen over the page. */
.cooking { position: fixed; inset: 0; z-index: 50; background: rgba(244, 246, 251, .99); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px 16px; text-align: center; }
.cooking h2 { margin: 6px 0 0; font-family: Fraunces, Georgia, serif; font-size: clamp(1.5rem, 4vw, 2rem); }
.cooking .ticks { text-align: left; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .kitchen *, .shop .puff, .shop .glow, .shop .open-sign { animation: none !important; }
  .kitchen .steam, .shop .puff { opacity: .6; }
}
