:root {
  --terracotta: #9d4f35;
  --deep: #3b2922;
  --cream: #fffaf0;
  --paper: #fffdf7;
  --mustard: #e5ae3b;
  --line: #e7d9c7;
  --shadow: 0 12px 28px #55312212;
  --radius: 18px;
  font-family: ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  color: var(--deep);
  background: var(--cream);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 90% 0, #f4dca444, transparent 27rem), var(--cream);
  font-size: 16px;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, a:focus-visible {
  outline: 3px solid #8f3f2d;
  outline-offset: 3px;
}

/* Header and page introduction */
.site-header { background: var(--terracotta); color: #fffaf0; border-bottom: 5px solid var(--mustard); }
.header-inner { max-width: 1160px; margin: auto; padding: 17px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { font-size: 2rem; line-height: 1; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.13rem; letter-spacing: .02em; }
.brand small { font-size: .7rem; opacity: .8; letter-spacing: .08em; text-transform: uppercase; }
.header-note { margin: 0; font-family: Georgia, serif; font-style: italic; opacity: .9; font-size: .9rem; }
.page-shell { max-width: 1160px; margin: 0 auto; padding: 48px 22px 55px; }
.intro { max-width: 690px; margin-bottom: 34px; }
.eyebrow { margin: 0 0 6px; color: var(--terracotta); font-size: .68rem; font-weight: 800; letter-spacing: .16em; }
.intro h1 { margin: 0; font-family: Georgia, serif; font-weight: 500; font-size: clamp(2.35rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -.04em; }
.intro h1 em { color: var(--terracotta); font-weight: 400; }
.intro-copy { max-width: 500px; margin: 19px 0 0; font-size: 1.04rem; color: #6f5a4c; }
.notice, .form-error { padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; }
.notice { background: #e4eedf; color: #304a32; }
.form-error { background: #f9ddd2; color: #6b281e; }

/* Form card */
.workspace-grid { display: grid; gap: 30px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-card { padding: 25px; }
.card-heading, .catalogue-heading { display: flex; align-items: center; gap: 13px; }
.card-heading { margin-bottom: 23px; }
.card-heading h2, .catalogue h2 { margin: 0; font-family: Georgia, serif; font-size: 1.65rem; font-weight: 500; }
.stamp { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; background: var(--mustard); font-size: 1.7rem; color: #65431c; }
.field { display: flex; flex: 1; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field label { font-size: .82rem; font-weight: 700; }
.field label span { color: var(--terracotta); }
.form-row { display: flex; gap: 13px; }
.field-wide { flex: 1.45; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #d9c9b8; border-radius: 9px; background: #fffefb; padding: 10px 11px; min-height: 44px; }
.field textarea { resize: vertical; min-height: 80px; }
.field input::placeholder, .field textarea::placeholder { color: #a08c7e; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 3px; }
.button { border: 0; border-radius: 9px; min-height: 44px; padding: 10px 17px; font-weight: 800; }
.button-primary { background: var(--terracotta); color: #fffaf0; box-shadow: 0 3px 0 #743622; }
.button-primary:hover { background: #833e2b; }
.button-quiet { background: transparent; color: var(--terracotta); border: 1px solid var(--line); }

/* Catalogue and loading state */
.catalogue-heading { justify-content: space-between; margin-bottom: 15px; }
.count-badge { display: grid; place-items: center; min-width: 40px; height: 40px; border-radius: 50%; background: var(--mustard); font-weight: 900; }
.filter-tabs { display: flex; gap: 8px; overflow: auto; padding: 3px 3px 9px; }
.filter-tab { border: 1px solid var(--line); border-radius: 999px; background: transparent; min-height: 44px; padding: 8px 15px; white-space: nowrap; font-weight: 700; color: #725c4c; }
.filter-tab.is-active { background: var(--deep); border-color: var(--deep); color: var(--cream); }
.loading-state { display: flex; gap: 10px; padding: 30px 0; }
.loading-state span { height: 105px; flex: 1; border-radius: 12px; background: linear-gradient(100deg, #ebddcb 30%, #fff7e9 45%, #ebddcb 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.summary { color: #796557; font-size: .9rem; margin: 4px 0 12px; }
.entry-list { display: grid; gap: 12px; }
.entry-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 7px 17px #5531220d; padding: 17px; }
.entry-card-header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.entry-heading h3 { margin: 0; font-family: Georgia, serif; font-size: 1.28rem; line-height: 1.13; }
.entry-city { margin: 3px 0 0; color: #806b5c; font-size: .88rem; }
.status-badge { display: inline-flex; align-items: center; min-height: 26px; border-radius: 999px; padding: 4px 8px; font-size: .69rem; font-weight: 800; line-height: 1; white-space: nowrap; }
.status-wishlist { color: #704326; background: #f7df9f; }
.status-visited { color: #2e5238; background: #dcebdc; }
.dumpling-rating { margin: 13px 0 8px; font-size: 1.06rem; letter-spacing: 1px; }
.entry-detail { display: flex; gap: 7px; margin: 7px 0 0; color: #604d41; font-size: .88rem; }
.entry-detail-label { color: var(--terracotta); font-weight: 800; }
.entry-note { margin: 11px 0 0; padding: 10px 11px; border-left: 3px solid var(--mustard); background: #fff8e9; color: #604d41; font-size: .9rem; }
.entry-actions { display: flex; gap: 8px; margin-top: 15px; }
.entry-action { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: transparent; padding: 6px 10px; color: var(--terracotta); font-size: .8rem; font-weight: 800; }
.entry-delete { color: #8a3128; }
.button:disabled, .entry-action:disabled { cursor: wait; opacity: .62; }
.empty-state { border: 1px dashed #cdbca8; border-radius: 14px; padding: 28px 18px; color: #806d5e; text-align: center; }
.empty-state h3 { margin: 7px 0 4px; color: var(--deep); font-family: Georgia, serif; font-size: 1.35rem; font-weight: 500; }
.empty-state p { max-width: 310px; margin: 0 auto; font-size: .9rem; }
.empty-mark { display: block; font-size: 1.65rem; }
.site-footer { border-top: 1px solid var(--line); padding: 21px 22px; text-align: center; color: #866f5f; font-size: .82rem; }
.hidden { display: none; }

@keyframes shimmer { to { background-position: -200% 0; } }

@media (min-width: 700px) {
  .workspace-grid { grid-template-columns: minmax(310px, .85fr) minmax(0, 1.15fr); align-items: start; }
  .catalogue { padding-top: 8px; }
  .form-card { padding: 29px; }
  .page-shell { padding-top: 62px; }
}

@media (max-width: 520px) {
  .header-note { display: none; }
  .header-inner { padding: 14px 18px; }
  .page-shell { padding: 35px 16px 45px; }
  .intro h1 { font-size: 2.65rem; }
  .form-row { display: block; }
  .form-card { padding: 20px 17px; }
  .catalogue-heading { margin-top: 4px; }
  .filter-tabs { margin-inline: -3px; }
  .button { flex: 1; padding-inline: 11px; }
  .site-footer { padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loading-state span { animation: none; }
}
