:root {
  color-scheme: light;
  --primary: #2d6bff;
  --primary-dark: #1746b8;
  --primary-soft: #edf3ff;
  --text: #191f28;
  --text-secondary: #6b7684;
  --surface: #ffffff;
  --background: #f7f8fa;
  --border: #d9e0e8;
  --border-light: #edf0f3;
  --success: #20a464;
  --warning: #f59f00;
  --error: #e5484d;
  --safe: #2d6bff;
  --explore: #8256d0;
  --surprise: #dd6b37;
  --page: 20px;
  --radius-card: 24px;
  --radius-button: 16px;
  --shadow-card: 0 14px 40px rgb(31 45 76 / 9%);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-emphasis: cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family:
    "Pretendard Variable",
    Pretendard,
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #e9eef8;
  overflow-x: clip;
  overflow-y: auto;
  scroll-padding-bottom: calc(104px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  overflow-y: visible;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 12%, rgb(45 107 255 / 8%), transparent 28rem),
    radial-gradient(circle at 92% 86%, rgb(130 86 208 / 6%), transparent 26rem),
    #eef2f8;
  line-height: 1.5;
  overscroll-behavior-y: auto;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgb(45 107 255 / 28%);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

p,
h1,
h2,
h3,
ul {
  margin: 0;
}

img {
  display: block;
}

.phone-frame {
  position: relative;
  width: min(100%, 560px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: clip;
  background: var(--surface);
  box-shadow: 0 24px 80px rgb(35 51 78 / 14%);
}

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

.screen-pad {
  padding-right: var(--page);
  padding-left: var(--page);
}

.standard-screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 96px;
  background: var(--surface);
}

.screen-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  height: 60px;
  padding: max(env(safe-area-inset-top), 4px) 12px 0;
  border-bottom: 1px solid rgb(217 224 232 / 55%);
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(18px);
}

.screen-header h1 {
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-spacer {
  width: 44px;
}

.icon-button,
.floating-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  transition:
    transform 80ms var(--ease),
    background 140ms var(--ease),
    color 140ms var(--ease);
}

.icon-button:active,
.floating-icon-button:active {
  transform: scale(0.94);
}

.icon-button.subtle {
  background: var(--background);
  color: #505b6a;
}

.icon-button.bordered {
  border: 1px solid var(--border);
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: var(--radius-button);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  transition:
    transform 80ms var(--ease),
    background 140ms var(--ease),
    color 140ms var(--ease),
    border-color 140ms var(--ease);
}

.primary-button {
  color: white;
  background: var(--primary);
  box-shadow: 0 8px 24px rgb(45 107 255 / 22%);
}

.primary-button:hover {
  background: #245fe8;
}

.primary-button:active,
.secondary-button:active,
.danger-button:active {
  transform: scale(0.98);
}

.primary-button[disabled] {
  color: #a7b0bb;
  background: #e8ebef;
  box-shadow: none;
}

.secondary-button {
  border: 1px solid var(--border);
  color: var(--text);
  background: white;
}

.secondary-button.small {
  min-height: 46px;
  padding: 11px 16px;
  font-size: 14px;
}

.danger-button {
  margin-top: 12px;
  color: var(--error);
  background: #fff4f4;
}

.text-button {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--primary-dark);
  background: transparent;
  font-weight: 650;
}

.text-button.compact {
  min-height: 44px;
  padding: 8px 10px;
  color: var(--text-secondary);
  font-size: 14px;
}

.eyebrow {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.step-label {
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: var(--primary);
  box-shadow: 0 8px 18px rgb(45 107 255 / 25%);
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -0.08em;
}

.brand-mark-large {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  font-size: 36px;
}

.brand-mark-small {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 16px;
  box-shadow: none;
}

.wordmark {
  font-size: 32px;
  font-weight: 850;
  letter-spacing: -0.055em;
}

.wordmark-small {
  font-size: 21px;
}

.food-image-wrap {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, hsl(var(--fallback-hue) 80% 86%), transparent 60%),
    hsl(var(--fallback-hue) 45% 68%);
}

.food-image {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms var(--ease);
}

.image-fallback {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgb(255 255 255 / 84%);
  background:
    radial-gradient(circle at 35% 30%, rgb(255 255 255 / 30%), transparent 34%),
    linear-gradient(145deg, hsl(var(--fallback-hue) 55% 63%), hsl(calc(var(--fallback-hue) + 35) 55% 45%));
}

.image-fallback span {
  font-size: 44px;
  font-weight: 800;
}

.food-image-wrap.image-error .food-image {
  display: none;
}

.offline-banner {
  position: sticky;
  z-index: 45;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  color: #74500a;
  background: #fff4d9;
  font-size: 13px;
  font-weight: 650;
}

.sticky-actions {
  position: fixed;
  z-index: 35;
  right: max(calc((100vw - 560px) / 2), 0px);
  bottom: 0;
  left: max(calc((100vw - 560px) / 2), 0px);
  width: min(100%, 560px);
  margin: auto;
  padding-top: 12px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid rgb(217 224 232 / 72%);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(18px);
}

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: calc(90px + env(safe-area-inset-bottom));
  left: 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(calc(100% - 40px), 520px);
  min-height: 48px;
  margin: auto;
  padding: 12px 16px;
  border-radius: 15px;
  color: white;
  background: rgb(25 31 40 / 94%);
  box-shadow: 0 14px 40px rgb(0 0 0 / 20%);
  font-size: 14px;
  font-weight: 650;
  animation: toast-in 220ms var(--ease-emphasis);
}

@keyframes toast-in {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
}

/* Splash */

.splash-screen {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background:
    radial-gradient(circle at 50% 35%, rgb(45 107 255 / 12%), transparent 16rem),
    white;
  text-align: center;
}

.splash-screen .brand-mark {
  animation: logo-in 220ms var(--ease-emphasis) both;
}

.splash-screen .wordmark {
  margin-top: 18px;
  animation: fade-up 260ms 40ms var(--ease) both;
}

.splash-screen p {
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 14px;
  animation: fade-up 260ms 80ms var(--ease) both;
}

.splash-loader {
  width: 68px;
  height: 3px;
  margin-top: 56px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf4;
}

.splash-loader::after {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  content: "";
  animation: loading 680ms var(--ease) infinite;
}

@keyframes logo-in {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
}

@keyframes fade-up {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
}

@keyframes loading {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(230%);
  }
}

/* Authentication */

.auth-screen {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  padding-top: max(38px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-copy {
  margin-top: 54px;
}

.auth-copy h1 {
  margin-top: 12px;
  font-size: clamp(30px, 8.3vw, 38px);
  font-weight: 780;
  line-height: 1.24;
  letter-spacing: -0.055em;
}

.auth-copy > p:last-child {
  max-width: 400px;
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 42px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
}

.field > span small,
.comment-field > span small {
  color: #9aa3ae;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 56px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: 0;
  background: white;
  font-size: 16px;
  transition:
    border 140ms var(--ease),
    box-shadow 140ms var(--ease);
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgb(45 107 255 / 10%);
}

.form-error {
  min-height: 18px;
  margin-top: -5px;
  color: var(--error);
  font-size: 13px;
}

.auth-form .text-button {
  justify-self: center;
}

.legal-copy {
  margin-top: auto;
  padding-top: 28px;
  color: #9aa3ae;
  font-size: 12px;
  text-align: center;
}

/* Onboarding */

.onboarding-screen {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-rows: auto minmax(280px, 44vh) auto 1fr;
  background: white;
}

.onboarding-top {
  display: flex;
  justify-content: flex-end;
  padding: max(12px, env(safe-area-inset-top)) 12px 0;
}

.onboarding-visual {
  position: relative;
  display: grid;
  min-height: 300px;
  place-items: center;
  margin: 8px 20px 0;
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(circle at 15% 10%, rgb(45 107 255 / 12%), transparent 45%),
    #f3f6fc;
}

.onboarding-copy {
  padding-top: 30px;
}

.onboarding-copy h1 {
  margin-top: 9px;
  font-size: clamp(28px, 7.5vw, 34px);
  line-height: 1.28;
  letter-spacing: -0.05em;
}

.onboarding-copy > p:last-child {
  margin-top: 13px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.onboarding-bottom {
  align-self: end;
  padding-top: 20px;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

.page-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 20px;
}

.page-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d9e0e8;
  transition: width 220ms var(--ease);
}

.page-dots span.active {
  width: 25px;
  background: var(--primary);
}

.onboarding-cards {
  position: relative;
  width: 280px;
  height: 210px;
}

.mini-food-card {
  position: absolute;
  display: flex;
  width: 132px;
  height: 156px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  border: 1px solid rgb(255 255 255 / 75%);
  border-radius: 24px;
  color: white;
  box-shadow: 0 18px 36px rgb(49 67 101 / 18%);
  font-size: 14px;
  font-weight: 650;
}

.mini-food-card strong {
  margin-top: 3px;
  font-size: 28px;
}

.mini-food-card.card-one {
  z-index: 3;
  top: 27px;
  left: 72px;
  background: linear-gradient(145deg, #ef8056, #ab3829);
  transform: rotate(-1deg);
}

.mini-food-card.card-two {
  z-index: 2;
  top: 40px;
  left: 10px;
  background: linear-gradient(145deg, #799ece, #325277);
  transform: rotate(-8deg);
}

.mini-food-card.card-three {
  z-index: 1;
  top: 42px;
  right: 8px;
  background: linear-gradient(145deg, #82bf92, #397451);
  transform: rotate(8deg);
}

.method-visual {
  display: grid;
  width: calc(100% - 42px);
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.method-visual > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.method-orb {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  margin-bottom: 15px;
  border-radius: 50%;
  color: white;
  font-family: serif;
  font-size: 27px;
  box-shadow: 0 12px 24px rgb(40 59 91 / 15%);
}

.method-orb.raw {
  background: #e2766e;
}

.method-orb.grill {
  background: #c55a36;
}

.method-orb.smoke {
  background: #637086;
}

.method-visual strong {
  font-size: 14px;
}

.method-visual small {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.35;
}

.loop-visual {
  position: relative;
  display: grid;
  width: calc(100% - 38px);
  grid-template-columns: 1fr 30px 1fr 30px 1fr;
  align-items: center;
}

.loop-node {
  display: grid;
  min-width: 0;
  gap: 8px;
  justify-items: center;
}

.loop-node span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--primary);
  box-shadow: 0 10px 25px rgb(45 107 255 / 24%);
  font-size: 18px;
  font-weight: 750;
}

.loop-node strong {
  font-size: 14px;
}

.loop-visual > i {
  height: 2px;
  background: #b8caff;
}

.loop-return {
  position: absolute;
  right: 8px;
  bottom: -52px;
  left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 650;
}

/* Restrictions */

.restrictions-content {
  padding-top: 22px;
  padding-bottom: 30px;
}

.lead-copy h2 {
  margin-top: 9px;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.05em;
}

.lead-copy > p:last-child {
  margin-top: 12px;
  color: var(--text-secondary);
}

.none-choice {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: white;
  font-weight: 700;
}

.none-choice.selected {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.choice-check {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: transparent;
  background: white;
}

.none-choice.selected .choice-check {
  border-color: var(--primary);
  color: white;
  background: var(--primary);
}

.restriction-group {
  margin-top: 34px;
}

.restriction-group h3 {
  font-size: 18px;
}

.restriction-group > p {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 13px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.choice-chip {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 5px;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  font-size: 14px;
  font-weight: 650;
  transition:
    transform 80ms var(--ease),
    color 140ms var(--ease),
    background 140ms var(--ease),
    border-color 140ms var(--ease);
}

.choice-chip:active {
  transform: scale(0.97);
}

.choice-chip.selected {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.warning-note,
.info-note {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  padding: 15px;
  border-radius: 15px;
  color: #765513;
  background: #fff7e6;
  font-size: 13px;
  line-height: 1.5;
}

/* Assessment */

.assessment-screen {
  padding-bottom: 108px;
  background: var(--background);
}

.assessment-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding-top: max(8px, env(safe-area-inset-top));
  background: white;
}

.assessment-header p {
  font-size: 16px;
  font-weight: 650;
}

.assessment-header p strong {
  color: var(--primary);
  font-size: 20px;
}

.assessment-header span {
  display: block;
  margin-top: 1px;
  color: var(--text-secondary);
  font-size: 12px;
}

.progress-track {
  overflow: hidden;
  background: #e8edf4;
}

.progress-track.slim {
  height: 4px;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 300ms var(--ease-emphasis);
}

.assessment-content {
  padding-top: 23px;
}

.assessment-empty {
  display: grid;
  min-height: calc(100dvh - 76px);
  align-content: center;
  justify-items: center;
  padding-top: 48px;
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
  text-align: center;
}

.assessment-empty > .icon {
  width: 64px;
  height: 64px;
  padding: 16px;
  border-radius: 22px;
  color: white;
  background: var(--success);
}

.assessment-empty h1 {
  margin-top: 22px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.assessment-empty p {
  max-width: 360px;
  margin-top: 10px;
  color: var(--text-secondary);
}

.assessment-empty .primary-button {
  width: min(100%, 360px);
  margin-top: 28px;
}

.question-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.question-row > span {
  color: #a5adb7;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.assessment-food-card {
  overflow: hidden;
  margin-top: 13px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  background: white;
  box-shadow: var(--shadow-card);
  animation: card-enter 240ms var(--ease) both;
}

@keyframes card-enter {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}

.assessment-image {
  height: 234px;
}

.assessment-food-info {
  padding: 20px;
}

.food-meta {
  color: var(--text-secondary);
  font-size: 13px;
}

.assessment-food-info h1 {
  margin-top: 5px;
  font-size: 26px;
  line-height: 1.28;
  letter-spacing: -0.04em;
}

.fact-row {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  margin-top: 15px;
  font-size: 13px;
}

.fact-row + .fact-row {
  margin-top: 8px;
}

.fact-row span {
  color: var(--text-secondary);
}

.fact-row p {
  font-weight: 600;
}

.rating-section {
  margin-top: 24px;
}

.rating-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.rating-button {
  display: grid;
  min-width: 0;
  justify-items: center;
  padding: 0;
  background: transparent;
}

.rating-button strong {
  display: grid;
  width: clamp(48px, 12.6vw, 58px);
  height: clamp(48px, 12.6vw, 58px);
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: white;
  font-size: 18px;
  transition:
    transform 80ms var(--ease),
    color 140ms var(--ease),
    background 140ms var(--ease),
    border-color 140ms var(--ease);
}

.rating-button small {
  margin-top: 7px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating-button.selected strong {
  transform: scale(1.04);
  border-color: var(--primary);
  color: white;
  background: var(--primary);
  box-shadow: 0 8px 18px rgb(45 107 255 / 24%);
}

.skip-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

.skip-row button {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-secondary);
  background: white;
  font-size: 13px;
  font-weight: 650;
}

.skip-row button.selected {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.reason-panel {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid #d9e4ff;
  border-radius: 20px;
  background: #f6f8ff;
  animation: panel-open 220ms var(--ease) both;
}

@keyframes panel-open {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading-row h2 {
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.04em;
}

.section-heading-row > span {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

/* Analysis and result */

.analysis-screen {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 34%, rgb(45 107 255 / 11%), transparent 17rem),
    white;
  text-align: center;
}

.analysis-orbit {
  position: relative;
  display: grid;
  width: 180px;
  height: 180px;
  place-items: center;
  margin-bottom: 38px;
}

.analysis-orbit > span {
  position: absolute;
  border: 1px solid rgb(45 107 255 / 23%);
  border-radius: 50%;
}

.orbit-one {
  inset: 10px;
  animation: orbit 5s linear infinite;
}

.orbit-one::after,
.orbit-two::after {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 18px rgb(45 107 255 / 45%);
  content: "";
}

.orbit-one::after {
  top: 11px;
  left: 24px;
}

.orbit-two {
  inset: 33px;
  animation: orbit 3.5s linear reverse infinite;
}

.orbit-two::after {
  right: -4px;
  bottom: 35px;
}

.analysis-center {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 26px;
  color: white;
  background: var(--primary);
  box-shadow: 0 18px 45px rgb(45 107 255 / 28%);
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

.analysis-screen h1 {
  margin-top: 10px;
  font-size: 28px;
  line-height: 1.35;
  letter-spacing: -0.05em;
}

.analysis-steps {
  display: grid;
  width: min(100%, 320px);
  gap: 12px;
  margin-top: 34px;
  text-align: left;
}

.analysis-steps > div {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-radius: 13px;
  color: #9aa3ae;
  background: var(--background);
  font-size: 13px;
  font-weight: 650;
}

.analysis-steps > div.done {
  color: var(--success);
}

.analysis-steps > div.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.analysis-steps > div span {
  width: 15px;
  height: 15px;
  border: 2px solid #ccd4df;
  border-radius: 50%;
}

.analysis-steps > div.active span {
  border-color: var(--primary);
  border-top-color: transparent;
  animation: orbit 700ms linear infinite;
}

.analysis-note {
  margin-top: 36px;
  color: var(--text-secondary);
  font-size: 12px;
}

.result-screen {
  min-height: 100vh;
  background: white;
}

.result-hero {
  position: relative;
  overflow: hidden;
  padding-top: max(72px, calc(env(safe-area-inset-top) + 44px));
  padding-bottom: 38px;
  color: white;
  background: #173f9e;
}

.result-hero::before {
  position: absolute;
  top: -170px;
  right: -130px;
  width: 340px;
  height: 340px;
  border: 60px solid rgb(255 255 255 / 5%);
  border-radius: 50%;
  content: "";
}

.result-spark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 27px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 16px;
  background: rgb(255 255 255 / 10%);
}

.result-hero .eyebrow {
  color: #bfd2ff;
}

.result-hero h1 {
  margin-top: 10px;
  font-size: clamp(30px, 8vw, 38px);
  line-height: 1.28;
  letter-spacing: -0.055em;
}

.confidence-summary {
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  align-items: center;
  margin-top: 38px;
  padding-top: 25px;
  border-top: 1px solid rgb(255 255 255 / 15%);
}

.confidence-summary > i {
  width: 1px;
  height: 30px;
  background: rgb(255 255 255 / 18%);
}

.confidence-summary > div {
  display: flex;
  flex-direction: column;
}

.confidence-summary strong {
  font-size: 21px;
}

.confidence-summary span {
  margin-top: 3px;
  color: #cbd7ee;
  font-size: 11px;
}

.result-body {
  padding-top: 34px;
  padding-bottom: max(30px, env(safe-area-inset-bottom));
}

.insight-section + .insight-section {
  margin-top: 38px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 26px;
  border-radius: 9px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 800;
}

.section-number.muted {
  color: #66717e;
  background: #f0f2f5;
}

.section-title h2 {
  font-size: 20px;
  line-height: 1.3;
}

.section-title p {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 13px;
}

.insight-list {
  margin-top: 18px;
}

.preference-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(90px, 1.4fr) 36px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--border-light);
}

.preference-row > div:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.preference-row strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preference-row span,
.preference-row small {
  color: var(--text-secondary);
  font-size: 10px;
}

.preference-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf3;
}

.preference-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.preference-meter.negative span {
  background: #8c98a8;
}

.uncertain-card,
.change-card,
.uncertain-callout {
  display: flex;
  gap: 13px;
  margin-top: 18px;
  padding: 17px;
  border-radius: 18px;
  background: var(--background);
}

.uncertain-icon,
.change-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.uncertain-card strong {
  font-size: 14px;
}

.uncertain-card p {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
}

.result-body > .primary-button {
  margin-top: 36px;
}

.result-body > .secondary-button {
  margin-top: 10px;
}

/* Tab shell */

.app-shell-screen {
  min-height: 100vh;
  min-height: 100dvh;
  background: white;
}

.tab-content {
  min-height: calc(100vh - 76px);
  min-height: calc(100dvh - 76px);
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
}

.bottom-nav {
  position: fixed;
  z-index: 50;
  right: max(calc((100vw - 560px) / 2), 0px);
  bottom: 0;
  left: max(calc((100vw - 560px) / 2), 0px);
  display: grid;
  width: min(100%, 560px);
  height: calc(70px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr);
  margin: auto;
  padding: 7px 6px max(7px, env(safe-area-inset-bottom));
  border-top: 1px solid rgb(217 224 232 / 72%);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(20px);
}

.bottom-nav button {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 3px;
  border-radius: 13px;
  color: #9099a5;
  background: transparent;
  font-size: 10px;
  font-weight: 650;
}

.bottom-nav button.active {
  color: var(--primary);
}

.bottom-nav button.active::before {
  position: absolute;
  top: -8px;
  width: 28px;
  height: 3px;
  border-radius: 99px;
  background: var(--primary);
  content: "";
}

.bottom-nav button > i {
  position: absolute;
  top: 1px;
  right: calc(50% - 20px);
  display: grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  color: white;
  background: var(--error);
  font-size: 9px;
  font-style: normal;
}

.tab-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: max(28px, calc(env(safe-area-inset-top) + 15px));
  margin-bottom: 25px;
}

.tab-header h1 {
  margin-top: 1px;
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.05em;
}

/* Home */

.home-screen {
  background: white;
}

.home-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding-top: max(8px, env(safe-area-inset-top));
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: -0.035em;
}

.home-title {
  margin-top: 30px;
}

.confidence-badge {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 700;
}

.confidence-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.confidence-낮음 {
  color: #637083;
  background: #f0f2f5;
}

.confidence-낮음 i {
  background: #8b96a5;
}

.confidence-보통 {
  color: #8b5b00;
  background: #fff3d8;
}

.confidence-보통 i {
  background: var(--warning);
}

.home-title h1 {
  margin-top: 10px;
  font-size: 28px;
  line-height: 1.32;
  letter-spacing: -0.05em;
}

.hero-food-card {
  overflow: hidden;
  margin-top: 24px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  background: white;
  box-shadow: var(--shadow-card);
}

.card-image-button {
  position: relative;
  display: block;
  width: 100%;
  height: 260px;
  padding: 0;
  color: white;
  background: transparent;
  text-align: left;
}

.hero-image {
  width: 100%;
  height: 100%;
}

.card-image-button::after,
.recommendation-image::after,
.detail-hero::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 42%), transparent 52%);
  pointer-events: none;
  content: "";
}

.hero-score {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 17px;
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: white;
}

.hero-score span {
  position: absolute;
  right: 0;
  bottom: 40px;
  width: max-content;
  font-size: 11px;
}

.hero-score strong {
  font-size: 38px;
  line-height: 1;
}

.hero-score small {
  font-size: 12px;
}

.type-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  font-size: 11px;
  font-weight: 750;
}

.card-image-button > .type-badge {
  position: absolute;
  z-index: 4;
  top: 16px;
  left: 16px;
}

.type-badge.safe {
  background: var(--safe);
}

.type-badge.explore {
  background: var(--explore);
}

.type-badge.surprise {
  background: var(--surprise);
}

.hero-card-body {
  padding: 19px;
}

.hero-card-body > p {
  color: var(--text-secondary);
  font-size: 12px;
}

.hero-card-body h2 {
  margin-top: 3px;
  font-size: 23px;
  letter-spacing: -0.04em;
}

.hero-card-body ul {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}

.hero-card-body li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #4d5968;
  font-size: 13px;
  line-height: 1.45;
}

.hero-card-body li .icon {
  margin-top: 1px;
  color: var(--primary);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 9px;
  margin-top: 18px;
}

.home-section {
  margin-top: 42px;
}

.explore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.explore-card {
  position: relative;
  min-width: 0;
  padding: 0 0 15px;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  overflow: hidden;
  background: white;
  text-align: left;
}

.explore-card .food-image-wrap {
  height: 132px;
}

.explore-card .type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-height: 24px;
  padding: 3px 8px;
  font-size: 9px;
}

.explore-card > strong,
.explore-card > p {
  display: block;
  overflow: hidden;
  margin-right: 13px;
  margin-left: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explore-card > strong {
  margin-top: 12px;
  font-size: 14px;
}

.explore-card > p {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 11px;
}

.compact-food-row {
  display: grid;
  width: 100%;
  grid-template-columns: 56px minmax(0, 1fr) auto 18px;
  gap: 11px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-light);
  background: white;
  text-align: left;
}

.compact-food-row .food-image-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.compact-food-row > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.compact-food-row strong,
.compact-food-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-food-row strong {
  font-size: 14px;
}

.compact-food-row small {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 11px;
}

.compact-food-row em {
  color: var(--primary);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.compact-food-row > .icon {
  color: #a4acb6;
}

.change-card {
  margin-top: 40px;
  margin-bottom: 22px;
}

.change-card > div:last-child {
  min-width: 0;
}

.change-card strong,
.change-card span {
  display: block;
}

.change-card strong {
  margin-top: 3px;
  font-size: 14px;
}

.change-card span {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}

/* Recommendation feed */

.recommendations-screen {
  padding-bottom: 28px;
}

.catalog-search {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: 22px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 0 15px;
  border-radius: 15px;
  color: var(--text-secondary);
  background: var(--background);
  text-align: left;
}

.catalog-search span {
  font-size: 14px;
}

.catalog-search small {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.recommendation-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 22px;
  padding: 17px;
  border: 1px solid var(--border-light);
  border-radius: 19px;
}

.recommendation-summary > div {
  display: grid;
  grid-template-columns: 8px auto;
  column-gap: 6px;
  align-items: center;
}

.summary-dot {
  width: 8px;
  height: 8px;
  grid-row: 1 / span 2;
  border-radius: 50%;
}

.summary-dot.safe {
  background: var(--safe);
}

.summary-dot.explore {
  background: var(--explore);
}

.summary-dot.surprise {
  background: var(--surprise);
}

.recommendation-summary strong {
  font-size: 15px;
}

.recommendation-summary small {
  color: var(--text-secondary);
  font-size: 10px;
}

.recommendation-summary > p {
  grid-column: 1 / -1;
  margin-top: 3px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 11px;
}

.recommendation-feed {
  display: grid;
  gap: 22px;
  margin-top: 26px;
}

.recommendation-card {
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  background: white;
  box-shadow: 0 10px 30px rgb(31 45 76 / 7%);
}

.recommendation-image {
  position: relative;
  display: block;
  width: 100%;
  height: 225px;
  padding: 0;
  color: white;
  background: transparent;
}

.recommendation-image .food-image-wrap {
  width: 100%;
  height: 100%;
}

.recommendation-image .type-badge {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 14px;
}

.feed-index {
  position: absolute;
  z-index: 4;
  right: 15px;
  bottom: 12px;
  font-size: 12px;
  font-weight: 750;
}

.recommendation-body {
  padding: 18px;
}

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

.food-title-row p {
  color: var(--text-secondary);
  font-size: 11px;
}

.food-title-row h2 {
  margin-top: 3px;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.inline-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.inline-score strong {
  color: var(--primary-dark);
  font-size: 25px;
  line-height: 1;
}

.inline-score span {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 9px;
}

.probability-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  margin-top: 17px;
  color: var(--text-secondary);
  font-size: 11px;
}

.probability-row > div {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf3;
}

.probability-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.probability-row strong {
  color: var(--primary-dark);
}

.reason-line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 16px;
  color: #536071;
  font-size: 12px;
  line-height: 1.5;
}

.reason-line .icon {
  margin-top: 1px;
  color: var(--primary);
}

.recommendation-actions {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 7px;
  margin-top: 17px;
}

.recommendation-actions button {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.recommendation-actions button.active {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.batch-button {
  margin-top: 22px;
}

/* History */

.history-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 18px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.history-summary > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid var(--border-light);
}

.history-summary > div:last-child {
  border-right: 0;
}

.history-summary strong {
  font-size: 23px;
}

.history-summary span {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 10px;
}

.filter-chips,
.profile-tabs {
  display: flex;
  gap: 8px;
  margin: 20px calc(var(--page) * -1) 0;
  padding: 0 var(--page) 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar,
.profile-tabs::-webkit-scrollbar {
  display: none;
}

.filter-chips button,
.profile-tabs button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  background: white;
  font-size: 12px;
  font-weight: 650;
}

.filter-chips button.active,
.profile-tabs button.active {
  border-color: var(--text);
  color: white;
  background: var(--text);
}

.history-list {
  margin-top: 13px;
}

.history-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.history-item .food-image-wrap {
  width: 56px;
  height: 56px;
  border-radius: 15px;
}

.history-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0;
  background: transparent;
  text-align: left;
}

.history-main strong,
.history-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-main strong {
  font-size: 14px;
}

.history-main span {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}

.history-rating {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.history-rating strong {
  color: var(--primary-dark);
  font-size: 18px;
}

.history-rating span {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--text-secondary);
  font-size: 9px;
}

/* Profile */

.model-version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 30px;
  border-radius: 10px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 750;
}

.profile-hero {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 18px;
  align-items: center;
  padding: 23px;
  border-radius: var(--radius-card);
  color: white;
  background: #1c428f;
}

.confidence-ring {
  position: relative;
  display: grid;
  width: 108px;
  height: 108px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#a9c2ff calc(var(--value) * 1%), rgb(255 255 255 / 13%) 0);
}

.confidence-ring::after {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #1c428f;
  content: "";
}

.confidence-ring > div {
  z-index: 1;
  text-align: center;
}

.confidence-ring strong {
  font-size: 27px;
}

.confidence-ring span {
  font-size: 12px;
}

.confidence-ring small {
  display: block;
  margin-top: -2px;
  color: #c5d3ef;
  font-size: 9px;
}

.profile-hero > div:last-child h2 {
  margin-top: 9px;
  font-size: 18px;
  line-height: 1.42;
  letter-spacing: -0.04em;
}

.profile-hero > div:last-child > p {
  margin-top: 7px;
  color: #bdcae3;
  font-size: 10px;
}

.profile-tabs {
  margin-top: 24px;
}

.profile-section {
  margin-top: 35px;
}

.uncertain-callout {
  align-items: center;
  margin-top: 34px;
}

.uncertain-callout > div {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.uncertain-callout > span {
  min-width: 0;
}

.uncertain-callout strong {
  font-size: 13px;
}

.uncertain-callout p {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
}

.uncertain-callout button {
  margin-left: auto;
  padding: 5px;
  color: #9aa3ae;
  background: transparent;
}

.model-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

.model-disclaimer .icon {
  margin-top: 1px;
}

/* Settings */

.settings-screen {
  padding-bottom: 30px;
  background: white;
}

.settings-profile {
  display: grid;
  grid-template-columns: 52px 1fr 40px;
  gap: 13px;
  align-items: center;
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--border-light);
}

.avatar {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 20px;
  font-weight: 750;
}

.settings-profile > div:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.settings-profile strong {
  font-size: 15px;
}

.settings-profile span {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-profile button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: var(--text-secondary);
  background: var(--background);
}

.settings-section {
  margin-top: 32px;
}

.settings-section > h2 {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.diversity-options {
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 18px;
}

.diversity-options button {
  display: flex;
  width: 100%;
  min-height: 67px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-light);
  background: white;
  text-align: left;
}

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

.diversity-options button.selected {
  background: #f8faff;
}

.diversity-options button > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.diversity-options strong {
  font-size: 14px;
}

.diversity-options small {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 11px;
}

.diversity-options i {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: transparent;
  background: white;
}

.diversity-options button.selected i {
  border-color: var(--primary);
  color: white;
  background: var(--primary);
}

.settings-row {
  display: flex;
  width: 100%;
  min-height: 63px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  background: white;
  text-align: left;
}

.settings-row > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.settings-row strong {
  font-size: 14px;
}

.settings-row small {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 11px;
}

.settings-row > .icon {
  color: #9ba4af;
}

.settings-row.static em {
  color: var(--text-secondary);
  font-size: 11px;
  font-style: normal;
}

.toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d8dde4;
  transition: background 140ms var(--ease);
}

.toggle b {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px rgb(0 0 0 / 16%);
  transition: transform 180ms var(--ease);
}

.toggle.on {
  background: var(--primary);
}

.toggle.on b {
  transform: translateX(20px);
}

/* Food detail */

.detail-screen {
  min-height: 100vh;
  padding-bottom: 96px;
  background: white;
}

.detail-hero {
  position: relative;
  height: min(72vw, 380px);
  min-height: 300px;
  max-height: 380px;
  overflow: hidden;
  color: white;
}

.detail-hero > .food-image-wrap {
  width: 100%;
  height: 100%;
}

.floating-icon-button {
  position: absolute;
  z-index: 5;
  top: max(14px, env(safe-area-inset-top));
  color: white;
  background: rgb(15 22 32 / 42%);
  backdrop-filter: blur(10px);
}

.floating-icon-button.left {
  left: 14px;
}

.floating-icon-button.right {
  right: 14px;
}

.detail-image-overlay {
  position: absolute;
  z-index: 4;
  right: 20px;
  bottom: 24px;
  left: 20px;
}

.detail-image-overlay p {
  color: rgb(255 255 255 / 78%);
  font-size: 12px;
}

.detail-image-overlay h1 {
  margin-top: 4px;
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.05em;
}

.detail-body {
  padding-top: 0;
}

.metric-card {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  align-items: center;
  margin-top: -16px;
  padding: 18px 10px;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-card);
}

.metric-card > i {
  width: 1px;
  height: 40px;
  background: var(--border-light);
}

.metric-card > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
}

.metric-card span {
  width: 100%;
  margin-bottom: 4px;
  color: var(--text-secondary);
  font-size: 9px;
  text-align: center;
}

.metric-card strong {
  font-size: clamp(18px, 5vw, 23px);
  line-height: 1.1;
}

.metric-card small {
  margin-left: 2px;
  color: var(--text-secondary);
  font-size: 9px;
}

.detail-section {
  margin-top: 36px;
}

.reason-list {
  display: grid;
  gap: 10px;
  margin-top: 17px;
}

.reason-list > div {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 15px;
  background: var(--background);
  font-size: 13px;
  line-height: 1.5;
}

.reason-list > div > span {
  color: var(--primary);
}

.warning-card {
  display: flex;
  gap: 11px;
  margin-top: 24px;
  padding: 15px;
  border-radius: 16px;
  color: #765513;
  background: #fff7e6;
}

.warning-card strong {
  font-size: 13px;
}

.warning-card p {
  margin-top: 4px;
  font-size: 11px;
}

.ingredient-method-list {
  margin-top: 16px;
}

.ingredient-method-list > div {
  display: grid;
  min-height: 50px;
  grid-template-columns: 26px auto 1fr auto;
  gap: 9px;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.ingredient-index {
  color: #9aa3ae;
  font-size: 10px;
}

.ingredient-method-list i {
  height: 1px;
  background: #dce1e8;
}

.ingredient-method-list em {
  color: var(--text-secondary);
  font-size: 11px;
  font-style: normal;
}

.sensory-list {
  margin-top: 16px;
}

.sensory-list > div {
  display: grid;
  min-height: 44px;
  grid-template-columns: 1fr auto 30px;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
}

.sensory-list > div > div {
  display: flex;
  gap: 4px;
}

.sensory-list i {
  width: 24px;
  height: 6px;
  border-radius: 999px;
  background: #e6eaf0;
}

.sensory-list i.on {
  background: var(--primary);
}

.sensory-list strong {
  color: var(--text-secondary);
  font-size: 10px;
}

.detail-actions {
  position: fixed;
  z-index: 35;
  right: max(calc((100vw - 560px) / 2), 0px);
  bottom: 0;
  left: max(calc((100vw - 560px) / 2), 0px);
  display: grid;
  width: min(100%, 560px);
  grid-template-columns: 0.9fr 1.1fr;
  gap: 9px;
  margin: auto;
  padding-top: 11px;
  padding-bottom: max(13px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-light);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(18px);
}

/* Feedback */

.feedback-food {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 13px;
  align-items: center;
  margin-top: 18px;
}

.feedback-food .food-image-wrap {
  width: 68px;
  height: 68px;
  border-radius: 16px;
}

.feedback-food p {
  color: var(--text-secondary);
  font-size: 11px;
}

.feedback-food h2 {
  margin-top: 2px;
  font-size: 19px;
}

.feedback-question {
  margin-top: 38px;
}

.feedback-question h1 {
  margin-top: 8px;
  font-size: 29px;
  line-height: 1.3;
  letter-spacing: -0.05em;
}

.large-rating {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 24px;
}

.large-rating button {
  display: flex;
  min-width: 0;
  min-height: 68px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: white;
}

.large-rating button strong {
  font-size: 19px;
}

.large-rating button span {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 9px;
}

.large-rating button.selected {
  border-color: var(--primary);
  color: white;
  background: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 9px 20px rgb(45 107 255 / 22%);
}

.large-rating button.selected span {
  color: #dce6ff;
}

.feedback-question.secondary {
  margin-top: 38px;
}

.feedback-question.secondary h2 {
  margin-top: 7px;
  font-size: 20px;
}

.expectation-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.expectation-scale button {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  font-size: 12px;
  font-weight: 650;
}

.expectation-scale button.selected {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.comment-field {
  display: grid;
  gap: 8px;
  margin-top: 34px;
  font-size: 14px;
  font-weight: 650;
}

.comment-field textarea {
  min-height: 110px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  resize: vertical;
  outline: 0;
  font-size: 14px;
}

.complete-screen {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  text-align: center;
}

.complete-check {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  margin-bottom: 27px;
  border-radius: 28px;
  color: white;
  background: var(--success);
  box-shadow: 0 16px 38px rgb(32 164 100 / 25%);
  animation: complete-in 420ms var(--ease-emphasis);
}

@keyframes complete-in {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  65% {
    transform: scale(1.05);
  }
}

.complete-screen h1 {
  margin-top: 8px;
  font-size: 29px;
  letter-spacing: -0.05em;
}

.complete-screen > p:not(.eyebrow) {
  max-width: 330px;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 15px;
}

.change-preview {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: center;
  margin-top: 32px;
  padding: 17px;
  border-radius: 18px;
  background: var(--background);
  text-align: left;
}

.change-preview > span {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.change-preview div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.change-preview small {
  color: var(--text-secondary);
  font-size: 10px;
}

.change-preview strong {
  margin-top: 3px;
  font-size: 13px;
}

.complete-actions {
  width: 100%;
  margin-top: 42px;
}

.complete-actions .secondary-button {
  margin-top: 9px;
}

/* Missing request */

.missing-hero {
  padding-top: 36px;
}

.missing-hero > div {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 19px;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.missing-hero h1 {
  margin-top: 8px;
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.05em;
}

.missing-hero > p:last-child {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.missing-form {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.missing-form .info-note {
  margin-top: 0;
}

.request-history {
  margin-top: 36px;
}

.request-history h2 {
  font-size: 19px;
}

.request-history > div {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-top: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.status-dot.processing {
  background: var(--warning);
  box-shadow: 0 0 0 5px rgb(245 159 0 / 13%);
}

.request-history p {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.request-history strong {
  font-size: 14px;
}

.request-history small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
}

@media (min-width: 600px) {
  body {
    padding: 24px 0;
  }

  .phone-frame {
    min-height: calc(100vh - 48px);
    min-height: calc(100dvh - 48px);
    border: 1px solid rgb(195 204 217 / 70%);
    border-radius: 32px;
  }

  .standard-screen,
  .app-shell-screen,
  .splash-screen,
  .auth-screen,
  .onboarding-screen,
  .analysis-screen,
  .result-screen,
  .complete-screen {
    min-height: calc(100vh - 48px);
    min-height: calc(100dvh - 48px);
  }

  .bottom-nav,
  .sticky-actions,
  .detail-actions {
    bottom: 24px;
  }

  .bottom-nav {
    border-right: 1px solid rgb(217 224 232 / 72%);
    border-left: 1px solid rgb(217 224 232 / 72%);
    border-radius: 0 0 32px 32px;
  }

  .toast {
    bottom: 112px;
  }
}

@media (max-width: 374px) {
  :root {
    --page: 16px;
  }

  .assessment-image {
    height: 205px;
  }

  .rating-selector {
    gap: 4px;
  }

  .rating-button small {
    font-size: 9px;
  }

  .recommendation-actions button {
    font-size: 10px;
  }

  .profile-hero {
    grid-template-columns: 102px 1fr;
    gap: 13px;
    padding: 18px;
  }

  .confidence-ring {
    width: 94px;
    height: 94px;
  }
}

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

html[data-reduce-motion="true"] *,
html[data-reduce-motion="true"] *::before,
html[data-reduce-motion="true"] *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

.history-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-secondary);
}

.history-search input {
  width: 100%;
  padding: 13px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.history-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 7px;
}

.history-actions button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-secondary);
}

.empty-state {
  padding: 28px 16px;
  color: var(--text-secondary);
  text-align: center;
  font-size: 13px;
}

.report-form {
  display: grid;
  gap: 20px;
  padding-top: 24px;
}

.field select {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(58 105 84 / 12%);
}

.legal-content {
  padding-top: 24px;
  padding-bottom: 48px;
}

.legal-content h1 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: 28px;
  line-height: 1.25;
}

.legal-content h2 {
  margin: 28px 0 8px;
  font-size: 16px;
}

.legal-content p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.status-dot.done {
  background: var(--primary);
  box-shadow: 0 0 0 5px rgb(58 105 84 / 13%);
}
