/* Warm, homey, phone-first styles. Big text and big buttons for easy use. */

:root {
  --bg: #FBF5EC;
  --paper: #FFFDF9;
  --ink: #2B2420;
  --muted: #6E6158;
  --line: #E9DCC9;
  --soft: #F5E9D7;
  --accent: #B23A2B;
  --accent-dark: #8F2D20;
  --accent-soft: #FBE9E4;
  --green: #4E6B3A;
  --green-soft: #EAF1E1;
  --radius: 18px;
  --shadow: 0 2px 12px rgba(90, 55, 20, 0.08);
  --font: "Noto Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-head: "Gowun Batang", "Noto Serif KR", "AppleMyungjo", serif;
  color-scheme: light;
}

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

html {
  font-size: 19px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

body.has-bar { padding-bottom: 96px; }

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

a { color: var(--accent-dark); }

[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 50;
  background: var(--paper);
  padding: 8px 14px;
  border-radius: 10px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Bilingual text: Korean on top, English underneath ---------- */

.bi { display: block; }
.bi > .ko, .bi > .en { display: block; }
.bi > .en {
  color: var(--muted);
  font-size: 0.86em;
  font-weight: 400;
  margin-top: 0.1em;
}
h1.bi > .en, h2.bi > .en, h3.bi > .en {
  font-family: var(--font);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.nav .en, .btn .en { display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.3;
  margin: 0 0 0.4em;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 0.8em; }

.small { font-size: 0.88rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.lead { font-size: 1.05rem; }

/* ---------- Header / footer ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 20px 0 14px;
  text-align: center;
}

.brand {
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
}
.brand-ko {
  display: block;
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1.2;
}
.brand-en {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.tagline {
  margin: 4px 0 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

.nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.nav a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}
.nav a .en { font-weight: 500; font-size: 0.8rem; color: var(--muted); }
.nav a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.nav a[aria-current="page"] .en { color: #FBE3DD; }

.demo-banner {
  margin: 0;
  padding: 10px 16px;
  background: #FFF4CC;
  border-bottom: 1px solid #F0DE9A;
  text-align: center;
  font-size: 0.85rem;
}

.site-footer {
  margin-top: 48px;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.88rem;
}
.site-footer p { margin: 0 0 4px; }

main { padding-top: 24px; }

/* ---------- Cards, buttons ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 60px;
  padding: 10px 22px;
  border-radius: 14px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.btn .en { font-size: 0.8em; font-weight: 500; opacity: 0.9; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-secondary { background: var(--paper); color: var(--accent-dark); border-color: var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); }
.btn-big { width: 100%; min-height: 68px; font-size: 1.2rem; margin: 8px 0 12px; }

/* ---------- Loading / closed states ---------- */

.state {
  text-align: center;
  padding: 36px 22px;
  margin-top: 8px;
}
.state .btn { margin-top: 10px; width: 100%; }
.state-art { margin: 0 auto 14px; }

.spinner {
  width: 44px;
  height: 44px;
  margin: 24px auto 16px;
  border-radius: 50%;
  border: 4px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Menu page ---------- */

.hero { text-align: center; margin-bottom: 20px; }
.hero h1 { margin-top: 10px; }

.pill {
  display: inline-block;
  margin: 0;
  padding: 8px 20px;
  border-radius: 16px;
  line-height: 1.35;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
}
.pill .en { color: var(--green); font-weight: 500; }

.deadline {
  display: inline-block;
  margin: 4px 0 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.95rem;
}
.deadline .en { color: var(--accent-dark); opacity: 0.85; }

.note {
  padding: 14px 18px;
  margin-bottom: 18px;
  border-left: 5px solid var(--green);
  border-radius: 12px;
  background: var(--green-soft);
}

.kit {
  padding: 20px;
  margin-bottom: 28px;
  border: 2px solid var(--accent);
}
.kit-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.kit-name { margin: 0 0 8px; font-size: 1.3rem; }
.kit-price {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  white-space: nowrap;
}
.kit .small { margin: 0; }

.section-head { margin-bottom: 14px; }
.section-head h2 { margin-bottom: 4px; }

.dishes {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 18px;
}

.dish { overflow: hidden; transition: border-color 0.15s; }
.dish.has-extra { border-color: var(--accent); }

.dish-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--soft);
}

.dish-body { padding: 16px 18px 18px; }

.dish-name { margin: 0 0 6px; }
.dish-name .ko { display: block; font-size: 1.3rem; }
.dish-name .en {
  display: block;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

.dish-desc { margin: 0 0 14px; font-size: 0.95rem; }
.dish-desc .en { font-size: 0.88em; }

.extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.extras-label { font-size: 0.92rem; font-weight: 500; }
.extras-label .en { font-size: 0.85em; }
.extras-sub {
  display: block;
  margin-top: 2px;
  color: var(--accent-dark);
  font-weight: 700;
}
.extras-none { color: var(--muted); font-size: 0.88rem; }

.stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.step {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--paper);
  color: var(--accent);
  font: inherit;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.step:hover:not(:disabled) { background: var(--accent-soft); }
.step:disabled { border-color: var(--line); color: #C9BBAA; cursor: default; }
.count {
  min-width: 2ch;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
}

/* ---------- Forms ---------- */

.form { padding: 22px 18px; scroll-margin-top: 12px; }

.field { margin-bottom: 18px; }
.field-row { display: grid; gap: 0 14px; }
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}
label [lang="en"] { font-weight: 500; color: var(--muted); }
.req { color: var(--accent); }
.opt { font-weight: 400; color: var(--muted); font-size: 0.85em; }

input[type="text"], input:not([type]), input[type="tel"], input[type="date"], input[type="number"], textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  min-height: 58px;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[aria-invalid="true"] { border-color: var(--accent); }

.hint { margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); }
.field-error {
  margin: 6px 0 0;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.9rem;
}
.field-error .en { color: var(--accent-dark); }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--bg);
  font-weight: 500;
  cursor: pointer;
}
.check input {
  width: 26px;
  height: 26px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
}
.form-error .en { color: var(--accent-dark); }
.form-error .btn { width: 100%; margin-top: 6px; }

/* ---------- Order summary ---------- */

.summary { margin-bottom: 22px; }
.sum-list, .lines {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sum-list li, .lines li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.sum-name { font-size: 0.95rem; }
.sum-name .en { font-size: 0.85em; }
.sum-qty { color: var(--muted); }
.sum-price { font-weight: 700; min-width: 3.5em; text-align: right; }
.sum-list .sum-total {
  grid-template-columns: 1fr auto;
  border-bottom: none;
  padding-top: 14px;
  font-weight: 700;
}
.sum-total strong { font-size: 1.5rem; color: var(--accent); }

/* ---------- Floating total bar ---------- */

.total-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(90, 55, 20, 0.1);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  transition: transform 0.2s ease;
}
.total-bar.is-away { transform: translateY(110%); }
.total-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.total-bar-sum {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}
.total-bar-sum strong { font-size: 1.6rem; color: var(--accent); }
.total-bar .btn { min-height: 56px; padding: 6px 18px; font-size: 1rem; }

/* ---------- Confirmation ---------- */

.done { padding: 30px 20px; text-align: center; }
.done-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
}
.order-no { font-size: 1.1rem; margin-bottom: 2px; }
.order-no strong { font-size: 1.5rem; color: var(--accent-dark); }
.done-who { color: var(--muted); margin-bottom: 18px; }
.done .lines { text-align: left; margin-bottom: 18px; }

.due {
  padding: 18px;
  border-radius: 14px;
  background: var(--accent-soft);
  margin-bottom: 18px;
}
.due p { margin: 0; }
.due .bi { font-weight: 700; color: var(--accent-dark); }
.due .bi .en { color: var(--accent-dark); }
.due-amount { font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1.2; margin-top: 6px !important; }

.callout {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
  font-size: 1.05rem;
}
.callout .en { color: var(--green); }

.details {
  text-align: left;
  margin: 0 0 20px;
  padding: 0;
}
.details dt { font-weight: 700; margin-top: 12px; }
.details dt [lang="en"] { font-weight: 500; color: var(--muted); }
.details dd { margin: 2px 0 0; white-space: pre-wrap; }
.done .btn { width: 100%; }

@media (min-width: 640px) {
  .dishes { grid-template-columns: 1fr 1fr; }
  .form { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation-duration: 3s; }
  .total-bar { transition: none; }
}
