.restaurant-shell {
  width: min(1080px, calc(100% - 40px));
}

.page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.page-nav a {
  color: inherit;
  text-decoration: none;
}

.page-nav a:hover {
  color: var(--orange-dark);
}

.restaurant-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 34px;
  margin-bottom: 42px;
}

.restaurant-hero h1 {
  margin: 0;
  font-family: "Gowun Dodum", "Noto Sans KR", sans-serif;
  font-size: clamp(44px, 6vw, 70px);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.055em;
}

.restaurant-hero h1 span {
  color: var(--orange);
}

.restaurant-hero > div > p:last-child {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.vote-counter {
  min-width: 176px;
  padding: 24px;
  border: 1px solid rgba(217, 111, 76, 0.16);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.8);
  text-align: center;
  box-shadow: 0 16px 38px rgba(67, 57, 45, 0.08);
}

.vote-counter > span,
.vote-counter small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.vote-counter strong {
  display: block;
  margin: 5px 0;
  color: var(--orange);
  font-family: "Gowun Dodum", sans-serif;
  font-size: 34px;
  font-weight: 400;
}

.vote-counter strong b {
  font-weight: 400;
}

.restaurant-panel,
.voting-panel,
.vote-results,
.notice-card {
  padding: 34px;
  border: 1px solid rgba(64, 59, 50, 0.07);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.restaurant-panel textarea {
  width: 100%;
  min-height: 170px;
  margin-top: 25px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  line-height: 1.7;
  resize: vertical;
}

.restaurant-panel textarea:focus,
.vote-form select:focus {
  border-color: rgba(217, 111, 76, 0.5);
  outline: 3px solid rgba(217, 111, 76, 0.15);
}

.saved-count {
  color: var(--muted);
  font-size: 13px;
}

.saved-count strong {
  color: var(--ink);
}

.setup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.setup-actions .secondary-button {
  min-height: 54px;
}

.notice-card {
  margin-bottom: 18px;
  border-color: rgba(200, 155, 76, 0.25);
  background: #fbf3df;
}

.notice-card strong {
  font-size: 17px;
}

.notice-card p {
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.notice-card a {
  color: #9b6e25;
  font-size: 12px;
  font-weight: 700;
}

.voting-panel,
.vote-results {
  margin-top: 28px;
}

.progress-track {
  height: 7px;
  margin: 25px 0 30px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebe6dc;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
  transition: width 260ms ease;
}

.vote-form {
  display: grid;
  gap: 24px;
}

.vote-form > label,
.vote-form legend {
  color: #6f695f;
  font-size: 12px;
  font-weight: 800;
}

.vote-form select {
  width: 100%;
  height: 54px;
  margin-top: -14px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
}

.vote-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.vote-form legend {
  margin-bottom: 12px;
}

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

.restaurant-choice {
  position: relative;
  cursor: pointer;
}

.restaurant-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.restaurant-choice span {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: center;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #f7f3eb;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.restaurant-choice:hover span {
  transform: translateY(-2px);
  border-color: rgba(217, 111, 76, 0.36);
}

.restaurant-choice input:checked + span {
  border-color: var(--orange);
  color: #fff;
  background: var(--orange);
  box-shadow: 0 10px 22px rgba(217, 111, 76, 0.2);
}

.vote-submit {
  justify-self: end;
}

.waiting-panel {
  padding: 28px 20px 6px;
  text-align: center;
}

.waiting-panel > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  color: white;
  background: var(--green);
}

.waiting-panel h3 {
  margin: 0;
  font-family: "Gowun Dodum", sans-serif;
  font-size: 23px;
  font-weight: 400;
}

.waiting-panel p,
.result-rule {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.compact-button {
  min-width: 130px;
}

.result-rule {
  margin: 14px 0 22px;
}

.restaurant-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.restaurant-result-card {
  overflow: hidden;
  border: 1px solid rgba(64, 59, 50, 0.08);
  border-radius: 21px;
  background: #edf1e9;
}

.restaurant-result-card.is-closed {
  border-color: rgba(190, 67, 56, 0.28);
  background: #fae9e6;
}

.restaurant-result-main {
  padding: 22px;
}

.restaurant-result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.restaurant-result-header h3 {
  margin: 0;
  font-size: 19px;
}

.restaurant-result-header span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #57704e;
  background: #dce6d6;
  font-size: 11px;
  font-weight: 800;
}

.is-closed .restaurant-result-header span {
  color: #a63f35;
  background: #f4d3ce;
}

.final-members {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 17px;
}

.final-member {
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
}

.final-member small {
  margin-left: 4px;
  color: var(--orange-dark);
  font-size: 9px;
}

.closed-message {
  margin: 14px 0 0;
  color: #a63f35;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
}

.move-list {
  margin: 10px 0 0;
  padding: 12px 22px 15px;
  border-top: 1px dashed rgba(166, 63, 53, 0.22);
  color: #8d514a;
  font-size: 11px;
  line-height: 1.8;
}

@media (max-width: 720px) {
  .restaurant-shell {
    width: min(100% - 20px, 560px);
  }

  .restaurant-hero {
    align-items: center;
  }

  .restaurant-hero h1 {
    font-size: 36px;
  }

  .restaurant-hero > div > p:last-child {
    display: none;
  }

  .vote-counter {
    min-width: 112px;
    padding: 17px 12px;
  }

  .vote-counter strong {
    font-size: 27px;
  }

  .restaurant-panel,
  .voting-panel,
  .vote-results,
  .notice-card {
    padding: 23px 18px;
    border-radius: 22px;
  }

  .restaurant-choices,
  .restaurant-results {
    grid-template-columns: 1fr;
  }

  .setup-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-actions button,
  .vote-submit,
  .compact-button {
    width: 100%;
  }
}
