:root {
  --bg: #f6f1ea;
  --bg-soft: #fcfaf7;
  --paper: rgba(255, 255, 255, 0.84);
  --paper-strong: #fffdf9;
  --line: rgba(93, 74, 58, 0.14);
  --line-strong: rgba(93, 74, 58, 0.22);
  --text: #2f241d;
  --muted: #6e5c4f;
  --accent: #7a5a43;
  --accent-soft: #ede0d2;
  --shadow: 0 22px 60px rgba(53, 35, 22, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(213, 191, 168, 0.42), transparent 32%),
    linear-gradient(180deg, #f9f5ef 0%, #f3ede5 52%, #f7f2eb 100%);
}

body.modal-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.hero-card,
.content-card,
.catalog-frame,
.catalog-summary {
  backdrop-filter: blur(18px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 34px;
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}

.hero-title {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4.8vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-copy,
.section-copy,
.helper,
.catalog-note,
.field-note {
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions,
.catalog-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button {
  background: var(--text);
  color: #fff;
  font-weight: 600;
}

.button:hover,
.text-link:hover {
  transform: translateY(-1px);
}

.text-link {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
}

.hero-side {
  padding: 22px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(247, 238, 229, 0.95)),
    radial-gradient(circle at top right, rgba(171, 141, 112, 0.18), transparent 40%);
  border: 1px solid var(--line);
}

.mini-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.mini-list li:last-child {
  border-bottom: 0;
}

.content-card {
  padding: 30px;
}

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.section-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field,
.field-wide {
  display: grid;
  gap: 8px;
}

.field-wide {
  grid-column: 1 / -1;
}

label {
  font-size: 0.96rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--paper-strong);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(122, 90, 67, 0.45);
  box-shadow: 0 0 0 4px rgba(122, 90, 67, 0.1);
}

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

.catalog-callout {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), rgba(248, 241, 233, 0.92)),
    radial-gradient(circle at top left, rgba(194, 165, 135, 0.2), transparent 45%);
}

.catalog-intro {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.catalog-logo-wrap {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

.catalog-logo {
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: contain;
}

.logo-missing {
  min-height: 180px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
}

.catalog-callout h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(122, 90, 67, 0.12);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
}

.submit-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.submit-note {
  max-width: 46ch;
  color: var(--muted);
  font-size: 0.95rem;
}

.catalog-page .page-shell {
  width: min(1280px, calc(100% - 28px));
}

.catalog-header {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.catalog-summary {
  padding: 24px;
}

.catalog-frame {
  padding: 24px;
}

.catalog-page-intro {
  margin-bottom: 20px;
}

.catalog-page-title {
  margin: 8px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.simple-catalog-frame {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 12px 0 32px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.charm-card {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  cursor: pointer;
  outline: none;
}

.charm-card:focus-visible {
  box-shadow: 0 0 0 4px rgba(122, 90, 67, 0.18);
}

.charm-media {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  padding: 6px;
}

.zoomable-media {
  overflow: hidden;
}

.charm-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.charm-meta {
  display: grid;
  gap: 0;
  padding: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.charm-id {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.empty-state {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-strong);
  text-align: center;
  color: var(--muted);
}

.charm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(31, 23, 17, 0.72);
  backdrop-filter: blur(8px);
}

.charm-modal[hidden] {
  display: none;
}

.charm-modal-card {
  width: min(92vw, 840px);
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 252, 248, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.charm-modal-media {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  padding: 10px;
  border-radius: 20px;
  background: #ffffff;
}

.charm-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.charm-modal-label {
  margin: 14px 0 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
}

.charm-modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

@media (max-width: 860px) {
  .hero-grid,
  .form-grid,
  .submit-row {
    grid-template-columns: 1fr;
  }

  .catalog-intro {
    grid-template-columns: 1fr;
  }

  .submit-row {
    align-items: start;
  }
}
