﻿:root {
  color-scheme: dark;
  --bg: #020305;
  --panel: #090c11;
  --panel-high: #101722;
  --panel-soft: #0d1118;
  --line: #273246;
  --line-soft: #1a2230;
  --ink: #f6f7fb;
  --muted: #6f7b91;
  --dim: #4f5868;
  --primary: #7f95ba;
  --secondary: #95a7c4;
  --disabled: #5c6370;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
}

button {
  border: 0;
  border-radius: 0;
  color: inherit;
  font: inherit;
}

.app-shell {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: #000;
}

.screen {
  min-height: 100vh;
  padding: 18px 10px 94px;
}

.topbar {
  display: grid;
  grid-template-columns: 56px 1fr 86px;
  align-items: center;
  min-height: 40px;
  margin-bottom: 8px;
}

.topbar-title {
  margin: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: 0;
}

.ghost-button {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--secondary);
  cursor: pointer;
}

.plain-button {
  height: 34px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.home-layout {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 10px;
}

.brand {
  margin: 0 0 8px;
}

.label {
  display: block;
  margin-bottom: 2px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-title {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.08;
}

.category-rail {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #05070a;
}

.category-button {
  min-height: 64px;
  padding: 0 6px;
  border-bottom: 1px solid var(--line-soft);
  background: #070a0f;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}

.category-button:last-child {
  border-bottom: 0;
}

.category-button.active {
  border-color: #9aaed0;
  background: var(--primary);
  color: #f9fbff;
  font-weight: 760;
}

.list-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 9px;
  border-top: 1px solid var(--line-soft);
}

.list-header h2 {
  margin: 2px 0 5px;
  font-size: 22px;
  line-height: 1.1;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.header-badges {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  color: var(--secondary);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.pill-outline {
  min-width: 58px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid #56647a;
  border-radius: 999px;
  background: var(--panel);
  color: var(--secondary);
  cursor: pointer;
  font-weight: 760;
  letter-spacing: 0.08em;
}

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

.dish-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-high);
}

.dish-main {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 10px;
  align-items: center;
}

.food-tile {
  overflow: hidden;
  width: 104px;
  height: 104px;
  border-radius: 8px;
  background: #000;
}

.food-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-name {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 820;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.tag {
  display: inline-flex;
  height: 22px;
  align-items: center;
  border: 1px solid #56647a;
  padding: 0 6px;
  color: var(--secondary);
  background: #0a0d12;
  font-size: 11px;
}

.secondary-action {
  display: flex;
  width: 100%;
  height: 34px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #56647a;
  background: var(--panel);
  color: var(--secondary);
  cursor: pointer;
  padding: 0 10px;
  text-align: left;
}

.dish-actions {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 10px;
  margin-top: 10px;
}

.primary-action {
  height: 42px;
  border: 1px solid #9aaed0;
  border-radius: 999px;
  background: var(--primary);
  color: #f9fbff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 780;
}

.primary-action.selected {
  background: #5f7497;
}

.counter-chip {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  align-self: center;
  border: 1px solid #56647a;
  border-radius: 999px;
  color: var(--secondary);
  font-weight: 780;
}

.bottom-bar {
  position: fixed;
  right: max(0px, calc((100vw - 430px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 430px) / 2));
  z-index: 20;
  display: grid;
  grid-template-columns: 58px 1fr 1fr;
  gap: 10px;
  max-width: 430px;
  margin: 0 auto;
  padding: 14px 14px 22px;
  border-top: 1px solid var(--line-soft);
  background: #030405;
}

.selected-count {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.selected-count strong {
  display: block;
  color: var(--primary);
  font-size: 22px;
}

.bar-button {
  height: 46px;
  border-radius: 999px;
  border: 1px solid #56647a;
  background: var(--panel);
  color: var(--secondary);
  cursor: pointer;
  font-weight: 760;
}

.bar-button.disabled {
  border-color: #242a34;
  background: #14161b;
  color: var(--disabled);
  cursor: default;
}

.detail {
  padding-bottom: 96px;
}

.hero-food {
  width: min(74vw, 300px);
  height: min(74vw, 300px);
  margin: 78px auto 48px;
  overflow: hidden;
  border-radius: 50%;
  background: #000;
}

.hero-food img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-intro {
  padding: 0 8px 26px;
  border-bottom: 1px solid var(--line-soft);
}

.dish-intro h2 {
  margin: 4px 0 12px;
  font-size: 30px;
  line-height: 1.12;
}

.stats-line {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.tutorial-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 24px 8px 16px;
}

.tutorial-head h3 {
  margin: 2px 0 0;
  font-size: 22px;
}

.tutorial {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 0 6px;
}

.prep-list {
  border-right: 1px solid var(--line);
  padding-right: 12px;
}

.prep-title,
.steps-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
}

.prep-item {
  min-height: 46px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--secondary);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 11px;
}

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

.step-card {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.step-number {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: #05070a;
  font-weight: 820;
}

.step-card p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

.tip {
  margin: 16px 8px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  line-height: 1.6;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: end;
  max-width: 430px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.7);
}

.random-modal {
  padding: 22px 20px 24px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: var(--panel);
}

.modal-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.modal-title-row h2 {
  margin: 4px 0 20px;
  font-size: 28px;
}

.modal-food {
  width: 168px;
  height: 168px;
  margin: 0 auto 16px;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}

.modal-food img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-dish-name {
  margin: 0;
  text-align: center;
  font-size: 22px;
}

.modal-tags {
  margin: 8px 0 18px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (min-width: 431px) {
  body {
    background: #11151c;
  }

  .app-shell {
    min-height: 844px;
    margin: 24px auto;
    border: 1px solid #1f2734;
    border-radius: 8px;
  }

  .screen {
    min-height: 844px;
  }
}

