@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Ma Shan Zheng";
  src: url("/fonts/mashanzheng.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #f4f1e8;
  --ink: #252820;
  --jade: #2e6554;
  --muted: #64685d;
  --line: #d3d1c7;
  --surface: #faf8f1;
  --error: #9c3429;
  font-family: "Instrument Sans", "Noto Sans CJK SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 4px;
}
p, h1, h2, h3 { margin-top: 0; }
main:focus { outline: none; }
.site-header, main, footer { width: min(100% - 112px, 1088px); margin-inline: auto; }
.site-header { display: flex; position: relative; align-items: center; justify-content: space-between; gap: 32px; padding-top: 34px; }
.language-error { position: absolute; top: 100%; left: 0; font-size: 12px; line-height: 1.6; max-width: 45ch; color: var(--error); margin: 8px 0 0; }
.brand { display: flex; align-items: center; gap: 18px; text-decoration: none; flex-shrink: 0; }
.brand-mark { font-family: "Ma Shan Zheng", "Noto Serif CJK SC", serif; font-size: 57px; line-height: 1.1; letter-spacing: -.12em; padding-right: .12em; transform: rotate(-5deg); }
.brand-name { font-size: 23px; font-weight: 550; letter-spacing: -.6px; line-height: 1.1; }
.brand-location { display: block; font-size: 11px; font-weight: 400; letter-spacing: 0; margin-top: 5px; }
.language-nav { display: flex; position: relative; gap: 14px; font-size: 12px; }
.language-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; text-underline-offset: 5px; }
.language-nav a[aria-current] { color: var(--ink); text-decoration: underline; }
.language-nav a:hover { color: var(--ink); text-decoration: underline; }
.language-nav.has-indicator a { text-decoration: none; transition: color 300ms cubic-bezier(.2,.6,.25,1); }
.language-nav.has-indicator::after { content: ""; position: absolute; pointer-events: none; left: 0; bottom: 9px; height: 1px; background: currentColor; width: var(--indicator-width); transform: translateX(var(--indicator-x)); transition: width 300ms cubic-bezier(.2,.6,.25,1), transform 300ms cubic-bezier(.2,.6,.25,1); }
main { flex: 1; display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: clamp(48px, 7.5vw, 108px); align-items: start; padding-top: 85px; padding-bottom: 90px; }
.invitation { padding-top: clamp(70px, 10vh, 110px); }
.page-heading { min-width: 0; }
h1 { font-size: clamp(37px, 3.8vw, 47px); font-weight: 500; line-height: 1.12; letter-spacing: -1.5px; margin-bottom: 17px; }
h2 { font-size: 25px; font-weight: 550; letter-spacing: -.65px; line-height: 1.25; margin-bottom: 14px; }
.welcome { font-size: 17px; line-height: 1.5; max-width: 28ch; margin-bottom: 0; }
.table-sketch { display: block; width: 205px; max-width: 100%; height: auto; margin: 27px 0 30px; transform: rotate(-4deg); }
.form-column { min-width: 0; }
.section-intro { font-size: 15px; line-height: 1.65; color: var(--muted); max-width: 62ch; margin-bottom: 27px; }
.section-intro a { white-space: nowrap; text-decoration-color: var(--line); }
.login-panel { border-top: 1px solid var(--ink); padding-top: 29px; margin-top: 2px; max-width: 480px; }
.login-panel .section-intro { max-width: 44ch; margin-bottom: 36px; }
.field { min-width: 0; }
.field label { display: block; font-size: 14px; font-weight: 550; margin-bottom: 9px; line-height: 1.4; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 49px; padding: 11px 12px; color: var(--ink); border: 1px solid #999d91; border-radius: 2px; background: var(--surface); font-size: 16px; }
.field input:hover, .field textarea:hover { border-color: var(--muted); }
.field textarea { display: block; min-height: 106px; resize: vertical; line-height: 1.5; }
.field-help { font-size: 12px; line-height: 1.6; color: var(--muted); margin-block: 8px 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.schedule-fields { grid-column: 1 / -1; display: grid; grid-template-columns: 1.35fr 1fr 1.2fr; gap: 18px; }
.optional { font-weight: 400; color: var(--muted); }
.schedule-help { margin-block: 15px 27px; padding-left: 12px; border-left: 1px solid var(--line); }
.notes-field { margin-bottom: 25px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 2px; font-weight: 500; font-size: 15px; border: 1px solid var(--ink); text-decoration: none; }
.primary { background: var(--ink); color: var(--paper); }
.primary:hover { background: #3e4538; border-color: #3e4538; }
.login-form .button { margin-top: 28px; min-width: 112px; }
.submit-row { display: flex; align-items: center; gap: 20px; }
.submit-row .button { flex-shrink: 0; }
.text-button { display: inline-flex; align-items: center; min-height: 44px; border: 0; background: transparent; text-decoration: underline; text-underline-offset: 4px; padding: 8px 0 8px 12px; white-space: nowrap; font-size: 13px; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 1px 17px; border-bottom: 1px solid var(--line); margin-bottom: 29px; }
.account-row p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.6; overflow-wrap: anywhere; min-width: 0; }
.account-row strong { display: block; color: var(--ink); font-weight: 550; }
.requests-panel { margin-top: 59px; padding-top: 29px; border-top: 1px solid var(--ink); scroll-margin-top: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.section-heading h2 { margin-bottom: 0; }
.refresh-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-size: 13px; padding: 8px 0 8px 8px; text-decoration-color: var(--line); text-align: right; }
.refresh-link:hover { text-decoration-color: currentColor; }
.requests-panel .section-intro { margin-bottom: 0; }
.sync-status { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 8px 0 0; }
.availability-feedback { margin: -10px 0 25px; padding: 0 0 0 12px; border-left: 1px solid var(--line); font-size: 13px; color: var(--jade); line-height: 1.6; }
.availability-feedback p { margin: 0 0 5px; }
.availability-feedback .is-full { color: var(--muted); }
.cancel-confirm { margin-top: 18px; font-size: 13px; }
.cancel-confirm summary { width: fit-content; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.cancel-confirm[open] summary { margin-bottom: 12px; }
.cancel-confirm > p { color: var(--muted); line-height: 1.6; margin-bottom: 5px; }
.cancel-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.cancel-actions .text-button { padding: 6px 0; }
.cancel-submit, .cancel-error { color: var(--error); }
.cancel-error { margin: 6px 0 0; line-height: 1.6; }
.reservation { border-bottom: 1px solid var(--line); padding-block: 27px; }
.reservation-top { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; }
.reservation h3 { font-size: 21px; font-weight: 550; letter-spacing: -.4px; margin-bottom: 0; overflow-wrap: anywhere; min-width: 0; }
.status { padding: 4px 8px; font-size: 11px; line-height: 1.6; border-radius: 2px; max-width: 55%; }
.status.pending { color: #6b5424; background: #eae3d1; }
.status.confirmed { color: var(--jade); background: #e1e8dd; }
.status.declined { color: var(--error); background: #f1e3dc; }
.status.cancelled { color: var(--muted); background: #e5e4db; }
.reservation-details { display: grid; grid-template-columns: 1.2fr 1fr .7fr; gap: 18px; margin: 22px 0 18px; }
.reservation-details div { min-width: 0; }
.reservation-details dt { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.reservation-details dd { font-size: 17px; font-weight: 500; margin: 0; overflow-wrap: anywhere; }
.contact, .notes { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; margin-bottom: 8px; }
.notes { white-space: pre-wrap; }
.field-label { color: var(--muted); font-size: 12px; font-weight: 400; margin-right: 8px; }
.reference { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; margin: 14px 0 0; }
.notice { font-size: 14px; line-height: 1.6; padding: 13px 16px; background: #e1e8dd; border-left: 2px solid var(--jade); margin: 0 0 24px; overflow-wrap: anywhere; }
.notice.error { color: var(--error); background: #f1e3dc; border-color: var(--error); }
.empty-state { font-size: 14px; line-height: 1.65; padding: 25px 0; color: var(--muted); margin: 0; max-width: 55ch; }
footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-block: 22px 28px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.skip-link { position: absolute; left: 20px; top: -100px; background: var(--ink); color: white; padding: 12px; z-index: 5; }
.skip-link:focus { top: 12px; }

@media (max-width: 1000px) {
  .site-header, main, footer { width: calc(100% - 72px); }
  main { grid-template-columns: 245px minmax(0, 1fr); gap: 48px; }
  h1 { font-size: 38px; }
  .schedule-fields { grid-template-columns: 1fr 1fr; gap: 22px; }
  .party-field { max-width: 180px; }
  .submit-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 760px) {
  .site-header, main, footer { width: calc(100% - 44px); }
  .site-header { padding-top: 25px; gap: 18px; }
  .brand-mark { font-size: 48px; }
  .brand-name { font-size: 21px; }
  .brand { gap: 13px; }
  .language-nav { gap: 12px; }
  main { grid-template-columns: minmax(0, 1fr); gap: 35px; padding-top: 38px; padding-bottom: 55px; max-width: 570px; }
  .page-heading { max-width: none; }
  h1 { font-size: 37px; max-width: 450px; margin-bottom: 11px; }
  h2 { font-size: 24px; }
  .welcome { font-size: 16px; max-width: none; }
  .table-sketch { display: none; }
  .login-panel { padding-top: 25px; margin-top: 0; max-width: none; }
  .login-panel .section-intro { margin-bottom: 26px; }
  .field-grid { gap: 22px; }
  .schedule-fields { grid-template-columns: 1.2fr 1fr 1.1fr; gap: 15px; }
  .party-field { max-width: none; }
  .account-row { padding-top: 0; margin-bottom: 25px; }
  .section-heading { gap: 12px; }
  .reservation-details { gap: 12px; }
  .reservation-details dd { font-size: 16px; }
  .requests-panel { margin-top: 45px; padding-top: 24px; }
  footer { flex-direction: column; gap: 5px; padding-block: 20px 25px; }
}
:lang(zh-Hans) h1, :lang(zh-Hans) h2 { letter-spacing: 0; line-height: 1.35; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .language-nav.has-indicator::after, .language-nav.has-indicator a { transition: none; }
}
@media (max-width: 480px) {
  .brand-mark { font-size: 43px; }
  .brand-location { max-width: 75px; line-height: 1.4; }
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .schedule-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .party-field { max-width: none; grid-column: 1 / -1; }
  .party-field input { width: 128px; }
  .reservation-top { flex-direction: column; gap: 10px; }
  .status { max-width: 100%; }
  .reservation h3 { font-size: 21px; }
  .section-heading h2 { font-size: 22px; }
}
