@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');
:root { font-family: 'Roboto', Arial, sans-serif; color: #352b22; background: #faf7f2; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; width: 100%; overflow-x: hidden; }
main { width: 100%; max-width: 1160px; margin: 0 auto; padding: 32px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 20px 0; font-size: 30px; line-height: 1.2; letter-spacing: -.6px; }
h2 { font-size: 21px; margin: 0 0 20px; }
p { line-height: 1.6; }
.brand { display: inline-block; color: #352b22; font-size: 12px; font-weight: 700; letter-spacing: 2px; text-decoration: none; }
button, a.button { border: 1px solid transparent; border-radius: 7px; background: #785333; color: white; padding: 12px 18px; cursor: pointer; min-height: 44px; font: 600 14px/1.4 'Roboto', Arial, sans-serif; text-decoration: none; display: inline-block; }
button:hover, a.button:hover { background: #5f4027; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, a:focus-visible { outline: 3px solid #d6ab6e; outline-offset: 3px; }
nav { display: flex; gap: 5px; flex-wrap: wrap; border-bottom: 1px solid #e5dacc; padding-bottom: 14px; margin-bottom: 24px; }
nav button { background: transparent; color: #786653; }
nav button[aria-current=true] { color: #352b22; background: #f1e4cf; }
form, .card, #settings { background: white; border: 1px solid #e5dacc; border-radius: 10px; padding: 24px; margin-bottom: 16px; min-width: 0; }
label { display: block; margin: 16px 0; font-size: 14px; font-weight: 500; }
input, select, textarea { display: block; width: 100%; max-width: 100%; margin-top: 7px; padding: 12px; border: 1px solid #c9b79f; border-radius: 6px; background: white; color: #352b22; font: 400 16px/1.4 'Roboto', Arial, sans-serif; min-height: 46px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid #785333; outline-offset: 1px; }
input[type=checkbox] { display: inline-block; width: auto; min-height: auto; margin-right: 8px; }
small, .muted { display: block; color: #786b5d; font-size: 13px; line-height: 1.5; }
.badge { display: inline-block; font-size: 11px; padding: 4px 7px; background: #f5eee4; border-radius: 4px; margin: 3px 4px 6px 0; }
.card h2 { margin: 10px 0 5px; font-size: 19px; }.card p { margin: 6px 0; font-size: 14px; }.card button { margin-top: 14px; }
.error { color: #ac3535; }
[hidden] { display: none !important; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.grid > * { min-width: 0; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
#message:empty { display: none; }#message { color: #786653; font-size: 14px; }
#login { max-width: 420px; margin: 60px auto; }#login button { width: 100%; }
#editor { max-width: 700px; margin: 24px auto; }
.calendar-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }.calendar-controls label { margin: 0; }.calendar-controls button { margin-top: 20px; }
.calendar-board { display: grid; gap: 12px; grid-template-columns: repeat(var(--days), minmax(220px, 1fr)); overflow-x: auto; max-width: 100%; padding-bottom: 12px; }
.calendar-day { min-width: 0; background: #f5eee4; border-radius: 8px; padding: 12px; }.calendar-day > h2 { font-size: 15px; margin: 3px 0 16px; }.calendar-day .card { padding: 16px; }
#upcoming button { display: block; width: 100%; background: #f3e5ce; color: #352b22; text-align: left; margin-bottom: 24px; }
.booking-shell { max-width: 1000px; display: grid; grid-template-columns: .85fr 1.15fr; padding: 0; margin: 40px auto; background: white; border: 1px solid #e5dacc; border-radius: 12px; box-shadow: 0 6px 28px #352b220b; overflow: hidden; }
.booking-intro { padding: 40px 32px; border-right: 1px solid #e5dacc; }.booking-intro h1 { font-size: 28px; margin-top: 35px; }.booking-intro > p { color: #786b5d; font-size: 15px; }.appointment-info { margin-top: 32px; color: #786b5d; font-size: 14px; }.appointment-info p { margin: 20px 0; }
.booking-panel { min-width: 0; padding: 36px 32px; }.booking-panel form { border: 0; border-radius: 0; padding: 0; margin: 0; }.booking-panel form > button { width: 100%; margin-top: 12px; }
#confirmation { padding: 30px 0; }#confirmation h2 { font-size: 27px; }#receipt { font-size: 19px; font-weight: 600; }#confirmation .button { margin-top: 18px; }
@media(max-width:700px) { main { padding: 20px 16px; }h1 { font-size: 27px; }nav { gap: 2px; }nav button { padding: 10px; font-size: 13px; }.grid { grid-template-columns: 1fr; gap: 0; }.toolbar { align-items: center; }.toolbar button { padding: 10px 12px; }form, .card, #settings { padding: 20px; }.booking-shell { display: block; margin: 0; border: 0; border-radius: 0; box-shadow: none; }.booking-intro { padding: 28px 24px 20px; border-right: 0; border-bottom: 1px solid #e5dacc; }.booking-intro h1 { margin-top: 20px; }.appointment-info { margin-top: 16px; }.appointment-info p { margin: 8px 0; }.booking-panel { padding: 28px 24px; }.calendar-controls { gap: 8px; }.calendar-controls input { max-width: 155px; }.calendar-board { grid-template-columns: repeat(var(--days),minmax(260px,1fr)); }#login { margin-top: 35px; } }
@media(display-mode:standalone) { main { padding-top: max(24px,env(safe-area-inset-top)); padding-bottom: max(24px,env(safe-area-inset-bottom)); } }

/* Each calendar control owns a grid cell, including the native iOS date field. */
.calendar-controls { display: grid; grid-template-columns: 44px minmax(0, 200px) 44px minmax(100px, 140px); gap: 12px; align-items: end; }
.calendar-controls > * { min-width: 0; }
.calendar-controls button { margin: 0; padding: 10px; }
.calendar-controls input, .calendar-controls select { min-width: 0; width: 100%; max-width: 100%; }
@media(max-width:700px) {
 .calendar-controls { grid-template-columns: 44px minmax(0, 1fr) 44px; }
 .calendar-controls label:last-child { grid-column: 1 / -1; }
 .calendar-controls label:last-child select { max-width: 180px; }
 .calendar-board { display: flex; flex-direction: column; overflow: visible; }
 .calendar-day { width: 100%; }
}

/* Give WebKit's native date control a complete row on narrow screens. */
#settings > button, #settings > a.button { display: block; width: 100%; max-width: 340px; margin: 12px 0; }
@media(max-width:700px) {
 .calendar-controls { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
 .calendar-controls > label { grid-column: 1 / -1; grid-row: 1; overflow: hidden; }
 .calendar-controls > #previousDate { grid-column: 1; grid-row: 2; }
 .calendar-controls > #nextDate { grid-column: 2; grid-row: 2; }
 .calendar-controls > label:last-child { grid-row: 3; }
 .calendar-controls input[type=date] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; width: 100%; max-width: 100%; min-height: 48px; }
 .calendar-controls input[type=date]::-webkit-date-and-time-value { text-align: left; min-height: 1.4em; }
}

/* Keep native iOS date controls within their form grid cell. */
input[type=date] { -webkit-appearance: none; appearance: none; min-width: 0; width: 100%; max-width: 100%; overflow: hidden; }
input[type=date]::-webkit-date-and-time-value { text-align: left; min-height: 1.4em; }
#editor label { min-width: 0; max-width: 100%; }
.card.priority-high { border-left: 5px solid #b42318; background: #fff8f7; }
.badge.priority-high, select.priority-high { color: #921b13; background: #fee4e2; border: 1px solid #dc6a60; font-weight: 700; }
.badge.priority-normal, select.priority-normal { color: #244d7a; background: #eaf2fc; border: 1px solid #8ba9ce; }
.badge.priority-low, select.priority-low { color: #365e48; background: #edf5ee; border: 1px solid #9ab6a1; }
.priority-label { font-weight: 600; }

.password-page main { max-width: 480px; margin: 40px auto; }
.password-page form > button { width: 100%; }
