:root {
  --ink: #111317;
  --muted: #6b7280;
  --muted-strong: #4b5563;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --surface: #f2f2f7;
  --surface-elevated: #ffffff;
  --surface-solid: #ffffff;
  --surface-soft: #f8f8fb;
  --green: #0f7a46;
  --green-soft: rgba(15, 122, 70, 0.1);
  --blue-soft: rgba(74, 111, 255, 0.08);
  --danger: #c2413b;
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.04);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f7f7fa 0%, #f2f2f7 100%);
  font-family:
    "SF Pro Display", "SF Pro Text", "PingFang SC", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  max-width: 1600px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px;
}

.sidebar {
  position: sticky;
  top: 22px;
  height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface-elevated);
  box-shadow: var(--shadow-sm);
}

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

.brand-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: linear-gradient(180deg, #1e8d57, #0f7a46);
  box-shadow: 0 10px 24px rgba(15, 122, 70, 0.18);
  font-size: 26px;
  font-weight: 700;
}

.brand h1,
.brand p,
.topbar h2,
.section-heading h3,
.meal-detail h4 {
  margin: 0;
}

.brand h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.brand p,
.eyebrow,
.metric span,
.metric small,
.sidebar-status small,
label,
.meal-time span,
.meal-detail p,
.field-hint,
.photo-preview-label,
.timeline-summary span {
  color: var(--muted);
}

.brand p {
  margin-top: 5px;
  font-size: 13px;
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-tab,
.segment,
.ghost-button,
.danger-button,
.primary-button,
.icon-button,
.range-tab,
.edit-button {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-weight: 580;
}

.nav-tab:hover,
.segment:hover,
.ghost-button:hover,
.range-tab:hover,
.edit-button:hover {
  background: #f5f6fa;
}

.nav-tab.active,
.segment.active,
.range-tab.active {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.sidebar-status {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-soft);
}

.sidebar-status span,
.sidebar-status small {
  display: block;
}

.sidebar-status strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.workspace {
  min-width: 0;
  padding: 8px 0 30px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 10px 6px 0;
}

.topbar h2 {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.topbar-actions,
.form-actions,
.timeline-tools,
.segmented {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.date-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.date-filter input {
  width: 142px;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.metric {
  min-height: 126px;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.metric span,
.metric small {
  display: block;
  font-size: 12px;
}

.metric strong {
  display: block;
  margin: 14px 0 4px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 650;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.view {
  display: none;
  animation: liftIn 260ms ease both;
}

.view.active {
  display: block;
}

.input-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.72fr);
  gap: 18px;
}

.meal-form,
.quick-panel,
.chart-panel,
.insight-panel,
.timeline-summary article,
.meal-item {
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.meal-form,
.quick-panel,
.chart-panel,
.insight-panel {
  border-radius: 30px;
}

.meal-form {
  padding: 28px;
}

.quick-panel,
.chart-panel,
.insight-panel {
  padding: 24px;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading h3 {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
}

label.wide {
  grid-column: 1 / -1;
}

.field-label {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfbfd;
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 48px;
  padding: 0 14px;
}

textarea {
  min-height: 112px;
  resize: vertical;
  padding: 14px;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 122, 70, 0.28);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 122, 70, 0.08);
}

.form-actions {
  margin-top: 22px;
}

.primary-button,
.ghost-button,
.danger-button {
  min-height: 46px;
  padding: 0 18px;
  font-weight: 650;
}

.primary-button {
  color: white;
  background: linear-gradient(180deg, #1b8e57, #0f7a46);
  box-shadow: 0 10px 24px rgba(15, 122, 70, 0.18);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 36px rgba(15, 122, 70, 0.22);
}

.ghost-button,
.danger-button,
.edit-button {
  border: 1px solid var(--line);
  background: #ffffff;
}

.danger-button {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.photo-field,
.photo-picker {
  display: grid;
  gap: 10px;
}

.photo-picker-surface {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #f8f8fb;
  box-shadow: none;
  cursor: pointer;
}

.photo-picker-surface:hover {
  transform: translateY(-1px);
}

.photo-picker-surface strong {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(180deg, #1b8e57, #0f7a46);
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
}

.photo-picker-surface span:last-child {
  font-size: 13px;
  line-height: 1.5;
}

.photo-picker-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  color: var(--green);
  background: rgba(15, 122, 70, 0.1);
  font-size: 18px;
  font-weight: 700;
}

.field-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.photo-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
}

.photo-preview img,
.meal-photo img {
  display: block;
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
}

.photo-preview img {
  max-width: 360px;
  max-height: 240px;
  border: 1px solid var(--line);
  background: white;
}

.photo-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.photo-preview-label {
  font-size: 12px;
  font-weight: 650;
}

.small-button {
  min-height: 38px;
  padding: 0 13px;
}

canvas {
  display: block;
  width: 100%;
  max-width: 100%;
}

.macro-legend,
.category-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.data-tip {
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8f8fb;
  line-height: 1.58;
}

.quick-panel .data-tip {
  margin-top: 16px;
}

.legend-row,
.category-row,
.meal-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.timeline-tools {
  justify-content: space-between;
  margin-bottom: 16px;
}

.range-tabs,
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f1f2f6;
}

.range-tabs {
  margin-bottom: 12px;
}

.timeline-range-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.timeline-range-picker input {
  max-width: 180px;
}

.nav-mini-button {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
}

.range-tab,
.segment {
  min-height: 36px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 650;
}

.timeline-summary {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) repeat(3, minmax(120px, 0.7fr));
  gap: 12px;
  margin-bottom: 16px;
}

.timeline-summary article {
  min-height: 84px;
  padding: 16px 18px;
  border-radius: 24px;
}

.timeline-summary span,
.timeline-summary strong {
  display: block;
}

.timeline-summary span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-summary strong {
  margin-top: 10px;
  font-size: clamp(21px, 3vw, 31px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
  word-break: keep-all;
}

.search-input {
  max-width: 320px;
}

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

.meal-day-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #f8f8fb;
}

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

.meal-day-header strong,
.meal-day-header span,
.meal-day-header em {
  display: block;
}

.meal-day-header strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.meal-day-header span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.meal-day-header em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 28px;
  min-width: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f2f3f7;
  color: var(--muted-strong);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.meal-day-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-height: 30px;
}

.meal-day-items {
  display: grid;
  gap: 10px;
}

.meal-day-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  background: #ffffff;
}

.meal-day-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.day-empty-button {
  flex-shrink: 0;
}

.meal-item {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  min-height: 98px;
  padding: 18px;
  border-radius: 26px;
}

.meal-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.meal-time {
  padding-top: 2px;
}

.meal-time strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.meal-time span,
.meal-detail p,
.tag {
  font-size: 12px;
}

.meal-detail h4 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.meal-photo {
  margin-bottom: 14px;
}

.meal-photo img {
  max-width: 240px;
  max-height: 168px;
  border: 1px solid var(--line);
  background: #fff;
}

.meal-detail p {
  margin: 8px 0 12px;
  line-height: 1.6;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted-strong);
  font-weight: 650;
}

.meal-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.edit-button {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: #f2f3f7;
  color: #4b5563;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.icon-button {
  width: 30px;
  min-height: 30px;
  border-radius: 999px;
  color: var(--muted);
  background: #f2f3f7;
  font-size: 18px;
  line-height: 1;
}

.icon-button:hover {
  color: var(--danger);
  background: #f9ebea;
}

.meal-day-header .small-button,
.day-empty-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  min-width: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f2f3f7;
  color: #4b5563;
  font-size: 11px;
  font-weight: 600;
  box-shadow: none;
}

.meal-day-header .small-button:hover,
.day-empty-button:hover,
.edit-button:hover {
  background: #e9ebf1;
  transform: none;
  box-shadow: none;
}

.tag-context {
  background: var(--blue-soft);
  color: #3d5ca8;
}

.tag-people {
  background: var(--green-soft);
  color: var(--green);
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.72fr);
  gap: 18px;
}

.analysis-grid .insight-panel {
  grid-column: 1 / -1;
}

.insight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.insight {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8f8fb;
}

.insight strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.insight p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.empty-state {
  padding: 40px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: #fafafc;
}

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

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar-status {
    display: none;
  }

  .topbar,
  .timeline-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-range-picker {
    flex-wrap: wrap;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .input-layout,
  .analysis-grid,
  .insight-list,
  .timeline-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 14px;
    gap: 14px;
  }

  .sidebar,
  .meal-form,
  .quick-panel,
  .chart-panel,
  .insight-panel,
  .metric,
  .timeline-summary article,
  .meal-item {
    border-radius: 22px;
  }

  .workspace {
    padding: 0 0 20px;
  }

  .metric-strip,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .meal-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

  .meal-day-header-actions {
    justify-content: flex-start;
  }

  .meal-day-empty {
    flex-direction: column;
    align-items: flex-start;
  }

  .photo-preview img,
  .meal-photo img {
    max-width: 100%;
  }

  .meal-actions {
    grid-row: 2;
    grid-column: 2;
  }

  .meal-time {
    grid-column: 1 / -1;
  }

  .search-input {
    max-width: none;
  }
}

/* Product refresh: quick capture first, payoff second. */
:root {
  --ink: #171814;
  --muted: #6f746d;
  --muted-strong: #41483f;
  --line: #e2e0d8;
  --line-strong: #cac6b8;
  --surface: #f4f1ea;
  --surface-elevated: #fffdf8;
  --surface-soft: #f8f5ee;
  --green: #236b4a;
  --green-soft: rgba(35, 107, 74, 0.12);
  --blue-soft: rgba(64, 99, 152, 0.1);
  --coral: #d86f4f;
  --gold: #d5a23a;
}

body {
  background:
    radial-gradient(circle at top left, rgba(216, 111, 79, 0.16), transparent 28rem),
    linear-gradient(180deg, #fbfaf7 0%, var(--surface) 100%);
}

.sidebar {
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(20px);
}

.brand-mark,
.primary-button,
.photo-picker-surface strong {
  background: linear-gradient(135deg, #236b4a 0%, #2f7d55 52%, #d86f4f 100%);
}

.topbar {
  align-items: center;
}

.topbar h2 {
  max-width: 760px;
}

.topbar-copy {
  max-width: 660px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.data-menu {
  position: relative;
}

.data-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-elevated);
  color: var(--muted-strong);
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.data-menu summary::-webkit-details-marker {
  display: none;
}

.data-menu-panel {
  position: absolute;
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 176px;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-elevated);
  box-shadow: var(--shadow-md);
}

.data-menu-panel button {
  justify-content: flex-start;
  width: 100%;
}

.metric {
  min-height: 118px;
  background: rgba(255, 253, 248, 0.86);
  border-color: rgba(202, 198, 184, 0.7);
}

.metric strong {
  color: #20231f;
}

.input-layout {
  grid-template-columns: minmax(420px, 0.96fr) minmax(360px, 0.84fr);
  align-items: start;
}

.meal-form,
.quick-panel,
.chart-panel,
.insight-panel,
.meal-item,
.timeline-summary article {
  background: rgba(255, 253, 248, 0.92);
  border-color: rgba(202, 198, 184, 0.74);
}

.section-heading p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.quick-capture {
  display: grid;
  gap: 18px;
}

.essentials-grid {
  padding-top: 4px;
}

.photo-field-hero {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(35, 107, 74, 0.1), rgba(216, 111, 79, 0.1)),
    var(--surface-soft);
}

.photo-field-hero .photo-picker-surface {
  min-height: 142px;
  align-content: center;
  background: rgba(255, 253, 248, 0.74);
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.quick-chips button,
.recommendation-item button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--muted-strong);
  font-weight: 650;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.quick-chips button:hover,
.recommendation-item button:hover {
  transform: translateY(-1px);
  border-color: rgba(35, 107, 74, 0.35);
  background: #f4fbf6;
}

.quick-chips button.active {
  color: white;
  border-color: transparent;
  background: var(--green);
}

.detail-drawer {
  margin-top: 18px;
  padding: 0;
}

.detail-drawer summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface-soft);
  font-weight: 650;
  cursor: pointer;
}

.detail-drawer .field-grid {
  margin-top: 16px;
}

.form-actions {
  align-items: stretch;
}

.primary-button {
  min-width: 160px;
}

.memory-panel {
  position: sticky;
  top: 22px;
  max-height: calc(100vh - 44px);
  overflow: auto;
}

.reward-card {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 22px;
  border-radius: 26px;
  color: #fffdf8;
  background:
    linear-gradient(135deg, rgba(23, 24, 20, 0.72), rgba(35, 107, 74, 0.82)),
    url("https://images.unsplash.com/photo-1498837167922-ddd27525d352?auto=format&fit=crop&w=900&q=80") center / cover;
  box-shadow: 0 24px 50px rgba(23, 24, 20, 0.16);
  animation: liftIn 280ms ease both;
}

.reward-card.is-fresh {
  animation: rewardPulse 700ms ease both;
}

.reward-card span,
.reward-card p {
  color: rgba(255, 253, 248, 0.82);
}

.reward-card span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reward-card strong {
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.reward-card p {
  margin: 0;
  line-height: 1.6;
}

.reward-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reward-meta .tag {
  background: rgba(255, 253, 248, 0.16);
  color: #fffdf8;
}

.product-moment {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.mini-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.mini-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mini-heading strong {
  font-size: 17px;
}

.recommendation-list,
.achievement-list {
  display: grid;
  gap: 10px;
}

.recommendation-item,
.achievement-item {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.recommendation-item span,
.achievement-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.recommendation-item strong,
.achievement-item strong {
  font-size: 16px;
}

.recommendation-item p,
.achievement-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.recommendation-item button {
  justify-self: start;
  margin-top: 2px;
}

.achievement-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photo-reel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.photo-reel-item {
  position: relative;
  min-height: 86px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--surface-soft);
}

.photo-reel-item img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 86px;
  object-fit: cover;
  transition: transform 220ms ease;
}

.photo-reel-item:hover img {
  transform: scale(1.04);
}

.photo-reel-item span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  overflow: hidden;
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.photo-reel-empty {
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  background: var(--surface-soft);
  line-height: 1.55;
}

.location-field {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, var(--surface-soft));
}

.location-heading,
.location-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

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

.coordinate-details {
  border-top: 1px solid var(--line);
  padding-top: 4px;
}

.coordinate-details summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 750;
  list-style: none;
  cursor: pointer;
}

.coordinate-details summary::-webkit-details-marker {
  display: none;
}

.coordinate-details summary::after {
  content: "›";
  margin-left: 6px;
  transform: rotate(90deg);
}

.coordinate-details[open] summary {
  margin-bottom: 8px;
}

.coordinate-details[open] summary::after {
  transform: rotate(-90deg);
}

.location-map {
  position: relative;
  display: block;
  width: 100%;
  min-height: 190px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: inherit;
  background:
    linear-gradient(135deg, rgba(30, 118, 75, 0.08), rgba(67, 116, 154, 0.08)),
    #e6ece4;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.location-map:hover {
  border-color: rgba(35, 107, 74, 0.34);
  transform: translateY(-1px);
}

.location-map:focus-visible {
  outline: 3px solid rgba(15, 122, 70, 0.22);
  outline-offset: 3px;
}

.location-map.has-selection {
  border-color: rgba(216, 111, 79, 0.68);
  box-shadow: 0 16px 36px rgba(216, 111, 79, 0.14);
}

.location-grid {
  position: absolute;
  inset: -8%;
  background:
    linear-gradient(28deg, transparent 36%, rgba(255, 253, 248, 0.88) 37% 43%, transparent 44%),
    linear-gradient(-20deg, transparent 56%, rgba(255, 253, 248, 0.82) 57% 62%, transparent 63%),
    linear-gradient(86deg, transparent 42%, rgba(255, 253, 248, 0.7) 43% 46%, transparent 47%),
    radial-gradient(circle at 24% 32%, rgba(67, 116, 154, 0.22), transparent 19%),
    radial-gradient(circle at 72% 66%, rgba(47, 125, 85, 0.22), transparent 21%),
    linear-gradient(rgba(255, 253, 248, 0.38) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 253, 248, 0.38) 1px, transparent 1px),
    #e6ece4;
  background-size:
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    44px 44px,
    44px 44px,
    100% 100%;
}

.location-grid::before,
.location-grid::after {
  position: absolute;
  content: "";
  box-shadow: 0 0 0 5px rgba(210, 219, 208, 0.52);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
}

.location-grid::before {
  width: 64%;
  height: 30px;
  left: -6%;
  top: 34%;
  transform: rotate(-17deg);
}

.location-grid::after {
  width: 48%;
  height: 24px;
  right: -7%;
  top: 58%;
  transform: rotate(24deg);
}

.location-pin {
  position: absolute;
  z-index: 2;
  width: 24px;
  height: 24px;
  border: 4px solid white;
  border-radius: 999px 999px 999px 0;
  background: var(--coral);
  box-shadow: 0 8px 20px rgba(23, 24, 20, 0.24);
  transform: translate(-50%, -80%) rotate(-45deg);
  transition:
    left 180ms ease,
    top 180ms ease,
    transform 180ms ease;
}

.location-pin::after {
  position: absolute;
  inset: 5px;
  content: "";
  border-radius: 999px;
  background: white;
}

.location-crosshair {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 1;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(35, 107, 74, 0.26);
  border-radius: 999px;
  opacity: 0.75;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.location-crosshair::before,
.location-crosshair::after {
  position: absolute;
  content: "";
  background: rgba(35, 107, 74, 0.28);
}

.location-crosshair::before {
  width: 1px;
  height: 64px;
  left: 50%;
  top: -7px;
}

.location-crosshair::after {
  width: 64px;
  height: 1px;
  left: -7px;
  top: 50%;
}

.location-map-label {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  overflow: hidden;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-map.has-selection .location-map-label {
  background: rgba(255, 253, 248, 0.92);
  color: #9f4f37;
}

.location-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.location-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 19, 23, 0.38);
  backdrop-filter: blur(10px);
}

.location-picker-sheet {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) auto;
  width: min(1040px, calc(100vw - 28px));
  height: min(780px, calc(100svh - 28px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 28px 88px rgba(15, 23, 42, 0.28);
}

.location-picker-header {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 100px;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.location-picker-header h3 {
  margin: 0;
  font-size: 18px;
  text-align: center;
}

.location-picker-header span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.location-picker-header .small-button {
  width: 100%;
  min-width: 0;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.location-picker-map {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  background:
    radial-gradient(circle at 18% 24%, rgba(67, 116, 154, 0.14), transparent 20%),
    linear-gradient(180deg, #e5ecdf, #edf0e6);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.location-picker-map.dragging {
  cursor: grabbing;
}

.picker-map-layer {
  position: absolute;
  inset: -28%;
  transition: transform 180ms ease;
}

.picker-map-layer.is-dragging {
  transition: none;
}

.picker-map-layer::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(rgba(255, 253, 248, 0.38) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 253, 248, 0.38) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.82;
}

.map-area,
.map-road {
  position: absolute;
  display: block;
}

.map-water {
  left: 7%;
  top: 10%;
  width: 28%;
  height: 30%;
  border-radius: 44% 56% 49% 51%;
  background: linear-gradient(135deg, rgba(74, 137, 170, 0.28), rgba(74, 137, 170, 0.08));
}

.map-park {
  border-radius: 999px;
  background: rgba(94, 145, 96, 0.22);
}

.map-park-one {
  right: 10%;
  top: 16%;
  width: 25%;
  height: 22%;
}

.map-park-two {
  left: 20%;
  bottom: 10%;
  width: 32%;
  height: 24%;
  transform: rotate(-12deg);
}

.map-campus {
  right: 22%;
  bottom: 20%;
  width: 22%;
  height: 18%;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.36) 1px, transparent 1px),
    linear-gradient(rgba(255, 253, 248, 0.36) 1px, transparent 1px),
    rgba(212, 188, 126, 0.22);
  background-size: 22px 22px;
}

.map-road {
  height: 32px;
  border: 7px solid rgba(209, 217, 205, 0.82);
  border-right-width: 5px;
  border-left-width: 5px;
  border-radius: 999px;
  background: #fffdf8;
  box-shadow: 0 2px 6px rgba(54, 64, 58, 0.06);
}

.map-road-main {
  left: -5%;
  top: 48%;
  width: 82%;
  transform: rotate(-17deg);
}

.map-road-ring {
  right: -3%;
  top: 36%;
  width: 58%;
  transform: rotate(24deg);
}

.map-road-east {
  right: 17%;
  top: 4%;
  width: 36%;
  transform: rotate(82deg);
}

.map-road-west {
  left: 17%;
  top: 24%;
  width: 42%;
  transform: rotate(94deg);
}

.map-road-south {
  left: 27%;
  bottom: 15%;
  width: 72%;
  transform: rotate(6deg);
}

.map-road-branch-one,
.map-road-branch-two,
.map-road-branch-three {
  height: 20px;
  border-width: 5px;
}

.map-road-branch-one {
  left: 42%;
  top: 28%;
  width: 26%;
  transform: rotate(38deg);
}

.map-road-branch-two {
  left: 9%;
  top: 61%;
  width: 37%;
  transform: rotate(-6deg);
}

.map-road-branch-three {
  right: 10%;
  top: 62%;
  width: 30%;
  transform: rotate(-42deg);
}

.map-poi {
  position: absolute;
  z-index: 2;
  min-height: 28px;
  max-width: 150px;
  overflow: hidden;
  padding: 5px 9px 5px 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  color: #27302b;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-poi::before {
  position: absolute;
  left: 9px;
  top: 50%;
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 999px;
  background: var(--green);
  transform: translateY(-50%);
}

.map-poi.active,
.map-poi:hover {
  border-color: rgba(216, 111, 79, 0.36);
  color: #9f4f37;
  transform: translateY(-1px);
}

.map-poi.active::before,
.map-poi:hover::before {
  background: var(--coral, #df6f52);
}

.map-poi-a {
  left: 57%;
  top: 43%;
}

.map-poi-b {
  left: 42%;
  top: 34%;
}

.map-poi-c {
  left: 72%;
  top: 58%;
}

.map-poi-d {
  left: 31%;
  top: 64%;
}

.map-poi-e {
  left: 24%;
  top: 46%;
}

.picker-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 62px;
  height: 76px;
  pointer-events: none;
  transform: translate(-50%, -82%);
}

.picker-pin {
  position: absolute;
  left: 50%;
  top: 0;
  width: 40px;
  height: 40px;
  border: 5px solid white;
  border-radius: 999px 999px 999px 0;
  background: #df6f52;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.24);
  transform: translateX(-50%) rotate(-45deg);
}

.picker-pin::after {
  position: absolute;
  inset: 8px;
  content: "";
  border-radius: 999px;
  background: white;
}

.picker-shadow {
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 34px;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
  filter: blur(3px);
  transform: translateX(-50%);
}

.location-fab,
.picker-map-tip {
  position: absolute;
  z-index: 5;
}

.location-fab {
  right: 18px;
  bottom: 18px;
  display: inline-grid;
  grid-auto-flow: column;
  width: auto;
  min-width: 74px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  font-size: 13px;
  font-weight: 800;
}

.location-fab span:first-child {
  font-size: 18px;
  line-height: 1;
}

.location-fab:disabled {
  cursor: progress;
  opacity: 0.72;
}

.picker-map-tip {
  left: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100% - 116px));
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 750;
}

.picker-bottom {
  display: grid;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.location-search {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.location-search span {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 750;
}

.picker-location-help {
  padding: 10px 12px;
  border: 1px solid rgba(15, 122, 70, 0.16);
  border-radius: 14px;
  color: var(--muted-strong);
  background: rgba(15, 122, 70, 0.07);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.picker-location-help.warning {
  border-color: rgba(194, 65, 59, 0.18);
  color: #8f342f;
  background: rgba(194, 65, 59, 0.07);
}

.picker-location-help.pending {
  color: #1f6846;
}

.nearby-place-list {
  display: grid;
  max-height: 230px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.nearby-place {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: inherit;
  background: #ffffff;
  text-align: left;
}

.nearby-place:last-child {
  border-bottom: 0;
}

.nearby-place:hover,
.nearby-place.active {
  background: rgba(15, 122, 70, 0.06);
}

.nearby-marker {
  width: 12px;
  height: 12px;
  border: 3px solid white;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 1px rgba(15, 122, 70, 0.32);
}

.nearby-place strong,
.nearby-place small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearby-place strong {
  font-size: 14px;
}

.nearby-place small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nearby-place em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.nearby-empty {
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .location-actions {
    width: 100%;
  }

  .location-actions button {
    flex: 1 1 120px;
  }

  .location-map {
    min-height: 205px;
  }

  .coordinate-grid {
    grid-template-columns: 1fr;
  }

  .location-picker-modal {
    padding: 0;
  }

  .location-picker-sheet {
    width: 100vw;
    height: 100svh;
    border: 0;
    border-radius: 0;
    grid-template-rows: auto minmax(300px, 1fr) minmax(244px, 36svh);
  }

  .location-picker-header {
    grid-template-columns: 78px minmax(0, 1fr) 78px;
    gap: 8px;
    padding: 12px;
  }

  .location-picker-header .small-button {
    min-height: 38px;
    padding: 0 10px;
  }

  .location-picker-map {
    min-height: 0;
  }

  .picker-map-tip {
    right: 102px;
    bottom: 14px;
    left: 12px;
    max-width: none;
    border-radius: 16px;
  }

  .location-fab {
    right: 14px;
    bottom: 14px;
  }

  .picker-bottom {
    min-height: 0;
    padding: 12px;
  }

  .location-search {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .nearby-place-list {
    max-height: 100%;
  }

  .map-poi {
    max-width: 112px;
    font-size: 11px;
  }
}

.data-tip {
  background: rgba(35, 107, 74, 0.08);
}

.analysis-grid .insight-panel {
  background:
    linear-gradient(135deg, rgba(64, 99, 152, 0.08), rgba(216, 111, 79, 0.08)),
    rgba(255, 253, 248, 0.92);
}

.insight {
  background: rgba(255, 253, 248, 0.74);
}

@keyframes rewardPulse {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  55% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1080px) {
  .memory-panel {
    position: static;
    max-height: none;
  }

  .data-menu-panel {
    right: auto;
    left: 0;
  }
}

@media (max-width: 760px) {
  .topbar h2 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .topbar-copy {
    font-size: 14px;
  }

  .data-menu,
  .data-menu summary {
    width: 100%;
  }

  .data-menu summary {
    justify-content: center;
  }

  .data-menu-panel {
    position: static;
    width: 100%;
  }

  .input-layout,
  .achievement-list,
  .photo-reel {
    grid-template-columns: 1fr;
  }

  .photo-reel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Richer insight report. */
.analysis-range-tabs {
  margin-bottom: 16px;
}

.analysis-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 26px;
  border: 1px solid rgba(202, 198, 184, 0.74);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(35, 107, 74, 0.92), rgba(23, 24, 20, 0.82)),
    url("https://images.unsplash.com/photo-1512621776951-a57141f2eefd?auto=format&fit=crop&w=1200&q=80") center / cover;
  color: #fffdf8;
  box-shadow: 0 24px 60px rgba(23, 24, 20, 0.12);
}

.analysis-hero .eyebrow,
.analysis-hero p,
.taste-score span,
.taste-score small {
  color: rgba(255, 253, 248, 0.76);
}

.analysis-hero h3 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.analysis-hero p {
  max-width: 680px;
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.65;
}

.persona-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.persona-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 253, 248, 0.22);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.12);
  color: #fffdf8;
  font-size: 12px;
  font-weight: 750;
}

.taste-score {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 164px;
  border: 1px solid rgba(255, 253, 248, 0.2);
  border-radius: 26px;
  background: rgba(255, 253, 248, 0.11);
  text-align: center;
}

.taste-score strong {
  margin: 8px 0;
  font-size: clamp(46px, 8vw, 76px);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.analysis-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 18px;
  margin: 18px 0;
}

.story-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(202, 198, 184, 0.74);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-sm);
}

.story-panel-wide {
  min-height: 270px;
}

.radar-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.radar-item,
.mission-item {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
}

.radar-item span,
.mission-item span {
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.radar-item strong,
.mission-item strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.radar-item p,
.mission-item p,
.companion-story p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.radar-item small {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

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

.companion-story {
  display: grid;
  gap: 16px;
}

.companion-bars {
  display: grid;
  gap: 10px;
}

.companion-bar {
  display: grid;
  gap: 6px;
}

.companion-bar span {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 750;
}

.companion-bar strong {
  display: flex;
  align-items: center;
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, #236b4a, #d86f4f);
  font-size: 12px;
}

.taste-map {
  display: grid;
  gap: 12px;
}

.taste-map-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.3fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.taste-map-row strong,
.taste-map-row span {
  display: block;
}

.taste-map-row strong {
  font-size: 15px;
}

.taste-map-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.taste-map-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebe7dc;
}

.taste-map-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.food-map-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.food-map {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(rgba(255, 253, 248, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 253, 248, 0.42) 1px, transparent 1px),
    radial-gradient(circle at 22% 34%, rgba(63, 109, 154, 0.2), transparent 18%),
    radial-gradient(circle at 74% 66%, rgba(216, 111, 79, 0.17), transparent 20%),
    #edf0e6;
  background-size:
    42px 42px,
    42px 42px,
    100% 100%,
    100% 100%,
    100% 100%;
}

.food-map::before,
.food-map::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.48);
}

.food-map::before {
  width: 70%;
  height: 28px;
  left: -12%;
  top: 30%;
  transform: rotate(-14deg);
}

.food-map::after {
  width: 62%;
  height: 22px;
  right: -14%;
  bottom: 28%;
  transform: rotate(20deg);
}

.food-map-point {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  border: 3px solid white;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #236b4a, #d86f4f);
  box-shadow: 0 8px 18px rgba(23, 24, 20, 0.2);
  transform: translate(-50%, -50%);
}

.food-map-point span {
  font-size: 10px;
  font-weight: 850;
}

.food-map-empty {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.66);
  text-align: center;
}

.location-insight {
  display: grid;
  gap: 10px;
}

.location-insight article {
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.location-insight span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.location-insight strong {
  font-size: 18px;
}

.location-insight p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.story-empty {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  background: var(--surface-soft);
  line-height: 1.55;
}

.story-empty.compact {
  padding: 14px;
  font-size: 13px;
}

@media (max-width: 1080px) {
  .analysis-hero,
  .analysis-story-grid {
    grid-template-columns: 1fr;
  }

  .taste-score {
    min-height: 130px;
  }
}

@media (max-width: 760px) {
  .analysis-hero,
  .story-panel {
    border-radius: 22px;
    padding: 20px;
  }

  .analysis-hero h3 {
    font-size: clamp(32px, 12vw, 48px);
  }

  .radar-list,
  .taste-map-row,
  .food-map-panel {
    grid-template-columns: 1fr;
  }
}
