:root {
  --color-canvas: #f7f0e5;
  --color-surface: #fffaf2;
  --color-surface-strong: #f0dfcb;
  --color-ink: #241916;
  --color-muted: #76665e;
  --color-border: #dfcdbb;
  --color-brand: #79251f;
  --color-brand-strong: #571713;
  --color-brand-soft: #f3c681;
  --color-brand-tint: #f6d39b;
  --color-highlight: #fff5e8;
  --color-ember: #dc8a2f;
  --color-ready: #32664b;
  --color-caution: #9a571e;
  --shadow-card: 0 12px 30px rgb(65 34 25 / 10%);
  --shadow-detail: 0 22px 60px rgb(65 34 25 / 18%);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 42px;
  --space-8: 48px;
  --space-9: 56px;
  color: var(--color-ink);
  background: var(--color-canvas);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--color-brand-strong);
  overflow-anchor: none;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background:
    radial-gradient(circle at top right, rgb(220 138 47 / 12%), transparent 28rem),
    var(--color-canvas);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-ember);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.page-shell {
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--color-canvas);
  box-shadow: 0 0 80px rgb(36 25 22 / 18%);
}

.page-shell--staff {
  width: min(100%, 720px);
}

.brand-header {
  position: relative;
  overflow: hidden;
  padding: var(--space-5) var(--space-4) var(--space-6);
  color: var(--color-surface);
  background:
    radial-gradient(circle at 88% 10%, rgb(220 138 47 / 42%), transparent 13rem),
    linear-gradient(145deg, var(--color-brand), var(--color-brand-strong));
}

.brand-header::after {
  position: absolute;
  right: -38px;
  bottom: -70px;
  width: 190px;
  height: 190px;
  border: 1px solid rgb(255 250 242 / 18%);
  border-radius: 50%;
  content: "";
}

.brand-header--staff {
  padding-bottom: var(--space-5);
}

.brand-header.brand-header--staff h1 {
  max-width: none;
  font-size: clamp(1.5rem, 6vw, 2.15rem);
  word-break: keep-all;
}

.brand-kicker {
  margin-bottom: var(--space-2);
  color: var(--color-brand-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand-header h1 {
  max-width: 18ch;
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.brand-header > p:not(.brand-kicker) {
  position: relative;
  z-index: 1;
  max-width: 38ch;
  margin-top: var(--space-3);
  color: rgb(255 250 242 / 78%);
  line-height: 1.6;
  text-wrap: pretty;
  white-space: pre-line;
  word-break: keep-all;
}

.language-selector {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.language-button {
  min-height: 44px;
  padding: var(--space-2);
  border: 1px solid rgb(255 250 242 / 28%);
  border-radius: 10px;
  color: var(--color-surface);
  background: rgb(255 250 242 / 8%);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.language-button[aria-pressed="true"] {
  border-color: var(--color-brand-tint);
  color: var(--color-brand-strong);
  background: var(--color-brand-tint);
}

.content-stack,
.staff-index {
  display: grid;
  gap: var(--space-7);
  padding: var(--space-5) var(--space-4) var(--space-8);
}

.category-heading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  color: var(--color-ink);
  font-size: 1.18rem;
  letter-spacing: -0.025em;
}

.category-heading span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--color-surface);
  background: var(--color-brand);
  font-size: 0.8rem;
}

.menu-grid,
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.menu-card {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.menu-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-surface-strong);
}

.menu-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-image-pair {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.menu-image-pair .menu-image {
  min-width: 0;
}

.menu-image-pair__arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: var(--space-6);
  height: var(--space-6);
  place-items: center;
  border: 2px solid var(--color-surface);
  border-radius: 50%;
  color: var(--color-surface);
  background: var(--color-brand);
  box-shadow: var(--shadow-card);
  font-size: 1.15rem;
  font-weight: 800;
  transform: translate(-50%, -50%);
}

.menu-image--placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--space-2);
  color: var(--color-brand);
  background: linear-gradient(145deg, #f4e5d3, #ead2b8);
  font-size: 0.78rem;
  font-weight: 700;
}

.menu-image--placeholder svg {
  width: var(--space-7);
  fill: none;
  stroke: var(--color-brand);
  stroke-linecap: round;
  stroke-width: 3;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: var(--space-1) var(--space-2);
  border-radius: 999px;
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.25;
}

.menu-card__media > .status-badge,
.staff-detail__photo > .status-badge {
  position: absolute;
  right: var(--space-2);
  bottom: var(--space-2);
  max-width: calc(100% - 16px);
}

.status-badge--ready {
  background: var(--color-ready);
}

.status-badge--caution {
  background: var(--color-caution);
}

.menu-card__body {
  padding: var(--space-3);
}

.menu-card h3,
.basic-item h3 {
  color: var(--color-ink);
  font-size: 1rem;
  line-height: 1.35;
  word-break: keep-all;
}

.menu-card__summary {
  margin-top: var(--space-1);
  color: var(--color-brand);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.menu-card__description {
  margin-top: var(--space-2);
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.58;
  text-wrap: pretty;
  white-space: pre-line;
}

.empty-state {
  display: grid;
  min-height: 128px;
  place-items: center;
  align-content: center;
  gap: var(--space-2);
  padding: var(--space-5);
  border: 1px dashed var(--color-border);
  border-radius: 16px;
  color: var(--color-muted);
  background: rgb(255 250 242 / 55%);
  text-align: center;
}

.empty-state span {
  font-size: 1.8rem;
  color: var(--color-ember);
}

.basic-list,
.staff-menu-list {
  display: grid;
  gap: var(--space-2);
}

.basic-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
}

.basic-item p {
  margin-top: var(--space-2);
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.58;
  text-wrap: pretty;
}

.basic-item .status-badge {
  flex: 0 0 auto;
}

.comparison-grid .menu-card__description {
  display: none;
}

.app-footer {
  padding: 0 var(--space-4) var(--space-6);
  text-align: center;
}

.app-footer a,
.back-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-brand);
  border-radius: 10px;
  color: var(--color-brand);
  background: var(--color-surface);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.staff-toolbar {
  padding: var(--space-3) var(--space-4);
  background: var(--color-brand-strong);
}

.staff-toolbar .language-selector {
  margin-top: 0;
}

.staff-menu-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-ink);
  background: var(--color-surface);
  box-shadow: 0 5px 14px rgb(65 34 25 / 6%);
  text-align: left;
  cursor: pointer;
}

.staff-menu-button:hover,
.staff-menu-button:active {
  border-color: var(--color-ember);
  background: var(--color-highlight);
  transform: translateY(-1px);
}

.staff-menu-button span {
  font-size: 1.02rem;
  font-weight: 800;
}

.staff-menu-button small {
  color: var(--color-muted);
  font-size: 0.76rem;
  text-align: right;
}

.staff-empty {
  padding: var(--space-4);
  border-left: 3px solid var(--color-border);
  color: var(--color-muted);
  line-height: 1.55;
}

.staff-detail {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-4) var(--space-8);
}

.staff-detail > .back-button {
  justify-self: start;
}

.staff-detail__photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  background: var(--color-surface-strong);
  box-shadow: var(--shadow-detail);
}

.staff-detail__copy {
  padding: var(--space-2) 0;
}

.staff-detail__eyebrow {
  color: var(--color-brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.staff-detail__copy h1 {
  margin-top: var(--space-2);
  font-size: clamp(1.8rem, 8vw, 3rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.staff-detail__foreign {
  margin-top: var(--space-4);
  font-size: clamp(1.5rem, 5.5vw, 2.15rem);
  line-height: 1.48;
  line-break: strict;
  text-wrap: pretty;
  white-space: pre-line;
}

.staff-detail__summary {
  margin-top: var(--space-4);
  color: var(--color-brand);
  font-size: clamp(1.15rem, 4.5vw, 1.55rem);
  font-weight: 800;
  line-height: 1.5;
  text-wrap: pretty;
}

.staff-detail--guide .staff-detail__foreign {
  font-size: clamp(1.35rem, 5vw, 2.15rem);
}

.menu-card__phrase,
.staff-detail__phrase {
  white-space: nowrap;
}

[lang="ko"] {
  word-break: keep-all;
}

[lang="zh-CN"],
[lang="ja"] {
  word-break: auto-phrase;
}

.staff-detail__source {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border-left: 4px solid var(--color-ember);
  border-radius: 0 16px 16px 0;
  background: var(--color-surface-strong);
}

.staff-detail__source h2 {
  color: var(--color-brand);
  font-size: 0.85rem;
}

.staff-detail__source p {
  margin-top: var(--space-2);
  font-size: 1rem;
  line-height: 1.7;
  white-space: pre-line;
}

.staff-detail__source .staff-detail__source-summary {
  color: var(--color-brand);
  font-weight: 800;
}

.staff-detail__source-summary + p {
  margin-top: var(--space-3);
}

@media (min-width: 768px) {
  .page-shell {
    margin-block: var(--space-5);
    border-radius: 24px;
    overflow: hidden;
  }

  .page-shell:not(.page-shell--staff) {
    width: min(100%, 760px);
  }

  .brand-header {
    padding: var(--space-6);
  }

  .content-stack,
  .staff-index {
    padding-inline: var(--space-6);
  }

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

  .staff-menu-button {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-1);
  }

  .staff-menu-button span {
    word-break: keep-all;
  }

  .staff-menu-button small {
    white-space: nowrap;
  }

  .staff-detail {
    padding: var(--space-5) var(--space-6) var(--space-9);
  }
}

@media (max-width: 370px) {
  .language-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 479px) {
  .menu-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
