:root {
  --bg: #f6efe3;
  --surface: #fffaf2;
  --surface-muted: #efe5d3;
  --text: #231f1a;
  --text-muted: #6b6155;
  --border: #e2d6c1;
  --border-strong: #cbbb9f;
  --primary: #d9512f;
  --primary-dark: #b53f22;
  --primary-soft: #fbe0d6;
  --green: #1f6b55;
  --green-soft: #dcebe2;
  --mustard: #efb03a;
  --mustard-soft: #fbecc4;
  --lilac: #8f7fd1;
  --lilac-soft: #e8e3f7;
  --danger: #b8322a;
  --danger-soft: #fbe3df;
  --success: #1f6b55;
  --success-soft: #dcebe2;
  --warning: #8a5a00;
  --warning-soft: #fbecc4;
  --shadow: 0 1px 0 rgba(35, 31, 26, 0.04), 0 14px 34px -18px rgba(35, 31, 26, 0.28);
  --shadow-lift: 0 2px 0 rgba(35, 31, 26, 0.05), 0 24px 44px -20px rgba(35, 31, 26, 0.38);
  --radius: 18px;
  --radius-sm: 10px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(36px, 5.4vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 6px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.muted {
  color: var(--text-muted);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lead {
  max-width: 620px;
  color: var(--text-muted);
  font-size: clamp(17px, 1.6vw, 19px);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(246, 239, 227, 0.88);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--text);
  color: var(--mustard);
  transform: rotate(-4deg);
}

.brand-text {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
}

.brand-text em {
  color: var(--primary);
  font-style: italic;
}

.main-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 4px;
}

.nav-link {
  border-radius: 999px;
  padding: 7px 16px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link[aria-current="page"] {
  background: var(--text);
  color: var(--surface);
}

.nav-link:focus-visible {
  outline: 3px solid rgba(217, 81, 47, 0.35);
  outline-offset: 2px;
}

.auth-area,
.user-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-email {
  max-width: 200px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 18px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.button:hover:not(:disabled) {
  background: var(--surface-muted);
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button:focus-visible {
  outline: 3px solid rgba(217, 81, 47, 0.35);
  outline-offset: 2px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 0 var(--primary-dark);
}

.button-primary:hover:not(:disabled) {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.button-primary:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--primary-dark);
  transform: translateY(2px);
}

.button-light {
  border-color: var(--surface);
  background: var(--surface);
  color: var(--text);
}

.button-light:hover:not(:disabled) {
  background: var(--mustard-soft);
}

.button-ghost {
  border-color: transparent;
  background: transparent;
}

.button-ghost:hover:not(:disabled) {
  background: var(--surface-muted);
}

.button-danger {
  border-color: transparent;
  background: transparent;
  color: var(--danger);
}

.button-danger:hover:not(:disabled) {
  background: var(--danger-soft);
}

.button-small {
  min-height: 34px;
  padding: 4px 12px;
  font-size: 13px;
}

.button-large {
  min-height: 52px;
  padding: 12px 26px;
  font-size: 17px;
}

/* Status toast */

.status-wrap {
  position: fixed;
  top: 84px;
  left: 50%;
  z-index: 20;
  width: min(520px, calc(100% - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.status {
  border: 1.5px solid var(--text);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px 16px;
  font-weight: 650;
  box-shadow: var(--shadow-lift);
  pointer-events: auto;
  animation: toast-in 220ms ease-out;
}

.status[data-kind="success"] {
  background: var(--green-soft);
  color: var(--green);
  border-color: var(--green);
}

.status[data-kind="error"] {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger);
}

.status[data-kind="info"] {
  background: var(--mustard-soft);
  color: var(--warning);
  border-color: var(--warning);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* Views */

main {
  flex: 1;
}

.view {
  animation: view-in 260ms ease-out;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* Home */

.home-hero {
  position: relative;
  overflow: hidden;
  padding-block: 64px 72px;
}

.home-hero::before {
  position: absolute;
  inset: auto -10% -60% auto;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-soft) 0%, transparent 65%);
  content: "";
  pointer-events: none;
}

.home-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.highlight {
  position: relative;
  color: var(--primary);
  font-style: italic;
  white-space: nowrap;
}

.highlight::after {
  position: absolute;
  right: 0;
  bottom: 0.04em;
  left: 0;
  z-index: -1;
  height: 0.28em;
  border-radius: 4px;
  background: var(--mustard);
  opacity: 0.55;
  content: "";
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin: 40px 0 0;
}

.hero-stats div {
  display: flex;
  flex-direction: column-reverse;
}

.hero-stats dt {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-stats dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
}

.home-hero-art {
  display: flex;
  justify-content: center;
}

.hero-illustration {
  width: 100%;
  max-width: 460px;
  height: auto;
  overflow: visible;
}

.art-sun { fill: var(--mustard-soft); }
.art-shelf { fill: var(--text); }
.art-ink { fill: var(--text); }
.art-coral { fill: var(--primary); }
.art-green { fill: var(--green); }
.art-mustard { fill: var(--mustard); }
.art-lilac { fill: var(--lilac); }
.art-paper { fill: var(--surface); }

.art-line,
.art-line-ink {
  fill: none;
  stroke-linecap: round;
  stroke-width: 4;
}

.art-line { stroke: var(--text); opacity: 0.55; }
.art-line-ink { stroke: var(--text); stroke-width: 6; }

.home-section {
  padding-block: 56px;
}

.section-intro {
  max-width: 720px;
  margin-bottom: 36px;
}

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

.value-card {
  border: 1.5px solid var(--text);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 6px 6px 0 var(--text);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.value-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--text);
}

.value-card p {
  margin-bottom: 0;
}

.value-card-coral { background: var(--primary-soft); }
.value-card-green { background: var(--green-soft); }
.value-card-mustard { background: var(--mustard-soft); }

.value-icon {
  display: inline-grid;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 14px;
  background: var(--text);
  color: var(--surface);
}

.value-icon svg,
.search-icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.home-steps {
  border-block: 1px solid var(--border);
  background: var(--surface);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 8px;
}

.step p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.step-number {
  display: inline-grid;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  place-items: center;
  border: 1.5px solid var(--text);
  border-radius: 50%;
  background: var(--mustard);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 28px;
  background: var(--green);
  color: var(--surface);
  padding: 44px 48px;
  background-image:
    radial-gradient(circle at 92% 10%, rgba(239, 176, 58, 0.45) 0 70px, transparent 71px),
    radial-gradient(circle at 80% 120%, rgba(217, 81, 47, 0.5) 0 90px, transparent 91px);
}

.cta-band h2 {
  color: inherit;
}

.cta-band p {
  margin-bottom: 0;
  opacity: 0.85;
}

/* Footer */

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  padding-block: 24px;
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
}

.footer-inner p {
  margin: 0;
}

/* Catalog */

.view-catalog {
  padding-block: 44px 24px;
}

.catalog-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.catalog-head h1 {
  font-size: clamp(32px, 4.4vw, 48px);
}

.catalog-head p {
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 2.2fr) minmax(150px, 1fr) minmax(140px, 0.9fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
  border: 1.5px solid var(--text);
  border-radius: 22px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 6px 6px 0 var(--text);
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.toolbar input,
.toolbar select,
.toolbar-clear {
  min-height: 50px;
}

.search-field input {
  min-height: 50px;
  border-radius: 14px;
  padding-left: 52px;
  font-size: 17px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(217, 81, 47, 0.16);
}

input[type="file"] {
  padding: 8px;
}

.field-hint {
  color: var(--text-muted);
  font-size: 12px;
}

.toolbar-clear {
  min-height: 44px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 650;
}

.checkbox input {
  width: auto;
  accent-color: var(--primary);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.active-filters-label {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 650;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  background: var(--mustard-soft);
  padding: 4px 6px 4px 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip:hover {
  background: var(--mustard);
}

.filter-chip-x {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--text);
  color: var(--surface);
  font-size: 12px;
  line-height: 1;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(22px, 2.4vw, 28px);
}

.section-heading p {
  margin-bottom: 0;
}

.results-count {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 650;
}

/* Category cards */

.category-cards-section {
  margin: 14px 0 44px;
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.category-card {
  --tone: var(--primary);
  --tone-soft: var(--primary-soft);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 168px;
  overflow: hidden;
  border: 1.5px solid var(--text);
  border-radius: var(--radius);
  background: var(--tone-soft);
  padding: 18px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--text);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.category-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--text);
}

.category-card:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--text);
}

.category-card:focus-visible {
  outline: 3px solid rgba(217, 81, 47, 0.45);
  outline-offset: 3px;
}

.category-card[data-tone="1"] { --tone: var(--green); --tone-soft: var(--green-soft); }
.category-card[data-tone="2"] { --tone: var(--mustard); --tone-soft: var(--mustard-soft); }
.category-card[data-tone="3"] { --tone: var(--lilac); --tone-soft: var(--lilac-soft); }
.category-card[data-tone="4"] { --tone: var(--text); --tone-soft: var(--surface-muted); }

.category-card-letter {
  position: absolute;
  top: -18px;
  right: 10px;
  color: var(--tone);
  font-family: var(--font-display);
  font-size: 120px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.85;
  transition: transform 220ms ease;
}

.category-card:hover .category-card-letter {
  transform: rotate(-6deg) scale(1.05);
}

.category-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.category-card:hover .category-card-image {
  transform: scale(1.05);
}

.category-card.has-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(35, 31, 26, 0.82) 100%);
  content: "";
}

.category-card-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
}

.category-card-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.category-card-count {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.category-card.has-image .category-card-name,
.category-card.has-image .category-card-count {
  color: #fff;
}

.category-card.has-image .category-card-count {
  opacity: 0.85;
}

/* Object cards */

.catalog {
  min-height: 220px;
}

.loading,
.empty {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.6);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}

.empty h2 {
  color: var(--text);
}

.empty p {
  margin-bottom: 0;
}

.object-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

.object-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.object-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.object-card[role="button"] {
  cursor: pointer;
}

.object-card:focus-visible {
  outline: 3px solid rgba(217, 81, 47, 0.45);
  outline-offset: 3px;
}

.object-media {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  background: var(--surface-muted);
}

.object-media[data-tone="0"] { background: var(--primary-soft); color: var(--primary); }
.object-media[data-tone="1"] { background: var(--green-soft); color: var(--green); }
.object-media[data-tone="2"] { background: var(--mustard-soft); color: #b47d12; }
.object-media[data-tone="3"] { background: var(--lilac-soft); color: var(--lilac); }
.object-media[data-tone="4"] { background: var(--surface-muted); color: var(--text-muted); }

.object-media-letter {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
}

.object-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.object-card:hover .object-photo {
  transform: scale(1.04);
}

.object-media .availability {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
}

.object-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 18px 18px;
}

.card-category {
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.object-body h3 {
  margin-bottom: 6px;
}

.card-description {
  display: -webkit-box;
  margin-bottom: 12px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 15px;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.card-description.is-empty {
  font-style: italic;
}

.object-card-reserved {
  border-color: var(--mustard);
}

.availability,
.category-badge,
.busy-badge,
.reserved-badge,
.available-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.available-badge::before,
.busy-badge::before,
.reserved-badge::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.available-badge {
  background: var(--green-soft);
  color: var(--green);
}

.busy-badge {
  background: var(--danger-soft);
  color: var(--danger);
}

.reserved-badge {
  background: var(--mustard-soft);
  color: var(--warning);
}

.category-badge {
  background: var(--text);
  color: var(--surface);
}

.object-media .availability {
  box-shadow: 0 2px 8px rgba(35, 31, 26, 0.15);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.tag {
  border-radius: 7px;
  background: var(--surface-muted);
  padding: 2px 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

.tag::before {
  content: "#";
  opacity: 0.6;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.card-date {
  color: var(--text-muted);
  font-size: 12px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

.page-info {
  color: var(--text-muted);
  font-size: 14px;
}

/* Admin panels */

.admin-panel {
  margin-top: 48px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.6);
  padding: 24px;
}

.admin-panel .section-heading {
  align-items: center;
}

.reservations-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reservation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--mustard);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 12px 16px;
}

.reservation-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.reservation-name {
  font-weight: 750;
}

.reservation-window {
  color: var(--text-muted);
  font-size: 13px;
}

.reservation-status {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--mustard-soft);
  color: var(--warning);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 750;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  padding: 3px 5px 3px 3px;
}

.category-filter {
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 6px 12px;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.category-filter:hover,
.category-filter.is-active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.category-actions {
  display: inline-flex;
  padding-left: 4px;
  border-left: 1px solid var(--border);
}

/* Dialogs */

.dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1.5px solid var(--text);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
  box-shadow: 10px 10px 0 rgba(35, 31, 26, 0.85);
}

.dialog[open] {
  animation: dialog-in 200ms ease-out;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

.dialog::backdrop {
  background: rgba(35, 31, 26, 0.5);
  backdrop-filter: blur(4px);
}

.dialog-form {
  display: grid;
  gap: 16px;
  padding: 26px;
}

.dialog-form h2 {
  margin-bottom: 4px;
  font-size: 26px;
}

.dialog-form p {
  margin-bottom: 0;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
}

.photo-preview-wrap,
.image-strip {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  padding: 10px;
}

.photo-preview-wrap {
  display: grid;
  gap: 10px;
}

.photo-preview {
  width: 100%;
  max-height: 240px;
  border-radius: 7px;
  background: var(--surface);
  object-fit: contain;
}

.image-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.image-tile {
  display: grid;
  gap: 6px;
}

.image-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 7px;
  background: var(--surface);
  object-fit: cover;
}

.image-tile-actions {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.image-tile-actions .button {
  min-height: 28px;
  padding: 0 8px;
}

.dialog-detail {
  width: min(760px, calc(100% - 32px));
}

.detail-body {
  padding: 26px;
}

.detail-loading {
  color: var(--text-muted);
  padding: 24px 0;
  text-align: center;
}

.detail-content {
  display: grid;
  gap: 16px;
}

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

.detail-head h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-gallery {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-muted);
}

.detail-main-image {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
}

.detail-arrow {
  position: absolute;
  top: 50%;
  width: 42px;
  min-height: 42px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  transform: translateY(-50%);
}

.detail-arrow:active:not(:disabled) {
  transform: translateY(calc(-50% + 1px));
}

.detail-arrow-prev {
  left: 10px;
}

.detail-arrow-next {
  right: 10px;
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.detail-thumb {
  border: 2px solid transparent;
  border-radius: 9px;
  background: var(--surface-muted);
  padding: 0;
  cursor: pointer;
}

.detail-thumb.is-active {
  border-color: var(--primary);
}

.detail-thumb-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 7px;
  object-fit: cover;
}

.detail-caption {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.detail-content h3 {
  margin: 0;
  font-size: 17px;
}

.detail-description {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-description.is-empty {
  color: var(--text-muted);
  font-style: italic;
}

.detail-dates {
  margin: 0;
  font-size: 13px;
}

.form-error {
  margin: 0;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 650;
}

/* Responsive */

@media (max-width: 960px) {
  .home-hero-inner {
    grid-template-columns: 1fr;
  }

  .home-hero-art {
    order: -1;
  }

  .hero-illustration {
    max-width: 320px;
  }

  .value-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 760px) {
  .container {
    width: calc(100% - 32px);
  }

  .header-inner {
    gap: 12px;
    min-height: 62px;
  }

  .brand-text {
    display: none;
  }

  .nav-link {
    padding: 6px 12px;
    font-size: 14px;
  }

  .user-email {
    display: none;
  }

  .home-hero {
    padding-block: 32px 44px;
  }

  .home-section {
    padding-block: 40px;
  }

  .hero-stats {
    gap: 24px;
  }

  .hero-stats dd {
    font-size: 36px;
  }

  .cta-band {
    flex-direction: column;
    align-items: start;
    padding: 32px 26px;
  }

  .catalog-head {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }

  .toolbar {
    grid-template-columns: 1fr;
    box-shadow: 4px 4px 0 var(--text);
  }

  .category-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .category-card {
    min-height: 130px;
    padding: 14px;
  }

  .category-card-letter {
    font-size: 84px;
  }

  .category-card-name {
    font-size: 18px;
  }

  .object-grid {
    grid-template-columns: 1fr;
  }

  .admin-panel .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .dialog {
    box-shadow: 6px 6px 0 rgba(35, 31, 26, 0.85);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
