:root {
  --bg: #f6f1e8;
  --panel: rgba(255, 251, 245, 0.92);
  --panel-strong: #fffaf3;
  --text: #2e241d;
  --muted: #735d4b;
  --accent: #c9572f;
  --accent-deep: #963816;
  --line: rgba(67, 42, 27, 0.14);
  --shadow: 0 24px 60px rgba(105, 69, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 208, 164, 0.55), transparent 32%),
    radial-gradient(circle at top right, rgba(221, 128, 74, 0.18), transparent 28%),
    linear-gradient(180deg, #f7efe4 0%, #f2eadf 100%);
}

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

.app-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-copy,
.hero-panel,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 32px;
}

.hero-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.85);
}

.lang-button {
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
}

.lang-button.is-active {
  background: var(--accent);
  color: #fff;
}

.hero-panel {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-content: center;
}

.sync-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(255, 247, 237, 0.85);
}

.sync-label,
.sync-status {
  margin: 0;
}

.sync-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.73rem;
  font-weight: 700;
}

.sync-status {
  margin-top: 6px;
  line-height: 1.5;
}

.sync-button {
  margin-top: 12px;
  width: 100%;
}

.eyebrow,
.entry-specialty {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.73rem;
  color: var(--accent-deep);
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  max-width: 12ch;
}

.intro,
.section-heading p,
.entry-meta,
.entry-notes,
.empty-state,
.maps-status,
.sync-status,
.sync-label {
  color: var(--muted);
}

.intro {
  max-width: 58ch;
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 18px 0 0;
}

.hero-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(255, 247, 237, 0.85);
}

.hero-stat span {
  display: block;
  font-size: 2rem;
  font-family: "Fraunces", serif;
  color: var(--accent-deep);
}

.hero-stat label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 20px;
}

.panel {
  padding: 24px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.section-heading.compact h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

form,
.field-grid,
.slider-grid,
.toolbar,
.entries-list,
.entry-card {
  display: grid;
  gap: 14px;
}

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

.field-grid.single {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

input,
select,
textarea,
.import-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  padding: 12px 14px;
}

textarea {
  resize: vertical;
}

.maps-block,
.criteria-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 247, 238, 0.7);
}

.maps-grid {
  align-items: end;
}

.maps-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

.maps-status {
  margin: 0;
  line-height: 1.5;
}

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

input[type="range"] {
  padding: 0;
}

.range-value {
  justify-self: start;
  min-width: 2rem;
  text-align: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(201, 87, 47, 0.1);
  color: var(--accent-deep);
}

.button-row,
.entry-top,
.entry-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

button,
.maps-link {
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  text-decoration: none;
}

button.primary {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

button.secondary {
  background: #f1e1d4;
  color: var(--text);
}

button.ghost,
.maps-link {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.toolbar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  align-items: end;
}

.search-field {
  min-width: 0;
}

.import-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.import-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.empty-state {
  padding: 36px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.6);
}

.entries-list {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.entry-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 251, 246, 0.95);
}

.entry-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 247, 237, 0.85);
}

.entry-bakery {
  font-size: 1.45rem;
  margin-bottom: 8px;
}

.entry-meta,
.entry-recommendation,
.entry-notes {
  margin: 0;
  line-height: 1.5;
}

.entry-score {
  font-family: "Fraunces", serif;
  font-size: 1.8rem;
  color: var(--accent-deep);
}

.criteria-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.criteria-pills span {
  padding: 7px 10px;
  background: #f1e1d4;
  border-radius: 999px;
  font-size: 0.85rem;
}

@media (max-width: 980px) {
  .hero,
  .layout,
  .toolbar,
  .field-grid,
  .maps-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 12px;
  }

  .hero-copy,
  .hero-panel,
  .panel {
    padding: 18px;
  }

  .hero-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    max-width: none;
  }
}
