:root {
  color-scheme: light;
  --bg: #f4f7f3;
  --surface: #ffffff;
  --surface-strong: #f8fbf7;
  --ink: #15221a;
  --muted: #66736a;
  --line: #dfe8df;
  --line-strong: #c8d8cb;
  --green: #0f7a43;
  --green-dark: #075a31;
  --green-soft: #e7f5ec;
  --orange: #f36f45;
  --orange-soft: #fff0e8;
  --blue: #3578d4;
  --blue-soft: #eaf2ff;
  --teal: #179a84;
  --yellow: #fff7d6;
  --shadow: 0 20px 60px rgba(25, 50, 34, 0.14);
  --radius: 8px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(15, 122, 67, 0.06), transparent 34%),
    linear-gradient(315deg, rgba(53, 120, 212, 0.08), transparent 32%),
    var(--bg);
  color: var(--ink);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-stage {
  width: min(100%, 1320px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: minmax(390px, 430px) minmax(420px, 1fr);
  align-items: center;
  gap: 34px;
}

.device-panel {
  display: flex;
  justify-content: center;
}

.phone-shell {
  width: 410px;
  height: 860px;
  padding: 12px;
  border-radius: 44px;
  background: #101515;
  box-shadow: var(--shadow);
  position: relative;
}

.phone-shell::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 50%;
  width: 118px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 0 0 18px 18px;
  background: #101515;
  z-index: 3;
}

.phone-status {
  position: absolute;
  inset: 19px 28px auto;
  height: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #111;
  font-weight: 700;
  font-size: 12px;
  z-index: 4;
  pointer-events: none;
}

.status-icons {
  letter-spacing: 0;
}

.app-frame {
  height: 100%;
  overflow: hidden;
  border-radius: 34px;
  background: var(--surface);
  position: relative;
  display: flex;
  flex-direction: column;
}

.app-header {
  flex: 0 0 auto;
  padding: 46px 20px 12px;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(223, 232, 223, 0.82);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  z-index: 2;
}

.app-header h1 {
  margin: 2px 0 0;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: 0;
}

.app-header span {
  display: block;
  font-size: 12px;
  line-height: 1;
  color: var(--green);
  font-weight: 800;
}

.back-button {
  opacity: 0;
  pointer-events: none;
}

.back-button.visible {
  opacity: 1;
  pointer-events: auto;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-button:active,
.primary-button:active,
.secondary-button:active,
.quick-card:active,
.export-card:active,
.bottom-tabs button:active {
  transform: translateY(1px);
}

.screen-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 96px;
  scroll-behavior: smooth;
}

.screen {
  display: none;
  animation: screenIn 180ms ease-out;
}

.screen.active {
  display: block;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.shop-card {
  min-height: 148px;
  border-radius: var(--radius);
  overflow: hidden;
  color: white;
  background:
    linear-gradient(90deg, rgba(5, 82, 44, 0.97), rgba(8, 112, 62, 0.72)),
    url("assets/sample-food-board.png") center / cover;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(15, 122, 67, 0.22);
}

.shop-photo {
  width: 76px;
  height: 76px;
  border-radius: var(--radius);
  background: url("assets/sample-food-board.png") 17% 44% / 330% auto;
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.shop-info {
  min-width: 0;
}

.shop-label {
  display: inline-flex;
  font-size: 12px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #d6ffe6;
}

.shop-info h2 {
  margin: 10px 0 14px;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
}

.shop-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.shop-stats span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.76);
}

.shop-stats strong {
  display: block;
  margin-bottom: 2px;
  font-size: 17px;
  color: white;
}

.section-block {
  margin-top: 18px;
}

.section-block.compact {
  margin-top: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
}

.text-link {
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-card {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(27, 48, 34, 0.05);
}

.quick-card strong,
.export-card strong {
  font-size: 14px;
  line-height: 1.2;
}

.quick-card small,
.export-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.quick-icon,
.export-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.quick-icon.green {
  color: var(--green);
  background: var(--green-soft);
}

.quick-icon.orange {
  color: var(--orange);
  background: var(--orange-soft);
}

.quick-icon.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.quick-icon.teal {
  color: var(--teal);
  background: #e5f7f4;
}

.soft-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.soft-pill.success {
  color: var(--green);
  background: var(--green-soft);
}

.soft-pill.warning {
  color: #9b651b;
  background: var(--yellow);
}

.health-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
  display: grid;
  grid-template-columns: 102px 1fr;
  align-items: center;
  gap: 12px;
}

.score-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, white 56%, transparent 57%),
    conic-gradient(var(--green) calc(var(--score, 86) * 1%), #e7eee7 0);
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--green);
}

.score-ring span {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.score-ring small {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
}

.health-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.health-card li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.health-card li strong {
  margin-left: auto;
  color: var(--ink);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.dot.success {
  background: var(--green);
}

.dot.warning {
  background: var(--orange);
}

.dot.muted {
  background: #b7c3ba;
}

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

.activity-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  align-items: center;
}

.dish-thumb {
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  background-image: url("assets/sample-food-board.png");
  background-size: 360% auto;
  background-position: 15% 45%;
}

.dish-thumb.salad {
  background-position: 47% 45%;
}

.dish-thumb.toast {
  background-position: 76% 45%;
}

.dish-thumb.soup {
  background-position: 28% 69%;
}

.dish-copy {
  min-width: 0;
}

.dish-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dish-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-price {
  color: #e43d28;
  font-weight: 900;
}

.capture-hero {
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(15, 122, 67, 0.98), rgba(6, 87, 48, 0.88)),
    url("assets/sample-food-board.png") center / cover;
  color: white;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 54px;
  align-items: center;
  gap: 14px;
}

.capture-hero h2,
.capture-hero p {
  margin: 0;
}

.capture-hero h2 {
  font-size: 20px;
  line-height: 1.15;
}

.capture-hero p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.45;
}

.primary-fab {
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  color: var(--green);
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.photo-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.photo-card {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.photo-card .photo {
  height: 86px;
  background-image: url("assets/sample-food-board.png");
  background-size: 320% auto;
  background-position: 18% 44%;
}

.photo-card:nth-child(2) .photo {
  background-position: 52% 45%;
}

.photo-card:nth-child(3) .photo {
  background-position: 78% 44%;
}

.photo-card:nth-child(4) .photo {
  background-position: 33% 70%;
}

.photo-card:nth-child(5) .photo {
  background-position: 63% 70%;
}

.photo-card small {
  display: block;
  padding: 7px 9px;
  color: var(--muted);
  font-size: 11px;
}

.photo-card .check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--green);
}

.scan-card,
.warning-card,
.publish-status,
.profile-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.scan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.scan-head strong {
  display: block;
  font-size: 15px;
}

.scan-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

#scanPercent {
  color: var(--green);
  font-weight: 900;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  margin: 13px 0;
  background: #e6eee7;
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #2bbd73);
  transition: width 260ms ease;
}

.primary-button,
.secondary-button,
.chip-button {
  border-radius: var(--radius);
  min-height: 42px;
  padding: 0 14px;
  font-weight: 900;
  border: 1px solid transparent;
  cursor: pointer;
}

.primary-button {
  color: white;
  background: var(--green);
  box-shadow: 0 10px 22px rgba(15, 122, 67, 0.22);
}

.primary-button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.secondary-button {
  color: var(--green);
  background: var(--surface);
  border-color: var(--line-strong);
}

.secondary-button.ghost {
  color: var(--muted);
}

.full {
  width: 100%;
}

.warning-card {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  background: #fff7f4;
  border-color: #ffd5c8;
}

.warning-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--orange);
  background: var(--orange-soft);
}

.warning-card strong {
  display: block;
  color: #8c3c25;
  font-size: 14px;
}

.warning-card p {
  margin: 4px 0 0;
  color: #8f6253;
  font-size: 12px;
  line-height: 1.35;
}

.chip-button {
  min-height: 34px;
  color: var(--orange);
  background: white;
  border-color: #ffc9b8;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 10px;
}

.search-field {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.search-field svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.category-strip {
  margin: 12px -16px 10px;
  padding: 0 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-strip button,
.template-tabs button {
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface-strong);
  white-space: nowrap;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.category-strip button.active,
.template-tabs button.active {
  color: var(--green);
  background: var(--green-soft);
  border-color: #bfe4ca;
}

.bulk-bar {
  min-height: 46px;
  border-radius: var(--radius);
  padding: 8px;
  margin-bottom: 10px;
  background: var(--green);
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-bar span {
  margin-right: auto;
  font-size: 13px;
}

.bulk-bar button {
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: white;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.dish-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
  display: grid;
  grid-template-columns: 26px 58px 1fr;
  gap: 10px;
  align-items: center;
}

.dish-row.low-confidence {
  background: linear-gradient(90deg, #fff8dc, white 46%);
  border-color: #f2dfa4;
}

.dish-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.dish-main {
  min-width: 0;
}

.dish-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dish-title-row strong {
  font-size: 14px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.confidence-tag {
  flex: 0 0 auto;
  min-width: 42px;
  min-height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
}

.confidence-tag.low {
  color: #9a6a16;
  background: var(--yellow);
}

.dish-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dish-price-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 8px;
  align-items: center;
}

.price-input {
  min-height: 36px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  font-weight: 900;
  color: var(--ink);
}

.mini-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.mini-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.photo-compare {
  height: 226px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: #ddd;
}

.compare-image {
  position: absolute;
  inset: 0;
  background-image: url("assets/sample-food-board.png");
  background-size: 280% auto;
  background-position: 44% 44%;
}

.compare-image.after {
  width: 50%;
  filter: brightness(1.08) saturate(1.18) contrast(1.05);
  border-right: 2px solid white;
}

#compareRange {
  position: absolute;
  inset: auto 12px 44px;
  width: calc(100% - 24px);
  accent-color: var(--green);
}

.compare-labels {
  position: absolute;
  inset: 10px 10px auto;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.compare-labels span {
  border-radius: 6px;
  padding: 5px 8px;
  color: white;
  background: rgba(9, 85, 48, 0.78);
  font-size: 12px;
  font-weight: 900;
}

.detail-actions {
  margin: 12px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-form label {
  display: grid;
  gap: 6px;
}

.detail-form label span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.detail-form input,
.detail-form select,
.detail-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  outline: 0;
}

.detail-form textarea {
  padding-top: 10px;
  resize: vertical;
  line-height: 1.45;
}

.full-field,
.switch-row {
  grid-column: 1 / -1;
}

.switch-row {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.switch-row strong {
  display: block;
  font-size: 14px;
}

.switch-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.switch-row input {
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  accent-color: var(--green);
}

.sticky-save {
  position: sticky;
  bottom: 10px;
  width: 100%;
  margin-top: 14px;
}

.template-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.mobile-print-preview {
  min-height: 486px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffefb;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(35, 45, 34, 0.08);
}

.print-menu-head {
  padding: 20px 18px 12px;
  color: white;
  background: var(--green);
}

.print-menu-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.05;
}

.print-menu-head p {
  margin: 7px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.print-category {
  padding: 12px 18px;
  border-bottom: 1px solid #edf0e8;
}

.print-category h3 {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 14px;
}

.print-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 7px;
  font-size: 13px;
}

.print-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-line span {
  color: var(--green);
  font-weight: 900;
}

.mobile-print-preview.board {
  background: #14221a;
  color: white;
}

.mobile-print-preview.board .print-menu-head {
  background: #0a1410;
}

.mobile-print-preview.board .print-category {
  border-color: rgba(255, 255, 255, 0.12);
}

.mobile-print-preview.board .print-category h3,
.mobile-print-preview.board .print-line span {
  color: #74e0a3;
}

.print-options {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.print-options .primary-button {
  grid-column: 1 / -1;
}

.publish-status {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.publish-status h2 {
  margin: 10px 0 4px;
  font-size: 18px;
}

.publish-status p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.export-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.export-card {
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.export-icon.print {
  color: var(--blue);
  background: var(--blue-soft);
}

.export-icon.pdf {
  color: #e43d28;
  background: #ffecec;
}

.export-icon.share {
  color: var(--green);
  background: var(--green-soft);
}

.qr-mini,
.qr-large {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 2px;
  background: white;
}

.qr-mini {
  width: 54px;
  height: 54px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.qr-mini span,
.qr-large span {
  background: #0d2116;
}

.qr-mini span.off,
.qr-large span.off {
  background: transparent;
}

.more-grid {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.more-grid button {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 8px 3px;
  font-size: 11px;
  cursor: pointer;
}

.more-grid svg {
  width: 20px;
  height: 20px;
  color: var(--green);
}

.profile-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 58px;
  height: 58px;
  border-radius: var(--radius);
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
}

.profile-card h2 {
  margin: 0;
  font-size: 18px;
}

.profile-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.settings-list {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.settings-list button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

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

.settings-list svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.bottom-tabs {
  position: absolute;
  inset: auto 0 0;
  min-height: calc(72px + var(--safe-bottom));
  padding: 8px 10px calc(8px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  z-index: 5;
}

.bottom-tabs button {
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #7a887e;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.bottom-tabs svg {
  width: 21px;
  height: 21px;
}

.bottom-tabs button.active {
  color: var(--green);
  background: var(--green-soft);
}

.design-panel {
  display: grid;
  align-content: center;
  gap: 20px;
}

.design-panel img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(15, 48, 30, 0.12);
  box-shadow: var(--shadow);
}

.design-panel span {
  color: var(--green);
  font-weight: 900;
  font-size: 13px;
}

.design-panel h2 {
  margin: 6px 0 8px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: 0;
}

.design-panel p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.app-modal {
  border: 0;
  padding: 0;
  background: transparent;
}

.app-modal::backdrop {
  background: rgba(8, 15, 12, 0.42);
  backdrop-filter: blur(6px);
}

.sheet {
  width: min(360px, calc(100vw - 28px));
  border-radius: 16px;
  padding: 16px;
  background: white;
  box-shadow: var(--shadow);
}

.sheet header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet h2 {
  margin: 0;
  font-size: 18px;
}

.qr-large {
  width: 220px;
  height: 220px;
  padding: 16px;
  margin: 18px auto 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sheet p {
  margin: 0 0 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  min-width: 240px;
  max-width: calc(100vw - 32px);
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(17, 30, 23, 0.94);
  color: white;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  z-index: 20;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 960px) {
  .mobile-stage {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .design-panel {
    display: none;
  }
}

@media (max-width: 560px) {
  html,
  body {
    background: var(--surface);
  }

  .mobile-stage {
    display: block;
    width: 100%;
    min-height: 100dvh;
    padding: 0;
  }

  .phone-shell {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    padding: 0;
    border-radius: 0;
    background: var(--surface);
    box-shadow: none;
  }

  .phone-shell::before,
  .phone-status {
    display: none;
  }

  .app-frame {
    border-radius: 0;
  }

  .app-header {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
  }

  .screen-scroll {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
