/* Sity's own pages: signing in and the dashboard, and what the home page shares with them (its own is front.css).
   Customers' sites have their own (site.css).
   The look is Sity's alone: Albert Sans throughout (under the SIL Open Font License, kept in /fonts with its
   license text), yellow and near-black on warm white. */
@font-face {
  font-family: "Albert Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/albert-sans.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #fbf9f4; --paper: #fff; --panel: #f4f0e7; --panel-deep: #ebe5d6;
  --ink: #15130f; --text: #48433b; --muted: #6f695d; --line: #e7e0d2; --line-strong: #cfc6b3;
  --sun: #ffd426; --sun-deep: #f2c200; --sun-soft: #fff5c7;
  --good: #17703f; --good-soft: #e6f5ec; --warn: #8a5300; --warn-soft: #fff0cf; --bad: #b3261e; --bad-soft: #fdecea;
  --radius: 14px;
  --display: "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); background: var(--bg); line-height: 1.55; font-size: 16px; font-family: var(--body); }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
h2 { font-size: 1.1rem; font-weight: 650; }
h3 { font-size: .95rem; margin-top: 1.4em; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration-color: var(--sun-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
code { font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; font-size: .92em; background: var(--panel); border-radius: 5px; padding: 1px 5px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* The bar across the top */
.app-top { background: rgba(251, 249, 244, .9); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.app-bar { display: flex; align-items: center; gap: 24px; padding: 0 20px; min-height: 60px; max-width: 1500px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -.04em; }
/* The mark is claimed (its application is filed), so the logo carries ™ beside the name. */
/* Its top level with the top of the S, a hair after the y, as in the logo files. Measured from the baseline, so it sits
   the same at any line height: up by the cap height (.7em) of the name less its own. */
.tm { font-size: .5em; font-weight: 600; letter-spacing: 0; line-height: 0; vertical-align: baseline; position: relative; top: -.7em; margin-left: .18em; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: var(--sun); color: var(--ink);
  font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: 0; line-height: 1; flex: none;
}
.app-nav { display: flex; gap: 4px; }
.app-nav a { padding: 8px 14px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.app-nav a:hover { background: var(--panel); color: var(--ink); }
.app-nav a.here { background: var(--ink); color: #fff; }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--ink); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " \25BE"; color: var(--muted); }
.menu summary:hover { background: var(--panel); }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(21, 19, 15, .14); min-width: 230px; padding: 6px; }
.menu-note { color: var(--muted); font-size: .85rem; padding: 6px 10px; margin: 0; border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; }
.menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit; color: var(--ink); padding: 9px 10px; border-radius: 8px; cursor: pointer; text-decoration: none; }
.menu-item:hover { background: var(--panel); }

main.page { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; }
main.wide { max-width: 1500px; margin: 0 auto; padding: 20px 20px 60px; }

/* Forms */
label { display: block; font-weight: 600; color: var(--ink); font-size: .92rem; margin: 16px 0 6px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 10px 12px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--sun); outline-offset: 0; border-color: var(--ink); }
input[type=checkbox] { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--ink); }
input:disabled, select:disabled, textarea:disabled { background: var(--panel); color: var(--muted); }
::placeholder { color: #a39b8b; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; margin-top: 18px; }
.hint { color: var(--muted); font-size: .86rem; margin: 6px 0 0; }
.legend { font-weight: 600; color: var(--ink); font-size: .92rem; margin: 16px 0 0; padding: 0; }
/* The Phone page: the days a business takes jobs, and what's left to give before it can ask to be a pilot. */
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 14px; }
.days .check { margin-top: 10px; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { padding: 4px 0 4px 28px; position: relative; color: var(--text); }
.todo li::before { content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.todo li.done { color: var(--muted); }
.todo li.done::before { background: var(--good); border-color: var(--good); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.stack > .button, .stack > fieldset > .button { margin-top: 20px; }
.code { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Buttons: yellow with black words for the thing to do, white for the rest */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--sun); color: var(--ink); border: 1.5px solid var(--sun);
  border-radius: 999px; padding: 10px 20px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background-color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.button:hover { background: var(--sun-deep); border-color: var(--sun-deep); }
.button:active { transform: translateY(1px); }
.button.big { padding: 14px 28px; font-size: 1.05rem; }
.button.small { padding: 7px 16px; font-size: .92rem; }
.button.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.button.dark:hover { background: #2b2822; border-color: #2b2822; }
.button.quiet { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.button.quiet:hover { background: var(--paper); border-color: var(--ink); }
.button.danger { background: var(--paper); color: var(--bad); border-color: #f1b8b3; }
.button.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.button:disabled { opacity: .55; cursor: default; }
.button .i { width: 1.1em; height: 1.1em; flex: none; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--sun-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; }

.problem, .notice, .working { border-radius: 12px; padding: 11px 14px; margin: 0 0 14px; font-weight: 550; }
.problem { background: var(--bad-soft); color: #8f1d17; border: 1px solid #f1b8b3; }
.notice { background: var(--good-soft); color: #125c33; border: 1px solid #b4dfc5; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.working { background: var(--sun-soft); color: var(--ink); border: 1px solid #f0dc8a; display: flex; gap: 12px; align-items: flex-start; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #e6cf6e; border-top-color: var(--ink); flex: none; margin-top: 2px; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin: 0 0 14px; }
.narrow-card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 36px; max-width: 460px; margin: 32px auto 0; box-shadow: 0 1px 2px rgba(21, 19, 15, .04), 0 20px 48px rgba(21, 19, 15, .07); }
.pill { display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: .82rem; font-weight: 700; background: var(--panel-deep); color: var(--ink); margin: 0 0 8px; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.start { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 36px; box-shadow: 0 1px 2px rgba(21, 19, 15, .04), 0 20px 48px rgba(21, 19, 15, .07); }

/* The editor: the form on one side, the site on the other */
.editor { display: grid; gap: 20px; align-items: start; }
.editor-side { min-width: 0; }
.editor-side > form.stack { margin-bottom: 18px; }
.status { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; margin-bottom: 14px; }
.status p { margin: 0 0 10px; }
.status form { display: inline; }
details.card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "+"; font-size: 1.4rem; color: var(--muted); line-height: 1; }
details.card[open] > summary::after { content: "\2212"; }
details.card > summary h2 { margin: 0; }
details.card[open] > summary { margin-bottom: 4px; }
.ask details { margin-top: 12px; }
.ask details summary { cursor: pointer; color: var(--ink); font-weight: 600; font-size: .92rem; text-decoration: underline; text-decoration-color: var(--sun-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ask details textarea { margin-top: 10px; }
.ask .button { margin-top: 14px; }
.pairrow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px; margin-top: 8px; }
.qa { display: grid; gap: 6px; margin-top: 10px; }
.work-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 12px; }
.work-row img { width: 76px; height: 57px; object-fit: cover; border-radius: 8px; background: var(--line, #e7e2d8); }
.work-fields { display: grid; gap: 6px; }
.section-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.section-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.section-list li.off strong { color: var(--muted); }
.section-about { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.section-about .hint { margin: 0; font-size: .85rem; }
.section-tools { display: flex; gap: 14px; }
.section-tools form { margin: 0; }
.address { display: flex; align-items: center; gap: 8px; }
.address span { color: var(--muted); white-space: nowrap; }
.editor-preview { position: sticky; top: 80px; min-width: 0; }
.preview-bar { display: flex; align-items: center; gap: 16px; padding: 0 4px 10px; font-size: .92rem; }
.preview-bar .tabs { display: flex; gap: 12px; }
.preview-bar .tabs + .tabs { border-left: 1px solid var(--line); padding-left: 12px; }
.preview-bar .tabs a[aria-current] { color: var(--ink); font-weight: 700; text-decoration: none; }
.preview-bar .sizes { margin-left: auto; display: flex; gap: 12px; }
.preview-frame { background: var(--panel-deep); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; height: calc(100vh - 144px); min-height: 480px; display: flex; justify-content: center; }
.preview-frame iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.preview-frame.phone iframe { width: 390px; max-width: 100%; }

/* Messages */
.message { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; margin-bottom: 12px; }
.message-head { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin-bottom: 6px; }
.message-head strong { color: var(--ink); font-size: 1.05rem; }
.message-head time { color: var(--muted); font-size: .88rem; margin-left: auto; }
.message-text { white-space: pre-wrap; margin: 8px 0 10px; color: var(--ink); }
.message-foot { display: flex; flex-wrap: wrap; gap: 8px; font-size: .82rem; }
.tag { border-radius: 999px; padding: 2px 10px; font-weight: 600; background: var(--panel-deep); color: var(--text); }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); background: var(--paper); border: 1.5px dashed var(--line-strong); border-radius: 18px; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 16px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; color: var(--ink); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

@media (min-width: 1040px) {
  .editor { grid-template-columns: minmax(380px, 460px) minmax(0, 1fr); }
}
@media (max-width: 1039px) {
  .editor-preview { position: static; order: -1; }
  .preview-frame { height: 70vh; }
}
@media (max-width: 719px) {
  /* On a phone the bar is two rows: the logo and the business's name, then the links under them. */
  .app-bar { flex-wrap: wrap; gap: 0 10px; padding: 6px 12px 0; min-height: 0; }
  .app-nav { order: 3; flex-basis: 100%; min-width: 0; margin: 0 -6px; padding: 2px 0 8px; gap: 0; justify-content: space-between; }
  .app-nav a { padding: 8px 9px; font-size: .9rem; white-space: nowrap; }
  .menu summary { max-width: 58vw; }
  .who { min-height: 44px; }
  .preview-bar .sizes { display: none; } /* the preview is already as wide as a phone */
}
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .narrow-card, .start { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
  .button { transition: none; }
}

/* Photos in the editor */
.photos .dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; margin: 4px 0 0;
  min-height: 132px; padding: 18px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--panel); cursor: pointer;
  font-weight: 500; color: var(--muted); transition: border-color .15s, background .15s;
}
.photos .dropzone strong { color: var(--ink); font-size: 1.05rem; }
.photos .dropzone:hover, .photos .dropzone.over { border-color: var(--ink); background: var(--sun-soft); }
.photos .drop-input:focus-visible + .drop-status, .photos .drop-input:focus-visible ~ .dropzone { outline: 3px solid var(--sun); }
.photos .drop.scripted .drop-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photos .drop.scripted .drop-send { display: none; }
.photos .drop-input { margin-top: 10px; }
.photos .drop-status { margin: 8px 0 0; color: var(--ink); font-weight: 600; min-height: 1em; }
.photos .drop.busy .dropzone { opacity: .6; pointer-events: none; }
.photo-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.photo-list li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.photo-list li.refused { border-color: var(--bad); background: var(--bad-soft); }
.photo-list img { width: 112px; height: 84px; object-fit: cover; border-radius: 8px; display: block; background: var(--panel); }
.photo-about { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: .92rem; }
.photo-about p { margin: 0; }
.photo-state { color: var(--muted); }
.photo-state.bad { color: var(--bad); font-weight: 600; }
.photo-tools { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.photo-tools form, .photo-about form { margin: 0; }
.link-button.danger { color: var(--bad); }

/* A site's two pages: the tabs between them */
.site-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.site-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px 8px 8px; border-radius: 999px; text-decoration: none; font-weight: 650; color: var(--text); background: var(--paper); border: 1px solid var(--line); }
.site-tabs a:hover { border-color: var(--line-strong); color: var(--ink); }
.site-tabs a.here { background: var(--ink); border-color: var(--ink); color: #fff; }
.site-tabs .step { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--panel); color: var(--ink); font-size: .85rem; }
.site-tabs a.here .step { background: var(--sun); }

/* Page 1: the business */
.business-page { max-width: 760px; margin: 0 auto; }
.business-page .site-tabs { margin-bottom: 22px; }
.business > h1 { margin-bottom: 6px; }
.business .card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.business .card > label:first-child { margin-top: 0; }
.business fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* A box with a mic in its corner */
.say { position: relative; }
.say textarea { padding-right: 56px; }
.mic {
  position: absolute; right: 8px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: var(--paper); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.mic[hidden] { display: none; }
.mic:hover { border-color: var(--ink); }
.mic.on { background: var(--bad); border-color: var(--bad); color: #fff; animation: listening 1.4s ease-out infinite; }
@keyframes listening { 0% { box-shadow: 0 0 0 0 rgba(179, 38, 30, .45); } 80%, 100% { box-shadow: 0 0 0 12px rgba(179, 38, 30, 0); } }
.help-write { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.help-write[hidden] { display: none; }
.help-status { color: var(--muted); font-size: .9rem; }

/* The first form's business lookup: Google's businesses under the name box as it's typed */
.lookup { position: relative; }
.lookup-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; margin: 0; padding: 6px; list-style: none; background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 14px 36px rgba(21, 19, 15, .16); max-height: min(380px, 60vh); overflow-y: auto;
}
.lookup-list[hidden] { display: none; }
.lookup-item { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.lookup-item:hover, .lookup-item[aria-selected="true"] { background: var(--sun-soft); }
.lookup-name { color: var(--ink); font-weight: 600; }
.lookup-place { color: var(--muted); font-size: .86rem; }
.lookup-keep { color: var(--ink); font-weight: 550; margin-top: 4px; position: relative; }
.lookup-keep::before { content: ""; position: absolute; left: 12px; right: 12px; top: -3px; border-top: 1px solid var(--line); }
.lookup-by { text-align: right; color: #5e5e5e; font-family: Roboto, Arial, sans-serif; font-size: 12px; padding: 4px 10px 2px; }
[data-hours-row][hidden], [data-place-guess][hidden], [data-lookup-hint][hidden] { display: none; }

/* Page 2: the website. The tabs and Publish on top, Sity's box in the middle, the site under it, photos and words
   beside it. */
.builder { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "ask" "preview" "side"; gap: 16px; }
.builder-top { grid-area: top; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.builder-top .status { margin: 0; padding: 10px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border-radius: 999px; }
.builder-top .status p { margin: 0; font-size: .9rem; }
.builder-top .status .pill { margin: 0; }
.builder-top .status .buttons { display: flex; gap: 8px; }
.builder-top .status .button { padding: 8px 18px; }
.builder-ask { grid-area: ask; width: 100%; max-width: 820px; justify-self: center; }
.builder-ask .notice, .builder-ask .problem, .builder-ask .working { margin: 0 0 12px; }
.ask-bar { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 20px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(21, 19, 15, .08); }
.ask-bar fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
/* The box's conversation: what the owner asked, on the right, and Sity's answer under it. */
.talk { list-style: none; margin: 0 0 14px; padding: 0 0 14px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; max-height: 320px; overflow-y: auto; }
.talk li { display: grid; gap: 8px; }
.talk p { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.talk-you { justify-self: end; max-width: 85%; background: var(--panel); border-radius: 14px 14px 4px 14px; padding: 8px 12px; color: var(--ink); }
.talk-sity { justify-self: start; max-width: 92%; display: flex; gap: 10px; align-items: flex-start; color: var(--ink); }
.talk-sity .logo-mark { width: 24px; height: 24px; border-radius: 7px; font-size: .8rem; flex: none; }
.talk-sity .spinner { margin-top: 3px; }
.ask-bar label { margin: 0 0 8px; font-size: 1rem; }
.ask-row { display: flex; gap: 10px; align-items: flex-end; }
.ask-row .say { flex: 1; min-width: 0; }
.ask-row textarea { resize: vertical; min-height: 64px; }
.ask-row .button { flex: none; height: 48px; }
.ask-bar .hint { margin-top: 8px; }
.builder .editor-preview { grid-area: preview; }
.builder-side { grid-area: side; }
.builder-side > .card, .builder-side > form > fieldset > .card { margin-bottom: 16px; }
.builder-side fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.words details.inner { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.words details.inner > summary h2 { font-size: 1.02rem; }
.words .button { margin-top: 8px; }
@media (min-width: 1100px) {
  .builder { grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "top top" "ask ask" "preview side"; }
  .builder .editor-preview { position: sticky; top: 80px; order: 0; }
  .builder .preview-frame { height: calc(100vh - 120px); }
}
@media (max-width: 1099px) {
  .builder .editor-preview { position: static; order: 0; }
  .builder .preview-frame { height: 72vh; }
}
@media (max-width: 560px) {
  .ask-row { flex-direction: column; align-items: stretch; }
  .ask-row .button { width: 100%; }
  .ask-row textarea { min-height: 96px; }
  .builder-top .status { border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .mic.on { animation: none; }
}

/* Click a part of the preview to change its words or leave Sity a note about it (app.js). */
.preview-frame { position: relative; }
.part-hint { margin: 0 4px 10px; }
.part-hint[hidden] { display: none; }
.part-status { margin: 0 4px 10px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.part-status:empty { display: none; }
.part-pop { position: absolute; z-index: 5; width: 380px; max-width: calc(100% - 16px); max-height: calc(100% - 16px); overflow: auto; margin: 0; padding: 16px 18px 18px; box-shadow: 0 18px 50px rgba(21, 19, 15, .24); }
.part-pop[hidden], .part-pop [hidden] { display: none; }
.edit-bar { position: absolute; z-index: 6; display: flex; align-items: center; gap: 4px; margin: 0; padding: 4px 4px 4px 14px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: .85rem; font-weight: 600; box-shadow: 0 8px 24px rgba(21, 19, 15, .25); white-space: nowrap; }
.edit-bar[hidden] { display: none; }
.edit-bar .edit-what { margin-right: 6px; }
.edit-bar button { border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; cursor: pointer; background: rgba(255, 255, 255, .14); color: #fff; }
.edit-bar button:hover { background: rgba(255, 255, 255, .26); }
.edit-bar .edit-ask { background: var(--sun); color: var(--ink); }
.edit-bar .edit-ask:hover { background: #ffe066; }
.part-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.part-pop-head h2 { margin: 0; font-size: 1.05rem; }
.part-pop-close { border: 0; background: none; color: var(--muted); font-size: 1.6rem; line-height: 1; padding: 2px 6px; cursor: pointer; border-radius: 8px; }
.part-pop-close:hover { color: var(--ink); background: var(--panel); }
.part-pop-note { margin: 6px 0 0; }
.part-pop-note a { color: var(--ink); font-weight: 600; }
.part-pop label { margin: 12px 0 6px; }
.part-pop .button { margin-top: 12px; padding: 10px 20px; }
.part-pop-ask { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); }
.part-pop-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.part-pop .part-pop-buttons .button { margin-top: 0; }
.part-pop.sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 82vh; border-radius: 22px 22px 0 0; padding-bottom: 24px; }
.ask-bar.flash { animation: ask-flash 1.4s ease; }
@keyframes ask-flash { 0%, 100% { box-shadow: 0 10px 30px rgba(21, 19, 15, .08); } 25% { box-shadow: 0 0 0 5px var(--sun); } }
@media (prefers-reduced-motion: reduce) { .ask-bar.flash { animation: none; } }

/* Photos, words and the address open over the preview (app.js), so the preview keeps the whole width: the site at its
   real size. Without the script they're under the preview. */
.preview-bar { flex-wrap: wrap; row-gap: 8px; }
.preview-bar .panels { display: flex; flex-wrap: wrap; gap: 8px; }
.preview-bar .another { position: relative; }
.preview-bar .another > summary { list-style: none; }
.preview-bar .another > summary::-webkit-details-marker { display: none; }
.preview-bar .another[open] > summary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
/* "Try another design" opens a small card under its button, or a sheet from the bottom on a phone. */
.another-pop { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: min(380px, calc(100vw - 32px)); margin: 0; padding: 18px;
  box-shadow: 0 18px 50px rgba(21, 19, 15, .18); }
.another-pop label { margin: 0 0 6px; }
.another-pop .button { margin-top: 12px; }
.another-pop .another-now { margin-top: 12px; }
@media (max-width: 640px) {
  .another-pop { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; border-radius: 22px 22px 0 0; padding: 20px 18px 28px;
    box-shadow: 0 -12px 40px rgba(21, 19, 15, .2); }
}
.preview-bar .panels .button { padding: 7px 16px; font-size: .9rem; }
.preview-bar .undo { display: contents; }
.preview-bar .undo .button { display: inline-flex; align-items: center; gap: 6px; }
.preview-bar .panels .button[aria-expanded="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.builder.drawers { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "ask" "preview"; }
.builder.drawers .editor-preview { position: static; }
@media (min-width: 1100px) { .builder.drawers .preview-frame { height: calc(100vh - 150px); min-height: 560px; } }
.preview-bar .panels .button[hidden] { display: none; }
.builder.drawers .builder-side { position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); margin: 0; padding: 0 18px 24px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-left: 1px solid var(--line); box-shadow: -24px 0 60px rgba(21, 19, 15, .18); transform: translateX(105%); visibility: hidden; }
.builder.drawers .builder-side.open { transform: none; visibility: visible; }
/* It slides, once the page is drawn (app.js adds .ready), so it doesn't slide away as the page opens. */
.builder.drawers.ready .builder-side { transition: transform .2s ease, visibility 0s linear .2s; }
.builder.drawers.ready .builder-side.open { transition: transform .2s ease; }
.builder.drawers .builder-side [data-panel-of]:not(.on) { display: none; }
.builder.drawers .builder-side .panel-title { display: none; }
.builder.drawers .builder-side > .card, .builder.drawers .builder-side > form > fieldset > .card { border: 0; padding: 0; background: none; }
.drawer-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -18px 12px; padding: 16px 18px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.drawer-head[hidden] { display: none; }
.drawer-head h2 { margin: 0; font-size: 1.15rem; }
.drawer-close { border: 0; background: none; color: var(--muted); font-size: 1.8rem; line-height: 1; padding: 2px 8px; cursor: pointer; border-radius: 8px; }
.drawer-close:hover { color: var(--ink); background: var(--panel); }
.preview-drop { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px;
  background: rgba(255, 245, 199, .92); border: 3px dashed var(--sun-deep); border-radius: 18px; font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.preview-drop[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .builder.drawers.ready .builder-side, .builder.drawers.ready .builder-side.open { transition: none; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.part-pop-fields > :first-child + input, .part-pop-fields > :first-child + textarea { margin-top: 12px; }
#sections h3 { font-size: 1rem; margin: 10px 0 0; }
