* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f1e8;
  color: #26231f;
}

.page {
  width: min(760px, calc(100% - 32px));
  margin: 48px auto 80px;
}

header {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8rem;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1;
}

h2 {
  margin-top: 0;
}

.card {
  background: white;
  border: 1px solid #d9d1c3;
  border-radius: 14px;
  padding: 22px;
  margin: 18px 0;
}

label {
  display: block;
  font-weight: 650;
  margin: 14px 0;
}

input,
select {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid #aaa094;
  border-radius: 8px;
  background: white;
  font: inherit;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

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

button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 15px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  background: #26231f;
  color: white;
}

button:disabled {
  opacity: .6;
  cursor: wait;
}

.hint,
.optional,
.small {
  color: #70685f;
  font-size: .92rem;
}

.message {
  padding: 13px 15px;
  margin: 16px 0;
  border-radius: 8px;
}

.error {
  background: #f8dddd;
  border: 1px solid #dca7a7;
}

.success {
  background: #e3f2df;
  border-color: #a8c9a0;
}

.hidden {
  display: none !important;
}

@media (max-width: 620px) {
  .pick-grid {
    grid-template-columns: 1fr;
  }

  .page {
    margin-top: 24px;
  }
}


.baker-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.baker-card { text-align: center; }

.baker-photo-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: #eee8de;
  border: 1px solid #d9d1c3;
}

.baker-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.baker-photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #766d63;
}

.baker-card-name {
  margin-top: 7px;
  font-weight: 700;
  font-size: .92rem;
}

@media (max-width: 700px) {
  .baker-gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 460px) {
  .baker-gallery { grid-template-columns: repeat(2, 1fr); }
}


.baker-card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.baker-card-link:hover .baker-photo-wrap,
.baker-card-link:focus-visible .baker-photo-wrap {
  outline: 3px solid rgba(38, 35, 31, .20);
  outline-offset: 2px;
}

.confirmation-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 28px;
}
#success p { line-height: 1.6; overflow-wrap: anywhere; }
#success-title { line-height: 1.2; }
#success-title:focus { outline: none; }
.handshake-recap { padding-top: 16px; border-top: 1px solid #d9d1c3; }
@media (max-width: 460px) {
  .confirmation-picks { gap: 8px; }
  .confirmation-picks .baker-card-name { font-size: .85rem; }
}

.preview-banner { padding: 12px 16px; background: #fff0c4; border: 1px solid #d3b568; border-radius: 8px; font-size: .9rem; }
.selection-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.selection-card { border: 2px solid #ded6c9; border-radius: 12px; overflow: hidden; background: #fff; }
.selection-choice { position: relative; display: flex; flex-direction: column; margin: 0; cursor: pointer; }
.selection-choice img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.selection-choice input { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; margin: 0; accent-color: #365b36; cursor: pointer; }
.selection-name { display: block; padding: 10px 8px 4px; text-align: center; }
.bio-link { display: block; padding: 6px 8px 12px; color: #395d3a; text-align: center; font-size: .9rem; text-underline-offset: 3px; }
.selection-card.is-selected { border-color: #365b36; background: #e3f2df; box-shadow: 0 0 0 1px #365b36; }
.selection-card.is-unavailable .selection-choice { opacity: .45; cursor: not-allowed; }
.selection-card:focus-within { outline: 3px solid #98732c; outline-offset: 3px; }
.pick-count { font-weight: 650; color: #395d3a; }
@media (max-width:460px) { .selection-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; } }

button.bio-link { background: transparent; color: #395d3a; border: 0; border-radius: 0; font-weight: 500; text-decoration: underline; cursor: pointer; }
.bio-tooltip { position: fixed; z-index: 20; width: min(320px, calc(100vw - 16px)); padding: 16px; border-radius: 12px; background: #26231f; color: white; font-size: .9rem; line-height: 1.5; box-shadow: 0 6px 24px #0003; pointer-events: none; }
#bio-dialog { width: min(480px, calc(100% - 32px)); max-height: 85vh; overflow: auto; border: 1px solid #d9d1c3; border-radius: 16px; padding: 24px; color: #26231f; }
#bio-dialog::backdrop { background: #0008; }
#bio-close { width: auto; display: block; margin: 0 0 16px auto; padding: 8px 14px; }
#bio-photo { width: 130px; height: 130px; object-fit: cover; border-radius: 12px; margin-bottom: 16px; }
#bio-text { line-height: 1.65; }
#bio-source { color: #395d3a; }
