/* Shared look for start, shop, manage and staff pages. Same tokens as styles.css. Large touch targets, high contrast. */
:root {
  --ink: #171323;
  --paper: #fff9f0;
  --cream: #f6ecdc;
  --coral: #ff765f;
  --yellow: #f6c854;
  --lavender: #c8b8ff;
  --violet: #433470;
  --green: #2f6b57;
  --red: #a3342b;
  --muted: #5a5461;
  --line: rgba(23, 19, 35, 0.2);
  --radius: 20px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Thai", sans-serif;
  font-size: 18px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 8px; }
h2 { font-size: 24px; line-height: 1.2; margin-bottom: 8px; }
h3 { font-size: 20px; margin-bottom: 6px; }
a { color: var(--violet); }
button, input, textarea, select { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 2px;
}
.offscreen { position: fixed; left: -9999px; top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(560px, 100% - 32px); margin: 0 auto; padding: 16px 0 96px; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand-dot { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 10px 10px 10px 3px; color: #fff; background: var(--violet); font-family: Georgia, serif; font-style: italic; font-size: 22px; }
.topbar-title { font-weight: 800; font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-sub { color: var(--muted); font-size: 14px; }

/* Buttons: at least 56px tall, big text */
.btn {
  min-height: 56px; min-width: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 20px; border: 2px solid var(--ink); border-radius: 16px; background: #fff; color: var(--ink);
  font-weight: 800; font-size: 18px; cursor: pointer; text-align: center; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { color: #fff; background: var(--violet); border-color: var(--violet); }
.btn-good { color: #fff; background: var(--green); border-color: var(--green); }
.btn-bad { color: #fff; background: var(--red); border-color: var(--red); }
.btn-quiet { border-color: var(--line); background: #fff; }
.btn-big { width: 100%; min-height: 84px; font-size: 22px; border-radius: 22px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 56px; font-size: 24px; flex: none; }
.btn.is-listening { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn.is-busy::after { content: "⏳"; }
.emoji { font-size: 32px; line-height: 1; }

.card { padding: 18px; margin: 0 0 14px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); }
.card-hero { text-align: center; }
.hint { color: var(--muted); font-size: 16px; }
.notice { padding: 14px 16px; margin: 0 0 14px; border-radius: 16px; background: #fff3cf; border: 2px solid var(--yellow); }
.notice-error { background: #ffe6e1; border-color: var(--red); }

/* Forms */
label.field { display: block; margin: 0 0 12px; font-weight: 700; font-size: 16px; }
label.field > span { display: block; margin-bottom: 4px; }
.input, .textarea {
  display: block; width: 100%; min-height: 56px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; font-size: 20px;
}
.textarea { min-height: 120px; resize: vertical; }
.row { display: flex; gap: 10px; align-items: stretch; }
.row > .input, .row > .textarea { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }

/* Link row */
.link-row { display: grid; gap: 10px; }
.link-input { width: 100%; min-height: 52px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--cream); font-size: 15px; }
.link-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* QR */
.qr-box { width: min(260px, 70vw); margin: 0 auto 14px; padding: 8px; background: #fff; border: 2px solid var(--ink); border-radius: 16px; }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-small { width: min(180px, 55vw); }

/* Chat */
.chat { display: flex; flex-direction: column; min-height: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 12px 4px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 86%; padding: 12px 14px; border-radius: 18px; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble-me { align-self: flex-end; color: #fff; background: var(--violet); border-bottom-right-radius: 4px; }
.bubble-bot { align-self: flex-start; background: #fff; border: 2px solid var(--line); border-bottom-left-radius: 4px; }
.bubble-error { background: #ffe6e1; border-color: var(--red); }
.is-typing { opacity: .6; }
.booking-sent { align-self: center; padding: 10px 16px; border-radius: 999px; color: #fff; background: var(--green); font-weight: 800; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px; -webkit-overflow-scrolling: touch; }
.chip { flex: none; min-height: 48px; padding: 8px 16px; border: 2px solid var(--violet); border-radius: 999px; background: #fff; color: var(--violet); font-weight: 800; font-size: 16px; cursor: pointer; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 8px 0; }
.chat-input { flex: 1; min-width: 0; min-height: 56px; max-height: 120px; padding: 14px; border: 2px solid var(--ink); border-radius: 18px; background: #fff; font-size: 18px; resize: none; }
.btn-send { width: 64px; padding: 0; font-size: 26px; flex: none; }

/* Dots */
.dots { display: flex; justify-content: center; gap: 10px; margin: 14px 0; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--violet); }

/* Poster: hidden on screen, the only thing printed */
.poster { display: none; }
@media print {
  @page { size: A5 portrait; margin: 10mm; }
  body > *:not(.poster) { display: none !important; }
  body { background: #fff; min-height: 0; }
  .poster { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8mm; text-align: center; min-height: 185mm; color: #000; }
  .poster-name { font-size: 30pt; line-height: 1.1; margin: 0; }
  .poster-qr { width: 100mm; padding: 3mm; border: 1.2mm solid #000; border-radius: 4mm; }
  .poster-qr svg { display: block; width: 100%; height: auto; }
  .poster-scan { font-size: 24pt; font-weight: 800; margin: 0; }
  .poster-url { font-size: 11pt; margin: 0; word-break: break-all; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-contrast: more) {
  :root { --line: #171323; --muted: #171323; }
}
@media (max-width: 380px) {
  body { font-size: 17px; }
  .btn { padding: 10px 14px; }
  .btn-big { font-size: 20px; }
}
[tabindex="-1"]:focus-visible { outline: none; }

/* Footer links to the privacy policy and the terms. */
.legal-line { flex: none; padding: 8px 16px 12px; text-align: center; font-size: 14px; color: var(--muted); }
