:root {
  font-family: 'Lora', Georgia, serif;
  font-size: 100%;
  line-height: 1.55;
  color: #263137;
  background: #f3f5f6;
  font-synthesis: none;
  --paper: #fff;
  --ink: #202b31;
  --line: #d6dde0;
  --muted: #59666d;
  --error: #a32424;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; font-size: 1rem; color: inherit; }
h1, h2, p, dl { margin: 0; }
h1, h2 { font: inherit; font-weight: 500; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .55; }
button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #366786; outline-offset: 4px; }
[tabindex='-1']:focus { outline: none; }
[hidden] { display: none !important; }
.page-shell { width: min(100%, 460px); margin: 32px auto; padding: 0 16px; }
.preview-notice { text-align: center; color: var(--muted); margin-bottom: 16px; text-wrap: balance; }
.app-shell { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px #202b3108; }
.app-header { padding: 26px 24px 20px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 500; letter-spacing: .12em; margin-bottom: 6px; }
.app-header .brand { letter-spacing: .04em; margin: 0; }
main { padding: 22px 24px 28px; min-height: 580px; }
.intro { padding: 56px 0 28px; text-align: center; }
.intro h2 { margin-bottom: 12px; }
.intro p { color: var(--muted); }
.intro-symbol, .success-symbol { width: 50px; height: 50px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; margin: 0 auto 24px; }
.success-symbol { background: #edf4f1; color: #255f48; border-color: #c8dcd1; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-align: center; }
.button:not(:disabled):active { transform: translateY(1px); }
.primary { color: #fff; background: var(--ink); border-color: var(--ink); }
.secondary:hover { background: #f4f6f7; }
.full { width: 100%; }
.support-text { color: var(--muted); text-align: center; margin: 12px 0 22px; }
.home-intro { padding-bottom: 20px; }
.home-actions { display: grid; gap: 16px; }
.connection-copy { margin-bottom: 20px; color: var(--muted); }
#retry-cases { margin-top: 12px; }
.loading-message { padding: 64px 0; text-align: center; color: var(--muted); }
#google-sign-in { display: flex; justify-content: center; }
/* Keep Google's SDK-rendered fallback usable if its external stylesheet fails. */
#google-sign-in { min-height: 44px; }
#google-sign-in [role='button'] { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font: inherit; cursor: pointer; overflow: hidden; }
#google-sign-in [role='button'] > div:first-child { position: absolute; inset: 0; pointer-events: none; }
#google-sign-in [role='button'] > div:last-of-type { display: flex; align-items: center; justify-content: center; gap: 12px; }
#google-sign-in svg { display: block; width: 20px; height: 20px; flex-shrink: 0; }
#google-sign-in #button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.text-button { padding: 8px 0; min-height: 44px; background: none; border: none; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.field { min-width: 0; margin-bottom: 20px; }
.field label { display: block; margin-bottom: 8px; }
.field label span { color: var(--muted); }
input, select, textarea { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); min-height: 48px; }
input[type=date] { -webkit-appearance: none; appearance: none; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
input[type=date]::-webkit-calendar-picker-indicator { display: none; }
textarea { display: block; resize: vertical; line-height: 1.55; min-height: 82px; }
input::placeholder, textarea::placeholder { color: #69777e; opacity: 1; }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--error); }
.date-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; }
.calendar { padding: 12px; }
.calendar svg { width: 22px; height: 22px; }
.select-wrap { position: relative; }
.select-wrap::after { content: ''; position: absolute; right: 17px; top: 19px; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
select { appearance: none; padding-right: 40px; text-overflow: ellipsis; }
.field-hint { color: var(--muted); margin-top: 8px; }
.duration-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.field-error, .error-summary { color: var(--error); margin-top: 8px; overflow-wrap: anywhere; }
.duration-error { margin-top: -10px; margin-bottom: 20px; }
.error-summary { margin-bottom: 16px; }
.submit-button { margin-top: 4px; }
.confirmation-intro { padding-top: 22px; padding-bottom: 24px; }
.receipt { border-top: 1px solid var(--line); }
.receipt>div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.receipt dt { color: var(--muted); flex-shrink: 0; }
.receipt dd { margin: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.receipt .receipt-text { display: block; }
.receipt-text dd { text-align: left; white-space: pre-wrap; margin-top: 8px; }
.actions { display: grid; gap: 12px; margin-top: 28px; }
.return-button { display: block; margin: 12px auto; }
footer { padding: 16px 24px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); }
footer .developer-credit { font-size: .875rem; margin-top: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 520px) {
  body { background: var(--paper); }
  .page-shell { padding: max(12px, env(safe-area-inset-top)) 0 env(safe-area-inset-bottom); margin: 0 auto; }
  .preview-notice { padding: 0 18px; margin-bottom: 12px; }
  .app-shell { border: 0; border-radius: 0; box-shadow: none; }
  .app-header { padding-top: 16px; }
  main { min-height: 520px; }
}
@media (prefers-reduced-motion: reduce) { .button:not(:disabled):active { transform: none; } }
