:root {
  color-scheme: light;
  --ink: #19231d;
  --muted: #6b756f;
  --line: rgba(40, 64, 51, 0.12);
  --panel: rgba(255, 255, 255, 0.66);
  --panel-solid: #fffef9;
  --ivory: #fffdf3;
  --pale-mint: #e6f5eb;
  --pale-peach: #ffe9df;
  --pale-sky: #e5f4ff;
  --mint: #4da878;
  --leaf: #287a5b;
  --coral: #f27059;
  --sun: #f4b740;
  --sky: #579bd3;
  --shadow: 0 22px 70px rgba(41, 63, 53, 0.16);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(132deg, rgba(244, 183, 64, 0.14), transparent 28%),
    linear-gradient(25deg, rgba(87, 155, 211, 0.16), transparent 34%),
    #f7f4ec;
  color: var(--ink);
}

button,
select,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 440px) minmax(360px, 1fr);
  gap: 28px;
  align-items: start;
}

body:not(.debug-mode) .workspace {
  display: block;
}

body:not(.debug-mode) .phone-stage {
  place-items: start center;
}

body:not(.debug-mode) .shell {
  width: min(760px, calc(100% - 32px));
}

.input-panel,
.dashboard {
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.input-panel {
  border-radius: 28px;
  padding: 24px;
  position: sticky;
  top: 24px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #17372a;
  color: #fff;
  font-weight: 800;
}

.mark i {
  font-size: 24px;
  line-height: 1;
}

.eyebrow,
.app-header p,
.calorie-card p,
.score-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.1;
}

.upload-zone {
  margin-top: 26px;
  min-height: 270px;
  border: 1px dashed rgba(40, 64, 51, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34)),
    rgba(255, 255, 255, 0.48);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  transition:
    border-color 180ms ease,
    transform 180ms ease;
}

.upload-zone.is-dragging {
  border-color: var(--leaf);
  transform: translateY(-2px);
}

.upload-zone input {
  display: none;
}

.upload-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(77, 168, 120, 0.12);
}

.upload-icon i {
  color: var(--leaf);
  font-size: 30px;
  line-height: 1;
}

.upload-zone h2 {
  margin: 14px 0 8px;
  font-size: 21px;
}

.upload-zone p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 18px;
}

.primary-action,
.analyze-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  min-height: 44px;
}

.primary-action i,
.analyze-button i,
.ghost-button i,
.photo-pick-button i,
.photo-repick-button i {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.icon-spin {
  animation: icon-spin 800ms linear infinite;
}

@keyframes icon-spin {
  to {
    transform: rotate(360deg);
  }
}

.primary-action,
.analyze-button {
  background: #17372a;
  color: #fff;
  padding: 0 18px;
  font-weight: 700;
}

.analyze-button {
  width: 100%;
  margin-top: 16px;
}

.analyze-button:disabled {
  cursor: not-allowed;
  background: rgba(25, 35, 29, 0.32);
}

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

label {
  color: var(--muted);
  font-size: 13px;
  display: grid;
  gap: 7px;
}

select {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
}

.native-select {
  display: none;
}

.custom-select {
  position: relative;
}

.custom-select-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  cursor: pointer;
  padding: 0 38px 0 14px;
  text-align: left;
  position: relative;
}

.custom-select-button::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #19231d;
  border-bottom: 2px solid #19231d;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 160ms ease;
}

.custom-select.is-open .custom-select-button {
  border-color: rgba(40, 122, 91, 0.54);
  box-shadow: 0 0 0 4px rgba(77, 168, 120, 0.12);
}

.custom-select.is-open .custom-select-button::after {
  transform: translateY(-35%) rotate(225deg);
}

.custom-select-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 243, 0.96), rgba(244, 251, 247, 0.92)),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 44px rgba(36, 58, 48, 0.16);
  backdrop-filter: blur(22px);
  padding: 6px;
}

.custom-select-option {
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #35443b;
  cursor: pointer;
  padding: 0 12px;
  text-align: left;
}

.custom-select-option:hover,
.custom-select-option.is-selected {
  background: rgba(77, 168, 120, 0.14);
  color: var(--leaf);
  font-weight: 750;
}

.schema-card {
  margin-top: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.54);
  padding: 14px;
}

.card-title {
  margin-bottom: 10px;
  font-weight: 750;
}

pre {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  color: #344039;
  font-size: 12px;
  line-height: 1.55;
}

.phone-stage {
  width: 100%;
  display: grid;
  gap: 18px;
  place-items: start center;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid rgba(40, 64, 51, 0.1);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 46px rgba(41, 63, 53, 0.12);
  backdrop-filter: blur(24px);
  padding: 8px 24px;
}

.topbar-leading,
.topbar-actions,
.topbar-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.topbar-leading,
.topbar-actions {
  gap: 8px;
  position: relative;
  z-index: 1;
}

.topbar-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  justify-content: center;
  gap: 8px;
  color: #20392d;
  font-size: 15px;
}

.topbar-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 9px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--leaf);
  cursor: pointer;
}

.icon-button i {
  font-size: 20px;
  line-height: 1;
}

.icon-button:disabled {
  cursor: not-allowed;
  color: rgba(40, 64, 51, 0.28);
  background: rgba(255, 255, 255, 0.42);
}

.login-panel {
  width: min(452px, 100%);
  min-height: calc(100vh - 64px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  display: grid;
  place-items: center;
}

.login-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 253, 243, 0.9), rgba(230, 245, 235, 0.54) 58%, rgba(229, 244, 255, 0.44)),
    rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 54px rgba(41, 63, 53, 0.13);
  backdrop-filter: blur(24px);
  padding: 34px;
}

.login-heading {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  display: block;
  margin: 0 auto 16px;
  border-radius: 22px;
  filter: drop-shadow(0 12px 24px rgba(36, 58, 48, 0.16));
}

.login-heading h1 {
  margin: 0 0 12px;
  font-size: 31px;
  font-weight: 650;
  letter-spacing: 0;
}

.login-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-field {
  display: grid;
  gap: 9px;
  color: #35443b;
  font-size: 14px;
}

.login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #35443b;
  font-size: 14px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 14px;
  min-height: 46px;
  padding: 0 13px;
  color: var(--ink);
  outline: none;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 64px;
}

.password-toggle,
.login-link {
  border: 0;
  background: transparent;
  color: var(--leaf);
  cursor: pointer;
  font-weight: 700;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 18px;
}

input:focus,
select:focus {
  border-color: rgba(40, 122, 91, 0.54);
  box-shadow: 0 0 0 4px rgba(77, 168, 120, 0.12);
}

.remember-row {
  width: fit-content;
  display: grid;
  grid-template-columns: 54px auto;
  gap: 12px;
  align-items: center;
  color: #35443b;
  cursor: pointer;
  font-size: 14px;
}

.remember-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.remember-row span {
  width: 54px;
  height: 28px;
  border: 1px solid rgba(40, 64, 51, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 0 0 2px rgba(87, 155, 211, 0.12);
  position: relative;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.remember-row span::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(36, 58, 48, 0.16);
  transition: transform 160ms ease;
}

.remember-row input:checked + span {
  border-color: rgba(77, 168, 120, 0.44);
  background: rgba(77, 168, 120, 0.22);
}

.remember-row input:checked + span::after {
  transform: translateX(26px);
  background: var(--leaf);
}

.login-submit {
  margin-top: 20px;
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(23, 55, 42, 0.16);
}

.primary-action:disabled {
  cursor: wait;
  background: rgba(25, 35, 29, 0.46);
}

.login-hint,
.login-error,
.login-footer p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.login-footer {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.login-footer p:first-child {
  color: #35443b;
  font-size: 14px;
}

.login-hint {
  color: var(--muted);
}

.login-error {
  color: #b33a2b;
}

.dashboard {
  width: min(640px, 100%);
  border-radius: 34px;
  padding: 20px;
  background:
    radial-gradient(circle at 18% 14%, rgba(230, 245, 235, 0.9), transparent 34%),
    radial-gradient(circle at 86% 9%, rgba(229, 244, 255, 0.86), transparent 32%),
    radial-gradient(circle at 82% 82%, rgba(255, 233, 223, 0.78), transparent 34%),
    linear-gradient(180deg, rgba(255, 253, 243, 0.95), rgba(244, 251, 247, 0.8)),
    var(--ivory);
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 4px 2px 16px;
}

.app-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-title-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 14px;
  filter: drop-shadow(0 8px 16px rgba(36, 58, 48, 0.14));
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.user-menu {
  position: relative;
}

.avatar-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  padding: 3px;
}

.avatar-button span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #17372a;
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  overflow: hidden;
}

.avatar-button span i {
  font-size: 18px;
  line-height: 1;
}

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

.user-menu-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 210px;
  border: 1px solid rgba(40, 64, 51, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(41, 63, 53, 0.15);
  backdrop-filter: blur(18px);
  padding: 8px;
}

.user-menu-profile {
  display: grid;
  gap: 3px;
  padding: 9px 10px 10px;
  border-bottom: 1px solid var(--line);
}

.user-menu-profile strong,
.user-menu-profile span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-profile strong {
  font-size: 13px;
  color: var(--ink);
}

.user-menu-profile span {
  color: var(--muted);
  font-size: 12px;
}

.menu-action {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #344039;
  cursor: pointer;
  font-weight: 750;
  padding: 0 10px;
  text-align: left;
}

.menu-action:hover {
  background: rgba(242, 112, 89, 0.1);
}

.menu-action.danger {
  color: #b24635;
}

.menu-action i {
  font-size: 18px;
  line-height: 1;
}

.app-header h2 {
  margin: 2px 0 0;
  font-size: 26px;
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--leaf);
  padding: 0 14px;
  font-weight: 750;
}

.ghost-button:disabled {
  cursor: not-allowed;
  color: rgba(40, 64, 51, 0.36);
  background: rgba(255, 255, 255, 0.42);
}

.food-card {
  position: relative;
  height: clamp(245px, 42vw, 330px);
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(230, 245, 235, 0.7), rgba(229, 244, 255, 0.72)),
    #e6eadf;
}

.food-photo-mask {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(20, 31, 25, 0.28);
  pointer-events: none;
  transition: background 180ms ease;
}

.food-card.has-photo .food-photo-mask {
  display: block;
}

.food-card.has-photo:hover .food-photo-mask {
  background: rgba(20, 31, 25, 0.34);
}

.food-card input {
  display: none;
}

.food-card img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.food-card.has-photo img {
  display: block;
}

.food-card.has-photo .empty-photo {
  display: none;
}

.photo-repick-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  min-height: 42px;
  padding: 0 18px;
  background: rgba(23, 55, 42, 0.88);
  color: #fff;
  cursor: pointer;
  font-weight: 850;
  opacity: 1;
  pointer-events: auto;
  box-shadow: 0 14px 34px rgba(13, 24, 19, 0.22);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.food-card.has-photo:hover .photo-repick-button,
.photo-repick-button:focus-visible {
  transform: translate(-50%, -50%);
}

.photo-repick-button:hover {
  background: #17372a;
}

.food-card:not(.has-photo) .photo-repick-button {
  display: none;
}

.empty-photo {
  width: 100%;
  height: 100%;
  display: grid;
  gap: 10px;
  place-items: center;
  align-content: center;
  color: var(--muted);
  background:
    radial-gradient(circle at 28% 18%, rgba(230, 245, 235, 0.72), transparent 35%),
    radial-gradient(circle at 84% 82%, rgba(255, 233, 223, 0.62), transparent 38%),
    linear-gradient(135deg, rgba(229, 244, 255, 0.72), rgba(255, 253, 243, 0.48)),
    #eef1e9;
}

.photo-pick-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 18px;
  background: rgba(23, 55, 42, 0.92);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(23, 55, 42, 0.18);
}

.photo-pick-button:hover {
  background: #17372a;
}

.capture-controls {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 253, 243, 0.74), rgba(229, 244, 255, 0.48)),
    rgba(255, 255, 255, 0.56);
  box-shadow: 0 12px 34px rgba(36, 58, 48, 0.07);
  padding: 14px;
}

.capture-controls .control-grid {
  margin-top: 0;
}

.capture-controls .analyze-button {
  margin-top: 12px;
}

.meal-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  padding: 9px 13px;
  color: #fff;
  background: rgba(20, 31, 25, 0.38);
  backdrop-filter: blur(18px);
  font-size: 13px;
  font-weight: 700;
}

.glass {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 253, 243, 0.7), rgba(230, 245, 235, 0.48) 46%, rgba(229, 244, 255, 0.4)),
    var(--panel);
  box-shadow: 0 12px 34px rgba(36, 58, 48, 0.09);
  backdrop-filter: blur(22px);
  padding: 16px;
}

.calorie-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.calorie-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.calorie-line strong {
  font-size: 42px;
  letter-spacing: 0;
}

.daily-pill {
  align-self: start;
  border-radius: 999px;
  background: rgba(77, 168, 120, 0.14);
  color: var(--leaf);
  font-weight: 800;
  padding: 8px 11px;
}

.progress-track,
.macro-track {
  overflow: hidden;
  background: rgba(25, 35, 29, 0.08);
  border-radius: 999px;
}

.progress-track {
  grid-column: 1 / -1;
  height: 9px;
}

.progress-fill,
.macro-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 420ms ease;
}

.progress-fill {
  background: linear-gradient(90deg, var(--mint), var(--sun), var(--coral));
}

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

.section-heading h3 {
  margin: 0;
  font-size: 16px;
}

.section-heading span {
  color: var(--muted);
  font-size: 12px;
}

.macro-list {
  display: grid;
  gap: 12px;
}

.macro-item {
  display: grid;
  grid-template-columns: 72px 1fr 54px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.macro-track {
  height: 8px;
}

.macro-fill.protein {
  background: var(--leaf);
}

.macro-fill.fat {
  background: var(--sun);
}

.macro-fill.carbs {
  background: var(--sky);
}

.split-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 12px;
}

.split-grid .glass {
  margin-top: 12px;
}

.ingredient-list,
.suggestions ul,
#suggestionList {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.ingredient-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  font-size: 13px;
}

.ingredient-list span {
  color: var(--muted);
  grid-column: 1 / -1;
  font-size: 12px;
}

.score-card {
  display: grid;
  justify-items: center;
  text-align: center;
}

.score-ring {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 8px 0;
  background: conic-gradient(var(--mint) 0deg, rgba(25, 35, 29, 0.08) 0deg);
}

.score-ring span {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  font-size: 26px;
  font-weight: 850;
}

.score-card strong {
  font-size: 13px;
  line-height: 1.4;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  color: #355144;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
}

#suggestionList {
  display: grid;
  gap: 9px;
}

#suggestionList li {
  color: #35443b;
  font-size: 13px;
  line-height: 1.55;
}

#suggestionList li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  margin-right: 8px;
  vertical-align: 1px;
}

.dashboard-disclaimer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 12px 2px 2px;
  color: #7a8580;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.dashboard-disclaimer i {
  color: #6f8f83;
  font-size: 14px;
  line-height: 1;
}

.poster-output,
.records-panel,
.record-detail-panel {
  width: min(640px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
  padding: 14px;
}

.records-panel {
  display: grid;
  gap: 14px;
}

.record-detail-panel {
  display: grid;
  gap: 12px;
}

.detail-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  padding: 6px;
}

.detail-mode-button {
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.detail-mode-button.is-active {
  background: #17372a;
  color: #fff;
  box-shadow: 0 10px 24px rgba(23, 55, 42, 0.16);
}

.detail-mode-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

#recordDetailBody[data-detail-mode="detail"] > .detail-poster {
  display: none;
}

#recordDetailBody[data-detail-mode="image"] > :not(.detail-mode-tabs):not(.detail-poster) {
  display: none;
}

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

.records-panel .poster-toolbar {
  margin-bottom: 0;
}

.record-filters {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.record-filters .ghost-button {
  min-width: 74px;
}

.records-empty {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

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

.record-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  text-align: left;
}

.record-item:hover {
  border-color: rgba(40, 122, 91, 0.34);
  background: rgba(255, 255, 255, 0.86);
}

.record-item img {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--panel-solid);
}

.record-item span {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.record-item strong,
.record-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-item small {
  color: var(--muted);
  font-size: 12px;
}

.poster-output img {
  width: 100%;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-solid);
}

.record-detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border-radius: 22px;
  background: #eef1e9;
}

.record-detail-hero img {
  width: 100%;
  height: 260px;
  display: block;
  object-fit: cover;
}

.record-detail-hero div {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 6px;
  color: #fff;
}

.record-detail-hero p,
.record-detail-hero h2 {
  margin: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

.record-detail-hero span {
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(20, 31, 25, 0.42);
  backdrop-filter: blur(18px);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 750;
}

.detail-poster img {
  width: 100%;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.detail-empty,
.detail-error {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.detail-empty strong,
.detail-error strong {
  color: var(--ink);
}

@media (max-width: 920px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .input-panel {
    position: static;
  }

  .phone-stage {
    place-items: center;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 18px, 1180px);
    padding: 10px 0;
  }

  .input-panel,
  .dashboard {
    border-radius: 24px;
  }

  .control-grid,
  .split-grid,
  .record-filters {
    grid-template-columns: 1fr;
  }

  .food-card {
    height: 218px;
  }

  .topbar {
    align-items: start;
    padding: 8px 9px;
  }

  .topbar-brand {
    display: none;
  }

  .topbar-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .topbar .ghost-button {
    min-height: 40px;
    padding: 0 10px;
  }

  .user-menu-popover {
    right: -2px;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-title-icon {
    width: 44px;
    height: 44px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .login-panel {
    border-radius: 24px;
    padding: 20px;
  }

  .calorie-line strong {
    font-size: 36px;
  }
}
