/* Страница гостя рум-сервиса SAVOY, по согласованному макету (mockup/styles.css).
   Цвета и шрифты – из сайта savoy.rest (src/styles/global.css). */

@font-face {
  font-family: 'Crimson';
  src: url('fonts/crimson.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Serifiqo 4F';
  src: url('fonts/serifiqo.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #121110;
  --bg-2: #1a1918;
  --card: #141312;
  --line: #2a2826;
  --gold: #ffde83;
  --gold-line: #ffde8399;
  --gold-soft: #c9a24b73;
  --text: #f6f4f5;
  --text-2: #e9e4da;
  --muted: #abaeb0;
  --ink: #141312;
  --warn: #e7b9a5;
  --font-body: 'Crimson', Georgia, 'Times New Roman', serif;
  --font-display: 'Serifiqo 4F', 'Crimson', Georgia, serif;
  --gutter: 20px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.4;
}
button, input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

.app {
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* Шапка */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top--end { justify-content: flex-end; }
.top__room {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}
.top__room b { font-weight: 400; color: var(--gold); }
.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.lang {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  overflow: hidden;
}
.lang button {
  background: none;
  border: 0;
  padding: 6px 12px;
  color: var(--muted);
  cursor: pointer;
}
.lang button[aria-pressed='true'] { background: var(--gold); color: var(--ink); }

/* Заголовки */
.display {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 400;
  margin: 0;
}
.h1 { font-size: 1.75rem; line-height: 1.15; }
.h2 { font-size: 1.25rem; line-height: 1.2; color: var(--gold); }
.lead { color: var(--text-2); margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.95rem; }

/* Экран номера */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 40px var(--gutter) 48px;
  text-align: center;
}
.hero__logo { width: min(220px, 60%); margin: 0 auto; }
.hero__logo--flat { margin: 0; }
.hero__kicker { color: var(--gold); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.9rem; }
.field { display: grid; gap: 8px; text-align: left; }
.field label { color: var(--text-2); }
.input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1.375rem;
  letter-spacing: 0.04em;
}
.input:focus { outline: 2px solid var(--gold); outline-offset: 2px; border-color: transparent; }
.input[aria-invalid='true'] { border-color: var(--warn); }
.hint { color: var(--muted); font-size: 0.95rem; margin: 0; }
.error { color: var(--warn); margin: 0; }

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 1.125rem;
  cursor: pointer;
  text-align: center;
}
.btn:disabled { background: var(--bg-2); color: var(--muted); cursor: not-allowed; }
.btn--ghost { background: none; color: var(--gold); border: 1px solid var(--gold-soft); }
.btn--small { width: auto; min-height: 40px; padding: 8px 16px; font-size: 1rem; }

/* Объявления */
.notice {
  margin: 16px var(--gutter) 0;
  padding: 14px 16px;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  background: var(--card);
}
.notice--warn { border-color: var(--warn); }
.notice p { margin: 0; }
.notice p + p { margin-top: 6px; }

/* Разделы меню */
.tabs {
  position: sticky;
  top: var(--top-h, 58px);
  z-index: 4;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px var(--gutter);
  background: var(--bg);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
}
.tab[aria-current='true'] { border-color: var(--gold); color: var(--gold); }

.section { padding: 8px var(--gutter) 8px; scroll-margin-top: 120px; }
.section > .h2 { margin: 20px 0 12px; }

/* Карточка блюда: фото слева уходит в фон карточки (приём сайта SAVOY) */
.dish {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.dish__photo {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
}
.dish__photo img { width: 100%; height: 100%; object-fit: cover; }
.dish__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dish__name { margin: 0; font-size: 1.125rem; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; }
.dish__desc { margin: 0; font-size: 0.95rem; color: var(--muted); overflow-wrap: anywhere; }
.dish__row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.price { color: var(--gold); white-space: nowrap; }

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
}
.stepper button {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: var(--gold);
  font-size: 1.25rem;
  cursor: pointer;
}
.stepper button:disabled { color: var(--line); cursor: not-allowed; }
.stepper output { min-width: 2ch; text-align: center; }
.add { min-height: 40px; }

/* Нижняя панель корзины */
.bar {
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin-top: auto;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 30%);
}
.bar .btn { justify-content: space-between; }

/* Корзина и итог */
.page { padding: 8px var(--gutter) 24px; display: grid; gap: 18px; }
.line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.line__name { margin: 0; overflow-wrap: anywhere; }
.line__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; grid-column: 1 / -1; flex-wrap: wrap; }
.line__flag { grid-column: 1 / -1; margin: 0; color: var(--warn); font-size: 0.95rem; }
.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 1.25rem;
}
.textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  resize: vertical;
}
.textarea:focus { outline: 2px solid var(--gold); outline-offset: 2px; border-color: transparent; }
.counter { text-align: right; color: var(--muted); font-size: 0.9rem; margin: 0; }

/* Экраны результата */
.result {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 40px var(--gutter) 32px;
}
.result__mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 1.5rem;
}
.result__mark--warn { border-color: var(--warn); color: var(--warn); }
.phone {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.summary { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.summary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.summary li { display: flex; justify-content: space-between; gap: 12px; }
.summary li span:first-child { min-width: 0; overflow-wrap: anywhere; }

.empty { padding: 40px var(--gutter); text-align: center; display: grid; gap: 16px; }

/* Крупный системный шрифт (150% и больше): на 375 px помещается меньше 17em. */
.app { container-type: inline-size; container-name: app; }
@container app (max-width: 17em) {
  .top { position: static; flex-wrap: wrap; }
  .tabs { top: 0; }
  .dish { grid-template-columns: minmax(0, 1fr); }
  .dish__photo { width: 100%; height: auto; aspect-ratio: 16 / 10; }
  .dish__photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, var(--bg) 100%); }
  .bar .btn { flex-wrap: wrap; justify-content: center; }
  .phone { font-size: 1.6rem; }
}

/* Правки после ревью: доступность и касания */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.link { min-height: 40px; padding: 0 4px; }
.lang button { min-height: 40px; padding: 8px 14px; }
.input, .textarea { border-color: #6b6660; }
.stepper button:disabled { color: var(--muted); opacity: 0.45; }
.limit-note, .bar__note { margin: 0; color: var(--warn); font-size: 0.95rem; }
.bar__note { margin-bottom: 8px; text-align: center; background: var(--bg); }
.line .limit-note { grid-column: 1 / -1; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

h1.lead { font-size: 1.125rem; font-weight: 400; line-height: 1.4; }

/* Состав заказа: название | количество | сумма, цифры в одну строку и по правому краю */
.summary li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  column-gap: 12px;
  align-items: baseline;
}
.summary__name { min-width: 0; overflow-wrap: anywhere; }
.summary__qty { color: var(--muted); white-space: nowrap; }
.summary__sum { white-space: nowrap; text-align: right; min-width: 5.5ch; font-variant-numeric: tabular-nums; }
.summary__total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.summary__total .summary__name { grid-column: 1 / 3; }
.price { font-variant-numeric: tabular-nums; }
@container app (max-width: 17em) {
  .summary li { grid-template-columns: minmax(0, 1fr) auto; }
  .summary li .summary__name { grid-column: 1 / -1; }
  .summary__qty { justify-self: start; }
  .summary__total .summary__name { grid-column: 1; }
}

/* Блюдо без фото (п13): тёмная плитка с бледным логотипом, ритм списка сохраняется */
.dish__photo--empty {
  background: var(--bg-2) url('img/logo-gold.png') center / 62% auto no-repeat;
  border: 1px solid var(--line);
}
.dish__photo--empty::after { background: none; }
.dish__photo--empty::before {
  content: '';
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg-2) 65%, transparent);
}
