/* Patients' own pages on their phone: live queue (/q/{token}) and booking (/book). Mobile first, light or dark by the phone.
   Accent as the staff screens (#1d5fc4, dark #8ab4f8). No outside fonts. */
:root {
    --bg: #f5f7fa; --surface: #fff; --text: #16202c; --muted: #5b6878; --line: #d8dee6; --accent: #1d5fc4; --on-accent: #fff;
    --danger: #b3261e; --danger-bg: #fdecea; --ok-bg: #e8f1fd;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    /* "Claude Code black", the same tokens as the staff screens' dark theme (site standard 2.0, S6). Contrast: text 11.6 on bg,
       muted 6.2, accent 7.2, danger text 8.9 on danger-bg, accent 6.9 on ok-bg */
    :root { --bg: #262624; --bg-alt: #1f1e1d; --surface: #30302e; --ink: #faf9f5; --text: #e3e1d9; --muted: #a8a59b; --line: #3e3e3a; --line-strong: #85837a;
        --accent: #8ab4f8; --on-accent: #1f1e1d; --danger: #f2b8b5; --danger-bg: #3a1e1c; --ok-bg: #1b2a3f; color-scheme: dark; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.pt { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: var(--accent); }
.pt-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pt-clinic { margin: 0; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.pt-lang { display: flex; gap: 4px; }
.pt-lang a { padding: 6px 12px; min-height: 44px; min-width: 44px; justify-content: center; display: inline-flex; align-items: center; border-radius: 8px; text-decoration: none; color: var(--muted); }
.pt-lang a[aria-current] { background: var(--ok-bg); color: var(--accent); font-weight: 700; }
.pt-main { max-width: 560px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
.pt-main > div { display: grid; gap: 16px; }
.pt-h1 { margin: 8px 0 0; font-size: 1.6rem; line-height: 1.2; }
.pt-lead { margin: 0; color: var(--muted); }
.pt-label { margin: 0 0 6px; font-size: .95rem; font-weight: 700; color: var(--muted); text-transform: none; }
.pt-box, .pt-now, .pt-step { margin: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.pt-now { text-align: center; padding: 24px 16px; }
.pt-big { margin: 0; font-size: clamp(4.5rem, 26vw, 8rem); font-weight: 800; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pt-mid { margin: 0; font-size: 2.4rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pt-next { margin: 0; font-size: 1.5rem; font-weight: 700; word-spacing: .4em; font-variant-numeric: tabular-nums; }
.pt-row { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.pt-inline { display: flex; gap: 8px; }
.pt-inline input { flex: 1; min-width: 0; font-size: 1.6rem; font-weight: 700; text-align: center; }
.pt-status { margin: 10px 0 0; font-size: 1.25rem; font-weight: 700; color: var(--accent); min-height: 1.5em; }
.pt-hint, .pt-foot { margin: 6px 0 0; font-size: .9rem; color: var(--muted); }
.pt-foot { text-align: center; }
input, button { font: inherit; }
input:not([type="checkbox"]):not([type="radio"]) { width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.pt-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 20px; border: 0; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; cursor: pointer; }
.pt-btn--block { width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pt-form { display: grid; gap: 16px; }
.pt-step { border: 1px solid var(--line); display: grid; gap: 12px; }
.pt-step legend { float: left; width: 100%; padding: 0; }
.pt-step label { display: grid; gap: 4px; }
.pt-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.pt-day { flex: 0 0 auto; padding: 10px 14px; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); white-space: nowrap; }
.pt-day.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.pt-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.pt-slot { position: relative; }
.pt-slot input { position: absolute; opacity: 0; inset: 0; }
.pt-slot span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; font-variant-numeric: tabular-nums; }
.pt-slot input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.pt-slot input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.pt-slot.is-full span { opacity: .45; text-decoration: line-through; }
.pt-slot small { font-size: .7rem; text-decoration: none; }
.pt-check { display: flex !important; grid-template-columns: none; gap: 10px; align-items: flex-start; }
.pt-check input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; }
.pt-error { padding: 12px 16px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); }
.pt-error ul { margin: 0; padding-left: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 359px) { .pt-row { grid-template-columns: 1fr; } }

/* Medicine guide (/g/{token}, public/guide.blade.php + partials/guide-body) */
.gd, .gd-ask { display: grid; gap: 12px; }
.gd-h2 { margin: 8px 0 0; font-size: 1.15rem; }
.gd-facts, .gd-dose { margin: 0; display: grid; gap: 4px 16px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.gd-facts dt, .gd-dose dt { font-size: .85rem; color: var(--muted); }
.gd-facts dd, .gd-dose dd { margin: 0; font-weight: 600; }
.gd-med { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.gd-name { margin: 0 0 6px; font-size: 1.1rem; }
.gd-flag { margin: 0 0 8px; padding: 6px 10px; border-radius: 8px; background: var(--danger-bg); color: var(--danger); font-weight: 700; font-size: .95rem; }
.gd-thread { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.gd-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; background: var(--ok-bg); }
.gd-msg--me { justify-self: end; background: var(--bg); border: 1px solid var(--line); }
.gd-msg p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.gd-who { font-size: .8rem; color: var(--muted); }
.gd-ok { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--ok-bg); color: var(--accent); font-weight: 700; }
.gd-ask textarea { width: 100%; min-height: 96px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; box-sizing: border-box; }
.gd-contact { margin: 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.gd-call { min-height: 48px; display: inline-flex; align-items: center; }
