:root {
  --bg: #f7f4ee;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #202322;
  --muted: #6f6a60;
  --line: #ded6ca;
  --accent: #b43f32;
  --accent-dark: #743024;
  --teal: #236967;
  --gold: #a8792a;
  --shadow: 0 14px 34px rgba(47, 41, 32, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.7;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 253, 248, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar__inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.post-link,
button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 700;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
}

.hero {
  background:
    linear-gradient(90deg, rgba(255, 253, 248, .95), rgba(255, 253, 248, .72)),
    repeating-linear-gradient(90deg, #d8c8b2 0 1px, transparent 1px 36px),
    linear-gradient(135deg, #f4dca8, #d7e1dc 55%, #f6f2ea);
  border-bottom: 1px solid var(--line);
}

.hero__grid {
  min-height: 276px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  align-items: end;
  gap: 24px;
  padding: 36px 0 30px;
}

.eyebrow {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 8px;
}

h1 {
  font-size: clamp(34px, 6vw, 64px);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0 0 14px;
}

h2 {
  font-size: 22px;
  line-height: 1.25;
  margin: 0;
}

.lead {
  color: #3c3933;
  font-size: 17px;
  max-width: 760px;
  margin: 0;
}

.notice {
  align-self: stretch;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.notice p {
  color: var(--muted);
  font-size: 14px;
  margin: 6px 0 0;
}

.search-panel {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.controls {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px 0;
}

label span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 4px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(35, 105, 103, .16);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 22px 0 18px;
}

.stats div {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.stats b,
.stats span {
  display: block;
}

.stats b {
  font-size: 28px;
  line-height: 1.1;
}

.stats span {
  color: var(--muted);
  font-size: 13px;
}

.results-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0 12px;
}

.results-head p {
  color: var(--muted);
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 380px;
  padding: 16px;
}

.card__meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.card h3 {
  font-size: 21px;
  line-height: 1.25;
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.chip {
  background: #ece3d4;
  border-radius: 999px;
  color: #4f473c;
  font-size: 12px;
  padding: 2px 8px;
}

.chip--photo {
  background: #dceae8;
  color: #164d4a;
}

.chip--warn {
  background: #f0ded6;
  color: #743024;
}

.photo {
  align-items: center;
  aspect-ratio: 16 / 8;
  background: linear-gradient(135deg, #fffaf0, #e9efee);
  border: 1px dashed #cabaa2;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  justify-content: center;
  margin-bottom: 12px;
  text-align: center;
}

.score {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.score div {
  background: #fbf8f2;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  padding: 8px 6px;
  text-align: center;
}

.score b {
  color: var(--ink);
  font-size: 18px;
}

.review {
  display: -webkit-box;
  font-size: 14px;
  margin: 0;
  overflow: hidden;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
}

.empty,
.error {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  grid-column: 1 / -1;
  padding: 28px;
}

.error {
  border-color: #d69a90;
  color: var(--accent-dark);
}

.submit {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 28px;
  margin-top: 34px;
  padding: 30px 0 48px;
}

.submit p {
  color: var(--muted);
  margin: 10px 0 0;
}

.submit-form {
  display: grid;
  gap: 10px;
}

.submit-form button {
  justify-self: start;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding: 22px 0;
}

@media (max-width: 900px) {
  .hero__grid,
  .controls,
  .stats,
  .cards,
  .submit {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
  }

  .notice {
    align-self: auto;
  }
}

@media (max-width: 520px) {
  .wrap {
    width: min(100% - 24px, 1120px);
  }

  .brand__mark {
    display: none;
  }

  .post-link {
    min-width: 82px;
    padding-inline: 10px;
  }

  .hero__grid {
    min-height: 0;
    padding: 28px 0 24px;
  }
}
