:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --ink: #234b40;
  --muted: #53675f;
  --accent: #dfe7d7;
  --surface: #fffdf9;
  --line: #d9dfd5;
  --display: Georgia, "Times New Roman", serif;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body { margin: 0; line-height: 1.5; }

.skip-link {
  position: fixed;
  inset: 0.75rem auto auto 0.75rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  background: var(--ink);
  color: #fff;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.page {
  max-width: 76rem;
  min-height: 100svh;
  margin-inline: auto;
  padding: 1.25rem clamp(1.25rem, 5vw, 3.5rem) 3rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  font-family: var(--display);
  font-size: 1.9rem;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark { width: 1.65rem; height: 1.65rem; flex: none; }

.welcome { padding-block: clamp(4rem, 12vh, 8rem); }

.eyebrow {
  margin-block: 0 1rem;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.15rem, 10vw, 6.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.intro {
  max-width: 28rem;
  margin-block: 1.75rem 2.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--muted);
}

.notice {
  width: fit-content;
  max-width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: var(--accent);
  font-size: 0.95rem;
  line-height: 1.5;
}

a { color: inherit; text-underline-offset: 0.2em; }

a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }

:focus-visible, [data-focus-feedback]:focus {
  outline: 3px solid #79542b;
  outline-offset: 4px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 0.5rem;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.button:hover { background: #17372e; }
.button-secondary { background: transparent; color: var(--ink); }
.button-secondary:hover { background: var(--accent); }
[aria-disabled="true"] { cursor: wait; }
.button[aria-disabled="true"] { background: var(--muted); border-color: var(--muted); }

.owner-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.owner-header form { margin: 0; }
.owner-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; font-size: 0.9rem; }
.visitor-header { gap: 0.75rem; }
.visitor-header .button-link { font-size: 0.875rem; white-space: nowrap; }
.owner-nav form { margin: 0; }
.owner-nav a[aria-current="page"] { font-weight: 700; text-decoration-thickness: 3px; }
.owner-nav a, .button-link, .item-actions a, .form-actions > a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-block: 0.5rem;
}
.button-link { padding-inline: 0; background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.section-title { font-size: clamp(2.6rem, 6vw, 4.25rem); line-height: 1.06; text-wrap: balance; }
.list-section, .form-section { margin-block: clamp(2rem, 5vw, 3rem); }
.form-section { max-width: 38rem; }
.list-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; margin-bottom: 2rem; }
.list-intro { max-width: 40rem; margin-block: 1.25rem 0; color: var(--muted); line-height: 1.65; }
.visitor-intro { margin-bottom: 2rem; }
.visitor-help.help { max-width: 42rem; margin-top: 1.5rem; }
.eyebrow { line-height: 1.5; }
.item-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.item-grid { align-items: start; }
.item-card { min-width: 0; padding: clamp(1.25rem, 3vw, 1.75rem); border: 1px solid var(--line); border-radius: 0.9rem; background: var(--surface); overflow-wrap: anywhere; }
.item-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; margin: 0 0 1.25rem; font-size: 0.8rem; color: var(--muted); }
.item-quantity { margin-left: auto; white-space: nowrap; }
.priority { line-height: 1.5; }
.priority-high { background: var(--accent); color: var(--ink); border-radius: 2rem; padding: 0.3rem 0.65rem; }
h2 { margin-block: 0.75rem; font-size: 1.35rem; font-weight: 650; line-height: 1.4; }
.item-card h2 { margin-block: 0 0.85rem; font-family: var(--display); font-size: clamp(1.55rem, 3vw, 1.9rem); font-weight: 400; line-height: 1.2; letter-spacing: -0.025em; }
.item-notes { margin-block: 0 0.75rem; white-space: pre-wrap; line-height: 1.6; color: var(--muted); }
.product-link { display: inline-flex; align-items: center; min-height: 2.75rem; gap: 0.4rem; font-size: 0.9rem; }
.link-icon { width: 1rem; height: 1rem; flex: none; }
.item-actions { display: flex; gap: 0.5rem 1.5rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 0.75rem; margin-top: 1rem; font-size: 0.9rem; }
.item-actions form { margin: 0; }
.empty-state { background: var(--accent); border-radius: 0.9rem; padding: 1.5rem; line-height: 1.6; }
.messages { margin-top: 1.5rem; padding: 0.25rem 1rem; background: var(--accent); border-radius: 0.8rem; line-height: 1.5; }
.form-panel { margin-top: 2rem; }
.field { margin-bottom: 1.5rem; }
.field label { display: block; font-weight: 650; margin-bottom: 0.6rem; }
input, select, textarea { width: 100%; min-height: 3rem; border: 1px solid #81938a; border-radius: 0.5rem; padding: 0.8rem; background: var(--surface); color: var(--ink); font: inherit; }
textarea { resize: vertical; }
.help { margin-block: 0.5rem; font-size: 0.9rem; line-height: 1.5; color: var(--muted); }
.error-summary, .errorlist { color: #842f27; line-height: 1.5; }
.error-summary { padding: 0.75rem 1rem; margin-bottom: 1.5rem; border: 1px solid #842f27; border-radius: 0.8rem; background: #fff0ec; }
.error-summary ul:empty { display: none; }
.error-summary a { display: inline-block; min-height: 2.75rem; padding-block: 0.6rem; }
.field-error input, .field-error select, .field-error textarea { border-color: #842f27; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.personal-code { font-family: ui-monospace, monospace; font-size: 1.2rem; letter-spacing: 0.04em; }
.reservation-controls { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.availability { margin-block: 0 1rem; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.availability-full { width: fit-content; padding: 0.5rem 0.75rem; background: #eeefe7; border-radius: 0.6rem; }
.own-commitment { width: fit-content; margin-block: 0 1rem; padding: 0.5rem 0.75rem; border-radius: 0.5rem; background: var(--accent); font-size: 0.9rem; font-weight: 650; }
.reservation-form { display: grid; gap: 0.65rem; margin: 0; }
.reservation-form label { font-size: 0.9rem; font-weight: 650; }
.reservation-form .help { margin: 0; }
.reservation-inputs { display: flex; align-items: stretch; flex-wrap: wrap; gap: 0.75rem; }
.reservation-form input[type="number"] { flex: 0 1 5rem; width: 5rem; min-width: 4rem; }
.reservation-inputs .button { flex: 1; font-size: 0.9rem; }
.reservation-compact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; }
.reservation-compact .availability { flex: 1 1 7rem; margin: 0; }
.reservation-compact .reservation-form { flex: 1 1 7rem; max-width: 12rem; }
.reservation-cancel { margin-top: 0.5rem; }
.reservation-cancel .button-link { font-size: 0.9rem; }
.picture-frame { margin-block: 1rem; }
.item-picture { display: block; width: 100%; height: auto; max-height: 20rem; object-fit: contain; border-radius: 0.75rem; background: #fff; }
.item-card .picture-frame { margin-block: 0 1.25rem; }
.item-card .item-picture { aspect-ratio: 3 / 2; max-height: 18rem; border-radius: 0.5rem; }
.picture-fallback { padding: 1rem; border-radius: 0.75rem; background: var(--paper); color: var(--muted); }
[hidden] { display: none !important; }
.submit-status { margin-block: 1rem; padding: 0.75rem 1rem; border-radius: 0.6rem; background: var(--accent); line-height: 1.5; }

@media (min-width: 900px) {
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}

@media (max-width: 599px) {
  .page { padding: 0.75rem 1.25rem 2rem; }
  .wordmark { font-size: 1.5rem; gap: 0.5rem; }
  .brand-mark { width: 1.35rem; height: 1.35rem; }
  .owner-header { gap: 0.5rem; padding-bottom: 0.75rem; }
  .owner-nav { width: 100%; gap: 0.15rem 1rem; font-size: 0.85rem; }
  .visitor-intro .section-title { max-width: 11ch; }
  .visitor-intro .list-intro { font-size: 0.95rem; }
  .visitor-intro { margin-bottom: 1.5rem; }
  .eyebrow { font-size: 0.65rem; letter-spacing: 0.14em; }
  .item-meta { font-size: 0.75rem; }
  .list-heading > .button { width: 100%; }
  .form-actions > .button { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
