:root {
  --bg: #fbf8f1; --card: #fff; --ink: #17202a; --ink-2: #5b6470; --line: #17202a1f;
  --mint: #7ee8c7; --mint-deep: #0f9f7a; --pink: #ff9ecb; --sun: #ffd84d; --lilac: #c7b5ff; --red: #d6336c;
  --display: 'Bricolage Grotesque', system-ui, sans-serif; --body: 'DM Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); }
h1 { font: 800 clamp(1.9rem, 5vw, 2.8rem)/1.05 var(--display); margin: 8px 0 14px; letter-spacing: -.02em; }
h2 { font: 800 1.3rem var(--display); margin: 0 0 8px; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.wrap { max-width: 780px; margin: 0 auto; padding: 24px 16px 80px; }
.narrow { max-width: 480px; }
.lede { color: var(--ink-2); font-size: 1.08rem; }
.hint { color: var(--ink-2); font-size: .9rem; margin: 0; }
.err { color: var(--red); font-weight: 700; margin: 0; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; max-width: 780px; margin: 0 auto; }
.logo { font: 800 1.5rem var(--display); text-decoration: none; }
.logo span { color: var(--mint-deep); }
.bar nav { display: flex; gap: 10px; align-items: center; }
.pill-link { text-decoration: none; font-weight: 700; border: 2px solid var(--ink); border-radius: 99px; padding: 7px 14px; background: #fff; }
.link { background: none; border: 0; font-weight: 700; color: var(--ink-2); cursor: pointer; padding: 8px 0; }

.card { background: var(--card); border: 2px solid var(--ink); border-radius: 20px; padding: 18px; box-shadow: 4px 4px 0 var(--ink); margin-bottom: 16px; }
.card form, form.card { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-weight: 700; }
input, textarea { width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 13px 14px; background: #fff; }
input:focus, textarea:focus { outline: 3px solid var(--mint); border-color: var(--ink); }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 0 20px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; cursor: pointer; text-decoration: none; box-shadow: 3px 3px 0 var(--mint); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 3px 3px 0 var(--line); }
.btn.danger { background: #fff; color: var(--red); border-color: var(--red); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: progress; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.sent { text-align: center; }
.big-emoji { font-size: 3rem; }

.section { margin: 26px 0 12px; }
.visit h3 { font: 800 1.25rem var(--display); margin: 2px 0 4px; }
.visit .meta { color: var(--ink-2); font-size: .94rem; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--bg); text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.pill.ok { background: var(--mint); } .pill.wait { background: var(--sun); } .pill.rec { background: var(--lilac); }
.visit .row { margin-top: 12px; }
.note { background: #fff6d6; border-radius: 12px; padding: 10px 12px; margin: 10px 0 0; font-size: .92rem; }
.empty { color: var(--ink-2); background: #fff; border: 2px dashed var(--line); border-radius: 16px; padding: 18px; text-align: center; }
.receipt { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; font-size: .94rem; margin: 10px 0; padding: 10px 12px; background: var(--bg); border-radius: 12px; }
.receipt b { text-align: right; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin: 10px 0; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 2px solid var(--line); }

.stars { display: flex; gap: 4px; }
.stars button { font-size: 1.9rem; line-height: 1; background: none; border: 0; cursor: pointer; padding: 4px; filter: grayscale(1) opacity(.35); }
.stars button[aria-pressed="true"] { filter: none; }
.tipbox { border-top: 2px dashed var(--line); margin-top: 14px; padding-top: 14px; display: grid; gap: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 2px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--mint); border-color: var(--ink); }
.chips input { width: 110px; min-height: 44px; padding: 0 12px; border-radius: 99px; }
.thanks { background: #e7f9f2; border-radius: 12px; padding: 10px 12px; font-weight: 700; color: #0b6b52; }

.setting { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 2px dashed var(--line); }
.setting:last-child { border-bottom: 0; }
.switch { width: 52px; height: 30px; border-radius: 99px; border: 2px solid var(--ink); background: #e5e7eb; position: relative; cursor: pointer; flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); transition: left .2s; }
.switch[aria-checked="true"] { background: var(--mint-deep); }
.switch[aria-checked="true"]::after { left: 24px; }

.modal { position: fixed; inset: 0; background: #17202a88; display: grid; place-items: end center; z-index: 20; padding: 16px; }
.sheet { background: #fff; border: 2px solid var(--ink); border-radius: 22px; padding: 20px; width: min(560px, 100%); max-height: 88vh; overflow: auto; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.days button, .slots button { flex: none; border: 2px solid var(--line); background: #fff; border-radius: 14px; font-weight: 700; cursor: pointer; }
.days button { width: 68px; padding: 8px 0; display: grid; text-align: center; }
.days button small { font-size: .72rem; color: var(--ink-2); font-weight: 500; text-transform: uppercase; }
.days button b { font: 800 1.35rem var(--display); }
.slots { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.slots button { padding: 10px 16px; border-radius: 99px; }
.days button[aria-pressed="true"], .slots button[aria-pressed="true"] { background: var(--mint); border-color: var(--ink); }
.slots button:disabled, .days button:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 200%); background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 16px; font-weight: 700; transition: transform .3s; visibility: hidden; max-width: calc(100% - 32px); text-align: center; z-index: 30; }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.legal-foot { text-align: center; padding-bottom: 40px; color: var(--ink-2); font-size: .9rem; }
