:root {
  color-scheme:light;
  --paper:#f8f7f1;
  --ink:#283d33;
  --muted:#53675b;
  --line:#d1d8cc;
  --surface:#fffefa;
  --accent:#2e4d40;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font:16px/1.5 system-ui,-apple-system,sans-serif;
}

main,.mast-inner {
  max-width:880px;
  margin:auto;
  padding:0 22px;
}

.mast {
  border-bottom:1px solid var(--line);
}

.mast-inner,footer,.strip,.row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.mast-inner {
  min-height:66px;
}

.wordmark,footer span:first-child {
  font:600 25px Georgia,serif;
  letter-spacing:.09em;
}

.wordmark span {
  font-weight:400;
}

.mast small {
  font-size:12px;
  color:var(--muted);
  text-align:right;
}

.intro {
  padding:22px 0 14px;
}

.intro p {
  max-width:550px;
}

.eyebrow {
  color:var(--muted);
  font-size:11px;
  letter-spacing:.14em;
  font-weight:700;
  text-transform:uppercase;
}

h1,h2,h3 {
  font-family:Georgia,'Times New Roman',serif;
  font-weight:400;
  line-height:1.1;
  overflow-wrap:anywhere;
}

h1 {
  font-size:clamp(38px,7vw,62px);
  margin:8px 0 12px;
  letter-spacing:-.035em;
}

h2 {
  font-size:clamp(25px,4.8vw,35px);
  margin:5px 0 10px;
}

h3 {
  font-size:23px;
  margin:7px 0;
}

p {
  margin:6px 0 14px;
  color:var(--muted);
  overflow-wrap:anywhere;
}

button,input,select,textarea {
  font:inherit;
}

button {
  color:var(--ink);
  background:var(--surface);
  border:1px solid #8e9e90;
  border-radius:7px;
  min-height:43px;
  padding:8px 14px;
  cursor:pointer;
}

button.primary,nav [aria-pressed="true"] {
  background:var(--accent);
  color:white;
  border-color:var(--accent);
}

button:disabled {
  opacity:.55;
  cursor:default;
}

button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible {
  outline:3px solid #987144;
  outline-offset:2px;
}

nav {
  display:inline-flex;
  border:1px solid var(--line);
  border-radius:25px;
  padding:3px;
  gap:4px;
  margin-top:20px;
}

nav button {
  border:0;
  border-radius:24px;
  background:transparent;
  padding:6px 16px;
  min-height:36px;
  font-size:14px;
}

.strip {
  border-block:1px solid var(--line);
  font-size:14px;
  padding:2px 0;
}

.text-btn {
  color:var(--accent);
  border:none;
  background:transparent;
  text-decoration:underline;
  text-underline-offset:4px;
  padding:6px;
}

.owner {
  font-size:13px;
  color:var(--muted);
  display:flex;
  gap:6px;
  align-items:center;
}

.schedule-msg {
  background:#eef1e8;
  border-radius:8px;
  padding:12px 14px;
  margin:12px 0;
}

.catalog {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,216px),1fr));
  gap:16px;
  margin-block:20px;
}

.card,.panel {
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
  overflow:hidden;
}

.card {
  display:flex;
  flex-direction:column;
}

.card img,.placeholder {
  width:100%;
  height:auto;
  aspect-ratio:4/3;
  object-fit:cover;
  background:#e4e8dc;
}

.placeholder {
  display:grid;
  place-items:center;
  font:italic 18px Georgia;
  color:#4b5c4f;
}

.card-body {
  padding:15px;
  display:flex;
  flex:1;
  align-items:flex-start;
  flex-direction:column;
}

.card h2 {
  font-size:24px;
  margin:6px 0;
}

.card p {
  font-weight:650;
  margin:0 0 14px;
}

.card button {
  margin-top:auto;
  width:100%;
}

.panel {
  padding:20px;
  margin:14px 0;
}

.action {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.action p {
  margin-bottom:0;
}

.action button {
  flex-shrink:0;
}

.gift {
  background:#e9ede2;
}

.entry {
  padding:11px 0;
  border-bottom:1px solid var(--line);
  overflow-wrap:anywhere;
}

.entry:last-child {
  border-bottom:0;
}

.entry p {
  margin:4px 0;
  white-space:pre-line;
}

.row {
  align-items:baseline;
  flex-wrap:wrap;
}

.buttons {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:9px 0 0;
}

.signed {
  font-weight:600;
}

.panel small,.note,small {
  color:var(--muted);
}

footer {
  border-top:1px solid var(--line);
  padding:19px 0 34px;
  margin-top:30px;
  font-size:12px;
  color:var(--muted);
}

footer span:first-child {
  font-size:14px;
}

.text-btn:hover {
  text-decoration-thickness:2px;
}

dialog {
  position:fixed;
  max-height:90dvh;
  width:min(94vw,460px);
  margin:auto;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
  color:var(--ink);
  padding:24px;
}

dialog::backdrop {
  background:#0d2219a8;
}

dialog .close {
  float:right;
  border:0;
  background:transparent;
  font-size:27px;
  line-height:1;
  padding:2px 8px;
}

dialog h2 {
  clear:both;
}

label {
  display:grid;
  gap:5px;
  margin:12px 0;
  font-size:14px;
  font-weight:550;
}

input:not([type=checkbox]),select,textarea {
  color:var(--ink);
  background:white;
  border:1px solid #95a394;
  border-radius:6px;
  min-width:0;
  padding:10px;
  width:100%;
}

textarea {
  min-height:72px;
  resize:vertical;
}

output {
  display:block;
  overflow-wrap:anywhere;
}

output:not(:empty) {
  padding:12px 0;
  font-weight:550;
}

#submit {
  width:100%;
  margin-top:8px;
}

.postcard {
  display:block;
  width:100%;
  border:1px solid var(--line);
  border-radius:9px;
}

.grid2 {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

[hidden] {
  display:none!important;
}

@media(max-width:490px) {
  main,.mast-inner {
    padding-inline:16px;
  }
  .intro {
    padding-top:19px;
  }
  .catalog {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
  }
  .card-body {
    padding:10px;
  }
  .card h2 {
    font-size:19px;
  }
  .card small {
    font-size:12px;
  }
  .action {
    align-items:flex-start;
    flex-direction:column;
  }
  .panel {
    padding:16px;
  }
}

@media(max-width:330px) {
  .catalog {
    grid-template-columns:1fr;
  }
}
