:root {
  color-scheme: light;
  --ink: #1d2523;
  --muted: #65706c;
  --line: #d8ded9;
  --paper: #fbfbf8;
  --panel: #ffffff;
  --green: #1f6f50;
  --green-soft: #e5f2eb;
  --gold: #a6721c;
  --gold-soft: #fff2d8;
  --red: #a4473b;
  --red-soft: #f8e3df;
  --blue: #276a8c;
  --blue-soft: #e1f0f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-link {
  display: block;
  border-radius: 8px;
}

.brand-link:focus-visible,
.notice a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 1px solid #161616;
  border-radius: 8px;
  background: #000;
  object-fit: cover;
  object-position: 50% 44%;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.critical-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid #efc9bd;
  background: #fff0ec;
  color: var(--red);
  line-height: 1.45;
}

.critical-notice strong {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
}

.culture-note {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #f6faf6;
}

.culture-note h2 {
  margin-bottom: 0;
  color: var(--green);
  font-size: 20px;
}

.culture-note p:last-child {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
}

.eyebrow,
.count-label {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 24px;
}

h2 {
  margin-bottom: 10px;
  font-size: 16px;
}

.primary-button,
.secondary-button,
.icon-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

.secondary-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
}

.secondary-button.is-active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.admin-footer {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 8px 18px 18px;
}

.admin-mini-button,
.feedback-mini-button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.admin-mini-button.is-active,
.feedback-mini-button.is-active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
}

.feedback-list {
  display: grid;
  gap: 10px;
  max-height: min(520px, 70vh);
  overflow: auto;
}

.feedback-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.feedback-item strong {
  display: block;
  margin-bottom: 6px;
}

.feedback-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.feedback-date {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eef1ed;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.app-shell {
  display: grid;
  grid-template-columns: 290px minmax(360px, 1fr) 380px;
  gap: 18px;
  padding: 18px;
}

.filters,
.results,
.detail {
  min-height: calc(100vh - 154px);
}

.filters,
.detail {
  position: sticky;
  top: 136px;
  align-self: start;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.search-box,
.submit-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

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

.chip {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

.chip.is-active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  color: var(--ink);
}

.toggle input {
  width: 18px;
  height: 18px;
}

.notice {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.manners {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
}

.manners ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.notice-logo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #000;
  object-fit: cover;
  object-position: 50% 43%;
}

.notice strong {
  color: var(--red);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.place-list {
  display: grid;
  gap: 10px;
}

.place-card {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 62px 14px 14px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.place-card:hover,
.place-card.is-selected {
  border-color: var(--green);
  box-shadow: 0 6px 18px rgba(31, 111, 80, 0.12);
}

.place-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
}

.badge.price {
  border: 1px solid currentColor;
  background: #fff;
}

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

.badge.limited {
  background: var(--gold-soft);
  color: var(--gold);
}

.badge.paid,
.badge.confirm {
  background: var(--red-soft);
  color: var(--red);
}

.badge.member {
  background: var(--blue-soft);
  color: var(--blue);
}

.address,
.note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.card-map-link {
  position: absolute;
  right: 12px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 30px;
  border-radius: 8px;
  background: #e4f8ed;
  color: #087a3b;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.card-map-link:hover {
  background: #cdf1dc;
}

.detail {
  padding: 18px;
  border-left: 1px solid var(--line);
}

.empty-detail,
.place-detail {
  scroll-margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
}

.place-detail h2 {
  font-size: 22px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.back-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.detail-row {
  margin-top: 16px;
}

.detail-row strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

.must-confirm {
  margin-top: 16px;
  border: 1px solid #efc9bd;
  border-radius: 8px;
  padding: 12px;
  background: #fff0ec;
  color: var(--red);
  font-weight: 700;
  line-height: 1.45;
}

.map-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  background: #03c75a;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.map-button:hover {
  background: #02b351;
}

dialog {
  width: min(520px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.32);
}

.submit-form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.form-help {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.form-error {
  margin: -4px 0 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.comments-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.comments-head {
  display: grid;
  gap: 4px;
}

.comments-head strong {
  color: var(--ink);
}

.comments-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.comment-form {
  display: grid;
  gap: 8px;
}

.comment-form textarea {
  min-height: 84px;
}

.comment-list {
  display: grid;
  gap: 8px;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfbf8;
}

.comment-item strong {
  display: block;
  margin-bottom: 6px;
}

.comment-item p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.comment-item span,
.empty-comments {
  color: var(--muted);
  font-size: 12px;
}

.comment-item span {
  display: block;
  margin-top: 8px;
}

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

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .detail {
    grid-column: 1 / -1;
    position: static;
    min-height: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
  }

  .critical-notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  .culture-note {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 12px;
  }

  .culture-note h2 {
    font-size: 18px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .filters {
    position: static;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .results,
  .detail {
    min-height: 0;
  }

  .empty-detail,
  .place-detail {
    scroll-margin-top: 12px;
  }
}
