:root {
  --ink: #152643;
  --text: #3f4054;
  --muted: #8e8e96;
  --purple: #9b83d5;
  --purple-soft: #cbb2ef;
  --purple-pale: #f0eafb;
  --rose: #9b5f78;
  --pink: #f7dce5;
  --pink-pale: #fff1f5;
  --green: #275f38;
  --gold: #b38a25;
  --canvas: #fbf8f8;
  --surface: #ffffff;
  --line: #ece7ea;
  --shadow: 0 8px 22px rgba(47, 39, 64, 0.08);
  --display: "STKaiti", "KaiTi", "Microsoft YaHei", sans-serif;
  --body: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--text);
  background: #222127;
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(155, 131, 213, 0.45);
  outline-offset: 2px;
}

.icon {
  display: block;
  flex: 0 0 auto;
}

#app {
  min-height: 100dvh;
}

.phone-shell {
  position: relative;
  /* 20:9 手机比例：宽度受视口约束，高度按比例联动 */
  width: min(100vw, 430px, calc(100dvh * 9 / 20));
  height: min(100dvh, calc(100vw * 20 / 9), 956px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--canvas);
  isolation: isolate;
}

.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--canvas);
}

.screen-main {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.screen-main::-webkit-scrollbar,
.quick-actions::-webkit-scrollbar,
.scan-categories::-webkit-scrollbar {
  display: none;
}

.top-bar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(92px, 1fr) auto minmax(92px, 1fr);
  align-items: center;
  min-height: 72px;
  padding: 12px 10px 8px 16px;
  flex: 0 0 auto;
  background: rgba(251, 248, 248, 0.94);
  backdrop-filter: blur(14px);
}

.top-bar h1 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
}

.surface,
.new-chat {
  background: #fff;
  box-shadow: 0 5px 12px rgba(55, 48, 61, 0.09);
}

.new-chat {
  height: 46px;
  padding: 0 14px;
  border-radius: 23px;
  color: var(--ink);
  font-size: 15px;
  white-space: nowrap;
}

.mini-capsule {
  justify-self: end;
  display: flex;
  align-items: center;
  width: 90px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(34, 34, 34, 0.12);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.72);
}

.mini-capsule span {
  width: 5px;
  height: 5px;
  margin-right: 4px;
  border-radius: 50%;
  background: #202020;
}

.mini-capsule i {
  width: 1px;
  height: 21px;
  margin-left: 7px;
  background: #d6d3d3;
}

.mini-capsule b {
  width: 15px;
  height: 3px;
  margin-left: 8px;
  border-radius: 3px;
  background: #202020;
}

.mini-capsule em {
  width: 18px;
  height: 18px;
  margin-left: 8px;
  border: 3px solid #202020;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px #202020;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--purple);
}

.brand-mark strong {
  font-size: 20px;
  font-weight: 700;
}

.brand-moon {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
}

.brand-moon i {
  position: absolute;
  left: 9px;
  top: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  transform-origin: 2px 11px;
}

.brand-moon i:nth-child(2) { transform: rotate(45deg); }
.brand-moon i:nth-child(3) { transform: rotate(90deg); }
.brand-moon i:nth-child(4) { transform: rotate(135deg); }
.brand-moon i:nth-child(5) { transform: rotate(180deg); }
.brand-moon i:nth-child(6) { transform: rotate(225deg); }
.brand-moon i:nth-child(7) { transform: rotate(270deg); }
.brand-moon i:nth-child(8) { transform: rotate(315deg); }

.bottom-nav {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 68px;
  padding: 5px 22px max(5px, env(safe-area-inset-bottom));
  flex: 0 0 auto;
  border-top: 1px solid #eee9eb;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -4px 18px rgba(48, 39, 56, 0.05);
}

.tab-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  color: #858a94;
  font-size: 12px;
}

.tab-button.active {
  color: var(--purple);
}

.tab-icon {
  display: grid;
  width: 36px;
  height: 31px;
  place-items: center;
}

.chat-tab .tab-icon {
  position: relative;
  width: 52px;
  height: 52px;
  margin-top: -16px;
  border-radius: 50%;
  color: white;
  background: var(--purple);
  border: 7px solid #f3edff;
  box-shadow: 0 0 20px rgba(170, 139, 243, 0.58);
}

.chat-tab.active .tab-icon::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(173, 139, 245, 0.25);
  border-radius: 50%;
}

/* Chat */
.chat-screen {
  background: #fffafa;
}

.chat-main {
  background: linear-gradient(180deg, #fffafa 0, #fff0f5 56%, #fff 100%);
}

.chat-hero {
  position: relative;
  min-height: 288px;
  overflow: hidden;
  background: linear-gradient(135deg, #fffdfc 0%, #fff0f5 58%, #f8e4ef 100%);
}

.chat-hero::after {
  content: "new";
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 78px;
  font-weight: 300;
}

.hero-copy {
  position: absolute;
  z-index: 3;
  left: 30px;
  top: 30px;
  color: var(--rose);
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.55;
}

.hero-copy span,
.hero-copy strong {
  display: block;
}

.hero-copy strong {
  margin-top: 6px;
  font-weight: 600;
}

.nutritionist-portrait {
  position: absolute;
  z-index: 2;
  right: -5px;
  bottom: -148px;
  width: 210px;
  height: 430px;
  background-image: url("../assets/brand-board.png");
  background-repeat: no-repeat;
  background-position: left -8px top -28px;
  background-size: 520px auto;
  filter: saturate(0.96);
}

.suggestions-panel {
  position: relative;
  z-index: 4;
  width: calc(100% - 28px);
  margin: -24px auto 20px;
  padding: 20px 16px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.suggestions-panel h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 17px;
}

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

.suggestion-list button {
  display: grid;
  grid-template-columns: 32px 1fr 18px;
  align-items: center;
  min-height: 70px;
  padding: 12px;
  gap: 8px;
  border: 1px solid #eee6f8;
  border-radius: 17px;
  color: #404055;
  background: #fff;
  box-shadow: 0 5px 14px rgba(68, 54, 83, 0.05);
  text-align: left;
}

.suggestion-list button .icon:first-child {
  width: 31px;
  height: 31px;
  padding: 6px;
  border-radius: 50%;
  color: var(--rose);
  background: #f4eef7;
}

.suggestion-list button span {
  font-size: 16px;
  line-height: 1.45;
}

.quick-actions {
  position: relative;
  z-index: 34;
  display: flex;
  gap: 7px;
  min-height: 36px;
  padding: 3px 14px;
  overflow-x: auto;
  flex: 0 0 auto;
  background: rgba(255, 250, 250, 0.96);
  scrollbar-width: none;
}

.quick-actions button {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 31px;
  padding: 0 10px;
  flex: 0 0 auto;
  border-radius: 16px;
  color: #997ed8;
  background: #f0edf4;
  font-size: 13px;
  font-weight: 600;
}

.composer {
  position: relative;
  z-index: 33;
  display: grid;
  grid-template-columns: 34px 1fr 34px 48px;
  align-items: center;
  gap: 5px;
  min-height: 67px;
  padding: 7px 13px 8px 16px;
  flex: 0 0 auto;
  background: #fffafa;
}

.composer::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 6px 62px 6px 12px;
  border: 1px solid #f0ecec;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 3px 9px rgba(58, 48, 63, 0.05);
}

.composer input {
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 15px;
}

.composer input::placeholder {
  color: #99989c;
}

.voice-button,
.plus-button {
  display: grid;
  height: 42px;
  place-items: center;
  color: var(--rose);
}

.voice-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
}

.voice-bars i {
  width: 3px;
  border-radius: 2px;
  background: #50545e;
}

.voice-bars i:nth-child(1), .voice-bars i:nth-child(5) { height: 8px; }
.voice-bars i:nth-child(2), .voice-bars i:nth-child(4) { height: 17px; }
.voice-bars i:nth-child(3) { height: 24px; }

.send-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #d0cce2;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 16px 36px;
  background: linear-gradient(180deg, #fffafa, #fff0f5 72%, #fff);
}

.user-message,
.meal-photo-message {
  align-self: flex-end;
  max-width: 82%;
  padding: 12px 15px;
  border-radius: 18px 18px 5px 18px;
  color: white;
  background: var(--purple);
  font-size: 15px;
  line-height: 1.5;
}

.ai-answer {
  padding: 17px 15px;
  border: 1px solid rgba(236, 226, 235, 0.8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  font-size: 15px;
  line-height: 1.75;
}

.answer-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.answer-identity .brand-mark strong { font-size: 17px; }
.answer-identity .brand-moon { width: 19px; height: 19px; transform: scale(.86); }
.answer-identity > span { color: #9b98a1; font-size: 12px; }

.ai-answer p {
  margin: 0 0 13px;
}

.ai-answer h3 {
  margin: 17px 0 8px;
  color: #342c49;
  font-size: 18px;
}

.ai-answer ul {
  margin: 0;
  padding-left: 20px;
}

.ai-answer li {
  margin: 6px 0;
  padding-left: 2px;
}

.ai-answer li::marker {
  color: var(--rose);
}

.answer-note {
  margin-top: 16px;
  padding: 12px;
  border-left: 3px solid var(--purple);
  border-radius: 4px 10px 10px 4px;
  background: var(--purple-pale);
}

.meal-photo-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
}

.meal-plate {
  position: relative;
  width: 66px;
  height: 52px;
  overflow: hidden;
  border: 4px solid #f2ecdc;
  border-radius: 50%;
  background: #fff;
}

.meal-plate i {
  position: absolute;
  border-radius: 50%;
}

.meal-plate i:nth-child(1) { width: 24px; height: 18px; left: 4px; top: 7px; background: #d1a958; }
.meal-plate i:nth-child(2) { width: 19px; height: 16px; right: 7px; top: 8px; background: #7da156; }
.meal-plate i:nth-child(3) { width: 22px; height: 14px; left: 8px; bottom: 5px; background: #ecb456; }
.meal-plate i:nth-child(4) { width: 18px; height: 16px; right: 8px; bottom: 4px; background: #b77b66; }

.meal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.meal-tags span {
  padding: 4px 9px;
  border-radius: 12px;
  color: var(--green);
  background: #edf5e9;
  font-size: 12px;
  font-weight: 600;
}

.score-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 14px 0 8px;
  color: #332c48;
}

.score-line b {
  color: var(--rose);
  font-size: 28px;
}

.score-line span { color: #aaa7ad; font-size: 12px; }

.score-table {
  overflow: hidden;
  border: 1px solid #ebe7ec;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.4;
}

.score-row {
  display: grid;
  grid-template-columns: 29% 13% 1fr;
  border-top: 1px solid #ebe7ec;
}

.score-row:first-child { border-top: 0; }
.score-row > * { padding: 8px 6px; border-left: 1px solid #ebe7ec; }
.score-row > *:first-child { border-left: 0; }
.score-head { color: #85828b; background: #faf8fb; font-weight: 600; }
.score-row b { color: var(--rose); }

.record-meal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 17px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--green);
  background: #eef6ed;
  font-size: 13px;
}

.record-meal span { display: flex; align-items: center; gap: 5px; }
.record-meal button { color: var(--green); font-weight: 700; }

/* Meal recognition result */
.meal-thread {
  gap: 12px;
  padding: 16px 14px 34px;
  background: linear-gradient(180deg, #fbf8ff 0%, #f7f3ff 54%, #fff8fa 100%);
}

.meal-photo-message {
  width: 142px;
  max-width: none;
  height: 116px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px 22px 7px 22px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(62, 47, 83, 0.12);
}

.meal-photo-message span { display: none; }

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

.meal-answer {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.meal-answer > .answer-identity {
  padding: 2px 4px 0;
}

.meal-result-card {
  overflow: hidden;
  border: 1px solid rgba(231, 223, 238, 0.9);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(67, 52, 91, 0.08);
}

.meal-score-summary {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 20px 18px 17px;
  background: linear-gradient(135deg, #fff 20%, #f5efff 100%);
}

.meal-score-ring {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  place-content: center;
  border-radius: 50%;
  color: #4e3b6d;
  background: conic-gradient(#9b83d5 0 88%, #e9e3f0 88% 100%);
}

.meal-score-ring::before {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.meal-score-ring strong,
.meal-score-ring span {
  position: relative;
  z-index: 1;
}

.meal-score-ring strong {
  font-size: 31px;
  line-height: 1;
}

.meal-score-ring span {
  margin-top: 2px;
  color: #9a91a2;
  font-size: 11px;
  text-align: center;
}

.meal-result-kicker {
  display: block;
  margin-bottom: 4px;
  color: #8f829b;
  font-size: 12px;
}

.meal-score-summary > div:last-child > strong {
  display: block;
  color: #2f2940;
  font-size: 17px;
  line-height: 1.4;
}

.meal-score-summary p {
  margin: 5px 0 0;
  color: #817b88;
  font-size: 12px;
  line-height: 1.55;
}

.meal-nutrition-summary {
  margin: 0 14px;
  padding: 15px 2px 14px;
  border-bottom: 1px solid #eee9f0;
}

.calorie-total {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: #77717c;
}

.calorie-total span { margin-right: auto; font-size: 13px; }
.calorie-total strong { color: #2d2936; font-size: 24px; }
.calorie-total small { color: #8f8995; font-size: 12px; }

.macro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 11px;
}

.macro-grid > span {
  display: grid;
  grid-template-columns: 8px 1fr;
  align-items: center;
  gap: 5px;
  color: #89838f;
  font-size: 11px;
}

.macro-grid strong {
  grid-column: 2;
  color: #4c4654;
  font-size: 12px;
}

.macro-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.macro-dot.carbs { background: #a8c8f8; }
.macro-dot.protein { background: #f4a9ad; }
.macro-dot.fat { background: #f5c6d4; }

.meal-food-summary {
  padding: 4px 16px 2px;
}

.meal-food-summary button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #f0edf1;
  text-align: left;
}

.meal-food-summary button:last-child { border-bottom: 0; }
.meal-food-summary button > span { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.meal-food-summary button > span > strong { color: #3a3442; font-size: 14px; }
.meal-food-summary button > span > strong small { color: #4c4652; font-size: 13px; font-weight: 500; }
.meal-food-summary button > span > small { margin-top: 2px; color: #9c97a1; font-size: 11px; }
.meal-food-summary button > .icon { color: #aaa2b3; }

.meal-card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px 14px 15px;
}

.meal-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  color: #77609d;
  font-size: 13px;
  font-weight: 700;
}

.meal-save-button {
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 24px;
  color: #fff;
  background: #8d74ce;
  box-shadow: 0 7px 17px rgba(114, 87, 170, 0.2);
  font-size: 15px;
  font-weight: 700;
}

.meal-save-button.saved {
  color: #386744;
  background: #eaf4e9;
  box-shadow: none;
}

.meal-copy {
  margin-top: 12px;
  padding: 18px 17px 8px;
  border: 1px solid rgba(231, 223, 238, 0.85);
  border-radius: 18px 18px 0 0;
  background: #fff;
}

.meal-copy h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 17px;
}

.meal-copy h3 .icon { color: #8c72c5; }
.ai-generated-note { display: block; margin: 20px 0 6px; color: #b2acb7; }

.meal-answer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid rgba(231, 223, 238, 0.85);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: #fff;
}

.meal-answer-actions > div { display: flex; gap: 2px; }
.meal-answer-actions button { display: inline-flex; min-width: 38px; min-height: 38px; align-items: center; justify-content: center; gap: 5px; border-radius: 19px; color: #696174; }
.meal-answer-actions button.active { color: #7e63bd; background: #f0eafa; }
.meal-answer-actions > button { padding: 0 10px; font-weight: 700; }

/* Meal record editor */
.meal-record-editor {
  position: absolute;
  z-index: 120;
  inset: 0;
  display: flex;
  flex-direction: column;
  color: #242039;
  background: #f0edff;
  animation: sheet-up .22s ease-out;
}

.meal-editor-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 8px;
}

.meal-editor-header h2 { margin: 0; font-size: 22px; }
.meal-editor-header button { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; }

.meal-record-editor > main {
  min-height: 0;
  padding: 8px 14px 104px;
  overflow-y: auto;
}

.meal-meta-card,
.meal-editor-foods {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
}

.meal-meta-card { margin-bottom: 12px; padding: 0 16px; }

.meal-meta-card button {
  display: grid;
  grid-template-columns: 1fr auto 18px;
  width: 100%;
  min-height: 66px;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #efedf2;
  text-align: left;
}

.meal-meta-card button:last-child { border-bottom: 0; }
.meal-meta-card span { color: #8b8795; }
.meal-meta-card span b { color: #e54e57; }
.meal-meta-card strong { color: #29243c; font-size: 15px; }
.meal-meta-card .icon { color: #777080; }

.meal-editor-foods { padding: 0 16px; }

.meal-editor-food {
  padding: 15px 0 17px;
  border-bottom: 1px solid #ece9ef;
}

.meal-editor-food:last-child { border-bottom: 0; }

.meal-editor-food-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 34px 34px;
  align-items: center;
  gap: 7px;
}

.meal-editor-food-head .meal-food-image { width: 48px; height: 48px; border-radius: 11px; }
.meal-editor-food-head > strong { min-width: 0; color: #28233b; font-size: 15px; }
.meal-editor-food-head button { display: grid; width: 34px; height: 34px; place-items: center; color: #71648b; }
.meal-editor-food-head button:last-child { color: #9b94a5; }

.meal-editor-food-nutrition,
.food-editor-nutrition {
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #f7f6ff;
}

.meal-editor-food-nutrition > strong,
.food-editor-nutrition > strong { font-size: 14px; }

.meal-editor-food-nutrition > div,
.food-editor-nutrition > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 10px;
  color: #848096;
  font-size: 11px;
}

.meal-editor-food-nutrition span,
.food-editor-nutrition span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.meal-food-empty { padding: 44px 16px; color: #9892a0; text-align: center; }

.meal-editor-footer {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px max(18px, env(safe-area-inset-bottom));
  background: rgba(240, 237, 255, 0.94);
  backdrop-filter: blur(12px);
}

.meal-editor-footer button,
.food-editor-confirm {
  height: 54px;
  border-radius: 27px;
  background: #fff;
  font-size: 16px;
  font-weight: 700;
}

.meal-editor-footer button:last-child,
.food-editor-confirm { color: #fff; background: #7860db; }

.meal-picker-backdrop,
.food-editor-backdrop {
  position: absolute;
  z-index: 130;
  inset: 0;
  background: rgba(25, 24, 37, 0.55);
}

.meal-picker-sheet,
.food-editor-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  border-radius: 26px 26px 0 0;
  background: #fff;
  animation: sheet-up .2s ease-out;
}

.meal-picker-sheet header {
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  align-items: center;
  min-height: 62px;
  padding: 0 16px;
  border-bottom: 1px solid #eeeaf0;
}

.meal-picker-sheet header strong { text-align: center; }
.meal-picker-sheet header button { color: #725bd0; font-weight: 700; }
.meal-picker-sheet header button:last-child { text-align: right; }

.meal-picker-options {
  max-height: min(390px, 54vh);
  padding: 7px 18px max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
}

.meal-picker-options button {
  display: flex;
  width: 100%;
  min-height: 53px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid #f0edf2;
  color: #79747f;
}

.meal-picker-options button.selected { color: #332d42; font-weight: 700; }
.meal-picker-options button.selected .icon { color: #7b62ce; }

.food-editor-sheet { padding: 0 16px max(20px, env(safe-area-inset-bottom)); }

.food-editor-sheet header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
}

.food-editor-sheet h2 { margin: 0; font-size: 21px; }
.food-editor-sheet header button { display: grid; width: 42px; height: 42px; place-items: center; }

.food-editor-fields {
  overflow: hidden;
  padding: 0 15px;
  border-radius: 17px;
  background: #fdfcff;
  box-shadow: inset 0 0 0 1px #eeeaf3;
}

.food-editor-fields label {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 1.3fr);
  min-height: 64px;
  align-items: center;
  border-bottom: 1px solid #efecf2;
}

.food-editor-fields label:last-child { border-bottom: 0; }
.food-editor-fields span { color: #8c8797; }
.food-editor-fields input { width: 100%; border: 0; outline: 0; background: transparent; color: #29243c; text-align: right; }
.food-editor-fields input::placeholder { color: #c5c0ce; }
.food-editor-nutrition { margin: 14px 0 22px; }
.food-editor-confirm { width: 100%; }

@media (max-width: 365px) {
  .meal-score-summary { grid-template-columns: 72px 1fr; padding-inline: 14px; }
  .meal-score-ring { width: 70px; height: 70px; }
  .meal-score-ring strong { font-size: 27px; }
  .meal-editor-food-nutrition > div,
  .food-editor-nutrition > div { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .meal-record-editor,
  .meal-picker-sheet,
  .food-editor-sheet,
  .product-exchange-modal,
  .redeem-success-modal { animation: none; }
}

/* Drawer and sheets */
.drawer-backdrop,
.add-sheet-backdrop {
  position: absolute;
  z-index: 80;
  inset: 0;
  background: rgba(21, 38, 67, 0.48);
}

.drawer {
  width: 68%;
  height: calc(100% - 68px);
  padding: 88px 16px 18px;
  background: linear-gradient(180deg, #fffdfc, #fff0f5 55%, #f7eff8);
  box-shadow: 12px 0 30px rgba(18, 30, 54, 0.16);
  animation: slide-in .24s ease-out;
}

.drawer-profile {
  display: grid;
  grid-template-columns: 58px 1fr 18px;
  align-items: center;
  width: 100%;
  gap: 10px;
  text-align: left;
}

.drawer-profile > .icon { color: #737986; }
.drawer-profile span { display: flex; min-width: 0; flex-direction: column; }
.drawer-profile strong { color: #4a4b55; font-size: 16px; }
.drawer-profile small { margin-top: 4px; color: #aaa0d0; font-size: 12px; }

.drawer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0 16px;
}

.drawer-links button {
  display: flex;
  min-height: 130px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 17px;
  color: var(--rose);
  background: #fff;
  box-shadow: var(--shadow);
}

.drawer-links .icon {
  width: 48px;
  height: 48px;
  margin-bottom: 9px;
  padding: 11px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #eba8bd, #a78adb);
}

.drawer-links strong { color: #54515a; font-size: 14px; }
.drawer-links span { margin-top: 5px; color: #aaa0ce; font-size: 11px; }

.history-card {
  padding: 14px 12px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.86);
}

.history-card h3 {
  margin: 0 0 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid #f1dce6;
  font-size: 15px;
}

.history-card > span { display: block; margin-bottom: 8px; color: #aaa0ce; font-size: 12px; }
.history-card button { display: flex; width: 100%; justify-content: space-between; margin-top: 7px; padding: 11px 10px; border-radius: 11px; background: #fff; }
.history-card button.active { border-left: 2px solid var(--rose); background: #fff1f6; }
.history-card b { font-size: 13px; font-weight: 500; }
.history-card time { color: #aaa0ce; font-size: 11px; }

.add-sheet-backdrop {
  display: flex;
  align-items: flex-end;
  background: rgba(35, 31, 45, 0.28);
}

.add-sheet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  padding: 20px 18px 90px;
  gap: 12px;
  border-radius: 20px 20px 0 0;
  background: #fff;
}

.add-sheet button {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  color: var(--rose);
  font-size: 12px;
}

.add-sheet button .icon {
  width: 50px;
  height: 50px;
  padding: 13px;
  border-radius: 16px;
  background: var(--purple-pale);
}

/* Brand */
.brand-main {
  padding: 0 15px 26px;
  background: linear-gradient(180deg, #fff5f8, #fffafb 70%, #f8f0fa);
}

.foreword {
  padding: 28px 18px 25px;
  text-align: center;
}

.section-kicker {
  color: var(--purple);
  font-size: 10px;
  font-weight: 700;
}

.foreword h2 {
  margin: 9px 0 20px;
  color: #4d425c;
  font-family: var(--display);
  font-size: 32px;
}

.foreword p {
  margin: 13px 0;
  color: #9a82ae;
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.65;
}

.brand-board {
  display: block;
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.brand-promise {
  margin: 16px 0 0;
  padding: 18px;
  border-top: 1px solid #e8d6e4;
  text-align: center;
}

.brand-promise strong { color: var(--rose); font-size: 18px; }
.brand-promise p { margin: 6px 0; color: #6d6177; font-weight: 600; }
.brand-promise span { color: #9b96a2; font-size: 12px; }

/* Profile */
.profile-main {
  padding: 8px 16px 30px;
  background: linear-gradient(180deg, #fffafa, #fff1f5 60%, #f5f0f7);
}

.profile-card,
.function-grid,
.settings-card {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.profile-line {
  display: grid;
  grid-template-columns: 48px 1fr 30px;
  align-items: center;
  min-height: 94px;
  padding: 14px 13px;
  gap: 10px;
}

.profile-line > .icon { color: #5b6068; }
.profile-line span { display: flex; min-width: 0; flex-direction: column; }
.profile-line strong { color: #4a4c54; font-size: 16px; }
.profile-line small { margin-top: 6px; color: #aaa7d1; font-size: 12px; white-space: nowrap; }
.profile-line button { color: #5b5c63; }

.profile-tip {
  display: flex;
  width: 100%;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  border-radius: 0 0 18px 18px;
  color: var(--rose);
  background: #faf5f6;
  font-size: 13px;
  text-align: left;
}

.profile-tip b { color: #8c90a1; font-weight: 500; }

.section-title {
  margin: 16px 5px 9px;
  color: #565661;
  font-size: 16px;
}

.function-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 10px 4px;
}

.function-grid button {
  display: flex;
  min-height: 91px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  color: var(--rose);
}

.function-grid button:nth-child(2) { color: var(--gold); }
.function-grid button span { color: #5b5c66; font-size: 14px; }

.settings-card {
  overflow: hidden;
}

.settings-card button {
  display: grid;
  grid-template-columns: 30px 1fr auto 18px;
  width: 100%;
  min-height: 61px;
  align-items: center;
  padding: 0 15px;
  gap: 9px;
  color: var(--rose);
  text-align: left;
}

.settings-card button + button { border-top: 1px solid #eee9eb; }
.settings-card button span { color: #55565f; }
.settings-card button b { color: #aca9d1; font-size: 13px; font-weight: 500; }

.profile-footer {
  padding: 28px 0 6px;
  color: #7f7e86;
  text-align: center;
  font-size: 12px;
}

.profile-footer p { margin: 0 0 9px; }
.profile-footer button { color: #df4453; }
.profile-footer span { color: #b4afd3; }

/* Memory */
.memory-main {
  padding: 10px 10px 24px;
  background: linear-gradient(180deg, #fff5f6, #faeef5 65%, #f2ecf7);
}

.memory-intro {
  display: grid;
  grid-template-columns: 28px 1fr;
  padding: 13px 14px;
  gap: 8px;
  border: 1px solid #e5c5d0;
  border-left: 3px solid var(--rose);
  border-radius: 11px;
  color: var(--rose);
  background: #fbf5f6;
}

.memory-intro p {
  margin: 0;
  color: #5b5263;
  font-size: 14px;
  line-height: 1.65;
}

.memory-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.memory-card {
  position: relative;
  min-height: 84px;
  padding: 13px 42px 12px 14px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(73, 61, 82, 0.04);
}

.memory-card div { display: flex; gap: 8px; color: #8b8b8c; font-size: 11px; }
.memory-card p { margin: 9px 0 0; color: #59606d; font-size: 15px; }
.memory-card button { position: absolute; right: 11px; top: 14px; color: #89898b; }

.empty-state,
.empty-page {
  display: grid;
  min-height: 100%;
  place-items: center;
}

.empty-state {
  padding: 40px 24px;
  color: #9893a0;
  text-align: center;
}

.empty-state strong { margin-top: 10px; color: var(--text); }
.empty-state p { margin: 6px 0; font-size: 13px; line-height: 1.6; }

/* Tasks */
.tasks-main {
  padding: 4px 16px 34px;
  background: #fbf9f8;
}

.asset-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 4px 2px 13px;
}

.asset-hero > div {
  display: grid;
}

.asset-hero strong {
  color: var(--ink);
  font-family: "Arial Black", var(--body);
  font-size: 54px;
  line-height: 1;
}

.asset-hero div span { margin-top: 7px; color: #8b8b87; font-size: 15px; }
.asset-hero p { margin: 6px 0 0; color: #9c9996; font-size: 12px; }

.asset-hero > button {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  padding: 5px 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.asset-hero > button .icon { color: #d83c46; }

.balance-card {
  display: grid;
  grid-template-columns: 1fr auto 18px;
  align-items: center;
  width: 100%;
  min-height: 67px;
  padding: 0 13px 0 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: left;
}

.balance-card span { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.balance-card i { width: 20px; height: 13px; border-radius: 50%; background: #38b980; box-shadow: inset -7px 0 rgba(0,0,0,.08); }
.balance-card strong { color: var(--ink); font-size: 28px; }

.task-card {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow);
}

.task-card h2 {
  display: inline-block;
  margin: 0 0 2px;
  padding: 4px 11px;
  border-radius: 14px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
}

.task-card.limited h2 { background: #e67d00; }

.task-card.puzzle-task-card h2 { background: var(--purple); }

.task-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  min-height: 85px;
  padding: 10px 0;
  gap: 8px;
  border-top: 1px solid #eeeae8;
}

.task-row > .icon { color: var(--rose); }
.task-row div { display: grid; gap: 4px; }
.task-row div strong { color: var(--ink); font-size: 14px; line-height: 1.4; }
.task-row div span { color: #76747b; font-size: 12px; line-height: 1.45; }
.task-row div b { color: #665080; font-size: 12px; font-weight: 700; line-height: 1.45; }
.task-row button { min-width: 82px; height: 45px; padding: 0 13px; border-radius: 23px; color: white; background: var(--green); font-size: 13px; font-weight: 700; }
.task-row button.done,
.task-row button:disabled { display: flex; align-items: center; justify-content: center; gap: 3px; color: #9a9997; background: #efeeeb; }

.floating-service {
  position: absolute;
  z-index: 48;
  right: 14px;
  bottom: 24px;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 5px solid #ff8b92;
  border-radius: 50%;
  color: #ff4c55;
  background: #fff;
  box-shadow: 0 5px 14px rgba(222, 66, 78, 0.22);
}

/* Welfare */
.welfare-main {
  padding: 0 16px 34px;
  background: linear-gradient(180deg, #fffafa 0%, #fff6f8 46%, #f8f3f8 100%);
}

.welfare-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 104px;
  margin: 0 -16px 18px;
  padding: 18px 18px 16px;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #eadfe7;
  background: #fff9fb;
}

.puzzle-board {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
}

.puzzle-board span {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #e5e0e4;
  box-shadow: inset 0 0 0 1px rgba(73, 61, 82, 0.04);
}

.puzzle-board span::before,
.puzzle-board span::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: inherit;
}

.puzzle-board span::before { right: -6px; top: 10px; }
.puzzle-board span::after { left: 10px; top: -6px; }
.puzzle-board span.filled { background: var(--purple); box-shadow: 0 5px 12px rgba(122, 91, 164, 0.2); }

.welfare-progress-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.welfare-progress-copy strong {
  color: var(--ink);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.welfare-progress-copy span {
  color: #756d77;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.welfare-records {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 2px;
  color: #674b78;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.bean-conversion {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 15px 16px;
  border-radius: 14px;
  color: #fff;
  background: #635077;
  box-shadow: 0 9px 22px rgba(73, 53, 89, 0.18);
}

.bean-conversion div { display: grid; gap: 4px; }
.bean-conversion strong { font-size: 16px; line-height: 1.4; }
.bean-conversion span { color: #f1eaf4; font-size: 12px; line-height: 1.45; }
.bean-conversion button {
  min-width: 112px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  color: #503a60;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.puzzle-paths { margin-bottom: 24px; }
.puzzle-paths h2,
.welfare-products h2 { margin: 0 0 12px; color: var(--ink); font-size: 18px; }

.puzzle-paths > button {
  display: grid;
  grid-template-columns: 38px 1fr auto 18px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  gap: 8px;
  border-top: 1px solid #e6dfe5;
  text-align: left;
}

.puzzle-paths > button:last-child { border-bottom: 1px solid #e6dfe5; }
.puzzle-paths > button > .icon:first-child { color: var(--purple); }
.puzzle-paths > button > span { display: grid; gap: 4px; }
.puzzle-paths > button strong { color: #33374b; font-size: 15px; }
.puzzle-paths > button small { color: #746f77; font-size: 12px; line-height: 1.4; }
.puzzle-paths > button b { color: #6b4c7c; font-size: 13px; }

.welfare-products > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.welfare-products > header span { color: #6f6872; font-size: 13px; }

.welfare-products { margin-bottom: 20px; }

.puzzle-help {
  margin-top: 4px;
  border-top: 1px solid #e6dfe5;
  border-bottom: 1px solid #e6dfe5;
}

.puzzle-help summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  min-height: 68px;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.puzzle-help summary::-webkit-details-marker { display: none; }
.puzzle-help summary:focus-visible {
  outline: 3px solid rgba(155, 131, 213, 0.45);
  outline-offset: 2px;
}
.puzzle-help summary > span { display: grid; gap: 3px; }
.puzzle-help summary strong { color: #3b3340; font-size: 15px; }
.puzzle-help summary small { color: #7b737c; font-size: 12px; }
.puzzle-help summary > .icon { color: #755586; transition: transform 180ms ease; }
.puzzle-help[open] summary > .icon { transform: rotate(90deg); }

.puzzle-help-list { border-top: 1px solid #ece4ea; }
.puzzle-help-list > button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 18px;
  width: 100%;
  min-height: 72px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #ece4ea;
  text-align: left;
}

.puzzle-help-list > button:last-child { border-bottom: 0; }
.puzzle-help-list > button > .icon:first-child { color: var(--purple); }
.puzzle-help-list > button > span { display: grid; gap: 3px; }
.puzzle-help-list > button strong { color: #33374b; font-size: 14px; }
.puzzle-help-list > button small { color: #746f77; font-size: 12px; line-height: 1.4; }
.puzzle-help-list > button b { color: #6b4c7c; font-size: 13px; }

@media (max-width: 365px) {
  .welfare-progress {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
  }

  .welfare-records {
    grid-column: 2;
    min-height: 30px;
    justify-self: start;
  }

  .puzzle-board span { width: 29px; height: 29px; }
  .puzzle-board span::before,
  .puzzle-board span::after { width: 10px; height: 10px; }
  .puzzle-board span::before { right: -5px; top: 10px; }
  .puzzle-board span::after { left: 10px; top: -5px; }
  .welfare-products > header span { font-size: 12px; }
}

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

.product-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 11px 10px 13px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 15px rgba(62, 50, 70, 0.06);
  text-align: left;
}

.product-art {
  position: relative;
  height: 150px;
  margin: -5px -8px 2px;
  background-image: url("../assets/welfare-products.png");
  background-repeat: no-repeat;
  background-size: 390px auto;
}

.product-women { background-position: -17px -215px; }
.product-men { background-position: -204px -215px; }
.product-moss { background-position: -17px -468px; }
.product-salidroside { background-position: -204px -468px; }

.product-salidroside::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 76px;
  height: 52px;
  background: #fff;
}

.product-magnesium {
  background-image: url("../assets/product-magnesium-thumb.jpg");
  background-position: center;
  background-size: contain;
}

.product-exchange-backdrop {
  position: absolute;
  z-index: 110;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  background: rgba(28, 25, 34, 0.42);
  backdrop-filter: blur(2px);
}

.product-exchange-modal {
  display: flex;
  width: 100%;
  max-height: calc(100% - 12px);
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(36, 29, 45, 0.24);
  animation: sheet-up .22s ease-out;
}

.product-exchange-modal > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 16px 12px;
  flex: 0 0 auto;
}

.product-exchange-modal > header span {
  color: #7c7380;
  font-size: 13px;
}

.product-exchange-modal h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.35;
}

.product-exchange-modal > header button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #615969;
  background: #f3eff3;
}

.product-exchange-content {
  min-height: 0;
  padding: 0 12px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.product-exchange-content::-webkit-scrollbar { display: none; }

.product-detail-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fbf2f8;
}

.product-exchange-summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 0 14px;
  border-radius: 8px;
  background: #f4eff8;
}

.product-exchange-summary span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4f3d60;
  font-size: 15px;
  font-weight: 800;
}

.product-exchange-summary i {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--purple);
}

.product-exchange-summary small {
  color: #736a79;
  font-size: 12px;
}

.product-exchange-content > p {
  margin: 13px 2px 17px;
  color: #6d6670;
  font-size: 14px;
  line-height: 1.6;
}

.product-exchange-modal > footer {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid #eee8ed;
  flex: 0 0 auto;
  background: #fff;
}

.product-exchange-modal > footer button {
  min-height: 50px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
}

.product-exchange-next {
  color: #5f5664;
  background: #f1edef;
}

.product-exchange-confirm {
  color: #fff;
  background: #715687;
  box-shadow: 0 7px 16px rgba(87, 60, 105, 0.2);
}

.redeem-success-backdrop {
  position: absolute;
  z-index: 130;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(38, 31, 45, 0.46);
  backdrop-filter: blur(3px);
}

.redeem-success-modal {
  position: relative;
  width: 100%;
  max-width: 350px;
  padding: 34px 24px 24px;
  border: 1px solid #eee4ec;
  border-radius: 18px;
  background: #fffafb;
  box-shadow: 0 18px 48px rgba(45, 34, 53, 0.26);
  text-align: center;
  animation: success-in .24s ease-out;
}

.redeem-success-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: #665d6b;
  background: #f1ebf0;
}

.redeem-success-puzzles {
  display: flex;
  height: 70px;
  align-items: end;
  justify-content: center;
  gap: 7px;
  margin: 12px 0 22px;
}

.redeem-success-puzzles i {
  width: 46px;
  height: 52px;
  border-radius: 8px;
  background: #a88bd0;
  box-shadow: 0 8px 15px rgba(120, 91, 158, 0.2);
}

.redeem-success-puzzles i:nth-child(2) {
  height: 68px;
  background: #7d619b;
}

.redeem-success-label {
  display: block;
  color: #8a748f;
  font-size: 14px;
  font-weight: 700;
}

.redeem-success-modal h2 {
  margin: 5px 0 10px;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.35;
}

.redeem-success-modal > strong {
  display: block;
  color: #634b70;
  font-size: 18px;
  line-height: 1.45;
}

.redeem-success-modal > p {
  margin: 9px auto 22px;
  color: #736c77;
  font-size: 15px;
  line-height: 1.65;
}

.redeem-success-primary {
  width: 100%;
  min-height: 52px;
  border-radius: 8px;
  color: #fff;
  background: #715687;
  box-shadow: 0 8px 18px rgba(91, 64, 109, 0.2);
  font-size: 17px;
  font-weight: 800;
}

@keyframes success-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.product-card > strong {
  display: block;
  min-height: 43px;
  color: #3e4054;
  font-size: 15px;
  line-height: 1.4;
}

.product-cost {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 8px;
  color: #604d70;
  font-size: 13px;
  font-weight: 700;
}

.product-cost i {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--purple);
}

.product-cost i::before,
.product-cost i::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
}

.product-cost i::before { right: -3px; top: 4px; }
.product-cost i::after { left: 4px; top: -3px; }
.product-card > small { color: #716d75; font-size: 12px; }

.exchange-button {
  position: absolute;
  z-index: 47;
  left: 16px;
  right: 16px;
  bottom: 16px;
  height: 54px;
  border-radius: 28px;
  color: white;
  background: var(--purple);
  box-shadow: 0 8px 20px rgba(114, 88, 166, 0.24);
  font-size: 17px;
  font-weight: 700;
}

.exchange-button:disabled {
  color: #a3a5ae;
  background: #d9d5d1;
  box-shadow: none;
}

.welfare-screen .floating-service { bottom: 18px; }
.welfare-screen.has-exchange-action .floating-service { bottom: 84px; }

/* Feedback */
.feedback-backdrop {
  position: absolute;
  z-index: 90;
  inset: 0;
  background: rgba(39, 44, 64, 0.43);
  backdrop-filter: blur(2px);
}

.feedback-sheet {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 68px;
  display: flex;
  max-height: calc(100% - 118px);
  padding: 28px 24px 24px;
  overflow-y: auto;
  flex-direction: column;
  border-radius: 26px 26px 20px 20px;
  background: #fffdfc;
  box-shadow: 0 -10px 34px rgba(33, 38, 56, 0.18);
  animation: sheet-up .24s ease-out;
}

.sheet-handle {
  position: absolute;
  left: 50%;
  top: 13px;
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: #d8d7dc;
  transform: translateX(-50%);
}

.feedback-close {
  position: absolute;
  right: 17px;
  top: 15px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #6d6d71;
  background: #f2f1f0;
}

.feedback-sheet h2 {
  margin: 27px 0 18px;
  color: var(--ink);
  font-size: 22px;
  text-align: center;
}

.feedback-sheet label {
  position: relative;
  display: grid;
  min-height: 58px;
  margin-bottom: 12px;
  border: 1px solid #e8e5e7;
  border-radius: 12px;
  background: #fff;
}

.feedback-sheet label > span {
  position: absolute;
  z-index: 2;
  left: 14px;
  top: 7px;
  color: #8b8990;
  font-size: 10px;
  pointer-events: none;
}

.feedback-sheet select,
.feedback-sheet input,
.feedback-sheet textarea {
  width: 100%;
  border: 0;
  outline: 0;
  color: #414052;
  background: transparent;
  font: inherit;
}

.feedback-sheet select,
.feedback-sheet input {
  height: 58px;
  padding: 20px 14px 5px;
}

.feedback-sheet select {
  appearance: auto;
}

.feedback-sheet input::placeholder,
.feedback-sheet textarea::placeholder {
  color: #97959b;
}

.feedback-sheet .feedback-description {
  min-height: 170px;
  padding: 0;
}

.feedback-description textarea {
  min-height: 168px;
  padding: 14px;
  resize: none;
  line-height: 1.55;
}

.feedback-description small {
  position: absolute;
  left: 14px;
  bottom: 8px;
  color: #ce4e5e;
  font-size: 11px;
}

.feedback-submit {
  width: 78%;
  min-height: 52px;
  margin: 5px auto 0;
  border-radius: 26px;
  color: white;
  background: var(--rose);
  box-shadow: 0 8px 18px rgba(155, 95, 120, 0.22);
  font-size: 16px;
  font-weight: 700;
}

/* Invite */
.invite-screen,
.invite-scroll {
  background: #fff0f4;
}

.invite-art {
  position: relative;
  width: 100%;
  min-height: 100%;
  line-height: 0;
}

.invite-art > img {
  display: block;
  width: 100%;
  height: auto;
}

.invite-hotspot {
  position: absolute;
  z-index: 3;
  display: block;
  background: transparent;
}

.invite-back {
  left: 2.5%;
  top: 0.6%;
  width: 14%;
  aspect-ratio: 1;
  border-radius: 50%;
}

.invite-save {
  left: 25%;
  width: 50%;
  height: 4.6%;
  border-radius: 30px;
}

.invite-save-first { top: 43.2%; }
.invite-save-second { top: 94.2%; }

/* Expanded tasks */
.invite-task > .icon {
  color: var(--rose);
}

.task-row.invite-task button {
  color: white;
  background: #e78200;
  box-shadow: 0 6px 14px rgba(231, 130, 0, 0.2);
}

.rules-link {
  display: block;
  margin: 24px auto 72px;
  padding-bottom: 2px;
  border-bottom: 1px solid #888887;
  color: #858583;
  font-size: 13px;
}

/* Rewards */
.rewards-main {
  padding: 14px 16px 38px;
  background: linear-gradient(180deg, #fff0dc 0%, #fff7ec 38%, #fffcf5 100%);
}

.reward-balance,
.reward-card {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 19px rgba(92, 68, 43, 0.06);
}

.reward-balance {
  display: grid;
  grid-template-columns: 1fr 1px 0.8fr auto;
  align-items: center;
  min-height: 114px;
  padding: 18px;
  gap: 16px;
}

.reward-balance > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.reward-balance span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #8a8176;
  font-size: 13px;
}

.reward-balance strong {
  margin-top: 8px;
  color: #302821;
  font-family: "Arial Black", var(--body);
  font-size: 35px;
  line-height: 1;
}

.reward-balance > i {
  width: 1px;
  height: 47px;
  background: #eee1d0;
}

.reward-balance > button {
  min-width: 92px;
  height: 48px;
  border-radius: 24px;
  color: #fff;
  background: #fa4337;
  box-shadow: 0 7px 16px rgba(250, 67, 55, 0.24);
  font-weight: 700;
}

.reward-puzzle {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 2px;
  background: #d0cfcd;
  transform: rotate(12deg);
}

.reward-card {
  margin-top: 14px;
  padding: 20px;
}

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

.reward-card h2 {
  margin: 0;
  color: #312c28;
  font-size: 18px;
}

.reward-card header button {
  display: flex;
  align-items: center;
  color: #b3a596;
  font-size: 13px;
}

.reward-empty {
  display: grid;
  min-height: 100px;
  place-items: center;
  color: #b1a79b;
  font-size: 14px;
}

.product-reward-list {
  margin-top: 6px;
}

.product-reward-item {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  min-height: 88px;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #eee6dc;
}

.product-reward-thumb {
  position: relative;
  width: 60px;
  height: 72px;
  overflow: hidden;
  border-radius: 6px;
  background: #fffafa;
}

.product-reward-thumb .product-art {
  position: absolute;
  left: -48px;
  top: -40px;
  width: 150px;
  height: 150px;
  margin: 0;
  transform: scale(0.66);
}

.product-reward-copy {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 7px;
}

.product-reward-copy > strong {
  min-width: 0;
  color: #342e2a;
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.product-reward-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.product-reward-meta time {
  color: #8d8278;
  font-size: 12px;
  white-space: nowrap;
}

.product-reward-action {
  width: 52px;
  height: 30px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.product-reward-action.view {
  border: 1px solid #d9b78b;
  color: #8b6130;
  background: #fffaf2;
}

.product-reward-action.claim {
  color: #fff;
  background: #ed5a45;
}

.shipping-backdrop {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(48, 40, 33, 0.42);
}

.shipping-modal {
  position: relative;
  width: min(100%, 320px);
  padding: 26px 22px 22px;
  border-radius: 16px;
  color: #3a3029;
  background: #fff;
  box-shadow: 0 18px 45px rgba(54, 42, 31, 0.2);
  text-align: center;
}

.shipping-close {
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #8f847a;
}

.shipping-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 50%;
  color: #9b6d38;
  background: #f7e7cd;
}

.shipping-modal h2 {
  margin: 0;
  font-size: 20px;
}

.shipping-modal > strong {
  display: block;
  margin-top: 6px;
  color: #7d7065;
  font-size: 14px;
}

.shipping-modal dl {
  margin: 18px 0;
  padding: 4px 14px;
  border-radius: 8px;
  background: #fff9f0;
}

.shipping-modal dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  padding: 10px 0;
  gap: 10px;
  border-bottom: 1px solid #eee2d3;
  text-align: left;
}

.shipping-modal dl div:last-child { border-bottom: 0; }
.shipping-modal dt { color: #918478; font-size: 13px; }
.shipping-modal dd { margin: 0; color: #3f352e; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }

.shipping-primary {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  color: #fff;
  background: #ed5a45;
  font-size: 15px;
  font-weight: 700;
}

.product-rewards,
.friend-rewards {
  padding: 16px 20px 10px;
}

.product-rewards-main {
  padding: 4px 20px 36px;
  background: #fffaf3;
}

.product-rewards-main .product-reward-list {
  margin-top: 0;
}

.product-rewards-main .product-reward-item {
  min-height: 88px;
  padding: 8px 0;
}

.invite-progress {
  min-height: 126px;
}

.progress-track {
  position: relative;
  height: 8px;
  margin: 24px 0 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #f1e6d7;
}

.progress-track i {
  display: block;
  width: var(--invite-progress, 3%);
  height: 100%;
  background: #d9b78b;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  color: #b1a79b;
  font-size: 12px;
}

.invite-activity {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  min-height: 54px;
  margin-top: 10px;
  padding: 9px 14px;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  border: 1px solid #f1dfc7;
  border-radius: 12px;
  color: #5e5145;
  background: #fff9ef;
}

.invite-activity-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #9b6d38;
  background: #f5e4c9;
}

.invite-activity-viewport {
  min-width: 0;
  overflow: hidden;
}

.invite-activity-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

.invite-activity-entry.is-leaving {
  opacity: 0;
  transform: translateY(-10px);
}

.invite-activity-entry.is-entering {
  opacity: 0;
  transform: translateY(10px);
}

.invite-activity-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.invite-activity-copy strong {
  max-width: 38%;
  overflow: hidden;
  color: #382f28;
  font-size: 14px;
  text-overflow: ellipsis;
}

.invite-activity-copy span,
.invite-activity-entry time {
  color: #73675d;
  font-size: 12px;
}

.invite-activity-entry time {
  color: #a09284;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .invite-activity-entry {
    transition: opacity 80ms linear;
    transform: none;
  }

  .invite-activity-entry.is-leaving,
  .invite-activity-entry.is-entering {
    transform: none;
  }
}

.friend-rewards {
  min-height: 0;
}

.friend-reward-list {
  margin-top: 6px;
}

.friend-reward-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 64px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #eee6dc;
}

.friend-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: #755568;
  background: #f2dce5;
}

.friend-avatar.green { color: #416553; background: #dfeee5; }
.friend-avatar.gold { color: #735d35; background: #f2e6c9; }
.friend-avatar.purple { color: #66537a; background: #e8dff2; }

.friend-reward-item > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.friend-reward-item strong {
  min-width: 0;
  color: #342e2a;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.friend-reward-item time {
  color: #91867c;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.friends-main {
  padding: 4px 20px 36px;
  background: #fffaf3;
}

.friends-main .friend-reward-list { margin-top: 0; }
.friends-main .friend-reward-item { min-height: 68px; }

@media (max-width: 365px) {
  .product-reward-copy { gap: 6px; }
  .product-reward-copy > strong { font-size: 14px; }
  .product-reward-meta { gap: 6px; }
  .product-reward-meta time,
  .friend-reward-item time { font-size: 11px; }
  .product-reward-action { width: 44px; height: 28px; font-size: 12px; }
  .friend-reward-item strong { font-size: 14px; }
  .invite-activity { padding-inline: 10px; }
  .invite-activity-copy { gap: 3px; }
  .invite-activity-copy strong { max-width: 32%; font-size: 13px; }
  .invite-activity-copy span,
  .invite-activity-entry time { font-size: 11px; }
}

/* Service */
.service-screen {
  background: #ffd4df;
}

.service-screen > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.service-back {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 24px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: transparent;
  background: transparent;
  box-shadow: none;
}

.service-back .icon { opacity: 0; }

/* Camera */
.camera-screen {
  color: #fff;
  background: #020205;
}

.camera-header {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 80px 1fr 92px;
  min-height: 74px;
  align-items: center;
  padding: 10px 8px 8px 12px;
  background: #020204;
}

.camera-header > button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: #9199aa;
  background: #18191d;
}

.camera-header h1 { margin: 0; color: #fff; font-size: 19px; text-align: center; }
.camera-header .mini-capsule { border-color: #29292e; background: #050507; }
.camera-header .mini-capsule i { background: #35353a; }
.camera-header .mini-capsule em { border-color: #fff; box-shadow: inset 0 0 0 3px #050507, inset 0 0 0 6px #fff; }
.camera-header .mini-capsule span,
.camera-header .mini-capsule b { background: #fff; }

.camera-preview {
  position: relative;
  min-height: 0;
  flex: 1;
  background: radial-gradient(circle at 52% 43%, #15151b, #030305 68%);
}

.focus-frame {
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(68vw, 270px);
  aspect-ratio: 1.3;
  transform: translate(-50%, -50%);
}

.focus-frame span {
  position: absolute;
  width: 35px;
  height: 35px;
  border-color: rgba(255, 255, 255, 0.82);
  border-style: solid;
}

.focus-frame span:nth-child(1) { left: 0; top: 0; border-width: 2px 0 0 2px; border-radius: 8px 0 0; }
.focus-frame span:nth-child(2) { right: 0; top: 0; border-width: 2px 2px 0 0; border-radius: 0 8px 0 0; }
.focus-frame span:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 2px 2px; border-radius: 0 0 0 8px; }
.focus-frame span:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; border-radius: 0 0 8px; }

.camera-preview p {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  margin: 0;
  color: #f6f4f4;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.camera-controls {
  min-height: 255px;
  padding: 14px 0 12px;
  border-radius: 20px 20px 0 0;
  color: #17171d;
  background: #fff;
}

.scan-categories {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.scan-categories > button {
  display: grid;
  min-width: 112px;
  min-height: 104px;
  grid-template-rows: 42px auto 1fr;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f8f6fb;
  text-align: left;
}

.scan-categories > button.active { border-color: var(--purple); background: #fbf9ff; }
.category-visual { display: grid; width: 45px; height: 38px; place-items: center; border-radius: 11px; color: var(--purple); background: var(--purple-pale); }
.scan-categories strong { margin-top: 3px; font-size: 14px; }
.scan-categories small { margin-top: 3px; color: #9a98a1; font-size: 10px; line-height: 1.35; }

.shutter-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 4px 28px 0;
}

.shutter-row > button:not(.shutter) {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: #9b83d5;
  font-size: 11px;
}

.shutter {
  display: grid;
  width: 74px;
  height: 74px;
  place-self: center;
  place-items: center;
  border: 6px solid #ece6f8;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #d5caed;
}

.shutter i {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #9178cf;
}

.analyzing {
  position: absolute;
  z-index: 110;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  background: rgba(17, 16, 24, 0.84);
  backdrop-filter: blur(10px);
}

.analysis-mark {
  display: grid;
  width: 74px;
  height: 74px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  color: #e2d6ff;
  animation: pulse 1s ease-in-out infinite;
}

.analyzing strong { font-size: 18px; }
.analyzing span { margin-top: 7px; color: #cbc7d4; font-size: 12px; }

/* Empty, toast */
.empty-page > div {
  max-width: 290px;
  color: var(--purple);
  text-align: center;
}

.empty-page h2 { margin: 14px 0 8px; color: var(--ink); font-size: 20px; }
.empty-page p { margin: 0; color: #8d8992; font-size: 13px; line-height: 1.65; }
.empty-page button { margin-top: 20px; padding: 11px 20px; border-radius: 20px; color: white; background: var(--purple); }

.toast {
  position: absolute;
  z-index: 130;
  left: 50%;
  bottom: 92px;
  display: flex;
  align-items: center;
  max-width: calc(100% - 42px);
  min-height: 42px;
  padding: 9px 15px;
  gap: 7px;
  border-radius: 22px;
  color: white;
  background: rgba(24, 35, 53, 0.94);
  box-shadow: 0 8px 20px rgba(22, 31, 45, 0.24);
  transform: translateX(-50%);
  font-size: 12px;
  animation: toast-in .2s ease-out;
}

.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@keyframes slide-in {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes sheet-up {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(.94); opacity: .7; }
  50% { transform: scale(1.05); opacity: 1; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (min-width: 600px) {
  body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 12px;
    background: #29282f;
  }

  #app { min-height: auto; }

  .phone-shell {
    height: min(920px, calc(100vh - 24px));
    min-height: 640px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0,0,0,.34);
  }
}

@media (max-width: 360px) {
  .top-bar { grid-template-columns: minmax(80px, 1fr) auto minmax(84px, 1fr); padding-left: 10px; }
  .new-chat { padding: 0 10px; font-size: 13px; }
  .icon-button { width: 42px; height: 42px; }
  .mini-capsule { width: 84px; }
  .hero-copy { left: 22px; font-size: 18px; }
  .nutritionist-portrait { right: -24px; }
  .task-row { grid-template-columns: 34px 1fr auto; }
  .task-row button { min-width: 72px; padding: 0 9px; }
}

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