:root {
  --background: #faf8f5;
  --surface: #ffffff;
  --text: #2a2724;
  --muted: #736b63;
  --line: #e7e0d8;
}

* { box-sizing: border-box; }

html { overflow-wrap: anywhere; }

body {
  margin: 0;
  min-width: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

.page-shell {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

.site-header {
  text-align: center;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.site-title {
  display: inline-block;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .08em;
  text-decoration: none;
}

.tagline { margin: .5rem 0 1.25rem; color: var(--muted); }

.account {
  min-height: 3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem;
}

.button,
.back-link,
.logout {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .7rem 1.1rem;
  border-radius: .6rem;
  font-weight: 700;
}

.button { background: var(--text); color: #fff; text-decoration: none; }
.logout, .back-link { color: #5f574f; }

.profile-image {
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  border-radius: 50%;
  object-fit: cover;
}

.name { min-width: 0; font-weight: 700; }
.product-list { padding-top: 1.75rem; }

.product-list > h2,
.detail > h2 { margin: 0 0 1rem; font-size: 1.5rem; }

.product-card {
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: .35rem solid var(--brand-color, #8C7B6B);
  border-radius: .75rem;
  background: var(--surface);
  box-shadow: 0 .15rem .5rem rgb(42 39 36 / 6%);
}

.product-card-link {
  display: block;
  min-height: 3rem;
  padding: 1rem;
  text-decoration: none;
}

.product-card-link:focus-visible,
.button:focus-visible,
.back-link:focus-visible,
.logout:focus-visible,
.site-title:focus-visible {
  outline: .2rem solid #6d5c4d;
  outline-offset: .2rem;
}

.brand-name { margin: 0 0 .2rem; color: var(--muted); font-size: .9rem; font-weight: 700; }
.product-card h3 { margin: 0 0 .75rem; font-size: 1.2rem; }
.product-meta, .detail-meta { margin: 0; }

.product-meta > div,
.detail-meta > div {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: .5rem;
  padding: .3rem 0;
}

dt { color: var(--muted); font-size: .9rem; font-weight: 700; }
dd { min-width: 0; margin: 0; }

.notice {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--surface);
}

.detail {
  margin-top: 1.75rem;
  overflow: hidden;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--surface);
}

.detail-brand-band {
  height: .4rem;
  margin: -1.25rem -1.25rem 1.25rem;
  background: var(--brand-color, #8C7B6B);
}

.summary { white-space: normal; }
.detail-meta { margin: 1.25rem 0; }
.external-link, .back-link { width: 100%; margin-top: .5rem; }
.site-footer { padding-top: 2rem; color: var(--muted); font-size: .8rem; text-align: center; }

@media (min-width: 40rem) {
  .page-shell { padding-right: 1.5rem; padding-left: 1.5rem; }
}
