:root {
  --cream: #f7eddc;
  --latte: #e8d4b8;
  --caramel: #c58552;
  --mocha: #6d4327;
  --espresso: #2e1b12;
  --rose: #fff6ef;
  --paper: rgba(255, 252, 247, 0.86);
  --line: rgba(109, 67, 39, 0.14);
  --shadow: 0 20px 50px rgba(70, 40, 18, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--espresso);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 28%),
    linear-gradient(135deg, #fff7eb 0%, #f6ead8 45%, #ead2b6 100%);
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

.page-shell {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.site-header,
.page-heading,
.section-heading,
.content-card__header,
.log-card__body,
.hero,
.hero__actions,
.hero__chips,
.site-nav,
.form-actions,
.page-heading__actions,
.detail-list > div,
.inline-actions {
  display: flex;
  align-items: center;
}

.site-header,
.page-heading,
.section-heading,
.content-card__header,
.log-card__body,
.detail-list > div {
  justify-content: space-between;
}

.site-header {
  gap: 1rem;
  padding: 1rem 0 1.5rem;
}

.site-nav,
.hero__actions,
.hero__chips,
.form-actions,
.page-heading__actions,
.inline-actions,
.tag-cloud {
  gap: 0.75rem;
  flex-wrap: wrap;
}

.brand-mark {
  display: inline-flex;
  gap: 0.85rem;
  align-items: center;
  font-weight: 700;
}

.brand-mark__icon {
  display: block;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.brand-mark__text {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.site-nav__link,
.text-link {
  color: var(--mocha);
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding-inline: 0.2rem;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1;
}

.site-nav__link:hover,
.text-link:hover,
.card-link:hover {
  opacity: 0.72;
}

.rating-badge {
  letter-spacing: 0.1em;
  color: var(--caramel);
  background: none;
  border: none;
  padding: 0;
}

.site-nav__pill,
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.8rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button--primary {
  background: linear-gradient(135deg, var(--mocha), #9b613d);
  color: white;
  box-shadow: var(--shadow);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--line);
  color: var(--mocha);
}

.button--small {
  min-height: 2.2rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.button--large {
  min-height: 3.25rem;
  padding-inline: 1.4rem;
}

.flash {
  margin-bottom: 1.25rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(109, 67, 39, 0.12);
}

.flash--alert {
  background: rgba(255, 235, 230, 0.9);
  border-color: rgba(170, 72, 29, 0.22);
}

.page-content {
  display: grid;
  gap: 1.5rem;
}

.hero,
.content-card,
.bento-card {
  background: var(--paper);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero {
  gap: 2rem;
  justify-content: space-between;
  padding: 2rem;
  border-radius: 2rem;
}

.hero__content,
.hero__panel,
.feature-card,
.content-card,
.bento-card,
.auth-card {
  display: grid;
  gap: 1rem;
}

.hero__content {
  max-width: 38rem;
}

.hero h1,
.page-heading h1,
.auth-card h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.page-heading h1,
.auth-card h1,
.content-card h2,
.bento-card h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.05;
}

.hero__description,
.section-copy,
.content-card p,
.bento-card p,
.helper-copy,
.empty-copy {
  margin: 0;
  color: rgba(46, 27, 18, 0.72);
  line-height: 1.65;
}

.eyebrow {
  margin: 0;
  color: var(--caramel);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}

.hero__panel {
  width: min(100%, 21rem);
}

.stat-card,
.feature-card {
  padding: 1.35rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(109, 67, 39, 0.12);
}

.stat-card__label {
  font-size: 0.85rem;
  color: var(--caramel);
}

.hero__chips span {
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  background: rgba(109, 67, 39, 0.08);
}

.feature-grid,
.card-grid,
.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.content-card,
.bento-card,
.form-card {
  padding: 1.4rem;
  border-radius: 1.6rem;
}

.content-card--empty {
  justify-items: start;
}

.content-card__header {
  gap: 0.75rem;
}

.content-card__header h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.content-card__header .site-nav__pill {
  flex-shrink: 0;
  white-space: nowrap;
}

.card-link {
  font-weight: 700;
}

.page-heading {
  gap: 1rem;
}

.bento-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.bento-card {
  grid-column: span 4;
}

.bento-card--highlight {
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.9), rgba(197, 133, 82, 0.88));
  color: white;
}

.bento-card--highlight p,
.bento-card--highlight .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.bento-card--wide {
  grid-column: span 6;
}

.timeline-list,
.stack-list,
.stack-form,
.detail-grid,
.detail-list,
.long-copy {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(109, 67, 39, 0.1);
}

.gallery-strip {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-thumb,
.gallery-card {
  display: grid;
  gap: 0.55rem;
}

.photo-input-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

.photo-preview-item {
  position: relative;
}

.photo-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-remove-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

.photo-preview-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.75rem;
}

.photo-add-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  aspect-ratio: 1 / 1;
  border: 2px dashed rgba(109, 67, 39, 0.25);
  border-radius: 0.75rem;
  background: none;
  cursor: pointer;
  color: var(--caramel);
  transition: border-color 180ms ease, background 180ms ease;
}

.photo-add-btn:hover {
  border-color: var(--caramel);
  background: rgba(197, 133, 82, 0.06);
}

.photo-add-btn__icon {
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 300;
}

.photo-add-btn__text {
  font-size: 0.75rem;
  font-weight: 600;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.gallery-thumb img,
.gallery-card img,
.photo-frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 1.25rem;
}

.gallery-thumb span,
.gallery-card__meta p {
  font-size: 0.92rem;
}

.gallery-card {
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
}

.gallery-card__meta {
  display: grid;
  gap: 0.2rem;
}

.place-search {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  border-radius: 1.35rem;
  background: rgba(255, 250, 244, 0.78);
  border: 1px solid rgba(109, 67, 39, 0.1);
}

.place-search__header {
  align-items: flex-start;
}

.place-search__header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.place-search__controls {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.place-search__input {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(109, 67, 39, 0.16);
  background: rgba(255, 255, 255, 0.9);
  color: var(--espresso);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.place-search__input:focus,
.place-search__input:focus-visible {
  outline: none;
  border-color: rgba(139, 69, 19, 0.6);
  box-shadow: 0 0 0 4px rgba(197, 133, 82, 0.22);
  background: rgba(255, 255, 255, 0.96);
}

.place-search__layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 0.95fr) minmax(260px, 1.05fr);
}

.place-search__results {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  max-height: 21rem;
  overflow: auto;
}

.place-result {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  padding: 0.95rem 1rem;
  text-align: left;
  border-radius: 1rem;
  border: 1px solid rgba(109, 67, 39, 0.12);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  color: var(--espresso);
}

.place-result strong {
  font-size: 0.98rem;
}

.place-result span,
.place-result small,
.shop-map__info {
  color: rgba(46, 27, 18, 0.72);
}

.place-result:hover,
.place-result:focus,
.place-result:focus-visible {
  outline: none;
  border-color: rgba(139, 69, 19, 0.4);
  box-shadow: 0 0 0 4px rgba(197, 133, 82, 0.12);
}

.place-search__map,
.shop-map {
  min-height: 21rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(109, 67, 39, 0.1);
  overflow: hidden;
}

.shop-map {
  min-height: 16rem;
}

.shop-detail-grid,
.shop-side-stack,
.shop-note-card__body,
.shop-note-card__meta {
  display: grid;
  gap: 1rem;
}

.shop-detail-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  align-items: start;
}

.shop-note-card {
  min-height: 100%;
  align-content: start;
}

.shop-note-card__body {
  min-height: 100%;
  align-content: space-between;
}

.shop-note-card__quote {
  margin: 0;
  padding: 1.25rem;
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(109, 67, 39, 0.08);
  color: rgba(46, 27, 18, 0.86);
  font-size: 1.02rem;
  line-height: 1.9;
  white-space: pre-line;
}

.shop-note-card__meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shop-note-card__meta-item {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.05rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(109, 67, 39, 0.08);
}

.shop-note-card__meta-item span {
  color: rgba(46, 27, 18, 0.58);
  font-size: 0.88rem;
}

.shop-note-card__meta-item strong {
  line-height: 1.5;
}

.map-page-grid,
.map-shop-card,
.map-shop-card__stats,
.map-sidebar__content {
  display: grid;
  gap: 1rem;
}

.map-page-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.85fr);
  align-items: start;
}

.map-page-card,
.map-sidebar {
  align-content: start;
}

.bakery-map {
  min-height: 38rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(109, 67, 39, 0.1);
  overflow: hidden;
}

.map-shop-card h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.map-shop-card__address,
.map-shop-card__description {
  margin: 0;
  color: rgba(46, 27, 18, 0.72);
  line-height: 1.7;
}

.map-shop-card__stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.map-shop-card__stat {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(109, 67, 39, 0.08);
}

.map-shop-card__stat span {
  color: rgba(46, 27, 18, 0.58);
  font-size: 0.88rem;
}

.map-info-window {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
  color: var(--espresso);
}

.map-info-window span {
  color: rgba(46, 27, 18, 0.68);
  font-size: 0.9rem;
}

.field,
.field-grid {
  display: grid;
  gap: 0.55rem;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field label {
  font-weight: 600;
}

.field input,
.field textarea,
.field select,
.readonly-field {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(109, 67, 39, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: var(--espresso);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(139, 69, 19, 0.55);
  box-shadow: 0 0 0 4px rgba(197, 133, 82, 0.18);
  background: rgba(255, 255, 255, 0.96);
}

.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: none;
  border-color: rgba(139, 69, 19, 0.6);
  box-shadow: 0 0 0 4px rgba(197, 133, 82, 0.22);
}

.button:focus,
.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(197, 133, 82, 0.22);
}

.site-nav__link:focus {
  outline: none;
}

.site-nav__link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(197, 133, 82, 0.35);
  border-radius: 0.5rem;
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
}

.readonly-field {
  color: rgba(46, 27, 18, 0.7);
}

.form-errors {
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 235, 230, 0.86);
  border: 1px solid rgba(170, 72, 29, 0.18);
}

.form-errors__title {
  margin: 0 0 0.45rem;
  font-weight: 700;
}

.form-errors__list {
  margin: 0;
  padding-left: 1.2rem;
}

.auth-shell {
  display: flex;
  justify-content: center;
}

.auth-card,
.form-card {
  width: min(100%, 44rem);
}

.detail-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.detail-list span {
  color: rgba(46, 27, 18, 0.6);
  font-size: 0.9rem;
}

.danger-zone {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 960px) {
  .hero,
  .site-header,
  .page-heading,
  .detail-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .feature-grid,
  .card-grid,
  .gallery-grid,
  .gallery-strip,
  .field-grid,
  .place-search__controls,
  .place-search__layout,
  .shop-note-card__meta,
  .map-shop-card__stats {
    grid-template-columns: 1fr;
  }

  .bento-card,
  .bento-card--wide {
    grid-column: span 12;
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--mocha);
  border-radius: 2px;
}

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 90;
}

.drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(280px, 80vw);
  background: #fffcf7;
  z-index: 100;
  transform: translateX(100%);
  transition: transform 300ms ease;
  overflow-y: auto;
}

.drawer__header {
  padding: 1.25rem 1.25rem 0.75rem;
}

.drawer__user {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem;
}

.drawer__nickname {
  font-weight: 700;
  font-size: 1.05rem;
}

.drawer__email {
  font-size: 0.85rem;
  color: rgba(46, 27, 18, 0.55);
}

.drawer__divider {
  height: 1px;
  margin: 0.5rem 1.25rem;
  background: var(--line);
}

.drawer__nav {
  display: flex;
  flex-direction: column;
}

.drawer__link {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--espresso);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.drawer__link:hover {
  background: rgba(109, 67, 39, 0.06);
}

.drawer__link--logout {
  color: var(--caramel);
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 2rem, 100%);
  }

  .hero,
  .content-card,
  .bento-card {
    border-radius: 1.35rem;
  }

  .shop-detail-grid {
    grid-template-columns: 1fr;
  }

  .map-page-grid {
    grid-template-columns: 1fr;
  }

  .bakery-map {
    min-height: 28rem;
  }

  .nav-toggle {
    display: flex;
  }

  .site-header {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .site-nav {
    display: none;
  }

  .drawer {
    display: block;
  }

  .drawer-open .drawer {
    transform: translateX(0);
  }

  .drawer-open .drawer-overlay {
    display: block;
  }

  .drawer-open {
    overflow: hidden;
  }

  .site-nav__link,
  .site-nav form,
  .site-nav .button {
    width: 100%;
  }

  .hero h1,
  .page-heading h1,
  .auth-card h1 {
    font-size: 2.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .drawer,
  .field input,
  .field textarea,
  .field select,
  .place-search__input,
  .photo-add-btn {
    transition: none;
  }
}
